omniauth-v2-ynab 2.0.0 → 2.1.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f1fb19556657b65c9478a2e5476a0ed0cc212a62831d342f8ded6304c2b493da
4
- data.tar.gz: b3239ab12605ad74a39adbf53bbbeb3493b0f3ee83b772f74f9bc20eb1c05c62
3
+ metadata.gz: 68c3a1e9d39ca7473437e9be3205c1ca1237b689764ca1c73a7b592b8599f380
4
+ data.tar.gz: 0f95de390b9ada0f2b426839b26158ac7e18071fb056c0841e3b3375d1eb28b7
5
5
  SHA512:
6
- metadata.gz: 5ce4568d087e2507d30e14d01375fbd63fecc6713d8affbd473c75f469c03e15eb782593ad82921ad65f23c5e22f4ae44944c3940812807ff6e990f399509715
7
- data.tar.gz: 72124ef6afd7901b96c3f56b9e5864973370aa0c3cd1836495f3413a3c1abe5eb51c1f4d234856dd66d95affb811ba86c20fba454e024e7d101d04b6fb14fc54
6
+ metadata.gz: 941121f5ee78433b609a3b65dc58677846d7fecc1c6514bf1e8d2994f941bd2999288537f6ffdea925f7d09532c333df18df97246cfb407bcb61915e816aa334
7
+ data.tar.gz: 665d7372f2e81d21bfeb7999ad6d1af5b8b6c5f03c23645a34e837fd5bdb85bf60a8bcb25b345edadb69be9b0bdc131e13b9588e633939a76ae9d866a00e1d7e
@@ -44,53 +44,41 @@ jobs:
44
44
  - name: Resolve version
45
45
  id: version
46
46
  run: |
47
- CURRENT=$(ruby -e "require_relative 'lib/omniauth-ynab/version'; puts OmniAuth::YNAB::VERSION")
48
- LATEST_TAG=$(git tag -l "v*" --sort=-version:refname | head -1)
49
- LATEST=${LATEST_TAG#v}
50
- [ -z "$LATEST" ] && LATEST="0.0.0"
51
-
52
- if git rev-parse "v$CURRENT" >/dev/null 2>&1; then
53
- echo "Tag v$CURRENT already exists — nothing to release."
54
- echo "skip=true" >> "$GITHUB_OUTPUT"
55
- elif gh release view "v$CURRENT" --repo ${{ github.repository }} >/dev/null 2>&1; then
56
- echo "GitHub release v$CURRENT already exists — nothing to release."
57
- echo "skip=true" >> "$GITHUB_OUTPUT"
58
- elif curl -sf "https://rubygems.org/api/v1/versions/omniauth-v2-ynab.json" | grep -q "\"number\":\"$CURRENT\""; then
59
- echo "v$CURRENT already published on RubyGems — nothing to release."
60
- echo "skip=true" >> "$GITHUB_OUTPUT"
61
- elif [ "$CURRENT" = "$LATEST" ]; then
47
+ CURRENT=$(ruby -e "require_relative 'lib/omniauth-v2-ynab/version'; puts OmniAuth::YNAB::VERSION")
48
+
49
+ ALREADY_TAGGED=false
50
+ git rev-parse "v$CURRENT" >/dev/null 2>&1 && ALREADY_TAGGED=true
51
+ gh release view "v$CURRENT" --repo ${{ github.repository }} >/dev/null 2>&1 && ALREADY_TAGGED=true
52
+ curl -sf "https://rubygems.org/api/v1/versions/omniauth-v2-ynab.json" | grep -q "\"number\":\"$CURRENT\"" && ALREADY_TAGGED=true
53
+
54
+ if [ "$ALREADY_TAGGED" = "true" ]; then
62
55
  IFS='.' read -r MAJOR MINOR PATCH <<< "$CURRENT"
63
56
  NEW="$MAJOR.$((MINOR + 1)).0"
64
- sed -i "s/VERSION = \"$CURRENT\".freeze/VERSION = \"$NEW\".freeze/" lib/omniauth-ynab/version.rb
57
+ sed -i "s/VERSION = \"$CURRENT\".freeze/VERSION = \"$NEW\".freeze/" lib/omniauth-v2-ynab/version.rb
58
+ echo "v$CURRENT already released — auto-bumping to $NEW"
65
59
  echo "version=$NEW" >> "$GITHUB_OUTPUT"
66
60
  echo "bumped=true" >> "$GITHUB_OUTPUT"
67
- echo "skip=false" >> "$GITHUB_OUTPUT"
68
61
  else
62
+ echo "Releasing v$CURRENT"
69
63
  echo "version=$CURRENT" >> "$GITHUB_OUTPUT"
70
64
  echo "bumped=false" >> "$GITHUB_OUTPUT"
71
- echo "skip=false" >> "$GITHUB_OUTPUT"
72
65
  fi
73
66
 
74
67
  - name: Build gem
75
- if: steps.version.outputs.skip != 'true'
76
68
  run: gem build omniauth-v2-ynab.gemspec
77
69
 
78
70
  - name: Configure RubyGems credentials (OIDC)
79
- if: steps.version.outputs.skip != 'true'
80
71
  uses: rubygems/configure-rubygems-credentials@main
81
72
 
82
73
  - name: Push to RubyGems
83
- if: steps.version.outputs.skip != 'true'
84
74
  run: gem push omniauth-v2-ynab-*.gem
85
75
 
86
76
  - name: Tag release
87
- if: steps.version.outputs.skip != 'true'
88
77
  run: |
89
78
  git tag "v${{ steps.version.outputs.version }}"
90
79
  git push origin "v${{ steps.version.outputs.version }}"
91
80
 
92
81
  - name: Create GitHub Release
93
- if: steps.version.outputs.skip != 'true'
94
82
  env:
95
83
  GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
96
84
  run: |
@@ -102,6 +90,6 @@ jobs:
102
90
  - name: Commit version bump
103
91
  if: steps.version.outputs.bumped == 'true'
104
92
  run: |
105
- git add lib/omniauth-ynab/version.rb
93
+ git add lib/omniauth-v2-ynab/version.rb
106
94
  git commit -m "[auto] Bump version to ${{ steps.version.outputs.version }}"
107
95
  git push origin HEAD:main
@@ -1,5 +1,5 @@
1
1
  module OmniAuth
2
2
  module YNAB
3
- VERSION = "2.0.0".freeze
3
+ VERSION = "2.1.0".freeze
4
4
  end
5
5
  end
@@ -1,2 +1,2 @@
1
- require "omniauth-ynab/version"
1
+ require "omniauth-v2-ynab/version"
2
2
  require "omniauth/strategies/ynab"
@@ -1,6 +1,6 @@
1
1
  lib = File.expand_path("lib", __dir__)
2
2
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
- require "omniauth-ynab/version"
3
+ require "omniauth-v2-ynab/version"
4
4
 
5
5
  Gem::Specification.new do |gem|
6
6
  gem.add_dependency "oauth2", "~> 2.0"
data/spec/helper.rb CHANGED
@@ -5,7 +5,7 @@ require "rspec"
5
5
  require "rack/test"
6
6
  require "webmock/rspec"
7
7
  require "omniauth"
8
- require "omniauth-ynab"
8
+ require "omniauth-v2-ynab"
9
9
 
10
10
  RSpec.configure do |config|
11
11
  config.expect_with :rspec do |c|
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-v2-ynab
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - tataihono
@@ -54,8 +54,8 @@ files:
54
54
  - LICENSE.md
55
55
  - README.md
56
56
  - Rakefile
57
- - lib/omniauth-ynab.rb
58
- - lib/omniauth-ynab/version.rb
57
+ - lib/omniauth-v2-ynab.rb
58
+ - lib/omniauth-v2-ynab/version.rb
59
59
  - lib/omniauth/strategies/ynab.rb
60
60
  - omniauth-v2-ynab.gemspec
61
61
  - spec/helper.rb