ext 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile
CHANGED
@@ -87,7 +87,7 @@ end
|
|
87
87
|
|
88
88
|
gem_specification = Gem::Specification.new do |specification|
|
89
89
|
specification.name = 'ext'
|
90
|
-
specification.version = '0.1.
|
90
|
+
specification.version = '0.1.5'
|
91
91
|
specification.platform = Gem::Platform::RUBY
|
92
92
|
specification.rubyforge_project = 'ext'
|
93
93
|
|
@@ -166,15 +166,8 @@ module Externals
|
|
166
166
|
return if empty
|
167
167
|
raise "I was given no file_string" unless file_string
|
168
168
|
|
169
|
-
|
170
|
-
|
171
|
-
# externals_file = f.read
|
172
|
-
# end
|
173
|
-
# end
|
174
|
-
|
175
|
-
#externals_file ||= ""
|
176
|
-
|
177
|
-
titles = file_string.grep SECTION_TITLE_REGEX
|
169
|
+
titles = []
|
170
|
+
file_string.each_line {|line| titles << line if line =~ SECTION_TITLE_REGEX}
|
178
171
|
bodies = file_string.split SECTION_TITLE_REGEX_NO_GROUPS
|
179
172
|
|
180
173
|
if titles.size > 0 && bodies.size > 0
|
@@ -190,24 +183,6 @@ module Externals
|
|
190
183
|
end
|
191
184
|
end
|
192
185
|
|
193
|
-
# def projects
|
194
|
-
# retval = []
|
195
|
-
# sections.each do |section|
|
196
|
-
# retval += section.projects
|
197
|
-
# end
|
198
|
-
#
|
199
|
-
# retval
|
200
|
-
# end
|
201
|
-
|
202
|
-
# def subprojects
|
203
|
-
# retval = []
|
204
|
-
# sections.each do |section|
|
205
|
-
# retval += section.projects unless section.main?
|
206
|
-
# end
|
207
|
-
#
|
208
|
-
# retval
|
209
|
-
# end
|
210
|
-
|
211
186
|
def write path # = ".externals"
|
212
187
|
raise "no path given" unless path
|
213
188
|
open(path, 'w') do |f|
|
@@ -17,7 +17,7 @@ module Externals
|
|
17
17
|
self.scm = scm
|
18
18
|
|
19
19
|
self.title = SECTION_TITLE_REGEX.match(title_string)[1]
|
20
|
-
|
20
|
+
|
21
21
|
self.scm ||= self.title
|
22
22
|
|
23
23
|
raise "Invalid section title: #{title_string}" unless title
|
@@ -87,12 +87,12 @@ module Externals
|
|
87
87
|
title = title.to_s
|
88
88
|
sections.detect {|section| section.title == title}
|
89
89
|
end
|
90
|
-
|
90
|
+
|
91
91
|
def add_empty_section title
|
92
92
|
raise "Section already exists" if self[title]
|
93
93
|
sections << Section.new("\n\n[#{title.to_s}]\n", "")
|
94
94
|
end
|
95
|
-
|
95
|
+
|
96
96
|
def self.new_empty
|
97
97
|
new nil, true
|
98
98
|
end
|
@@ -102,7 +102,7 @@ module Externals
|
|
102
102
|
self.file_string = ''
|
103
103
|
return
|
104
104
|
end
|
105
|
-
|
105
|
+
|
106
106
|
if !externals_file && File.exists?('.externals')
|
107
107
|
open('.externals', 'r') do |f|
|
108
108
|
externals_file = f.read
|
@@ -113,7 +113,8 @@ module Externals
|
|
113
113
|
|
114
114
|
self.file_string = externals_file
|
115
115
|
|
116
|
-
titles =
|
116
|
+
titles = []
|
117
|
+
externals_file.each_line {|line| titles << line if line =~ SECTION_TITLE_REGEX}
|
117
118
|
bodies = externals_file.split SECTION_TITLE_REGEX_NO_GROUPS
|
118
119
|
|
119
120
|
if titles.size > 0 && bodies.size > 0
|
@@ -146,7 +147,7 @@ module Externals
|
|
146
147
|
|
147
148
|
retval
|
148
149
|
end
|
149
|
-
|
150
|
+
|
150
151
|
def main_project
|
151
152
|
sections.each do |section|
|
152
153
|
return section.projects.first if section.main?
|
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.5
|
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: 2009-10-
|
12
|
+
date: 2009-10-29 00:00:00 -07:00
|
13
13
|
default_executable: ext
|
14
14
|
dependencies: []
|
15
15
|
|