recurly 3.3.0 → 3.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.bumpversion.cfg +5 -1
- data/.github/ISSUE_TEMPLATE/bug-report.md +1 -1
- data/.github/workflows/docs.yml +28 -0
- data/.github_changelog_generator +8 -0
- data/.travis.yml +1 -0
- data/CHANGELOG.md +209 -0
- data/GETTING_STARTED.md +61 -1
- data/README.md +1 -1
- data/lib/data/ca-certificates.crt +3464 -29
- data/lib/recurly.rb +1 -0
- data/lib/recurly/client.rb +215 -111
- data/lib/recurly/client/operations.rb +263 -0
- data/lib/recurly/connection_pool.rb +40 -0
- data/lib/recurly/errors.rb +30 -0
- data/lib/recurly/errors/network_errors.rb +2 -0
- data/lib/recurly/http.rb +13 -8
- data/lib/recurly/pager.rb +31 -12
- data/lib/recurly/requests/add_on_create.rb +22 -6
- data/lib/recurly/requests/add_on_update.rb +13 -1
- data/lib/recurly/requests/billing_info_create.rb +21 -1
- data/lib/recurly/requests/external_transaction.rb +26 -0
- data/lib/recurly/requests/invoice_refund.rb +2 -2
- data/lib/recurly/requests/line_item_create.rb +2 -2
- data/lib/recurly/requests/plan_create.rb +8 -0
- data/lib/recurly/requests/plan_update.rb +8 -0
- data/lib/recurly/requests/subscription_add_on_create.rb +9 -1
- data/lib/recurly/requests/subscription_add_on_tier.rb +18 -0
- data/lib/recurly/requests/subscription_add_on_update.rb +10 -2
- data/lib/recurly/requests/subscription_change_create.rb +5 -1
- data/lib/recurly/requests/subscription_create.rb +4 -0
- data/lib/recurly/requests/subscription_purchase.rb +4 -0
- data/lib/recurly/requests/subscription_update.rb +4 -0
- data/lib/recurly/requests/tier.rb +18 -0
- data/lib/recurly/resources/add_on.rb +12 -0
- data/lib/recurly/resources/coupon.rb +4 -0
- data/lib/recurly/resources/line_item.rb +4 -4
- data/lib/recurly/resources/payment_method.rb +4 -0
- data/lib/recurly/resources/plan.rb +8 -0
- data/lib/recurly/resources/shipping_method.rb +4 -0
- data/lib/recurly/resources/subscription.rb +4 -0
- data/lib/recurly/resources/subscription_add_on.rb +12 -0
- data/lib/recurly/resources/subscription_add_on_tier.rb +18 -0
- data/lib/recurly/resources/subscription_change.rb +8 -0
- data/lib/recurly/resources/tier.rb +18 -0
- data/lib/recurly/version.rb +1 -1
- data/openapi/api.yaml +5973 -3092
- data/recurly.gemspec +9 -4
- data/scripts/bump +8 -1
- data/scripts/changelog +14 -0
- data/scripts/format +5 -1
- data/scripts/prepare-release +36 -0
- data/scripts/release +25 -4
- metadata +22 -41
- data/lib/recurly/client/adapter.rb +0 -39
data/recurly.gemspec
CHANGED
@@ -14,6 +14,14 @@ Gem::Specification.new do |spec|
|
|
14
14
|
spec.homepage = "https://github.com/recurly/recurly-client-ruby"
|
15
15
|
spec.license = "MIT"
|
16
16
|
|
17
|
+
spec.metadata = {
|
18
|
+
"bug_tracker_uri" => "#{spec.homepage}/issues",
|
19
|
+
"changelog_uri" => "#{spec.homepage}/blob/master/CHANGELOG.md",
|
20
|
+
"documentation_uri" => "https://dev.recurly.com/docs",
|
21
|
+
"homepage_uri" => spec.homepage,
|
22
|
+
"source_code_uri" => "#{spec.homepage}/tree/#{spec.version}",
|
23
|
+
}
|
24
|
+
|
17
25
|
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
18
26
|
f.match(%r{^(test|spec|features)/})
|
19
27
|
end
|
@@ -21,11 +29,8 @@ Gem::Specification.new do |spec|
|
|
21
29
|
# spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
22
30
|
spec.require_paths = ["lib"]
|
23
31
|
|
24
|
-
spec.add_dependency "faraday", ">= 0.8.11", "< 1.0.0"
|
25
|
-
|
26
|
-
spec.add_development_dependency "net-http-persistent", "~> 2.9.4"
|
27
32
|
spec.add_development_dependency "bundler", "~> 2.0"
|
28
|
-
spec.add_development_dependency "rake", "~>
|
33
|
+
spec.add_development_dependency "rake", "~> 12.3.3"
|
29
34
|
spec.add_development_dependency "rspec", "~> 3.0"
|
30
35
|
spec.add_development_dependency "yard", "~> 0.9"
|
31
36
|
spec.add_development_dependency "pry", "~> 0.10"
|
data/scripts/bump
CHANGED
@@ -1,4 +1,11 @@
|
|
1
1
|
#!/usr/bin/env bash
|
2
2
|
set -e
|
3
3
|
|
4
|
-
|
4
|
+
if [ "$1" == "--next-version" ]; then
|
5
|
+
shift
|
6
|
+
bump2version --dry-run --list "$@" | grep new_version | cut -d "=" -f 2
|
7
|
+
elif [ "$1" == "--this-version" ]; then
|
8
|
+
grep current_version .bumpversion.cfg | awk -F" = " '{print $2}'
|
9
|
+
else
|
10
|
+
bump2version "$@"
|
11
|
+
fi
|
data/scripts/changelog
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env bash
|
2
|
+
set -e
|
3
|
+
|
4
|
+
if [ -z "$GITHUB_TOKEN" ]; then
|
5
|
+
echo "Environment variable GITHUB_TOKEN must be set"
|
6
|
+
else
|
7
|
+
if [ "$1" == "--pending" ]; then
|
8
|
+
github_changelog_generator -t $GITHUB_TOKEN --unreleased-only -o "$2"
|
9
|
+
elif [ "$1" == "--release-tag" ]; then
|
10
|
+
github_changelog_generator -t $GITHUB_TOKEN --unreleased true --unreleased-label "$2"
|
11
|
+
else
|
12
|
+
github_changelog_generator -t $GITHUB_TOKEN
|
13
|
+
fi
|
14
|
+
fi
|
data/scripts/format
CHANGED
@@ -1,8 +1,12 @@
|
|
1
1
|
#!/usr/bin/env bash
|
2
|
-
set -e
|
3
2
|
|
4
3
|
if [ "$1" == "--check" ]; then
|
5
4
|
./bin/rufo . --check
|
5
|
+
RESULT=$?
|
6
|
+
if [ $RESULT != 0 ]; then
|
7
|
+
echo "Code is not properly formatted. Please execute ./scripts/format to autoformat the code."
|
8
|
+
exit $RESULT
|
9
|
+
fi
|
6
10
|
else
|
7
11
|
./bin/rufo . -x
|
8
12
|
fi
|
@@ -0,0 +1,36 @@
|
|
1
|
+
#!/usr/bin/env bash
|
2
|
+
set -e
|
3
|
+
|
4
|
+
# major,minor,patch
|
5
|
+
PART=${1}
|
6
|
+
NEXT_VERSION=$(./scripts/bump --next-version "$PART")
|
7
|
+
UNRELEASED_LOG="/tmp/ruby-pending-changes.md"
|
8
|
+
|
9
|
+
if [ -z "$NEXT_VERSION" ]; then
|
10
|
+
echo "Failed to get next version"
|
11
|
+
else
|
12
|
+
# Generate pending changes in tmpfile
|
13
|
+
./scripts/changelog --pending $UNRELEASED_LOG
|
14
|
+
# Add a git message header of Release X.Y.Z
|
15
|
+
printf "Release %s\n\n$(cat $UNRELEASED_LOG)" "$NEXT_VERSION" > $UNRELEASED_LOG
|
16
|
+
# Delete credit line
|
17
|
+
sed -i '' -e '$ d' $UNRELEASED_LOG
|
18
|
+
|
19
|
+
git checkout -b "release-$NEXT_VERSION"
|
20
|
+
|
21
|
+
# Actually bump the version
|
22
|
+
./scripts/bump "$PART"
|
23
|
+
|
24
|
+
# Rebuild docs
|
25
|
+
./scripts/build
|
26
|
+
|
27
|
+
# Make the commit
|
28
|
+
git add . --all
|
29
|
+
git commit -F "$UNRELEASED_LOG"
|
30
|
+
|
31
|
+
# Push up this branch for PR
|
32
|
+
git push origin "release-$NEXT_VERSION"
|
33
|
+
|
34
|
+
# Create PR
|
35
|
+
hub pull-request -c -F "$UNRELEASED_LOG"
|
36
|
+
fi
|
data/scripts/release
CHANGED
@@ -1,11 +1,32 @@
|
|
1
1
|
#!/usr/bin/env bash
|
2
2
|
set -e
|
3
3
|
|
4
|
-
#
|
5
|
-
|
4
|
+
# TODO this file could be gone
|
5
|
+
RELEASED_LOG="/tmp/ruby-pending-changes.md"
|
6
|
+
THIS_VERSION=$(./scripts/bump --this-version)
|
7
|
+
|
8
|
+
# Generate the changelog with changes in this release
|
9
|
+
./scripts/changelog --release-tag "$THIS_VERSION"
|
10
|
+
git add CHANGELOG.md
|
11
|
+
git commit -m "Update Changelog for Release $THIS_VERSION"
|
12
|
+
git push origin master
|
6
13
|
|
14
|
+
# publish
|
15
|
+
# Clean up any leftover gems
|
16
|
+
rm -f ./*.gem
|
7
17
|
# Build the new gem
|
8
18
|
gem build recurly.gemspec
|
9
|
-
|
10
19
|
# Push what should be the only gem present
|
11
|
-
gem push
|
20
|
+
gem push ./*.gem
|
21
|
+
|
22
|
+
# create release
|
23
|
+
hub release create -c -F "$RELEASED_LOG" "$THIS_VERSION"
|
24
|
+
|
25
|
+
# Copy-pasteable messages for announcments
|
26
|
+
echo ":ruby: Ruby $THIS_VERSION Released :ruby:"
|
27
|
+
echo ":rubygems: Rubygems: https://rubygems.org/gems/recurly/versions/$THIS_VERSION"
|
28
|
+
echo "Release: https://github.com/recurly/recurly-client-ruby/releases/tag/$THIS_VERSION"
|
29
|
+
echo "Changelog:"
|
30
|
+
echo "\`\`\`"
|
31
|
+
cat "$RELEASED_LOG"
|
32
|
+
echo "\`\`\`"
|
metadata
CHANGED
@@ -1,49 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: recurly
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Recurly
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-06-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
-
- !ruby/object:Gem::Dependency
|
14
|
-
name: faraday
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
-
requirements:
|
17
|
-
- - ">="
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: 0.8.11
|
20
|
-
- - "<"
|
21
|
-
- !ruby/object:Gem::Version
|
22
|
-
version: 1.0.0
|
23
|
-
type: :runtime
|
24
|
-
prerelease: false
|
25
|
-
version_requirements: !ruby/object:Gem::Requirement
|
26
|
-
requirements:
|
27
|
-
- - ">="
|
28
|
-
- !ruby/object:Gem::Version
|
29
|
-
version: 0.8.11
|
30
|
-
- - "<"
|
31
|
-
- !ruby/object:Gem::Version
|
32
|
-
version: 1.0.0
|
33
|
-
- !ruby/object:Gem::Dependency
|
34
|
-
name: net-http-persistent
|
35
|
-
requirement: !ruby/object:Gem::Requirement
|
36
|
-
requirements:
|
37
|
-
- - "~>"
|
38
|
-
- !ruby/object:Gem::Version
|
39
|
-
version: 2.9.4
|
40
|
-
type: :development
|
41
|
-
prerelease: false
|
42
|
-
version_requirements: !ruby/object:Gem::Requirement
|
43
|
-
requirements:
|
44
|
-
- - "~>"
|
45
|
-
- !ruby/object:Gem::Version
|
46
|
-
version: 2.9.4
|
47
13
|
- !ruby/object:Gem::Dependency
|
48
14
|
name: bundler
|
49
15
|
requirement: !ruby/object:Gem::Requirement
|
@@ -64,14 +30,14 @@ dependencies:
|
|
64
30
|
requirements:
|
65
31
|
- - "~>"
|
66
32
|
- !ruby/object:Gem::Version
|
67
|
-
version:
|
33
|
+
version: 12.3.3
|
68
34
|
type: :development
|
69
35
|
prerelease: false
|
70
36
|
version_requirements: !ruby/object:Gem::Requirement
|
71
37
|
requirements:
|
72
38
|
- - "~>"
|
73
39
|
- !ruby/object:Gem::Version
|
74
|
-
version:
|
40
|
+
version: 12.3.3
|
75
41
|
- !ruby/object:Gem::Dependency
|
76
42
|
name: rspec
|
77
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -152,10 +118,13 @@ files:
|
|
152
118
|
- ".bumpversion.cfg"
|
153
119
|
- ".github/ISSUE_TEMPLATE/bug-report.md"
|
154
120
|
- ".github/ISSUE_TEMPLATE/question-or-other.md"
|
121
|
+
- ".github/workflows/docs.yml"
|
122
|
+
- ".github_changelog_generator"
|
155
123
|
- ".gitignore"
|
156
124
|
- ".rspec"
|
157
125
|
- ".travis.yml"
|
158
126
|
- ".yardopts"
|
127
|
+
- CHANGELOG.md
|
159
128
|
- CONTRIBUTING.md
|
160
129
|
- GETTING_STARTED.md
|
161
130
|
- Gemfile
|
@@ -166,8 +135,8 @@ files:
|
|
166
135
|
- lib/data/ca-certificates.crt
|
167
136
|
- lib/recurly.rb
|
168
137
|
- lib/recurly/client.rb
|
169
|
-
- lib/recurly/client/adapter.rb
|
170
138
|
- lib/recurly/client/operations.rb
|
139
|
+
- lib/recurly/connection_pool.rb
|
171
140
|
- lib/recurly/errors.rb
|
172
141
|
- lib/recurly/errors/api_errors.rb
|
173
142
|
- lib/recurly/errors/network_errors.rb
|
@@ -192,6 +161,7 @@ files:
|
|
192
161
|
- lib/recurly/requests/coupon_update.rb
|
193
162
|
- lib/recurly/requests/custom_field.rb
|
194
163
|
- lib/recurly/requests/external_refund.rb
|
164
|
+
- lib/recurly/requests/external_transaction.rb
|
195
165
|
- lib/recurly/requests/invoice_address.rb
|
196
166
|
- lib/recurly/requests/invoice_collect.rb
|
197
167
|
- lib/recurly/requests/invoice_create.rb
|
@@ -212,6 +182,7 @@ files:
|
|
212
182
|
- lib/recurly/requests/shipping_fee_create.rb
|
213
183
|
- lib/recurly/requests/shipping_purchase.rb
|
214
184
|
- lib/recurly/requests/subscription_add_on_create.rb
|
185
|
+
- lib/recurly/requests/subscription_add_on_tier.rb
|
215
186
|
- lib/recurly/requests/subscription_add_on_update.rb
|
216
187
|
- lib/recurly/requests/subscription_cancel.rb
|
217
188
|
- lib/recurly/requests/subscription_change_create.rb
|
@@ -223,6 +194,7 @@ files:
|
|
223
194
|
- lib/recurly/requests/subscription_shipping_purchase.rb
|
224
195
|
- lib/recurly/requests/subscription_shipping_update.rb
|
225
196
|
- lib/recurly/requests/subscription_update.rb
|
197
|
+
- lib/recurly/requests/tier.rb
|
226
198
|
- lib/recurly/resource.rb
|
227
199
|
- lib/recurly/resources.rb
|
228
200
|
- lib/recurly/resources/account.rb
|
@@ -273,9 +245,11 @@ files:
|
|
273
245
|
- lib/recurly/resources/site.rb
|
274
246
|
- lib/recurly/resources/subscription.rb
|
275
247
|
- lib/recurly/resources/subscription_add_on.rb
|
248
|
+
- lib/recurly/resources/subscription_add_on_tier.rb
|
276
249
|
- lib/recurly/resources/subscription_change.rb
|
277
250
|
- lib/recurly/resources/subscription_shipping.rb
|
278
251
|
- lib/recurly/resources/tax_info.rb
|
252
|
+
- lib/recurly/resources/tier.rb
|
279
253
|
- lib/recurly/resources/transaction.rb
|
280
254
|
- lib/recurly/resources/transaction_error.rb
|
281
255
|
- lib/recurly/resources/transaction_payment_gateway.rb
|
@@ -293,14 +267,21 @@ files:
|
|
293
267
|
- recurly.gemspec
|
294
268
|
- scripts/build
|
295
269
|
- scripts/bump
|
270
|
+
- scripts/changelog
|
296
271
|
- scripts/clean
|
297
272
|
- scripts/format
|
273
|
+
- scripts/prepare-release
|
298
274
|
- scripts/release
|
299
275
|
- scripts/test
|
300
276
|
homepage: https://github.com/recurly/recurly-client-ruby
|
301
277
|
licenses:
|
302
278
|
- MIT
|
303
|
-
metadata:
|
279
|
+
metadata:
|
280
|
+
bug_tracker_uri: https://github.com/recurly/recurly-client-ruby/issues
|
281
|
+
changelog_uri: https://github.com/recurly/recurly-client-ruby/blob/master/CHANGELOG.md
|
282
|
+
documentation_uri: https://dev.recurly.com/docs
|
283
|
+
homepage_uri: https://github.com/recurly/recurly-client-ruby
|
284
|
+
source_code_uri: https://github.com/recurly/recurly-client-ruby/tree/3.6.0
|
304
285
|
post_install_message:
|
305
286
|
rdoc_options: []
|
306
287
|
require_paths:
|
@@ -316,7 +297,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
316
297
|
- !ruby/object:Gem::Version
|
317
298
|
version: '0'
|
318
299
|
requirements: []
|
319
|
-
rubygems_version: 3.0.
|
300
|
+
rubygems_version: 3.0.3
|
320
301
|
signing_key:
|
321
302
|
specification_version: 4
|
322
303
|
summary: The ruby client for Recurly's V3 API
|
@@ -1,39 +0,0 @@
|
|
1
|
-
require "openssl"
|
2
|
-
|
3
|
-
module Recurly
|
4
|
-
class Client
|
5
|
-
module NetHttpPersistentAdapter
|
6
|
-
protected
|
7
|
-
|
8
|
-
def configure_net_adapter(faraday)
|
9
|
-
faraday.adapter :net_http_persistent do |http|
|
10
|
-
# yields Net::HTTP::Persistent
|
11
|
-
# for net-http-persistent 2.X, alternative is for 3.X
|
12
|
-
if http.respond_to? :keep_alive_timeout
|
13
|
-
http.keep_alive_timeout = 60
|
14
|
-
else
|
15
|
-
http.keep_alive = 60
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|
19
|
-
end
|
20
|
-
|
21
|
-
module NetHttpAdapter
|
22
|
-
protected
|
23
|
-
|
24
|
-
def configure_net_adapter(faraday)
|
25
|
-
faraday.adapter :net_http do |http|
|
26
|
-
# yields Net::HTTP
|
27
|
-
end
|
28
|
-
end
|
29
|
-
end
|
30
|
-
|
31
|
-
include NetHttpAdapter
|
32
|
-
|
33
|
-
begin
|
34
|
-
require "net/http/persistent"
|
35
|
-
include NetHttpPersistentAdapter
|
36
|
-
rescue LoadError
|
37
|
-
end
|
38
|
-
end
|
39
|
-
end
|