toys 0.15.0 → 0.15.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4cb07f9df7100f093730bc4029f1ae244f4417a353af98afe09e00981778ae78
4
- data.tar.gz: 87d3c3ca9a0062190abf4070e223db59bfd61a2124739dcdbd61bceece277acb
3
+ metadata.gz: 66457a8b91dca43ca890c25952839585d923a563032e7227f57fb8bb6f5ccfe5
4
+ data.tar.gz: f053d857b7441ecf0631a52322f36b2eb0f24c44e53ee0c304214f60b0433ca7
5
5
  SHA512:
6
- metadata.gz: e35f19f001aa9148439f2b9584d8e83d6b745dcd81a674f8994a4384754c6dfd4345812857f9670884696de0e6394fe0cf60fc40c5c8ab1426fa321c39e46276
7
- data.tar.gz: e10c2526cb2c4c600512db26c65befc65f41257d275d89fe5b620a3b985bc36cbad489ebe5cae77ea6efbe49f93a940e22b5313b3fe6e80b8fa214d01a179539
6
+ metadata.gz: 4433e7fcc39d6a8f0663541760d19439712484dfeea3a48c900d043f76dd19407079abbb96cdfbef6954d1a38c4c52de2be8a0c0c4f781e8753d2a36ee68a2a1
7
+ data.tar.gz: fa7172255d697198062c734236b968444a4fd6f344f7bffe5857f21eef5164ac3683568037c274595503868366b375839de868cddaab5755df7244044c8f8d0f
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Release History
2
2
 
3
+ ### v0.15.2 / 2023-10-17
4
+
5
+ * FIXED: The gem_build template tried to use a badly formatted directory on Windows.
6
+
7
+ ### v0.15.1 / 2023-10-15
8
+
9
+ * FIXED: Clean up some internal requires, which may improve performance with built-in gems.
10
+
3
11
  ### v0.15.0 / 2023-10-12
4
12
 
5
13
  Toys 0.15.0 is a major release that adds arbitrary signal handling, cleans up some warts around entrypoint and method definition, and fixes a few long-standing issues.
@@ -9,6 +9,6 @@ module Toys
9
9
  # Current version of Toys core.
10
10
  # @return [String]
11
11
  #
12
- VERSION = "0.15.0"
12
+ VERSION = "0.15.2"
13
13
  end
14
14
  end
@@ -339,7 +339,7 @@ module Toys
339
339
  # Source available in the toys-core gem
340
340
  end
341
341
 
342
- @git_cache_mutex = ::Monitor.new
342
+ @git_cache_mutex = ::Mutex.new
343
343
  @default_git_cache = nil
344
344
 
345
345
  ##
@@ -131,7 +131,7 @@ module Toys
131
131
  ##
132
132
  # Settings for this tool
133
133
  #
134
- # @return [Toys::Tool::Settings]
134
+ # @return [Toys::ToolDefinition::Settings]
135
135
  #
136
136
  attr_reader :settings
137
137
 
@@ -186,13 +186,16 @@ module Toys
186
186
  #
187
187
  def gem_name(context_dir = nil)
188
188
  return @gem_name if @gem_name
189
- glob = "*.gemspec"
190
- glob = ::File.join(context_dir, glob) if context_dir
191
- candidates = ::Dir.glob(glob)
189
+ candidates =
190
+ if context_dir
191
+ Compat.glob_in_dir("*.gemspec", context_dir)
192
+ else
193
+ ::Dir.glob("*.gemspec")
194
+ end
192
195
  if candidates.empty?
193
196
  raise ToolDefinitionError, "Could not find a gemspec"
194
197
  end
195
- candidates.first.sub(/\.gemspec$/, "")
198
+ ::File.basename(candidates.first, ".gemspec")
196
199
  end
197
200
 
198
201
  ##
@@ -164,12 +164,12 @@ module Toys
164
164
  gem "rake", *template.gem_version
165
165
  require "rake"
166
166
 
167
- rakefile_path = Templates::Rake.find_rakefile(
167
+ rakefile_path = ::Toys::Templates::Rake.find_rakefile(
168
168
  template.rakefile_path, template.context_directory || context_directory
169
169
  )
170
170
  raise "Cannot find #{template.rakefile_path}" unless rakefile_path
171
171
  rake_context_dir = ::File.dirname(rakefile_path)
172
- rake = Templates::Rake.prepare_rake(rakefile_path, rake_context_dir)
172
+ rake = ::Toys::Templates::Rake.prepare_rake(rakefile_path, rake_context_dir)
173
173
 
174
174
  rake.tasks.each do |task|
175
175
  comments = task.full_comment.to_s.split("\n")
@@ -190,7 +190,7 @@ module Toys
190
190
 
191
191
  if template.use_flags
192
192
  task.arg_names.each do |arg|
193
- specs = Templates::Rake.flag_specs(arg)
193
+ specs = ::Toys::Templates::Rake.flag_specs(arg)
194
194
  flag(arg, *specs) unless specs.empty?
195
195
  end
196
196
 
data/lib/toys/version.rb CHANGED
@@ -5,5 +5,5 @@ module Toys
5
5
  # Current version of the Toys command line executable.
6
6
  # @return [String]
7
7
  #
8
- VERSION = "0.15.0"
8
+ VERSION = "0.15.2"
9
9
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: toys
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.15.0
4
+ version: 0.15.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Azuma
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-10-13 00:00:00.000000000 Z
11
+ date: 2023-10-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: toys-core
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 0.15.0
19
+ version: 0.15.2
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 0.15.0
26
+ version: 0.15.2
27
27
  description: Toys is a configurable command line tool. Write commands in Ruby using
28
28
  a simple DSL, and Toys will provide the command line executable and take care of
29
29
  all the details such as argument parsing, online help, and error reporting. Toys
@@ -121,10 +121,10 @@ homepage: https://github.com/dazuma/toys
121
121
  licenses:
122
122
  - MIT
123
123
  metadata:
124
- changelog_uri: https://dazuma.github.io/toys/gems/toys/v0.15.0/file.CHANGELOG.html
124
+ changelog_uri: https://dazuma.github.io/toys/gems/toys/v0.15.2/file.CHANGELOG.html
125
125
  source_code_uri: https://github.com/dazuma/toys/tree/main/toys
126
126
  bug_tracker_uri: https://github.com/dazuma/toys/issues
127
- documentation_uri: https://dazuma.github.io/toys/gems/toys/v0.15.0
127
+ documentation_uri: https://dazuma.github.io/toys/gems/toys/v0.15.2
128
128
  post_install_message:
129
129
  rdoc_options: []
130
130
  require_paths: