emporium 0.0.3 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
data/spec/spec_helper.rb CHANGED
@@ -1,6 +1,25 @@
1
1
  require 'emporium'
2
2
  require 'yaml'
3
+ require 'vcr'
4
+
5
+ if File.exists?('./spec/config.yml')
6
+ CONFIG = YAML.load_file('./spec/config.yml')
7
+ else
8
+ CONFIG = YAML.load_file('./spec/config.sample.yml')
9
+ end
3
10
 
4
- CONFIG = YAML.load_file('./spec/config.yml')
5
11
  AMAZON = CONFIG["amazon"]
6
- GOOGLE = CONFIG["google"]
12
+ GOOGLE = CONFIG["google"]
13
+
14
+ VCR.configure do |config|
15
+ config.cassette_library_dir = "spec/fixtures"
16
+ config.hook_into :webmock
17
+ config.filter_sensitive_data('<access_key>') { AMAZON["access_key"] }
18
+ config.filter_sensitive_data('<associate_tag>') { AMAZON["associate_tag"] }
19
+ config.filter_sensitive_data('<secret>') { AMAZON["secret"] }
20
+ config.filter_sensitive_data('<access_key>') { GOOGLE["access_key"] }
21
+ config.filter_sensitive_data('<cse>') { GOOGLE["cse"] }
22
+ config.default_cassette_options = {
23
+ :match_requests_on => [:method, VCR.request_matchers.uri_without_params(:Timestamp, :Signature, :AssociateTag, :key)]
24
+ }
25
+ end
metadata CHANGED
@@ -1,71 +1,135 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: emporium
3
- version: !ruby/object:Gem::Version
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
4
5
  prerelease:
5
- version: 0.0.3
6
6
  platform: ruby
7
- authors:
7
+ authors:
8
8
  - Hugo Bastien
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
-
13
- date: 2011-12-08 00:00:00 Z
14
- dependencies:
15
- - !ruby/object:Gem::Dependency
12
+ date: 2013-02-28 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
16
15
  name: nokogiri
17
- prerelease: false
18
- requirement: &id001 !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
19
17
  none: false
20
- requirements:
21
- - - ">="
22
- - !ruby/object:Gem::Version
23
- version: "0"
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
24
22
  type: :runtime
25
- version_requirements: *id001
26
- - !ruby/object:Gem::Dependency
27
- name: ruby-hmac
28
23
  prerelease: false
29
- requirement: &id002 !ruby/object:Gem::Requirement
24
+ version_requirements: !ruby/object:Gem::Requirement
30
25
  none: false
31
- requirements:
32
- - - ">="
33
- - !ruby/object:Gem::Version
34
- version: "0"
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: '0'
30
+ - !ruby/object:Gem::Dependency
31
+ name: ruby-hmac
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - ! '>='
36
+ - !ruby/object:Gem::Version
37
+ version: '0'
35
38
  type: :runtime
36
- version_requirements: *id002
37
- - !ruby/object:Gem::Dependency
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: '0'
46
+ - !ruby/object:Gem::Dependency
38
47
  name: json
48
+ requirement: !ruby/object:Gem::Requirement
49
+ none: false
50
+ requirements:
51
+ - - ! '>='
52
+ - !ruby/object:Gem::Version
53
+ version: '0'
54
+ type: :runtime
39
55
  prerelease: false
40
- requirement: &id003 !ruby/object:Gem::Requirement
56
+ version_requirements: !ruby/object:Gem::Requirement
41
57
  none: false
42
- requirements:
43
- - - ">="
44
- - !ruby/object:Gem::Version
45
- version: "0"
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ - !ruby/object:Gem::Dependency
63
+ name: rake
64
+ requirement: !ruby/object:Gem::Requirement
65
+ none: false
66
+ requirements:
67
+ - - ! '>='
68
+ - !ruby/object:Gem::Version
69
+ version: '0'
46
70
  type: :runtime
47
- version_requirements: *id003
48
- - !ruby/object:Gem::Dependency
71
+ prerelease: false
72
+ version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ! '>='
76
+ - !ruby/object:Gem::Version
77
+ version: '0'
78
+ - !ruby/object:Gem::Dependency
49
79
  name: rspec
80
+ requirement: !ruby/object:Gem::Requirement
81
+ none: false
82
+ requirements:
83
+ - - ! '>='
84
+ - !ruby/object:Gem::Version
85
+ version: '0'
86
+ type: :development
87
+ prerelease: false
88
+ version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
90
+ requirements:
91
+ - - ! '>='
92
+ - !ruby/object:Gem::Version
93
+ version: '0'
94
+ - !ruby/object:Gem::Dependency
95
+ name: vcr
96
+ requirement: !ruby/object:Gem::Requirement
97
+ none: false
98
+ requirements:
99
+ - - ! '>='
100
+ - !ruby/object:Gem::Version
101
+ version: '0'
102
+ type: :development
50
103
  prerelease: false
51
- requirement: &id004 !ruby/object:Gem::Requirement
104
+ version_requirements: !ruby/object:Gem::Requirement
105
+ none: false
106
+ requirements:
107
+ - - ! '>='
108
+ - !ruby/object:Gem::Version
109
+ version: '0'
110
+ - !ruby/object:Gem::Dependency
111
+ name: webmock
112
+ requirement: !ruby/object:Gem::Requirement
52
113
  none: false
53
- requirements:
54
- - - ">="
55
- - !ruby/object:Gem::Version
56
- version: "0"
114
+ requirements:
115
+ - - ! '>='
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
57
118
  type: :development
58
- version_requirements: *id004
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ none: false
122
+ requirements:
123
+ - - ! '>='
124
+ - !ruby/object:Gem::Version
125
+ version: '0'
59
126
  description: Uses Amazon's product advertising API or Google's Shopping Search API
60
- email:
127
+ email:
61
128
  - hugobast@gmail.com
62
129
  executables: []
63
-
64
130
  extensions: []
65
-
66
131
  extra_rdoc_files: []
67
-
68
- files:
132
+ files:
69
133
  - .gitignore
70
134
  - .rspec
71
135
  - Gemfile
@@ -81,35 +145,38 @@ files:
81
145
  - lib/emporium/services/options.rb
82
146
  - lib/emporium/services/utilities.rb
83
147
  - lib/emporium/version.rb
148
+ - spec/config.sample.yml
84
149
  - spec/emporium/emporium_spec.rb
150
+ - spec/fixtures/fetch_amazon.yml
151
+ - spec/fixtures/fetch_google.yml
85
152
  - spec/spec_helper.rb
86
153
  homepage: https://github.com/hugobast/emporium
87
154
  licenses: []
88
-
89
155
  post_install_message:
90
156
  rdoc_options: []
91
-
92
- require_paths:
157
+ require_paths:
93
158
  - lib
94
- required_ruby_version: !ruby/object:Gem::Requirement
159
+ required_ruby_version: !ruby/object:Gem::Requirement
95
160
  none: false
96
- requirements:
97
- - - ">="
98
- - !ruby/object:Gem::Version
99
- version: "0"
100
- required_rubygems_version: !ruby/object:Gem::Requirement
161
+ requirements:
162
+ - - ! '>='
163
+ - !ruby/object:Gem::Version
164
+ version: '0'
165
+ required_rubygems_version: !ruby/object:Gem::Requirement
101
166
  none: false
102
- requirements:
103
- - - ">="
104
- - !ruby/object:Gem::Version
105
- version: "0"
167
+ requirements:
168
+ - - ! '>='
169
+ - !ruby/object:Gem::Version
170
+ version: '0'
106
171
  requirements: []
107
-
108
172
  rubyforge_project: emporium
109
- rubygems_version: 1.8.11
173
+ rubygems_version: 1.8.23
110
174
  signing_key:
111
175
  specification_version: 3
112
176
  summary: Emporium fetches information about a product from it's UPC (GTIN-12)
113
- test_files:
177
+ test_files:
178
+ - spec/config.sample.yml
114
179
  - spec/emporium/emporium_spec.rb
180
+ - spec/fixtures/fetch_amazon.yml
181
+ - spec/fixtures/fetch_google.yml
115
182
  - spec/spec_helper.rb