recurly 4.0.0 → 4.4.0

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.
Files changed (41) hide show
  1. checksums.yaml +4 -4
  2. data/.bumpversion.cfg +1 -1
  3. data/.changelog_config.yaml +11 -0
  4. data/.github/workflows/docs.yml +1 -1
  5. data/.travis.yml +1 -0
  6. data/CHANGELOG.md +63 -312
  7. data/CODE_OF_CONDUCT.md +130 -0
  8. data/CONTRIBUTING.md +4 -0
  9. data/GETTING_STARTED.md +1 -1
  10. data/README.md +3 -0
  11. data/lib/recurly/client.rb +23 -14
  12. data/lib/recurly/client/operations.rb +50 -154
  13. data/lib/recurly/errors.rb +1 -0
  14. data/lib/recurly/errors/network_errors.rb +7 -0
  15. data/lib/recurly/pager.rb +2 -2
  16. data/lib/recurly/requests/add_on_create.rb +2 -2
  17. data/lib/recurly/requests/add_on_update.rb +2 -2
  18. data/lib/recurly/requests/billing_info_create.rb +5 -1
  19. data/lib/recurly/requests/billing_info_verify.rb +14 -0
  20. data/lib/recurly/requests/subscription_add_on_tier.rb +6 -2
  21. data/lib/recurly/requests/subscription_purchase.rb +1 -1
  22. data/lib/recurly/requests/tier.rb +5 -1
  23. data/lib/recurly/resources/billing_info.rb +5 -1
  24. data/lib/recurly/resources/invoice.rb +1 -1
  25. data/lib/recurly/resources/subscription_add_on_tier.rb +6 -2
  26. data/lib/recurly/resources/subscription_change.rb +4 -0
  27. data/lib/recurly/resources/subscription_change_billing_info.rb +14 -0
  28. data/lib/recurly/resources/tax_detail.rb +26 -0
  29. data/lib/recurly/resources/tax_info.rb +4 -0
  30. data/lib/recurly/resources/tier.rb +5 -1
  31. data/lib/recurly/resources/transaction.rb +4 -0
  32. data/lib/recurly/version.rb +1 -1
  33. data/openapi/api.yaml +297 -232
  34. data/scripts/build +2 -2
  35. data/scripts/format +2 -2
  36. data/scripts/prepare-release +43 -29
  37. data/scripts/release +5 -20
  38. metadata +12 -9
  39. data/.github_changelog_generator +0 -8
  40. data/scripts/bump +0 -11
  41. data/scripts/changelog +0 -14
data/scripts/build CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env bash
2
2
  set -e
3
3
 
4
- bundle install --binstubs --quiet
5
- ./bin/yard --quiet
4
+ bundle install --quiet
5
+ bundle exec yard --quiet
data/scripts/format CHANGED
@@ -1,12 +1,12 @@
1
1
  #!/usr/bin/env bash
2
2
 
3
3
  if [ "$1" == "--check" ]; then
4
- ./bin/rufo . --check
4
+ bundle exec rufo . --check
5
5
  RESULT=$?
6
6
  if [ $RESULT != 0 ]; then
7
7
  echo "Code is not properly formatted. Please execute ./scripts/format to autoformat the code."
8
8
  exit $RESULT
9
9
  fi
10
10
  else
11
- ./bin/rufo . -x
11
+ bundle exec rufo . -x
12
12
  fi
@@ -1,36 +1,50 @@
1
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
2
 
21
- # Actually bump the version
22
- ./scripts/bump "$PART"
3
+ # Usage
4
+ #
5
+ # ./prepare-release major|minor|patch [--notes-out <path>] [--tag-out <path>]
6
+ #
23
7
 
24
- # Rebuild docs
25
- ./scripts/build
8
+ set -e
26
9
 
27
- # Make the commit
28
- git add . --all
29
- git commit -F "$UNRELEASED_LOG"
10
+ if [ -n "$(git status --porcelain)" ]; then
11
+ echo "Working directory is not clean. Aborting."
12
+ exit 1
13
+ fi
30
14
 
31
- # Push up this branch for PR
32
- git push origin "release-$NEXT_VERSION"
15
+ if [ -z "$GITHUB_TOKEN" ]; then
16
+ echo "GITHUB_TOKEN must be set. Aborting."
17
+ exit 1
18
+ fi
33
19
 
34
- # Create PR
35
- hub pull-request -c -F "$UNRELEASED_LOG"
20
+ # Bump version
21
+ # major|minor|patch
22
+ part=${1}
23
+ if [ "$part" != "patch" ] && [ "$part" != "minor" ] && [ "$part" != "major" ]; then
24
+ echo "'$part' is not a valid option: major|minor|patch"
25
+ exit 1
36
26
  fi
27
+ new_version=$(bump2version --list "$part" | grep new_version | cut -d "=" -f 2)
28
+
29
+ # Generate Changelog
30
+ changelogly --future-release "$new_version"
31
+
32
+ while [[ "$#" -gt 0 ]]; do
33
+ case $1 in
34
+ # Create release notes artifact
35
+ -n|--notes-out)
36
+ echo "$new_version
37
+
38
+ $(
39
+ cat CHANGELOG.md | sed -n "/^## \[$new_version\]/,/^##/p" | sed '$d;1d'
40
+ )" | awk '{$1=$1};1' > $2
41
+ shift
42
+ ;;
43
+
44
+ # Create release notes artifact
45
+ -t|--tag-out)
46
+ echo "$new_version" > $2
47
+ ;;
48
+ esac
49
+ shift
50
+ done
data/scripts/release CHANGED
@@ -1,15 +1,11 @@
1
1
  #!/usr/bin/env bash
2
- set -e
3
2
 
4
- # TODO this file could be gone
5
- RELEASED_LOG="/tmp/ruby-pending-changes.md"
6
- THIS_VERSION=$(./scripts/bump --this-version)
3
+ set -e
7
4
 
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
5
+ # Usage
6
+ #
7
+ # ./release
8
+ #
13
9
 
14
10
  # publish
15
11
  # Clean up any leftover gems
@@ -19,14 +15,3 @@ gem build recurly.gemspec
19
15
  # Push what should be the only gem present
20
16
  gem push ./*.gem
21
17
 
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,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: recurly
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.0
4
+ version: 4.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Recurly
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-03-01 00:00:00.000000000 Z
11
+ date: 2021-06-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -116,15 +116,16 @@ extensions: []
116
116
  extra_rdoc_files: []
117
117
  files:
118
118
  - ".bumpversion.cfg"
119
+ - ".changelog_config.yaml"
119
120
  - ".github/ISSUE_TEMPLATE/bug-report.md"
120
121
  - ".github/ISSUE_TEMPLATE/question-or-other.md"
121
122
  - ".github/workflows/docs.yml"
122
- - ".github_changelog_generator"
123
123
  - ".gitignore"
124
124
  - ".rspec"
125
125
  - ".travis.yml"
126
126
  - ".yardopts"
127
127
  - CHANGELOG.md
128
+ - CODE_OF_CONDUCT.md
128
129
  - CONTRIBUTING.md
129
130
  - GETTING_STARTED.md
130
131
  - Gemfile
@@ -139,6 +140,7 @@ files:
139
140
  - lib/recurly/connection_pool.rb
140
141
  - lib/recurly/errors.rb
141
142
  - lib/recurly/errors/api_errors.rb
143
+ - lib/recurly/errors/network_errors.rb
142
144
  - lib/recurly/http.rb
143
145
  - lib/recurly/pager.rb
144
146
  - lib/recurly/request.rb
@@ -153,6 +155,7 @@ files:
153
155
  - lib/recurly/requests/add_on_update.rb
154
156
  - lib/recurly/requests/address.rb
155
157
  - lib/recurly/requests/billing_info_create.rb
158
+ - lib/recurly/requests/billing_info_verify.rb
156
159
  - lib/recurly/requests/coupon_bulk_create.rb
157
160
  - lib/recurly/requests/coupon_create.rb
158
161
  - lib/recurly/requests/coupon_pricing.rb
@@ -256,7 +259,9 @@ files:
256
259
  - lib/recurly/resources/subscription_add_on.rb
257
260
  - lib/recurly/resources/subscription_add_on_tier.rb
258
261
  - lib/recurly/resources/subscription_change.rb
262
+ - lib/recurly/resources/subscription_change_billing_info.rb
259
263
  - lib/recurly/resources/subscription_shipping.rb
264
+ - lib/recurly/resources/tax_detail.rb
260
265
  - lib/recurly/resources/tax_info.rb
261
266
  - lib/recurly/resources/tier.rb
262
267
  - lib/recurly/resources/tier_pricing.rb
@@ -278,8 +283,6 @@ files:
278
283
  - openapi/api.yaml
279
284
  - recurly.gemspec
280
285
  - scripts/build
281
- - scripts/bump
282
- - scripts/changelog
283
286
  - scripts/clean
284
287
  - scripts/format
285
288
  - scripts/prepare-release
@@ -293,8 +296,8 @@ metadata:
293
296
  changelog_uri: https://github.com/recurly/recurly-client-ruby/blob/master/CHANGELOG.md
294
297
  documentation_uri: https://recurly.github.io/recurly-client-ruby/
295
298
  homepage_uri: https://github.com/recurly/recurly-client-ruby
296
- source_code_uri: https://github.com/recurly/recurly-client-ruby/tree/4.0.0
297
- post_install_message:
299
+ source_code_uri: https://github.com/recurly/recurly-client-ruby/tree/4.4.0
300
+ post_install_message:
298
301
  rdoc_options: []
299
302
  require_paths:
300
303
  - lib
@@ -310,7 +313,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
310
313
  version: '0'
311
314
  requirements: []
312
315
  rubygems_version: 3.0.3
313
- signing_key:
316
+ signing_key:
314
317
  specification_version: 4
315
318
  summary: The ruby client for Recurly's V3 API
316
319
  test_files: []
@@ -1,8 +0,0 @@
1
- user=recurly
2
- project=recurly-client-ruby
3
- unreleased=false
4
- exclude-labels=question,bug?,duplicate,V2
5
- exclude-tags-regex=^[^34]+\..*
6
- issues-wo-labels=false
7
- verbose=false
8
- since-tag=3.0.0.beta.1
data/scripts/bump DELETED
@@ -1,11 +0,0 @@
1
- #!/usr/bin/env bash
2
- set -e
3
-
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 DELETED
@@ -1,14 +0,0 @@
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 --future-release "$2"
11
- else
12
- github_changelog_generator -t $GITHUB_TOKEN
13
- fi
14
- fi