gw 0.1.0 → 0.2.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: 97fd7885b19967d3259100bd934f123b9b51300e66e9f9960dc7b516fb218185
4
- data.tar.gz: c55173aebd6cdba63d0cb2e9d8e49f7dd62c3d1478ff4cf990c6f66ac5401728
3
+ metadata.gz: 3e52867b1534466cd786ae0044e5fe47b00121bf3b4d9beea640bfb02aa4ceec
4
+ data.tar.gz: ba364eaa4573b9a3c563e96809bba26fc25c40e4a0eccd742aefaf022c9ae915
5
5
  SHA512:
6
- metadata.gz: 54f924ad6fe0ca52c802b9b7f321d3192571936f70cebda02415722163e720a6ee1c15cb22bf6182d74c47561180ef4f21efc27f1c6a47f97afc55ec162d7ecf
7
- data.tar.gz: 27e19d825d7f8088946c9e691eec73464bb8b1e2403ae5a0206f034b5b07bf488b70c6450e8a53f658718e054a1b4b5134347b16735d1f77e8596fd8f6db0b89
6
+ metadata.gz: a0902b99541321176897afb5aefb55b8be3298972993f48f45c651ac75b1eec09548b7a186a195d3d084d7eb12fbcde43593f83fc2124766f754fef07fe3b0ce
7
+ data.tar.gz: aadda946aaf1ea08e275c649a9b80358f6a6a40057b9c5d9d4ce33f4cf4d842fefdd7a527a0ca36eb820407ecfa9e88c41af1c5c56c6cda67019a5b0704d80eb
@@ -0,0 +1,44 @@
1
+ name: Release Gem
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - 'v*'
7
+
8
+ jobs:
9
+ release:
10
+ runs-on: ubuntu-latest
11
+ permissions:
12
+ contents: write
13
+
14
+ steps:
15
+ - uses: actions/checkout@v4
16
+ with:
17
+ persist-credentials: false
18
+
19
+ - name: Set up Ruby
20
+ uses: ruby/setup-ruby@v1
21
+ with:
22
+ ruby-version: '3.4.8'
23
+ bundler-cache: true
24
+
25
+ - name: Build gem
26
+ run: gem build gw.gemspec
27
+
28
+ - name: Publish to RubyGems
29
+ env:
30
+ RUBYGEMS_API_KEY: ${{ secrets.RUBYGEMS_AUTH_TOKEN }}
31
+ run: |
32
+ mkdir -p ~/.gem
33
+ echo "---
34
+ :rubygems_api_key: ${RUBYGEMS_API_KEY}" > ~/.gem/credentials
35
+ chmod 0600 ~/.gem/credentials
36
+ gem push *.gem
37
+
38
+ - name: Create GitHub Release
39
+ uses: softprops/action-gh-release@v1
40
+ with:
41
+ files: '*.gem'
42
+ generate_release_notes: true
43
+ env:
44
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [0.1.1] - 2026-01-05
4
+
5
+ - Fix GitHub authentication issue in `gw repo clone` command
6
+ - Use GitHub token directly in clone URL instead of requiring manual credentials
7
+
3
8
  ## [0.1.0] - 2025-12-28
4
9
 
5
10
  - Initial release
data/lib/gw/repository.rb CHANGED
@@ -20,8 +20,9 @@ module Gw
20
20
 
21
21
  FileUtils.mkdir_p(Config.core_dir)
22
22
 
23
- # Clone as bare repository
24
- clone_url = GitHub.repository(full_name).clone_url
23
+ # Clone as bare repository with GitHub token authentication
24
+ token = GitHub.token
25
+ clone_url = "https://#{token}@github.com/#{full_name}.git"
25
26
  success = system("git clone --bare #{clone_url} #{repo.bare_path}")
26
27
 
27
28
  raise Error, "Failed to clone repository" unless success
@@ -74,5 +75,13 @@ module Gw
74
75
 
75
76
  @default_branch
76
77
  end
78
+
79
+ def fetch
80
+ puts "Fetching latest changes from remote..."
81
+ success = system("git -C #{bare_path} fetch --all --prune")
82
+ raise Error, "Failed to fetch from remote" unless success
83
+
84
+ true
85
+ end
77
86
  end
78
87
  end
data/lib/gw/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Gw
4
- VERSION = "0.1.0"
4
+ VERSION = "0.2.0"
5
5
  end
data/lib/gw/worktree.rb CHANGED
@@ -16,6 +16,9 @@ module Gw
16
16
 
17
17
  raise WorktreeAlreadyExistsError, "Worktree '#{branch}' already exists" if worktree.exist?
18
18
 
19
+ # Fetch latest changes from remote
20
+ repo.fetch
21
+
19
22
  # Check if branch exists (locally or remotely)
20
23
  branch_exists = system("git -C #{repo.bare_path} show-ref --verify --quiet refs/heads/#{branch}") ||
21
24
  system("git -C #{repo.bare_path} show-ref --verify --quiet refs/remotes/origin/#{branch}")
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gw
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - AILERON
@@ -75,6 +75,7 @@ extensions: []
75
75
  extra_rdoc_files: []
76
76
  files:
77
77
  - ".github/workflows/main.yml"
78
+ - ".github/workflows/release.yml"
78
79
  - ".gitignore"
79
80
  - ".rspec"
80
81
  - ".rubocop.yml"
@@ -119,7 +120,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
119
120
  - !ruby/object:Gem::Version
120
121
  version: '0'
121
122
  requirements: []
122
- rubygems_version: 3.6.9
123
+ rubygems_version: 4.0.3
123
124
  specification_version: 4
124
125
  summary: Git worktree manager with bare repository pattern
125
126
  test_files: []