@@ -36,6 +36,7 @@ class JRubyPrepareGemsIntegrationSpec extends IntegrationSpecification {
36
36
withPreamble """ repositories.ruby.gems()
37
37
jrubyPrepare.outputDir = '${ pathAsUriStr(projectDir)} '.toURI()
38
38
"""
39
+
39
40
withDependencies """
40
41
gems "rubygems:sinatra:1.4.5"
41
42
gems "rubygems:rack:[0,)"
@@ -51,6 +52,48 @@ class JRubyPrepareGemsIntegrationSpec extends IntegrationSpecification {
51
52
new File (projectDir, " gems/rack-1.6.11" ). exists()
52
53
}
53
54
55
+ @IgnoreIf ({ IntegrationSpecification .OFFLINE })
56
+ void " Check that GEM dependencies are locked" () {
57
+ setup :
58
+ File lockFile = new File (projectDir, ' gradle/dependency-locks/gems.lockfile' )
59
+ withPreamble """ repositories.ruby.gems()
60
+ jrubyPrepare.outputDir = '${ pathAsUriStr(projectDir)} '.toURI()
61
+
62
+ dependencyLocking {
63
+ lockAllConfigurations()
64
+ }
65
+
66
+
67
+ """
68
+ withDependencies """
69
+ gems "rubygems:sinatra:1.4.5"
70
+ gems "rubygems:rack:[0,)"
71
+ gems "rubygems:lookout-rack-utils:5.0.0.49"
72
+ """
73
+
74
+ lockFile. parentFile. mkdirs()
75
+ lockFile. text = '''
76
+ rubygems:concurrent-ruby:1.1.5
77
+ rubygems:configatron:4.5.1
78
+ rubygems:i18n:1.6.0
79
+ rubygems:log4r:1.1.10
80
+ rubygems:lookout-rack-utils:5.0.0.49
81
+ rubygems:lookout-statsd:3.2.0
82
+ rubygems:rack-graphite:1.6.0
83
+ rubygems:rack-protection:1.5.5
84
+ rubygems:rack:1.6.10
85
+ rubygems:sinatra:1.4.5
86
+ rubygems:tilt:2.0.9
87
+ '''
88
+ when :
89
+ build()
90
+
91
+ then :
92
+ // since we need a version range in the setup the
93
+ // resolved version here can vary over time
94
+ new File (projectDir, " gems/rack-1.6.10" ). exists()
95
+ }
96
+
54
97
@IgnoreIf ({ IntegrationSpecification .OFFLINE })
55
98
void " Check if prerelease gem gets resolved" () {
56
99
setup :
0 commit comments