gen 0.29.0 → 0.30.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. data/ProjectInfo +18 -19
  2. data/README +2 -2
  3. data/lib/gen.rb +3 -3
  4. metadata +10 -11
  5. data/Rakefile +0 -220
data/ProjectInfo CHANGED
@@ -2,41 +2,40 @@
2
2
 
3
3
  TITLE : &title Gen
4
4
  NAME : &pkg gen
5
- VERSION : '0.29.0'
5
+ VERSION : '0.30.0'
6
6
  STATUS : beta
7
7
 
8
8
  AUTHOR : George Moschovitis
9
9
  EMAIL : &email gm@navel.gr
10
- HOMEPAGE : "http://www.nitrohq.com"
10
+ HOMEPAGE : "http://www.nitroproject.org"
11
11
 
12
12
  SUMMARY: A simple code generation system.
13
13
 
14
14
  DESCRIPTION: >
15
15
  A simple code generation system.
16
-
17
- DISTRIBUTE: [ gem, tgz, zip ]
16
+
17
+ RUBYFORGE:
18
+ PROJECT: 'nitro'
19
+ USERNAME: 'gmosx'
18
20
 
19
21
  DEPENDENCIES:
20
- - [ glue, '= 0.29.0' ]
22
+ - [ glue, '= 0.30.0' ]
21
23
 
22
24
  EXECUTABLES: [ gen ]
23
25
 
24
- RUBYFORGE:
25
- PROJECT: 'nitro'
26
- USERNAME: 'gmosx'
26
+ PACKAGE: !!package
27
+ distribute: [ gem, tgz, zip ]
27
28
 
28
- RDOC:
29
- - dir: rdoc
30
- options: ['--all', '--inline-source']
31
- include:
32
- - 'lib/gen/**/*'
33
- - '[A-Z]*'
29
+ RDOC: !!rdoc
30
+ dir: rdoc
31
+ options: ['--all', '--inline-source']
32
+ include:
33
+ - 'lib/gen/**/*'
34
+ - '[A-Z]*'
34
35
 
35
- # Anything to require upfront?
36
- #TEST:
37
- # fixture: ''
36
+ TEST: !!test
38
37
 
39
- ANNOUNCE:
38
+ ANNOUNCE: !!announce
40
39
  to: george.moschovitis@gmail.com
41
40
  from: gm@navel.gr
42
41
  domain: navel.gr
@@ -48,5 +47,5 @@ ANNOUNCE:
48
47
  file: ANN
49
48
  slogan: Gen
50
49
  links:
51
- - http://www.nitrohq.com
50
+ - http://www.nitroproject.org
52
51
 
data/README CHANGED
@@ -1,4 +1,4 @@
1
- = Gen 0.29.0 README
1
+ = Gen 0.30.0 README
2
2
 
3
3
  A Ruby code generation framework.
4
4
 
@@ -31,7 +31,7 @@ http://rubyforge.org/mailman/listinfo/nitro-general
31
31
  Copyright (c) 2005-2006, George 'gmosx' Moschovitis (http://www.gmosx.com)
32
32
  Copyright (c) 2005-2006, Navel Ltd (http://www.navel.gr)
33
33
 
34
- Gen (http://www.nitrohq.com) is copyrighted free software
34
+ Gen (http://www.nitroproject.org) is copyrighted free software
35
35
  created and maintained by George Moschovitis (mailto:gm@navel.gr)
36
36
  and released under the standard BSD Licence. For details consult
37
37
  the file LICENCE.
data/lib/gen.rb CHANGED
@@ -5,7 +5,7 @@
5
5
  # Copyright (c) 2005-2006, George Moschovitis (http://www.gmosx.com)
6
6
  # Copyright (c) 2005-2006, Navel Ltd (http://www.navel.gr)
7
7
  #
8
- # Gen (http://www.nitrohq.com) is copyrighted free software
8
+ # Gen (http://www.nitroproject.org) is copyrighted free software
9
9
  # created and maintained by George Moschovitis (mailto:gm@navel.gr)
10
10
  # and released under the standard BSD Licence. For details
11
11
  # consult the file doc/LICENCE.
@@ -14,7 +14,7 @@ class Gen
14
14
 
15
15
  # The version.
16
16
 
17
- Version = '0.29.0'
17
+ Version = '0.30.0'
18
18
 
19
19
  # Library path.
20
20
 
@@ -24,7 +24,7 @@ end
24
24
 
25
25
  # The base generator class.
26
26
  #--
27
- # TODO: add support for cmdparse.
27
+ # TODO: add support for facets consoleapp.
28
28
  #++
29
29
 
30
30
  class Gen
metadata CHANGED
@@ -3,13 +3,13 @@ rubygems_version: 0.8.11
3
3
  specification_version: 1
4
4
  name: gen
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.29.0
7
- date: 2006-03-07 00:00:00 +02:00
6
+ version: 0.30.0
7
+ date: 2006-05-05 00:00:00 +03:00
8
8
  summary: A simple code generation system.
9
9
  require_paths:
10
10
  - lib
11
11
  email: gm@navel.gr
12
- homepage: http://www.nitrohq.com
12
+ homepage: http://www.nitroproject.org
13
13
  rubyforge_project: nitro
14
14
  description:
15
15
  autorequire:
@@ -22,7 +22,7 @@ required_ruby_version: !ruby/object:Gem::Version::Requirement
22
22
  - !ruby/object:Gem::Version
23
23
  version: 0.0.0
24
24
  version:
25
- platform: ruby
25
+ platform:
26
26
  signing_key:
27
27
  cert_chain:
28
28
  authors:
@@ -30,23 +30,22 @@ authors:
30
30
  files:
31
31
  - bin
32
32
  - doc
33
- - lib
34
33
  - ProjectInfo
35
- - Rakefile
36
34
  - README
35
+ - lib
37
36
  - setup.rb
38
37
  - bin/gen
39
- - doc/RELEASES
40
- - doc/LICENSE
41
38
  - doc/AUTHORS
39
+ - doc/LICENSE
40
+ - doc/RELEASES
42
41
  - lib/gen
43
42
  - lib/gen.rb
44
43
  - lib/gen/app
45
44
  - lib/gen/form
46
- - lib/gen/app/gen.rb
47
45
  - lib/gen/app/USAGE
48
- - lib/gen/form/gen.rb
46
+ - lib/gen/app/gen.rb
49
47
  - lib/gen/form/USAGE
48
+ - lib/gen/form/gen.rb
50
49
  test_files: []
51
50
 
52
51
  rdoc_options: []
@@ -67,5 +66,5 @@ dependencies:
67
66
  requirements:
68
67
  - - "="
69
68
  - !ruby/object:Gem::Version
70
- version: 0.29.0
69
+ version: 0.30.0
71
70
  version:
data/Rakefile DELETED
@@ -1,220 +0,0 @@
1
- require 'rake/rdoctask'
2
- require 'rake/testtask'
3
- require 'rake/gempackagetask'
4
-
5
- # Initialize some variables.
6
-
7
- readme = File.read('README')
8
- Release = (readme[/^= (.+) README$/, 1] || 'unknown').downcase.tr(" ", "-")
9
- Name = Release[/\D+/].sub(/\-+$/, '') || 'unknown'
10
- Version = Release[/[\d.]+/] || 'unknown'
11
-
12
- AuthorName, AuthorMail = 'George Moschovitis', 'gm@navel.gr'
13
- RubyVersion = '1.8.3'
14
-
15
- # Description = (readme[/README\s+(.+?)\n\n/m, 1] || "unknown").gsub(/\s+/, " ")
16
- # Summary = Description[/^.+?>/] || "unknown"
17
-
18
- # DocFiles = %w(README NEWS TODO COPYING GPL)
19
- # RDocFiles = DocFiles - %w(GPL)
20
- RDocOpts = ["--inline-source", "--line-numbers","--title", Name ]
21
- # AdditionalFiles = DocFiles + %w(setup.rb)
22
- VersionFile = MainFile = File.join("lib", Name + '.rb')
23
-
24
- RubyForgeProject = Name
25
- RubyForgeUser = 'gmosx'
26
- Homepage = "http://www.nitrohq.org/"
27
-
28
- task :default => :package
29
-
30
- # Run the tests.
31
-
32
- Rake::TestTask.new do |t|
33
- t.libs << 'test'
34
- t.test_files = FileList['test/**/tc*.rb']
35
- t.verbose = true
36
- end
37
-
38
- # Generate RDoc documentation.
39
-
40
- Rake::RDocTask.new do |rd|
41
- rd.main = 'README'
42
- rd.rdoc_dir = 'rdoc'
43
- rd.rdoc_files.include('README', 'INSTALL', 'doc/RELEASES', 'lib/**/*.rb')
44
- rd.options << '--all --inline-source'
45
- end
46
-
47
- # Build gem.
48
-
49
- spec = Gem::Specification.new do |s|
50
- s.name = 'gen'
51
- if File.read('lib/gen.rb') =~ /Version\s+=\s+'(\d+\.\d+\.\d+)'/
52
- s.version = $1
53
- else
54
- raise 'No version found'
55
- end
56
- s.summary = 'Gen code generation framework'
57
- s.description = 'A simple code generation framework.'
58
-
59
- s.add_dependency 'glue', "= #{s.version}"
60
- s.add_dependency 'og', "= #{s.version}"
61
- s.add_dependency 'nitro', "= #{s.version}"
62
-
63
- s.required_ruby_version = '= 1.8.3'
64
-
65
- s.files = FileList[
66
- '[A-Z]*', '{bin,doc,lib,test}/**/*'
67
- ].exclude("_darcs").exclude("_darcs/**/*").exclude('*.og').exclude('**/*.log').to_a
68
-
69
- s.require_path = 'lib'
70
- s.autorequire = 'nitro'
71
-
72
- s.has_rdoc = true
73
- s.extra_rdoc_files = FileList['[A-Z]*'].to_a
74
- s.rdoc_options << '--main' << 'README' << '--title' << 'Gen Documentation'
75
- s.rdoc_options << '--all' << '--inline-source'
76
-
77
- s.test_files = []
78
-
79
- s.bindir = 'bin'
80
- s.executables = ['gen']
81
- s.default_executable = 'gen'
82
-
83
- s.author = 'George Moschovitis'
84
- s.email = 'gm@navel.gr'
85
- s.homepage = 'http://www.nitrohq.com'
86
- s.rubyforge_project = 'gen'
87
- end
88
-
89
- Rake::GemPackageTask.new(spec) do |pkg|
90
- pkg.package_dir = 'dist'
91
- pkg.need_zip = true
92
- pkg.need_tar = true
93
- end
94
-
95
- # Manual install (not recommended).
96
-
97
- task :install do
98
- ruby 'setup.rb'
99
- end
100
-
101
- # Release files to Rubyforge.
102
- # The code for this task provided by Florian Gross.
103
-
104
- desc "Publish the release files to RubyForge."
105
- task :publish => [:package] do
106
- files = ['gem', 'tgz', 'zip'].map { |ext| "dist/#{Release}.#{ext}" }
107
-
108
- if RubyForgeProject then
109
- require 'net/http'
110
- require 'open-uri'
111
-
112
- changes = ''
113
- if File.exist?('doc/RELEASES') then
114
- changes_re = /^== \s+ Version \s+ #{Regexp.quote(Version)} \s*
115
- (.+?) (?:==|\Z)/mx
116
- changes = File.read('doc/RELEASES')[changes_re, 1] || ''
117
- end
118
-
119
- project_uri = "http://rubyforge.org/projects/#{RubyForgeProject}/"
120
- project_data = open(project_uri) { |data| data.read }
121
- group_id = project_data[/[?&]group_id=(\d+)/, 1]
122
- raise "Couldn't get group id" unless group_id
123
-
124
- print "#{RubyForgeUser}@rubyforge.org's password: "
125
- password = STDIN.gets.chomp
126
-
127
- login_response = Net::HTTP.start('rubyforge.org', 80) do |http|
128
- data = [
129
- "login=1",
130
- "form_loginname=#{RubyForgeUser}",
131
- "form_pw=#{password}"
132
- ].join("&")
133
- http.post('/account/login.php', data)
134
- end
135
-
136
- cookie = login_response['set-cookie']
137
- raise 'Login failed' unless cookie
138
- headers = { 'Cookie' => cookie }
139
-
140
- release_uri = "http://rubyforge.org/frs/admin/?group_id=#{group_id}"
141
- release_data = open(release_uri, headers) { |data| data.read }
142
- package_id = release_data[/[?&]package_id=(\d+)/, 1]
143
- raise "Couldn't get package id" unless package_id
144
-
145
- first_file = true
146
- release_id = ""
147
-
148
- files.each do |filename|
149
- basename = File.basename(filename)
150
- file_ext = File.extname(filename)
151
- file_data = File.open(filename, "rb") { |file| file.read }
152
-
153
- puts "Releasing #{basename}..."
154
-
155
- release_response = Net::HTTP.start('rubyforge.org', 80) do |http|
156
- release_date = Time.now.strftime('%Y-%m-%d %H:%M')
157
- type_map = {
158
- '.zip' => '3000',
159
- '.tgz' => '3110',
160
- '.gz' => '3110',
161
- '.gem' => '1400',
162
- '.md5sum' => '8100'
163
- }; type_map.default = '9999'
164
- type = type_map[file_ext]
165
- boundary = 'rubyqMY6QN9bp6e4kS21H4y0zxcvoor'
166
-
167
- query_hash = if first_file then
168
- {
169
- 'group_id' => group_id,
170
- 'package_id' => package_id,
171
- 'release_name' => Release,
172
- 'release_date' => release_date,
173
- 'type_id' => type,
174
- 'processor_id' => '8000', # Any
175
- 'release_notes' => '',
176
- 'release_changes' => changes,
177
- 'preformatted' => '1',
178
- 'submit' => '1'
179
- }
180
- else
181
- {
182
- 'group_id' => group_id,
183
- 'release_id' => release_id,
184
- 'package_id' => package_id,
185
- 'step2' => '1',
186
- 'type_id' => type,
187
- 'processor_id' => '8000', # Any
188
- 'submit' => 'Add This File'
189
- }
190
- end
191
-
192
- query = '?' + query_hash.map do |(name, value)|
193
- [name, URI.encode(value)].join('=')
194
- end.join('&')
195
-
196
- data = [
197
- "--" + boundary,
198
- "Content-Disposition: form-data; name=\"userfile\"; filename=\"#{basename}\"",
199
- "Content-Type: application/octet-stream",
200
- "Content-Transfer-Encoding: binary",
201
- "", file_data, ""
202
- ].join("\x0D\x0A")
203
-
204
- release_headers = headers.merge(
205
- 'Content-Type' => "multipart/form-data; boundary=#{boundary}"
206
- )
207
-
208
- target = first_file ? '/frs/admin/qrs.php' : '/frs/admin/editrelease.php'
209
- http.post(target + query, data, release_headers)
210
- end
211
-
212
- if first_file then
213
- release_id = release_response.body[/release_id=(\d+)/, 1]
214
- raise("Couldn't get release id") unless release_id
215
- end
216
-
217
- first_file = false
218
- end
219
- end
220
- end