chrome_store_search 0.0.8 → 0.0.9

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: dbacbb38af46951f9f54195eec905ab30cc309bd
4
- data.tar.gz: 55326a05d024a7de0ab0433a6dd66cade8d2ed8e
3
+ metadata.gz: 0c9d46b83073c0cfd9155c79f5cf74e8ed25f06d
4
+ data.tar.gz: b319d63d229a1d65a000991e78dcc9c8efb05153
5
5
  SHA512:
6
- metadata.gz: 9f6adfa702fbeacd7f48442f3307a0998d64f2e77f7208caa4b9eb84d93c2f9e5c45cfc5dae826d075ea457764c30176bc7f86c5ed895b09b2f6fce28d323bb9
7
- data.tar.gz: b0879d787333167f6fe13ce11b0bfcffba6b254b4332e93eb551bb8f73f0c526390db76a8512f799e16da2c990f87cf54c3b998422d601d1313922881afc473b
6
+ metadata.gz: 2429e58106296c8092ff90c3effe195a501745398b76ff8c45f80d1f779b5ab26a78d5afabe37f5b0050d731bb19ad0e07da551f28121ce0208bc829f60e241b
7
+ data.tar.gz: 6c817f0789e1f2c247f096a6d44c95517d093fab8bb5514c90c8ffc3b83d0b616feac8a472980884b8de41ed1c244ec54eee58b86864b2fc96b209d36996e58e
@@ -1,6 +1,7 @@
1
1
  require 'rubygems'
2
2
  require 'cgi'
3
3
  require 'faraday'
4
+ require 'nokogiri'
4
5
  require File.expand_path(File.dirname(__FILE__) + '/app_parser')
5
6
  require File.expand_path(File.dirname(__FILE__) + '/string_utility')
6
7
 
@@ -4,7 +4,7 @@ require 'json'
4
4
  module ChromeStoreSearch
5
5
  class StringUtility
6
6
 
7
- CHROME_STORE_URL = "https://chrome.google.com/webstore/"
7
+ CHROME_STORE_URL = "https://chrome.google.com/webstore/category/apps"
8
8
 
9
9
  def self.gsub_continuation_commas(json_str)
10
10
  json_str.gsub(/,,,*/) do |commas_str|
@@ -23,8 +23,9 @@ module ChromeStoreSearch
23
23
  faraday.adapter Faraday.default_adapter # make requests with Net::HTTP
24
24
  end
25
25
  res = conn.get ''
26
- session_str = gsub_continuation_commas(res.body.match(/<script type="application\/json" id="cws-session-data">([\s\S]*?)<\/script>/i)[1])
27
- JSON.parse(session_str)[-6]
26
+ doc = Nokogiri::HTML(res.body)
27
+ cws_session_data = doc.xpath("//script[@id='cws-session-data']").first.content
28
+ JSON.parse(cws_session_data)[-7]
28
29
  end
29
30
  end
30
31
  end
metadata CHANGED
@@ -1,43 +1,75 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chrome_store_search
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Grant Chen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-06-21 00:00:00.000000000 Z
11
+ date: 2014-11-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '>='
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.8'
20
+ - - ">="
18
21
  - !ruby/object:Gem::Version
19
22
  version: 1.8.1
20
23
  type: :runtime
21
24
  prerelease: false
22
25
  version_requirements: !ruby/object:Gem::Requirement
23
26
  requirements:
24
- - - '>='
27
+ - - "~>"
28
+ - !ruby/object:Gem::Version
29
+ version: '1.8'
30
+ - - ">="
25
31
  - !ruby/object:Gem::Version
26
32
  version: 1.8.1
27
33
  - !ruby/object:Gem::Dependency
28
34
  name: faraday
29
35
  requirement: !ruby/object:Gem::Requirement
30
36
  requirements:
31
- - - '>='
37
+ - - "~>"
38
+ - !ruby/object:Gem::Version
39
+ version: '0.8'
40
+ - - ">="
32
41
  - !ruby/object:Gem::Version
33
42
  version: 0.8.8
34
43
  type: :runtime
35
44
  prerelease: false
36
45
  version_requirements: !ruby/object:Gem::Requirement
37
46
  requirements:
38
- - - '>='
47
+ - - "~>"
48
+ - !ruby/object:Gem::Version
49
+ version: '0.8'
50
+ - - ">="
39
51
  - !ruby/object:Gem::Version
40
52
  version: 0.8.8
53
+ - !ruby/object:Gem::Dependency
54
+ name: nokogiri
55
+ requirement: !ruby/object:Gem::Requirement
56
+ requirements:
57
+ - - "~>"
58
+ - !ruby/object:Gem::Version
59
+ version: '1.6'
60
+ - - ">="
61
+ - !ruby/object:Gem::Version
62
+ version: 1.6.4
63
+ type: :runtime
64
+ prerelease: false
65
+ version_requirements: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - "~>"
68
+ - !ruby/object:Gem::Version
69
+ version: '1.6'
70
+ - - ">="
71
+ - !ruby/object:Gem::Version
72
+ version: 1.6.4
41
73
  description: chrome web store apps, extensions and themes search
42
74
  email: kucss@hotmail.com
43
75
  executables: []
@@ -47,10 +79,11 @@ files:
47
79
  - lib/chrome_store_search.rb
48
80
  - lib/chrome_store_search/app.rb
49
81
  - lib/chrome_store_search/app_parser.rb
50
- - lib/chrome_store_search/string_utility.rb
51
82
  - lib/chrome_store_search/search.rb
83
+ - lib/chrome_store_search/string_utility.rb
52
84
  homepage: https://github.com/grantchen/chrome_store_search
53
- licenses: []
85
+ licenses:
86
+ - MIT
54
87
  metadata: {}
55
88
  post_install_message:
56
89
  rdoc_options: []
@@ -58,18 +91,19 @@ require_paths:
58
91
  - lib
59
92
  required_ruby_version: !ruby/object:Gem::Requirement
60
93
  requirements:
61
- - - '>='
94
+ - - ">="
62
95
  - !ruby/object:Gem::Version
63
96
  version: '0'
64
97
  required_rubygems_version: !ruby/object:Gem::Requirement
65
98
  requirements:
66
- - - '>='
99
+ - - ">="
67
100
  - !ruby/object:Gem::Version
68
101
  version: '0'
69
102
  requirements: []
70
103
  rubyforge_project:
71
- rubygems_version: 2.0.14
104
+ rubygems_version: 2.4.1
72
105
  signing_key:
73
106
  specification_version: 4
74
107
  summary: chrome web store search
75
108
  test_files: []
109
+ has_rdoc: