alfi 0.2.1 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/alfi.gemspec +1 -1
  3. data/lib/alfi.rb +33 -14
  4. data/lib/alfi/version.rb +1 -1
  5. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 71aec1e9febafd0baeb22aca0ef4b7c2bbb7f369
4
- data.tar.gz: e58af05cd036ce1f642c1e9bcd4192a246be2b0e
3
+ metadata.gz: 0bc82c723112ac0a4ae1814ef9aa80d224e333ac
4
+ data.tar.gz: eae368210dba65d6fcc118a9c52aa357f9dd317f
5
5
  SHA512:
6
- metadata.gz: ff712dc997a48738e9af0e3b4d2f34cf4fc3be2f080dd0174dc1c8f97f06ac7cc587990d009227ba0144eea37606d645280dda07a2a128526d904cf499eecb6c
7
- data.tar.gz: 1b6ddd69e48dcd139b98cc7afba02f9b1b7dba94567ed1562b4eaac66eef56cb9446c10c5d5f77c2ec337d4b9d08535d6e1b54293c5f40a687e880d0fbcd338f
6
+ metadata.gz: 292089d2e44f4911c196c342eebd411832055a5f09ee59ec2f5cf5779f26152d7390e093733ad8a944b259ceaec15d1b6c0e566a10e686b2939002047b5f719b
7
+ data.tar.gz: f5421b9330b0743bbf26272397df0eac9208dd1c911633102bb637b5b4965b6c1a2b57955c7d45227ae7000fe679a98bb1df25fac96103710c5f329c08490cef
data/alfi.gemspec CHANGED
@@ -14,7 +14,7 @@ Gem::Specification.new do |spec|
14
14
  end
15
15
 
16
16
  spec.summary = 'Android Library Finder'
17
- spec.description = 'Search through thousands of android libraries that can help you scale your projects elegantly.'
17
+ spec.description = 'Android Library Finder to search through thousands of android libraries that can help you scale your projects elegantly.'
18
18
  spec.homepage = "https://github.com/cesarferreira/alfi"
19
19
  spec.license = 'MIT'
20
20
 
data/lib/alfi.rb CHANGED
@@ -38,6 +38,9 @@ module Alfi
38
38
  # Init the result list
39
39
  result_list = Array.new
40
40
 
41
+ # query google reps
42
+ result_list = query_offline_reps(query)
43
+
41
44
  # Iterate the libraries
42
45
  result['response']['docs'].each do |doc|
43
46
  output = " compile '#{doc['id']}:#{doc['latestVersion']}'"
@@ -50,23 +53,39 @@ module Alfi
50
53
  end
51
54
  end
52
55
 
56
+ # QUERY OFFLINE REPOSITORIES (google)
53
57
  def self.query_offline_reps(query)
54
- #
55
- # compile 'com.android.support:appcompat-v7:21.0.3'
56
- # compile 'com.android.support:cardview-v7:21.0.3'
57
- # compile 'com.android.support:gridlayout-v7:21.0.3'
58
- # compile 'com.android.support:leanback-v17:21.0.3'
59
- # compile 'com.android.support:mediarouter-v7:21.0.3'
60
- # compile 'com.android.support:palette-v7:21.0.3'
61
- # compile 'com.android.support:recyclerview-v7:21.0.3'
62
- # compile 'com.android.support:support-annotations:21.0.3'
63
- # compile 'com.android.support:support-v13:21.0.3'
64
- # compile 'com.android.support:support-v4:21.0.3'
65
-
66
- #com.google.android.gms:play-services-wearable:6.5.87
67
- #com.google.android.gms:play-services:6.5.87
58
+
59
+ google_libs = Array.new
60
+ google_libs << 'com.android.support:appcompat-v7'
61
+ google_libs << 'com.android.support:cardview-v7'
62
+ google_libs << 'com.android.support:gridlayout-v7'
63
+ google_libs << 'com.android.support:leanback-v17'
64
+ google_libs << 'com.android.support:mediarouter-v7'
65
+ google_libs << 'com.android.support:palette-v7'
66
+ google_libs << 'com.android.support:recyclerview-v7'
67
+ google_libs << 'com.android.support:support-annotations'
68
+ google_libs << 'com.android.support:support-v4'
69
+ google_libs << 'com.android.support:support-v13'
70
+ google_libs << 'com.google.android.gms:play-services-wearable'
71
+ google_libs << 'com.google.android.gms:play-services'
72
+
73
+
74
+ found_libs = Array.new
75
+
76
+ # is there anything?
77
+ google_libs.each do |lib|
78
+
79
+ if lib.include?(query)
80
+ found_libs << " compile '#{lib}:+'"
81
+ end
82
+ end
83
+
84
+ return found_libs
85
+
68
86
  end
69
87
 
88
+ # INIT
70
89
  def self.initialize (param)
71
90
 
72
91
  if param == nil
data/lib/alfi/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Alfi
2
- VERSION = '0.2.1'
2
+ VERSION = '0.3.0'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: alfi
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - cesar ferreira
@@ -94,8 +94,8 @@ dependencies:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0.7'
97
- description: Search through thousands of android libraries that can help you scale
98
- your projects elegantly.
97
+ description: Android Library Finder to search through thousands of android libraries
98
+ that can help you scale your projects elegantly.
99
99
  email:
100
100
  - cesar.manuel.ferreira@gmail.com
101
101
  executables: