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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fcd1647933c5f7b71e9ec5601a7b024d4f5c4f66
4
- data.tar.gz: 67d94877e346e7949653d82ebb85e4f4b07f11e3
3
+ metadata.gz: 9db4d6e8cbb471389eac3e6dd348977a037b38d0
4
+ data.tar.gz: a8e73e33bfc15789bc93981bca93ee245b04e7f1
5
5
  SHA512:
6
- metadata.gz: cd36d87b6ec13a7795f36a1b686f0b1b3f73bb1a493c9880d504726cbc9b25c4242e787c1dd4b12abb911b0eda83a3b5d93583cb2556f45a14a63e4def18743b
7
- data.tar.gz: 07ebb10e1ef22b8262817e167eb889757a42eda88dbb28039974d8a5d1a3d10f8dcc79245213d178a787072193ba48ac210c6095080aa6e8acf34e0a86b7c562
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
@@ -3,7 +3,8 @@ module Tito
3
3
 
4
4
  extend Eventable::ClassMethods
5
5
 
6
- def self.resource_path
6
+ def self.resource_path(request_type = nil)
7
+ return "events" if request_type == :all
7
8
  nil
8
9
  end
9
10
 
data/lib/tito/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Tito
2
- VERSION = "0.2.5"
2
+ VERSION = "0.2.6"
3
3
  end
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.5
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-01 00:00:00.000000000 Z
11
+ date: 2017-04-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: http