xamplr-gen 1.9.10 → 1.9.11
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.
- data/Rakefile +1 -1
- data/VERSION +1 -1
- data/lib/xamplr-gen/templates/element_empty.template +2 -2
- data/lib/xamplr-gen/templates/element_mixed.template +2 -2
- data/lib/xamplr-gen/templates/element_simple.template +2 -2
- data/lib/xamplr-gen/xampl-cl-gen.rb +6 -6
- data/lib/xamplr-gen/xampl-generator.rb +1 -0
- data/xamplr-gen.gemspec +7 -7
- metadata +46 -18
data/Rakefile
CHANGED
@@ -14,7 +14,7 @@ begin
|
|
14
14
|
# gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
|
15
15
|
|
16
16
|
gem.add_dependency('xamplr-pp', '>=1.2.0')
|
17
|
-
gem.add_dependency('xamplr', '>=1.9.
|
17
|
+
gem.add_dependency('xamplr', '>=1.9.13')
|
18
18
|
end
|
19
19
|
Jeweler::GemcutterTasks.new
|
20
20
|
rescue LoadError
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.9.
|
1
|
+
1.9.11
|
@@ -44,11 +44,11 @@
|
|
44
44
|
|@element.attribute_child.each{ | attribute |
|
45
45
|
| if attribute.namespace then
|
46
46
|
|
|
47
|
-
[ :@#{attribute.name}, "#{attribute.
|
47
|
+
[ :@#{attribute.name}, "#{attribute.tag_name}", "#{attribute.namespace}" ],
|
48
48
|
|
|
49
49
|
| else
|
50
50
|
|
|
51
|
-
[ :@#{attribute.name}, "#{attribute.
|
51
|
+
[ :@#{attribute.name}, "#{attribute.tag_name}" ],
|
52
52
|
|
|
53
53
|
| end
|
54
54
|
|}
|
@@ -44,11 +44,11 @@
|
|
44
44
|
|@element.attribute_child.each{ | attribute |
|
45
45
|
| if attribute.namespace then
|
46
46
|
|
|
47
|
-
[ :@#{attribute.name}, "#{attribute.
|
47
|
+
[ :@#{attribute.name}, "#{attribute.tag_name}", "#{attribute.namespace}" ],
|
48
48
|
|
|
49
49
|
| else
|
50
50
|
|
|
51
|
-
[ :@#{attribute.name}, "#{attribute.
|
51
|
+
[ :@#{attribute.name}, "#{attribute.tag_name}" ],
|
52
52
|
|
|
53
53
|
| end
|
54
54
|
|}
|
@@ -44,11 +44,11 @@
|
|
44
44
|
|@element.attribute_child.each{ | attribute |
|
45
45
|
| if attribute.namespace then
|
46
46
|
|
|
47
|
-
[ :@#{attribute.name}, "#{attribute.
|
47
|
+
[ :@#{attribute.name}, "#{attribute.tag_name}", "#{attribute.namespace}" ],
|
48
48
|
|
|
49
49
|
| else
|
50
50
|
|
|
51
|
-
[ :@#{attribute.name}, "#{attribute.
|
51
|
+
[ :@#{attribute.name}, "#{attribute.tag_name}" ],
|
52
52
|
|
|
53
53
|
| end
|
54
54
|
|}
|
@@ -18,7 +18,8 @@ class ProjectGenerator
|
|
18
18
|
end
|
19
19
|
|
20
20
|
def print_base_filename
|
21
|
-
File.join(%w{ . generated })
|
21
|
+
#File.join(%w{ . generated })
|
22
|
+
'generated'
|
22
23
|
end
|
23
24
|
|
24
25
|
def print_options
|
@@ -172,7 +173,7 @@ _EOF_
|
|
172
173
|
:directory => directory)
|
173
174
|
|
174
175
|
if okay
|
175
|
-
puts generator.print_elements(print_base_filename, print_options)
|
176
|
+
puts generator.print_elements("#{ directory }/#{ print_base_filename }", print_options)
|
176
177
|
self.write_specialisation_file(generator.elements_map)
|
177
178
|
|
178
179
|
generated_files = Dir.glob("#{ self.directory }/*.rb")
|
@@ -198,20 +199,19 @@ _EOF_
|
|
198
199
|
#end
|
199
200
|
#puts "WRITE TO FILE: #{ out_filename }"
|
200
201
|
|
201
|
-
if File.exists?(
|
202
|
+
if File.exists?("#{ self.directory }/generated.yuml") && (cl_options[:download_yuml_png] || cl_options[:download_yuml_pdf]) then
|
202
203
|
diagram = ""
|
203
|
-
File.open("
|
204
|
+
File.open("#{ self.directory }/generated.yuml") do | f |
|
204
205
|
f.each do | line |
|
205
206
|
diagram << line.chomp
|
206
207
|
end
|
207
208
|
end
|
208
209
|
|
209
|
-
|
210
210
|
okay = false
|
211
211
|
if cl_options[:download_yuml_png] then
|
212
212
|
begin
|
213
213
|
filename = (true == cl_options[:download_yuml_png]) ? 'generated.png' : cl_options[:download_yuml_png]
|
214
|
-
wget = "wget 'http://yuml.me/diagram/scruffy/class/#{diagram}' -O '#{filename}'"
|
214
|
+
wget = "wget 'http://yuml.me/diagram/scruffy/class/#{diagram}' -O '#{ self.directory }/#{filename}'"
|
215
215
|
okay = system(wget)
|
216
216
|
if okay then
|
217
217
|
puts "downloaded yuml png"
|
@@ -573,6 +573,7 @@ module XamplGenerator
|
|
573
573
|
generator.comprehend_from_files(filenames)
|
574
574
|
generator.generate_to_directory(directory)
|
575
575
|
|
576
|
+
#TODO -- are these writing to the correct location, is this even possible to call anymore?
|
576
577
|
generator.print_elements(write_elements) if write_elements
|
577
578
|
end
|
578
579
|
end
|
data/xamplr-gen.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{xamplr-gen}
|
8
|
-
s.version = "1.9.
|
8
|
+
s.version = "1.9.11"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Bob Hutchison"]
|
12
|
-
s.date = %q{2010-
|
12
|
+
s.date = %q{2010-07-14}
|
13
13
|
s.default_executable = %q{xampl-gen}
|
14
14
|
s.description = %q{This is the xampl code generator for Ruby.}
|
15
15
|
s.email = %q{hutch@xampl.com}
|
@@ -72,7 +72,7 @@ Gem::Specification.new do |s|
|
|
72
72
|
s.homepage = %q{http://github.com/hutch/xamplr-gen}
|
73
73
|
s.rdoc_options = ["--charset=UTF-8"]
|
74
74
|
s.require_paths = ["lib"]
|
75
|
-
s.rubygems_version = %q{1.3.
|
75
|
+
s.rubygems_version = %q{1.3.7}
|
76
76
|
s.summary = %q{This is the xampl code generator for Ruby}
|
77
77
|
s.test_files = [
|
78
78
|
"test/helper.rb",
|
@@ -83,19 +83,19 @@ Gem::Specification.new do |s|
|
|
83
83
|
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
84
84
|
s.specification_version = 3
|
85
85
|
|
86
|
-
if Gem::Version.new(Gem::
|
86
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
87
87
|
s.add_development_dependency(%q<cucumber>, [">= 0"])
|
88
88
|
s.add_runtime_dependency(%q<xamplr-pp>, [">= 1.2.0"])
|
89
|
-
s.add_runtime_dependency(%q<xamplr>, [">= 1.9.
|
89
|
+
s.add_runtime_dependency(%q<xamplr>, [">= 1.9.13"])
|
90
90
|
else
|
91
91
|
s.add_dependency(%q<cucumber>, [">= 0"])
|
92
92
|
s.add_dependency(%q<xamplr-pp>, [">= 1.2.0"])
|
93
|
-
s.add_dependency(%q<xamplr>, [">= 1.9.
|
93
|
+
s.add_dependency(%q<xamplr>, [">= 1.9.13"])
|
94
94
|
end
|
95
95
|
else
|
96
96
|
s.add_dependency(%q<cucumber>, [">= 0"])
|
97
97
|
s.add_dependency(%q<xamplr-pp>, [">= 1.2.0"])
|
98
|
-
s.add_dependency(%q<xamplr>, [">= 1.9.
|
98
|
+
s.add_dependency(%q<xamplr>, [">= 1.9.13"])
|
99
99
|
end
|
100
100
|
end
|
101
101
|
|
metadata
CHANGED
@@ -1,7 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: xamplr-gen
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
4
|
+
hash: 37
|
5
|
+
prerelease: false
|
6
|
+
segments:
|
7
|
+
- 1
|
8
|
+
- 9
|
9
|
+
- 11
|
10
|
+
version: 1.9.11
|
5
11
|
platform: ruby
|
6
12
|
authors:
|
7
13
|
- Bob Hutchison
|
@@ -9,39 +15,55 @@ autorequire:
|
|
9
15
|
bindir: bin
|
10
16
|
cert_chain: []
|
11
17
|
|
12
|
-
date: 2010-
|
18
|
+
date: 2010-07-14 00:00:00 -04:00
|
13
19
|
default_executable: xampl-gen
|
14
20
|
dependencies:
|
15
21
|
- !ruby/object:Gem::Dependency
|
16
22
|
name: cucumber
|
17
|
-
|
18
|
-
|
19
|
-
|
23
|
+
prerelease: false
|
24
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
20
26
|
requirements:
|
21
27
|
- - ">="
|
22
28
|
- !ruby/object:Gem::Version
|
29
|
+
hash: 3
|
30
|
+
segments:
|
31
|
+
- 0
|
23
32
|
version: "0"
|
24
|
-
|
33
|
+
type: :development
|
34
|
+
version_requirements: *id001
|
25
35
|
- !ruby/object:Gem::Dependency
|
26
36
|
name: xamplr-pp
|
27
|
-
|
28
|
-
|
29
|
-
|
37
|
+
prerelease: false
|
38
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
39
|
+
none: false
|
30
40
|
requirements:
|
31
41
|
- - ">="
|
32
42
|
- !ruby/object:Gem::Version
|
43
|
+
hash: 31
|
44
|
+
segments:
|
45
|
+
- 1
|
46
|
+
- 2
|
47
|
+
- 0
|
33
48
|
version: 1.2.0
|
34
|
-
|
49
|
+
type: :runtime
|
50
|
+
version_requirements: *id002
|
35
51
|
- !ruby/object:Gem::Dependency
|
36
52
|
name: xamplr
|
37
|
-
|
38
|
-
|
39
|
-
|
53
|
+
prerelease: false
|
54
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
55
|
+
none: false
|
40
56
|
requirements:
|
41
57
|
- - ">="
|
42
58
|
- !ruby/object:Gem::Version
|
43
|
-
|
44
|
-
|
59
|
+
hash: 41
|
60
|
+
segments:
|
61
|
+
- 1
|
62
|
+
- 9
|
63
|
+
- 13
|
64
|
+
version: 1.9.13
|
65
|
+
type: :runtime
|
66
|
+
version_requirements: *id003
|
45
67
|
description: This is the xampl code generator for Ruby.
|
46
68
|
email: hutch@xampl.com
|
47
69
|
executables:
|
@@ -111,21 +133,27 @@ rdoc_options:
|
|
111
133
|
require_paths:
|
112
134
|
- lib
|
113
135
|
required_ruby_version: !ruby/object:Gem::Requirement
|
136
|
+
none: false
|
114
137
|
requirements:
|
115
138
|
- - ">="
|
116
139
|
- !ruby/object:Gem::Version
|
140
|
+
hash: 3
|
141
|
+
segments:
|
142
|
+
- 0
|
117
143
|
version: "0"
|
118
|
-
version:
|
119
144
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
145
|
+
none: false
|
120
146
|
requirements:
|
121
147
|
- - ">="
|
122
148
|
- !ruby/object:Gem::Version
|
149
|
+
hash: 3
|
150
|
+
segments:
|
151
|
+
- 0
|
123
152
|
version: "0"
|
124
|
-
version:
|
125
153
|
requirements: []
|
126
154
|
|
127
155
|
rubyforge_project:
|
128
|
-
rubygems_version: 1.3.
|
156
|
+
rubygems_version: 1.3.7
|
129
157
|
signing_key:
|
130
158
|
specification_version: 3
|
131
159
|
summary: This is the xampl code generator for Ruby
|