doyoubuzz-showcase 0.1.0 → 0.2.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2aceb417792c107337b13ac22cfe4226fcddd93b
4
- data.tar.gz: 6bbf214f97889a7439ed418b6e30d9761d54d426
3
+ metadata.gz: 70f12625b52caebe5f3d707d714cd2c0f95ea309
4
+ data.tar.gz: 80838e39ed9189bb9e2393d2f6756ae9bd024dc0
5
5
  SHA512:
6
- metadata.gz: 464aee41aa33f7a9fcef0cae09e9864fcafcbbcd32efc6928ddebac83596474836b6d503920273a46611b34649b3b2f0d3c123f881ad08f5bd561b0cc7acb277
7
- data.tar.gz: b2e5ef907ef149ac4dad612837edbd09be5196bad01aef7ef3b4db88eef96a17c7bb386926ab97a93d5b9c27b496a257db0dd2ad9aa9e3705cb46464982af1cd
6
+ metadata.gz: 1894f5dd1110f31614346d605307da9dc82e102d2423d8c49d7399473b7e94b344acb3adea419fff5db23f655a1d955bc96716ac3cdc4993da386260d79b5ac8
7
+ data.tar.gz: c7443d57d9b68d1c2cc462af7d69109f8793906c6e29bd8e93b50b17995d91c8a2b6783bb26216899b2b6421390b7dfc62b837686419b40d31d16274f63436b3
@@ -1,9 +1,12 @@
1
- ## 0.3
1
+ ## 0.1
2
2
 
3
3
  ### Breaking Updates
4
4
  * require HTTParty >= 0.13
5
5
  * require hashie >= 3.3.2
6
6
 
7
+ ### Features
8
+ * SSO urls helpers: `#sso_redirect_url`
9
+
7
10
  ### CHANGELOG
8
11
  * [DEV] Update rspec to v3
9
12
  * Add Travis and Coveralls integration
@@ -79,7 +79,7 @@ module Doyoubuzz
79
79
  def sign_api_params(params)
80
80
  ordered_params_values = params.sort.map{|k,v|v}
81
81
  concatenated_params_string = ordered_params_values.join
82
- concatenated_params_string << secret_key
82
+ concatenated_params_string << @api_secret
83
83
 
84
84
  hash = Digest::MD5.hexdigest(concatenated_params_string)
85
85
  params.merge(hash: hash)
@@ -1,3 +1,3 @@
1
1
  module Doyoubuzz
2
- VERSION = "0.1.0"
2
+ VERSION = "0.2.0"
3
3
  end
@@ -26,10 +26,6 @@ describe Doyoubuzz::Showcase do
26
26
  allow(Time).to receive(:now).and_return time
27
27
  end
28
28
 
29
- it "should compute a valid signature" do
30
- Doyoubuzz::Showcase.new('IuQSDLKQLSDK344590Li987', 'IuJyt42BnUiOlPM8FvB67tG').send(:compute_signature, {:apikey => 'IuQSDLKQLSDK344590Li987', :timestamp => timestamp}, 'IuJyt42BnUiOlPM8FvB67tG').should == '1dd33466d71275d06c9e17e18235c9f0'
31
- end
32
-
33
29
  it "should generate a valid signed api call" do
34
30
  allow(showcase).to receive(:process_response) # We only want to check the sent parameters here
35
31
  showcase.class.should_receive(:get).with("/path", {:query => {:foo => "bar", :zab => "baz", :apikey => "an_api_key", :timestamp => timestamp, :hash => "757b04a866f1d02f077471589341ff7a"}})
@@ -112,7 +108,7 @@ describe Doyoubuzz::Showcase do
112
108
  end
113
109
 
114
110
  it "should compute the right url" do
115
- showcase.sso_redirect_url(company_name, timestamp, sso_key, user_attributes).should == 'http://showcase.doyoubuzz.com/p/fr/my_company/sso?email=email%40host.tld&firstname=John&lastname=Doe&external_id=12345&timestamp=1370534334&hash=d6bbfc7ead803a3578887d6429d60047'
111
+ showcase.sso_redirect_url(company_name, timestamp, sso_key, user_attributes).should == 'http://showcase.doyoubuzz.com/p/fr/my_company/sso?email=email%40host.tld&firstname=John&lastname=Doe&external_id=12345&timestamp=1370534334&hash=94a0adad0a9bafdf511326cae3bf7626'
116
112
  end
117
113
 
118
114
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: doyoubuzz-showcase
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - David RUYER