tito 0.2.5 → 0.2.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/tito/base.rb +3 -3
- data/lib/tito/event.rb +2 -1
- data/lib/tito/version.rb +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: 9db4d6e8cbb471389eac3e6dd348977a037b38d0
|
4
|
+
data.tar.gz: a8e73e33bfc15789bc93981bca93ee245b04e7f1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 74a19740ce41bb220b36d535d9c22c851e935a711917273756bec8dc74ec3556aa6e060579b0c8522439fb84d0df4d31cb49e1fc6122d618351440ac6d7ab1a1
|
7
|
+
data.tar.gz: 491ab5a67536d45fd9c693492806fa0af7c939e09b1a1da9d49dc06dcb8dc6b1c6e545f527e6c58a1f8718b65848b188285557f6bb3cd978895ee2b77147828e
|
data/lib/tito/base.rb
CHANGED
@@ -54,7 +54,7 @@ module Tito
|
|
54
54
|
@resource_name ||= underscore_class_name.split("/").last
|
55
55
|
end
|
56
56
|
|
57
|
-
def self.resource_path
|
57
|
+
def self.resource_path(*args)
|
58
58
|
@resource_path ||= "#{resource_name}s"
|
59
59
|
end
|
60
60
|
|
@@ -73,7 +73,7 @@ module Tito
|
|
73
73
|
end
|
74
74
|
|
75
75
|
def self.all_path(path_prefix: nil)
|
76
|
-
[path_prefix, resource_path].compact.join("/")
|
76
|
+
[path_prefix, resource_path(:all)].compact.join("/")
|
77
77
|
end
|
78
78
|
|
79
79
|
def self.all_url(path_prefix: nil)
|
@@ -84,7 +84,7 @@ module Tito
|
|
84
84
|
api_key = params.delete(:api_key)
|
85
85
|
path_prefix = params.delete(:path_prefix)
|
86
86
|
response = http(api_key: api_key).get(all_url(path_prefix: path_prefix), params: params, ssl_context: ssl_context).parse
|
87
|
-
all_records = response[self.resource_path]
|
87
|
+
all_records = response[self.resource_path(:all)]
|
88
88
|
meta = response["meta"]
|
89
89
|
out = ResponseArray.new(all_records.collect do |record|
|
90
90
|
new record
|
data/lib/tito/event.rb
CHANGED
data/lib/tito/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tito
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Paul Campbell
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-04-
|
11
|
+
date: 2017-04-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: http
|