dead_gems 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +7 -0
- data/README.md +4 -1
- data/Rakefile +8 -0
- data/lib/dead_gems/version.rb +1 -1
- data/lib/dead_gems.rb +15 -4
- data/spec/dead_gems_spec.rb +14 -0
- data/spec/fixtures/lock_file1 +325 -0
- metadata +5 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 27d2e7fc861b6ab6b556b5c22c68664cd70098e6
|
4
|
+
data.tar.gz: b7f1abbdffdb5341ab16649bc628921b377545f3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f65d1a3f0f7b31928363c9339ba0f32c52bb48cbfb94a5c02c199bf94f4237128ce52d9a737c180a8e481eb7c92aae58197e345d51e121ceca10692dafb3005f
|
7
|
+
data.tar.gz: 8bf157d53b57a13a15f5d3f0c6134dfafae6bb614f8541bfed5afcb184b12847cf6f2efd7a189d05eceec60eb3ff4064d140038df8a7b57e01de81d6f45688c9
|
data/.travis.yml
ADDED
data/README.md
CHANGED
@@ -1,5 +1,8 @@
|
|
1
1
|
# DeadGems
|
2
2
|
|
3
|
+
[![Gem Version](https://badge.fury.io/rb/dead_gems.svg)](http://badge.fury.io/rb/dead_gems)
|
4
|
+
[![Build Status](https://travis-ci.org/jbodah/dead_gems.svg)](https://travis-ci.org/jbodah/dead_gems)
|
5
|
+
|
3
6
|
lists your app's unused gems
|
4
7
|
|
5
8
|
## Installation
|
@@ -35,7 +38,7 @@ This will run my project's tests and output all of the gems that aren't used in
|
|
35
38
|
|
36
39
|
## Contributing
|
37
40
|
|
38
|
-
1. Fork it ( https://github.com/
|
41
|
+
1. Fork it ( https://github.com/jbodah/dead_gems/fork )
|
39
42
|
2. Create your feature branch (`git checkout -b my-new-feature`)
|
40
43
|
3. Commit your changes (`git commit -am 'Add some feature'`)
|
41
44
|
4. Push to the branch (`git push origin my-new-feature`)
|
data/Rakefile
CHANGED
data/lib/dead_gems/version.rb
CHANGED
data/lib/dead_gems.rb
CHANGED
@@ -10,6 +10,7 @@ module DeadGems
|
|
10
10
|
begin_dir = Dir.pwd
|
11
11
|
logger = Logger.new($stdout)
|
12
12
|
change_directory_to project_root
|
13
|
+
bundle_install
|
13
14
|
gems = find_all_gems.map do |name|
|
14
15
|
path = find_gem_path(name)
|
15
16
|
GemInstance.new(name, path)
|
@@ -29,10 +30,20 @@ module DeadGems
|
|
29
30
|
|
30
31
|
def find_all_gems
|
31
32
|
Bundler.with_clean_env do
|
32
|
-
gem_lines = File.read('Gemfile.lock').split("DEPENDENCIES\n").last
|
33
|
-
arr
|
34
|
-
|
35
|
-
|
33
|
+
gem_lines = File.read('Gemfile.lock').split("DEPENDENCIES\n").last.split("\n\n").first
|
34
|
+
gem_lines.each_line.reduce([]) do |arr, line|
|
35
|
+
begin
|
36
|
+
arr << line.match(/\s*([^\s!]+)/).captures.first
|
37
|
+
rescue => e
|
38
|
+
raise "Encountered #{e} on line: #{line}"
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
def bundle_install
|
45
|
+
Bundler.with_clean_env do
|
46
|
+
`bundle install`
|
36
47
|
end
|
37
48
|
end
|
38
49
|
|
data/spec/dead_gems_spec.rb
CHANGED
@@ -20,6 +20,20 @@ class DeadGemsSpec < Minitest::Spec
|
|
20
20
|
end
|
21
21
|
|
22
22
|
describe '.find_all_gems' do
|
23
|
+
it 'correctly parses the example lock files' do
|
24
|
+
Dir['spec/fixtures/lock_file*'].each do |path|
|
25
|
+
begin
|
26
|
+
str = File.read(path)
|
27
|
+
|
28
|
+
original = File.method(:read)
|
29
|
+
File.define_singleton_method(:read, -> (f) { str })
|
30
|
+
DeadGems.send(:find_all_gems)
|
31
|
+
ensure
|
32
|
+
File.define_singleton_method(:read, original)
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
23
37
|
it 'correctly parses outs bangs' do
|
24
38
|
begin
|
25
39
|
str = <<-FILE
|
@@ -0,0 +1,325 @@
|
|
1
|
+
|
2
|
+
GEM
|
3
|
+
remote: https://rubygems.org/
|
4
|
+
specs:
|
5
|
+
actionmailer (4.2.4)
|
6
|
+
actionpack (= 4.2.4)
|
7
|
+
actionview (= 4.2.4)
|
8
|
+
activejob (= 4.2.4)
|
9
|
+
mail (~> 2.5, >= 2.5.4)
|
10
|
+
rails-dom-testing (~> 1.0, >= 1.0.5)
|
11
|
+
actionpack (4.2.4)
|
12
|
+
actionview (= 4.2.4)
|
13
|
+
activesupport (= 4.2.4)
|
14
|
+
rack (~> 1.6)
|
15
|
+
rack-test (~> 0.6.2)
|
16
|
+
rails-dom-testing (~> 1.0, >= 1.0.5)
|
17
|
+
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
18
|
+
actionview (4.2.4)
|
19
|
+
activesupport (= 4.2.4)
|
20
|
+
builder (~> 3.1)
|
21
|
+
erubis (~> 2.7.0)
|
22
|
+
rails-dom-testing (~> 1.0, >= 1.0.5)
|
23
|
+
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
24
|
+
activejob (4.2.4)
|
25
|
+
activesupport (= 4.2.4)
|
26
|
+
globalid (>= 0.3.0)
|
27
|
+
activemodel (4.2.4)
|
28
|
+
activesupport (= 4.2.4)
|
29
|
+
builder (~> 3.1)
|
30
|
+
activerecord (4.2.4)
|
31
|
+
activemodel (= 4.2.4)
|
32
|
+
activesupport (= 4.2.4)
|
33
|
+
arel (~> 6.0)
|
34
|
+
activesupport (4.2.4)
|
35
|
+
i18n (~> 0.7)
|
36
|
+
json (~> 1.7, >= 1.7.7)
|
37
|
+
minitest (~> 5.1)
|
38
|
+
thread_safe (~> 0.3, >= 0.3.4)
|
39
|
+
tzinfo (~> 1.1)
|
40
|
+
acts_as_shopping_cart (0.3.0)
|
41
|
+
money-rails (~> 1.3)
|
42
|
+
rails (~> 4)
|
43
|
+
addressable (2.3.8)
|
44
|
+
arel (6.0.3)
|
45
|
+
ast (2.1.0)
|
46
|
+
astrolabe (1.3.1)
|
47
|
+
parser (~> 2.2)
|
48
|
+
awesome_print (1.6.1)
|
49
|
+
aws-sdk (2.1.24)
|
50
|
+
aws-sdk-resources (= 2.1.24)
|
51
|
+
aws-sdk-core (2.1.24)
|
52
|
+
jmespath (~> 1.0)
|
53
|
+
aws-sdk-resources (2.1.24)
|
54
|
+
aws-sdk-core (= 2.1.24)
|
55
|
+
bcrypt (3.1.10)
|
56
|
+
better_errors (2.1.1)
|
57
|
+
coderay (>= 1.0.0)
|
58
|
+
erubis (>= 2.6.6)
|
59
|
+
rack (>= 0.9.0)
|
60
|
+
binding_of_caller (0.7.2)
|
61
|
+
debug_inspector (>= 0.0.1)
|
62
|
+
brcep (3.3.0)
|
63
|
+
bugsnag (2.8.12)
|
64
|
+
json (~> 1.7, >= 1.7.7)
|
65
|
+
builder (3.2.2)
|
66
|
+
byebug (5.0.0)
|
67
|
+
columnize (= 0.9.0)
|
68
|
+
capybara (2.5.0)
|
69
|
+
mime-types (>= 1.16)
|
70
|
+
nokogiri (>= 1.3.3)
|
71
|
+
rack (>= 1.0.0)
|
72
|
+
rack-test (>= 0.5.4)
|
73
|
+
xpath (~> 2.0)
|
74
|
+
chunky_png (1.3.4)
|
75
|
+
cliver (0.3.2)
|
76
|
+
coderay (1.1.0)
|
77
|
+
columnize (0.9.0)
|
78
|
+
compass (1.0.3)
|
79
|
+
chunky_png (~> 1.2)
|
80
|
+
compass-core (~> 1.0.2)
|
81
|
+
compass-import-once (~> 1.0.5)
|
82
|
+
rb-fsevent (>= 0.9.3)
|
83
|
+
rb-inotify (>= 0.9)
|
84
|
+
sass (>= 3.3.13, < 3.5)
|
85
|
+
compass-core (1.0.3)
|
86
|
+
multi_json (~> 1.0)
|
87
|
+
sass (>= 3.3.0, < 3.5)
|
88
|
+
compass-import-once (1.0.5)
|
89
|
+
sass (>= 3.2, < 3.5)
|
90
|
+
compass-rails (2.0.5)
|
91
|
+
compass (~> 1.0.0)
|
92
|
+
sass-rails (< 5.1)
|
93
|
+
sprockets (< 2.13)
|
94
|
+
database_cleaner (1.5.0)
|
95
|
+
dead_gems (0.0.2)
|
96
|
+
spy_rb
|
97
|
+
thor
|
98
|
+
debug_inspector (0.0.2)
|
99
|
+
decent_exposure (2.3.2)
|
100
|
+
devise (3.5.2)
|
101
|
+
bcrypt (~> 3.0)
|
102
|
+
orm_adapter (~> 0.1)
|
103
|
+
railties (>= 3.2.6, < 5)
|
104
|
+
responders
|
105
|
+
thread_safe (~> 0.1)
|
106
|
+
warden (~> 1.2.3)
|
107
|
+
diff-lcs (1.2.5)
|
108
|
+
docile (1.1.5)
|
109
|
+
draper (2.1.0)
|
110
|
+
actionpack (>= 3.0)
|
111
|
+
activemodel (>= 3.0)
|
112
|
+
activesupport (>= 3.0)
|
113
|
+
request_store (~> 1.0)
|
114
|
+
enumerate_it (1.2.8)
|
115
|
+
activesupport (>= 3.0.0)
|
116
|
+
erubis (2.7.0)
|
117
|
+
execjs (2.6.0)
|
118
|
+
factory_girl (4.5.0)
|
119
|
+
activesupport (>= 3.0.0)
|
120
|
+
factory_girl_rails (4.5.0)
|
121
|
+
factory_girl (~> 4.5.0)
|
122
|
+
railties (>= 3.0.0)
|
123
|
+
ffaker (2.1.0)
|
124
|
+
ffi (1.9.10)
|
125
|
+
font-awesome-rails (4.4.0.0)
|
126
|
+
railties (>= 3.2, < 5.0)
|
127
|
+
globalid (0.3.6)
|
128
|
+
activesupport (>= 4.1.0)
|
129
|
+
hike (1.2.3)
|
130
|
+
i18n (0.7.0)
|
131
|
+
jmespath (1.1.3)
|
132
|
+
json (1.8.3)
|
133
|
+
kaminari (0.16.3)
|
134
|
+
actionpack (>= 3.0.0)
|
135
|
+
activesupport (>= 3.0.0)
|
136
|
+
launchy (2.4.3)
|
137
|
+
addressable (~> 2.3)
|
138
|
+
letter_opener (1.4.1)
|
139
|
+
launchy (~> 2.2)
|
140
|
+
lograge (0.3.4)
|
141
|
+
actionpack (>= 3)
|
142
|
+
activesupport (>= 3)
|
143
|
+
railties (>= 3)
|
144
|
+
loofah (2.0.3)
|
145
|
+
nokogiri (>= 1.5.9)
|
146
|
+
mail (2.6.3)
|
147
|
+
mime-types (>= 1.16, < 3)
|
148
|
+
method_source (0.8.2)
|
149
|
+
mime-types (2.6.2)
|
150
|
+
mini_portile (0.6.2)
|
151
|
+
minitest (5.8.1)
|
152
|
+
monetize (1.1.0)
|
153
|
+
money (~> 6.5.0)
|
154
|
+
money (6.5.1)
|
155
|
+
i18n (>= 0.6.4, <= 0.7.0)
|
156
|
+
money-rails (1.4.1)
|
157
|
+
activesupport (>= 3.0)
|
158
|
+
monetize (~> 1.1.0)
|
159
|
+
money (~> 6.5.0)
|
160
|
+
railties (>= 3.0)
|
161
|
+
multi_json (1.11.2)
|
162
|
+
nested_form (0.3.2)
|
163
|
+
nokogiri (1.6.6.2)
|
164
|
+
mini_portile (~> 0.6.0)
|
165
|
+
orm_adapter (0.5.0)
|
166
|
+
parser (2.2.2.6)
|
167
|
+
ast (>= 1.1, < 3.0)
|
168
|
+
pg (0.18.3)
|
169
|
+
poltergeist (1.7.0)
|
170
|
+
capybara (~> 2.1)
|
171
|
+
cliver (~> 0.3.1)
|
172
|
+
multi_json (~> 1.0)
|
173
|
+
websocket-driver (>= 0.2.0)
|
174
|
+
postmon_ruby (3.0.1)
|
175
|
+
json (~> 1.8.1)
|
176
|
+
powerpack (0.1.1)
|
177
|
+
pry (0.10.2)
|
178
|
+
coderay (~> 1.1.0)
|
179
|
+
method_source (~> 0.8.1)
|
180
|
+
slop (~> 3.4)
|
181
|
+
pry-byebug (3.2.0)
|
182
|
+
byebug (~> 5.0)
|
183
|
+
pry (~> 0.10)
|
184
|
+
pry-meta (0.0.10)
|
185
|
+
awesome_print
|
186
|
+
pry
|
187
|
+
pry-byebug
|
188
|
+
pry-remote
|
189
|
+
pry-remote (0.1.8)
|
190
|
+
pry (~> 0.9)
|
191
|
+
slop (~> 3.0)
|
192
|
+
puma (2.14.0)
|
193
|
+
pundit (1.0.1)
|
194
|
+
activesupport (>= 3.0.0)
|
195
|
+
rack (1.6.4)
|
196
|
+
rack-test (0.6.3)
|
197
|
+
rack (>= 1.0)
|
198
|
+
rack-timeout (0.3.2)
|
199
|
+
rails (4.2.4)
|
200
|
+
actionmailer (= 4.2.4)
|
201
|
+
actionpack (= 4.2.4)
|
202
|
+
actionview (= 4.2.4)
|
203
|
+
activejob (= 4.2.4)
|
204
|
+
activemodel (= 4.2.4)
|
205
|
+
activerecord (= 4.2.4)
|
206
|
+
activesupport (= 4.2.4)
|
207
|
+
bundler (>= 1.3.0, < 2.0)
|
208
|
+
railties (= 4.2.4)
|
209
|
+
sprockets-rails
|
210
|
+
rails-deprecated_sanitizer (1.0.3)
|
211
|
+
activesupport (>= 4.2.0.alpha)
|
212
|
+
rails-dom-testing (1.0.7)
|
213
|
+
activesupport (>= 4.2.0.beta, < 5.0)
|
214
|
+
nokogiri (~> 1.6.0)
|
215
|
+
rails-deprecated_sanitizer (>= 1.0.1)
|
216
|
+
rails-html-sanitizer (1.0.2)
|
217
|
+
loofah (~> 2.0)
|
218
|
+
rails-i18n (4.0.5)
|
219
|
+
i18n (~> 0.6)
|
220
|
+
railties (~> 4.0)
|
221
|
+
rails_12factor (0.0.3)
|
222
|
+
rails_serve_static_assets
|
223
|
+
rails_stdout_logging
|
224
|
+
rails_serve_static_assets (0.0.4)
|
225
|
+
rails_stdout_logging (0.0.4)
|
226
|
+
railties (4.2.4)
|
227
|
+
actionpack (= 4.2.4)
|
228
|
+
activesupport (= 4.2.4)
|
229
|
+
rake (>= 0.8.7)
|
230
|
+
thor (>= 0.18.1, < 2.0)
|
231
|
+
rainbow (2.0.0)
|
232
|
+
rake (10.4.2)
|
233
|
+
rb-fsevent (0.9.6)
|
234
|
+
rb-inotify (0.9.5)
|
235
|
+
ffi (>= 0.5.0)
|
236
|
+
request_store (1.2.0)
|
237
|
+
responders (2.1.0)
|
238
|
+
railties (>= 4.2.0, < 5)
|
239
|
+
rspec-core (3.3.2)
|
240
|
+
rspec-support (~> 3.3.0)
|
241
|
+
rspec-expectations (3.3.1)
|
242
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
243
|
+
rspec-support (~> 3.3.0)
|
244
|
+
rspec-mocks (3.3.2)
|
245
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
246
|
+
rspec-support (~> 3.3.0)
|
247
|
+
rspec-rails (3.3.3)
|
248
|
+
actionpack (>= 3.0, < 4.3)
|
249
|
+
activesupport (>= 3.0, < 4.3)
|
250
|
+
railties (>= 3.0, < 4.3)
|
251
|
+
rspec-core (~> 3.3.0)
|
252
|
+
rspec-expectations (~> 3.3.0)
|
253
|
+
rspec-mocks (~> 3.3.0)
|
254
|
+
rspec-support (~> 3.3.0)
|
255
|
+
rspec-support (3.3.0)
|
256
|
+
rubocop (0.34.2)
|
257
|
+
astrolabe (~> 1.3)
|
258
|
+
parser (>= 2.2.2.5, < 3.0)
|
259
|
+
powerpack (~> 0.1)
|
260
|
+
rainbow (>= 1.99.1, < 3.0)
|
261
|
+
ruby-progressbar (~> 1.4)
|
262
|
+
ruby-progressbar (1.7.5)
|
263
|
+
sass (3.4.18)
|
264
|
+
sass-rails (5.0.4)
|
265
|
+
railties (>= 4.0.0, < 5.0)
|
266
|
+
sass (~> 3.1)
|
267
|
+
sprockets (>= 2.8, < 4.0)
|
268
|
+
sprockets-rails (>= 2.0, < 4.0)
|
269
|
+
tilt (>= 1.1, < 3)
|
270
|
+
settingslogic (2.0.9)
|
271
|
+
shoulda-matchers (3.0.0)
|
272
|
+
activesupport (>= 4.0.0)
|
273
|
+
simple_form (3.2.0)
|
274
|
+
actionpack (~> 4.0)
|
275
|
+
activemodel (~> 4.0)
|
276
|
+
simplecov (0.10.0)
|
277
|
+
docile (~> 1.1.0)
|
278
|
+
json (~> 1.8)
|
279
|
+
simplecov-html (~> 0.10.0)
|
280
|
+
simplecov-html (0.10.0)
|
281
|
+
slim (3.0.6)
|
282
|
+
temple (~> 0.7.3)
|
283
|
+
tilt (>= 1.3.3, < 2.1)
|
284
|
+
slop (3.6.0)
|
285
|
+
sprockets (2.12.4)
|
286
|
+
hike (~> 1.2)
|
287
|
+
multi_json (~> 1.0)
|
288
|
+
rack (~> 1.0)
|
289
|
+
tilt (~> 1.1, != 1.3.0)
|
290
|
+
sprockets-rails (2.3.3)
|
291
|
+
actionpack (>= 3.0)
|
292
|
+
activesupport (>= 3.0)
|
293
|
+
sprockets (>= 2.8, < 4.0)
|
294
|
+
spy_rb (0.5.0)
|
295
|
+
temple (0.7.6)
|
296
|
+
thor (0.19.1)
|
297
|
+
thread_safe (0.3.5)
|
298
|
+
tilt (1.4.1)
|
299
|
+
tzinfo (1.2.2)
|
300
|
+
thread_safe (~> 0.1)
|
301
|
+
uglifier (2.7.2)
|
302
|
+
execjs (>= 0.3.0)
|
303
|
+
json (>= 1.8.0)
|
304
|
+
vcr (2.9.3)
|
305
|
+
warden (1.2.3)
|
306
|
+
rack (>= 1.0)
|
307
|
+
websocket-driver (0.6.2)
|
308
|
+
websocket-extensions (>= 0.1.0)
|
309
|
+
websocket-extensions (0.1.2)
|
310
|
+
xpath (2.0.0)
|
311
|
+
nokogiri (~> 1.3)
|
312
|
+
|
313
|
+
PLATFORMS
|
314
|
+
ruby
|
315
|
+
|
316
|
+
DEPENDENCIES
|
317
|
+
factory_girl_rails
|
318
|
+
font-awesome-rails
|
319
|
+
rails (= 4.2.4)
|
320
|
+
simple_form
|
321
|
+
slim
|
322
|
+
sprockets-rails
|
323
|
+
|
324
|
+
BUNDLED WITH
|
325
|
+
1.10.6
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dead_gems
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Josh Bodah
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-08
|
11
|
+
date: 2015-10-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -117,6 +117,7 @@ extensions: []
|
|
117
117
|
extra_rdoc_files: []
|
118
118
|
files:
|
119
119
|
- ".gitignore"
|
120
|
+
- ".travis.yml"
|
120
121
|
- Gemfile
|
121
122
|
- Guardfile
|
122
123
|
- LICENSE.txt
|
@@ -184,6 +185,7 @@ files:
|
|
184
185
|
- lib/dead_gems.rb
|
185
186
|
- lib/dead_gems/version.rb
|
186
187
|
- spec/dead_gems_spec.rb
|
188
|
+
- spec/fixtures/lock_file1
|
187
189
|
- spec/spec_helper.rb
|
188
190
|
homepage: ''
|
189
191
|
licenses:
|
@@ -211,5 +213,5 @@ specification_version: 4
|
|
211
213
|
summary: a gem for finding unused gems in your project
|
212
214
|
test_files:
|
213
215
|
- spec/dead_gems_spec.rb
|
216
|
+
- spec/fixtures/lock_file1
|
214
217
|
- spec/spec_helper.rb
|
215
|
-
has_rdoc:
|