squared 0.6.20 → 0.6.21

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: bb99c8ca17b63b3aa50d1fff702d84c9a3b878ad49bac62ff385b1da86e2870f
4
- data.tar.gz: 3abf7aae865ba509a9e194532a3d5537be98f1fdc90994e6a6f24acd874ff45d
3
+ metadata.gz: e5a3a62305ec0084d72c0728ce95eba9c0dd5a2ad2dee854689cbe24a060f2f7
4
+ data.tar.gz: 93788129a414a9c955d0c9b90d3e6cd89d0208c6de3c5c0ef98a187b312a4fcd
5
5
  SHA512:
6
- metadata.gz: ebe845b8986e0a760156f11a42e837ce874859da1392890a8e1419df66964d501b8aa57e24ade1f02928e6b324ba2c25b61c2be86e0238bc96fa6f142e428a57
7
- data.tar.gz: b9ed85962f324e1bfccbccb16ac6d8d01b4ba15bf5b058769d99f92288fb75b51f7b8c338fbb2c8a14ac9aa7155f33ef4903ac4e92c199c71f0cefcd6b877cab
6
+ metadata.gz: 325906365b1cf207db50fb6312e4ab55f79cadb763a52b200b5b4713db58810cf52fed11cd726e9f7da64e491293f2806f82e422a2633f05f40d1222d35171ab
7
+ data.tar.gz: 587a0a3266d26944ddf8c35168c2703a57e0786a8495a7081b225fbbaea3b01ec58b560b4fabf2ff05c954d36afa47ae6d41aa906a5fc2f87179eed997e1793f
data/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.6.21] - 2026-10-22
4
+
5
+ ### Fixed
6
+
7
+ - RuboCop did not resolve config to project directory.
8
+ - Python program did not use correct separator for double dash options.
9
+
3
10
  ## [0.6.20] - 2026-09-25
4
11
 
5
12
  ### Added
@@ -1822,6 +1829,7 @@
1822
1829
 
1823
1830
  - Changelog was created.
1824
1831
 
1832
+ [0.6.21]: https://github.com/anpham6/squared-ruby/releases/tag/v0.6.21
1825
1833
  [0.6.20]: https://github.com/anpham6/squared-ruby/releases/tag/v0.6.20
1826
1834
  [0.6.19]: https://github.com/anpham6/squared-ruby/releases/tag/v0.6.19
1827
1835
  [0.6.18]: https://github.com/anpham6/squared-ruby/releases/tag/v0.6.18
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Squared
4
- VERSION = '0.6.20'
4
+ VERSION = '0.6.21'
5
5
  end
@@ -1168,10 +1168,20 @@ module Squared
1168
1168
  ret = basepath(*args)
1169
1169
  return ret unless ascend && !ret.exist?
1170
1170
 
1171
+ case ascend
1172
+ when String, Pathname
1173
+ root = Pathname.new(ascend).cleanpath
1174
+ root = nil unless root.absolute? && root.directory?
1175
+ end
1171
1176
  path.parent.ascend.each do |dir|
1172
1177
  target = dir.join(*args)
1173
1178
  return target if target.exist?
1174
- break if (ascend.is_a?(String) && dir.join(ascend).exist?) || workspace.root == dir || parent&.path == dir
1179
+
1180
+ if root
1181
+ break if dir == root
1182
+ elsif workspace.root == dir || parent&.path == dir || (ascend.is_a?(String) && dir.join(ascend).exist?)
1183
+ break
1184
+ end
1175
1185
  end
1176
1186
  ret
1177
1187
  end
@@ -627,7 +627,7 @@ module Squared
627
627
  append_platform
628
628
  end
629
629
  end
630
- cmd << '--package-lock=false' << 'save=false' if nolockfile?('npm')
630
+ cmd << '--package-lock=false' << '--save=false' if nolockfile?('npm')
631
631
  cmd << '--ignore-scripts' if option('ignore-scripts')
632
632
  end
633
633
  if add
@@ -251,7 +251,7 @@ module Squared
251
251
  args = args.to_a
252
252
  if args.empty?
253
253
  args = readline('Enter command', force: true).split(' ', 2)
254
- elsif args.size == 1 && !option('interactive', equals: '0', prefix: ref)
254
+ elsif args.size == 1 && !option('interactive', equals: '0', prefix: 'python')
255
255
  args << readline('Enter arguments', force: false) unless args.first.include?(' ')
256
256
  end
257
257
  venv_init
@@ -311,18 +311,18 @@ module Squared
311
311
  end
312
312
  when :upgrade
313
313
  task flag, [:strategy] do |_, args|
314
- install flag, (case args.strategy
315
- when 'eager'
316
- 'eager'
317
- when /^only-if|needed$/
318
- 'only-if-needed'
319
- end.yield_self do |val|
320
- if val
321
- args.extras << "upgrade-strategy=#{val}"
322
- else
323
- args.to_a
324
- end
325
- end)
314
+ val = case args.strategy
315
+ when 'eager'
316
+ 'eager'
317
+ when /^only-if/, /needed$/
318
+ 'only-if-needed'
319
+ end
320
+ args = if val
321
+ args.extras << "upgrade-strategy=#{val}"
322
+ else
323
+ args.to_a
324
+ end
325
+ install flag, args
326
326
  end
327
327
  when :target
328
328
  task flag, [:dir] do |_, args|
@@ -662,7 +662,7 @@ module Squared
662
662
  def python(*args, sync: true, banner: verbose?, with: nil, pass: PASS_PYTHON[:python], **kwargs)
663
663
  op = OptionPartition.new(session_opts(with, args: args, kwargs: kwargs, pass: pass), OPT_PYTHON[:common],
664
664
  session('python', path: venv.nil?),
665
- project: self, multiple: [/^-c/], single: singleopt(:python), args: true,
665
+ project: self, multiple: [/^-c/], single: singleopt(:python), sep: ' ', args: true,
666
666
  stdin: true)
667
667
  op.concat(args)
668
668
  if op.include?('-')
@@ -831,7 +831,8 @@ module Squared
831
831
  def create_session(*cmd, name:, common:, opts: nil)
832
832
  return session(name, *preopts, *cmd, path: venv.nil?) unless opts
833
833
 
834
- op = OptionPartition.new(opts, common, project: self, single: singleopt(name.to_sym))
834
+ op = OptionPartition.new(opts, common, project: self, sep: name == 'python' ? ' ' : '=',
835
+ single: singleopt(name.to_sym))
835
836
  [session(name, *preopts, *op.to_a, *cmd, path: venv.nil?), op.extras]
836
837
  end
837
838
 
@@ -207,7 +207,8 @@ module Squared
207
207
  basepath(gemspec.include?('.') ? gemspec : "#{gemspec}.gemspec")
208
208
  end
209
209
  @steepfile = basepath! steep if steep
210
- @rubocopfile = Pathname.new(rubocop).realpath rescue basepath!(Dir.home, '.rubocop.yml') if rubocop
210
+ rubocop = rootpath('.rubocop.yml', ascend: Dir.home) if rubocop == true
211
+ @rubocopfile = basepath! rubocop if rubocop
211
212
  return unless rakefile && @output[0].nil? && @copy.nil? && !version && !self.autodetect
212
213
 
213
214
  begin
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: squared
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.20
4
+ version: 0.6.21
5
5
  platform: ruby
6
6
  authors:
7
7
  - An Pham
@@ -124,7 +124,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
124
124
  - !ruby/object:Gem::Version
125
125
  version: '0'
126
126
  requirements: []
127
- rubygems_version: 4.0.20
127
+ rubygems_version: 4.0.23
128
128
  specification_version: 4
129
129
  summary: Rake task generator for managing multi-language workspaces.
130
130
  test_files: []