ext 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +1 -1
- data/lib/externals/ext.rb +2 -2
- data/lib/externals/project.rb +15 -13
- metadata +2 -2
data/Rakefile
CHANGED
@@ -38,7 +38,7 @@ end
|
|
38
38
|
|
39
39
|
gem_specification = Gem::Specification.new do |specification|
|
40
40
|
specification.name = 'ext'
|
41
|
-
specification.version = '0.1.
|
41
|
+
specification.version = '0.1.2'
|
42
42
|
specification.platform = Gem::Platform::RUBY
|
43
43
|
specification.rubyforge_project = 'ext'
|
44
44
|
|
data/lib/externals/ext.rb
CHANGED
@@ -477,9 +477,9 @@ that you are installing. Use an option to specify it
|
|
477
477
|
raise "only makes sense for main project" unless project.main_project?
|
478
478
|
|
479
479
|
subprojects.each do |subproject|
|
480
|
-
puts "about to add #{subproject.path} to ignore"
|
480
|
+
#puts "about to add #{subproject.path} to ignore"
|
481
481
|
project.update_ignore subproject.path
|
482
|
-
puts "finished adding #{subproject.path}"
|
482
|
+
#puts "finished adding #{subproject.path}"
|
483
483
|
end
|
484
484
|
end
|
485
485
|
|
data/lib/externals/project.rb
CHANGED
@@ -1,11 +1,14 @@
|
|
1
1
|
require 'extensions/symbol'
|
2
2
|
|
3
3
|
module Externals
|
4
|
+
VALID_ATTRIB = [:name, :path, :repository, :branch, :type, :scm, :revision
|
5
|
+
].map(&:to_s) unless const_defined?('VALID_ATTRIB')
|
6
|
+
|
4
7
|
class Project
|
5
8
|
def self.attr_attr_accessor *names
|
6
9
|
names = [names].flatten
|
7
10
|
names.each do |name|
|
8
|
-
define_method name do
|
11
|
+
define_method name do
|
9
12
|
attributes[name.to_sym]
|
10
13
|
end
|
11
14
|
define_method "#{name}=" do |value|
|
@@ -13,10 +16,9 @@ module Externals
|
|
13
16
|
end
|
14
17
|
end
|
15
18
|
end
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
attr_attr_accessor VALID_ATTRIB
|
19
|
+
|
20
|
+
|
21
|
+
attr_attr_accessor Externals::VALID_ATTRIB
|
20
22
|
def attributes
|
21
23
|
@attributes ||= {}
|
22
24
|
end
|
@@ -26,7 +28,7 @@ module Externals
|
|
26
28
|
def main_project?
|
27
29
|
path == '.'
|
28
30
|
end
|
29
|
-
|
31
|
+
|
30
32
|
def freeze_involves_branch?
|
31
33
|
true
|
32
34
|
end
|
@@ -43,28 +45,28 @@ module Externals
|
|
43
45
|
def default_branch
|
44
46
|
self.class.default_branch
|
45
47
|
end
|
46
|
-
|
48
|
+
|
47
49
|
def initialize hash
|
48
50
|
raise "Abstract class" if self.class == Project
|
49
51
|
raise "expected hash" unless hash.is_a? Hash
|
50
|
-
|
52
|
+
|
51
53
|
hash = hash.keys.inject({}) do |new_hash, key|
|
52
54
|
new_hash[key.to_s] = hash[key]
|
53
55
|
new_hash
|
54
56
|
end
|
55
|
-
|
56
|
-
inVALID_ATTRIB = hash.keys - VALID_ATTRIB
|
57
|
-
|
57
|
+
|
58
|
+
inVALID_ATTRIB = hash.keys - Externals::VALID_ATTRIB
|
59
|
+
|
58
60
|
if !inVALID_ATTRIB.empty?
|
59
61
|
raise "invalid attribute(s): #{inVALID_ATTRIB.join(', ')}"
|
60
62
|
end
|
61
63
|
|
62
64
|
path = hash.delete('path')
|
63
|
-
|
65
|
+
|
64
66
|
hash.keys.each do |key|
|
65
67
|
send("#{key}=", hash[key])
|
66
68
|
end
|
67
|
-
|
69
|
+
|
68
70
|
if path && !path.is_a?(String)
|
69
71
|
path = path.default_path(name)
|
70
72
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ext
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Miles Georgi
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2008-10-
|
12
|
+
date: 2008-10-24 00:00:00 -07:00
|
13
13
|
default_executable: ext
|
14
14
|
dependencies: []
|
15
15
|
|