rhodes 0.3.0 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (65) hide show
  1. data/Manifest.txt +0 -61
  2. data/Rakefile +11 -13
  3. data/lib/rhodes.rb +2 -2
  4. metadata +33 -77
  5. data/History.txt +0 -40
  6. data/README.rdoc +0 -2
  7. data/bin/rhogen +0 -8
  8. data/generators/rhogen.rb +0 -131
  9. data/generators/templates/application/application.rb +0 -4
  10. data/generators/templates/application/index.erb +0 -11
  11. data/generators/templates/application/layout.erb +0 -17
  12. data/generators/templates/model/config.rb +0 -3
  13. data/generators/templates/model/controller.rb +0 -49
  14. data/generators/templates/model/edit.erb +0 -21
  15. data/generators/templates/model/index.erb +0 -10
  16. data/generators/templates/model/new.erb +0 -16
  17. data/generators/templates/model/show.erb +0 -6
  18. data/generators/templates/source/source_adapter.rb +0 -56
  19. data/lib/ServeME.rb +0 -7
  20. data/lib/TestServe.rb +0 -9
  21. data/lib/bsearch.rb +0 -120
  22. data/lib/builtinME.rb +0 -588
  23. data/lib/date.rb +0 -1792
  24. data/lib/date/format.rb +0 -1339
  25. data/lib/dateME.rb +0 -24
  26. data/lib/erb.rb +0 -896
  27. data/lib/find.rb +0 -81
  28. data/lib/rational.rb +0 -19
  29. data/lib/rationalME.rb +0 -530
  30. data/lib/rho.rb +0 -1
  31. data/lib/rho/render.rb +0 -51
  32. data/lib/rho/rho.rb +0 -240
  33. data/lib/rho/rhoapplication.rb +0 -36
  34. data/lib/rho/rhocontact.rb +0 -110
  35. data/lib/rho/rhocontroller.rb +0 -35
  36. data/lib/rho/rhofsconnector.rb +0 -32
  37. data/lib/rho/rhosupport.rb +0 -139
  38. data/lib/rho/rhoviewhelpers.rb +0 -121
  39. data/lib/rhoframework.rb +0 -38
  40. data/lib/rhofsconnector.rb +0 -1
  41. data/lib/rhom.rb +0 -1
  42. data/lib/rhom/rhom.rb +0 -58
  43. data/lib/rhom/rhom_db_adapter.rb +0 -185
  44. data/lib/rhom/rhom_db_adapterME.rb +0 -93
  45. data/lib/rhom/rhom_object.rb +0 -65
  46. data/lib/rhom/rhom_object_factory.rb +0 -197
  47. data/lib/rhom/rhom_source.rb +0 -60
  48. data/lib/singleton.rb +0 -137
  49. data/lib/time.rb +0 -489
  50. data/spec/app_generator_spec.rb +0 -33
  51. data/spec/app_manifest.txt +0 -3
  52. data/spec/configs/account.rb +0 -3
  53. data/spec/configs/case.rb +0 -3
  54. data/spec/configs/employee.rb +0 -3
  55. data/spec/generator_spec_helper.rb +0 -12
  56. data/spec/model_generator_spec.rb +0 -36
  57. data/spec/rho_controller_spec.rb +0 -139
  58. data/spec/rho_spec.rb +0 -61
  59. data/spec/rhom_object_factory_spec.rb +0 -132
  60. data/spec/rhom_spec.rb +0 -45
  61. data/spec/source_generator_spec.rb +0 -27
  62. data/spec/spec_helper.rb +0 -48
  63. data/spec/stubs.rb +0 -31
  64. data/spec/syncdbtest.sqlite +0 -0
  65. data/tasks/rspec.rake +0 -34
@@ -1,67 +1,6 @@
1
1
  .gitignore
2
- History.txt
3
2
  Manifest.txt
4
- README.rdoc
5
3
  Rakefile
6
- bin/rhogen
7
- generators/rhogen.rb
8
- generators/templates/application/application.rb
9
- generators/templates/application/index.erb
10
- generators/templates/application/layout.erb
11
- generators/templates/model/config.rb
12
- generators/templates/model/controller.rb
13
- generators/templates/model/edit.erb
14
- generators/templates/model/index.erb
15
- generators/templates/model/new.erb
16
- generators/templates/model/show.erb
17
- generators/templates/source/source_adapter.rb
18
- lib/ServeME.rb
19
- lib/TestServe.rb
20
- lib/bsearch.rb
21
- lib/builtinME.rb
22
- lib/date.rb
23
- lib/date/format.rb
24
- lib/dateME.rb
25
- lib/erb.rb
26
- lib/find.rb
27
- lib/rational.rb
28
- lib/rationalME.rb
29
- lib/rho.rb
30
- lib/rho/render.rb
31
- lib/rho/rho.rb
32
- lib/rho/rhoapplication.rb
33
- lib/rho/rhocontact.rb
34
- lib/rho/rhocontroller.rb
35
- lib/rho/rhofsconnector.rb
36
- lib/rho/rhosupport.rb
37
- lib/rho/rhoviewhelpers.rb
38
4
  lib/rhodes.rb
39
- lib/rhoframework.rb
40
- lib/rhofsconnector.rb
41
- lib/rhom.rb
42
- lib/rhom/rhom.rb
43
- lib/rhom/rhom_db_adapter.rb
44
- lib/rhom/rhom_db_adapterME.rb
45
- lib/rhom/rhom_object.rb
46
- lib/rhom/rhom_object_factory.rb
47
- lib/rhom/rhom_source.rb
48
- lib/singleton.rb
49
- lib/time.rb
50
5
  rhodes.gemspec
51
- spec/app_generator_spec.rb
52
- spec/app_manifest.txt
53
- spec/configs/account.rb
54
- spec/configs/case.rb
55
- spec/configs/employee.rb
56
- spec/generator_spec_helper.rb
57
- spec/model_generator_spec.rb
58
- spec/rho_controller_spec.rb
59
- spec/rho_spec.rb
60
- spec/rhom_object_factory_spec.rb
61
- spec/rhom_spec.rb
62
- spec/source_generator_spec.rb
63
6
  spec/spec.opts
64
- spec/spec_helper.rb
65
- spec/stubs.rb
66
- spec/syncdbtest.sqlite
67
- tasks/rspec.rake
data/Rakefile CHANGED
@@ -1,6 +1,7 @@
1
1
  %w[rubygems rake rake/clean fileutils newgem].each { |f| require f }
2
2
  $:.unshift(File.join(File.dirname(__FILE__), 'lib'))
3
- require 'rhodes'
3
+ require 'lib/rhodes.rb'
4
+ require '../deps.rb'
4
5
 
5
6
  task :default => [:spec, :features]
6
7
 
@@ -8,18 +9,13 @@ task :default => [:spec, :features]
8
9
  # Run 'rake -T' to see list of generated tasks (from gem root directory)
9
10
  $hoe = Hoe.new('rhodes', Rhodes::VERSION) do |p|
10
11
  p.developer('Rhomobile Dev', 'dev@rhomobile.com')
11
- p.changes = p.paragraphs_of("History.txt", 0..1).join("\n\n")
12
+ p.changes = p.paragraphs_of("../History.txt", 0..1).join("\n\n") if File.exists? "../History.txt"
12
13
  #p.post_install_message = 'PostInstall.txt' # TODO remove if post-install message not required
13
14
  p.rubyforge_name = p.name # TODO this is default value
14
- p.extra_deps = [
15
- ['sqlite3-ruby','= 1.2.3'],
16
- ['rcov'],
17
- ['rspec'],
18
- ['templater'],
19
- ['diff-lcs'],
20
- ['extlib'],
21
- ['newgem'],
22
- ['activesupport']
15
+ p.extra_deps = $rhodesdeps + [
16
+ ['rhodes-framework'],
17
+ ['rhodes-generator'],
18
+ ['rhodes-build']
23
19
  ]
24
20
 
25
21
  p.clean_globs |= %w[**/.DS_Store tmp *.log]
@@ -27,9 +23,11 @@ $hoe = Hoe.new('rhodes', Rhodes::VERSION) do |p|
27
23
  p.remote_rdoc_dir = File.join(path.gsub(/^#{p.rubyforge_name}\/?/,''), 'rdoc')
28
24
  p.rsync_args = '-av --delete --ignore-errors'
29
25
  p.test_globs = ''
26
+ p.summary = "rhodes #{Rhodes::VERSION}"
27
+
30
28
  end
31
29
 
32
30
  require 'newgem/tasks' # load /tasks/*.rake
33
31
  # remove test task TODO: why does this run anyway?
34
- Rake.application.remove_task(:test)
35
- Dir['tasks/**/*.rake'].each { |t| load t }
32
+ #Rake.application.remove_task(:test)
33
+ Dir['tasks/**/*.rake'].each { |t| load t }
@@ -1,9 +1,9 @@
1
1
  module Rhodes
2
2
  unless defined? Rhodes::VERSION
3
- VERSION = '0.3.0'
3
+ VERSION = '1.0.0'
4
4
  end
5
5
  unless defined? Rhodes::DBVERSION
6
- DBVERSION = '0.2.6'
6
+ DBVERSION = '1.0.0'
7
7
  end
8
8
 
9
9
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rhodes
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rhomobile Dev
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-02-05 00:00:00 -08:00
12
+ date: 2009-03-23 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -43,7 +43,7 @@ dependencies:
43
43
  version: "0"
44
44
  version:
45
45
  - !ruby/object:Gem::Dependency
46
- name: templater
46
+ name: diff-lcs
47
47
  type: :runtime
48
48
  version_requirement:
49
49
  version_requirements: !ruby/object:Gem::Requirement
@@ -53,7 +53,7 @@ dependencies:
53
53
  version: "0"
54
54
  version:
55
55
  - !ruby/object:Gem::Dependency
56
- name: diff-lcs
56
+ name: extlib
57
57
  type: :runtime
58
58
  version_requirement:
59
59
  version_requirements: !ruby/object:Gem::Requirement
@@ -63,7 +63,7 @@ dependencies:
63
63
  version: "0"
64
64
  version:
65
65
  - !ruby/object:Gem::Dependency
66
- name: extlib
66
+ name: newgem
67
67
  type: :runtime
68
68
  version_requirement:
69
69
  version_requirements: !ruby/object:Gem::Requirement
@@ -73,7 +73,7 @@ dependencies:
73
73
  version: "0"
74
74
  version:
75
75
  - !ruby/object:Gem::Dependency
76
- name: newgem
76
+ name: activesupport
77
77
  type: :runtime
78
78
  version_requirement:
79
79
  version_requirements: !ruby/object:Gem::Requirement
@@ -83,7 +83,27 @@ dependencies:
83
83
  version: "0"
84
84
  version:
85
85
  - !ruby/object:Gem::Dependency
86
- name: activesupport
86
+ name: rhodes-framework
87
+ type: :runtime
88
+ version_requirement:
89
+ version_requirements: !ruby/object:Gem::Requirement
90
+ requirements:
91
+ - - ">="
92
+ - !ruby/object:Gem::Version
93
+ version: "0"
94
+ version:
95
+ - !ruby/object:Gem::Dependency
96
+ name: rhodes-generator
97
+ type: :runtime
98
+ version_requirement:
99
+ version_requirements: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: "0"
104
+ version:
105
+ - !ruby/object:Gem::Dependency
106
+ name: rhodes-build
87
107
  type: :runtime
88
108
  version_requirement:
89
109
  version_requirements: !ruby/object:Gem::Requirement
@@ -102,92 +122,28 @@ dependencies:
102
122
  - !ruby/object:Gem::Version
103
123
  version: 1.8.0
104
124
  version:
105
- description: ""
125
+ description:
106
126
  email:
107
127
  - dev@rhomobile.com
108
- executables:
109
- - rhogen
128
+ executables: []
129
+
110
130
  extensions: []
111
131
 
112
132
  extra_rdoc_files:
113
- - History.txt
114
133
  - Manifest.txt
115
- - README.rdoc
116
- - spec/app_manifest.txt
117
134
  files:
118
135
  - .gitignore
119
- - History.txt
120
136
  - Manifest.txt
121
- - README.rdoc
122
137
  - Rakefile
123
- - bin/rhogen
124
- - generators/rhogen.rb
125
- - generators/templates/application/application.rb
126
- - generators/templates/application/index.erb
127
- - generators/templates/application/layout.erb
128
- - generators/templates/model/config.rb
129
- - generators/templates/model/controller.rb
130
- - generators/templates/model/edit.erb
131
- - generators/templates/model/index.erb
132
- - generators/templates/model/new.erb
133
- - generators/templates/model/show.erb
134
- - generators/templates/source/source_adapter.rb
135
- - lib/ServeME.rb
136
- - lib/TestServe.rb
137
- - lib/bsearch.rb
138
- - lib/builtinME.rb
139
- - lib/date.rb
140
- - lib/date/format.rb
141
- - lib/dateME.rb
142
- - lib/erb.rb
143
- - lib/find.rb
144
- - lib/rational.rb
145
- - lib/rationalME.rb
146
- - lib/rho.rb
147
- - lib/rho/render.rb
148
- - lib/rho/rho.rb
149
- - lib/rho/rhoapplication.rb
150
- - lib/rho/rhocontact.rb
151
- - lib/rho/rhocontroller.rb
152
- - lib/rho/rhofsconnector.rb
153
- - lib/rho/rhosupport.rb
154
- - lib/rho/rhoviewhelpers.rb
155
138
  - lib/rhodes.rb
156
- - lib/rhoframework.rb
157
- - lib/rhofsconnector.rb
158
- - lib/rhom.rb
159
- - lib/rhom/rhom.rb
160
- - lib/rhom/rhom_db_adapter.rb
161
- - lib/rhom/rhom_db_adapterME.rb
162
- - lib/rhom/rhom_object.rb
163
- - lib/rhom/rhom_object_factory.rb
164
- - lib/rhom/rhom_source.rb
165
- - lib/singleton.rb
166
- - lib/time.rb
167
139
  - rhodes.gemspec
168
- - spec/app_generator_spec.rb
169
- - spec/app_manifest.txt
170
- - spec/configs/account.rb
171
- - spec/configs/case.rb
172
- - spec/configs/employee.rb
173
- - spec/generator_spec_helper.rb
174
- - spec/model_generator_spec.rb
175
- - spec/rho_controller_spec.rb
176
- - spec/rho_spec.rb
177
- - spec/rhom_object_factory_spec.rb
178
- - spec/rhom_spec.rb
179
- - spec/source_generator_spec.rb
180
140
  - spec/spec.opts
181
- - spec/spec_helper.rb
182
- - spec/stubs.rb
183
- - spec/syncdbtest.sqlite
184
- - tasks/rspec.rake
185
141
  has_rdoc: true
186
- homepage: " * See rhodes/README.rdoc for more information"
142
+ homepage:
187
143
  post_install_message:
188
144
  rdoc_options:
189
145
  - --main
190
- - README.rdoc
146
+ - README.txt
191
147
  require_paths:
192
148
  - lib
193
149
  required_ruby_version: !ruby/object:Gem::Requirement
@@ -208,6 +164,6 @@ rubyforge_project: rhodes
208
164
  rubygems_version: 1.3.1
209
165
  signing_key:
210
166
  specification_version: 2
211
- summary: ""
167
+ summary: rhodes 1.0.0
212
168
  test_files: []
213
169
 
@@ -1,40 +0,0 @@
1
- == 0.3.0 2009-02-05
2
- * initial 0.3 release
3
-
4
- == 0.2.6 2009-01-29
5
- * changed signature of url_for, link_to, and redirect
6
-
7
- == 0.2.5 2009-01-28
8
- * erb labels are now humanized
9
-
10
- == 0.2.4 2009-01-27
11
- * added show.erb to model generator [#164]
12
- * base source_adapter should include user_id on sync
13
-
14
- == 0.2.3 2009-01-26
15
- * added newgem dependency
16
-
17
- == 0.2.2 2009-01-23
18
- * fixed bug in layout.erb template
19
-
20
- == 0.2.1 2009-01-20
21
- * adding new layout framework to generator [#45]
22
-
23
- == 0.2.0 2009-01-07
24
- * releasing 0.2 version of gem
25
- * fixed sqlite3-ruby 1.2.4 dependency [#147]
26
- * fixed broken rspec tests [#148]
27
-
28
- == 0.1.3 2008-12-11
29
- * Updated source_adapter generator to have base class
30
- * fixed #50, removed dependency on Find library
31
-
32
- == 0.1.2 2008-12-09
33
- * Added rhogen source <MySourceAdapter>
34
-
35
- == 0.1.1 2008-11-18
36
- * Fixed template application name
37
-
38
- == 0.1.0 2008-11-18
39
- * 1 major enhancement:
40
- * Initial release
@@ -1,2 +0,0 @@
1
- = rhodes framework
2
- * See rhodes/README.rdoc for more information
data/bin/rhogen DELETED
@@ -1,8 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require 'rubygems'
4
- require 'rhodes'
5
- require 'templater'
6
- require File.join(File.dirname(__FILE__), '..', 'generators', 'rhogen')
7
-
8
- Rhogen.run_cli(Dir.pwd, 'rhogen', Rhodes::VERSION, ARGV)
@@ -1,131 +0,0 @@
1
- require 'rubygems'
2
- require 'templater'
3
- require 'activesupport'
4
-
5
- module Rhogen
6
- extend Templater::Manifold
7
-
8
- desc <<-DESC
9
- Generate rhodes application
10
- DESC
11
-
12
- class BaseGenerator < Templater::Generator
13
- def class_name
14
- name.gsub('-', '_').camel_case
15
- end
16
-
17
- alias_method :module_name, :class_name
18
- end
19
-
20
- class AppGenerator < BaseGenerator
21
-
22
- def self.source_root
23
- File.join(File.dirname(__FILE__), 'templates', 'application')
24
- end
25
-
26
- desc <<-DESC
27
- Generates a new rhodes application. This will create a new directory with two files:
28
- application.rb and index.html
29
- DESC
30
-
31
- #option :testing_framework, :desc => 'Specify which testing framework to use (spec, test_unit)'
32
-
33
- first_argument :name, :required => true, :desc => "application name"
34
-
35
- template :application do |template|
36
- template.source = 'application.rb'
37
- template.destination = "#{name.camel_case}/application.rb"
38
- end
39
-
40
- template :index do |template|
41
- template.source = 'index.erb'
42
- template.destination = "#{name.camel_case}/index.erb"
43
- end
44
-
45
- template :layout do |template|
46
- template.source = 'layout.erb'
47
- template.destination = "#{name.camel_case}/layout.erb"
48
- end
49
-
50
- end
51
-
52
- class ModelGenerator < BaseGenerator
53
- include ActiveSupport::Inflector
54
-
55
- def self.source_root
56
- File.join(File.dirname(__FILE__), 'templates', 'model')
57
- end
58
-
59
- desc <<-DESC
60
- Generates a new model for a given source. You must specify name, source_url, and source_id.
61
- You can also specify an optional attribute list in the form: 'attribute1', 'attribute2', 'attribute3'...
62
- DESC
63
-
64
- #option :testing_framework, :desc => 'Specify which testing framework to use (spec, test_unit)'
65
-
66
- first_argument :name, :required => true, :desc => "model name"
67
- second_argument :source_url, :required => true, :desc => "source url"
68
- third_argument :source_id, :required => true, :desc => "source id"
69
- fourth_argument :attributes, :as => :array, :default => [], :required => false, :desc => "array of attributes (only string suppported right now)"
70
-
71
- template :config do |template|
72
- template.source = 'config.rb'
73
- template.destination = "#{name.camel_case}/config.rb"
74
- end
75
-
76
- template :index do |template|
77
- template.source = 'index.erb'
78
- template.destination = "#{name.camel_case}/index.erb"
79
- end
80
-
81
- template :edit do |template|
82
- template.source = 'edit.erb'
83
- template.destination = "#{name.camel_case}/edit.erb"
84
- end
85
-
86
- template :new do |template|
87
- template.source = 'new.erb'
88
- template.destination = "#{name.camel_case}/new.erb"
89
- end
90
-
91
- template :new do |template|
92
- template.source = 'show.erb'
93
- template.destination = "#{name.camel_case}/show.erb"
94
- end
95
-
96
- template :controller do |template|
97
- template.source = 'controller.rb'
98
- template.destination = "#{name.camel_case}/controller.rb"
99
- end
100
-
101
- def attributes?
102
- self.attributes && !self.attributes.empty?
103
- end
104
-
105
- end
106
-
107
- class SourceGenerator < BaseGenerator
108
- def self.source_root
109
- File.join(File.dirname(__FILE__), 'templates', 'source')
110
- end
111
-
112
- desc <<-DESC
113
- Generates a new source adapter with the given name and attributes. You must specify name.
114
- You can also specify an optional attribute list in the form: 'attribute1', 'attribute2', 'attribute3'...
115
- DESC
116
-
117
- first_argument :name, :required => true, :desc => "model name"
118
- second_argument :attributes, :as => :array, :default => [], :required => false, :desc => "array of attributes (only string suppported right now)"
119
-
120
- template :config do |template|
121
- template.source = 'source_adapter.rb'
122
- template.destination = "lib/#{name.snake_case}.rb"
123
- end
124
-
125
- end
126
-
127
- add :app, AppGenerator
128
- add :model, ModelGenerator
129
- add :source, SourceGenerator
130
-
131
- end