toys-core 0.17.2 → 0.18.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: 51968b2b3ef449788b6d6aa3feae3872599a7216c6d7a71504d89babbd96abac
4
- data.tar.gz: 269baef5874f35cdb88de125eb9344f24655b5cc530567a50b161e0ef5e5734c
3
+ metadata.gz: 4bd5a5658f6cecd3721768123c8125b9f8d0459f9f6812aede164c3207c30da3
4
+ data.tar.gz: 2576dc86d5ea42e516bc2b812809ad653b3c7302a3d30a9bc28be3490de749e8
5
5
  SHA512:
6
- metadata.gz: 46bb7164cfb1669100beab456ab0c11b97ec5c871649d1f632c53ce1819f1c6dc03a8214ae331c329dec8d66e757c1cf31b538898f07a88f3e22625381a67034
7
- data.tar.gz: 5bf005ff05aa1fe267cdd271b4b660e009040f8b98d07f0ae5c3fa100ad89b6329ca20f27dd3cd0ad0125829e08ab312a9624862ebec36c11c547943d52c15a7
6
+ metadata.gz: 6795ecfbda46c2259164fcef70089882c07c087e40cb378ee2726691fde2c3e89888bb13323dc974260ce79211f0ad603a67bb73de09319eca8c57a9fb3006cd
7
+ data.tar.gz: 9d2f4b8da60d7470d4bc3a0759841ed705d194025556bde61efa084ec7d5a8f400acece16ef289c41c3cc0c8e98229a34035cc075d59798626347c53621d90a4
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Release History
2
2
 
3
+ ### v0.18.0 / 2025-12-05
4
+
5
+ * ADDED: The load_gem directive can now take version requirements as positional arguments
6
+
3
7
  ### v0.17.2 / 2025-11-30
4
8
 
5
9
  * FIXED: Minor formatting fix in the gem install prompt
data/lib/toys/core.rb CHANGED
@@ -9,7 +9,7 @@ module Toys
9
9
  # Current version of Toys core.
10
10
  # @return [String]
11
11
  #
12
- VERSION = "0.17.2"
12
+ VERSION = "0.18.0"
13
13
  end
14
14
 
15
15
  ##
data/lib/toys/dsl/tool.rb CHANGED
@@ -466,7 +466,9 @@ module Toys
466
466
  # current location.
467
467
  #
468
468
  # @param name [String] Name of the gem
469
- # @param version [String,Array<String>] Version requirements for the gem.
469
+ # @param versions [Array<String>] Version requirements for the gem.
470
+ # @param version [String,Array<String>] An alternate way to specify
471
+ # version requirements for the gem.
470
472
  # @param path [String] Optional path within the gem to the file or
471
473
  # directory to load. Defaults to the root of the gem's toys directory.
472
474
  # @param toys_dir [String] Optional override for the gem's toys
@@ -475,7 +477,8 @@ module Toys
475
477
  # @param as [String] Load into the given tool/namespace. If omitted,
476
478
  # configuration will be loaded into the current namespace.
477
479
  #
478
- def load_gem(name, version: nil, path: nil, toys_dir: nil, as: nil)
480
+ def load_gem(name, *versions, version: nil, path: nil, toys_dir: nil, as: nil)
481
+ version = versions + Array(version)
479
482
  if as
480
483
  tool(as) do
481
484
  load_gem(name, version: version, path: path, toys_dir: toys_dir)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: toys-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.17.2
4
+ version: 0.18.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Azuma
@@ -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.17.2/file.CHANGELOG.html
81
+ changelog_uri: https://dazuma.github.io/toys/gems/toys-core/v0.18.0/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.17.2
84
+ documentation_uri: https://dazuma.github.io/toys/gems/toys-core/v0.18.0
85
85
  rdoc_options: []
86
86
  require_paths:
87
87
  - lib