tacklebox 0.1.0 → 0.1.1

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
  SHA256:
3
- metadata.gz: ff64434f68d2d5c10f1c8bf32082d9981fa2e3937469417e91c969319066d7b7
4
- data.tar.gz: 0c0170bf3a73b529c63f5aa3949320d40dbc7b08f4abed2f63fc632403727304
3
+ metadata.gz: '0830dd71c9f6e169e746eb6f5be84a3f106146d0b73916099d7d0078db7aa5bd'
4
+ data.tar.gz: f322bd5f41986a62f9003e2b022b9d55f8f52e99f0d7da1f61a34566f9382f44
5
5
  SHA512:
6
- metadata.gz: 488e0d45a5381be440bf4d6f3661f804647f3cfa9b07d8a417e2e4f07ce055ea902756e650c1c7d26d89b141d9e847d8e2fc6a3f56aa93cd72ef96fad82c2f6f
7
- data.tar.gz: 2bb7448e77dffd5ada23182ecc13ec0339a767cf96a9e776c1e7cf756b9451f5b7e6400ede8a2ef26c82a5d2163e1a63c19f4ca8f844fbd05b323b4f53bf5bc5
6
+ metadata.gz: 8d49e4064fa68c9d17061b8313778281212d9fb3a5baa2f611d3bdb99c54d5a43f8a8c2f7bbfa3f4d1a36754188929709fb497db92db1aa78ffe7ddc257821e9
7
+ data.tar.gz: 2f6befa174227691f2de508071412526ec4ce56ca6e411a1f585e5efeb9c898f9ca18ce4a90117dc53e0340b0ea4fecf0042a8d5e7a46642a4365c4b0c7cd3f9
data/History.txt ADDED
@@ -0,0 +1,8 @@
1
+ === 0.1.1 / 2021-05-22
2
+
3
+ * Deleted extra slash on base URL.
4
+ * Deleted stage parameter.
5
+
6
+ === 0.1.0 / 2021-05-20
7
+
8
+ * Initial public release
data/lib/tacklebox.rb CHANGED
@@ -12,7 +12,6 @@ class Tacklebox
12
12
  config = {
13
13
  api_key: api_key,
14
14
  base_url: base_url,
15
- stage: 'v1'
16
15
  }
17
16
 
18
17
  self.service = Service.new(config)
@@ -5,11 +5,10 @@ require_relative "http_client"
5
5
  class EventApi
6
6
  include Validation
7
7
 
8
- attr_accessor :base_url, :http_client, :stage
8
+ attr_accessor :base_url, :http_client
9
9
 
10
10
  def initialize(config)
11
11
  self.base_url = config[:base_url]
12
- self.stage = config[:stage]
13
12
  self.http_client = HttpClient.new(config[:api_key])
14
13
  end
15
14
 
@@ -28,7 +27,7 @@ class EventApi
28
27
  )
29
28
  end
30
29
 
31
- path = "/#{@stage}/services/#{service_id}/users/#{user_id}/events"
30
+ path = "services/#{service_id}/users/#{user_id}/events"
32
31
  request = HttpRequest.new("GET", @base_url, path)
33
32
  @http_client.send(request)
34
33
  end
@@ -55,7 +54,7 @@ class EventApi
55
54
  )
56
55
  end
57
56
 
58
- path = "/#{@stage}/services/#{service_id}/users/#{user_id}/events"
57
+ path = "services/#{service_id}/users/#{user_id}/events"
59
58
  request = HttpRequest.new("POST", @base_url, path, event_data)
60
59
  @http_client.send(request)
61
60
  end
@@ -82,7 +81,7 @@ class EventApi
82
81
  )
83
82
  end
84
83
 
85
- path = "/#{@stage}/services/#{service_id}/users/#{user_id}/events/#{event_id}"
84
+ path = "services/#{service_id}/users/#{user_id}/events/#{event_id}"
86
85
  request = HttpRequest.new("GET", @base_url, path)
87
86
  @http_client.send(request)
88
87
  end
@@ -5,11 +5,10 @@ require_relative "http_client"
5
5
  class EventTypeApi
6
6
  include Validation
7
7
 
8
- attr_accessor :base_url, :http_client, :stage
8
+ attr_accessor :base_url, :http_client
9
9
 
10
10
  def initialize(config)
11
11
  self.base_url = config[:base_url]
12
- self.stage = config[:stage]
13
12
  self.http_client = HttpClient.new(config[:api_key])
14
13
  end
15
14
 
@@ -21,7 +20,7 @@ class EventTypeApi
21
20
  )
22
21
  end
23
22
 
24
- path = "/#{@stage}/services/#{service_id}/event_types"
23
+ path = "services/#{service_id}/event_types"
25
24
  request = HttpRequest.new("GET", @base_url, path)
26
25
  @http_client.send(request)
27
26
  end
@@ -39,7 +38,7 @@ class EventTypeApi
39
38
  )
40
39
  end
41
40
 
42
- path = "/#{@stage}/services/#{service_id}/event_types"
41
+ path = "services/#{service_id}/event_types"
43
42
  request = HttpRequest.new("POST", @base_url, path, event_type_data)
44
43
  @http_client.send(request)
45
44
  end
@@ -57,7 +56,7 @@ class EventTypeApi
57
56
  )
58
57
  end
59
58
 
60
- path = "/#{service_id}/event_types/#{event_type_id}"
59
+ path = "services/#{service_id}/event_types/#{event_type_id}"
61
60
  request = HttpRequest.new("DELETE", @base_url, path)
62
61
  @http_client.send(request)
63
62
  end
@@ -75,7 +74,7 @@ class EventTypeApi
75
74
  )
76
75
  end
77
76
 
78
- path = "/#{@stage}/services/#{service_id}/event_types/#{event_type_id}"
77
+ path = "services/#{service_id}/event_types/#{event_type_id}"
79
78
  request = HttpRequest.new("GET", @base_url, path)
80
79
  @http_client.send(request)
81
80
  end
@@ -5,11 +5,10 @@ require_relative "http_client"
5
5
  class MessageApi
6
6
  include Validation
7
7
 
8
- attr_accessor :base_url, :http_client, :stage
8
+ attr_accessor :base_url, :http_client
9
9
 
10
10
  def initialize(config)
11
11
  self.base_url = config[:base_url]
12
- self.stage = config[:stage]
13
12
  self.http_client = HttpClient.new(config[:api_key])
14
13
  end
15
14
 
@@ -27,7 +26,7 @@ class MessageApi
27
26
  )
28
27
  end
29
28
 
30
- path = "/#{@stage}/services/#{service_id}/users/#{user_id}/messages"
29
+ path = "services/#{service_id}/users/#{user_id}/messages"
31
30
  request = HttpRequest.new("GET", @base_url, path)
32
31
  @http_client.send(request)
33
32
  end
@@ -52,7 +51,7 @@ class MessageApi
52
51
  )
53
52
  end
54
53
 
55
- path = "/#{@stage}/services/#{service_id}/users/#{user_id}/messages/#{message_id}/resend"
54
+ path = "services/#{service_id}/users/#{user_id}/messages/#{message_id}/resend"
56
55
  request = HttpRequest.new("POST", @base_url, path)
57
56
  @http_client.send(request)
58
57
  end
@@ -79,7 +78,7 @@ class MessageApi
79
78
  )
80
79
  end
81
80
 
82
- path = "/#{@stage}/services/#{service_id}/users/#{user_id}/messages/#{message_id}"
81
+ path = "services/#{service_id}/users/#{user_id}/messages/#{message_id}"
83
82
  request = HttpRequest.new("GET", @base_url, path)
84
83
  @http_client.send(request)
85
84
  end
@@ -5,16 +5,15 @@ require_relative "http_client"
5
5
  class ServiceApi
6
6
  include Validation
7
7
 
8
- attr_accessor :base_url, :http_client, :stage
8
+ attr_accessor :base_url, :http_client
9
9
 
10
10
  def initialize(config)
11
11
  self.base_url = config[:base_url]
12
- self.stage = config[:stage]
13
12
  self.http_client = HttpClient.new(config[:api_key])
14
13
  end
15
14
 
16
15
  def list_services
17
- path = "/#{@stage}/services"
16
+ path = "services"
18
17
  request = HttpRequest.new("GET", @base_url, path)
19
18
  self.http_client.send(request)
20
19
  end
@@ -27,7 +26,7 @@ class ServiceApi
27
26
  )
28
27
  end
29
28
 
30
- path = "/#{@stage}/services"
29
+ path = "services"
31
30
  request = HttpRequest.new("POST", @base_url, path, service_data)
32
31
  self.http_client.send(request)
33
32
  end
@@ -40,8 +39,8 @@ class ServiceApi
40
39
  )
41
40
  end
42
41
 
43
- url = "#{self.base_url}/#{service_id}"
44
- request = HttpRequest.new("DELETE", url)
42
+ path = "services/#{service_id}"
43
+ request = HttpRequest.new("DELETE", @base_url, path)
45
44
  self.http_client.send(request)
46
45
  end
47
46
 
@@ -53,7 +52,7 @@ class ServiceApi
53
52
  )
54
53
  end
55
54
 
56
- path = "/#{@stage}/services/#{service_id}"
55
+ path = "services/#{service_id}"
57
56
  request = HttpRequest.new("GET", @base_url, path)
58
57
  self.http_client.send(request)
59
58
  end
@@ -5,11 +5,10 @@ require_relative "http_client"
5
5
  class SubscriptionApi
6
6
  include Validation
7
7
 
8
- attr_accessor :base_url, :http_client, :stage
8
+ attr_accessor :base_url, :http_client
9
9
 
10
10
  def initialize(config)
11
11
  self.base_url = config[:base_url]
12
- self.stage = config[:stage]
13
12
  self.http_client = HttpClient.new(config[:api_key])
14
13
  end
15
14
 
@@ -27,7 +26,7 @@ class SubscriptionApi
27
26
  )
28
27
  end
29
28
 
30
- path = "/#{@stage}/services/#{service_id}/users/#{user_id}/subscriptions"
29
+ path = "services/#{service_id}/users/#{user_id}/subscriptions"
31
30
  request = HttpRequest.new("GET", @base_url, path)
32
31
  @http_client.send(request)
33
32
  end
@@ -52,7 +51,7 @@ class SubscriptionApi
52
51
  )
53
52
  end
54
53
 
55
- path = "/#{@stage}/services/#{service_id}/users/#{user_id}/subscriptions"
54
+ path = "services/#{service_id}/users/#{user_id}/subscriptions"
56
55
  request = HttpRequest.new("POST", @base_url, path, subscription_data)
57
56
  @http_client.send(request)
58
57
  end
@@ -77,7 +76,7 @@ class SubscriptionApi
77
76
  )
78
77
  end
79
78
 
80
- path = "/#{@stage}/services/#{service_id}/users/#{user_id}/subscriptions/#{subscription_id}"
79
+ path = "services/#{service_id}/users/#{user_id}/subscriptions/#{subscription_id}"
81
80
  request = HttpRequest.new("GET", @base_url, path)
82
81
  @http_client.send(request)
83
82
  end
@@ -102,7 +101,7 @@ class SubscriptionApi
102
101
  )
103
102
  end
104
103
 
105
- path = "/#{@stage}/services/#{service_id}/users/#{user_id}/subscriptions/#{subscription_id}"
104
+ path = "services/#{service_id}/users/#{user_id}/subscriptions/#{subscription_id}"
106
105
  request = HttpRequest.new("DELETE", @base_url, path)
107
106
  @http_client.send(request)
108
107
  end
@@ -5,11 +5,10 @@ require_relative "http_client"
5
5
  class UserApi
6
6
  include Validation
7
7
 
8
- attr_accessor :base_url, :http_client, :stage
8
+ attr_accessor :base_url, :http_client
9
9
 
10
10
  def initialize(config)
11
11
  self.base_url = config[:base_url]
12
- self.stage = config[:stage]
13
12
  self.http_client = HttpClient.new(config[:api_key])
14
13
  end
15
14
 
@@ -28,7 +27,7 @@ class UserApi
28
27
  )
29
28
  end
30
29
 
31
- path = "/#{@stage}/services/#{service_id}/users"
30
+ path = "services/#{service_id}/users"
32
31
  request = HttpRequest.new("POST", @base_url, path, user_data)
33
32
  @http_client.send(request)
34
33
  end
@@ -48,7 +47,7 @@ class UserApi
48
47
  )
49
48
  end
50
49
 
51
- path = "/#{@stage}/services/#{service_id}/users/#{user_id}"
50
+ path = "services/#{service_id}/users/#{user_id}"
52
51
  request = HttpRequest.new("GET", @base_url, path)
53
52
  @http_client.send(request)
54
53
  end
@@ -68,7 +67,7 @@ class UserApi
68
67
  )
69
68
  end
70
69
 
71
- path = "/#{@stage}/services/#{service_id}/users/#{user_id}"
70
+ path = "services/#{service_id}/users/#{user_id}"
72
71
  request = HttpRequest.new("DELETE", @base_url, path)
73
72
  @http_client.send(request)
74
73
  end
@@ -81,7 +80,7 @@ class UserApi
81
80
  )
82
81
  end
83
82
 
84
- path = "/#{@stage}/services/#{service_id}/users"
83
+ path = "services/#{service_id}/users"
85
84
  request = HttpRequest.new("GET", @base_url, path)
86
85
  @http_client.send(request)
87
86
  end
@@ -1,3 +1,3 @@
1
1
  module Tacklebox
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tacklebox
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Juan Palma
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: exe
13
13
  cert_chain: []
14
- date: 2021-05-21 00:00:00.000000000 Z
14
+ date: 2021-05-22 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: faraday
@@ -60,6 +60,7 @@ extensions: []
60
60
  extra_rdoc_files: []
61
61
  files:
62
62
  - Gemfile
63
+ - History.txt
63
64
  - LICENSE.txt
64
65
  - README.md
65
66
  - Rakefile
@@ -82,6 +83,7 @@ files:
82
83
  - lib/tacklebox/components/subscription.rb
83
84
  - lib/tacklebox/components/user.rb
84
85
  - lib/tacklebox/version.rb
86
+ - pkg/tacklebox-0.1.0.gem
85
87
  - tacklebox.gemspec
86
88
  homepage: https://github.com/tacklebox-webhooks/ruby
87
89
  licenses:
@@ -104,7 +106,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
104
106
  - !ruby/object:Gem::Version
105
107
  version: '0'
106
108
  requirements: []
107
- rubygems_version: 3.1.2
109
+ rubygems_version: 3.2.17
108
110
  signing_key:
109
111
  specification_version: 4
110
112
  summary: Tacklebox