yotpo 0.0.10 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +13 -5
- data/.travis.yml +11 -3
- data/lib/yotpo/api/review.rb +1 -1
- data/lib/yotpo/client.rb +2 -2
- data/lib/yotpo/version.rb +1 -1
- data/spec/api/account_platform_spec.rb +1 -1
- data/spec/api/account_spec.rb +3 -4
- data/spec/api/product_spec.rb +2 -2
- data/spec/api/purchase_spec.rb +3 -3
- data/spec/api/reminder_spec.rb +1 -1
- data/spec/api/review_spec.rb +2 -2
- data/spec/api/user_spec.rb +4 -4
- data/yotpo.gemspec +1 -1
- metadata +23 -23
checksums.yaml
CHANGED
@@ -1,7 +1,15 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
ZTc5NGE1MDA2ZTNlOGY3MzViNDQwZWNmY2ZlOGEzNDViNGFmNWNjZA==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
OTdhNmJhZTk5NzJhZGRmOWRhNzgwMTE1NWRjZDMzMzcxMjAxNGIzOQ==
|
5
7
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
ZWY0MGFjOTJkODRkZWI4N2MyZDczNjZlODk4MTcyMGE5OTI3NGYxNzE0YmYz
|
10
|
+
MzJkYjE2ZTllMGQyM2U3ZGY1Y2UzZTBjNTNiYjU0MTQ4MjRiODgxNDVjNjcz
|
11
|
+
YTliYmJmOGIzY2EyZTdjNTc1MDI0Yzg0ODAyMzQ3MzU1ZDJhNzA=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
MTgzNDQ2NDk2NjU3MjYyN2JlMzg0YzU2NzJmYmIxYmRmMzc4OGU1YzkyYTc5
|
14
|
+
ZDI0YjBlMGU4NThmZWQ4ODI5MTY0NWU4NjY0NWVmYmZjMjA2OWFmZjFjY2Ew
|
15
|
+
NmUzMWY5MzM0NDJhOWNjZjRhNmExODdhNjE2ODM0Y2UzNWRlNjQ=
|
data/.travis.yml
CHANGED
@@ -1,5 +1,13 @@
|
|
1
1
|
language: ruby
|
2
2
|
rvm:
|
3
|
-
|
4
|
-
|
5
|
-
|
3
|
+
- 1.9.3
|
4
|
+
- 2.1.1
|
5
|
+
- ruby-head
|
6
|
+
deploy:
|
7
|
+
provider: rubygems
|
8
|
+
api_key:
|
9
|
+
secure: D2DAEwJaeCncuki1aYww1uL/cafrRxCwKnuRiTsiN+xjsUX6K3r3swoELFEw1/zMRjUN5qW81pK3XnNt2MSALECon2JOC/wyt5H+jcxXWkKGmAG7/Lymva/REDVcWWaYbqWLHs8fj5M8lfIoKCfb8iyJTmhb+cBCaIzaz617Elc=
|
10
|
+
gem: yotpo
|
11
|
+
on:
|
12
|
+
branch: master
|
13
|
+
repo: YotpoLtd/yotpo-ruby
|
data/lib/yotpo/api/review.rb
CHANGED
@@ -17,7 +17,7 @@ module Yotpo
|
|
17
17
|
# @option params [String] :review_title the review title
|
18
18
|
# @option params [String Integer] :review_score the rating of the review
|
19
19
|
# @option params [String] :utoken the token of the user who wrote the review (if one exists)
|
20
|
-
# @return [::Hashie::
|
20
|
+
# @return [::Hashie::Mash] The new review with all of it's date
|
21
21
|
def create_review(params)
|
22
22
|
request = {
|
23
23
|
appkey: params[:app_key],
|
data/lib/yotpo/client.rb
CHANGED
@@ -120,8 +120,8 @@ module Yotpo
|
|
120
120
|
|
121
121
|
conn.use Yotpo::ResponseParser
|
122
122
|
|
123
|
-
# Set the response to be
|
124
|
-
conn.response :
|
123
|
+
# Set the response to be mashified
|
124
|
+
conn.response :mashify
|
125
125
|
|
126
126
|
# Setting request and response to use JSON/XML
|
127
127
|
conn.request :oj
|
data/lib/yotpo/version.rb
CHANGED
@@ -18,7 +18,7 @@ describe Yotpo::AccountPlatform do
|
|
18
18
|
end
|
19
19
|
|
20
20
|
subject { @response.body.account_platform }
|
21
|
-
it { should be_a ::Hashie::
|
21
|
+
it { should be_a ::Hashie::Mash }
|
22
22
|
it { should respond_to :id }
|
23
23
|
it { should respond_to :shop_token }
|
24
24
|
it { should respond_to :shop_domain }
|
data/spec/api/account_spec.rb
CHANGED
@@ -17,8 +17,7 @@ describe Yotpo::Account do
|
|
17
17
|
end
|
18
18
|
end
|
19
19
|
subject { @response.body.app }
|
20
|
-
it { should be_a ::Hashie::
|
21
|
-
it { should respond_to :id }
|
20
|
+
it { should be_a ::Hashie::Mash }
|
22
21
|
it { should respond_to :app_key }
|
23
22
|
end
|
24
23
|
|
@@ -34,10 +33,10 @@ describe Yotpo::Account do
|
|
34
33
|
end
|
35
34
|
end
|
36
35
|
subject { @response.body.subdomain }
|
37
|
-
it { should be_a ::Hashie::
|
36
|
+
it { should be_a ::Hashie::Mash }
|
38
37
|
it { should respond_to :available }
|
39
38
|
it { should respond_to :subdomain }
|
40
39
|
|
41
40
|
|
42
41
|
end
|
43
|
-
end
|
42
|
+
end
|
data/spec/api/product_spec.rb
CHANGED
@@ -13,7 +13,7 @@ describe Yotpo::Product do
|
|
13
13
|
end
|
14
14
|
|
15
15
|
subject { @response.body.bottomlines[0] }
|
16
|
-
it { should be_a ::Hashie::
|
16
|
+
it { should be_a ::Hashie::Mash }
|
17
17
|
it { should respond_to :domain_key }
|
18
18
|
it { should respond_to :product_score }
|
19
19
|
it { should respond_to :total_reviews }
|
@@ -31,7 +31,7 @@ describe Yotpo::Product do
|
|
31
31
|
end
|
32
32
|
|
33
33
|
subject { @response.body.bottomline }
|
34
|
-
it { should be_a ::Hashie::
|
34
|
+
it { should be_a ::Hashie::Mash }
|
35
35
|
it { should respond_to :average_score }
|
36
36
|
it { should respond_to :total_reviews }
|
37
37
|
end
|
data/spec/api/purchase_spec.rb
CHANGED
@@ -26,7 +26,7 @@ describe Yotpo::Purchase do
|
|
26
26
|
end
|
27
27
|
|
28
28
|
subject { @response.body }
|
29
|
-
it { should be_a ::Hashie::
|
29
|
+
it { should be_a ::Hashie::Mash }
|
30
30
|
it { should respond_to :code }
|
31
31
|
it { should respond_to :message }
|
32
32
|
end
|
@@ -61,7 +61,7 @@ describe Yotpo::Purchase do
|
|
61
61
|
end
|
62
62
|
|
63
63
|
subject { @response.body }
|
64
|
-
it { should be_a ::Hashie::
|
64
|
+
it { should be_a ::Hashie::Mash }
|
65
65
|
it { should respond_to :code }
|
66
66
|
it { should respond_to :message }
|
67
67
|
end
|
@@ -78,7 +78,7 @@ describe Yotpo::Purchase do
|
|
78
78
|
end
|
79
79
|
|
80
80
|
subject { @response.body.purchases[0] }
|
81
|
-
it { should be_a ::Hashie::
|
81
|
+
it { should be_a ::Hashie::Mash }
|
82
82
|
it { should respond_to :id }
|
83
83
|
it { should respond_to :user_email }
|
84
84
|
it { should respond_to :user_name }
|
data/spec/api/reminder_spec.rb
CHANGED
data/spec/api/review_spec.rb
CHANGED
@@ -24,7 +24,7 @@ describe Yotpo::Review do
|
|
24
24
|
end
|
25
25
|
|
26
26
|
subject { @response.body.reviews[0] }
|
27
|
-
it { should be_a ::Hashie::
|
27
|
+
it { should be_a ::Hashie::Mash }
|
28
28
|
it { should respond_to :id }
|
29
29
|
it { should respond_to :user }
|
30
30
|
it { should respond_to :content }
|
@@ -45,7 +45,7 @@ describe Yotpo::Review do
|
|
45
45
|
end
|
46
46
|
|
47
47
|
subject { @response.body.reviews[0] }
|
48
|
-
it { should be_a ::Hashie::
|
48
|
+
it { should be_a ::Hashie::Mash }
|
49
49
|
it { should respond_to :id }
|
50
50
|
it { should respond_to :user }
|
51
51
|
it { should respond_to :content }
|
data/spec/api/user_spec.rb
CHANGED
@@ -21,11 +21,11 @@ describe Yotpo::User do
|
|
21
21
|
end
|
22
22
|
end
|
23
23
|
subject { @response.body }
|
24
|
-
it { should be_a ::Hashie::
|
24
|
+
it { should be_a ::Hashie::Mash }
|
25
25
|
it { should respond_to :app_key }
|
26
26
|
it { should respond_to :secret }
|
27
27
|
it { should respond_to :token }
|
28
|
-
it { should respond_to :
|
28
|
+
it { should respond_to :user_id }
|
29
29
|
end
|
30
30
|
|
31
31
|
describe '#get_oauth_token' do
|
@@ -40,7 +40,7 @@ describe Yotpo::User do
|
|
40
40
|
end
|
41
41
|
end
|
42
42
|
subject { @response.body }
|
43
|
-
it { should be_a ::Hashie::
|
43
|
+
it { should be_a ::Hashie::Mash }
|
44
44
|
it { should respond_to :access_token }
|
45
45
|
it { should respond_to :token_type }
|
46
46
|
end
|
@@ -56,7 +56,7 @@ describe Yotpo::User do
|
|
56
56
|
end
|
57
57
|
end
|
58
58
|
subject { @response.body }
|
59
|
-
it { should be_a ::Hashie::
|
59
|
+
it { should be_a ::Hashie::Mash }
|
60
60
|
it { should respond_to :code }
|
61
61
|
it { should respond_to :signin_url }
|
62
62
|
|
data/yotpo.gemspec
CHANGED
@@ -22,7 +22,7 @@ Gem::Specification.new do |gem|
|
|
22
22
|
gem.add_dependency 'faraday'
|
23
23
|
gem.add_dependency 'typhoeus'
|
24
24
|
gem.add_dependency 'faraday_middleware'
|
25
|
-
gem.add_dependency '
|
25
|
+
gem.add_dependency 'hashie'
|
26
26
|
gem.add_dependency 'oj'
|
27
27
|
gem.add_dependency 'activesupport'
|
28
28
|
|
metadata
CHANGED
@@ -1,97 +1,97 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: yotpo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vladislav Shub
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-09-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ! '>='
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ! '>='
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: typhoeus
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ! '>='
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '0'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ! '>='
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: faraday_middleware
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - ! '>='
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '0'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - ! '>='
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
56
|
+
name: hashie
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - ! '>='
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '0'
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- -
|
66
|
+
- - ! '>='
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: oj
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- -
|
73
|
+
- - ! '>='
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: '0'
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- -
|
80
|
+
- - ! '>='
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: activesupport
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- -
|
87
|
+
- - ! '>='
|
88
88
|
- !ruby/object:Gem::Version
|
89
89
|
version: '0'
|
90
90
|
type: :runtime
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- -
|
94
|
+
- - ! '>='
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0'
|
97
97
|
description: A Ruby interface to the YOTPO API
|
@@ -101,11 +101,11 @@ executables: []
|
|
101
101
|
extensions: []
|
102
102
|
extra_rdoc_files: []
|
103
103
|
files:
|
104
|
-
-
|
105
|
-
-
|
106
|
-
-
|
107
|
-
-
|
108
|
-
-
|
104
|
+
- .gitignore
|
105
|
+
- .rspec
|
106
|
+
- .ruby-gemset
|
107
|
+
- .ruby-version
|
108
|
+
- .travis.yml
|
109
109
|
- Gemfile
|
110
110
|
- LICENSE.txt
|
111
111
|
- README.md
|
@@ -168,17 +168,17 @@ require_paths:
|
|
168
168
|
- lib
|
169
169
|
required_ruby_version: !ruby/object:Gem::Requirement
|
170
170
|
requirements:
|
171
|
-
- -
|
171
|
+
- - ! '>='
|
172
172
|
- !ruby/object:Gem::Version
|
173
173
|
version: 1.9.3
|
174
174
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
175
175
|
requirements:
|
176
|
-
- -
|
176
|
+
- - ! '>='
|
177
177
|
- !ruby/object:Gem::Version
|
178
178
|
version: '0'
|
179
179
|
requirements: []
|
180
180
|
rubyforge_project:
|
181
|
-
rubygems_version: 2.4.
|
181
|
+
rubygems_version: 2.4.5
|
182
182
|
signing_key:
|
183
183
|
specification_version: 4
|
184
184
|
summary: A Ruby interface to the YOTPO API
|