buzzcore 0.3.2 → 0.3.3
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +1 -1
- data/VERSION +1 -1
- data/buzzcore.gemspec +5 -5
- data/lib/buzzcore/misc_utils.rb +1 -1
- data/lib/buzzcore/xml_utils.rb +14 -3
- metadata +3 -3
data/Rakefile
CHANGED
@@ -12,7 +12,7 @@ begin
|
|
12
12
|
gem.authors = ["buzzware"]
|
13
13
|
#gem.rubyforge_project = "buzzware"
|
14
14
|
gem.add_dependency "shairontoledo-popen4"
|
15
|
-
gem.add_development_dependency "
|
15
|
+
gem.add_development_dependency "shoulda"
|
16
16
|
gem.files.include %w(
|
17
17
|
lib/buzzcore.rb
|
18
18
|
)
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.3.
|
1
|
+
0.3.3
|
data/buzzcore.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{buzzcore}
|
8
|
-
s.version = "0.3.
|
8
|
+
s.version = "0.3.3"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["buzzware"]
|
12
|
-
s.date = %q{2010-01-
|
12
|
+
s.date = %q{2010-01-28}
|
13
13
|
s.description = %q{buzzcore is the ruby core library developed and used by Buzzware Solutions.}
|
14
14
|
s.email = %q{contact@buzzware.com.au}
|
15
15
|
s.extra_rdoc_files = [
|
@@ -71,13 +71,13 @@ Gem::Specification.new do |s|
|
|
71
71
|
|
72
72
|
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
73
73
|
s.add_runtime_dependency(%q<shairontoledo-popen4>, [">= 0"])
|
74
|
-
s.add_development_dependency(%q<
|
74
|
+
s.add_development_dependency(%q<shoulda>, [">= 0"])
|
75
75
|
else
|
76
76
|
s.add_dependency(%q<shairontoledo-popen4>, [">= 0"])
|
77
|
-
s.add_dependency(%q<
|
77
|
+
s.add_dependency(%q<shoulda>, [">= 0"])
|
78
78
|
end
|
79
79
|
else
|
80
80
|
s.add_dependency(%q<shairontoledo-popen4>, [">= 0"])
|
81
|
-
s.add_dependency(%q<
|
81
|
+
s.add_dependency(%q<shoulda>, [">= 0"])
|
82
82
|
end
|
83
83
|
end
|
data/lib/buzzcore/misc_utils.rb
CHANGED
@@ -166,7 +166,7 @@ module MiscUtils
|
|
166
166
|
|
167
167
|
# make path real according to file system
|
168
168
|
def self.real_path(aPath)
|
169
|
-
(path = Pathname.new(File.expand_path(aPath))) && path.realpath
|
169
|
+
(path = Pathname.new(File.expand_path(aPath))) && path.realpath.to_s
|
170
170
|
end
|
171
171
|
|
172
172
|
# takes a path and combines it with a root path (which defaults to Dir.pwd) unless it is absolute
|
data/lib/buzzcore/xml_utils.rb
CHANGED
@@ -188,15 +188,26 @@ module XmlUtils
|
|
188
188
|
def self.quick_remove_att(aTagStr,aAtt)
|
189
189
|
aTagStr.sub(/#{aAtt}=['"](.*?)['"]/,'')
|
190
190
|
end
|
191
|
-
|
191
|
+
|
192
192
|
def self.quick_append_att(aTagStr,aAtt,aValue)
|
193
|
+
existing_content = quick_att_from_tag(aTagStr,aAtt).to_s
|
194
|
+
quick_set_att(aTagStr,aAtt,existing_content+aValue)
|
195
|
+
end
|
196
|
+
|
197
|
+
def self.quick_join_att(aTagStr,aAtt,aValue,aSep=';')
|
198
|
+
existing_content = quick_att_from_tag(aTagStr,aAtt).to_s.split(aSep)
|
199
|
+
existing_content += aValue.to_s.split(aSep)
|
200
|
+
quick_set_att(aTagStr,aAtt,existing_content.join(aSep))
|
201
|
+
end
|
202
|
+
|
203
|
+
def self.quick_add_att(aTagStr,aAtt,aValue)
|
193
204
|
# replace first > or /> with att + ending
|
194
205
|
aTagStr.sub(/(>|\/>)/," #{aAtt}=\"#{aValue}\""+' \1')
|
195
|
-
end
|
206
|
+
end
|
196
207
|
|
197
208
|
def self.quick_set_att(aTagStr,aAtt,aValue)
|
198
209
|
result = quick_remove_att(aTagStr,aAtt)
|
199
|
-
|
210
|
+
quick_add_att(result,aAtt,aValue)
|
200
211
|
end
|
201
212
|
|
202
213
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: buzzcore
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- buzzware
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2010-01-
|
12
|
+
date: 2010-01-28 00:00:00 +08:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -23,7 +23,7 @@ dependencies:
|
|
23
23
|
version: "0"
|
24
24
|
version:
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
|
-
name:
|
26
|
+
name: shoulda
|
27
27
|
type: :development
|
28
28
|
version_requirement:
|
29
29
|
version_requirements: !ruby/object:Gem::Requirement
|