yotpo 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- Y2I3YTE0MTMxMmIxZjRiZTRiMWI4YTFmMWRmNmY4OTU2NmQwNGIyZQ==
4
+ NDQ2MjFmYTQ4ZTQ4Zjc0ZDU5ZDUwYTQyM2YzZjdmZTIyMjQzNzg1OA==
5
5
  data.tar.gz: !binary |-
6
- ZDZhOGQ1MTViNDM3MjYyZDk4N2JkY2UxM2NiMGEyMjNiYzk5NjdjYQ==
6
+ ZDk4ODZhYTJlYjE2NGI3YmI0MTQ1OGE3ZTc2NzM3NzhlZTUwNzg4YQ==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- MGEwNzY5YjRjYjAwMGFkZjJkY2ZmODQ2OGJiMGY3ZTM3YTFhNDhkZGI0MzIx
10
- OTEwYjI5NzE1MWZjNWM2MmMxMzYyZTFhNTIzZTMyNWZlODI4ZTE4MDA2ZDQ4
11
- OTE1ODQ5YjcxMWUzNzU5ODc3M2IwN2RiYWRkNTE0NDc1ZjhiMTA=
9
+ NzhkMjJiMWFhNDZlMDY4Y2UzNjE1N2Y1ZWFhYThhYThmMmE1YjAwOTU3MjU5
10
+ N2UwNjRmYmY3Y2Y3YTk4NjlhZDM4MjFiZDhlN2Q1NmQzOGE2YWYwMGU1NDEx
11
+ ZjM0ZjI3NTI3Mjg4YmE5NjM2OTI2NjQxNTcxMjZjNjdlMTVmY2E=
12
12
  data.tar.gz: !binary |-
13
- NTM0ODg4YmM0MTM1MzUwYTUyOWNkNTY0Yzg3NTMyNmE2MTIyODI0Njc5ZjJk
14
- YjQ4NzQ0MTZkMTY4ZTVkYTBjZjU4Mjk3MDBjYzUyMDM1ZmQ1ZDNlYjZmZDJi
15
- NjUzNGFmMzI2NjJkNTNhNjIyZDU5MzhlNzA3NDA0NWI1MmRkODg=
13
+ NWI2YTU3NmQ0NDI3MTFiZmY0OGM5YWQ2ZjZkYjI5ZDVlZmM1ZjE1N2Q5NTMw
14
+ ZDIzNTAzZjZjOWU0MzEwMDFiOGI4ZGM0OWU3YTA5NmRiZDYyM2Y2OTIyNGEw
15
+ MDNhMmE1YjAwZjdkMDUyZGEyM2YzZGVhYzc1ODNkZTFmNjFiNWY=
@@ -20,7 +20,7 @@ module Yotpo
20
20
  # @return [::Hashie::Rash] The new review with all of it's date
21
21
  def create_review(params)
22
22
  request = {
23
- app_key: params[:app_key],
23
+ appkey: params[:app_key],
24
24
  sku: params[:product_id],
25
25
  domain: params[:shop_domain],
26
26
  product_title: params[:product_title],
data/lib/yotpo/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Yotpo
2
- VERSION = '0.0.2'
2
+ VERSION = '0.0.3'
3
3
  end
@@ -13,7 +13,6 @@ describe Yotpo::AccountPlatform do
13
13
  app_key: 'nNgGNA54ETOqaXQ7hRZymxqdtwwetJKDVs0v8qGG'
14
14
  }
15
15
  stub_post("/apps/nNgGNA54ETOqaXQ7hRZymxqdtwwetJKDVs0v8qGG/account_platform").
16
- with(:headers => {'User-Agent' => 'Faraday v0.8.7', 'Yotpo-Api-Connector' => '0.0.1'}).
17
16
  to_return(:status => 200, :body => fixture('new_account_platform.json'), :headers => {:content_type => 'application/json; charset=utf-8'})
18
17
 
19
18
  @response = Yotpo.create_account_platform(create_account_platform_request)
@@ -30,7 +30,6 @@ describe Yotpo::Account do
30
30
  utoken: '12ei1rr1i3ufn23itfoijver903'
31
31
  }
32
32
  stub_get('/apps/nNgGNA54ETOqaXQ7hRZymxqdtwwetJKDVs0v8qGG/subomain_check/shalom1?utoken=12ei1rr1i3ufn23itfoijver903').
33
- with(:headers => {'User-Agent'=>'Faraday v0.8.7', 'Yotpo-Api-Connector'=>'0.0.1'}).
34
33
  to_return(:status => 200, :body => fixture('check_subdomain.json'), :headers => {})
35
34
 
36
35
  @response = Yotpo.check_minisite_subdomain(sub_domain_data)
@@ -9,7 +9,6 @@ describe Yotpo::Product do
9
9
 
10
10
  }
11
11
  stub_get("/apps/nNgGNA54ETOqaXQ7hRZymxqdtwwetJKDVs0v8qGG/bottom_lines?utoken=asdeuh1di1udifn1309fn09").
12
- with(:headers => {'User-Agent'=>'Faraday v0.8.7', 'Yotpo-Api-Connector'=>'0.0.1'}).
13
12
  to_return(:status => 200, :body => fixture('get_all_bottom_lines.json'), :headers => {:content_type => 'application/json; charset=utf-8'})
14
13
 
15
14
  @response = Yotpo.get_all_bottom_lines(get_app_bottom_lines_params)
@@ -30,7 +29,6 @@ describe Yotpo::Product do
30
29
  }
31
30
 
32
31
  stub_get("/products/nNgGNA54ETOqaXQ7hRZymxqdtwwetJKDVs0v8qGG/A12/bottomline").
33
- with(:headers => {'User-Agent'=>'Faraday v0.8.7', 'Yotpo-Api-Connector'=>'0.0.1'}).
34
32
  to_return(:status => 200, :body => fixture('get_product_bottom_line.json'), :headers => {:content_type => 'application/json; charset=utf-8'})
35
33
 
36
34
  @response = Yotpo.get_product_bottom_line(get_bottom_line_params)
@@ -20,7 +20,6 @@ describe Yotpo::Purchase do
20
20
  app_key: 'nNgGNA54ETOqaXQ7hRZymxqdtwwetJKDVs0v8qGG'
21
21
  }
22
22
  stub_post("/apps/nNgGNA54ETOqaXQ7hRZymxqdtwwetJKDVs0v8qGG/purchases").
23
- with(:headers => {'User-Agent' => 'Faraday v0.8.7', 'Yotpo-Api-Connector' => '0.0.1'}).
24
23
  to_return(:status => 200, :body => fixture('new_purchase.json'), :headers => {:content_type => 'application/json; charset=utf-8'})
25
24
 
26
25
  @response = Yotpo.create_new_purchase(create_new_purchase_request)
@@ -57,7 +56,6 @@ describe Yotpo::Purchase do
57
56
  ]
58
57
  }
59
58
  stub_post("/apps/nNgGNA54ETOqaXQ7hRZymxqdtwwetJKDVs0v8qGG/purchases/mass_create").
60
- with(:headers => {'User-Agent' => 'Faraday v0.8.7', 'Yotpo-Api-Connector' => '0.0.1'}).
61
59
  to_return(:status => 200, :body => fixture('new_purchase.json'), :headers => {:content_type => 'application/json; charset=utf-8'})
62
60
 
63
61
  @response = Yotpo.create_new_purchases(create_new_purchase_request)
@@ -76,7 +74,6 @@ describe Yotpo::Purchase do
76
74
  app_key: 'nNgGNA54ETOqaXQ7hRZymxqdtwwetJKDVs0v8qGG'
77
75
  }
78
76
  stub_get('/apps/nNgGNA54ETOqaXQ7hRZymxqdtwwetJKDVs0v8qGG/purchases?count=10&page=1&utoken=asdeuh1di1udifn1309fn09').
79
- with(:headers => {'User-Agent' => 'Faraday v0.8.7', 'Yotpo-Api-Connector' => '0.0.1'}).
80
77
  to_return(:status => 200, :body => fixture('get_list_of_purchases.json'), :headers => {:content_type => 'application/json; charset=utf-8'})
81
78
 
82
79
  @response = Yotpo.get_purchases(get_purchases_request)
@@ -18,7 +18,7 @@ describe Yotpo::Review do
18
18
  review_title: Faker::Lorem.sentence(5),
19
19
  review_score: [0, 0.5, 1, 1.5, 2, 2.5, 3, 3.5, 4, 4.5, 5].sample
20
20
  }
21
- stub_get('/reviews/dynamic_create').with(:query => hash_including({:app_key => 'nNgGNA54ETOqaXQ7hRZymxqdtwwetJKDVs0v8qGG'})).to_return(:body => fixture('new_review.json'),
21
+ stub_get('/reviews/dynamic_create').with(:query => hash_including({:appkey => 'nNgGNA54ETOqaXQ7hRZymxqdtwwetJKDVs0v8qGG'})).to_return(:body => fixture('new_review.json'),
22
22
  :headers => {:content_type => 'application/json; charset=utf-8'})
23
23
  @response = Yotpo.create_review(anonymous_review)
24
24
  end
@@ -40,7 +40,6 @@ describe Yotpo::Review do
40
40
  product_id: 'A12'
41
41
  }
42
42
  stub_get("/products/nNgGNA54ETOqaXQ7hRZymxqdtwwetJKDVs0v8qGG/A12/reviews?count=5&page=1").
43
- with(:headers => {'User-Agent'=>'Faraday v0.8.7', 'Yotpo-Api-Connector'=>'0.0.1'}).
44
43
  to_return(:status => 200, :body => fixture('get_product_reviews.json'), :headers => {:content_type => 'application/json; charset=utf-8'})
45
44
  @response = Yotpo.get_product_reviews(get_reviews_params)
46
45
  end
@@ -34,8 +34,7 @@ describe Yotpo::User do
34
34
  grant_type: "client_credentials"
35
35
  }
36
36
  stub_request(:post, "https://api.yotpo.com/oauth/token").
37
- with(:body => "{\":client_id\":\"a3lmMnC3u4SNmz0ZcHf3lODeIYM9LEQwtTWXRdDP\",\":client_secret\":\"NumuadvlCGOTwnCCvY5BRAhGib1LTCFptYxfvebm\",\":grant_type\":\"client_credentials\"}",
38
- :headers => {'Content-Type'=>'application/json', 'User-Agent'=>'Faraday v0.8.7', 'Yotpo-Api-Connector'=>'0.0.1'}).
37
+ with(:body => "{\":client_id\":\"a3lmMnC3u4SNmz0ZcHf3lODeIYM9LEQwtTWXRdDP\",\":client_secret\":\"NumuadvlCGOTwnCCvY5BRAhGib1LTCFptYxfvebm\",\":grant_type\":\"client_credentials\"}").
39
38
  to_return(:status => 200, :body => fixture('bearer_token.json'), :headers => {:content_type => 'application/json; charset=utf-8'})
40
39
  @response = Yotpo.get_oauth_token(oauth_request)
41
40
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yotpo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vladislav Shub
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-05-22 00:00:00.000000000 Z
11
+ date: 2013-05-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday