ext 2.0.0 → 2.1.0
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 +4 -0
- data/lib/externals/configuration/configuration.rb +7 -6
- data/lib/externals/ext.rb +44 -44
- data/lib/externals/extensions/file_utils.rb +4 -4
- data/lib/externals/project.rb +6 -6
- data/lib/externals/scms/git_project.rb +17 -15
- data/lib/externals/scms/svn_project.rb +28 -28
- data/version.rb +2 -2
- metadata +5 -9
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: fb5c68ba3375b12dbea5800bece08005da5e1e97efc68be98dae113339e5212a
|
|
4
|
+
data.tar.gz: 6f6e20a275ab463c44f3c6fdefecb5f11914fb509cbb1782782fd6e72b2a3336
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b58e47efac69e26e71385bbdd5e556e34fd2dcbf1ba10e5ec53577321b8bf1083c2aabba98768e594af9157e05fe416a9916d5d6041c83dea3b3d589005a6fdb
|
|
7
|
+
data.tar.gz: bd145d8c8d02183164422236ef748b29d67a035139051924d32bb723e7e18489b3870737f9f6e0c0e384d14723e9caea1407a14d40f873c7311c2549107b3af8
|
data/CHANGELOG
CHANGED
|
@@ -53,15 +53,16 @@ module Externals
|
|
|
53
53
|
|
|
54
54
|
if found
|
|
55
55
|
if rows[found] !~ SET_SETTING_REGEX
|
|
56
|
-
# :
|
|
56
|
+
# simplecov:disable
|
|
57
57
|
raise "thought I found the row, but didn't"
|
|
58
|
-
# :
|
|
58
|
+
# simplecov:enable
|
|
59
59
|
end
|
|
60
60
|
|
|
61
61
|
rows[found] = "#{$1}#{value}#{$2}"
|
|
62
62
|
else
|
|
63
63
|
rows << "#{key} = #{value}"
|
|
64
64
|
end
|
|
65
|
+
|
|
65
66
|
value
|
|
66
67
|
end
|
|
67
68
|
|
|
@@ -81,9 +82,9 @@ module Externals
|
|
|
81
82
|
if found
|
|
82
83
|
value = self[key]
|
|
83
84
|
if rows[found] !~ SET_SETTING_REGEX
|
|
84
|
-
# :
|
|
85
|
+
# simplecov:disable
|
|
85
86
|
raise "thought I found the row, but didn't"
|
|
86
|
-
# :
|
|
87
|
+
# simplecov:enable
|
|
87
88
|
end
|
|
88
89
|
|
|
89
90
|
rows.delete rows[found]
|
|
@@ -162,9 +163,9 @@ module Externals
|
|
|
162
163
|
|
|
163
164
|
if !titles.empty? && !bodies.empty?
|
|
164
165
|
if titles.size + 1 != bodies.size
|
|
165
|
-
# :
|
|
166
|
+
# simplecov:disable
|
|
166
167
|
raise "bodies and sections do not match up"
|
|
167
|
-
# :
|
|
168
|
+
# simplecov:enable
|
|
168
169
|
end
|
|
169
170
|
|
|
170
171
|
bodies = bodies[1..]
|
data/lib/externals/ext.rb
CHANGED
|
@@ -163,19 +163,19 @@ module Externals
|
|
|
163
163
|
command = :version if main_options[:version]
|
|
164
164
|
|
|
165
165
|
if !command || command.to_s == ''
|
|
166
|
-
# :
|
|
166
|
+
# simplecov:disable
|
|
167
167
|
puts "hey... you didn't tell me what you want to do."
|
|
168
168
|
puts "Try 'ext help' for a list of commands"
|
|
169
169
|
exit 1
|
|
170
|
-
# :
|
|
170
|
+
# simplecov:enable
|
|
171
171
|
end
|
|
172
172
|
|
|
173
173
|
unless COMMANDS.index command
|
|
174
|
-
# :
|
|
174
|
+
# simplecov:disable
|
|
175
175
|
puts "unknown command: #{command}"
|
|
176
176
|
puts "for a list of commands try 'ext help'"
|
|
177
177
|
exit 1
|
|
178
|
-
# :
|
|
178
|
+
# simplecov:enable
|
|
179
179
|
end
|
|
180
180
|
|
|
181
181
|
Dir.chdir(main_options[:workdir] || ".") do
|
|
@@ -246,9 +246,9 @@ module Externals
|
|
|
246
246
|
end
|
|
247
247
|
project || subprojects.detect do |p|
|
|
248
248
|
# TODO: test (or delete) this code path!
|
|
249
|
-
# :
|
|
249
|
+
# simplecov:disable
|
|
250
250
|
p.name == name
|
|
251
|
-
# :
|
|
251
|
+
# simplecov:enable
|
|
252
252
|
end
|
|
253
253
|
end
|
|
254
254
|
alias subproject subproject_by_name_or_path
|
|
@@ -317,9 +317,9 @@ module Externals
|
|
|
317
317
|
p.name == project_name_or_path || p.path == project_name_or_path
|
|
318
318
|
end
|
|
319
319
|
|
|
320
|
-
# :
|
|
320
|
+
# simplecov:disable
|
|
321
321
|
raise "no such project" unless project
|
|
322
|
-
# :
|
|
322
|
+
# simplecov:enable
|
|
323
323
|
|
|
324
324
|
project.send command_name, args, options
|
|
325
325
|
else
|
|
@@ -343,9 +343,9 @@ module Externals
|
|
|
343
343
|
section[:branch] = branch
|
|
344
344
|
else
|
|
345
345
|
# TODO: test (or delete) this code path!
|
|
346
|
-
# :
|
|
346
|
+
# simplecov:disable
|
|
347
347
|
section.rm_setting :branch
|
|
348
|
-
# :
|
|
348
|
+
# simplecov:enable
|
|
349
349
|
end
|
|
350
350
|
end
|
|
351
351
|
section[:revision] = revision
|
|
@@ -363,10 +363,10 @@ module Externals
|
|
|
363
363
|
section = configuration[project.path]
|
|
364
364
|
|
|
365
365
|
unless section[:revision]
|
|
366
|
-
# :
|
|
366
|
+
# simplecov:disable
|
|
367
367
|
puts "Uhh... #{project.name} wasn't frozen, so I can't unfreeze it."
|
|
368
368
|
exit 1
|
|
369
|
-
# :
|
|
369
|
+
# simplecov:enable
|
|
370
370
|
end
|
|
371
371
|
|
|
372
372
|
section.rm_setting :revision
|
|
@@ -378,10 +378,10 @@ module Externals
|
|
|
378
378
|
|
|
379
379
|
def install args, options
|
|
380
380
|
if !File.exist?('.externals')
|
|
381
|
-
# :
|
|
381
|
+
# simplecov:disable
|
|
382
382
|
warn "This project does not appear to be managed by externals. Try 'ext init' first"
|
|
383
383
|
exit NO_EXTERNALS_FILE
|
|
384
|
-
# :
|
|
384
|
+
# simplecov:enable
|
|
385
385
|
end
|
|
386
386
|
repository = args[0]
|
|
387
387
|
path = args[1]
|
|
@@ -393,13 +393,13 @@ module Externals
|
|
|
393
393
|
scm ||= infer_scm(repository)
|
|
394
394
|
|
|
395
395
|
unless scm
|
|
396
|
-
# :
|
|
396
|
+
# simplecov:disable
|
|
397
397
|
warn "Unable to determine SCM from the repository name.
|
|
398
398
|
You need to either specify the scm used to manage the subproject
|
|
399
399
|
that you are installing. Use an option to specify it
|
|
400
400
|
(such as --git or --svn)"
|
|
401
401
|
exit COULD_NOT_DETERMINE_SCM
|
|
402
|
-
# :
|
|
402
|
+
# simplecov:enable
|
|
403
403
|
end
|
|
404
404
|
|
|
405
405
|
project = self.class.project_class(scm).new(:repository => repository,
|
|
@@ -426,9 +426,9 @@ that you are installing. Use an option to specify it
|
|
|
426
426
|
|
|
427
427
|
def uninstall args, options
|
|
428
428
|
unless File.exist?('.externals')
|
|
429
|
-
# :
|
|
429
|
+
# simplecov:disable
|
|
430
430
|
raise "Hmm... there's no .externals file in this directory."
|
|
431
|
-
# :
|
|
431
|
+
# simplecov:enable
|
|
432
432
|
end
|
|
433
433
|
|
|
434
434
|
project = subproject_by_name_or_path(args[0])
|
|
@@ -455,11 +455,11 @@ that you are installing. Use an option to specify it
|
|
|
455
455
|
scm ||= options[:scm]
|
|
456
456
|
|
|
457
457
|
unless scm
|
|
458
|
-
# :
|
|
458
|
+
# simplecov:disable
|
|
459
459
|
raise "You need to either specify the scm as the first line in .externals (for example, scm = git), " \
|
|
460
460
|
"or use an option to specify it
|
|
461
461
|
(such as --git or --svn)"
|
|
462
|
-
# :
|
|
462
|
+
# simplecov:enable
|
|
463
463
|
end
|
|
464
464
|
|
|
465
465
|
project = self.class.project_class(scm).new(:path => ".")
|
|
@@ -516,7 +516,7 @@ that you are installing. Use an option to specify it
|
|
|
516
516
|
|
|
517
517
|
if !scm
|
|
518
518
|
# TODO: test (or delete) this code path!
|
|
519
|
-
# :
|
|
519
|
+
# simplecov:disable
|
|
520
520
|
possible_project_classes = self.class.project_classes.select(&:detected?)
|
|
521
521
|
|
|
522
522
|
raise "Could not determine this projects scm" if possible_project_classes.empty?
|
|
@@ -528,14 +528,14 @@ by creating the .externals file manually"
|
|
|
528
528
|
end
|
|
529
529
|
|
|
530
530
|
scm = possible_project_classes.first.scm
|
|
531
|
-
# :
|
|
531
|
+
# simplecov:enable
|
|
532
532
|
end
|
|
533
533
|
|
|
534
534
|
unless scm
|
|
535
|
-
# :
|
|
535
|
+
# simplecov:disable
|
|
536
536
|
raise "You need to either specify the scm as the first line in .externals, or use an option to specify it
|
|
537
537
|
(such as --git or --svn)"
|
|
538
|
-
# :
|
|
538
|
+
# simplecov:enable
|
|
539
539
|
end
|
|
540
540
|
|
|
541
541
|
project = main_project
|
|
@@ -558,7 +558,7 @@ by creating the .externals file manually"
|
|
|
558
558
|
|
|
559
559
|
if !scm
|
|
560
560
|
# TODO: test (or delete) this code path!
|
|
561
|
-
# :
|
|
561
|
+
# simplecov:disable
|
|
562
562
|
possible_project_classes = self.class.project_classes.select(&:detected?)
|
|
563
563
|
|
|
564
564
|
raise "Could not determine this projects scm" if possible_project_classes.empty?
|
|
@@ -570,14 +570,14 @@ by creating the .externals file manually"
|
|
|
570
570
|
end
|
|
571
571
|
|
|
572
572
|
scm = possible_project_classes.first.scm
|
|
573
|
-
# :
|
|
573
|
+
# simplecov:enable
|
|
574
574
|
end
|
|
575
575
|
|
|
576
576
|
unless scm
|
|
577
|
-
# :
|
|
577
|
+
# simplecov:disable
|
|
578
578
|
raise "You need to either specify the scm as the first line in .externals, or use an option to specify it
|
|
579
579
|
(such as --git or --svn)"
|
|
580
|
-
# :
|
|
580
|
+
# simplecov:enable
|
|
581
581
|
end
|
|
582
582
|
|
|
583
583
|
old_config = configuration
|
|
@@ -622,10 +622,10 @@ commands below if you actually wish to delete them."
|
|
|
622
622
|
end
|
|
623
623
|
|
|
624
624
|
unless scm
|
|
625
|
-
# :
|
|
625
|
+
# simplecov:disable
|
|
626
626
|
raise "You need to either specify the scm as the first line in .externals, or use an option to specify it
|
|
627
627
|
(such as --git or --svn)"
|
|
628
|
-
# :
|
|
628
|
+
# simplecov:enable
|
|
629
629
|
end
|
|
630
630
|
|
|
631
631
|
project = main_project
|
|
@@ -662,9 +662,9 @@ commands below if you actually wish to delete them."
|
|
|
662
662
|
|
|
663
663
|
if path == "."
|
|
664
664
|
# TODO: test (or delete) this code path!
|
|
665
|
-
# :
|
|
665
|
+
# simplecov:disable
|
|
666
666
|
path = main_project.name
|
|
667
|
-
# :
|
|
667
|
+
# simplecov:enable
|
|
668
668
|
end
|
|
669
669
|
|
|
670
670
|
Dir.chdir path do
|
|
@@ -673,9 +673,9 @@ commands below if you actually wish to delete them."
|
|
|
673
673
|
end
|
|
674
674
|
|
|
675
675
|
def init args, options = {}
|
|
676
|
-
# :
|
|
676
|
+
# simplecov:disable
|
|
677
677
|
raise ".externals already exists" if File.exist?('.externals')
|
|
678
|
-
# :
|
|
678
|
+
# simplecov:enable
|
|
679
679
|
|
|
680
680
|
scm = options[:scm]
|
|
681
681
|
|
|
@@ -684,11 +684,11 @@ commands below if you actually wish to delete them."
|
|
|
684
684
|
|
|
685
685
|
raise "Could not determine this project's scm" if possible_project_classes.empty?
|
|
686
686
|
if possible_project_classes.size > 1
|
|
687
|
-
# :
|
|
687
|
+
# simplecov:disable
|
|
688
688
|
raise "This project appears to be managed by multiple SCMs: #{
|
|
689
689
|
possible_project_classes.join(',')}
|
|
690
690
|
Please explicitly declare the SCM (using --git or --svn, or, by creating .externals manually"
|
|
691
|
-
# :
|
|
691
|
+
# simplecov:enable
|
|
692
692
|
end
|
|
693
693
|
|
|
694
694
|
scm = possible_project_classes.first.scm
|
|
@@ -708,9 +708,9 @@ Please explicitly declare the SCM (using --git or --svn, or, by creating .extern
|
|
|
708
708
|
)
|
|
709
709
|
elsif args[0]
|
|
710
710
|
# TODO: test (or delete) this code path!
|
|
711
|
-
# :
|
|
711
|
+
# simplecov:disable
|
|
712
712
|
config['.'][:repository] = args[0].strip
|
|
713
|
-
# :
|
|
713
|
+
# simplecov:enable
|
|
714
714
|
end
|
|
715
715
|
end
|
|
716
716
|
|
|
@@ -728,9 +728,9 @@ Please explicitly declare the SCM (using --git or --svn, or, by creating .extern
|
|
|
728
728
|
|
|
729
729
|
def do_checkout_or_export repository, path, options, sym
|
|
730
730
|
if File.exist?('.externals')
|
|
731
|
-
# :
|
|
731
|
+
# simplecov:disable
|
|
732
732
|
raise "seems main project is already checked out here?"
|
|
733
|
-
# :
|
|
733
|
+
# simplecov:enable
|
|
734
734
|
else
|
|
735
735
|
#We appear to be attempting to checkout/export a main project
|
|
736
736
|
scm = options[:scm]
|
|
@@ -739,17 +739,17 @@ Please explicitly declare the SCM (using --git or --svn, or, by creating .extern
|
|
|
739
739
|
|
|
740
740
|
if !scm
|
|
741
741
|
# TODO: test (or delete) this code path!
|
|
742
|
-
# :
|
|
742
|
+
# simplecov:disable
|
|
743
743
|
scm ||= configuration['main']
|
|
744
744
|
scm &&= scm['scm']
|
|
745
|
-
# :
|
|
745
|
+
# simplecov:enable
|
|
746
746
|
end
|
|
747
747
|
|
|
748
748
|
unless scm
|
|
749
|
-
# :
|
|
749
|
+
# simplecov:disable
|
|
750
750
|
raise "You need to either specify the scm as the first line in .externals, or use an option to specify it
|
|
751
751
|
(such as --git or --svn)"
|
|
752
|
-
# :
|
|
752
|
+
# simplecov:enable
|
|
753
753
|
end
|
|
754
754
|
|
|
755
755
|
main_project = self.class.project_class(scm).new(
|
|
@@ -30,16 +30,16 @@ FileUtils.class_eval do
|
|
|
30
30
|
rm_rf_old(filename, *args, **opts)
|
|
31
31
|
|
|
32
32
|
while File.exist?(filename) && tries < 10
|
|
33
|
-
# :
|
|
33
|
+
# simplecov:disable
|
|
34
34
|
sleep 1
|
|
35
35
|
tries += 1
|
|
36
|
-
# :
|
|
36
|
+
# simplecov:enable
|
|
37
37
|
end
|
|
38
38
|
end
|
|
39
39
|
|
|
40
40
|
rm.call
|
|
41
41
|
if tries >= 10
|
|
42
|
-
# :
|
|
42
|
+
# simplecov:disable
|
|
43
43
|
puts "WARNING: deleted #{filename} didn't work, trying again"
|
|
44
44
|
tries = 0
|
|
45
45
|
rm.call
|
|
@@ -47,7 +47,7 @@ FileUtils.class_eval do
|
|
|
47
47
|
if tries >= 10
|
|
48
48
|
raise "Could not delete #{filename}"
|
|
49
49
|
end
|
|
50
|
-
# :
|
|
50
|
+
# simplecov:enable
|
|
51
51
|
end
|
|
52
52
|
end
|
|
53
53
|
|
data/lib/externals/project.rb
CHANGED
|
@@ -52,9 +52,9 @@ module Externals
|
|
|
52
52
|
end
|
|
53
53
|
|
|
54
54
|
def switch _branch_name, _options = {}
|
|
55
|
-
# :
|
|
55
|
+
# simplecov:disable
|
|
56
56
|
raise "subclass responsibility"
|
|
57
|
-
# :
|
|
57
|
+
# simplecov:enable
|
|
58
58
|
end
|
|
59
59
|
|
|
60
60
|
def initialize hash
|
|
@@ -72,9 +72,9 @@ module Externals
|
|
|
72
72
|
attribute =~ /^\w+_opts(_(#{OPTS_SUFFIXES.join("|")}))?/
|
|
73
73
|
end
|
|
74
74
|
if !invalid_attrib.empty?
|
|
75
|
-
# :
|
|
75
|
+
# simplecov:disable
|
|
76
76
|
raise "invalid attribute(s): #{invalid_attrib.join(', ')}"
|
|
77
|
-
# :
|
|
77
|
+
# simplecov:enable
|
|
78
78
|
end
|
|
79
79
|
end
|
|
80
80
|
|
|
@@ -89,9 +89,9 @@ module Externals
|
|
|
89
89
|
|
|
90
90
|
[:co, :ex].each do |method_name|
|
|
91
91
|
define_method method_name do
|
|
92
|
-
# :
|
|
92
|
+
# simplecov:disable
|
|
93
93
|
raise "subclass responsibility"
|
|
94
|
-
# :
|
|
94
|
+
# simplecov:enable
|
|
95
95
|
end
|
|
96
96
|
end
|
|
97
97
|
|
|
@@ -19,9 +19,9 @@ module Externals
|
|
|
19
19
|
puts(gitclonecmd = "git #{opts} clone #{extra_opts} \"#{repository}\" #{dest}")
|
|
20
20
|
puts `#{gitclonecmd}`
|
|
21
21
|
unless $? == 0
|
|
22
|
-
# :
|
|
22
|
+
# simplecov:disable
|
|
23
23
|
raise "git clone of #{repository} failed."
|
|
24
|
-
# :
|
|
24
|
+
# simplecov:enable
|
|
25
25
|
end
|
|
26
26
|
end
|
|
27
27
|
|
|
@@ -79,9 +79,9 @@ module Externals
|
|
|
79
79
|
puts `git #{opts} checkout --track -b #{branch} origin/#{branch}`
|
|
80
80
|
end
|
|
81
81
|
unless $? == 0
|
|
82
|
-
# :
|
|
82
|
+
# simplecov:disable
|
|
83
83
|
raise "Could not checkout origin/#{branch}"
|
|
84
|
-
# :
|
|
84
|
+
# simplecov:enable
|
|
85
85
|
end
|
|
86
86
|
end
|
|
87
87
|
end
|
|
@@ -99,9 +99,9 @@ module Externals
|
|
|
99
99
|
Dir.chdir project_path do
|
|
100
100
|
puts `git #{opts} checkout #{revision}`
|
|
101
101
|
unless $? == 0
|
|
102
|
-
# :
|
|
102
|
+
# simplecov:disable
|
|
103
103
|
raise "Could not checkout #{revision}"
|
|
104
|
-
# :
|
|
104
|
+
# simplecov:enable
|
|
105
105
|
end
|
|
106
106
|
end
|
|
107
107
|
else
|
|
@@ -130,9 +130,9 @@ module Externals
|
|
|
130
130
|
puts `git #{resolve_opts("co")} checkout --track -b #{branch_name}`
|
|
131
131
|
end
|
|
132
132
|
unless $? == 0
|
|
133
|
-
# :
|
|
133
|
+
# simplecov:disable
|
|
134
134
|
raise "Could not checkout origin/#{branch_name}"
|
|
135
|
-
# :
|
|
135
|
+
# simplecov:enable
|
|
136
136
|
end
|
|
137
137
|
end
|
|
138
138
|
end
|
|
@@ -144,9 +144,11 @@ module Externals
|
|
|
144
144
|
up(*args)
|
|
145
145
|
else
|
|
146
146
|
clone_opts = "--depth 1"
|
|
147
|
+
|
|
147
148
|
if branch
|
|
148
|
-
clone_opts
|
|
149
|
+
clone_opts = "#{clone_opts} -b #{branch}"
|
|
149
150
|
end
|
|
151
|
+
|
|
150
152
|
do_clone "ex", clone_opts
|
|
151
153
|
end
|
|
152
154
|
end
|
|
@@ -211,10 +213,10 @@ module Externals
|
|
|
211
213
|
#this is a test helper method
|
|
212
214
|
# TODO: can we move it to the test suite, then?
|
|
213
215
|
def self.add_all
|
|
214
|
-
# :
|
|
216
|
+
# simplecov:disable
|
|
215
217
|
puts `git add .`
|
|
216
218
|
raise unless $? == 0
|
|
217
|
-
# :
|
|
219
|
+
# simplecov:enable
|
|
218
220
|
end
|
|
219
221
|
|
|
220
222
|
def ignore_contains? path
|
|
@@ -259,15 +261,15 @@ module Externals
|
|
|
259
261
|
rows = ir.reject {|row| row.strip == path.strip}
|
|
260
262
|
|
|
261
263
|
if rows.size == ir.size
|
|
262
|
-
# :
|
|
264
|
+
# simplecov:disable
|
|
263
265
|
raise "row not found matching #{path} in .gitignore"
|
|
264
|
-
# :
|
|
266
|
+
# simplecov:enable
|
|
265
267
|
end
|
|
266
268
|
|
|
267
269
|
if ir.size - rows.size != 1
|
|
268
|
-
# :
|
|
270
|
+
# simplecov:disable
|
|
269
271
|
raise "More than one row found matching #{path} in .gitignore"
|
|
270
|
-
# :
|
|
272
|
+
# simplecov:enable
|
|
271
273
|
end
|
|
272
274
|
|
|
273
275
|
open('.gitignore', 'w') do |f|
|
|
@@ -25,9 +25,9 @@ module Externals
|
|
|
25
25
|
puts(svncocmd = "svn #{opts} co #{url} #{dest}")
|
|
26
26
|
puts `#{svncocmd}`
|
|
27
27
|
unless $? == 0
|
|
28
|
-
# :
|
|
28
|
+
# simplecov:disable
|
|
29
29
|
raise "Failed to run #{svncocmd}"
|
|
30
|
-
# :
|
|
30
|
+
# simplecov:enable
|
|
31
31
|
end
|
|
32
32
|
|
|
33
33
|
change_to_revision "co"
|
|
@@ -62,9 +62,9 @@ module Externals
|
|
|
62
62
|
|
|
63
63
|
if revision
|
|
64
64
|
# TODO: test (or delete) this code path!
|
|
65
|
-
# :
|
|
65
|
+
# simplecov:disable
|
|
66
66
|
url += "@#{revision}"
|
|
67
|
-
# :
|
|
67
|
+
# simplecov:enable
|
|
68
68
|
end
|
|
69
69
|
|
|
70
70
|
puts(svncocmd = "svn #{scm_opts_ex} export #{url} #{dest}")
|
|
@@ -79,9 +79,9 @@ module Externals
|
|
|
79
79
|
url = [repository, branch_name].join("/")
|
|
80
80
|
`svn #{scm_opts} switch #{url}`
|
|
81
81
|
unless $? == 0
|
|
82
|
-
# :
|
|
82
|
+
# simplecov:disable
|
|
83
83
|
raise "Could not switch to #{url}"
|
|
84
|
-
# :
|
|
84
|
+
# simplecov:enable
|
|
85
85
|
end
|
|
86
86
|
end
|
|
87
87
|
end
|
|
@@ -112,17 +112,17 @@ module Externals
|
|
|
112
112
|
|
|
113
113
|
def st *_args
|
|
114
114
|
# TODO: test (or delete) this code path!
|
|
115
|
-
# :
|
|
115
|
+
# simplecov:disable
|
|
116
116
|
puts "\nstatus for #{path}:"
|
|
117
117
|
Dir.chdir path do
|
|
118
118
|
puts `svn #{scm_opts_st} status`
|
|
119
119
|
end
|
|
120
|
-
# :
|
|
120
|
+
# simplecov:enable
|
|
121
121
|
end
|
|
122
122
|
|
|
123
123
|
def self.scm_path? path
|
|
124
124
|
# TODO: test (or delete) this code path!
|
|
125
|
-
# :
|
|
125
|
+
# simplecov:disable
|
|
126
126
|
return true if path =~ /^svn(\+ssh)?:/
|
|
127
127
|
|
|
128
128
|
# Look for http(s)://svn.*/*
|
|
@@ -136,7 +136,7 @@ module Externals
|
|
|
136
136
|
end
|
|
137
137
|
|
|
138
138
|
false
|
|
139
|
-
# :
|
|
139
|
+
# simplecov:enable
|
|
140
140
|
end
|
|
141
141
|
|
|
142
142
|
def self.fill_in_opts opts, main_options, sub_options, options = {}
|
|
@@ -154,14 +154,14 @@ module Externals
|
|
|
154
154
|
#this is a test helper method
|
|
155
155
|
# TODO: can we move it to the test suite, then?
|
|
156
156
|
def self.add_all
|
|
157
|
-
# :
|
|
157
|
+
# simplecov:disable
|
|
158
158
|
status = `svn st`
|
|
159
159
|
|
|
160
160
|
status.split("\n").grep(/^\?/).each do |to_add|
|
|
161
161
|
puts `svn add #{to_add.gsub(/^\?\s*/, "")}`
|
|
162
162
|
raise unless $? == 0
|
|
163
163
|
end
|
|
164
|
-
# :
|
|
164
|
+
# simplecov:enable
|
|
165
165
|
end
|
|
166
166
|
|
|
167
167
|
def ignore_contains? path
|
|
@@ -173,16 +173,16 @@ module Externals
|
|
|
173
173
|
|
|
174
174
|
branch = info_url.downcase.gsub(/\/+/, "/").gsub(repository.downcase.gsub(/\/+/, "/"), "")
|
|
175
175
|
if branch == repository
|
|
176
|
-
# :
|
|
176
|
+
# simplecov:disable
|
|
177
177
|
raise "Could not determine branch from URL #{info_url}.
|
|
178
178
|
Does not appear have a substring of #{repository}"
|
|
179
|
-
# :
|
|
179
|
+
# simplecov:enable
|
|
180
180
|
end
|
|
181
181
|
if branch !~ /^\//
|
|
182
|
-
# :
|
|
182
|
+
# simplecov:disable
|
|
183
183
|
raise "Was expecting the branch and repository to be separated by '/'
|
|
184
184
|
Please file an issue about this at http://github.com/azimux/externals"
|
|
185
|
-
# :
|
|
185
|
+
# simplecov:enable
|
|
186
186
|
end
|
|
187
187
|
branch.gsub(/^\//, "")
|
|
188
188
|
end
|
|
@@ -190,16 +190,16 @@ module Externals
|
|
|
190
190
|
def self.extract_repository url, branch
|
|
191
191
|
repository = url.gsub(branch, "")
|
|
192
192
|
if url == repository
|
|
193
|
-
# :
|
|
193
|
+
# simplecov:disable
|
|
194
194
|
raise "Could not determine repository from URL #{info_url}.
|
|
195
195
|
Does not appear to have the branch #{branch} as a substring"
|
|
196
|
-
# :
|
|
196
|
+
# simplecov:enable
|
|
197
197
|
end
|
|
198
198
|
if repository !~ /\/$/
|
|
199
|
-
# :
|
|
199
|
+
# simplecov:disable
|
|
200
200
|
raise "Was expecting the branch and repository to be separated by '/'
|
|
201
201
|
Please file an issue about this at http://github.com/azimux/externals"
|
|
202
|
-
# :
|
|
202
|
+
# simplecov:enable
|
|
203
203
|
end
|
|
204
204
|
|
|
205
205
|
repository.gsub(/\/$/, "")
|
|
@@ -207,7 +207,7 @@ module Externals
|
|
|
207
207
|
|
|
208
208
|
def require_repository
|
|
209
209
|
if repository.nil? || repository.empty?
|
|
210
|
-
# :
|
|
210
|
+
# simplecov:disable
|
|
211
211
|
url = info_url
|
|
212
212
|
info_url = "svn+ssh://server/path/repository" unless url
|
|
213
213
|
puts "to use any branching features with a subversion project, the
|
|
@@ -225,7 +225,7 @@ repository = #{info_url}
|
|
|
225
225
|
"
|
|
226
226
|
|
|
227
227
|
raise "Cannot use subversion branching features without a repository in .externals file"
|
|
228
|
-
# :
|
|
228
|
+
# simplecov:enable
|
|
229
229
|
end
|
|
230
230
|
end
|
|
231
231
|
|
|
@@ -253,15 +253,15 @@ repository = #{info_url}
|
|
|
253
253
|
rows = ir.reject {|row| row.strip == child}
|
|
254
254
|
|
|
255
255
|
if rows.size == ir.size
|
|
256
|
-
# :
|
|
256
|
+
# simplecov:disable
|
|
257
257
|
raise "row not found matching #{path} in svn propget svn:ignore"
|
|
258
|
-
# :
|
|
258
|
+
# simplecov:enable
|
|
259
259
|
end
|
|
260
260
|
|
|
261
261
|
if ir.size - rows.size != 1
|
|
262
|
-
# :
|
|
262
|
+
# simplecov:disable
|
|
263
263
|
raise "More than one row found matching #{path} in svn propget svn:ignore"
|
|
264
|
-
# :
|
|
264
|
+
# simplecov:enable
|
|
265
265
|
end
|
|
266
266
|
|
|
267
267
|
Dir.chdir(parent) do
|
|
@@ -297,9 +297,9 @@ repository = #{info_url}
|
|
|
297
297
|
if `svn #{scm_opts} info` =~ /^\s*URL:\s*([^\s]+)\s*$/
|
|
298
298
|
$1
|
|
299
299
|
else
|
|
300
|
-
# :
|
|
300
|
+
# simplecov:disable
|
|
301
301
|
raise "Could not get URL from svn info"
|
|
302
|
-
# :
|
|
302
|
+
# simplecov:enable
|
|
303
303
|
end
|
|
304
304
|
end
|
|
305
305
|
|
data/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: ext
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.
|
|
4
|
+
version: 2.1.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Miles Georgi
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: bin
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies: []
|
|
13
|
-
description:
|
|
14
12
|
email: azimux@gmail.com
|
|
15
13
|
executables:
|
|
16
14
|
- ext
|
|
@@ -39,7 +37,6 @@ metadata:
|
|
|
39
37
|
source_code_uri: https://github.com/azimux/externals
|
|
40
38
|
changelog_uri: https://github.com/azimux/externals/blob/main/CHANGELOG.md
|
|
41
39
|
rubygems_mfa_required: 'true'
|
|
42
|
-
post_install_message:
|
|
43
40
|
rdoc_options: []
|
|
44
41
|
require_paths:
|
|
45
42
|
- lib
|
|
@@ -47,18 +44,17 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
47
44
|
requirements:
|
|
48
45
|
- - ">="
|
|
49
46
|
- !ruby/object:Gem::Version
|
|
50
|
-
version:
|
|
47
|
+
version: '3.3'
|
|
51
48
|
- - "<"
|
|
52
49
|
- !ruby/object:Gem::Version
|
|
53
|
-
version: '
|
|
50
|
+
version: '4.1'
|
|
54
51
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
55
52
|
requirements:
|
|
56
53
|
- - ">="
|
|
57
54
|
- !ruby/object:Gem::Version
|
|
58
55
|
version: '0'
|
|
59
56
|
requirements: []
|
|
60
|
-
rubygems_version:
|
|
61
|
-
signing_key:
|
|
57
|
+
rubygems_version: 4.0.16
|
|
62
58
|
specification_version: 4
|
|
63
59
|
summary: Provides an SCM agnostic way to manage subprojects with a workflow similar
|
|
64
60
|
to the svn:externals feature of subversion instead of that of git submodules.
|