-
Notifications
You must be signed in to change notification settings - Fork 67
/
Appraisals
40 lines (32 loc) · 967 Bytes
/
Appraisals
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
current_ruby = Gem::Version.new(RUBY_VERSION)
ruby_2_5_0 = Gem::Version.new('2.5.0')
ruby_2_7_0 = Gem::Version.new('2.7.0')
ENV['OPAL_VERSION'] = nil # ensure the env is clean
github = -> repo_name { "https://github.com/#{repo_name}.git" }
{
opal_1_7: -> gemfile do
gemfile.gem 'opal', '~> 1.7.0'
gemfile.gem 'opal-sprockets'
end,
opal_1_3: -> gemfile do
gemfile.gem 'opal', '~> 1.3.0'
gemfile.gem 'opal-sprockets'
end,
opal_1_0: -> gemfile do
gemfile.gem 'opal', '~> 1.0.0'
gemfile.gem 'opal-sprockets'
end,
}.each do |opal_version, gem_opal|
appraise "rails_6_0_#{opal_version}" do
gem "rails", "~> 6.0.0"
gem_opal[self]
end if current_ruby >= ruby_2_5_0
appraise "rails_6_1_#{opal_version}" do
gem "rails", "~> 6.1.0"
gem_opal[self]
end if current_ruby >= ruby_2_5_0
appraise "rails_7_0_#{opal_version}" do
gem "rails", "~> 7.0.0"
gem_opal[self]
end if current_ruby >= ruby_2_7_0
end