squared 0.2.8 → 0.2.10
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 +39 -0
- data/lib/squared/common/format.rb +5 -1
- data/lib/squared/common/prompt.rb +1 -1
- data/lib/squared/common/shell.rb +2 -2
- data/lib/squared/version.rb +1 -1
- data/lib/squared/workspace/application.rb +1 -1
- data/lib/squared/workspace/project/base.rb +29 -23
- data/lib/squared/workspace/project/git.rb +44 -48
- data/lib/squared/workspace/project/node.rb +3 -3
- data/lib/squared/workspace/project/python.rb +3 -4
- data/lib/squared/workspace/project/ruby.rb +6 -4
- data/lib/squared/workspace/repo.rb +0 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b8b2e8a394034cfe323c5997a02b1e7c3f9ea0e2c9df925a87801fc8b9a61061
|
4
|
+
data.tar.gz: c30e2dcd5d3cea0526eea68f47ae8740949a4eb3b32ff1e76f9a15fc5e115f85
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4ec98cbf7dd9a4f0c63d316650fd3163cc0ec78934c30f638bbc531c31c8bfec075c8911c28a3af1b5f74ae1b5cdb92721f5f17e4e0973e3a7ecdbd326664a0b
|
7
|
+
data.tar.gz: 4b4f4270e87a1a427c30ed8c2f1fadeea9aad227592bd2268117f303919c27ec14adb596fb7668f611bbad20000376cf936050537f202533613ba333330b48c5
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,40 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## [0.2.10] - 2025-04-27
|
4
|
+
|
5
|
+
### Fixed
|
6
|
+
|
7
|
+
- Project run and script tasks did not fire first and last callbacks.
|
8
|
+
- Git command clone did not read booleans for recurse-submodules.
|
9
|
+
|
10
|
+
## [0.1.7] - 2025-04-27
|
11
|
+
|
12
|
+
### Fixed
|
13
|
+
|
14
|
+
- Project directory context method option pass was inverted.
|
15
|
+
- Shell options with spaces and without quotes were not escaped.
|
16
|
+
- Git task status did not display branch information.
|
17
|
+
- Ruby copy method argument include was ignored when used directly.
|
18
|
+
- Git commit could not push branch without same name as remote.
|
19
|
+
|
20
|
+
## [0.2.9] - 2025-04-17
|
21
|
+
|
22
|
+
### Changed
|
23
|
+
|
24
|
+
- Project log file naming supports more date formats.
|
25
|
+
|
26
|
+
### Fixed
|
27
|
+
|
28
|
+
- Environment options did not always pass session object.
|
29
|
+
- Git command pull actions used unknown flags.
|
30
|
+
- Workspace describe did not merge multiple invocations.
|
31
|
+
|
32
|
+
## [0.1.6] - 2025-04-17
|
33
|
+
|
34
|
+
### Fixed
|
35
|
+
|
36
|
+
- Project path validation did not include separator.
|
37
|
+
|
3
38
|
## [0.2.8] - 2025-04-12
|
4
39
|
|
5
40
|
### Fixed
|
@@ -234,6 +269,8 @@
|
|
234
269
|
|
235
270
|
- Changelog was created.
|
236
271
|
|
272
|
+
[0.2.10]: https://github.com/anpham6/squared/releases/tag/v0.2.10-ruby
|
273
|
+
[0.2.9]: https://github.com/anpham6/squared/releases/tag/v0.2.9-ruby
|
237
274
|
[0.2.8]: https://github.com/anpham6/squared/releases/tag/v0.2.8-ruby
|
238
275
|
[0.2.7]: https://github.com/anpham6/squared/releases/tag/v0.2.7-ruby
|
239
276
|
[0.2.6]: https://github.com/anpham6/squared/releases/tag/v0.2.6-ruby
|
@@ -243,6 +280,8 @@
|
|
243
280
|
[0.2.2]: https://github.com/anpham6/squared/releases/tag/v0.2.2-ruby
|
244
281
|
[0.2.1]: https://github.com/anpham6/squared/releases/tag/v0.2.1-ruby
|
245
282
|
[0.2.0]: https://github.com/anpham6/squared/releases/tag/v0.2.0-ruby
|
283
|
+
[0.1.7]: https://github.com/anpham6/squared/releases/tag/v0.1.7-ruby
|
284
|
+
[0.1.6]: https://github.com/anpham6/squared/releases/tag/v0.1.6-ruby
|
246
285
|
[0.1.5]: https://github.com/anpham6/squared/releases/tag/v0.1.5-ruby
|
247
286
|
[0.1.4]: https://github.com/anpham6/squared/releases/tag/v0.1.4-ruby
|
248
287
|
[0.1.3]: https://github.com/anpham6/squared/releases/tag/v0.1.3-ruby
|
@@ -53,7 +53,7 @@ module Squared
|
|
53
53
|
end
|
54
54
|
wrap = ->(s, n) { "\x1B[#{n.join(';')}m#{s}\x1B[0m" }
|
55
55
|
code = []
|
56
|
-
args.concat(as_a(styles)).each_with_index do |type, i|
|
56
|
+
args.concat(as_a(styles)).flatten.each_with_index do |type, i|
|
57
57
|
next unless type
|
58
58
|
|
59
59
|
if index == -1
|
@@ -274,6 +274,10 @@ module Squared
|
|
274
274
|
val.gsub(/\x1B\[(\d+;?)+m/, '')
|
275
275
|
end
|
276
276
|
|
277
|
+
def stripext(val)
|
278
|
+
File.basename(val, File.extname(val))
|
279
|
+
end
|
280
|
+
|
277
281
|
def raise_error(*args, hint: nil, kind: ArgumentError)
|
278
282
|
raise kind, message(*args, hint: hint, empty: true), caller_locations(1).map(&:to_s)
|
279
283
|
end
|
data/lib/squared/common/shell.rb
CHANGED
@@ -10,7 +10,7 @@ module Squared
|
|
10
10
|
|
11
11
|
def shell_escape(val, quote: false, force: false)
|
12
12
|
if (data = /\A(--?[^= ]+)((=|\s+)(["'])?(.+?)(["'])?)?\z/m.match(val = val.to_s))
|
13
|
-
return val if !data[2] || (!data[4] && data[5]
|
13
|
+
return val if !data[2] || (!data[4] && !data[5].match?(/\s/))
|
14
14
|
|
15
15
|
join = ->(opt) { data[1] + data[3] + shell_quote(opt) }
|
16
16
|
if data[4] == data[6]
|
@@ -21,7 +21,7 @@ module Squared
|
|
21
21
|
elsif Rake::Win32.windows?
|
22
22
|
quote ? shell_quote(val, force: force) : val
|
23
23
|
else
|
24
|
-
Shellwords.escape(val)
|
24
|
+
val.empty? ? '' : Shellwords.escape(val)
|
25
25
|
end
|
26
26
|
end
|
27
27
|
|
data/lib/squared/version.rb
CHANGED
@@ -163,19 +163,24 @@ module Squared
|
|
163
163
|
return if @log
|
164
164
|
|
165
165
|
log = log.is_a?(Hash) ? log.dup : { file: log }
|
166
|
-
|
167
|
-
file =
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
166
|
+
if (file = env('LOG_FILE'))
|
167
|
+
file = DateTime.now.strftime(file)
|
168
|
+
elsif (val = env('LOG_AUTO'))
|
169
|
+
file = "#{@name}-%s.log" % [case val
|
170
|
+
when 'y', 'year'
|
171
|
+
Date.today.year
|
172
|
+
when 'm', 'month'
|
173
|
+
Date.today.strftime('%Y-%m')
|
174
|
+
when 'd', 'day', '1'
|
175
|
+
Date.today
|
176
|
+
else
|
177
|
+
val.include?('%') ? DateTime.now.strftime(val) : DateTime.now.strftime
|
178
|
+
end]
|
179
|
+
elsif (val = log[:file])
|
180
|
+
file = val.is_a?(String) ? DateTime.now.strftime(val) : "#{@name}-#{Date.today}.log"
|
175
181
|
end
|
176
|
-
if file
|
177
|
-
file =
|
178
|
-
file = (dir = env('LOG_DIR')) ? @workspace.home.join(dir, file) : @workspace.home.join(file)
|
182
|
+
if file
|
183
|
+
file = (val = env('LOG_DIR')) ? @workspace.home.join(val, file) : @workspace.home.join(file)
|
179
184
|
begin
|
180
185
|
file = file.realdirpath
|
181
186
|
rescue StandardError => e
|
@@ -347,10 +352,10 @@ module Squared
|
|
347
352
|
self
|
348
353
|
end
|
349
354
|
|
350
|
-
def build(*args, from: :
|
355
|
+
def build(*args, from: :run, sync: invoked_sync?('build'), **)
|
351
356
|
banner = verbose
|
352
357
|
if args.empty?
|
353
|
-
return unless from == :
|
358
|
+
return unless from == :run
|
354
359
|
|
355
360
|
cmd, opts, var, flags = @output
|
356
361
|
banner = verbose == 1 if task_invoked?('build', 'build:sync')
|
@@ -371,6 +376,7 @@ module Squared
|
|
371
376
|
return unless respond_to?(:compose)
|
372
377
|
|
373
378
|
cmd = compose(opts, flags, from: from, script: true)
|
379
|
+
from = :script if from == :run && script?
|
374
380
|
end
|
375
381
|
run(cmd, var, from: from, banner: banner, sync: sync)
|
376
382
|
end
|
@@ -777,7 +783,7 @@ module Squared
|
|
777
783
|
end
|
778
784
|
|
779
785
|
def session(*cmd, prefix: cmd.first, main: true, options: true)
|
780
|
-
prefix = prefix.to_s.upcase
|
786
|
+
prefix = stripext(prefix.to_s).upcase
|
781
787
|
if (val = PATH[prefix] || PATH[prefix.to_sym])
|
782
788
|
cmd[0] = shell_quote(val, force: false)
|
783
789
|
end
|
@@ -798,11 +804,10 @@ module Squared
|
|
798
804
|
cmd.done
|
799
805
|
end
|
800
806
|
|
801
|
-
def option(*args,
|
807
|
+
def option(*args, target: @session, prefix: target&.first, **kwargs)
|
802
808
|
if prefix
|
803
|
-
prefix = File.basename(prefix, File.extname(prefix))
|
804
809
|
args.each do |val|
|
805
|
-
ret = env("#{prefix}_#{val.gsub(/\W/, '_')}".upcase, **kwargs)
|
810
|
+
ret = env("#{stripext(prefix)}_#{val.gsub(/\W/, '_')}".upcase, **kwargs)
|
806
811
|
return ret if ret
|
807
812
|
end
|
808
813
|
end
|
@@ -1012,7 +1017,7 @@ module Squared
|
|
1012
1017
|
|
1013
1018
|
def append_first(list, target: @session, flag: true, equals: false, quote: false, escape: true, **kwargs)
|
1014
1019
|
list.each do |opt|
|
1015
|
-
next unless (val = option(opt, **kwargs))
|
1020
|
+
next unless (val = option(opt, target: target, **kwargs))
|
1016
1021
|
|
1017
1022
|
return target << (if flag
|
1018
1023
|
shell_option(opt, equals ? val : nil, quote: quote, escape: escape)
|
@@ -1025,14 +1030,14 @@ module Squared
|
|
1025
1030
|
|
1026
1031
|
def append_option(list, target: @session, equals: false, quote: false, escape: true, **kwargs)
|
1027
1032
|
list.each do |flag|
|
1028
|
-
next unless (val = option(flag, **kwargs))
|
1033
|
+
next unless (val = option(flag, target: target, **kwargs))
|
1029
1034
|
|
1030
1035
|
target << shell_option(flag, equals ? val : nil, quote: quote, escape: escape)
|
1031
1036
|
end
|
1032
1037
|
end
|
1033
1038
|
|
1034
1039
|
def append_nocolor(target: @session)
|
1035
|
-
target << '--no-color' if !ARG[:COLOR] || stdin? || option('no-color', ignore: false)
|
1040
|
+
target << '--no-color' if !ARG[:COLOR] || stdin? || option('no-color', target: target, ignore: false)
|
1036
1041
|
end
|
1037
1042
|
|
1038
1043
|
def param_guard(action, flag, args: nil, key: nil, pat: nil)
|
@@ -1114,7 +1119,7 @@ module Squared
|
|
1114
1119
|
pwd = Pathname.pwd
|
1115
1120
|
if block_given?
|
1116
1121
|
begin
|
1117
|
-
if path == pwd || pass == true || (pass.is_a?(String) && semscan(pass).join
|
1122
|
+
if path == pwd || pass == true || (pass.is_a?(String) && semscan(pass).join <= RUBY_VERSION)
|
1118
1123
|
ret = instance_eval(&blk)
|
1119
1124
|
else
|
1120
1125
|
Dir.chdir(path)
|
@@ -1193,7 +1198,8 @@ module Squared
|
|
1193
1198
|
end
|
1194
1199
|
|
1195
1200
|
def projectpath?(val)
|
1196
|
-
Pathname.new(val).
|
1201
|
+
val = Pathname.new(val).cleanpath
|
1202
|
+
val.absolute? ? val.to_s.start_with?(File.join(path, '')) : !val.to_s.start_with?(File.join('..', ''))
|
1197
1203
|
end
|
1198
1204
|
|
1199
1205
|
def semmajor?(cur, want)
|
@@ -72,13 +72,13 @@ module Squared
|
|
72
72
|
|
73
73
|
module Project
|
74
74
|
class Git < Base
|
75
|
-
FOR_FETCH = %w[atomic multiple negotiate-only prefetch progress prune-tags refetch
|
75
|
+
FOR_FETCH = %w[atomic multiple negotiate-only prefetch progress prune-tags refetch].freeze
|
76
76
|
NO_FETCH = %w[all ipv4 ipv6 recurse-submodules show-forced-updates tags].freeze
|
77
77
|
FNO_FETCH = %w[auto-gc auto-maintenance write-commit-graph write-fetch-head].freeze
|
78
78
|
OPT_FETCH = (FOR_FETCH + NO_FETCH + FNO_FETCH +
|
79
79
|
%w[append dry-run force keep prune quiet set-upstream unshallow update-shallow verbose
|
80
|
-
deepen=i depth=i jobs=i negotiation-tip=s refmap=s
|
81
|
-
shallow-since=d upload-pack=s]).freeze
|
80
|
+
deepen=i depth=i jobs=i negotiation-tip=s refmap=s recurse-submodules=s server-option=s
|
81
|
+
shallow-exclude=s shallow-since=d upload-pack=s]).freeze
|
82
82
|
NO_PULL = %w[allow-unrelated-histories autostash commit edit ff signoff squash stat verify verify-signatures
|
83
83
|
gpg-sign=? log=? rebase=?].freeze
|
84
84
|
OPT_PULL = (NO_PULL + %w[ff-only signoff=s strategy=s strategy-option=s]).freeze
|
@@ -439,8 +439,11 @@ module Squared
|
|
439
439
|
end
|
440
440
|
|
441
441
|
def pull(flag = nil, sync: invoked_sync?('pull', flag), remote: nil, opts: [])
|
442
|
-
cmd = git_session 'pull'
|
443
|
-
if
|
442
|
+
cmd = git_session 'pull'
|
443
|
+
if flag == :rebase
|
444
|
+
cmd << '--rebase'
|
445
|
+
cmd << '--autostash' if option('autostash')
|
446
|
+
elsif (val = option('rebase', ignore: false))
|
444
447
|
cmd << case val
|
445
448
|
when '0'
|
446
449
|
'--no-rebase'
|
@@ -540,6 +543,7 @@ module Squared
|
|
540
543
|
def status(*, sync: invoked_sync?('status'), **)
|
541
544
|
cmd = git_session 'status'
|
542
545
|
cmd << (option('long') ? '--long' : '--short')
|
546
|
+
cmd << '--branch' if option('branch')
|
543
547
|
if (val = option('ignore-submodules', ignore: false))
|
544
548
|
cmd << basic_option('ignore-submodules', case val
|
545
549
|
when '0', 'none'
|
@@ -719,53 +723,39 @@ module Squared
|
|
719
723
|
raise_error('commit', 'pathspec', hint: 'missing') if (files = projectmap(files)).empty?
|
720
724
|
"-- #{files.join(' ')}"
|
721
725
|
end
|
722
|
-
|
726
|
+
format = '%(if)%(HEAD)%(then)%(refname:short)...%(upstream:short)...%(upstream:track)%(end)'
|
723
727
|
branch = nil
|
724
|
-
|
725
|
-
source(git_output('fetch --no-tags --quiet'), io: true, banner: false)
|
726
|
-
|
727
|
-
|
728
|
-
|
729
|
-
|
730
|
-
|
731
|
-
if !
|
732
|
-
|
733
|
-
|
734
|
-
|
735
|
-
|
736
|
-
|
737
|
-
|
738
|
-
origin = s[0..s.size - branch.size - 2]
|
739
|
-
break
|
740
|
-
end
|
741
|
-
end
|
742
|
-
end
|
743
|
-
upstream = true if origin
|
744
|
-
elsif (data = Regexp.new("^(.+)/#{Regexp.escape(branch)}$").match(data[3]))
|
745
|
-
origin = data[1]
|
728
|
+
origin = nil
|
729
|
+
source(git_output('fetch --no-tags --quiet'), io: true, banner: false, stdout: true)
|
730
|
+
cmd = git_output("for-each-ref --format=\"#{format}\" refs/heads")
|
731
|
+
source(cmd, io: true, banner: false).first.each do |line|
|
732
|
+
next if (line = line.chomp).empty?
|
733
|
+
|
734
|
+
branch, origin, hint = line.split('...')
|
735
|
+
if hint && !hint.match?(/^\[(\D+0,\D+0)\]$/)
|
736
|
+
raise_error('work tree is not usable', hint: hint[1..-2])
|
737
|
+
elsif origin.empty?
|
738
|
+
return nil if pass
|
739
|
+
|
740
|
+
raise_error('no remote upstream', hint: branch)
|
746
741
|
end
|
747
742
|
break
|
748
743
|
end
|
749
|
-
|
744
|
+
i = origin.index('/')
|
745
|
+
branch = "#{branch}:#{origin[i + 1..-1]}" unless origin.end_with?("/#{branch}")
|
746
|
+
origin = origin[0..i - 1]
|
750
747
|
cmd = git_session('commit', option('dry-run') && '--dry-run', options: false)
|
751
|
-
if amend
|
752
|
-
cmd << '--amend'
|
753
|
-
else
|
754
|
-
cmd.delete('--amend')
|
755
|
-
end
|
748
|
+
cmd << '--amend' if amend
|
756
749
|
if message
|
757
750
|
append_message message
|
758
751
|
elsif flag == :'amend-orig' || option('no-edit')
|
759
752
|
cmd << '--no-edit'
|
760
753
|
end
|
761
754
|
a = git_output 'add', '--verbose'
|
762
|
-
b = git_output 'push'
|
763
|
-
if dryrun?
|
764
|
-
a << '--dry-run'
|
765
|
-
b << '--dry-run'
|
766
|
-
end
|
755
|
+
b = git_output 'push'
|
756
|
+
b << '--dry-run' if dryrun?
|
767
757
|
a << pathspec
|
768
|
-
b << '--force' if amend
|
758
|
+
b << '--force-with-lease' if amend
|
769
759
|
b << origin << branch
|
770
760
|
puts if pass
|
771
761
|
source a
|
@@ -1019,7 +1009,7 @@ module Squared
|
|
1019
1009
|
end
|
1020
1010
|
|
1021
1011
|
def append_pull(opts, list, no = [], target: @session, flag: nil, remote: nil)
|
1022
|
-
|
1012
|
+
target << '--force' if option('force', target: target)
|
1023
1013
|
modules = append_submodules(target: target)
|
1024
1014
|
out = []
|
1025
1015
|
refspec = []
|
@@ -1050,7 +1040,7 @@ module Squared
|
|
1050
1040
|
end
|
1051
1041
|
if remote
|
1052
1042
|
append_value(remote, target: target, delim: true, quote: true)
|
1053
|
-
if (val = option('refspec', strict: true))
|
1043
|
+
if (val = option('refspec', target: target, strict: true))
|
1054
1044
|
append_value(split_escape(val), target: target, escape: false)
|
1055
1045
|
else
|
1056
1046
|
target.merge(refspec)
|
@@ -1069,7 +1059,7 @@ module Squared
|
|
1069
1059
|
end
|
1070
1060
|
|
1071
1061
|
def append_pathspec(files = [], target: @session, expect: false, parent: false)
|
1072
|
-
if files.empty? && (val = option('pathspec'))
|
1062
|
+
if files.empty? && (val = option('pathspec', target: target))
|
1073
1063
|
files = split_escape(val)
|
1074
1064
|
end
|
1075
1065
|
files = projectmap(files, parent: parent)
|
@@ -1091,19 +1081,25 @@ module Squared
|
|
1091
1081
|
end
|
1092
1082
|
|
1093
1083
|
def append_submodules(from = nil, target: @session)
|
1094
|
-
return unless (val = option('recurse-submodules', ignore: false))
|
1084
|
+
return unless (val = option('recurse-submodules', target: target, ignore: false))
|
1095
1085
|
|
1096
1086
|
if from == :clone
|
1097
|
-
|
1098
|
-
|
1087
|
+
case val
|
1088
|
+
when '0', 'false'
|
1089
|
+
target << '--no-recurse-submodules'
|
1090
|
+
when '1', 'true'
|
1091
|
+
target << '--recurse-submodules'
|
1092
|
+
else
|
1093
|
+
projectmap(split_escape(val)).each do |path|
|
1094
|
+
target << basic_option('recurse-submodules', path)
|
1095
|
+
end
|
1099
1096
|
end
|
1100
|
-
target
|
1101
1097
|
else
|
1102
1098
|
target << case val
|
1103
1099
|
when 'no', '0'
|
1104
1100
|
'--no-recurse-submodules'
|
1105
1101
|
when 'yes', 'on-demand'
|
1106
|
-
"--recurse-submodules
|
1102
|
+
"--recurse-submodules=#{val}"
|
1107
1103
|
else
|
1108
1104
|
'--recurse-submodules'
|
1109
1105
|
end
|
@@ -577,8 +577,8 @@ module Squared
|
|
577
577
|
run
|
578
578
|
end
|
579
579
|
|
580
|
-
def compose(opts, flags = nil, script: false, from:
|
581
|
-
return unless opts && script
|
580
|
+
def compose(opts, flags = nil, script: false, from: nil)
|
581
|
+
return unless opts && script
|
582
582
|
|
583
583
|
ret = session dependbin, 'run', flags
|
584
584
|
append_loglevel
|
@@ -588,7 +588,7 @@ module Squared
|
|
588
588
|
when String
|
589
589
|
ret << opts
|
590
590
|
else
|
591
|
-
raise_error("#{dependbin} script name", hint:
|
591
|
+
raise_error("#{dependbin} script name: given #{opts}", hint: from)
|
592
592
|
end
|
593
593
|
ret
|
594
594
|
end
|
@@ -246,7 +246,6 @@ module Squared
|
|
246
246
|
append_global(target: target)
|
247
247
|
return
|
248
248
|
end
|
249
|
-
|
250
249
|
out = []
|
251
250
|
opts, pat = option_partition(opts, OPT_INSTALL + OPT_GENERAL, target: target)
|
252
251
|
append_global(target: target)
|
@@ -281,7 +280,7 @@ module Squared
|
|
281
280
|
end
|
282
281
|
|
283
282
|
def append_global(target: @session)
|
284
|
-
if (val = option('cache-dir'))
|
283
|
+
if (val = option('cache-dir', target: target))
|
285
284
|
target << case val
|
286
285
|
when '0', 'false'
|
287
286
|
'--no-cache-dir'
|
@@ -289,8 +288,8 @@ module Squared
|
|
289
288
|
quote_option('cache-dir', basepath(val))
|
290
289
|
end
|
291
290
|
end
|
292
|
-
target << quote_option('proxy', val) if (val = option('proxy'))
|
293
|
-
target << quote_option('python', basepath(val)) if (val = option('python'))
|
291
|
+
target << quote_option('proxy', val) if (val = option('proxy', target: target))
|
292
|
+
target << quote_option('python', basepath(val)) if (val = option('python', target: target))
|
294
293
|
append_nocolor(target: target)
|
295
294
|
end
|
296
295
|
end
|
@@ -192,13 +192,15 @@ module Squared
|
|
192
192
|
end
|
193
193
|
end
|
194
194
|
|
195
|
-
def copy(from: 'lib',
|
195
|
+
def copy(from: 'lib', into: @gemdir, override: false, **kwargs)
|
196
|
+
glob = kwargs[:include]
|
197
|
+
pass = kwargs[:exclude]
|
196
198
|
if @copy && !override
|
197
199
|
return super if runnable?(@copy)
|
198
200
|
|
199
201
|
from = @copy[:from] if @copy.key?(:from)
|
200
202
|
glob = @copy[:include] if @copy.key?(:include)
|
201
|
-
|
203
|
+
pass = @copy[:exclude] if @copy.key?(:exclude)
|
202
204
|
into = @copy[:into] if @copy.key?(:into)
|
203
205
|
end
|
204
206
|
return unless into
|
@@ -210,10 +212,10 @@ module Squared
|
|
210
212
|
as_a(from).each_with_index do |val, i|
|
211
213
|
a = basepath(val)
|
212
214
|
b = dest.join(val)
|
213
|
-
c = glob[i] || glob
|
215
|
+
c = glob[i] || glob.first
|
214
216
|
log.info "cp #{a.join(c)} #{b}"
|
215
217
|
begin
|
216
|
-
copy_dir(a, b, c, pass:
|
218
|
+
copy_dir(a, b, c, pass: pass, verbose: verbose)
|
217
219
|
rescue StandardError => e
|
218
220
|
log.error e
|
219
221
|
ret = on(:error, :copy, e)
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: squared
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- An Pham
|
8
8
|
bindir: exe
|
9
9
|
cert_chain: []
|
10
|
-
date:
|
10
|
+
date: 2025-04-28 00:00:00.000000000 Z
|
11
11
|
dependencies:
|
12
12
|
- !ruby/object:Gem::Dependency
|
13
13
|
name: rake
|
@@ -120,7 +120,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
120
120
|
- !ruby/object:Gem::Version
|
121
121
|
version: '0'
|
122
122
|
requirements: []
|
123
|
-
rubygems_version: 3.6.
|
123
|
+
rubygems_version: 3.6.2
|
124
124
|
specification_version: 4
|
125
125
|
summary: Rake task generator for managing multi-language workspaces.
|
126
126
|
test_files: []
|