snapcat 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/snapcat/response.rb +5 -3
- data/snapcat.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 02bc2e3e1b3a5384325e48b2af48c69f572f3f66
|
4
|
+
data.tar.gz: 4d654973822879e5111929c95dd67d7951b4f686
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5f150d9c8edf85e201cabeee00661c0a0047aeebba12bbb8ca6399571b5f6555ecccf47fba8e76c0d97978da49851202843ee932d872f8e2fc575ce0aa935580
|
7
|
+
data.tar.gz: 8407f0a8eb5fdd434841bee7be32e65fe951d0de21e087d5c0bc0c63959a6178ac2bedd200c21483a6a7e0904b6603375fd82258e0c754cc9105cd761c2f48fe
|
data/README.md
CHANGED
data/lib/snapcat/response.rb
CHANGED
@@ -24,9 +24,9 @@ module Snapcat
|
|
24
24
|
private
|
25
25
|
|
26
26
|
def format_recognized_content(content_type, content)
|
27
|
-
if content_type
|
27
|
+
if content_type.include? 'application/json'
|
28
28
|
JSON.parse(content, symbolize_names: true)
|
29
|
-
elsif content_type
|
29
|
+
elsif content_type.include? 'application/octet-stream'
|
30
30
|
{ media: Media.new(content) }
|
31
31
|
end
|
32
32
|
end
|
@@ -40,7 +40,9 @@ module Snapcat
|
|
40
40
|
end
|
41
41
|
|
42
42
|
def recognized_content_type?(content_type)
|
43
|
-
RECOGNIZED_CONTENT_TYPES.
|
43
|
+
RECOGNIZED_CONTENT_TYPES.detect do |recognized_content_type|
|
44
|
+
content_type.include? recognized_content_type
|
45
|
+
end
|
44
46
|
end
|
45
47
|
|
46
48
|
def response_empty?(response)
|
data/snapcat.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: snapcat
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Neal Kemp
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-01-
|
11
|
+
date: 2014-01-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httmultiparty
|