request_token_generator 1.0.1 → 1.0.2
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/lib/request_token_generator.rb +6 -16
- 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: e58e00b0136e5270dfc7b4b1cfebeea81c9ec3e3
|
4
|
+
data.tar.gz: 0599bb44d79d71601ac39b4b371f46719409189f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1c13033b6d0519eaadac06bcae06a2b3a5691b7b70aa1cd2a7f8fb44b283ad701f8ea0d5c55812ca4dfc3696172d2c5617feb48e494c45960f7cb1ce1d5e305c
|
7
|
+
data.tar.gz: e578fb97b84340bb0b4bf91ecdda01dff0b2266de3d9827e5457f5284cd9b7c1d9c4fb957bfb2aa4677950e9d0db1b2947027b83f9665a24c1aec039b33999c6
|
@@ -11,29 +11,19 @@ class RequestTokenGenerator
|
|
11
11
|
@concat_symbol = '+'
|
12
12
|
# The key:value symbol
|
13
13
|
@kv_symbol = ':'
|
14
|
-
|
15
|
-
# Set secret key
|
14
|
+
|
15
|
+
# Set secret key
|
16
16
|
#
|
17
|
-
#
|
18
|
-
#
|
19
|
-
# => "somesecretkey123"
|
20
|
-
#
|
21
|
-
# Arguments:
|
22
|
-
# secret_key: (String)
|
23
|
-
|
17
|
+
# @param secret_key [String] the secret key string.
|
18
|
+
# @return nil
|
24
19
|
def self.set_secret(secret_key)
|
25
20
|
@secret_key = secret_key
|
26
21
|
end
|
27
22
|
|
28
23
|
# Generates token and appends to current hash.
|
29
24
|
#
|
30
|
-
#
|
31
|
-
#
|
32
|
-
# => {:id=>1, :name=>"Jay M", "request_token"=>"ba0028e0502278aa4360f9bf02597dd46205b5b3"}
|
33
|
-
#
|
34
|
-
# Arguments:
|
35
|
-
# hash: (Hash)
|
36
|
-
|
25
|
+
# @param hash [Hash] the hash with request parameters.
|
26
|
+
# @return hash [Hash] the hash parameter with added token string.
|
37
27
|
def self.generate(hash = {})
|
38
28
|
|
39
29
|
hash.each { |key, value|
|