addons-api 1.0.8 → 1.0.9
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/.github/dependabot.yml +16 -0
- data/.github/workflows/release.yml +5 -7
- data/.gitignore +1 -0
- data/.release-please-manifest.json +3 -0
- data/CHANGELOG.md +8 -0
- data/README.md +2 -2
- data/addons-api.gemspec +1 -1
- data/lib/addons-api/client.rb +83 -14
- data/lib/addons-api/version.rb +1 -1
- data/release-please-config.json +15 -0
- metadata +10 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 00a56abad0f35243e4cdb784c6cc2002aa08280fbaa578cf5f370389abbc37d1
|
4
|
+
data.tar.gz: 49efbe2bca086b8b5a41904a77c60cb441f55800b25e1fe286757c1667649464
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c91634a84c28abd7484a99073319c2db23e866e6ae2c7c67c9745461f260c0b4e3228848429c4ac74605c20cbcb493c7cd7a05c09fcd3c102595fb3bb68d99ea
|
7
|
+
data.tar.gz: 040e96fda608dd0fbfb0a5802051001cac96e0a1203bc512e066ff8c8f21db582aec8878656ec7a56b59d683f3526548a8d29ccbe43a179331797fd16f5c1cb8
|
@@ -0,0 +1,16 @@
|
|
1
|
+
version: 2
|
2
|
+
updates:
|
3
|
+
- package-ecosystem: "bundler"
|
4
|
+
versioning-strategy: increase
|
5
|
+
directory: "/"
|
6
|
+
schedule:
|
7
|
+
interval: "monthly"
|
8
|
+
labels:
|
9
|
+
- "dependencies"
|
10
|
+
open-pull-requests-limit: 100
|
11
|
+
pull-request-branch-name:
|
12
|
+
separator: "-"
|
13
|
+
ignore:
|
14
|
+
- dependency-name: "fs-extra"
|
15
|
+
- dependency-name: "*"
|
16
|
+
update-types: ["version-update:semver-major"]
|
@@ -13,23 +13,21 @@ jobs:
|
|
13
13
|
pull-requests: write
|
14
14
|
|
15
15
|
steps:
|
16
|
-
- uses: google-github-actions/release-please-action@
|
16
|
+
- uses: google-github-actions/release-please-action@v4
|
17
17
|
id: release
|
18
18
|
with:
|
19
|
-
|
20
|
-
|
21
|
-
bump-minor-pre-major: true
|
22
|
-
version-file: "lib/addons-api/version.rb"
|
19
|
+
token: ${{secrets.RELEASE_PLEASE_GITHUB_TOKEN}}
|
20
|
+
config-file: release-please-config.json
|
23
21
|
|
24
22
|
# Checkout code if release was created
|
25
23
|
- uses: actions/checkout@v3
|
26
24
|
if: ${{ steps.release.outputs.release_created }}
|
27
25
|
|
28
26
|
# Set up Ruby if a release was created
|
29
|
-
- name: Set up Ruby 3.
|
27
|
+
- name: Set up Ruby 3.2
|
30
28
|
uses: ruby/setup-ruby@v1
|
31
29
|
with:
|
32
|
-
ruby-version: 3.
|
30
|
+
ruby-version: 3.2
|
33
31
|
if: ${{ steps.release.outputs.release_created }}
|
34
32
|
|
35
33
|
# Bundle install if a release was created
|
data/.gitignore
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,13 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## [1.0.9](https://github.com/addonsio/addons-ruby/compare/addons-api-v1.0.8...addons-api/v1.0.9) (2024-02-08)
|
4
|
+
|
5
|
+
|
6
|
+
### Bug Fixes
|
7
|
+
|
8
|
+
* initial commit ([46c3542](https://github.com/addonsio/addons-ruby/commit/46c3542a2b9dc6ab87490b63aa790a159e37191a))
|
9
|
+
* Publish to RubyGems with GH actions ([df667cc](https://github.com/addonsio/addons-ruby/commit/df667ccbbaab96c80bbe8ddf59ee03a79a350c43))
|
10
|
+
|
3
11
|
## [1.0.8](https://github.com/addonsio/ruby-sdk/compare/v1.0.7...v1.0.8) (2023-04-03)
|
4
12
|
|
5
13
|
|
data/README.md
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# Addons.io API Ruby SDK
|
2
2
|
|
3
|
-
Ruby HTTP client for the Addons API.
|
3
|
+
Ruby HTTP client for the Addons.io API.
|
4
4
|
|
5
5
|
## Similarity to other PaaS
|
6
6
|
|
7
|
-
- The [Heroku](https://heroku.com) API.
|
7
|
+
- The [Heroku](https://heroku.com) API. Addons will find that they need little modifications to their code when switching to the Addons.io platform.
|
data/addons-api.gemspec
CHANGED
@@ -12,7 +12,7 @@ Gem::Specification.new do |spec|
|
|
12
12
|
spec.email = ['moty@crazyantlabs.com']
|
13
13
|
spec.description = 'Ruby HTTP client for the Addons.io API.'
|
14
14
|
spec.summary = 'Ruby HTTP client for the Addons.io API. Learn more on https://addons.io'
|
15
|
-
spec.homepage = 'https://github.com/addonsio/ruby
|
15
|
+
spec.homepage = 'https://github.com/addonsio/addons-ruby'
|
16
16
|
spec.license = 'MIT'
|
17
17
|
|
18
18
|
spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
|
data/lib/addons-api/client.rb
CHANGED
@@ -100,13 +100,18 @@ module AddonsApi
|
|
100
100
|
@oauth_resource ||= OAuth.new(self)
|
101
101
|
end
|
102
102
|
|
103
|
+
# AddonService resource
|
104
|
+
def addon_service
|
105
|
+
@addon_service_resource ||= AddonService.new(self)
|
106
|
+
end
|
107
|
+
|
103
108
|
# Team resource
|
104
109
|
def team
|
105
110
|
@team_resource ||= Team.new(self)
|
106
111
|
end
|
107
112
|
end
|
108
113
|
|
109
|
-
#
|
114
|
+
# Addon services represent addons that may be provisioned for apps.
|
110
115
|
class OAuth
|
111
116
|
BASE_PATH = "oauth"
|
112
117
|
|
@@ -148,6 +153,58 @@ module AddonsApi
|
|
148
153
|
end
|
149
154
|
end
|
150
155
|
|
156
|
+
class AddonService
|
157
|
+
BASE_PATH = "addon-services"
|
158
|
+
|
159
|
+
def initialize(client)
|
160
|
+
@client = client
|
161
|
+
end
|
162
|
+
|
163
|
+
def list()
|
164
|
+
@client.request(:get, "#{BASE_PATH}")
|
165
|
+
end
|
166
|
+
|
167
|
+
def info(addon_service_id)
|
168
|
+
@client.request(:get, "#{BASE_PATH}/#{addon_service_id}")
|
169
|
+
end
|
170
|
+
|
171
|
+
def plan
|
172
|
+
@plan_resource ||= AddonServicePlan.new(@client)
|
173
|
+
end
|
174
|
+
|
175
|
+
def field
|
176
|
+
@field_resource ||= AddonServiceField.new(@client)
|
177
|
+
end
|
178
|
+
|
179
|
+
class AddonServicePlan
|
180
|
+
def initialize(client)
|
181
|
+
@client = client
|
182
|
+
end
|
183
|
+
|
184
|
+
def list(addon_service_id)
|
185
|
+
@client.request(:get, "#{BASE_PATH}/#{addon_service_id}/plans")
|
186
|
+
end
|
187
|
+
|
188
|
+
def info(addon_service_id, addon_service_plan_id)
|
189
|
+
@client.request(:get, "#{BASE_PATH}/#{addon_service_id}/plans/#{addon_service_plan_id}")
|
190
|
+
end
|
191
|
+
end
|
192
|
+
|
193
|
+
class AddonServiceField
|
194
|
+
def initialize(client)
|
195
|
+
@client = client
|
196
|
+
end
|
197
|
+
|
198
|
+
def list(addon_service_id)
|
199
|
+
@client.request(:get, "#{BASE_PATH}/#{addon_service_id}/fields")
|
200
|
+
end
|
201
|
+
|
202
|
+
def info(addon_service_id, addon_service_field_id)
|
203
|
+
@client.request(:get, "#{BASE_PATH}/#{addon_service_id}/fields/#{addon_service_plan_id}")
|
204
|
+
end
|
205
|
+
end
|
206
|
+
end
|
207
|
+
|
151
208
|
class Team
|
152
209
|
BASE_PATH = "teams"
|
153
210
|
|
@@ -167,7 +224,7 @@ module AddonsApi
|
|
167
224
|
@member_resource ||= Member.new(@client)
|
168
225
|
end
|
169
226
|
|
170
|
-
#
|
227
|
+
# Addon resource
|
171
228
|
def addon
|
172
229
|
@addon_resource ||= Addon.new(@client)
|
173
230
|
end
|
@@ -184,7 +241,7 @@ module AddonsApi
|
|
184
241
|
end
|
185
242
|
end
|
186
243
|
|
187
|
-
#
|
244
|
+
# Addon
|
188
245
|
class Addon
|
189
246
|
def initialize(client)
|
190
247
|
@client = client
|
@@ -206,56 +263,68 @@ module AddonsApi
|
|
206
263
|
@client.request(:get, "", base_url: callback_url)
|
207
264
|
end
|
208
265
|
|
209
|
-
|
266
|
+
def create(team_id, body = {})
|
267
|
+
@client.request(:post, "#{BASE_PATH}/#{team_id}/addons", body: body)
|
268
|
+
end
|
269
|
+
|
270
|
+
def delete(team_id, addon_id)
|
271
|
+
@client.request(:delete, "#{BASE_PATH}/#{team_id}/addons/#{addon_id}")
|
272
|
+
end
|
273
|
+
|
274
|
+
def update(team_id, addon_id, body = {})
|
275
|
+
@client.request(:patch, "#{BASE_PATH}/#{team_id}/addons/#{addon_id}", body: body)
|
276
|
+
end
|
277
|
+
|
278
|
+
# Configuration of an Addon
|
210
279
|
class Config
|
211
280
|
def initialize(client)
|
212
281
|
@client = client
|
213
282
|
end
|
214
283
|
|
215
|
-
# Get the configuration of an
|
284
|
+
# Get the configuration of an addon.
|
216
285
|
def list(team_id, addon_id)
|
217
286
|
@client.request(:get, "#{BASE_PATH}/#{team_id}/addons/#{addon_id}/config")
|
218
287
|
end
|
219
288
|
|
220
|
-
# Get the configuration of an
|
289
|
+
# Get the configuration of an addon with callback URL.
|
221
290
|
def list_with_callback_url(callback_url)
|
222
291
|
@client.request(:get, "config", base_url: callback_url)
|
223
292
|
end
|
224
293
|
|
225
|
-
# Update the configuration of an
|
294
|
+
# Update the configuration of an addon.
|
226
295
|
def update(team_id, addon_id, body = {})
|
227
296
|
@client.request(:patch, "#{BASE_PATH}/#{team_id}/addons/#{addon_id}/config", body: body)
|
228
297
|
end
|
229
298
|
|
230
|
-
# Update the configuration of an
|
299
|
+
# Update the configuration of an addon with callback URL.
|
231
300
|
def update_with_callback_url(callback_url, body = {})
|
232
301
|
@client.request(:patch, "config", base_url: callback_url, body: body)
|
233
302
|
end
|
234
303
|
end
|
235
304
|
|
236
|
-
#
|
237
|
-
# They allow
|
305
|
+
# Addon Actions are lifecycle operations for addon provisioning and deprovisioning.
|
306
|
+
# They allow addon providers to (de)provision addons in the background and then report back when (de)provisioning is complete.
|
238
307
|
class Action
|
239
308
|
def initialize(client)
|
240
309
|
@client = client
|
241
310
|
end
|
242
311
|
|
243
|
-
# Mark an
|
312
|
+
# Mark an addon as provisioned.
|
244
313
|
def provision(team_id, addon_id)
|
245
314
|
@client.request(:post, "#{BASE_PATH}/#{team_id}/addons/#{addon_id}/actions/provision")
|
246
315
|
end
|
247
316
|
|
248
|
-
# Mark an
|
317
|
+
# Mark an addon as provisioned with callback URL.
|
249
318
|
def provision_with_callback_url(callback_url)
|
250
319
|
@client.request(:post, "actions/provision", base_url: callback_url)
|
251
320
|
end
|
252
321
|
|
253
|
-
# Mark an
|
322
|
+
# Mark an addon as deprovisioned.
|
254
323
|
def deprovision(team_id, addon_id)
|
255
324
|
@client.request(:post, "#{BASE_PATH}/#{team_id}/addons/#{addon_id}/actions/deprovision")
|
256
325
|
end
|
257
326
|
|
258
|
-
# Mark an
|
327
|
+
# Mark an addon as deprovisioned with callback URL.
|
259
328
|
def deprovision_with_callback_url(callback_url)
|
260
329
|
@client.request(:post, "actions/deprovision", base_url: callback_url)
|
261
330
|
end
|
data/lib/addons-api/version.rb
CHANGED
@@ -0,0 +1,15 @@
|
|
1
|
+
{
|
2
|
+
"packages": {
|
3
|
+
".": {
|
4
|
+
"package-name": "addons-api",
|
5
|
+
"changelog-path": "CHANGELOG.md",
|
6
|
+
"release-type": "ruby",
|
7
|
+
"bump-minor-pre-major": true,
|
8
|
+
"bump-patch-for-minor-pre-major": false,
|
9
|
+
"draft": false,
|
10
|
+
"prerelease": false,
|
11
|
+
"version-file": "lib/addons-api/version.rb"
|
12
|
+
}
|
13
|
+
},
|
14
|
+
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json"
|
15
|
+
}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: addons-api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- motymichaely
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-02-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -129,8 +129,10 @@ executables: []
|
|
129
129
|
extensions: []
|
130
130
|
extra_rdoc_files: []
|
131
131
|
files:
|
132
|
+
- ".github/dependabot.yml"
|
132
133
|
- ".github/workflows/release.yml"
|
133
134
|
- ".gitignore"
|
135
|
+
- ".release-please-manifest.json"
|
134
136
|
- CHANGELOG.md
|
135
137
|
- Gemfile
|
136
138
|
- LICENSE
|
@@ -139,11 +141,12 @@ files:
|
|
139
141
|
- lib/addons-api.rb
|
140
142
|
- lib/addons-api/client.rb
|
141
143
|
- lib/addons-api/version.rb
|
142
|
-
|
144
|
+
- release-please-config.json
|
145
|
+
homepage: https://github.com/addonsio/addons-ruby
|
143
146
|
licenses:
|
144
147
|
- MIT
|
145
148
|
metadata: {}
|
146
|
-
post_install_message:
|
149
|
+
post_install_message:
|
147
150
|
rdoc_options: []
|
148
151
|
require_paths:
|
149
152
|
- lib
|
@@ -158,8 +161,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
158
161
|
- !ruby/object:Gem::Version
|
159
162
|
version: '0'
|
160
163
|
requirements: []
|
161
|
-
rubygems_version: 3.
|
162
|
-
signing_key:
|
164
|
+
rubygems_version: 3.4.19
|
165
|
+
signing_key:
|
163
166
|
specification_version: 4
|
164
167
|
summary: Ruby HTTP client for the Addons.io API. Learn more on https://addons.io
|
165
168
|
test_files: []
|