google_play_search 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/google_play_search/search.rb +3 -2
  2. metadata +49 -30
@@ -1,6 +1,7 @@
1
1
  require 'rubygems'
2
2
  require 'nokogiri'
3
3
  require 'open3'
4
+ require 'cgi'
4
5
  require File.expand_path(File.dirname(__FILE__) + '/app_parser')
5
6
 
6
7
  module GooglePlaySearch
@@ -24,7 +25,7 @@ module GooglePlaySearch
24
25
  end
25
26
 
26
27
  def search(keyword, options={})
27
- @current_page = options[:page].nil? ? 1 : options[:page]
28
+ @current_page = options[:page].nil? ? 1 : options[:page]
28
29
  @keyword = keyword
29
30
  stdin, stdout, stderr = Open3.popen3("curl '#{init_query_url}'")
30
31
  AppParser.new(stdout.read).parse
@@ -39,7 +40,7 @@ module GooglePlaySearch
39
40
  def init_query_url
40
41
  query_url = ""
41
42
  query_url << GOOGLE_PLAY_BASE_SEARCH_URL
42
- query_url << @keyword << "&"
43
+ query_url << CGI.escape(@keyword) << "&"
43
44
  query_url << "c=" << @search_condition[:category] << "&"
44
45
  query_url << "hl=" << @search_condition[:language] << "&"
45
46
  query_url << "price=" << @search_condition[:price] << "&"
metadata CHANGED
@@ -1,64 +1,83 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: google_play_search
3
- version: !ruby/object:Gem::Version
4
- version: 0.0.3
3
+ version: !ruby/object:Gem::Version
4
+ hash: 23
5
5
  prerelease:
6
+ segments:
7
+ - 0
8
+ - 0
9
+ - 4
10
+ version: 0.0.4
6
11
  platform: ruby
7
- authors:
12
+ authors:
8
13
  - Grant Chen
9
14
  autorequire:
10
15
  bindir: bin
11
16
  cert_chain: []
12
- date: 2012-06-03 00:00:00.000000000Z
13
- dependencies:
14
- - !ruby/object:Gem::Dependency
17
+
18
+ date: 2012-06-03 00:00:00 Z
19
+ dependencies:
20
+ - !ruby/object:Gem::Dependency
15
21
  name: nokogiri
16
- requirement: !ruby/object:Gem::Requirement
17
- none: false
18
- requirements:
19
- - - ! '>='
20
- - !ruby/object:Gem::Version
21
- version: 1.5.3
22
- type: :runtime
23
22
  prerelease: false
24
- version_requirements: !ruby/object:Gem::Requirement
23
+ requirement: &id001 !ruby/object:Gem::Requirement
25
24
  none: false
26
- requirements:
27
- - - ! '>='
28
- - !ruby/object:Gem::Version
25
+ requirements:
26
+ - - ">="
27
+ - !ruby/object:Gem::Version
28
+ hash: 5
29
+ segments:
30
+ - 1
31
+ - 5
32
+ - 3
29
33
  version: 1.5.3
34
+ type: :runtime
35
+ version_requirements: *id001
30
36
  description: google play market search gem
31
37
  email: kucss@hotmail.com
32
38
  executables: []
39
+
33
40
  extensions: []
41
+
34
42
  extra_rdoc_files: []
35
- files:
43
+
44
+ files:
36
45
  - lib/google_play_search/search.rb
37
46
  - lib/google_play_search/app.rb
38
47
  - lib/google_play_search/app_parser.rb
39
48
  - lib/google_play_search.rb
40
49
  homepage: https://github.com/kucss/google_play_search
41
50
  licenses: []
51
+
42
52
  post_install_message:
43
53
  rdoc_options: []
44
- require_paths:
54
+
55
+ require_paths:
45
56
  - lib
46
- required_ruby_version: !ruby/object:Gem::Requirement
57
+ required_ruby_version: !ruby/object:Gem::Requirement
47
58
  none: false
48
- requirements:
49
- - - ! '>='
50
- - !ruby/object:Gem::Version
51
- version: '0'
52
- required_rubygems_version: !ruby/object:Gem::Requirement
59
+ requirements:
60
+ - - ">="
61
+ - !ruby/object:Gem::Version
62
+ hash: 3
63
+ segments:
64
+ - 0
65
+ version: "0"
66
+ required_rubygems_version: !ruby/object:Gem::Requirement
53
67
  none: false
54
- requirements:
55
- - - ! '>='
56
- - !ruby/object:Gem::Version
57
- version: '0'
68
+ requirements:
69
+ - - ">="
70
+ - !ruby/object:Gem::Version
71
+ hash: 3
72
+ segments:
73
+ - 0
74
+ version: "0"
58
75
  requirements: []
76
+
59
77
  rubyforge_project:
60
78
  rubygems_version: 1.8.19
61
79
  signing_key:
62
80
  specification_version: 3
63
81
  summary: google play market search
64
82
  test_files: []
83
+