squared 0.3.9 → 0.3.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 +34 -0
- data/README.ruby.md +1 -1
- data/lib/squared/common/format.rb +1 -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/project/base.rb +2 -1
- data/lib/squared/workspace/project/git.rb +55 -63
- data/lib/squared/workspace/project/node.rb +3 -3
- 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: 86709d5961b0a4cf2fd7192ea64d178737ca047b286f5d1888cc9cb58412697a
|
4
|
+
data.tar.gz: e95da9ca85b3e493e20743da05b552840b0a4a77f4afec1b0edd947ec3e27229
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f2e5eeda8962c5d2e8e0734f0784c2138312e2c6b0c27ccd07e9c7c0a3fde17fe1b32e4c596206696a6c29daf05414c8f5474b141ff604292f18e1a3563d8aa0
|
7
|
+
data.tar.gz: af7771a53f01d2083c5d7ad7832e036aade52441493733a76604b5af884214cf26fb84ef9b7a451a84e1f725f15f396123b6eda9b49560ef7f722a24b4173b71
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,36 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## [0.3.10] - 2025-04-27
|
4
|
+
|
5
|
+
### Fixed
|
6
|
+
|
7
|
+
- Git command reset action commit used invalid delimeter.
|
8
|
+
- Git single option values were not merged as per specification.
|
9
|
+
- Project script task did not fire first and last callbacks.
|
10
|
+
- Git task status did not display branch information.
|
11
|
+
- Git checkout action commit did not include options.
|
12
|
+
|
13
|
+
### Removed
|
14
|
+
|
15
|
+
- Git command files action ignored could not be used alone.
|
16
|
+
|
17
|
+
## [0.2.10] - 2025-04-27
|
18
|
+
|
19
|
+
### Fixed
|
20
|
+
|
21
|
+
- Project run and script tasks did not fire first and last callbacks.
|
22
|
+
- Git command clone did not read booleans for recurse-submodules.
|
23
|
+
|
24
|
+
## [0.1.7] - 2025-04-27
|
25
|
+
|
26
|
+
### Fixed
|
27
|
+
|
28
|
+
- Project directory context method option pass was inverted.
|
29
|
+
- Shell options with spaces and without quotes were not escaped.
|
30
|
+
- Git task status did not display branch information.
|
31
|
+
- Ruby copy method argument include was ignored when used directly.
|
32
|
+
- Git commit could not push branch without same name as remote.
|
33
|
+
|
3
34
|
## [0.3.9] - 2025-04-17
|
4
35
|
|
5
36
|
### Fixed
|
@@ -370,6 +401,7 @@
|
|
370
401
|
|
371
402
|
- Changelog was created.
|
372
403
|
|
404
|
+
[0.3.10]: https://github.com/anpham6/squared/releases/tag/v0.3.10-ruby
|
373
405
|
[0.3.9]: https://github.com/anpham6/squared/releases/tag/v0.3.9-ruby
|
374
406
|
[0.3.8]: https://github.com/anpham6/squared/releases/tag/v0.3.8-ruby
|
375
407
|
[0.3.7]: https://github.com/anpham6/squared/releases/tag/v0.3.7-ruby
|
@@ -380,6 +412,7 @@
|
|
380
412
|
[0.3.2]: https://github.com/anpham6/squared/releases/tag/v0.3.2-ruby
|
381
413
|
[0.3.1]: https://github.com/anpham6/squared/releases/tag/v0.3.1-ruby
|
382
414
|
[0.3.0]: https://github.com/anpham6/squared/releases/tag/v0.3.0-ruby
|
415
|
+
[0.2.10]: https://github.com/anpham6/squared/releases/tag/v0.2.10-ruby
|
383
416
|
[0.2.9]: https://github.com/anpham6/squared/releases/tag/v0.2.9-ruby
|
384
417
|
[0.2.8]: https://github.com/anpham6/squared/releases/tag/v0.2.8-ruby
|
385
418
|
[0.2.7]: https://github.com/anpham6/squared/releases/tag/v0.2.7-ruby
|
@@ -390,6 +423,7 @@
|
|
390
423
|
[0.2.2]: https://github.com/anpham6/squared/releases/tag/v0.2.2-ruby
|
391
424
|
[0.2.1]: https://github.com/anpham6/squared/releases/tag/v0.2.1-ruby
|
392
425
|
[0.2.0]: https://github.com/anpham6/squared/releases/tag/v0.2.0-ruby
|
426
|
+
[0.1.7]: https://github.com/anpham6/squared/releases/tag/v0.1.7-ruby
|
393
427
|
[0.1.6]: https://github.com/anpham6/squared/releases/tag/v0.1.6-ruby
|
394
428
|
[0.1.5]: https://github.com/anpham6/squared/releases/tag/v0.1.5-ruby
|
395
429
|
[0.1.4]: https://github.com/anpham6/squared/releases/tag/v0.1.4-ruby
|
data/README.ruby.md
CHANGED
@@ -433,7 +433,7 @@ Most project classes will inherit from `Git` which enables these tasks:
|
|
433
433
|
| commit | commit | add all amend amend-orig |
|
434
434
|
| diff | diff | head cached branch files between contain |
|
435
435
|
| fetch | fetch | origin remote |
|
436
|
-
| files | ls-files | cached modified deleted others
|
436
|
+
| files | ls-files | cached modified deleted others |
|
437
437
|
| pull | pull | origin remote |
|
438
438
|
| rebase | rebase | branch onto send |
|
439
439
|
| refs | ls-remote --refs | heads tags remote |
|
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
@@ -407,6 +407,7 @@ module Squared
|
|
407
407
|
return unless respond_to?(:compose)
|
408
408
|
|
409
409
|
cmd = compose(as_get(opts), flags, script: true, args: scr, from: from)
|
410
|
+
from = :script if from == :run && script?
|
410
411
|
end
|
411
412
|
run(cmd, var, from: from, banner: banner, sync: sync)
|
412
413
|
end
|
@@ -1314,7 +1315,7 @@ module Squared
|
|
1314
1315
|
pwd = Pathname.pwd
|
1315
1316
|
if block_given?
|
1316
1317
|
begin
|
1317
|
-
if path == pwd || pass == true || (pass.is_a?(String) && semscan(pass).join
|
1318
|
+
if path == pwd || pass == true || (pass.is_a?(String) && semscan(pass).join <= RUBY_VERSION)
|
1318
1319
|
ret = instance_eval(&blk)
|
1319
1320
|
else
|
1320
1321
|
Dir.chdir(path)
|
@@ -75,7 +75,7 @@ module Squared
|
|
75
75
|
include Prompt
|
76
76
|
|
77
77
|
OPT_GIT = {
|
78
|
-
branch: %w[a|all create-reflog i|ignore-case q|quiet r|remotes v|verbose abbrev=i color=b column=b
|
78
|
+
branch: %w[a|all create-reflog i|ignore-case q|quiet r|remotes v|verbose vv abbrev=i color=b column=b
|
79
79
|
contains=e format=q merged=e no-contains=e no-merged=e points-at=e u|set-upstream-to=e sort=q
|
80
80
|
t|track=b].freeze,
|
81
81
|
checkout: %w[l d|detach f|force ignore-other-worktrees ignore-skip-worktree-bits m|merge p|patch
|
@@ -88,7 +88,7 @@ module Squared
|
|
88
88
|
fetch: {
|
89
89
|
base: %w[multiple progress P|prune-tags refetch stdin u|update-head-ok
|
90
90
|
recurse-submodules-default=b].freeze,
|
91
|
-
pull: %w[4 6 n t a|append atomic dry-run f|force k|keep
|
91
|
+
pull: %w[4 6 n t a|append atomic dry-run f|force k|keep negotiate-only prefetch p|prune q|quiet
|
92
92
|
set-upstream unshallow update-shallow v|verbose deepen=i depth=i j|jobs=i negotiation-tip=q
|
93
93
|
recurse-submodules=v refmap=q o|server-option=e shallow-exclude=e shallow-since=v
|
94
94
|
upload-pack=e].freeze
|
@@ -104,40 +104,40 @@ module Squared
|
|
104
104
|
exclude-hidden=b? glob=q grep=q grep-reflog=q L=q n|max-count=i max-parents=i min-parents=i
|
105
105
|
no-walk=b? remotes=q? since=q since-as-filter=q skip=i tags=q? until=q].freeze,
|
106
106
|
format: %w[t children combined-all-paths oneline left-right no-diff-merges parents relative-date
|
107
|
-
show-signature date=q diff-merges=b encoding=b expand-tabs=i format=q notes=
|
107
|
+
show-signature date=q diff-merges=b encoding=b expand-tabs=i format=q notes=b pretty=q?
|
108
108
|
show-linear-break=q?].freeze,
|
109
109
|
diff: %w[p R u z l=i G=q O=q S=q binary check compact-summary cumulative find-copies-harder full-index
|
110
110
|
W|function-context w|ignore-all-space ignore-blank-lines ignore-cr-at-eol ignore-space-at-eol
|
111
111
|
b|ignore-space-change D|irreversible-delete graph ita-invisible-in-index minimal name-only
|
112
112
|
name-status no-color-moved-ws no-prefix no-renames numstat patch-with-raw patch-with-stat patience
|
113
113
|
pickaxe-all pickaxe-regex raw shortstat summary a|text abbrev=i? anchored=q B|break-rewrites=e?
|
114
|
-
color=b color-moved=b color-moved-ws=b color-words=q? diff-algorithm=b diff-filter=e? X|dirstat=
|
115
|
-
dirstat-by-file=q? dst-prefix=q C|find-copies=
|
114
|
+
color=b color-moved=b color-moved-ws=b color-words=q? diff-algorithm=b diff-filter=e? X|dirstat=b?
|
115
|
+
dirstat-by-file=q? dst-prefix=q C|find-copies=b? find-object=e M|find-renames=b?
|
116
116
|
I|ignore-matching-lines=q ignore-submodules=b inter-hunk-context=i line-prefix=q output=p
|
117
117
|
output-indicator-context=q output-indicator-new=q output-indicator-old=q relative=p rotate-to=p
|
118
118
|
skip-to=p src-prefix=q stat=q? stat-width=i stat-name-width=i stat-count=i submodule=b? U|unified=i
|
119
|
-
word-diff=b? word-diff-regex=q ws-error-
|
119
|
+
word-diff=b? word-diff-regex=q ws-error-highlight=b].freeze
|
120
120
|
}.freeze,
|
121
|
-
ls_files: %w[z debug deduplicate directory eol error-unmatch exclude-standard full-name
|
122
|
-
no-empty-directory recurse-submodules sparse s|stage u|unmerged abbrev=i x|exclude=q
|
121
|
+
ls_files: %w[f t v z debug deduplicate directory eol error-unmatch exclude-standard full-name i|ignored
|
122
|
+
k|killed no-empty-directory recurse-submodules sparse s|stage u|unmerged abbrev=i x|exclude=q
|
123
123
|
X|exclude-from=p exclude-per-directory=p format=q with-tree=q].freeze,
|
124
124
|
ls_remote: %w[exit-code get-url q|quiet o|server-option=e symref sort=q upload-pack=e].freeze,
|
125
|
-
pull: %w[e n allow-unrelated-histories ff-only S|gpg-sign=
|
125
|
+
pull: %w[e n allow-unrelated-histories ff-only S|gpg-sign=b? log=i r|rebase=v? s|strategy=b
|
126
126
|
X|strategy-option=e].freeze,
|
127
127
|
rebase: %w[n C=i allow-empty-message apply committer-date-is-author-date edit-todo f|force-rebase ignore-date
|
128
|
-
ignore-whitespace i|interactive keep-base m
|
129
|
-
reset-author-date root show-current-patch signoff v|verbose empty=b S|gpg-sign=b onto=e
|
128
|
+
ignore-whitespace i|interactive keep-base m|merge no-ff q|quiet quit r|rebase-merges=b?
|
129
|
+
reset-author-date root show-current-patch signoff v|verbose empty=b S|gpg-sign=b? onto=e
|
130
130
|
s|strategy=b X|strategy-option=b whitespace=e].freeze,
|
131
131
|
reset: %w[N pathspec-file-nul q|quiet pathspec-from-file=p].freeze,
|
132
132
|
restore: %w[ignore-unmerged ignore-skip-worktree-bits m|merge ours p|patch pathspec-file-nul S|staged theirs
|
133
133
|
W|worktree conflict=b pathspec-from-file=p s|source=q].freeze,
|
134
134
|
rev_parse: {
|
135
135
|
output: %w[absolute-git-dir all flags git-common-dir git-dir is-bare-repository is-inside-git-dir
|
136
|
-
is-inside-work-tree is-shallow-repository local-env-vars no-flags no-revs not q|quiet
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
136
|
+
is-inside-work-tree is-shallow-repository local-env-vars no-flags no-revs not q|quiet revs-only
|
137
|
+
shared-index-path show-cdup show-prefix show-toplevel show-superproject-working-tree sq sq-quote
|
138
|
+
symbolic symbolic-full-name verify abbrev-ref=b? after=q before=q default=e disambiguate=b
|
139
|
+
exclude=q exclude-hidden=b glob=q git-path=p path-format=b? prefix=q branches=q? remotes=q?
|
140
|
+
resolve-git-dir=p short=i? show-object-format=b? since=q tags=q? until=q].freeze,
|
141
141
|
parseopt: %w[keep-dashdash stop-at-non-option stuck-long].freeze
|
142
142
|
}.freeze,
|
143
143
|
show: %w[t combined-all-paths no-diff-merges remerge-diff show-signature diff-merges=b encoding=b
|
@@ -230,7 +230,7 @@ module Squared
|
|
230
230
|
'commit' => %i[add all amend amend-orig].freeze,
|
231
231
|
'diff' => %i[head cached branch files view between contain].freeze,
|
232
232
|
'fetch' => %i[origin remote].freeze,
|
233
|
-
'files' => %i[cached modified deleted others
|
233
|
+
'files' => %i[cached modified deleted others].freeze,
|
234
234
|
'log' => %i[view between contain].freeze,
|
235
235
|
'pull' => %i[origin remote].freeze,
|
236
236
|
'rebase' => %i[branch onto send].freeze,
|
@@ -402,7 +402,7 @@ module Squared
|
|
402
402
|
format_desc action, flag, 'branch/commit,opts*'
|
403
403
|
task flag, [:commit] do |_, args|
|
404
404
|
commit = param_guard(action, flag, args: args, key: :commit)
|
405
|
-
checkout(flag, commit: commit)
|
405
|
+
checkout(flag, args.extras, commit: commit)
|
406
406
|
end
|
407
407
|
when :detach
|
408
408
|
format_desc action, flag, 'branch/commit?'
|
@@ -689,6 +689,7 @@ module Squared
|
|
689
689
|
def status(*, sync: invoked_sync?('status'), **)
|
690
690
|
cmd = git_session 'status'
|
691
691
|
cmd << (option('long') ? '--long' : '--short')
|
692
|
+
cmd << '--branch' if option('branch')
|
692
693
|
if (val = option('ignore-submodules', ignore: false))
|
693
694
|
cmd << basic_option('ignore-submodules', case val
|
694
695
|
when '0', 'none'
|
@@ -723,13 +724,11 @@ module Squared
|
|
723
724
|
cmd = git_session 'reset'
|
724
725
|
case flag
|
725
726
|
when :commit, :index
|
726
|
-
|
727
|
+
refs = option_sanitize(opts, OPT_GIT[:reset] + VAL_GIT[:reset], no: OPT_GIT[:no][:reset]).first
|
727
728
|
if flag == :commit
|
728
|
-
append_value
|
729
|
-
option_clear
|
729
|
+
append_value commit
|
730
|
+
option_clear refs
|
730
731
|
ref = false
|
731
|
-
else
|
732
|
-
(refs ||= []).concat(out)
|
733
732
|
end
|
734
733
|
when :mode
|
735
734
|
return unless VAL_GIT[:reset].include?(mode)
|
@@ -780,7 +779,7 @@ module Squared
|
|
780
779
|
else
|
781
780
|
out = option_sanitize(opts, OPT_GIT[:checkout], no: OPT_GIT[:no][:checkout]).first
|
782
781
|
if flag == :commit
|
783
|
-
append_value
|
782
|
+
append_value commit
|
784
783
|
option_clear out
|
785
784
|
else
|
786
785
|
append_head
|
@@ -831,7 +830,7 @@ module Squared
|
|
831
830
|
cmd << shell_quote(range.join(flag == :between ? '..' : '...'))
|
832
831
|
else
|
833
832
|
commit, files = files.partition do |val|
|
834
|
-
val.start_with?('^') || (!%r{
|
833
|
+
val.start_with?('^') || (!%r{^.(?:[\\/]|$)}.match?(val) && !%r{[\\/]$}.match?(val)) || commithash(val)
|
835
834
|
end
|
836
835
|
cmd.merge(commit.map { |val| commithash(val) || shell_quote(val) }) unless commit.empty?
|
837
836
|
end
|
@@ -906,52 +905,39 @@ module Squared
|
|
906
905
|
else
|
907
906
|
"-- #{refs.join(' ')}"
|
908
907
|
end
|
909
|
-
|
908
|
+
format = '%(if)%(HEAD)%(then)%(refname:short)...%(upstream:short)...%(upstream:track)%(end)'
|
910
909
|
branch = nil
|
911
|
-
|
912
|
-
source(git_output('fetch --no-tags --quiet'), io: true, banner: false)
|
913
|
-
|
914
|
-
|
915
|
-
|
916
|
-
|
917
|
-
|
918
|
-
|
919
|
-
|
920
|
-
|
921
|
-
|
922
|
-
|
923
|
-
|
924
|
-
origin = s[0, s.size - branch.size - 1]
|
925
|
-
break
|
926
|
-
end
|
927
|
-
end
|
928
|
-
end
|
929
|
-
upstream = true if origin
|
930
|
-
elsif data[3] =~ %r{^(.+)/#{Regexp.escape(branch)}$}
|
931
|
-
origin = $1
|
910
|
+
origin = nil
|
911
|
+
source(git_output('fetch --no-tags --quiet'), io: true, banner: false, stdout: true)
|
912
|
+
cmd = git_output("for-each-ref --format=\"#{format}\" refs/heads")
|
913
|
+
source(cmd, io: true, banner: false).first.each do |line|
|
914
|
+
next if (line = line.chomp).empty?
|
915
|
+
|
916
|
+
branch, origin, hint = line.split('...')
|
917
|
+
if hint && !hint.match?(/^\[(\D+0,\D+0)\]$/)
|
918
|
+
raise_error('work tree is not usable', hint: hint[1..-2])
|
919
|
+
elsif origin.empty?
|
920
|
+
return nil if pass
|
921
|
+
|
922
|
+
raise_error('no remote upstream', hint: branch)
|
932
923
|
end
|
933
924
|
break
|
934
925
|
end
|
935
|
-
|
926
|
+
i = origin.index('/')
|
927
|
+
branch = "#{branch}:#{origin[i + 1..-1]}" unless origin.end_with?("/#{branch}")
|
928
|
+
origin = origin[0..i - 1]
|
936
929
|
cmd = git_session('commit', option('dry-run') && '--dry-run', options: false)
|
937
|
-
if amend
|
938
|
-
cmd << '--amend'
|
939
|
-
else
|
940
|
-
cmd.delete('--amend')
|
941
|
-
end
|
930
|
+
cmd << '--amend' if amend
|
942
931
|
if message
|
943
932
|
append_message message
|
944
933
|
elsif flag == :'amend-orig' || option('no-edit')
|
945
934
|
cmd << '--no-edit'
|
946
935
|
end
|
947
936
|
a = git_output 'add', '--verbose'
|
948
|
-
b = git_output 'push'
|
949
|
-
if dryrun?
|
950
|
-
a << '--dry-run'
|
951
|
-
b << '--dry-run'
|
952
|
-
end
|
937
|
+
b = git_output 'push'
|
938
|
+
b << '--dry-run' if dryrun?
|
953
939
|
a << pathspec
|
954
|
-
b << '--force' if amend
|
940
|
+
b << '--force-with-lease' if amend
|
955
941
|
b << origin << branch
|
956
942
|
puts if pass
|
957
943
|
source a
|
@@ -1304,16 +1290,22 @@ module Squared
|
|
1304
1290
|
return unless (val = option('recurse-submodules', target: target, ignore: false))
|
1305
1291
|
|
1306
1292
|
if from == :clone
|
1307
|
-
|
1308
|
-
|
1293
|
+
case val
|
1294
|
+
when '0', 'false'
|
1295
|
+
target << '--no-recurse-submodules'
|
1296
|
+
when '1', 'true'
|
1297
|
+
target << '--recurse-submodules'
|
1298
|
+
else
|
1299
|
+
projectmap(split_escape(val)).each do |path|
|
1300
|
+
target << basic_option('recurse-submodules', path)
|
1301
|
+
end
|
1309
1302
|
end
|
1310
|
-
target
|
1311
1303
|
else
|
1312
1304
|
target << case val
|
1313
1305
|
when 'no', '0'
|
1314
1306
|
'--no-recurse-submodules'
|
1315
1307
|
when 'yes', 'on-demand'
|
1316
|
-
"--recurse-submodules
|
1308
|
+
"--recurse-submodules=#{val}"
|
1317
1309
|
else
|
1318
1310
|
'--recurse-submodules'
|
1319
1311
|
end
|
@@ -699,12 +699,12 @@ module Squared
|
|
699
699
|
run(from: :pack)
|
700
700
|
end
|
701
701
|
|
702
|
-
def compose(opts, flags = nil, script: false, args: nil, from:
|
702
|
+
def compose(opts, flags = nil, script: false, args: nil, from: nil, **)
|
703
703
|
return unless opts
|
704
704
|
|
705
705
|
if script
|
706
706
|
ret = session dependbin, 'run'
|
707
|
-
raise_error("#{dependbin} run script: #{
|
707
|
+
raise_error("#{dependbin} run script: given #{opts}", hint: from) unless append_any(opts)
|
708
708
|
append_any flags if flags
|
709
709
|
append_loglevel
|
710
710
|
append_any(args, delim: true) if args
|
@@ -718,7 +718,7 @@ module Squared
|
|
718
718
|
when Enumerable
|
719
719
|
opts.to_a.join(' ')
|
720
720
|
else
|
721
|
-
raise_error("#{project}: #{
|
721
|
+
raise_error("#{project}: given #{opts}", hint: from)
|
722
722
|
end
|
723
723
|
end
|
724
724
|
end
|
@@ -186,13 +186,15 @@ module Squared
|
|
186
186
|
end
|
187
187
|
end
|
188
188
|
|
189
|
-
def copy(from: 'lib',
|
189
|
+
def copy(from: 'lib', into: @gemdir, override: false, **kwargs)
|
190
|
+
glob = kwargs[:include]
|
191
|
+
pass = kwargs[:exclude]
|
190
192
|
if @copy && !override
|
191
193
|
return super if runnable?(@copy)
|
192
194
|
|
193
195
|
from = @copy[:from] if @copy.key?(:from)
|
194
196
|
glob = @copy[:include] if @copy.key?(:include)
|
195
|
-
|
197
|
+
pass = @copy[:exclude] if @copy.key?(:exclude)
|
196
198
|
into = @copy[:into] if @copy.key?(:into)
|
197
199
|
end
|
198
200
|
return unless into
|
@@ -204,10 +206,10 @@ module Squared
|
|
204
206
|
as_a(from).each_with_index do |val, i|
|
205
207
|
a = basepath(val)
|
206
208
|
b = dest.join(val)
|
207
|
-
c = glob[i] || glob
|
209
|
+
c = glob[i] || glob.first
|
208
210
|
log.info "cp #{a.join(c)} #{b}"
|
209
211
|
begin
|
210
|
-
copy_dir(a, b, c, pass:
|
212
|
+
copy_dir(a, b, c, pass: pass, verbose: verbose)
|
211
213
|
rescue StandardError => e
|
212
214
|
log.error e
|
213
215
|
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.3.
|
4
|
+
version: 0.3.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: []
|