twitter-request-headers 0.0.10 → 0.0.11
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/.gitignore +1 -0
- data/README.md +8 -0
- data/lib/escape_uri_string.rb +7 -1
- data/lib/header.rb +5 -0
- data/lib/signature.rb +5 -0
- data/twitter-request-headers.gemspec +1 -1
- 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: c0095a9ef3721e90ceff67651b3144a478573e08
|
4
|
+
data.tar.gz: 395b48f6271732cca021fb789297421875018252
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2346565020978c2ca0a3fcc5c7ffdbe78684960ca25dcb9ff98e1b832f60779072e92889c3d2420976b6fecc5af608e18e8c7b9e862cff354ebd5222e15aa602
|
7
|
+
data.tar.gz: cd0b704a3e0201b6b325f2375f6ca85afdf79efa3efde4601ce4c0767a8e2cdb348401df92e1a3a9011734754434e24cceda08b41b0c9ecad0ee9cf4bf5c2e07
|
data/.gitignore
CHANGED
data/README.md
CHANGED
@@ -35,6 +35,14 @@ TwitterRequestHeaders.new(
|
|
35
35
|
).header
|
36
36
|
```
|
37
37
|
|
38
|
+
|
39
|
+
## Minitest
|
40
|
+
|
41
|
+
```sh
|
42
|
+
bundle install
|
43
|
+
rake test
|
44
|
+
```
|
45
|
+
|
38
46
|
## License
|
39
47
|
|
40
48
|
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
data/lib/escape_uri_string.rb
CHANGED
@@ -26,6 +26,12 @@ class EscapeUriString
|
|
26
26
|
private
|
27
27
|
|
28
28
|
def validate
|
29
|
+
# true/false can be converted to it's string form clearly
|
30
|
+
if @string.kind_of?(TrueClass) || @string.kind_of?(FalseClass)
|
31
|
+
return true
|
32
|
+
end
|
33
|
+
|
34
|
+
# we shouldn't deal with arrays, hashes and e.g.
|
29
35
|
unless @string.kind_of?(String)
|
30
36
|
fail ArgumentError, 'Attempt to escape non-string'
|
31
37
|
end
|
@@ -37,7 +43,7 @@ class EscapeUriString
|
|
37
43
|
|
38
44
|
def escape_uri(string)
|
39
45
|
begin
|
40
|
-
URI::escape(string, RESERVED_CHARACTERS)
|
46
|
+
URI::escape(string.to_s, RESERVED_CHARACTERS)
|
41
47
|
rescue ArgumentError
|
42
48
|
rescue
|
43
49
|
end
|
data/lib/header.rb
CHANGED
data/lib/signature.rb
CHANGED
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
6
|
spec.name = "twitter-request-headers"
|
7
|
-
spec.version = '0.0.
|
7
|
+
spec.version = '0.0.11'
|
8
8
|
spec.authors = ["Dmitrii Komaritckii"]
|
9
9
|
spec.email = ["lochnessathome@gmail.com"]
|
10
10
|
|