forked from rails-sqlserver/activerecord-sqlserver-adapter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gemfile
74 lines (63 loc) · 1.98 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
# frozen_string_literal: true
source "https://rubygems.org"
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
gemspec
gem "bcrypt"
gem "pg", ">= 0.18.0"
gem "sqlite3", ">= 1.6.6"
gem "tzinfo-data", platforms: [:mingw, :mswin, :x64_mingw, :jruby]
gem "benchmark-ips"
gem "minitest", ">= 5.15.0"
gem "msgpack", ">= 1.7.0"
if ENV["RAILS_SOURCE"]
gemspec path: ENV["RAILS_SOURCE"]
elsif ENV["RAILS_BRANCH"]
gem "rails", github: "rails/rails", branch: ENV["RAILS_BRANCH"]
else
# Need to get rails source because the gem doesn't include tests
version = ENV["RAILS_VERSION"] || begin
require "openssl"
require "net/http"
require "yaml"
spec = eval(File.read("activerecord-sqlserver-adapter.gemspec"))
ver = spec.dependencies.detect { |d| d.name == "activerecord" }.requirement.requirements.first.last.version
major, minor, _tiny, pre = ver.split(".")
if pre
ver
else
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).find do |data|
a, b, = data["number"].split(".")
!data["prerelease"] && major == a && (minor.nil? || minor == b)
end["number"]
end
end
gem "rails", github: "rails/rails", tag: "v#{version}"
end
# rubocop:disable Bundler/DuplicatedGem
group :tinytds do
if ENV["TINYTDS_SOURCE"]
gem "tiny_tds", path: ENV["TINYTDS_SOURCE"]
elsif ENV["TINYTDS_VERSION"]
gem "tiny_tds", ENV["TINYTDS_VERSION"]
else
gem "tiny_tds"
end
end
# rubocop:enable Bundler/DuplicatedGem
group :development do
gem "minitest-spec-rails"
gem "mocha"
gem "pry-byebug", platform: [:mri, :mingw, :x64_mingw]
end
group :guard do
gem "guard"
gem "guard-minitest"
gem "terminal-notifier-guard" if RbConfig::CONFIG["host_os"] =~ /darwin/
end
group :rubocop do
gem "rubocop", require: false
end