winton-externals 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +1 -1
- data/externals.gemspec +2 -2
- data/lib/externals/repository.rb +6 -6
- data/lib/externals/yaml_config.rb +4 -6
- metadata +2 -2
data/Rakefile
CHANGED
data/externals.gemspec
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{externals}
|
5
|
-
s.version = "1.0.
|
5
|
+
s.version = "1.0.2"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = ["Winton Welsh"]
|
9
|
-
s.date = %q{2009-05-
|
9
|
+
s.date = %q{2009-05-28}
|
10
10
|
s.default_executable = %q{externals}
|
11
11
|
s.email = %q{mail@wintoni.us}
|
12
12
|
s.executables = ["externals"]
|
data/lib/externals/repository.rb
CHANGED
@@ -19,7 +19,7 @@ module Externals
|
|
19
19
|
def freeze
|
20
20
|
install unless exists?
|
21
21
|
if is_not_a_git_repo?
|
22
|
-
puts "#{@name}
|
22
|
+
puts "already frozen: #{@name}"
|
23
23
|
elsif is_a_git_repo?
|
24
24
|
overwrite = true
|
25
25
|
# Conditionally destroy compressed repo
|
@@ -37,7 +37,7 @@ module Externals
|
|
37
37
|
# Remove repository's .git folder
|
38
38
|
FileUtils.rm_r('.git')
|
39
39
|
end
|
40
|
-
puts "#{@name}
|
40
|
+
puts "frozen: #{@name}"
|
41
41
|
end
|
42
42
|
end
|
43
43
|
|
@@ -72,15 +72,15 @@ module Externals
|
|
72
72
|
|
73
73
|
def status
|
74
74
|
if exists?
|
75
|
-
puts "#{
|
75
|
+
puts "#{is_a_git_repo? ? "not frozen" : "frozen and #{is_compressed? ? "has" : "does not have"} a snapshot"}: #{@name}"
|
76
76
|
else
|
77
|
-
puts "
|
77
|
+
puts "does not exist and #{is_compressed? ? "has" : "does not have"} a snapshot: #{@name}"
|
78
78
|
end
|
79
79
|
end
|
80
80
|
|
81
81
|
def unfreeze
|
82
82
|
if is_a_git_repo?
|
83
|
-
puts "#{@name}
|
83
|
+
puts "already unfrozen: #{@name}"
|
84
84
|
elsif !exists?
|
85
85
|
install
|
86
86
|
puts "#{@name} unfrozen"
|
@@ -98,7 +98,7 @@ module Externals
|
|
98
98
|
# Clone fresh repo if no snapshot found
|
99
99
|
install
|
100
100
|
end
|
101
|
-
puts "#{@name}
|
101
|
+
puts "unfrozen: #{@name}"
|
102
102
|
end
|
103
103
|
end
|
104
104
|
|
@@ -10,12 +10,10 @@ module Externals
|
|
10
10
|
if config_path && File.exists?(config_path)
|
11
11
|
config = YAML.load(File.read(config_path))
|
12
12
|
@repositories = config.map do |name, attributes|
|
13
|
-
Repository.new(
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
attributes["path"]
|
18
|
-
)
|
13
|
+
Repository.new(@base_dir, name, attributes["repo"], attributes["path"])
|
14
|
+
end
|
15
|
+
@repositories = @repositories.sort do |a, b|
|
16
|
+
a.name <=> b.name
|
19
17
|
end
|
20
18
|
else
|
21
19
|
$stderr.puts "config/externals.yml is missing"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: winton-externals
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Winton Welsh
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-05-
|
12
|
+
date: 2009-05-28 00:00:00 -07:00
|
13
13
|
default_executable: externals
|
14
14
|
dependencies: []
|
15
15
|
|