gemlock 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- data/.travis.yml +6 -0
- data/README.markdown +27 -0
- data/Rakefile +1 -1
- data/gemlock.gemspec +0 -1
- data/lib/gemlock.rb +4 -4
- data/lib/gemlock/version.rb +1 -1
- data/lib/tasks/gemlock.rake +4 -0
- data/spec/fixtures/vcr_cassettes/{rails_cassette.yml → Gemlock/_lookup_version.yml} +5 -5
- data/spec/fixtures/vcr_cassettes/{outdated_cassette.yml → Gemlock/_outdated.yml} +45 -45
- data/spec/gemlock_spec.rb +21 -25
- data/spec/spec_helper.rb +2 -0
- metadata +20 -32
data/.travis.yml
ADDED
data/README.markdown
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
Gemlock
|
2
|
+
=======
|
3
|
+
|
4
|
+
Provides rake tasks that allow you to check for out of date gems in a project
|
5
|
+
using Bundler.
|
6
|
+
|
7
|
+
### Travis Status
|
8
|
+
|
9
|
+
[![Build Status](https://secure.travis-ci.org/skalnik/gemlock.png)](http://travis-ci.org/skalnik/gemlock)
|
10
|
+
|
11
|
+
Overview
|
12
|
+
--------
|
13
|
+
|
14
|
+
$ rake gemlock:outdated
|
15
|
+
rails is out of date!
|
16
|
+
Installed version: 3.0.10. Latest version: 3.1.0
|
17
|
+
|
18
|
+
Gemlock looks at what gems you've specified in your Gemfile, checks the version
|
19
|
+
that that Bundler has set in Gemfile.lock, and lets you know if there's a newer
|
20
|
+
version available.
|
21
|
+
|
22
|
+
Installation
|
23
|
+
------------
|
24
|
+
|
25
|
+
1. Add `gem 'gemlock'` to your `Gemfile`
|
26
|
+
2. Run `bundle install`
|
27
|
+
3. If you're using Rails, you're done! Otherwise, add `require 'gemlock/rake_tasks'` to your Rakefile
|
data/Rakefile
CHANGED
data/gemlock.gemspec
CHANGED
@@ -23,7 +23,6 @@ Gem::Specification.new do |s|
|
|
23
23
|
s.add_dependency('rest-client')
|
24
24
|
s.add_dependency('json')
|
25
25
|
|
26
|
-
s.add_development_dependency('autotest')
|
27
26
|
s.add_development_dependency('rspec' , '~> 2.6.0')
|
28
27
|
s.add_development_dependency('mocha' , '~> 0.10.0')
|
29
28
|
s.add_development_dependency('pry' , '>= 0.9.5')
|
data/lib/gemlock.rb
CHANGED
@@ -26,7 +26,7 @@ module Gemlock
|
|
26
26
|
end
|
27
27
|
|
28
28
|
def lookup_version(name)
|
29
|
-
json_hash = JSON.parse(RestClient.get("
|
29
|
+
json_hash = JSON.parse(RestClient.get("http://rubygems.org/api/v1/gems/#{name}.json"))
|
30
30
|
|
31
31
|
return json_hash["version"]
|
32
32
|
end
|
@@ -37,17 +37,17 @@ module Gemlock
|
|
37
37
|
specs[spec.name] = spec.version.to_s
|
38
38
|
end
|
39
39
|
|
40
|
-
|
40
|
+
outdated = {}
|
41
41
|
locked_gemfile_specs.each do |spec|
|
42
42
|
latest_version = lookup_version(spec.name)
|
43
43
|
if Gem::Version.new(latest_version) > Gem::Version.new(spec.version)
|
44
|
-
|
44
|
+
outdated[spec.name] = latest_version
|
45
45
|
end
|
46
46
|
hash
|
47
47
|
end
|
48
48
|
|
49
49
|
return_hash = {}
|
50
|
-
|
50
|
+
outdated.each_pair do |name, latest_version|
|
51
51
|
return_hash[name] = { :latest => latest_version,
|
52
52
|
:current => specs[name] }
|
53
53
|
end
|
data/lib/gemlock/version.rb
CHANGED
data/lib/tasks/gemlock.rake
CHANGED
@@ -15,7 +15,11 @@ namespace :gemlock do
|
|
15
15
|
outdated.each_pair do |name, versions|
|
16
16
|
puts "#{name} is out of date!"
|
17
17
|
puts "Installed version: #{versions[:current]}. Latest version: #{versions[:latest]}"
|
18
|
+
puts "To update: bundle update #{name}"
|
18
19
|
end
|
20
|
+
puts ""
|
21
|
+
puts "To update all your gems via bundler:"
|
22
|
+
puts "bundle update"
|
19
23
|
end
|
20
24
|
end
|
21
25
|
end
|
@@ -2,7 +2,7 @@
|
|
2
2
|
- !ruby/struct:VCR::HTTPInteraction
|
3
3
|
request: !ruby/struct:VCR::Request
|
4
4
|
method: :get
|
5
|
-
uri:
|
5
|
+
uri: http://rubygems.org:80/api/v1/gems/rails.json
|
6
6
|
body:
|
7
7
|
headers:
|
8
8
|
accept:
|
@@ -17,22 +17,22 @@
|
|
17
17
|
x-ua-compatible:
|
18
18
|
- IE=Edge,chrome=1
|
19
19
|
etag:
|
20
|
-
- "\"
|
20
|
+
- "\"5b9a3bfd4342827b3f980cb8f7ac90d4\""
|
21
21
|
x-powered-by:
|
22
22
|
- Phusion Passenger (mod_rails/mod_rack) 3.0.0
|
23
23
|
content-type:
|
24
24
|
- application/json; charset=utf-8
|
25
25
|
x-runtime:
|
26
|
-
- "0.
|
26
|
+
- "0.021016"
|
27
27
|
server:
|
28
28
|
- Apache/2.2.3 (Red Hat) mod_ssl/2.2.3 OpenSSL/0.9.8e-fips-rhel5 Phusion_Passenger/3.0.0
|
29
29
|
date:
|
30
|
-
-
|
30
|
+
- Sun, 25 Sep 2011 05:56:03 GMT
|
31
31
|
status:
|
32
32
|
- "200"
|
33
33
|
cache-control:
|
34
34
|
- max-age=0, private, must-revalidate
|
35
35
|
transfer-encoding:
|
36
36
|
- chunked
|
37
|
-
body: "{\"dependencies\":{\"runtime\":[{\"name\":\"actionmailer\",\"requirements\":\"= 3.1.0\"},{\"name\":\"actionpack\",\"requirements\":\"= 3.1.0\"},{\"name\":\"activerecord\",\"requirements\":\"= 3.1.0\"},{\"name\":\"activeresource\",\"requirements\":\"= 3.1.0\"},{\"name\":\"activesupport\",\"requirements\":\"= 3.1.0\"},{\"name\":\"bundler\",\"requirements\":\"~> 1.0\"},{\"name\":\"railties\",\"requirements\":\"= 3.1.0\"}],\"development\":[]},\"name\":\"rails\",\"downloads\":
|
37
|
+
body: "{\"dependencies\":{\"runtime\":[{\"name\":\"actionmailer\",\"requirements\":\"= 3.1.0\"},{\"name\":\"actionpack\",\"requirements\":\"= 3.1.0\"},{\"name\":\"activerecord\",\"requirements\":\"= 3.1.0\"},{\"name\":\"activeresource\",\"requirements\":\"= 3.1.0\"},{\"name\":\"activesupport\",\"requirements\":\"= 3.1.0\"},{\"name\":\"bundler\",\"requirements\":\"~> 1.0\"},{\"name\":\"railties\",\"requirements\":\"= 3.1.0\"}],\"development\":[]},\"name\":\"rails\",\"downloads\":5563606,\"info\":\"Ruby on Rails is a full-stack web framework optimized for programmer happiness and sustainable productivity. It encourages beautiful code by favoring convention over configuration.\",\"version_downloads\":168699,\"version\":\"3.1.0\",\"homepage_uri\":\"http://www.rubyonrails.org\",\"bug_tracker_uri\":\"http://rails.lighthouseapp.com/projects/8994-ruby-on-rails\",\"source_code_uri\":\"http://github.com/rails/rails\",\"gem_uri\":\"http://rubygems.org/gems/rails-3.1.0.gem\",\"project_uri\":\"http://rubygems.org/gems/rails\",\"authors\":\"David Heinemeier Hansson\",\"mailing_list_uri\":\"http://groups.google.com/group/rubyonrails-talk\",\"documentation_uri\":\"http://api.rubyonrails.org\",\"wiki_uri\":\"http://wiki.rubyonrails.org\"}"
|
38
38
|
http_version: "1.1"
|
@@ -2,7 +2,7 @@
|
|
2
2
|
- !ruby/struct:VCR::HTTPInteraction
|
3
3
|
request: !ruby/struct:VCR::Request
|
4
4
|
method: :get
|
5
|
-
uri:
|
5
|
+
uri: http://rubygems.org:80/api/v1/gems/coffee-rails.json
|
6
6
|
body:
|
7
7
|
headers:
|
8
8
|
accept:
|
@@ -17,29 +17,29 @@
|
|
17
17
|
x-ua-compatible:
|
18
18
|
- IE=Edge,chrome=1
|
19
19
|
etag:
|
20
|
-
- "\"
|
20
|
+
- "\"8617a792c13fd41114f6625f9c5229af\""
|
21
21
|
x-powered-by:
|
22
22
|
- Phusion Passenger (mod_rails/mod_rack) 3.0.0
|
23
23
|
content-type:
|
24
24
|
- application/json; charset=utf-8
|
25
25
|
x-runtime:
|
26
|
-
- "0.
|
26
|
+
- "0.017452"
|
27
27
|
server:
|
28
28
|
- Apache/2.2.3 (Red Hat) mod_ssl/2.2.3 OpenSSL/0.9.8e-fips-rhel5 Phusion_Passenger/3.0.0
|
29
29
|
date:
|
30
|
-
-
|
30
|
+
- Sun, 25 Sep 2011 05:56:36 GMT
|
31
31
|
status:
|
32
32
|
- "200"
|
33
33
|
cache-control:
|
34
34
|
- max-age=0, private, must-revalidate
|
35
35
|
transfer-encoding:
|
36
36
|
- chunked
|
37
|
-
body: "{\"dependencies\":{\"runtime\":[{\"name\":\"coffee-script\",\"requirements\":\">= 2.2.0\"},{\"name\":\"railties\",\"requirements\":\"~> 3.1.0\"}],\"development\":[]},\"name\":\"coffee-rails\",\"downloads\":
|
37
|
+
body: "{\"dependencies\":{\"runtime\":[{\"name\":\"coffee-script\",\"requirements\":\">= 2.2.0\"},{\"name\":\"railties\",\"requirements\":\"~> 3.1.0\"}],\"development\":[]},\"name\":\"coffee-rails\",\"downloads\":148621,\"info\":\"Coffee Script adapter for the Rails asset pipeline.\",\"version_downloads\":51387,\"version\":\"3.1.1\",\"homepage_uri\":\"\",\"bug_tracker_uri\":\"\",\"source_code_uri\":\"https://github.com/rails/coffee-rails\",\"gem_uri\":\"http://rubygems.org/gems/coffee-rails-3.1.1.gem\",\"project_uri\":\"http://rubygems.org/gems/coffee-rails\",\"authors\":\"Santiago Pastorino\",\"mailing_list_uri\":\"\",\"documentation_uri\":\"\",\"wiki_uri\":\"\"}"
|
38
38
|
http_version: "1.1"
|
39
39
|
- !ruby/struct:VCR::HTTPInteraction
|
40
40
|
request: !ruby/struct:VCR::Request
|
41
41
|
method: :get
|
42
|
-
uri:
|
42
|
+
uri: http://rubygems.org:80/api/v1/gems/jquery-rails.json
|
43
43
|
body:
|
44
44
|
headers:
|
45
45
|
accept:
|
@@ -54,29 +54,29 @@
|
|
54
54
|
x-ua-compatible:
|
55
55
|
- IE=Edge,chrome=1
|
56
56
|
etag:
|
57
|
-
- "\"
|
57
|
+
- "\"0a33d8c12b5bdd770bb6acae9c3db6bf\""
|
58
58
|
x-powered-by:
|
59
59
|
- Phusion Passenger (mod_rails/mod_rack) 3.0.0
|
60
60
|
content-type:
|
61
61
|
- application/json; charset=utf-8
|
62
62
|
x-runtime:
|
63
|
-
- "0.
|
63
|
+
- "0.020328"
|
64
64
|
server:
|
65
65
|
- Apache/2.2.3 (Red Hat) mod_ssl/2.2.3 OpenSSL/0.9.8e-fips-rhel5 Phusion_Passenger/3.0.0
|
66
66
|
date:
|
67
|
-
-
|
67
|
+
- Sun, 25 Sep 2011 05:56:37 GMT
|
68
68
|
status:
|
69
69
|
- "200"
|
70
70
|
cache-control:
|
71
71
|
- max-age=0, private, must-revalidate
|
72
72
|
transfer-encoding:
|
73
73
|
- chunked
|
74
|
-
body: "{\"dependencies\":{\"runtime\":[{\"name\":\"railties\",\"requirements\":\"~> 3.0\"},{\"name\":\"thor\",\"requirements\":\"~> 0.14\"}],\"development\":[{\"name\":\"bundler\",\"requirements\":\"~> 1.0.0\"},{\"name\":\"rails\",\"requirements\":\"~> 3.0\"}]},\"name\":\"jquery-rails\",\"downloads\":
|
74
|
+
body: "{\"dependencies\":{\"runtime\":[{\"name\":\"railties\",\"requirements\":\"~> 3.0\"},{\"name\":\"thor\",\"requirements\":\"~> 0.14\"}],\"development\":[{\"name\":\"bundler\",\"requirements\":\"~> 1.0.0\"},{\"name\":\"rails\",\"requirements\":\"~> 3.0\"}]},\"name\":\"jquery-rails\",\"downloads\":807842,\"info\":\"This gem provides jQuery and the jQuery-ujs driver for your Rails 3 application.\",\"version_downloads\":90622,\"version\":\"1.0.14\",\"homepage_uri\":\"http://rubygems.org/gems/jquery-rails\",\"bug_tracker_uri\":\"https://github.com/rails/jquery-rails/issues\",\"source_code_uri\":\"https://github.com/rails/jquery-rails\",\"gem_uri\":\"http://rubygems.org/gems/jquery-rails-1.0.14.gem\",\"project_uri\":\"http://rubygems.org/gems/jquery-rails\",\"authors\":\"Andr\\u00e9 Arko\",\"mailing_list_uri\":\"\",\"documentation_uri\":\"\",\"wiki_uri\":\"\"}"
|
75
75
|
http_version: "1.1"
|
76
76
|
- !ruby/struct:VCR::HTTPInteraction
|
77
77
|
request: !ruby/struct:VCR::Request
|
78
78
|
method: :get
|
79
|
-
uri:
|
79
|
+
uri: http://rubygems.org:80/api/v1/gems/json.json
|
80
80
|
body:
|
81
81
|
headers:
|
82
82
|
accept:
|
@@ -91,29 +91,29 @@
|
|
91
91
|
x-ua-compatible:
|
92
92
|
- IE=Edge,chrome=1
|
93
93
|
etag:
|
94
|
-
- "\"
|
94
|
+
- "\"8a71fb297b6baf6a6589ec59e2975d66\""
|
95
95
|
x-powered-by:
|
96
96
|
- Phusion Passenger (mod_rails/mod_rack) 3.0.0
|
97
97
|
content-type:
|
98
98
|
- application/json; charset=utf-8
|
99
99
|
x-runtime:
|
100
|
-
- "0.
|
100
|
+
- "0.019527"
|
101
101
|
server:
|
102
102
|
- Apache/2.2.3 (Red Hat) mod_ssl/2.2.3 OpenSSL/0.9.8e-fips-rhel5 Phusion_Passenger/3.0.0
|
103
103
|
date:
|
104
|
-
-
|
104
|
+
- Sun, 25 Sep 2011 05:56:37 GMT
|
105
105
|
status:
|
106
106
|
- "200"
|
107
107
|
cache-control:
|
108
108
|
- max-age=0, private, must-revalidate
|
109
109
|
transfer-encoding:
|
110
110
|
- chunked
|
111
|
-
body: "{\"dependencies\":{\"runtime\":[],\"development\":[{\"name\":\"bullshit\",\"requirements\":\">= 0\"},{\"name\":\"permutation\",\"requirements\":\">= 0\"},{\"name\":\"sdoc\",\"requirements\":\">= 0\"}]},\"name\":\"json\",\"downloads\":
|
111
|
+
body: "{\"dependencies\":{\"runtime\":[],\"development\":[{\"name\":\"bullshit\",\"requirements\":\">= 0\"},{\"name\":\"permutation\",\"requirements\":\">= 0\"},{\"name\":\"sdoc\",\"requirements\":\">= 0\"}]},\"name\":\"json\",\"downloads\":2574832,\"info\":\"This is a JSON implementation as a Ruby extension in C.\",\"version_downloads\":35588,\"version\":\"1.6.1\",\"homepage_uri\":\"http://flori.github.com/json\",\"bug_tracker_uri\":\"http://github.com/flori/json/issues\",\"source_code_uri\":\"http://flori.github.com/json/\",\"gem_uri\":\"http://rubygems.org/gems/json-1.6.1.gem\",\"project_uri\":\"http://rubygems.org/gems/json\",\"authors\":\"Florian Frank\",\"mailing_list_uri\":\"\",\"documentation_uri\":\"http://flori.github.com/json/doc/index.html\",\"wiki_uri\":\"\"}"
|
112
112
|
http_version: "1.1"
|
113
113
|
- !ruby/struct:VCR::HTTPInteraction
|
114
114
|
request: !ruby/struct:VCR::Request
|
115
115
|
method: :get
|
116
|
-
uri:
|
116
|
+
uri: http://rubygems.org:80/api/v1/gems/rails.json
|
117
117
|
body:
|
118
118
|
headers:
|
119
119
|
accept:
|
@@ -128,29 +128,29 @@
|
|
128
128
|
x-ua-compatible:
|
129
129
|
- IE=Edge,chrome=1
|
130
130
|
etag:
|
131
|
-
- "\"
|
131
|
+
- "\"5b9a3bfd4342827b3f980cb8f7ac90d4\""
|
132
132
|
x-powered-by:
|
133
133
|
- Phusion Passenger (mod_rails/mod_rack) 3.0.0
|
134
134
|
content-type:
|
135
135
|
- application/json; charset=utf-8
|
136
136
|
x-runtime:
|
137
|
-
- "0.
|
137
|
+
- "0.021418"
|
138
138
|
server:
|
139
139
|
- Apache/2.2.3 (Red Hat) mod_ssl/2.2.3 OpenSSL/0.9.8e-fips-rhel5 Phusion_Passenger/3.0.0
|
140
140
|
date:
|
141
|
-
-
|
141
|
+
- Sun, 25 Sep 2011 05:56:37 GMT
|
142
142
|
status:
|
143
143
|
- "200"
|
144
144
|
cache-control:
|
145
145
|
- max-age=0, private, must-revalidate
|
146
146
|
transfer-encoding:
|
147
147
|
- chunked
|
148
|
-
body: "{\"dependencies\":{\"runtime\":[{\"name\":\"actionmailer\",\"requirements\":\"= 3.1.0\"},{\"name\":\"actionpack\",\"requirements\":\"= 3.1.0\"},{\"name\":\"activerecord\",\"requirements\":\"= 3.1.0\"},{\"name\":\"activeresource\",\"requirements\":\"= 3.1.0\"},{\"name\":\"activesupport\",\"requirements\":\"= 3.1.0\"},{\"name\":\"bundler\",\"requirements\":\"~> 1.0\"},{\"name\":\"railties\",\"requirements\":\"= 3.1.0\"}],\"development\":[]},\"name\":\"rails\",\"downloads\":
|
148
|
+
body: "{\"dependencies\":{\"runtime\":[{\"name\":\"actionmailer\",\"requirements\":\"= 3.1.0\"},{\"name\":\"actionpack\",\"requirements\":\"= 3.1.0\"},{\"name\":\"activerecord\",\"requirements\":\"= 3.1.0\"},{\"name\":\"activeresource\",\"requirements\":\"= 3.1.0\"},{\"name\":\"activesupport\",\"requirements\":\"= 3.1.0\"},{\"name\":\"bundler\",\"requirements\":\"~> 1.0\"},{\"name\":\"railties\",\"requirements\":\"= 3.1.0\"}],\"development\":[]},\"name\":\"rails\",\"downloads\":5563606,\"info\":\"Ruby on Rails is a full-stack web framework optimized for programmer happiness and sustainable productivity. It encourages beautiful code by favoring convention over configuration.\",\"version_downloads\":168699,\"version\":\"3.1.0\",\"homepage_uri\":\"http://www.rubyonrails.org\",\"bug_tracker_uri\":\"http://rails.lighthouseapp.com/projects/8994-ruby-on-rails\",\"source_code_uri\":\"http://github.com/rails/rails\",\"gem_uri\":\"http://rubygems.org/gems/rails-3.1.0.gem\",\"project_uri\":\"http://rubygems.org/gems/rails\",\"authors\":\"David Heinemeier Hansson\",\"mailing_list_uri\":\"http://groups.google.com/group/rubyonrails-talk\",\"documentation_uri\":\"http://api.rubyonrails.org\",\"wiki_uri\":\"http://wiki.rubyonrails.org\"}"
|
149
149
|
http_version: "1.1"
|
150
150
|
- !ruby/struct:VCR::HTTPInteraction
|
151
151
|
request: !ruby/struct:VCR::Request
|
152
152
|
method: :get
|
153
|
-
uri:
|
153
|
+
uri: http://rubygems.org:80/api/v1/gems/ruby-debug.json
|
154
154
|
body:
|
155
155
|
headers:
|
156
156
|
accept:
|
@@ -165,29 +165,29 @@
|
|
165
165
|
x-ua-compatible:
|
166
166
|
- IE=Edge,chrome=1
|
167
167
|
etag:
|
168
|
-
- "\"
|
168
|
+
- "\"210801ca92754af8466240a53c948d81\""
|
169
169
|
x-powered-by:
|
170
170
|
- Phusion Passenger (mod_rails/mod_rack) 3.0.0
|
171
171
|
content-type:
|
172
172
|
- application/json; charset=utf-8
|
173
173
|
x-runtime:
|
174
|
-
- "0.
|
174
|
+
- "0.150923"
|
175
175
|
server:
|
176
176
|
- Apache/2.2.3 (Red Hat) mod_ssl/2.2.3 OpenSSL/0.9.8e-fips-rhel5 Phusion_Passenger/3.0.0
|
177
177
|
date:
|
178
|
-
-
|
178
|
+
- Sun, 25 Sep 2011 05:56:37 GMT
|
179
179
|
status:
|
180
180
|
- "200"
|
181
181
|
cache-control:
|
182
182
|
- max-age=0, private, must-revalidate
|
183
183
|
transfer-encoding:
|
184
184
|
- chunked
|
185
|
-
body: "{\"dependencies\":{\"runtime\":[{\"name\":\"columnize\",\"requirements\":\">= 0.1\"},{\"name\":\"ruby-debug-base\",\"requirements\":\"~> 0.10.4.0\"}],\"development\":[]},\"name\":\"ruby-debug\",\"downloads\":
|
185
|
+
body: "{\"dependencies\":{\"runtime\":[{\"name\":\"columnize\",\"requirements\":\">= 0.1\"},{\"name\":\"ruby-debug-base\",\"requirements\":\"~> 0.10.4.0\"}],\"development\":[]},\"name\":\"ruby-debug\",\"downloads\":526808,\"info\":\"A generic command line interface for ruby-debug.\\n\",\"version_downloads\":300078,\"version\":\"0.10.4\",\"homepage_uri\":\"http://rubyforge.org/projects/ruby-debug/\",\"bug_tracker_uri\":null,\"source_code_uri\":null,\"gem_uri\":\"http://rubygems.org/gems/ruby-debug-0.10.4.gem\",\"project_uri\":\"http://rubygems.org/gems/ruby-debug\",\"authors\":\"Kent Sibilev\",\"mailing_list_uri\":null,\"documentation_uri\":null,\"wiki_uri\":null}"
|
186
186
|
http_version: "1.1"
|
187
187
|
- !ruby/struct:VCR::HTTPInteraction
|
188
188
|
request: !ruby/struct:VCR::Request
|
189
189
|
method: :get
|
190
|
-
uri:
|
190
|
+
uri: http://rubygems.org:80/api/v1/gems/sass-rails.json
|
191
191
|
body:
|
192
192
|
headers:
|
193
193
|
accept:
|
@@ -202,29 +202,29 @@
|
|
202
202
|
x-ua-compatible:
|
203
203
|
- IE=Edge,chrome=1
|
204
204
|
etag:
|
205
|
-
- "\"
|
205
|
+
- "\"65f4791683b315d2362f9b23ee5bc4da\""
|
206
206
|
x-powered-by:
|
207
207
|
- Phusion Passenger (mod_rails/mod_rack) 3.0.0
|
208
208
|
content-type:
|
209
209
|
- application/json; charset=utf-8
|
210
210
|
x-runtime:
|
211
|
-
- "0.
|
211
|
+
- "0.019185"
|
212
212
|
server:
|
213
213
|
- Apache/2.2.3 (Red Hat) mod_ssl/2.2.3 OpenSSL/0.9.8e-fips-rhel5 Phusion_Passenger/3.0.0
|
214
214
|
date:
|
215
|
-
-
|
215
|
+
- Sun, 25 Sep 2011 05:56:37 GMT
|
216
216
|
status:
|
217
217
|
- "200"
|
218
218
|
cache-control:
|
219
219
|
- max-age=0, private, must-revalidate
|
220
220
|
transfer-encoding:
|
221
221
|
- chunked
|
222
|
-
body: "{\"dependencies\":{\"runtime\":[{\"name\":\"actionpack\",\"requirements\":\"~> 3.1.0\"},{\"name\":\"railties\",\"requirements\":\"~> 3.1.0\"},{\"name\":\"sass\",\"requirements\":\">= 3.1.4\"},{\"name\":\"sprockets\",\"requirements\":\"~> 2.0.0\"},{\"name\":\"tilt\",\"requirements\":\"~> 1.3.2\"}],\"development\":[]},\"name\":\"sass-rails\",\"downloads\":
|
222
|
+
body: "{\"dependencies\":{\"runtime\":[{\"name\":\"actionpack\",\"requirements\":\"~> 3.1.0\"},{\"name\":\"railties\",\"requirements\":\"~> 3.1.0\"},{\"name\":\"sass\",\"requirements\":\">= 3.1.4\"},{\"name\":\"sprockets\",\"requirements\":\"~> 2.0.0\"},{\"name\":\"tilt\",\"requirements\":\"~> 1.3.2\"}],\"development\":[]},\"name\":\"sass-rails\",\"downloads\":216333,\"info\":\"Sass adapter for the Rails asset pipeline.\",\"version_downloads\":39833,\"version\":\"3.1.2\",\"homepage_uri\":\"\",\"bug_tracker_uri\":\"https://github.com/rails/sass-rails/issues\",\"source_code_uri\":\"https://github.com/rails/sass-rails\",\"gem_uri\":\"http://rubygems.org/gems/sass-rails-3.1.2.gem\",\"project_uri\":\"http://rubygems.org/gems/sass-rails\",\"authors\":\"wycats, chriseppstein\",\"mailing_list_uri\":\"\",\"documentation_uri\":\"https://github.com/rails/sass-rails/blob/master/README.markdown\",\"wiki_uri\":\"\"}"
|
223
223
|
http_version: "1.1"
|
224
224
|
- !ruby/struct:VCR::HTTPInteraction
|
225
225
|
request: !ruby/struct:VCR::Request
|
226
226
|
method: :get
|
227
|
-
uri:
|
227
|
+
uri: http://rubygems.org:80/api/v1/gems/sqlite3.json
|
228
228
|
body:
|
229
229
|
headers:
|
230
230
|
accept:
|
@@ -239,29 +239,29 @@
|
|
239
239
|
x-ua-compatible:
|
240
240
|
- IE=Edge,chrome=1
|
241
241
|
etag:
|
242
|
-
- "\"
|
242
|
+
- "\"d734864523607f57a32faefa0f488e5f\""
|
243
243
|
x-powered-by:
|
244
244
|
- Phusion Passenger (mod_rails/mod_rack) 3.0.0
|
245
245
|
content-type:
|
246
246
|
- application/json; charset=utf-8
|
247
247
|
x-runtime:
|
248
|
-
- "0.
|
248
|
+
- "0.019085"
|
249
249
|
server:
|
250
250
|
- Apache/2.2.3 (Red Hat) mod_ssl/2.2.3 OpenSSL/0.9.8e-fips-rhel5 Phusion_Passenger/3.0.0
|
251
251
|
date:
|
252
|
-
-
|
252
|
+
- Sun, 25 Sep 2011 05:56:37 GMT
|
253
253
|
status:
|
254
254
|
- "200"
|
255
255
|
cache-control:
|
256
256
|
- max-age=0, private, must-revalidate
|
257
257
|
transfer-encoding:
|
258
258
|
- chunked
|
259
|
-
body: "{\"dependencies\":{\"runtime\":[],\"development\":[{\"name\":\"hoe\",\"requirements\":\"~> 2.10\"},{\"name\":\"mini_portile\",\"requirements\":\"~> 0.2.2\"},{\"name\":\"rake-compiler\",\"requirements\":\"~> 0.7.0\"}]},\"name\":\"sqlite3\",\"downloads\":
|
259
|
+
body: "{\"dependencies\":{\"runtime\":[],\"development\":[{\"name\":\"hoe\",\"requirements\":\"~> 2.10\"},{\"name\":\"mini_portile\",\"requirements\":\"~> 0.2.2\"},{\"name\":\"rake-compiler\",\"requirements\":\"~> 0.7.0\"}]},\"name\":\"sqlite3\",\"downloads\":1096156,\"info\":\"This module allows Ruby programs to interface with the SQLite3\\ndatabase engine (http://www.sqlite.org). You must have the\\nSQLite engine installed in order to build this module.\\n\\nNote that this module is NOT compatible with SQLite 2.x.\",\"version_downloads\":258507,\"version\":\"1.3.4\",\"homepage_uri\":\"http://github.com/luislavena/sqlite3-ruby\",\"bug_tracker_uri\":null,\"source_code_uri\":null,\"gem_uri\":\"http://rubygems.org/gems/sqlite3-1.3.4.gem\",\"project_uri\":\"http://rubygems.org/gems/sqlite3\",\"authors\":\"Jamis Buck, Luis Lavena, Aaron Patterson\",\"mailing_list_uri\":null,\"documentation_uri\":null,\"wiki_uri\":null}"
|
260
260
|
http_version: "1.1"
|
261
261
|
- !ruby/struct:VCR::HTTPInteraction
|
262
262
|
request: !ruby/struct:VCR::Request
|
263
263
|
method: :get
|
264
|
-
uri:
|
264
|
+
uri: http://rubygems.org:80/api/v1/gems/uglifier.json
|
265
265
|
body:
|
266
266
|
headers:
|
267
267
|
accept:
|
@@ -276,29 +276,29 @@
|
|
276
276
|
x-ua-compatible:
|
277
277
|
- IE=Edge,chrome=1
|
278
278
|
etag:
|
279
|
-
- "\"
|
279
|
+
- "\"672e41201c949086dd5c78f356473803\""
|
280
280
|
x-powered-by:
|
281
281
|
- Phusion Passenger (mod_rails/mod_rack) 3.0.0
|
282
282
|
content-type:
|
283
283
|
- application/json; charset=utf-8
|
284
284
|
x-runtime:
|
285
|
-
- "0.
|
285
|
+
- "0.021295"
|
286
286
|
server:
|
287
287
|
- Apache/2.2.3 (Red Hat) mod_ssl/2.2.3 OpenSSL/0.9.8e-fips-rhel5 Phusion_Passenger/3.0.0
|
288
288
|
date:
|
289
|
-
-
|
289
|
+
- Sun, 25 Sep 2011 05:56:37 GMT
|
290
290
|
status:
|
291
291
|
- "200"
|
292
292
|
cache-control:
|
293
293
|
- max-age=0, private, must-revalidate
|
294
294
|
transfer-encoding:
|
295
295
|
- chunked
|
296
|
-
body: "{\"dependencies\":{\"runtime\":[{\"name\":\"execjs\",\"requirements\":\">= 0.3.0\"},{\"name\":\"multi_json\",\"requirements\":\">= 1.0.2\"}],\"development\":[{\"name\":\"bundler\",\"requirements\":\"~> 1.0.0\"},{\"name\":\"jeweler\",\"requirements\":\"~> 1.6.0\"},{\"name\":\"rcov\",\"requirements\":\">= 0\"},{\"name\":\"rspec\",\"requirements\":\"~> 2.6.0\"}]},\"name\":\"uglifier\",\"downloads\":
|
296
|
+
body: "{\"dependencies\":{\"runtime\":[{\"name\":\"execjs\",\"requirements\":\">= 0.3.0\"},{\"name\":\"multi_json\",\"requirements\":\">= 1.0.2\"}],\"development\":[{\"name\":\"bundler\",\"requirements\":\"~> 1.0.0\"},{\"name\":\"jeweler\",\"requirements\":\"~> 1.6.0\"},{\"name\":\"rcov\",\"requirements\":\">= 0\"},{\"name\":\"rspec\",\"requirements\":\"~> 2.6.0\"}]},\"name\":\"uglifier\",\"downloads\":256826,\"info\":\"Ruby wrapper for UglifyJS JavaScript compressor\",\"version_downloads\":88545,\"version\":\"1.0.3\",\"homepage_uri\":\"http://github.com/lautis/uglifier\",\"bug_tracker_uri\":\"https://github.com/lautis/uglifier/issues\",\"source_code_uri\":\"https://github.com/lautis/uglifier\",\"gem_uri\":\"http://rubygems.org/gems/uglifier-1.0.3.gem\",\"project_uri\":\"http://rubygems.org/gems/uglifier\",\"authors\":\"Ville Lautanala\",\"mailing_list_uri\":\"\",\"documentation_uri\":\"\",\"wiki_uri\":\"\"}"
|
297
297
|
http_version: "1.1"
|
298
298
|
- !ruby/struct:VCR::HTTPInteraction
|
299
299
|
request: !ruby/struct:VCR::Request
|
300
300
|
method: :get
|
301
|
-
uri:
|
301
|
+
uri: http://rubygems.org:80/api/v1/gems/unicorn.json
|
302
302
|
body:
|
303
303
|
headers:
|
304
304
|
accept:
|
@@ -313,22 +313,22 @@
|
|
313
313
|
x-ua-compatible:
|
314
314
|
- IE=Edge,chrome=1
|
315
315
|
etag:
|
316
|
-
- "\"
|
316
|
+
- "\"a6ab000a19e3f9a0b13715fba36ddea3\""
|
317
317
|
x-powered-by:
|
318
318
|
- Phusion Passenger (mod_rails/mod_rack) 3.0.0
|
319
319
|
content-type:
|
320
320
|
- application/json; charset=utf-8
|
321
321
|
x-runtime:
|
322
|
-
- "0.
|
322
|
+
- "0.019786"
|
323
323
|
server:
|
324
324
|
- Apache/2.2.3 (Red Hat) mod_ssl/2.2.3 OpenSSL/0.9.8e-fips-rhel5 Phusion_Passenger/3.0.0
|
325
325
|
date:
|
326
|
-
-
|
326
|
+
- Sun, 25 Sep 2011 05:56:38 GMT
|
327
327
|
status:
|
328
328
|
- "200"
|
329
329
|
cache-control:
|
330
330
|
- max-age=0, private, must-revalidate
|
331
331
|
transfer-encoding:
|
332
332
|
- chunked
|
333
|
-
body: "{\"dependencies\":{\"runtime\":[{\"name\":\"kgio\",\"requirements\":\"~> 2.4\"},{\"name\":\"rack\",\"requirements\":\">= 0\"},{\"name\":\"raindrops\",\"requirements\":\"~> 0.6\"}],\"development\":[{\"name\":\"isolate\",\"requirements\":\"~> 3.1\"},{\"name\":\"wrongdoc\",\"requirements\":\"~> 1.6\"}]},\"name\":\"unicorn\",\"downloads\":
|
333
|
+
body: "{\"dependencies\":{\"runtime\":[{\"name\":\"kgio\",\"requirements\":\"~> 2.4\"},{\"name\":\"rack\",\"requirements\":\">= 0\"},{\"name\":\"raindrops\",\"requirements\":\"~> 0.6\"}],\"development\":[{\"name\":\"isolate\",\"requirements\":\"~> 3.1\"},{\"name\":\"wrongdoc\",\"requirements\":\"~> 1.6\"}]},\"name\":\"unicorn\",\"downloads\":405901,\"info\":\"\\\\Unicorn is an HTTP server for Rack applications designed to only serve\\nfast clients on low-latency, high-bandwidth connections and take\\nadvantage of features in Unix/Unix-like kernels. Slow clients should\\nonly be served by placing a reverse proxy capable of fully buffering\\nboth the the request and response in between \\\\Unicorn and slow clients.\",\"version_downloads\":22397,\"version\":\"4.1.1\",\"homepage_uri\":\"http://unicorn.bogomips.org/\",\"bug_tracker_uri\":\"http://rubyforge.org/mailman/listinfo/mongrel-unicorn\",\"source_code_uri\":\"http://git.bogomips.org/cgit/unicorn.git\",\"gem_uri\":\"http://rubygems.org/gems/unicorn-4.1.1.gem\",\"project_uri\":\"http://rubygems.org/gems/unicorn\",\"authors\":\"Unicorn hackers\",\"mailing_list_uri\":\"http://rubyforge.org/mailman/listinfo/mongrel-unicorn\",\"documentation_uri\":\"http://unicorn.bogomips.org/\",\"wiki_uri\":\"\"}"
|
334
334
|
http_version: "1.1"
|
data/spec/gemlock_spec.rb
CHANGED
@@ -2,7 +2,7 @@ require 'spec_helper'
|
|
2
2
|
|
3
3
|
describe Gemlock do
|
4
4
|
describe "#locked_gemfile_specs" do
|
5
|
-
it "
|
5
|
+
it "outputs the list of gems & version requirements" do
|
6
6
|
Gemlock.stubs(:lockfile).returns((File.join(File.dirname(__FILE__), 'fixtures', 'Gemfile.lock')))
|
7
7
|
|
8
8
|
specs = Gemlock.locked_gemfile_specs
|
@@ -17,18 +17,14 @@ describe Gemlock do
|
|
17
17
|
end
|
18
18
|
|
19
19
|
describe "#lockfile" do
|
20
|
-
it "
|
21
|
-
|
22
|
-
def self.root
|
23
|
-
Pathname.new(File.dirname(__FILE__))
|
24
|
-
end
|
25
|
-
end
|
20
|
+
it "loads Gemfile.lock from the Rails root if Rails is defined" do
|
21
|
+
Rails.stubs(:root).returns(Pathname.new(File.dirname(__FILE__)))
|
26
22
|
|
27
23
|
expected_path = Pathname.new(File.dirname(__FILE__)).join('Gemfile.lock')
|
28
24
|
Gemlock.lockfile.should eql expected_path
|
29
25
|
end
|
30
26
|
|
31
|
-
it "
|
27
|
+
it "loads Gemfile.lock from the default Bundler location if Rails is not defined" do
|
32
28
|
expected_path = Pathname.new(File.expand_path(File.join(File.dirname(__FILE__), 'Gemfile.lock')))
|
33
29
|
|
34
30
|
Gemlock.lockfile.should eql expected_path
|
@@ -36,30 +32,30 @@ describe Gemlock do
|
|
36
32
|
end
|
37
33
|
|
38
34
|
describe "#lookup_version" do
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
35
|
+
use_vcr_cassette
|
36
|
+
|
37
|
+
it "looks up and return the latest version of a given gem" do
|
38
|
+
version = Gemlock.lookup_version("rails")
|
39
|
+
version.should eql "3.1.0"
|
44
40
|
end
|
45
41
|
end
|
46
42
|
|
47
43
|
describe "#outdated" do
|
48
|
-
|
44
|
+
use_vcr_cassette
|
45
|
+
|
46
|
+
it "returns a hash of outdated gems & versions" do
|
49
47
|
Gemlock.stubs(:lockfile).returns((File.join(File.dirname(__FILE__), 'fixtures', 'Gemfile.lock')))
|
50
48
|
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
:latest => '1.6.1' } }
|
49
|
+
expected = {'coffee-rails' => { :current => '3.1.0',
|
50
|
+
:latest => '3.1.1' },
|
51
|
+
'sass-rails' => { :current => '3.1.0',
|
52
|
+
:latest => '3.1.2' },
|
53
|
+
'unicorn' => { :current => '4.1.0',
|
54
|
+
:latest => '4.1.1' },
|
55
|
+
'json' => { :current => '1.5.0',
|
56
|
+
:latest => '1.6.1' } }
|
60
57
|
|
61
|
-
|
62
|
-
end
|
58
|
+
Gemlock.outdated.should eql expected
|
63
59
|
end
|
64
60
|
end
|
65
61
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
require 'rubygems'
|
2
2
|
require 'bundler'
|
3
|
+
require 'rake'
|
3
4
|
|
4
5
|
begin
|
5
6
|
Bundler.require(:default, :development)
|
@@ -11,6 +12,7 @@ end
|
|
11
12
|
|
12
13
|
RSpec.configure do |config|
|
13
14
|
config.mock_with :mocha
|
15
|
+
config.extend VCR::RSpec::Macros
|
14
16
|
end
|
15
17
|
|
16
18
|
VCR.config do |c|
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gemlock
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 21
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 5
|
10
|
+
version: 0.0.5
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Mike Skalnik
|
@@ -18,7 +18,7 @@ autorequire:
|
|
18
18
|
bindir: bin
|
19
19
|
cert_chain: []
|
20
20
|
|
21
|
-
date: 2011-09-
|
21
|
+
date: 2011-09-28 00:00:00 Z
|
22
22
|
dependencies:
|
23
23
|
- !ruby/object:Gem::Dependency
|
24
24
|
name: rake
|
@@ -80,24 +80,10 @@ dependencies:
|
|
80
80
|
version: "0"
|
81
81
|
type: :runtime
|
82
82
|
version_requirements: *id004
|
83
|
-
- !ruby/object:Gem::Dependency
|
84
|
-
name: autotest
|
85
|
-
prerelease: false
|
86
|
-
requirement: &id005 !ruby/object:Gem::Requirement
|
87
|
-
none: false
|
88
|
-
requirements:
|
89
|
-
- - ">="
|
90
|
-
- !ruby/object:Gem::Version
|
91
|
-
hash: 3
|
92
|
-
segments:
|
93
|
-
- 0
|
94
|
-
version: "0"
|
95
|
-
type: :development
|
96
|
-
version_requirements: *id005
|
97
83
|
- !ruby/object:Gem::Dependency
|
98
84
|
name: rspec
|
99
85
|
prerelease: false
|
100
|
-
requirement: &
|
86
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
101
87
|
none: false
|
102
88
|
requirements:
|
103
89
|
- - ~>
|
@@ -109,11 +95,11 @@ dependencies:
|
|
109
95
|
- 0
|
110
96
|
version: 2.6.0
|
111
97
|
type: :development
|
112
|
-
version_requirements: *
|
98
|
+
version_requirements: *id005
|
113
99
|
- !ruby/object:Gem::Dependency
|
114
100
|
name: mocha
|
115
101
|
prerelease: false
|
116
|
-
requirement: &
|
102
|
+
requirement: &id006 !ruby/object:Gem::Requirement
|
117
103
|
none: false
|
118
104
|
requirements:
|
119
105
|
- - ~>
|
@@ -125,11 +111,11 @@ dependencies:
|
|
125
111
|
- 0
|
126
112
|
version: 0.10.0
|
127
113
|
type: :development
|
128
|
-
version_requirements: *
|
114
|
+
version_requirements: *id006
|
129
115
|
- !ruby/object:Gem::Dependency
|
130
116
|
name: pry
|
131
117
|
prerelease: false
|
132
|
-
requirement: &
|
118
|
+
requirement: &id007 !ruby/object:Gem::Requirement
|
133
119
|
none: false
|
134
120
|
requirements:
|
135
121
|
- - ">="
|
@@ -141,11 +127,11 @@ dependencies:
|
|
141
127
|
- 5
|
142
128
|
version: 0.9.5
|
143
129
|
type: :development
|
144
|
-
version_requirements: *
|
130
|
+
version_requirements: *id007
|
145
131
|
- !ruby/object:Gem::Dependency
|
146
132
|
name: vcr
|
147
133
|
prerelease: false
|
148
|
-
requirement: &
|
134
|
+
requirement: &id008 !ruby/object:Gem::Requirement
|
149
135
|
none: false
|
150
136
|
requirements:
|
151
137
|
- - ">="
|
@@ -157,11 +143,11 @@ dependencies:
|
|
157
143
|
- 0
|
158
144
|
version: 1.11.0
|
159
145
|
type: :development
|
160
|
-
version_requirements: *
|
146
|
+
version_requirements: *id008
|
161
147
|
- !ruby/object:Gem::Dependency
|
162
148
|
name: fakeweb
|
163
149
|
prerelease: false
|
164
|
-
requirement: &
|
150
|
+
requirement: &id009 !ruby/object:Gem::Requirement
|
165
151
|
none: false
|
166
152
|
requirements:
|
167
153
|
- - ">="
|
@@ -173,7 +159,7 @@ dependencies:
|
|
173
159
|
- 0
|
174
160
|
version: 1.3.0
|
175
161
|
type: :development
|
176
|
-
version_requirements: *
|
162
|
+
version_requirements: *id009
|
177
163
|
description: When installed, allows a user to check for updates in their Rails application
|
178
164
|
email:
|
179
165
|
- mskalnik@gatech.edu
|
@@ -186,8 +172,10 @@ extra_rdoc_files: []
|
|
186
172
|
files:
|
187
173
|
- .gitignore
|
188
174
|
- .rspec
|
175
|
+
- .travis.yml
|
189
176
|
- Gemfile
|
190
177
|
- Gemfile.lock
|
178
|
+
- README.markdown
|
191
179
|
- Rakefile
|
192
180
|
- gemlock.gemspec
|
193
181
|
- lib/gemlock.rb
|
@@ -197,8 +185,8 @@ files:
|
|
197
185
|
- lib/tasks/gemlock.rake
|
198
186
|
- spec/fixtures/Gemfile
|
199
187
|
- spec/fixtures/Gemfile.lock
|
200
|
-
- spec/fixtures/vcr_cassettes/
|
201
|
-
- spec/fixtures/vcr_cassettes/
|
188
|
+
- spec/fixtures/vcr_cassettes/Gemlock/_lookup_version.yml
|
189
|
+
- spec/fixtures/vcr_cassettes/Gemlock/_outdated.yml
|
202
190
|
- spec/gemlock_spec.rb
|
203
191
|
- spec/spec_helper.rb
|
204
192
|
homepage: ""
|
@@ -237,7 +225,7 @@ summary: Get notified when there are updates for gems in your Rails application
|
|
237
225
|
test_files:
|
238
226
|
- spec/fixtures/Gemfile
|
239
227
|
- spec/fixtures/Gemfile.lock
|
240
|
-
- spec/fixtures/vcr_cassettes/
|
241
|
-
- spec/fixtures/vcr_cassettes/
|
228
|
+
- spec/fixtures/vcr_cassettes/Gemlock/_lookup_version.yml
|
229
|
+
- spec/fixtures/vcr_cassettes/Gemlock/_outdated.yml
|
242
230
|
- spec/gemlock_spec.rb
|
243
231
|
- spec/spec_helper.rb
|