dima-restfulx 1.2.2 → 1.2.3

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.
Files changed (58) hide show
  1. data/README.rdoc +1 -1
  2. data/Rakefile +4 -2
  3. data/VERSION.yml +1 -1
  4. data/app_generators/rx_app/rx_app_generator.rb +2 -2
  5. data/app_generators/rx_app/templates/actionscript.properties +1 -1
  6. data/app_generators/rx_app/templates/actionscriptair.properties +1 -1
  7. data/app_generators/rx_app/templates/mainapp-config.xml +1 -0
  8. data/app_generators/rx_app/templates/mainapp.mxml +19 -3
  9. data/app_generators/rx_app/templates/restfulx.yml +9 -24
  10. data/bin/rx-gen +1 -1
  11. data/lib/restfulx/active_foo.rb +5 -3
  12. data/lib/restfulx/active_record_tasks.rb +1 -2
  13. data/lib/restfulx/active_record_uuid_helper.rb +17 -0
  14. data/lib/restfulx/configuration.rb +20 -26
  15. data/lib/restfulx/{schema_to_yaml → rails/schema_to_yaml}/extensions/enumerable.rb +1 -0
  16. data/lib/restfulx/{schema_to_yaml → rails/schema_to_yaml}/settings/config.rb +1 -0
  17. data/lib/restfulx/{schema_to_yaml → rails/schema_to_yaml}/settings/core.rb +4 -1
  18. data/lib/restfulx/{schema_to_yaml.rb → rails/schema_to_yaml.rb} +2 -12
  19. data/lib/restfulx/rails/swf_helper.rb +7 -8
  20. data/lib/restfulx/tasks.rb +0 -1
  21. data/lib/restfulx.rb +2 -10
  22. data/rails_generators/rx_config/rx_config_generator.rb +20 -9
  23. data/rails_generators/rx_config/templates/actionscript.properties +1 -1
  24. data/rails_generators/rx_config/templates/actionscriptair.properties +1 -1
  25. data/rails_generators/rx_config/templates/mainapp-config.xml +1 -0
  26. data/rails_generators/rx_config/templates/restfulx.erb +46 -10
  27. data/rails_generators/rx_config/templates/restfulx.yml +9 -5
  28. data/rails_generators/rx_config/templates/session_store_flash.erb +1 -0
  29. data/rails_generators/rx_main_app/rx_main_app_generator.rb +2 -2
  30. data/rails_generators/rx_main_app/templates/mainapp.mxml +1 -1
  31. data/rails_generators/rx_scaffold/rx_scaffold_generator.rb +16 -7
  32. data/rails_generators/rx_scaffold/templates/controllers/resource_controller.rb.erb +2 -2
  33. data/rails_generators/rx_scaffold/templates/functional_test.rb +45 -0
  34. data/rails_generators/rx_scaffold/templates/helper_test.rb +4 -0
  35. data/rails_generators/rx_scaffold/templates/layouts/default.erb +7 -5
  36. data/rails_generators/rx_scaffold/templates/migration.rb.erb +4 -4
  37. data/rxgen_generators/rx_config/rx_config_generator.rb +2 -0
  38. data/rxgen_generators/rx_controller/rx_controller_generator.rb +1 -0
  39. data/rxgen_generators/rx_controller/templates/assist.py +4 -4
  40. data/rxgen_generators/rx_controller/templates/iso8601.py +92 -0
  41. data/rxgen_generators/rx_main_app/rx_main_app_generator.rb +2 -2
  42. data/rxgen_generators/rx_main_app/templates/mainapp.mxml +19 -3
  43. data/rxgen_generators/rx_scaffold/rx_scaffold_generator.rb +57 -10
  44. data/rxgen_generators/rx_scaffold/templates/{component.mxml.erb → layouts/default.erb} +56 -10
  45. data/rxgen_generators/rx_scaffold/templates/model.as.erb +33 -2
  46. data/spec/restfulx_spec.rb +1 -4
  47. data/spec/spec_helper.rb +0 -3
  48. data/tasks/restfulx.rake +2 -0
  49. data/test/rails/helpers/functional_test_helper.rb +1 -1
  50. data/test/rails/helpers/test_helper.rb +1 -8
  51. data/test/rails/helpers/unit_test_helper.rb +2 -3
  52. data/test/rails/test_active_foo.rb +1 -1
  53. data/test/rails/test_rails_integration_functional.rb +1 -1
  54. data/test/rails/test_to_fxml.rb +1 -1
  55. data/test/rails/test_to_json.rb +1 -1
  56. metadata +60 -75
  57. data/lib/restfulx/uuid_helper.rb +0 -15
  58. /data/test/rails/controllers/{application.rb → application_controller.rb} +0 -0
@@ -8,9 +8,20 @@
8
8
  <% for model in belongs_tos -%>
9
9
  import <%= base_package %>.models.<%= model.camelcase %>;
10
10
  <% end -%>
11
+ <% if attachment_field.size > 0 -%>
12
+ import flash.net.FileReference;
13
+ import org.restfulx.utils.RxFileReference;
14
+ <% end -%>
11
15
 
12
16
  [Bindable]
13
17
  private var <%= class_name.dcfirst %>:<%= class_name %> = new <%= class_name %>();
18
+ <% if attachment_field.size > 0 -%>
19
+
20
+ [Bindable]
21
+ private var fileName:String = "None selected";
22
+
23
+ private var file:RxFileReference;
24
+ <% end -%>
14
25
 
15
26
  private function new<%= class_name %>():void {
16
27
  <%= class_name.dcfirst %> = new <%= class_name %>();
@@ -41,36 +52,64 @@
41
52
  <% else -%>
42
53
  <%= class_name.dcfirst %>.<%= attribute.flex_name %> = <%= attribute.flex_type %>(<%= attribute.flex_name %>TextInput.text);
43
54
  <% end -%>
44
- <% end -%>
45
-
55
+ <% end -%>
46
56
  <% for model in belongs_tos -%>
47
57
  <%= class_name.dcfirst %>.<%= model.camelcase(:lower) %> = <%= model.camelcase %>(<%= model.camelcase(:lower) %>ComboBox.selectedItem);
58
+ <% end -%>
59
+ <% if attachment_field.size > 0 -%>
60
+ <%= class_name.dcfirst %>.attachment = file;
48
61
  <% end -%>
49
62
  }
50
-
63
+
51
64
  private function destroy<%= class_name %>():void {
52
65
  <%= class_name.dcfirst %>.destroy({onSuccess: on<%= class_name %>Destroy});
53
66
  }
54
-
67
+
55
68
  private function on<%= class_name %>Select():void {
56
69
  <%= class_name.dcfirst %> = RxUtils.clone(<%= class_name.dcfirst.pluralize %>List.selectedItem) as <%= class_name %>;
57
70
  }
58
-
71
+
59
72
  private function on<%= class_name %>Create(result:<%= class_name %>):void {
60
73
  <%= class_name.dcfirst %> = new <%= class_name %>;
61
74
  }
62
-
75
+
63
76
  private function on<%= class_name %>Update(result:<%= class_name %>):void {
64
77
  <%= class_name.dcfirst.pluralize %>List.selectedItem = result;
65
78
  on<%= class_name %>Select();
66
79
  }
67
-
80
+
68
81
  private function on<%= class_name %>Destroy(result:<%= class_name %>):void {
69
82
  on<%= class_name %>Create(result);
83
+ }
84
+ <% if attachment_field.size > 0 -%>
85
+
86
+ private function chooseFile():void {
87
+ file = new RxFileReference("<%= attachment_field[0].camelcase(:lower) %>");
88
+ file.reference.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler, false, 0, true);
89
+ file.reference.addEventListener(Event.SELECT, selectFile, false, 0, true);
90
+ file.reference.addEventListener(Event.CANCEL, cancelBrowse, false, 0, true);
91
+ file.reference.browse();
92
+ }
93
+
94
+ private function selectFile(event:Event):void {
95
+ fileSelected(event)
96
+ }
97
+
98
+ private function cancelBrowse(event:Event):void {
99
+ file = null;
70
100
  }
101
+
102
+ private function fileSelected(event:Event):void {
103
+ fileName = FileReference(event.target).name;
104
+ }
105
+
106
+ private function ioErrorHandler(event:Event):void {
107
+ fileChooser.errorString = "Failed to selected a file. Please try again.";
108
+ }
109
+ <% end -%>
71
110
  ]]></mx:Script>
72
111
  <mx:Panel id="<%= class_name.dcfirst.pluralize %>Panel"
73
- title="<%= class_name.pluralize %>" cornerRadius="0" dropShadowEnabled="false" borderStyle="solid"
112
+ title="<%= class_name.pluralize %>" cornerRadius="0" dropShadowEnabled="false" borderStyle="solid"
74
113
  borderThickness="1" backgroundColor="#EEEEEE" width="25%" height="100%">
75
114
  <mx:List id="<%= class_name.dcfirst.pluralize %>List"
76
115
  width="100%" height="100%"
@@ -81,7 +120,7 @@
81
120
  click="new<%= class_name %>()"/>
82
121
  </mx:ControlBar>
83
122
  </mx:Panel>
84
- <mx:Panel title="Edit <%= class_name %>" cornerRadius="0" dropShadowEnabled="false" borderStyle="solid"
123
+ <mx:Panel title="Edit <%= class_name %>" cornerRadius="0" dropShadowEnabled="false" borderStyle="solid"
85
124
  borderThickness="1" backgroundColor="#EEEEEE" width="75%" height="100%">
86
125
  <mx:Form width="100%" height="100%">
87
126
  <% for attribute in attributes -%>
@@ -101,12 +140,19 @@
101
140
  <% end -%>
102
141
  </mx:FormItem>
103
142
  <% end -%>
143
+ <% if attachment_field.size > 0 -%>
144
+ <mx:FormItem label="<%= attachment_field[0].camelcase %>:" width="100%" id="fileChooser">
145
+ <mx:Button label="Browse…" id="fileBrowseButton" click="chooseFile()"/>
146
+ <mx:Label text="{fileName}" maxWidth="190"/>
147
+ <mx:Image source="{<%= class_name.dcfirst %>.attachmentUrl}"/>
148
+ </mx:FormItem>
149
+ <% end -%>
104
150
  <% for model in belongs_tos -%>
105
151
  <mx:FormItem label="<%= model.camelcase %>" width="100%">
106
152
  <mx:ComboBox id="<%= model.camelcase(:lower) %>ComboBox" width="200"
107
153
  labelField="{<%= model.camelcase %>.LABEL}"
108
154
  dataProvider="{Rx.models.index(<%= model.camelcase %>)}" prompt="<%= model.camelcase %> ..."
109
- selectedItem="{<%= class_name.dcfirst %>.<%= model.camelcase(:lower) %>}" />
155
+ selectedItem="{<%= class_name.dcfirst %>.<%= model.camelcase(:lower) %>}"/>
110
156
  </mx:FormItem>
111
157
  <% end -%>
112
158
  </mx:Form>
@@ -1,12 +1,19 @@
1
1
  package <%= base_package %>.models {
2
- <% if has_manies.length > 0 -%>
2
+ <% if has_manies.length > 0 || has_many_through.length > 0 -%>
3
3
  import org.restfulx.collections.ModelsCollection;
4
4
  <% end -%>
5
+ <% if tree_model.size > 0 -%>
6
+ <% @tree_or_no_tree = 'RxTreeModel' %>
7
+ import org.restfulx.models.RxTreeModel
8
+ <% end -%>
9
+ <% unless tree_model.size > 0 -%>
10
+ <% @tree_or_no_tree = 'RxModel' %>
5
11
  import org.restfulx.models.RxModel;
12
+ <% end -%>
6
13
 
7
14
  [Resource(name="<%= resource_controller_name %>")]
8
15
  [Bindable]
9
- public class <%= class_name %> extends RxModel {
16
+ public class <%= class_name %> extends <%= @tree_or_no_tree %> {
10
17
  <% if attributes && !attributes.empty? && attributes[0].flex_type != "Boolean" -%>
11
18
  public static const LABEL:String = "<%= attributes[0].flex_name %>";
12
19
  <% else -%>
@@ -24,6 +31,25 @@ package <%= base_package %>.models {
24
31
  [BelongsTo]
25
32
  public var <%= model.camelcase(:lower) %>:<%= model.camelcase %>;
26
33
 
34
+ <% end -%>
35
+ <% if tree_model.size > 0 -%>
36
+ [BelongsTo]
37
+ public var <%= tree_model[0].camelcase(:lower) %>:<%= class_name %>;
38
+
39
+ <% end -%>
40
+ <% for model in polymorphic -%>
41
+ [BelongsTo(polymorphic="true", dependsOn="Model1, Model2")]
42
+ public var <%= model.camelcase(:lower) %>:Object;
43
+
44
+ <% end -%>
45
+ <% if has_many_through.size > 0 -%>
46
+ <% has_many_through.each do |k,v| %>
47
+ [HasMany]
48
+ public var <%= k.camelcase(:lower) %>:ModelsCollection;
49
+
50
+ [HasMany(through="<%= k.camelcase %>")]
51
+ public var <%= v.camelcase(:lower) %>:ModelsCollection;
52
+ <% end -%>
27
53
  <% end -%>
28
54
  <% for model in has_ones -%>
29
55
  [HasOne]
@@ -34,6 +60,11 @@ package <%= base_package %>.models {
34
60
  [HasMany]
35
61
  public var <%= model.camelcase(:lower) %>:ModelsCollection;
36
62
 
63
+ <% end -%>
64
+ <% if attachment_field.size > 0 -%>
65
+ [Ignored]
66
+ public var attachmentUrl:String;
67
+
37
68
  <% end -%>
38
69
  public function <%= class_name %>() {
39
70
  super(LABEL);
@@ -1,7 +1,4 @@
1
-
2
1
  require File.join(File.dirname(__FILE__), %w[spec_helper])
3
2
 
4
3
  describe RestfulX do
5
- end
6
-
7
- # EOF
4
+ end
data/spec/spec_helper.rb CHANGED
@@ -1,4 +1,3 @@
1
-
2
1
  require File.expand_path(
3
2
  File.join(File.dirname(__FILE__), %w[.. lib restfulx]))
4
3
 
@@ -12,5 +11,3 @@ Spec::Runner.configure do |config|
12
11
  # config.mock_with :flexmock
13
12
  # config.mock_with :rr
14
13
  end
15
-
16
- # EOF
@@ -0,0 +1,2 @@
1
+ # Rails hook for RestfulX tasks when configured as a plugin instead of a gem
2
+ require File.join(File.dirname(__FILE__), "..", "lib", "restfulx", "active_record_tasks")
@@ -3,7 +3,7 @@ $:.unshift(File.dirname(__FILE__) + '/../../lib')
3
3
  schema_file = File.join(File.dirname(__FILE__), '..', 'schema.rb')
4
4
  ENV["RAILS_ENV"] = "test"
5
5
 
6
- require File.join(File.dirname(__FILE__), '..', 'controllers', 'application')
6
+ require File.join(File.dirname(__FILE__), '..', 'controllers', 'application_controller')
7
7
  require File.join(File.dirname(__FILE__), '..', 'controllers', 'notes_controller')
8
8
 
9
9
  config = YAML::load(IO.read(File.join(File.dirname(__FILE__), '..', 'database.yml')))['test']
@@ -9,7 +9,6 @@ require 'active_record'
9
9
  require 'active_record/fixtures'
10
10
  require 'action_controller'
11
11
  require 'action_controller/test_case'
12
- require 'action_controller/assertions'
13
12
  require 'action_controller/test_process'
14
13
  require 'action_controller/integration'
15
14
  require 'sqlite3'
@@ -31,13 +30,7 @@ class MockResponse
31
30
 
32
31
  end
33
32
 
34
- class Test::Unit::TestCase #:nodoc:
35
- # Turn off transactional fixtures if you're working with MyISAM tables in MySQL
36
- self.use_transactional_fixtures = true
37
-
38
- # Instantiated fixtures are slow, but give you @david where you otherwise would need people(:david)
39
- self.use_instantiated_fixtures = true
40
-
33
+ class ActiveRecord::TestCase #:nodoc:
41
34
  # Add more helper methods to be used by all tests here...
42
35
 
43
36
  # Use this to test xml or fxml responses in unit tests. For example,
@@ -13,7 +13,6 @@ require 'active_record'
13
13
  require 'active_record/fixtures'
14
14
  require 'action_controller'
15
15
  require 'action_controller/test_case'
16
- require 'action_controller/assertions'
17
16
  require 'action_controller/test_process'
18
17
  require 'action_controller/integration'
19
18
  require 'sqlite3'
@@ -26,5 +25,5 @@ ActiveRecord::Base.establish_connection(config)
26
25
 
27
26
  load(schema_file) if File.exist?(schema_file)
28
27
 
29
- Test::Unit::TestCase.fixture_path = File.join(File.dirname(__FILE__), '..', 'fixtures')
30
- $:.unshift(Test::Unit::TestCase.fixture_path)
28
+ ActiveSupport::TestCase.fixture_path.fixture_path = File.join(File.dirname(__FILE__), '..', 'fixtures')
29
+ $:.unshift(ActiveSupport::TestCase.fixture_path.fixture_path)
@@ -2,7 +2,7 @@ RAILS_ROOT = File.dirname(__FILE__) unless defined? RAILS_ROOT
2
2
  require File.join(File.dirname(__FILE__), 'helpers', 'test_helper')
3
3
  require File.join(File.dirname(__FILE__), 'helpers', 'unit_test_helper')
4
4
 
5
- class ActiveFooTest < Test::Unit::TestCase
5
+ class ActiveFooTest < ActiveRecord::TestCase
6
6
  fixtures :all
7
7
 
8
8
  def setup
@@ -5,7 +5,7 @@ ActionController::Routing::Routes.draw do |map|
5
5
  map.connect ':controller/:action/:id'
6
6
  end
7
7
 
8
- class RailsIntegrationFunctionalTest < Test::Unit::TestCase
8
+ class RailsIntegrationFunctionalTest < ActiveRecord::TestCase
9
9
  fixtures :all
10
10
 
11
11
  def setup
@@ -8,7 +8,7 @@ require 'models/task'
8
8
  require 'models/user'
9
9
  require 'models/simple_property'
10
10
 
11
- class ToFxmlTest < Test::Unit::TestCase
11
+ class ToFxmlTest < ActiveRecord::TestCase
12
12
  fixtures :locations, :notes, :projects, :tasks, :users, :simple_properties
13
13
 
14
14
  def test_to_fxml_sanity
@@ -8,7 +8,7 @@ require 'models/task'
8
8
  require 'models/user'
9
9
  require 'models/simple_property'
10
10
 
11
- class ToJsonTest < Test::Unit::TestCase
11
+ class ToJsonTest < ActiveRecord::TestCase
12
12
  fixtures :locations, :notes, :projects, :tasks, :users, :simple_properties
13
13
 
14
14
  def test_to_json_sanity
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dima-restfulx
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.2
4
+ version: 1.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dima Berastau
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-03-18 00:00:00 -07:00
12
+ date: 2009-07-15 00:00:00 -07:00
13
13
  default_executable: rx-gen
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -41,13 +41,11 @@ extensions: []
41
41
  extra_rdoc_files:
42
42
  - README.rdoc
43
43
  files:
44
- - Rakefile
45
44
  - README.rdoc
45
+ - Rakefile
46
46
  - VERSION.yml
47
- - bin/rx-gen
48
- - app_generators/rx_app
47
+ - app_generators/rx_app/USAGE
49
48
  - app_generators/rx_app/rx_app_generator.rb
50
- - app_generators/rx_app/templates
51
49
  - app_generators/rx_app/templates/actionscript.properties
52
50
  - app_generators/rx_app/templates/actionscriptair.properties
53
51
  - app_generators/rx_app/templates/app.yaml.erb
@@ -56,9 +54,7 @@ files:
56
54
  - app_generators/rx_app/templates/expressInstall.swf
57
55
  - app_generators/rx_app/templates/flex.properties
58
56
  - app_generators/rx_app/templates/generate.rb
59
- - app_generators/rx_app/templates/html-template
60
57
  - app_generators/rx_app/templates/html-template/AC_OETags.js
61
- - app_generators/rx_app/templates/html-template/history
62
58
  - app_generators/rx_app/templates/html-template/history/history.css
63
59
  - app_generators/rx_app/templates/html-template/history/history.js
64
60
  - app_generators/rx_app/templates/html-template/history/historyFrame.html
@@ -74,18 +70,28 @@ files:
74
70
  - app_generators/rx_app/templates/projectair.properties
75
71
  - app_generators/rx_app/templates/restfulx.yml
76
72
  - app_generators/rx_app/templates/swfobject.js
77
- - app_generators/rx_app/USAGE
78
- - rails_generators/rx_config
73
+ - bin/rx-gen
74
+ - lib/restfulx.rb
75
+ - lib/restfulx/active_foo.rb
76
+ - lib/restfulx/active_record_tasks.rb
77
+ - lib/restfulx/active_record_uuid_helper.rb
78
+ - lib/restfulx/configuration.rb
79
+ - lib/restfulx/datamapper_foo.rb
80
+ - lib/restfulx/rails/recipes.rb
81
+ - lib/restfulx/rails/schema_to_yaml.rb
82
+ - lib/restfulx/rails/schema_to_yaml/extensions/enumerable.rb
83
+ - lib/restfulx/rails/schema_to_yaml/settings/config.rb
84
+ - lib/restfulx/rails/schema_to_yaml/settings/core.rb
85
+ - lib/restfulx/rails/swf_helper.rb
86
+ - lib/restfulx/tasks.rb
87
+ - rails_generators/rx_config/USAGE
79
88
  - rails_generators/rx_config/rx_config_generator.rb
80
- - rails_generators/rx_config/templates
81
89
  - rails_generators/rx_config/templates/actionscript.properties
82
90
  - rails_generators/rx_config/templates/actionscriptair.properties
83
91
  - rails_generators/rx_config/templates/expressInstall.swf
84
92
  - rails_generators/rx_config/templates/flex.properties
85
93
  - rails_generators/rx_config/templates/flex_controller.erb
86
- - rails_generators/rx_config/templates/html-template
87
94
  - rails_generators/rx_config/templates/html-template/AC_OETags.js
88
- - rails_generators/rx_config/templates/html-template/history
89
95
  - rails_generators/rx_config/templates/html-template/history/history.css
90
96
  - rails_generators/rx_config/templates/html-template/history/history.js
91
97
  - rails_generators/rx_config/templates/html-template/history/historyFrame.html
@@ -102,103 +108,67 @@ files:
102
108
  - rails_generators/rx_config/templates/restfulx.yml
103
109
  - rails_generators/rx_config/templates/restfulx_tasks.rake
104
110
  - rails_generators/rx_config/templates/routes.erb
111
+ - rails_generators/rx_config/templates/session_store_flash.erb
105
112
  - rails_generators/rx_config/templates/swfobject.js
106
- - rails_generators/rx_config/USAGE
107
- - rails_generators/rx_controller
113
+ - rails_generators/rx_controller/USAGE
108
114
  - rails_generators/rx_controller/rx_controller_generator.rb
109
- - rails_generators/rx_controller/templates
110
115
  - rails_generators/rx_controller/templates/controller.as.erb
111
- - rails_generators/rx_controller/USAGE
112
- - rails_generators/rx_main_app
116
+ - rails_generators/rx_main_app/USAGE
113
117
  - rails_generators/rx_main_app/rx_main_app_generator.rb
114
- - rails_generators/rx_main_app/templates
115
118
  - rails_generators/rx_main_app/templates/mainapp.mxml
116
- - rails_generators/rx_main_app/USAGE
117
- - rails_generators/rx_scaffold
119
+ - rails_generators/rx_scaffold/USAGE
118
120
  - rails_generators/rx_scaffold/rx_scaffold_generator.rb
119
- - rails_generators/rx_scaffold/templates
120
- - rails_generators/rx_scaffold/templates/controllers
121
121
  - rails_generators/rx_scaffold/templates/controllers/default.rb.erb
122
122
  - rails_generators/rx_scaffold/templates/controllers/resource_controller.rb.erb
123
123
  - rails_generators/rx_scaffold/templates/fixtures.yml.erb
124
- - rails_generators/rx_scaffold/templates/layouts
124
+ - rails_generators/rx_scaffold/templates/functional_test.rb
125
+ - rails_generators/rx_scaffold/templates/helper_test.rb
125
126
  - rails_generators/rx_scaffold/templates/layouts/default.erb
126
127
  - rails_generators/rx_scaffold/templates/migration.rb.erb
127
128
  - rails_generators/rx_scaffold/templates/model.as.erb
128
129
  - rails_generators/rx_scaffold/templates/model.rb.erb
129
- - rails_generators/rx_scaffold/USAGE
130
- - rails_generators/rx_yaml_scaffold
131
- - rails_generators/rx_yaml_scaffold/rx_yaml_scaffold_generator.rb
132
130
  - rails_generators/rx_yaml_scaffold/USAGE
133
- - rxgen_generators/rx_config
134
- - rxgen_generators/rx_config/rx_config_generator.rb
131
+ - rails_generators/rx_yaml_scaffold/rx_yaml_scaffold_generator.rb
135
132
  - rxgen_generators/rx_config/USAGE
136
- - rxgen_generators/rx_controller
133
+ - rxgen_generators/rx_config/rx_config_generator.rb
134
+ - rxgen_generators/rx_controller/USAGE
137
135
  - rxgen_generators/rx_controller/rx_controller_generator.rb
138
- - rxgen_generators/rx_controller/templates
139
136
  - rxgen_generators/rx_controller/templates/assist.py
140
137
  - rxgen_generators/rx_controller/templates/controller.as.erb
138
+ - rxgen_generators/rx_controller/templates/iso8601.py
141
139
  - rxgen_generators/rx_controller/templates/restful.py
142
- - rxgen_generators/rx_controller/USAGE
143
- - rxgen_generators/rx_main_app
140
+ - rxgen_generators/rx_main_app/USAGE
144
141
  - rxgen_generators/rx_main_app/rx_main_app_generator.rb
145
- - rxgen_generators/rx_main_app/templates
146
142
  - rxgen_generators/rx_main_app/templates/main.py.erb
147
143
  - rxgen_generators/rx_main_app/templates/mainapp.mxml
148
- - rxgen_generators/rx_main_app/USAGE
149
- - rxgen_generators/rx_scaffold
144
+ - rxgen_generators/rx_scaffold/USAGE
150
145
  - rxgen_generators/rx_scaffold/rx_scaffold_generator.rb
151
- - rxgen_generators/rx_scaffold/templates
152
- - rxgen_generators/rx_scaffold/templates/component.mxml.erb
153
146
  - rxgen_generators/rx_scaffold/templates/controller.py.erb
147
+ - rxgen_generators/rx_scaffold/templates/layouts/default.erb
154
148
  - rxgen_generators/rx_scaffold/templates/model.as.erb
155
149
  - rxgen_generators/rx_scaffold/templates/model.py.erb
156
- - rxgen_generators/rx_scaffold/USAGE
157
- - rxgen_generators/rx_yaml_scaffold
158
- - rxgen_generators/rx_yaml_scaffold/rx_yaml_scaffold_generator.rb
159
150
  - rxgen_generators/rx_yaml_scaffold/USAGE
160
- - lib/restfulx
161
- - lib/restfulx/active_foo.rb
162
- - lib/restfulx/active_record_tasks.rb
163
- - lib/restfulx/configuration.rb
164
- - lib/restfulx/datamapper_foo.rb
165
- - lib/restfulx/rails
166
- - lib/restfulx/rails/recipes.rb
167
- - lib/restfulx/rails/swf_helper.rb
168
- - lib/restfulx/schema_to_yaml
169
- - lib/restfulx/schema_to_yaml/extensions
170
- - lib/restfulx/schema_to_yaml/extensions/enumerable.rb
171
- - lib/restfulx/schema_to_yaml/settings
172
- - lib/restfulx/schema_to_yaml/settings/config.rb
173
- - lib/restfulx/schema_to_yaml/settings/core.rb
174
- - lib/restfulx/schema_to_yaml.rb
175
- - lib/restfulx/tasks.rb
176
- - lib/restfulx/uuid_helper.rb
177
- - lib/restfulx.rb
178
- - test/rails
179
- - test/rails/controllers
180
- - test/rails/controllers/application.rb
151
+ - rxgen_generators/rx_yaml_scaffold/rx_yaml_scaffold_generator.rb
152
+ - spec/restfulx_spec.rb
153
+ - spec/spec_helper.rb
154
+ - tasks/restfulx.rake
155
+ - test/rails/controllers/application_controller.rb
181
156
  - test/rails/controllers/locations_controller.rb
182
157
  - test/rails/controllers/notes_controller.rb
183
158
  - test/rails/controllers/projects_controller.rb
184
159
  - test/rails/controllers/tasks_controller.rb
185
160
  - test/rails/controllers/users_controller.rb
186
161
  - test/rails/database.yml
187
- - test/rails/fixtures
188
162
  - test/rails/fixtures/locations.yml
189
163
  - test/rails/fixtures/notes.yml
190
164
  - test/rails/fixtures/projects.yml
191
165
  - test/rails/fixtures/simple_properties.yml
192
166
  - test/rails/fixtures/tasks.yml
193
167
  - test/rails/fixtures/users.yml
194
- - test/rails/helpers
195
- - test/rails/helpers/controllers.log
196
168
  - test/rails/helpers/functional_test_helper.rb
197
- - test/rails/helpers/models.log
198
169
  - test/rails/helpers/test_helper.rb
199
170
  - test/rails/helpers/unit_test_helper.rb
200
171
  - test/rails/model.yml
201
- - test/rails/models
202
172
  - test/rails/models/location.rb
203
173
  - test/rails/models/note.rb
204
174
  - test/rails/models/project.rb
@@ -206,23 +176,17 @@ files:
206
176
  - test/rails/models/task.rb
207
177
  - test/rails/models/user.rb
208
178
  - test/rails/schema.rb
209
- - test/rails/test.sqlite3
210
179
  - test/rails/test.swf
211
180
  - test/rails/test_active_foo.rb
212
181
  - test/rails/test_rails_integration_functional.rb
213
182
  - test/rails/test_to_fxml.rb
214
183
  - test/rails/test_to_json.rb
215
- - test/rails/views
216
- - test/rails/views/notes
217
184
  - test/rails/views/notes/empty_params_action.html.erb
218
185
  - test/rails/views/notes/index.html.erb
219
- - spec/restfulx_spec.rb
220
- - spec/spec_helper.rb
221
186
  has_rdoc: true
222
187
  homepage: http://restfulx.org
223
188
  post_install_message:
224
189
  rdoc_options:
225
- - --inline-source
226
190
  - --charset=UTF-8
227
191
  require_paths:
228
192
  - lib
@@ -245,5 +209,26 @@ rubygems_version: 1.2.0
245
209
  signing_key:
246
210
  specification_version: 2
247
211
  summary: RestfulX Framework Code Generation Engine / Rails 2.1+ Integration Support
248
- test_files: []
249
-
212
+ test_files:
213
+ - spec/restfulx_spec.rb
214
+ - spec/spec_helper.rb
215
+ - test/rails/controllers/application_controller.rb
216
+ - test/rails/controllers/locations_controller.rb
217
+ - test/rails/controllers/notes_controller.rb
218
+ - test/rails/controllers/projects_controller.rb
219
+ - test/rails/controllers/tasks_controller.rb
220
+ - test/rails/controllers/users_controller.rb
221
+ - test/rails/helpers/functional_test_helper.rb
222
+ - test/rails/helpers/test_helper.rb
223
+ - test/rails/helpers/unit_test_helper.rb
224
+ - test/rails/models/location.rb
225
+ - test/rails/models/note.rb
226
+ - test/rails/models/project.rb
227
+ - test/rails/models/simple_property.rb
228
+ - test/rails/models/task.rb
229
+ - test/rails/models/user.rb
230
+ - test/rails/schema.rb
231
+ - test/rails/test_active_foo.rb
232
+ - test/rails/test_rails_integration_functional.rb
233
+ - test/rails/test_to_fxml.rb
234
+ - test/rails/test_to_json.rb
@@ -1,15 +0,0 @@
1
- require 'uuidtools'
2
-
3
- module RestfulX
4
- module UUIDHelper
5
- def self.included(base)
6
- base.class_eval do
7
- before_create :generate_uuid
8
- end
9
- end
10
-
11
- def generate_uuid
12
- self.id = UUID.random_create.to_s.gsub("-", "") unless self.id
13
- end
14
- end
15
- end