reddit-base 0.6.2 → 0.6.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/reddit/base/client.rb +13 -7
- data/lib/reddit/base/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e5434f47ac110ea444713ddca6eb0393cb75ff4e
|
4
|
+
data.tar.gz: 3844171cdc216c6c08f143202bc4430692977d96
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 64544c4706f902fcd802f1f885477cb3feea9e04b51883a077bdea1b2fc934c25539de1310da2945af8836db027f2e43da8a509f9f5f7729e2badafecfa4d5b9
|
7
|
+
data.tar.gz: d530557664951a96a1043ed46f749b7bca59bbbffe2c318b7c9f16dc98f87b565b4d8a2b9e649126fabd440ac94a5892e42d3c6a5a418e320104e1f8c216e944
|
data/lib/reddit/base/client.rb
CHANGED
@@ -17,7 +17,7 @@ module Reddit
|
|
17
17
|
nocache = options.delete(:nocache)
|
18
18
|
|
19
19
|
response = connection.delete(url, **options)
|
20
|
-
|
20
|
+
mashify response
|
21
21
|
end
|
22
22
|
|
23
23
|
def get(url, **options)
|
@@ -29,28 +29,34 @@ module Reddit
|
|
29
29
|
req.params = options
|
30
30
|
end
|
31
31
|
|
32
|
-
|
32
|
+
mashify response
|
33
33
|
end
|
34
34
|
|
35
35
|
def post(url, **options)
|
36
36
|
nocache = options.delete(:nocache)
|
37
37
|
|
38
38
|
response = connection.post(url, **options)
|
39
|
-
|
39
|
+
mashify response
|
40
40
|
end
|
41
41
|
|
42
42
|
def put(url, **options)
|
43
43
|
nocache = options.delete(:nocache)
|
44
44
|
|
45
45
|
response = connection.put(url, **options)
|
46
|
-
|
46
|
+
mashify response
|
47
47
|
end
|
48
48
|
|
49
|
-
def
|
49
|
+
def mashify(response)
|
50
50
|
if response.body.is_a? Array
|
51
|
-
response.body.map
|
51
|
+
response.body.map do |x|
|
52
|
+
output = Mash.new x
|
53
|
+
output.response = response
|
54
|
+
output
|
55
|
+
end
|
52
56
|
else
|
53
|
-
Mash.new response.body
|
57
|
+
output = Mash.new response.body
|
58
|
+
output.response = response
|
59
|
+
output
|
54
60
|
end
|
55
61
|
end
|
56
62
|
end
|
data/lib/reddit/base/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: reddit-base
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel O'Brien
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-05-
|
11
|
+
date: 2014-05-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -123,8 +123,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
123
123
|
version: '0'
|
124
124
|
requirements: []
|
125
125
|
rubyforge_project:
|
126
|
-
rubygems_version: 2.
|
126
|
+
rubygems_version: 2.2.2
|
127
127
|
signing_key:
|
128
128
|
specification_version: 4
|
129
129
|
summary: A minimal reddit API client for Ruby.
|
130
130
|
test_files: []
|
131
|
+
has_rdoc:
|