extension_lister 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOGS.md +5 -0
- data/Guardfile +2 -2
- data/README.md +12 -2
- data/Rakefile +0 -2
- data/extension_lister.gemspec +1 -0
- data/lib/extension_lister/cli.rb +3 -0
- data/lib/extension_lister/version.rb +1 -1
- data/lib/extension_lister.rb +0 -1
- metadata +16 -3
- data/lib/extension_lister/core_ext/hash/keys.rb +0 -34
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e0c1010e8635e4e3a40dd5e1950f7a53230496dc
|
4
|
+
data.tar.gz: 24e591d8967ac3ca59993c2a4629bcfb6305a9e8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 47a04f02a1e626670523e7b9eadc8b58aa5d384afbcf412510dd381bd06c56127a168b81def5ebfd08a948516e308d52fbf2a32d88c6f1597d7ae48efd6cb2e6
|
7
|
+
data.tar.gz: 60765c1e424043da1135eb13848bc5b427a102ded6f9241b142247bc430a1472708d4add39d426d136e1acfbaa0623d0004150cc9782498c008052189ccd9c6d
|
data/CHANGELOGS.md
CHANGED
data/Guardfile
CHANGED
@@ -2,6 +2,6 @@
|
|
2
2
|
# More info at https://github.com/guard/guard#readme
|
3
3
|
guard 'minitest' do
|
4
4
|
watch(%r|^test/(.*)\/?test_(.*)\.rb|)
|
5
|
-
watch(%r|^lib/(.*)([^/]+)\.rb|)
|
6
|
-
watch(%r|^test/test_helper\.rb|)
|
5
|
+
watch(%r|^lib/(.*)([^/]+)\.rb|) { |m| "test/#{m[1]}test_#{m[2]}.rb" }
|
6
|
+
watch(%r|^test/test_helper\.rb|) { "test" }
|
7
7
|
end
|
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
##
|
1
|
+
## extension_lister
|
2
2
|
|
3
3
|
[![Gem Version](https://badge.fury.io/rb/extension_lister.svg)][gem]
|
4
4
|
[![Dependency Status](https://gemnasium.com/agilecreativity/extension_lister.png)][gemnasium]
|
@@ -30,6 +30,16 @@ Or install it yourself as:
|
|
30
30
|
extension_lister
|
31
31
|
```
|
32
32
|
|
33
|
+
For typical ruby project like (e.g. this gem), we should get something like:
|
34
|
+
|
35
|
+
```
|
36
|
+
.gem
|
37
|
+
.gemspec
|
38
|
+
.lock
|
39
|
+
.md
|
40
|
+
.rb
|
41
|
+
```
|
42
|
+
|
33
43
|
- List all extension from a given directory
|
34
44
|
|
35
45
|
```
|
@@ -38,7 +48,7 @@ extension_lister -b ~/Downloads
|
|
38
48
|
|
39
49
|
### Contributing
|
40
50
|
|
41
|
-
1. Fork it
|
51
|
+
1. [Fork it](https://github.com/agilecreativity/extension_lister/fork)
|
42
52
|
2. Create your feature branch (`git checkout -b my-new-feature`)
|
43
53
|
3. Commit your changes (`git commit -am 'Add some feature'`)
|
44
54
|
4. Push to the branch (`git push origin my-new-feature`)
|
data/Rakefile
CHANGED
@@ -22,8 +22,6 @@ require 'rubocop/rake_task'
|
|
22
22
|
desc 'Run RuboCop on the lib directory'
|
23
23
|
RuboCop::RakeTask.new(:rubocop) do |task|
|
24
24
|
task.patterns = ['lib/**/*.rb']
|
25
|
-
# only show the files with failures
|
26
25
|
task.formatters = ['files']
|
27
|
-
# don't abort rake on failure
|
28
26
|
task.fail_on_error = false
|
29
27
|
end
|
data/extension_lister.gemspec
CHANGED
@@ -15,6 +15,7 @@ Gem::Specification.new do |spec|
|
|
15
15
|
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
16
16
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
17
17
|
spec.require_paths = ['lib']
|
18
|
+
spec.add_runtime_dependency 'agile_utils', '~> 0.2.0'
|
18
19
|
spec.add_runtime_dependency 'thor', '~> 0.19'
|
19
20
|
spec.add_development_dependency 'awesome_print', '~> 1.2'
|
20
21
|
spec.add_development_dependency 'bundler', '~> 1.5'
|
data/lib/extension_lister/cli.rb
CHANGED
data/lib/extension_lister.rb
CHANGED
metadata
CHANGED
@@ -1,15 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: extension_lister
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Burin Choomnuan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-07-
|
11
|
+
date: 2014-07-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: agile_utils
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 0.2.0
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 0.2.0
|
13
27
|
- !ruby/object:Gem::Dependency
|
14
28
|
name: thor
|
15
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -199,7 +213,6 @@ files:
|
|
199
213
|
- extension_lister.gemspec
|
200
214
|
- lib/extension_lister.rb
|
201
215
|
- lib/extension_lister/cli.rb
|
202
|
-
- lib/extension_lister/core_ext/hash/keys.rb
|
203
216
|
- lib/extension_lister/version.rb
|
204
217
|
- test/lib/extension_lister/test_extension_lister.rb
|
205
218
|
- test/test_helper.rb
|
@@ -1,34 +0,0 @@
|
|
1
|
-
class Hash
|
2
|
-
# File activesupport/lib/active_support/core_ext/hash/keys.rb
|
3
|
-
#
|
4
|
-
# hash = { name: 'Rob', age: '28' }
|
5
|
-
# hash.transform_keys{ |key| key.to_s.upcase }
|
6
|
-
# => { "NAME" => "Rob", "AGE" => "28" }
|
7
|
-
def transform_keys
|
8
|
-
result = {}
|
9
|
-
each_key do |key|
|
10
|
-
result[yield(key)] = self[key]
|
11
|
-
end
|
12
|
-
result
|
13
|
-
end
|
14
|
-
|
15
|
-
def transform_keys!(&block)
|
16
|
-
keys.each do |key|
|
17
|
-
value = delete(key)
|
18
|
-
self[yield(key)] = value.is_a?(Hash) ? value.transform_keys!(&block) : value
|
19
|
-
end
|
20
|
-
self
|
21
|
-
end
|
22
|
-
|
23
|
-
# hash = { 'name' => 'Rob', 'age' => '28' }
|
24
|
-
# hash.symbolize_keys
|
25
|
-
# => { name: "Rob", age: "28" }
|
26
|
-
def symbolize_keys
|
27
|
-
transform_keys { |key| key.to_sym rescue key }
|
28
|
-
end
|
29
|
-
|
30
|
-
# File activesupport/lib/active_support/core_ext/hash/keys.rb, line 135
|
31
|
-
def symbolize_keys!
|
32
|
-
transform_keys! { |key| key.to_sym rescue key }
|
33
|
-
end
|
34
|
-
end
|