forked from jruby/activerecord-jdbcsqlserver-adapter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gemfile
75 lines (65 loc) · 2.15 KB
/
Gemfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
require 'openssl'
source 'https://rubygems.org'
gemspec
gem 'sqlite3', '~> 1.3.6', platform: :mri
gem 'bcrypt'
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
if RbConfig::CONFIG["host_os"] =~ /darwin/
gem 'terminal-notifier-guard'
end
arjdbc_repo = 'https://github.com/jruby/activerecord-jdbc-adapter.git'
if ENV['ARJDBC_SOURCE']
gem 'activerecord-jdbc-adapter', path: ENV['ARJDBC_SOURCE']
elsif ENV['ARJDBC_BRANCH']
gem 'activerecord-jdbc-adapter', git: arjdbc_repo, branch: ENV['ARJDBC_BRANCH']
elsif ENV['ARJDBC_TAG']
gem 'activerecord-jdbc-adapter', git: arjdbc_repo, tag: ENV['ARJDBC_TAG']
elsif ENV['ARJDBC_COMMIT']
gem 'activerecord-jdbc-adapter', git: arjdbc_repo, ref: ENV['ARJDBC_COMMIT']
end
if ENV['RAILS_SOURCE']
gemspec path: ENV['RAILS_SOURCE']
else
# Need to get rails source because the gem doesn't include tests
version = ENV['RAILS_VERSION'] || begin
require 'net/http'
require 'yaml'
spec = eval(File.read('activerecord-jdbcsqlserver-adapter.gemspec'))
ver = spec.dependencies.detect{ |d|d.name == 'activerecord' }.requirement.requirements.first.last.version
major, minor, tiny, pre = ver.split('.')
if !pre
uri = URI.parse "https://rubygems.org/api/v1/versions/activerecord.yaml"
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
YAML.load(http.request(Net::HTTP::Get.new(uri.request_uri)).body).select do |data|
a, b, c = data['number'].split('.')
!data['prerelease'] && major == a && (minor.nil? || minor == b)
end.first['number']
else
ver
end
end
gem 'rails', git: "https://github.com/rails/rails.git", tag: "v#{version}"
end
if ENV['AREL']
gem 'arel', path: ENV['AREL']
end
group :tinytds do
if ENV['TINYTDS_SOURCE']
gem 'tiny_tds', path: ENV['TINYTDS_SOURCE'], platform: :mri
elsif ENV['TINYTDS_VERSION']
gem 'tiny_tds', ENV['TINYTDS_VERSION'], platform: :mri
else
gem 'tiny_tds', platform: :mri
end
end
group :development do
gem 'byebug', platform: :mri
gem 'mocha'
gem 'minitest-spec-rails'
end
group :guard do
gem 'guard'
gem 'guard-minitest'
end