File tree Expand file tree Collapse file tree 1 file changed +12
-6
lines changed Expand file tree Collapse file tree 1 file changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -6,12 +6,13 @@ module Appraisal
6
6
class BundlerDSL
7
7
attr_reader :dependencies
8
8
9
- PARTS = %w[ source ruby_version gits paths dependencies groups
9
+ PARTS = %w[ source ruby_version ruby_kwargs gits paths dependencies groups
10
10
platforms source_blocks install_if gemspec ]
11
11
12
12
def initialize
13
13
@sources = [ ]
14
14
@ruby_version = nil
15
+ @ruby_kwargs = nil
15
16
@dependencies = DependencyList . new
16
17
@gemspecs = [ ]
17
18
@groups = { }
@@ -65,8 +66,9 @@ def source(source, &block)
65
66
end
66
67
end
67
68
68
- def ruby ( ruby_version )
69
+ def ruby ( ruby_version = nil , ** kwargs )
69
70
@ruby_version = ruby_version
71
+ @ruby_kwargs = kwargs
70
72
end
71
73
72
74
def git ( source , options = { } , &block )
@@ -110,11 +112,15 @@ def source_entry
110
112
alias_method :source_entry_for_dup , :source_entry
111
113
112
114
def ruby_version_entry
113
- return unless @ruby_version
115
+ if @ruby_version
116
+ case @ruby_version
117
+ when String then return "ruby #{ @ruby_version . inspect } "
118
+ else return "ruby(#{ @ruby_version . inspect } )"
119
+ end
120
+ end
114
121
115
- case @ruby_version
116
- when String then "ruby #{ @ruby_version . inspect } "
117
- else "ruby(#{ @ruby_version . inspect } )"
122
+ if @ruby_kwargs && @ruby_kwargs . keys . size > 0
123
+ "ruby #{ @ruby_kwargs . to_s } "
118
124
end
119
125
end
120
126
You can’t perform that action at this time.
0 commit comments