toys-core 0.13.0 → 0.13.1
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/CHANGELOG.md +4 -0
- data/lib/toys/core.rb +1 -1
- data/lib/toys/utils/gems.rb +27 -16
- 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: 7d34e973aef54758dbd85e689d69bd68660024a41e344c40bdc64b84459e5b31
|
|
4
|
+
data.tar.gz: 1c488073e098663bf9b2e6b9434c8c1932eeb66411855a4810cb57eca4ea1445
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: '09e199be2b41bc50a6a8e2d8a03f91be92c2f04f022abc5a6a64f4077f745a445777369e4a20787a4754fe8b709e5cfde138e65eee84ec3f4f6d21ca089072fc'
|
|
7
|
+
data.tar.gz: b874efa699f0c7d76ffaa6848fb30668d830b9a1b8a342fed13283586829069cefdbe7a379a90749c365c510affa06394d82d21e601c3b6bd868f001f4287350
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# Release History
|
|
2
2
|
|
|
3
|
+
### v0.13.1 / 2022-03-01
|
|
4
|
+
|
|
5
|
+
* FIXED: Toys::Utils::Gems no longer fails to install a bundle if it had locked to a different version of a builtin gem
|
|
6
|
+
|
|
3
7
|
### v0.13.0 / 2022-02-08
|
|
4
8
|
|
|
5
9
|
Toys-Core 0.13.0 is a major release with significant improvements to the git cache, along with compatibility improvements and bug fixes.
|
data/lib/toys/core.rb
CHANGED
data/lib/toys/utils/gems.rb
CHANGED
|
@@ -372,16 +372,24 @@ module Toys
|
|
|
372
372
|
end
|
|
373
373
|
|
|
374
374
|
def modified_gemfile_content(gemfile_path)
|
|
375
|
-
is_running_toys = ::Toys.const_defined?(:VERSION)
|
|
376
375
|
content = [::File.read(gemfile_path)]
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
376
|
+
|
|
377
|
+
custom_paths = {}
|
|
378
|
+
if ::ENV["TOYS_DEV"]
|
|
379
|
+
repo_root = ::File.dirname(::File.dirname(::Toys::CORE_LIB_PATH))
|
|
380
|
+
custom_paths["toys-core"] = ::File.join(repo_root, "toys-core")
|
|
381
|
+
custom_paths["toys"] = ::File.join(repo_root, "toys")
|
|
382
|
+
end
|
|
383
|
+
|
|
384
|
+
loaded_gems = ::Gem.loaded_specs.values.sort_by(&:name)
|
|
385
|
+
content << "toys_loaded_gems = #{loaded_gems.map(&:name).inspect}"
|
|
386
|
+
content << "dependencies.delete_if { |dep| toys_loaded_gems.include?(dep.name) }"
|
|
387
|
+
loaded_gems.each do |spec|
|
|
388
|
+
path = custom_paths[spec.name]
|
|
389
|
+
path_suffix = path ? ", path: '#{path}'" : ""
|
|
390
|
+
content << "gem '#{spec.name}', '= #{spec.version}'#{path_suffix}"
|
|
391
|
+
end
|
|
392
|
+
|
|
385
393
|
content
|
|
386
394
|
end
|
|
387
395
|
|
|
@@ -422,13 +430,16 @@ module Toys
|
|
|
422
430
|
args << "--retry=#{retries}" if retries.positive?
|
|
423
431
|
bundler_bin = ::Gem.bin_path("bundler", "bundle", ::Bundler::VERSION)
|
|
424
432
|
result = exec_util.exec_ruby([bundler_bin, "install"] + args)
|
|
425
|
-
if result.
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
433
|
+
return if result.success?
|
|
434
|
+
terminal.puts("Failed to install. Trying update...")
|
|
435
|
+
result = exec_util.exec_ruby([bundler_bin, "update"] + args)
|
|
436
|
+
return if result.success?
|
|
437
|
+
terminal.puts("Failed to update. Trying update with clean lockfile...")
|
|
438
|
+
lockfile_path = find_lockfile_path(gemfile_path)
|
|
439
|
+
::File.delete(lockfile_path) if ::File.exist?(lockfile_path)
|
|
440
|
+
result = exec_util.exec_ruby([bundler_bin, "update"] + args)
|
|
441
|
+
return if result.success?
|
|
442
|
+
raise ::Bundler::InstallError, "Failed to install or update bundle: #{gemfile_path}"
|
|
432
443
|
end
|
|
433
444
|
end
|
|
434
445
|
end
|
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.13.
|
|
4
|
+
version: 0.13.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Daniel Azuma
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2022-
|
|
11
|
+
date: 2022-03-01 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.
|
|
@@ -76,10 +76,10 @@ homepage: https://github.com/dazuma/toys
|
|
|
76
76
|
licenses:
|
|
77
77
|
- MIT
|
|
78
78
|
metadata:
|
|
79
|
-
changelog_uri: https://dazuma.github.io/toys/gems/toys-core/v0.13.
|
|
79
|
+
changelog_uri: https://dazuma.github.io/toys/gems/toys-core/v0.13.1/file.CHANGELOG.html
|
|
80
80
|
source_code_uri: https://github.com/dazuma/toys/tree/main/toys-core
|
|
81
81
|
bug_tracker_uri: https://github.com/dazuma/toys/issues
|
|
82
|
-
documentation_uri: https://dazuma.github.io/toys/gems/toys-core/v0.13.
|
|
82
|
+
documentation_uri: https://dazuma.github.io/toys/gems/toys-core/v0.13.1
|
|
83
83
|
post_install_message:
|
|
84
84
|
rdoc_options: []
|
|
85
85
|
require_paths:
|