toys-core 0.14.2 → 0.14.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +12 -0
- data/lib/toys/context.rb +2 -1
- data/lib/toys/core.rb +1 -1
- data/lib/toys/utils/exec.rb +1 -1
- data/lib/toys/utils/gems.rb +21 -2
- data/lib/toys/utils/git_cache.rb +1 -0
- data/lib/toys/utils/xdg.rb +2 -0
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 98a66e07f9f052b2011ab3d960dd8b8bff11f3f03a3c6de67e0d14b1507421ee
|
4
|
+
data.tar.gz: c6712de855eb63cb80eba5b32c956590a2b50d2944079df0ad4e58c9c8e7c8c4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e6be869c95ca6a9c4a7451581b04a656fe8d11f4b10d7a9197c4719fda776720bc07124295683d21bf81a19a0d5a3366fb0b31f5ffd92dd6b518aab3a18cc6d8
|
7
|
+
data.tar.gz: 0f48bdb37ce11ee8f3ece13b7ba8e4f85633b566b68d2ba15cd18ef26ddcd9b0455b49e2f56bef7b0f240cfde4d5e461b81a05965ec77928cd4d09a974794c8d
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,17 @@
|
|
1
1
|
# Release History
|
2
2
|
|
3
|
+
### v0.14.4 / 2023-01-23
|
4
|
+
|
5
|
+
* FIXED: Fixed missing require when "toys/utils/xdg" or "toys/utils/git_cache" is required without the rest of toys-core
|
6
|
+
|
7
|
+
### v0.14.3 / 2022-12-29
|
8
|
+
|
9
|
+
* FIXED: Exit with a code -1 if a non-integer exit code is thrown
|
10
|
+
* FIXED: The sh command in the Exec utility returns -1 if the exit code cannot be determined
|
11
|
+
* FIXED: Update Bundler integration to support Bundler 2.4 and Ruby 3.2
|
12
|
+
* FIXED: Fix for installing bundler on older Rubies
|
13
|
+
* FIXED: Fixed XDG defaults on JRuby 9.4
|
14
|
+
|
3
15
|
### v0.14.2 / 2022-10-09
|
4
16
|
|
5
17
|
* ADDED: The tool directive supports the delegate_relative argument, as a preferred alternative over alias_tool.
|
data/lib/toys/context.rb
CHANGED
@@ -309,7 +309,7 @@ module Toys
|
|
309
309
|
# @return [void]
|
310
310
|
#
|
311
311
|
def exit(code = 0)
|
312
|
-
|
312
|
+
Context.exit(code)
|
313
313
|
end
|
314
314
|
|
315
315
|
##
|
@@ -321,6 +321,7 @@ module Toys
|
|
321
321
|
# @return [void]
|
322
322
|
#
|
323
323
|
def self.exit(code = 0)
|
324
|
+
code = -1 unless code.is_a?(::Integer)
|
324
325
|
throw :result, code
|
325
326
|
end
|
326
327
|
|
data/lib/toys/core.rb
CHANGED
data/lib/toys/utils/exec.rb
CHANGED
data/lib/toys/utils/gems.rb
CHANGED
@@ -188,7 +188,7 @@ module Toys
|
|
188
188
|
gemfile_path = ::File.absolute_path(gemfile_path)
|
189
189
|
Gems.synchronize do
|
190
190
|
if configure_gemfile(gemfile_path)
|
191
|
-
activate("bundler",
|
191
|
+
activate("bundler", *bundler_version_requirements)
|
192
192
|
require "bundler"
|
193
193
|
setup_bundle(gemfile_path, groups: groups, retries: retries)
|
194
194
|
end
|
@@ -309,7 +309,7 @@ module Toys
|
|
309
309
|
modified_gemfile_path = create_modified_gemfile(gemfile_path)
|
310
310
|
begin
|
311
311
|
attempt_setup_bundle(modified_gemfile_path, groups)
|
312
|
-
rescue
|
312
|
+
rescue *bundler_exceptions
|
313
313
|
::Bundler.reset!
|
314
314
|
restore_toys_libs
|
315
315
|
install_bundle(modified_gemfile_path, retries: retries)
|
@@ -321,6 +321,25 @@ module Toys
|
|
321
321
|
restore_toys_libs
|
322
322
|
end
|
323
323
|
|
324
|
+
def bundler_exceptions
|
325
|
+
@bundler_exceptions ||= begin
|
326
|
+
exceptions = [::Bundler::GemNotFound]
|
327
|
+
exceptions << ::Bundler::VersionConflict if ::Bundler.const_defined?(:VersionConflict)
|
328
|
+
exceptions << ::Bundler::SolveFailure if ::Bundler.const_defined?(:SolveFailure)
|
329
|
+
exceptions
|
330
|
+
end
|
331
|
+
end
|
332
|
+
|
333
|
+
def bundler_version_requirements
|
334
|
+
if ::RUBY_VERSION < "2.6"
|
335
|
+
[">= 2.2", "< 2.4"]
|
336
|
+
elsif ::RUBY_VERSION < "3"
|
337
|
+
[">= 2.2", "< 2.5"]
|
338
|
+
else
|
339
|
+
["~> 2.2"]
|
340
|
+
end
|
341
|
+
end
|
342
|
+
|
324
343
|
def attempt_setup_bundle(modified_gemfile_path, groups)
|
325
344
|
::ENV["BUNDLE_GEMFILE"] = modified_gemfile_path
|
326
345
|
::Bundler.configure
|
data/lib/toys/utils/git_cache.rb
CHANGED
data/lib/toys/utils/xdg.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: toys-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.14.
|
4
|
+
version: 0.14.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel Azuma
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-01-23 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Toys-Core is the command line tool framework underlying Toys. It can
|
14
14
|
be used to create command line executables using the Toys DSL and classes.
|
@@ -78,10 +78,10 @@ homepage: https://github.com/dazuma/toys
|
|
78
78
|
licenses:
|
79
79
|
- MIT
|
80
80
|
metadata:
|
81
|
-
changelog_uri: https://dazuma.github.io/toys/gems/toys-core/v0.14.
|
81
|
+
changelog_uri: https://dazuma.github.io/toys/gems/toys-core/v0.14.4/file.CHANGELOG.html
|
82
82
|
source_code_uri: https://github.com/dazuma/toys/tree/main/toys-core
|
83
83
|
bug_tracker_uri: https://github.com/dazuma/toys/issues
|
84
|
-
documentation_uri: https://dazuma.github.io/toys/gems/toys-core/v0.14.
|
84
|
+
documentation_uri: https://dazuma.github.io/toys/gems/toys-core/v0.14.4
|
85
85
|
post_install_message:
|
86
86
|
rdoc_options: []
|
87
87
|
require_paths:
|