rails-worktrees 0.7.2 → 0.7.3
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/.release-please-manifest.json +1 -1
- data/CHANGELOG.md +7 -0
- data/lib/generators/rails/worktrees/templates/bin/wt +50 -1
- data/lib/rails/worktrees/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 4ca5bda1caef0299d08ce62341cebeb9fe2cf35be6acb2c84438af5cfcb11f8e
|
|
4
|
+
data.tar.gz: c3278894ecf06ef752d15ff56ab64c47b56bdb2f0cf39e0773012ce71eda8823
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: bdb2583a6e1f1e8785599a31907c5a69c50eed1a8ebc9909fa139a59d4dd0ae5df0e941403aff68b3742f3c5c565461021418320b7a98054e7c710b491f3405a
|
|
7
|
+
data.tar.gz: 9ee5cc2bbd46b0b1cf152576be8269ee03bc0b3f749c3d878ce01976a6166fb2de2d4862dd4789b45569161e3f04802cdb2864a2973514a11f9184f0923e3fd4
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{".":"0.7.
|
|
1
|
+
{".":"0.7.3"}
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.7.3](https://github.com/asjer/rails-worktrees/compare/v0.7.2...v0.7.3) (2026-07-08)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* **wt:** add bundle fallback for wt bootstrap ([f5ab21e](https://github.com/asjer/rails-worktrees/commit/f5ab21ef1014ea2baaa67dca1ce085b6b70dfcd5))
|
|
9
|
+
|
|
3
10
|
## [0.7.2](https://github.com/asjer/rails-worktrees/compare/v0.7.1...v0.7.2) (2026-07-06)
|
|
4
11
|
|
|
5
12
|
|
|
@@ -62,4 +62,53 @@ if [ -n "$WT_MISE_CONFIG" ] && [ -z "${RAILS_WORKTREES_BOOTSTRAPPED:-}" ] && com
|
|
|
62
62
|
fi
|
|
63
63
|
|
|
64
64
|
export BUNDLE_GEMFILE="${BUNDLE_GEMFILE:-$WT_APP_ROOT/Gemfile}"
|
|
65
|
-
exec ruby
|
|
65
|
+
exec ruby /dev/fd/3 "$@" 3<<'RUBY'
|
|
66
|
+
def rails_worktrees_bootstrap_safe_invocation?(argv)
|
|
67
|
+
args = argv.map(&:to_s)
|
|
68
|
+
return true if args.empty?
|
|
69
|
+
return true if %w[-h --help -v --version].include?(args.first)
|
|
70
|
+
return true if %w[--env --print-env].include?(args.first)
|
|
71
|
+
|
|
72
|
+
command_args = args.reject { |arg| %w[--dry-run --skip-setup --env --print-env].include?(arg) }
|
|
73
|
+
command = command_args.first
|
|
74
|
+
|
|
75
|
+
return true if %w[setup doctor update].include?(command)
|
|
76
|
+
return false if %w[remove delete prune].include?(command)
|
|
77
|
+
|
|
78
|
+
command_args.length <= 1
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
def rails_worktrees_incomplete_bundle_message(error)
|
|
82
|
+
error.message.to_s.lines.first.to_s.strip
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
def rails_worktrees_load_without_bundler(original_error)
|
|
86
|
+
ENV.delete('BUNDLE_GEMFILE')
|
|
87
|
+
Gem.clear_paths if Gem.respond_to?(:clear_paths)
|
|
88
|
+
load Gem.bin_path('rails-worktrees', 'wt')
|
|
89
|
+
rescue Gem::Exception, LoadError => fallback_error
|
|
90
|
+
warn 'rails-worktrees: app bundle is incomplete and no fallback rails-worktrees executable could be loaded.'
|
|
91
|
+
warn " Bundler: #{rails_worktrees_incomplete_bundle_message(original_error)}"
|
|
92
|
+
warn " Fallback: #{fallback_error.class}: #{fallback_error.message}"
|
|
93
|
+
warn 'Run `bundle install` or install rails-worktrees outside the app bundle, then retry `bin/wt setup`.'
|
|
94
|
+
exit 1
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
begin
|
|
98
|
+
require 'bundler/setup'
|
|
99
|
+
load Gem.bin_path('rails-worktrees', 'wt')
|
|
100
|
+
rescue StandardError => error
|
|
101
|
+
raise unless defined?(Bundler::GemNotFound) && error.is_a?(Bundler::GemNotFound)
|
|
102
|
+
|
|
103
|
+
if rails_worktrees_bootstrap_safe_invocation?(ARGV)
|
|
104
|
+
warn 'rails-worktrees: app bundle is incomplete; falling back to the globally installed wt executable.'
|
|
105
|
+
warn " #{rails_worktrees_incomplete_bundle_message(error)}"
|
|
106
|
+
rails_worktrees_load_without_bundler(error)
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
warn 'rails-worktrees: cannot start wt because the app bundle is incomplete.'
|
|
110
|
+
warn " #{rails_worktrees_incomplete_bundle_message(error)}"
|
|
111
|
+
warn 'Run `bundle install` or `bin/wt setup` to install missing gems, then retry.'
|
|
112
|
+
exit 1
|
|
113
|
+
end
|
|
114
|
+
RUBY
|