tickethub 0.0.1 → 0.0.2
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/lib/tickethub.rb +6 -2
- data/lib/tickethub/resource.rb +6 -2
- data/lib/tickethub/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: e9b17caefcb50ec0f515e5353ed3b1e6b5482a9e
|
4
|
+
data.tar.gz: a7c2ffbe9f3bf76390cf4f91537938dd291e01c1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aae62d812c0fa09ccf4f8047dc61868b835358e94ee81fc4c7ab4e77b514b033d5a5dca54e8788249e89db8f5e3ec4975435d866310e0a3de4f12e98dbf817fb
|
7
|
+
data.tar.gz: d1bdccf887031cc948ec303fce72c2f08fb1a26a5d4982a2f38a4ae8a82e1963e8788758dc6638ea464838c0dfa2c2761c851fe77380ca04aa5e9da15ecb0238
|
data/lib/tickethub.rb
CHANGED
@@ -1,8 +1,12 @@
|
|
1
1
|
module Tickethub
|
2
2
|
|
3
|
+
def self.endpoint=(path)
|
4
|
+
@path = path
|
5
|
+
end
|
6
|
+
|
3
7
|
def self.endpoint
|
4
|
-
Endpoint.new 'https://api.tickethub.io
|
5
|
-
|
8
|
+
Endpoint.new @path || 'https://api.tickethub.io', format: :json,
|
9
|
+
headers: { 'Accept-Version' => 'v1', 'Accept' => 'application/json' }
|
6
10
|
end
|
7
11
|
|
8
12
|
require_relative 'tickethub/helpers'
|
data/lib/tickethub/resource.rb
CHANGED
@@ -9,7 +9,6 @@ module Tickethub
|
|
9
9
|
class Resource
|
10
10
|
|
11
11
|
class << self
|
12
|
-
attr_reader :endpoint
|
13
12
|
|
14
13
|
def all(params = {})
|
15
14
|
Tickethub::Collection.new @endpoint, self, params
|
@@ -33,7 +32,12 @@ module Tickethub
|
|
33
32
|
|
34
33
|
def path(value, options = {})
|
35
34
|
@singleton = options.delete(:singleton) || false
|
36
|
-
@
|
35
|
+
@path = value
|
36
|
+
@options = options
|
37
|
+
end
|
38
|
+
|
39
|
+
def endpoint
|
40
|
+
Tickethub.endpoint[@path, @options]
|
37
41
|
end
|
38
42
|
|
39
43
|
def scope(key, proc = -> (params = {}) { self.scope key, params })
|
data/lib/tickethub/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tickethub
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Oliver Morgan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-11-
|
11
|
+
date: 2014-11-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|