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 +4 -4
- data/CHANGELOG.md +4 -1
- data/lib/doyoubuzz/showcase.rb +1 -1
- data/lib/doyoubuzz/showcase/version.rb +1 -1
- data/spec/showcase_spec.rb +1 -5
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 70f12625b52caebe5f3d707d714cd2c0f95ea309
|
4
|
+
data.tar.gz: 80838e39ed9189bb9e2393d2f6756ae9bd024dc0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1894f5dd1110f31614346d605307da9dc82e102d2423d8c49d7399473b7e94b344acb3adea419fff5db23f655a1d955bc96716ac3cdc4993da386260d79b5ac8
|
7
|
+
data.tar.gz: c7443d57d9b68d1c2cc462af7d69109f8793906c6e29bd8e93b50b17995d91c8a2b6783bb26216899b2b6421390b7dfc62b837686419b40d31d16274f63436b3
|
data/CHANGELOG.md
CHANGED
data/lib/doyoubuzz/showcase.rb
CHANGED
@@ -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 <<
|
82
|
+
concatenated_params_string << @api_secret
|
83
83
|
|
84
84
|
hash = Digest::MD5.hexdigest(concatenated_params_string)
|
85
85
|
params.merge(hash: hash)
|
data/spec/showcase_spec.rb
CHANGED
@@ -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×tamp=1370534334&hash=
|
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×tamp=1370534334&hash=94a0adad0a9bafdf511326cae3bf7626'
|
116
112
|
end
|
117
113
|
|
118
114
|
end
|