alfi 0.3.5 → 0.3.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/alfi.gemspec +3 -5
- data/lib/alfi.rb +13 -9
- data/lib/alfi/version.rb +1 -1
- metadata +10 -38
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8ce914a0aa4853f1fcabae7b44778ae5f80b89ca
|
4
|
+
data.tar.gz: 3c13e065757dc96ee60dbe7c8ac8560608e01a7a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 660e1a0101ebcca57d1272e12334cfe2473ac1611f7ea71b84e3c71fbcfc82dfbd9cc190dcbe52f8513597db800e41cf0e0b404f3f6c946952cb0c1bd1f67a20
|
7
|
+
data.tar.gz: 1193884efd988eca232c531494e31c2b3f24809450327568a2eb5459d1e71f4e92d7359f0a755d29e3397d345e31329b90117c1558f0eda9c12cd2b5a43f1e47
|
data/alfi.gemspec
CHANGED
@@ -23,13 +23,11 @@ Gem::Specification.new do |spec|
|
|
23
23
|
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
24
24
|
spec.require_paths = ['lib']
|
25
25
|
|
26
|
-
spec.add_development_dependency '
|
27
|
-
spec.add_development_dependency 'webmock', '~> 1.20'
|
26
|
+
spec.add_development_dependency 'webmock', '~> 1.21'
|
28
27
|
spec.add_development_dependency 'rspec', '~> 3.2'
|
29
28
|
spec.add_development_dependency 'vcr', '~> 2.9'
|
30
|
-
spec.add_development_dependency 'pry', '~>
|
31
|
-
spec.add_dependency 'json', '~> 1.8
|
32
|
-
spec.add_dependency 'bundler', '>= 1.7'
|
29
|
+
spec.add_development_dependency 'pry-byebug', '~> 3.1'
|
30
|
+
spec.add_dependency 'json', '~> 1.8'
|
33
31
|
spec.add_dependency 'colorize', '~> 0.7'
|
34
32
|
|
35
33
|
end
|
data/lib/alfi.rb
CHANGED
@@ -1,5 +1,3 @@
|
|
1
|
-
require 'alfi/version'
|
2
|
-
require 'rubygems'
|
3
1
|
require 'json'
|
4
2
|
require 'net/http'
|
5
3
|
require 'uri'
|
@@ -26,7 +24,6 @@ module Alfi
|
|
26
24
|
exit 1
|
27
25
|
end
|
28
26
|
|
29
|
-
|
30
27
|
if response.code == '200'
|
31
28
|
result = JSON.parse(response.body)
|
32
29
|
|
@@ -54,7 +51,8 @@ module Alfi
|
|
54
51
|
|
55
52
|
return num_results, result_list, suggestions
|
56
53
|
else
|
57
|
-
puts
|
54
|
+
puts "Error: #{response.code}\n#{response}".red
|
55
|
+
exit 1
|
58
56
|
end
|
59
57
|
end
|
60
58
|
|
@@ -68,13 +66,12 @@ module Alfi
|
|
68
66
|
google_libs << 'com.android.support:leanback-v17'
|
69
67
|
google_libs << 'com.android.support:mediarouter-v7'
|
70
68
|
google_libs << 'com.android.support:palette-v7'
|
71
|
-
google_libs << 'com.android.support:recyclerview-v7'
|
72
69
|
google_libs << 'com.android.support:support-annotations'
|
73
70
|
google_libs << 'com.android.support:support-v4'
|
74
71
|
google_libs << 'com.android.support:support-v13'
|
75
72
|
google_libs << 'com.google.android.gms:play-services-wearable'
|
76
73
|
google_libs << 'com.google.android.gms:play-services'
|
77
|
-
|
74
|
+
google_libs << 'com.android.support:recyclerview-v7'
|
78
75
|
|
79
76
|
found_libs = Array.new
|
80
77
|
|
@@ -94,21 +91,28 @@ module Alfi
|
|
94
91
|
def self.initialize (param)
|
95
92
|
|
96
93
|
if param == nil
|
97
|
-
puts "Missing query parameter
|
94
|
+
puts "Missing query parameter".red
|
95
|
+
puts "\tusage: alfi SEARCH_QUERY".yellow
|
98
96
|
else
|
99
97
|
if param.size>=3
|
100
98
|
|
101
|
-
puts "Searching
|
99
|
+
puts "Searching...\n"
|
102
100
|
|
103
101
|
num_results, result_list, suggestions = fetch_results(param)
|
104
102
|
|
103
|
+
if !result_list
|
104
|
+
puts 'Something went wrong with your search'.red
|
105
|
+
exit 1
|
106
|
+
end
|
105
107
|
|
108
|
+
puts "\ndependencies {\n" if num_results>0
|
106
109
|
# Iterate to print results
|
107
110
|
result_list.each do |result|
|
108
111
|
puts result.green
|
109
112
|
end
|
113
|
+
puts "}\n" if num_results>0
|
110
114
|
|
111
|
-
puts "
|
115
|
+
puts "\nFound: #{num_results} result#{num_results>1?'s':''} for '#{param}'"
|
112
116
|
|
113
117
|
|
114
118
|
# handle the suggestions
|
data/lib/alfi/version.rb
CHANGED
metadata
CHANGED
@@ -1,43 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: alfi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- cesar ferreira
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-05-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
-
- !ruby/object:Gem::Dependency
|
14
|
-
name: rake
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
-
requirements:
|
17
|
-
- - "~>"
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: '10.0'
|
20
|
-
type: :development
|
21
|
-
prerelease: false
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
23
|
-
requirements:
|
24
|
-
- - "~>"
|
25
|
-
- !ruby/object:Gem::Version
|
26
|
-
version: '10.0'
|
27
13
|
- !ruby/object:Gem::Dependency
|
28
14
|
name: webmock
|
29
15
|
requirement: !ruby/object:Gem::Requirement
|
30
16
|
requirements:
|
31
17
|
- - "~>"
|
32
18
|
- !ruby/object:Gem::Version
|
33
|
-
version: '1.
|
19
|
+
version: '1.21'
|
34
20
|
type: :development
|
35
21
|
prerelease: false
|
36
22
|
version_requirements: !ruby/object:Gem::Requirement
|
37
23
|
requirements:
|
38
24
|
- - "~>"
|
39
25
|
- !ruby/object:Gem::Version
|
40
|
-
version: '1.
|
26
|
+
version: '1.21'
|
41
27
|
- !ruby/object:Gem::Dependency
|
42
28
|
name: rspec
|
43
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -67,47 +53,33 @@ dependencies:
|
|
67
53
|
- !ruby/object:Gem::Version
|
68
54
|
version: '2.9'
|
69
55
|
- !ruby/object:Gem::Dependency
|
70
|
-
name: pry
|
56
|
+
name: pry-byebug
|
71
57
|
requirement: !ruby/object:Gem::Requirement
|
72
58
|
requirements:
|
73
59
|
- - "~>"
|
74
60
|
- !ruby/object:Gem::Version
|
75
|
-
version: '
|
61
|
+
version: '3.1'
|
76
62
|
type: :development
|
77
63
|
prerelease: false
|
78
64
|
version_requirements: !ruby/object:Gem::Requirement
|
79
65
|
requirements:
|
80
66
|
- - "~>"
|
81
67
|
- !ruby/object:Gem::Version
|
82
|
-
version: '
|
68
|
+
version: '3.1'
|
83
69
|
- !ruby/object:Gem::Dependency
|
84
70
|
name: json
|
85
71
|
requirement: !ruby/object:Gem::Requirement
|
86
72
|
requirements:
|
87
73
|
- - "~>"
|
88
74
|
- !ruby/object:Gem::Version
|
89
|
-
version: 1.8
|
75
|
+
version: '1.8'
|
90
76
|
type: :runtime
|
91
77
|
prerelease: false
|
92
78
|
version_requirements: !ruby/object:Gem::Requirement
|
93
79
|
requirements:
|
94
80
|
- - "~>"
|
95
81
|
- !ruby/object:Gem::Version
|
96
|
-
version: 1.8
|
97
|
-
- !ruby/object:Gem::Dependency
|
98
|
-
name: bundler
|
99
|
-
requirement: !ruby/object:Gem::Requirement
|
100
|
-
requirements:
|
101
|
-
- - ">="
|
102
|
-
- !ruby/object:Gem::Version
|
103
|
-
version: '1.7'
|
104
|
-
type: :runtime
|
105
|
-
prerelease: false
|
106
|
-
version_requirements: !ruby/object:Gem::Requirement
|
107
|
-
requirements:
|
108
|
-
- - ">="
|
109
|
-
- !ruby/object:Gem::Version
|
110
|
-
version: '1.7'
|
82
|
+
version: '1.8'
|
111
83
|
- !ruby/object:Gem::Dependency
|
112
84
|
name: colorize
|
113
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -166,7 +138,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
166
138
|
version: '0'
|
167
139
|
requirements: []
|
168
140
|
rubyforge_project:
|
169
|
-
rubygems_version: 2.4.
|
141
|
+
rubygems_version: 2.4.7
|
170
142
|
signing_key:
|
171
143
|
specification_version: 4
|
172
144
|
summary: Android Library Finder
|