emergent-core 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.bnsignore +16 -0
- data/History.txt +4 -0
- data/Manifest.txt +348 -0
- data/README.rdoc +47 -0
- data/Rakefile +39 -0
- data/app_generators/emergent_core/USAGE +5 -0
- data/app_generators/emergent_core/emergent_core_generator.rb +73 -0
- data/app_generators/emergent_core/templates/core/actionscript.properties +16 -0
- data/app_generators/emergent_core/templates/core/actionscriptair.properties +16 -0
- data/app_generators/emergent_core/templates/core/app.yaml.erb +12 -0
- data/app_generators/emergent_core/templates/core/default_tasks.rake +51 -0
- data/app_generators/emergent_core/templates/core/empty.txt +0 -0
- data/app_generators/emergent_core/templates/core/expressInstall.swf +0 -0
- data/app_generators/emergent_core/templates/core/flex.properties +2 -0
- data/app_generators/emergent_core/templates/core/generate.rb +17 -0
- data/app_generators/emergent_core/templates/core/html-template/AC_OETags.js +276 -0
- data/app_generators/emergent_core/templates/core/html-template/history/history.css +6 -0
- data/app_generators/emergent_core/templates/core/html-template/history/history.js +645 -0
- data/app_generators/emergent_core/templates/core/html-template/history/historyFrame.html +29 -0
- data/app_generators/emergent_core/templates/core/html-template/index.template.html +121 -0
- data/app_generators/emergent_core/templates/core/html-template/playerProductInstall.swf +0 -0
- data/app_generators/emergent_core/templates/core/index.html.erb +18 -0
- data/app_generators/emergent_core/templates/core/index.yaml +11 -0
- data/app_generators/emergent_core/templates/core/mainair-app.xml +134 -0
- data/app_generators/emergent_core/templates/core/mainapp-config.xml +21 -0
- data/app_generators/emergent_core/templates/core/mainapp.mxml +106 -0
- data/app_generators/emergent_core/templates/core/project-textmate.erb +52 -0
- data/app_generators/emergent_core/templates/core/project.properties +18 -0
- data/app_generators/emergent_core/templates/core/projectair.properties +24 -0
- data/app_generators/emergent_core/templates/core/swfobject.js +5 -0
- data/bin/emergent +17 -0
- data/lib/emergent_core.rb +49 -0
- data/lib/restfulx/active_foo.rb +194 -0
- data/lib/restfulx/active_record_tasks.rb +81 -0
- data/lib/restfulx/configuration.rb +76 -0
- data/lib/restfulx/datamapper_foo.rb +31 -0
- data/lib/restfulx/rails/recipes.rb +60 -0
- data/lib/restfulx/rails/swf_helper.rb +60 -0
- data/lib/restfulx/tasks.rb +85 -0
- data/lib/restfulx.rb +117 -0
- data/rails_generators/emergent_cms/USAGE +5 -0
- data/rails_generators/emergent_cms/emergent_cms_generator.rb +21 -0
- data/rails_generators/emergent_cms/templates/PagesEditModel.as +114 -0
- data/rails_generators/emergent_cms/templates/PagesEditView.mxml +102 -0
- data/rails_generators/emergent_config/USAGE +5 -0
- data/rails_generators/emergent_config/emergent_config_generator.rb +330 -0
- data/rails_generators/emergent_config/templates/app/controllers/accounts_controller.rb +104 -0
- data/rails_generators/emergent_config/templates/app/controllers/addresses_controller.rb +97 -0
- data/rails_generators/emergent_config/templates/app/controllers/application.rb +26 -0
- data/rails_generators/emergent_config/templates/app/controllers/assets_controller.rb +1 -0
- data/rails_generators/emergent_config/templates/app/controllers/content_assignments_controller.rb +97 -0
- data/rails_generators/emergent_config/templates/app/controllers/contents_controller.rb +114 -0
- data/rails_generators/emergent_config/templates/app/controllers/sessions_controller.rb +72 -0
- data/rails_generators/emergent_config/templates/app/controllers/sites_controller.rb +1 -0
- data/rails_generators/emergent_config/templates/app/controllers/users_controller.rb +97 -0
- data/rails_generators/emergent_config/templates/app/flex/application/controllers/command/ICommand.as +16 -0
- data/rails_generators/emergent_config/templates/app/flex/application/controllers/command/Undoable.as +46 -0
- data/rails_generators/emergent_config/templates/app/flex/application/controllers/command/UpdateDocumentCommand.as +73 -0
- data/rails_generators/emergent_config/templates/app/flex/application/controllers/event/DocumentEvent.as +46 -0
- data/rails_generators/emergent_config/templates/app/flex/application/controllers/event/NavigationEvent.as +31 -0
- data/rails_generators/emergent_config/templates/app/flex/application/controllers/event/ResourceEvent.as +27 -0
- data/rails_generators/emergent_config/templates/app/flex/application/controllers/event/UndoEvent.as +36 -0
- data/rails_generators/emergent_config/templates/app/flex/application/controllers/manager/AboutUsManager.as +15 -0
- data/rails_generators/emergent_config/templates/app/flex/application/controllers/manager/AccountManager.as +31 -0
- data/rails_generators/emergent_config/templates/app/flex/application/controllers/manager/AuthenticationManager.as +76 -0
- data/rails_generators/emergent_config/templates/app/flex/application/controllers/manager/ContentManager.as +92 -0
- data/rails_generators/emergent_config/templates/app/flex/application/controllers/manager/DocumentManager.as +131 -0
- data/rails_generators/emergent_config/templates/app/flex/application/controllers/manager/DocumentsManager.as +156 -0
- data/rails_generators/emergent_config/templates/app/flex/application/controllers/manager/HomeManager.as +18 -0
- data/rails_generators/emergent_config/templates/app/flex/application/controllers/manager/MainManager.as +23 -0
- data/rails_generators/emergent_config/templates/app/flex/application/controllers/manager/PagesManager.as +71 -0
- data/rails_generators/emergent_config/templates/app/flex/application/controllers/manager/ResourceManager.as +195 -0
- data/rails_generators/emergent_config/templates/app/flex/application/controllers/manager/SiteManager.as +25 -0
- data/rails_generators/emergent_config/templates/app/flex/application/controllers/manager/UndoManager.as +143 -0
- data/rails_generators/emergent_config/templates/app/flex/application/controllers/map/DocumentMap.mxml +123 -0
- data/rails_generators/emergent_config/templates/app/flex/application/controllers/map/DocumentsMap.mxml +134 -0
- data/rails_generators/emergent_config/templates/app/flex/application/controllers/map/ManagerPresentationModelMap.mxml +59 -0
- data/rails_generators/emergent_config/templates/app/flex/application/controllers/map/ObjectMap.mxml +75 -0
- data/rails_generators/emergent_config/templates/app/flex/application/controllers/map/PresentationModelViewMap.mxml +81 -0
- data/rails_generators/emergent_config/templates/app/flex/application/controllers/map/PresenterViewMap.mxml +67 -0
- data/rails_generators/emergent_config/templates/app/flex/application/models/constant/DocumentType.as +52 -0
- data/rails_generators/emergent_config/templates/app/flex/application/models/constant/Resource.as +25 -0
- data/rails_generators/emergent_config/templates/app/flex/application/models/constant/ResourceAction.as +28 -0
- data/rails_generators/emergent_config/templates/app/flex/application/models/constant/ResourceResult.as +8 -0
- data/rails_generators/emergent_config/templates/app/flex/application/models/domain/Account.as +32 -0
- data/rails_generators/emergent_config/templates/app/flex/application/models/domain/Address.as +26 -0
- data/rails_generators/emergent_config/templates/app/flex/application/models/domain/Asset.as +25 -0
- data/rails_generators/emergent_config/templates/app/flex/application/models/domain/AssetAssignment.as +25 -0
- data/rails_generators/emergent_config/templates/app/flex/application/models/domain/Content.as +46 -0
- data/rails_generators/emergent_config/templates/app/flex/application/models/domain/ContentAssignment.as +33 -0
- data/rails_generators/emergent_config/templates/app/flex/application/models/domain/Document.as +131 -0
- data/rails_generators/emergent_config/templates/app/flex/application/models/domain/PlainDocument.as +19 -0
- data/rails_generators/emergent_config/templates/app/flex/application/models/domain/RichDocument.as +19 -0
- data/rails_generators/emergent_config/templates/app/flex/application/models/domain/Session.as +13 -0
- data/rails_generators/emergent_config/templates/app/flex/application/models/domain/Snapshot.as +21 -0
- data/rails_generators/emergent_config/templates/app/flex/application/models/domain/User.as +28 -0
- data/rails_generators/emergent_config/templates/app/flex/application/models/factory/DocumentFactory.as +61 -0
- data/rails_generators/emergent_config/templates/app/flex/application/models/factory/DocumentViewFactory.as +59 -0
- data/rails_generators/emergent_config/templates/app/flex/application/models/factory/ResourceFactory.as +28 -0
- data/rails_generators/emergent_config/templates/app/flex/application/models/presentation/AboutUsModel.as +22 -0
- data/rails_generators/emergent_config/templates/app/flex/application/models/presentation/AccountModel.as +68 -0
- data/rails_generators/emergent_config/templates/app/flex/application/models/presentation/AuthenticationModel.as +44 -0
- data/rails_generators/emergent_config/templates/app/flex/application/models/presentation/ContactUsModel.as +45 -0
- data/rails_generators/emergent_config/templates/app/flex/application/models/presentation/ContentModel.as +70 -0
- data/rails_generators/emergent_config/templates/app/flex/application/models/presentation/DocumentModel.as +235 -0
- data/rails_generators/emergent_config/templates/app/flex/application/models/presentation/DocumentsModel.as +169 -0
- data/rails_generators/emergent_config/templates/app/flex/application/models/presentation/HomeModel.as +23 -0
- data/rails_generators/emergent_config/templates/app/flex/application/models/presentation/MainModel.as +35 -0
- data/rails_generators/emergent_config/templates/app/flex/application/models/presentation/PagesModel.as +44 -0
- data/rails_generators/emergent_config/templates/app/flex/application/models/presentation/ProfileModel.as +99 -0
- data/rails_generators/emergent_config/templates/app/flex/application/models/presentation/ResourceModel.as +100 -0
- data/rails_generators/emergent_config/templates/app/flex/application/views/about_us/about_us.mxml +105 -0
- data/rails_generators/emergent_config/templates/app/flex/application/views/account/account.mxml +97 -0
- data/rails_generators/emergent_config/templates/app/flex/application/views/contact_us/contact_us.mxml +65 -0
- data/rails_generators/emergent_config/templates/app/flex/application/views/document/document.mxml +71 -0
- data/rails_generators/emergent_config/templates/app/flex/application/views/document/documents.mxml +201 -0
- data/rails_generators/emergent_config/templates/app/flex/application/views/document/plain_document.mxml +9 -0
- data/rails_generators/emergent_config/templates/app/flex/application/views/document/rich_document.mxml +12 -0
- data/rails_generators/emergent_config/templates/app/flex/application/views/gallery/gallery.mxml +37 -0
- data/rails_generators/emergent_config/templates/app/flex/application/views/home/home.mxml +58 -0
- data/rails_generators/emergent_config/templates/app/flex/application/views/home/home_presenter.as +81 -0
- data/rails_generators/emergent_config/templates/app/flex/application/views/home/home_troparchy.mxml +71 -0
- data/rails_generators/emergent_config/templates/app/flex/application/views/login/login.mxml +50 -0
- data/rails_generators/emergent_config/templates/app/flex/application/views/main/main.mxml +131 -0
- data/rails_generators/emergent_config/templates/app/flex/application/views/main/main_presenter.as +166 -0
- data/rails_generators/emergent_config/templates/app/flex/application/views/main/main_troparchy.mxml +74 -0
- data/rails_generators/emergent_config/templates/app/flex/application/views/navigation/navigation_bar_bottom_model.as +13 -0
- data/rails_generators/emergent_config/templates/app/flex/application/views/navigation/navigation_bar_bottom_presenter.as +10 -0
- data/rails_generators/emergent_config/templates/app/flex/application/views/navigation/navigation_bar_bottom_view.mxml +48 -0
- data/rails_generators/emergent_config/templates/app/flex/application/views/navigation/navigation_bar_left_model.as +13 -0
- data/rails_generators/emergent_config/templates/app/flex/application/views/navigation/navigation_bar_left_presenter.as +10 -0
- data/rails_generators/emergent_config/templates/app/flex/application/views/navigation/navigation_bar_left_view.mxml +43 -0
- data/rails_generators/emergent_config/templates/app/flex/application/views/navigation/navigation_bar_right_model.as +13 -0
- data/rails_generators/emergent_config/templates/app/flex/application/views/navigation/navigation_bar_right_presenter.as +10 -0
- data/rails_generators/emergent_config/templates/app/flex/application/views/navigation/navigation_bar_right_view.mxml +47 -0
- data/rails_generators/emergent_config/templates/app/flex/application/views/navigation/navigation_bar_top_model.as +13 -0
- data/rails_generators/emergent_config/templates/app/flex/application/views/navigation/navigation_bar_top_presenter.as +10 -0
- data/rails_generators/emergent_config/templates/app/flex/application/views/navigation/navigation_bar_top_view.mxml +49 -0
- data/rails_generators/emergent_config/templates/app/flex/application/views/navigation/navigation_bars_presenter.as +63 -0
- data/rails_generators/emergent_config/templates/app/flex/application/views/navigation/navigation_bars_troparchy.mxml +63 -0
- data/rails_generators/emergent_config/templates/app/flex/application/views/navigation/navigation_bars_view.mxml +59 -0
- data/rails_generators/emergent_config/templates/app/flex/application/views/pages/pages.mxml +44 -0
- data/rails_generators/emergent_config/templates/app/flex/application/views/pages/pages_presenter.as +83 -0
- data/rails_generators/emergent_config/templates/app/flex/application/views/pages/pages_troparchy.mxml +62 -0
- data/rails_generators/emergent_config/templates/app/flex/application/views/profile/profile.mxml +73 -0
- data/rails_generators/emergent_config/templates/app/flex/assets/fonts/MyriadPro-Bold.otf +0 -0
- data/rails_generators/emergent_config/templates/app/flex/assets/fonts/MyriadPro-Regular.otf +0 -0
- data/rails_generators/emergent_config/templates/app/flex/assets/html/lorem.html +3 -0
- data/rails_generators/emergent_config/templates/app/flex/assets/images/alexgrey/Picture10.png +0 -0
- data/rails_generators/emergent_config/templates/app/flex/assets/images/alexgrey/Picture11.png +0 -0
- data/rails_generators/emergent_config/templates/app/flex/assets/images/alexgrey/Picture12.png +0 -0
- data/rails_generators/emergent_config/templates/app/flex/assets/images/alexgrey/Picture13.png +0 -0
- data/rails_generators/emergent_config/templates/app/flex/assets/images/alexgrey/Picture14.png +0 -0
- data/rails_generators/emergent_config/templates/app/flex/assets/images/alexgrey/Picture3.png +0 -0
- data/rails_generators/emergent_config/templates/app/flex/assets/images/alexgrey/Picture4.png +0 -0
- data/rails_generators/emergent_config/templates/app/flex/assets/images/alexgrey/Picture5.png +0 -0
- data/rails_generators/emergent_config/templates/app/flex/assets/images/alexgrey/Picture6.png +0 -0
- data/rails_generators/emergent_config/templates/app/flex/assets/images/alexgrey/Picture7.png +0 -0
- data/rails_generators/emergent_config/templates/app/flex/assets/images/alexgrey/Picture8.png +0 -0
- data/rails_generators/emergent_config/templates/app/flex/assets/images/alexgrey/Picture9.png +0 -0
- data/rails_generators/emergent_config/templates/app/flex/assets/images/hot_nebula_0.jpg +0 -0
- data/rails_generators/emergent_config/templates/app/flex/assets/images/hot_nebula_180.jpg +0 -0
- data/rails_generators/emergent_config/templates/app/flex/assets/images/hot_nebula_270.jpg +0 -0
- data/rails_generators/emergent_config/templates/app/flex/assets/images/hot_nebula_90.jpg +0 -0
- data/rails_generators/emergent_config/templates/app/flex/assets/images/hot_nebula_bottom.jpg +0 -0
- data/rails_generators/emergent_config/templates/app/flex/assets/images/hot_nebula_top.jpg +0 -0
- data/rails_generators/emergent_config/templates/app/flex/assets/styles/itunes7Bg.jpg +0 -0
- data/rails_generators/emergent_config/templates/app/flex/assets/styles/jukebox.css +764 -0
- data/rails_generators/emergent_config/templates/app/flex/assets/styles/jukeboxGfx.swf +0 -0
- data/rails_generators/emergent_config/templates/app/flex/assets/styles/obsidian.css +734 -0
- data/rails_generators/emergent_config/templates/app/flex/assets/styles/obsidianBg.jpg +0 -0
- data/rails_generators/emergent_config/templates/app/flex/assets/styles/obsidianGfx.swf +0 -0
- data/rails_generators/emergent_config/templates/app/flex/com/fourD/actions/LayoutAction.as +377 -0
- data/rails_generators/emergent_config/templates/app/flex/com/fourD/actions/SimpleLayoutAction.as +210 -0
- data/rails_generators/emergent_config/templates/app/flex/com/fourD/animators/FourDTweenCollection.mxml +50 -0
- data/rails_generators/emergent_config/templates/app/flex/com/fourD/animators/IAnimator.as +39 -0
- data/rails_generators/emergent_config/templates/app/flex/com/fourD/animators/TweenMaxAnimator.as +269 -0
- data/rails_generators/emergent_config/templates/app/flex/com/fourD/cameras/AstroCamera.as +177 -0
- data/rails_generators/emergent_config/templates/app/flex/com/fourD/components/FourDDataGrid.mxml +105 -0
- data/rails_generators/emergent_config/templates/app/flex/com/fourD/components/FourDItemRenderer.mxml +54 -0
- data/rails_generators/emergent_config/templates/app/flex/com/fourD/core/CenterPerspectiveProjection.as +72 -0
- data/rails_generators/emergent_config/templates/app/flex/com/fourD/core/ComplexCondition.as +44 -0
- data/rails_generators/emergent_config/templates/app/flex/com/fourD/core/ConditionsUtil.as +82 -0
- data/rails_generators/emergent_config/templates/app/flex/com/fourD/core/FourDComponent.as +309 -0
- data/rails_generators/emergent_config/templates/app/flex/com/fourD/core/InstanceMethodInvoker.as +50 -0
- data/rails_generators/emergent_config/templates/app/flex/com/fourD/core/InstancePropertyInjector.as +43 -0
- data/rails_generators/emergent_config/templates/app/flex/com/fourD/core/MethodCaller.as +51 -0
- data/rails_generators/emergent_config/templates/app/flex/com/fourD/core/Pathway.as +10 -0
- data/rails_generators/emergent_config/templates/app/flex/com/fourD/core/PathwayEvent.as +28 -0
- data/rails_generators/emergent_config/templates/app/flex/com/fourD/core/Pheron.as +34 -0
- data/rails_generators/emergent_config/templates/app/flex/com/fourD/core/Pheron2.as +41 -0
- data/rails_generators/emergent_config/templates/app/flex/com/fourD/core/PheronReceptor.as +125 -0
- data/rails_generators/emergent_config/templates/app/flex/com/fourD/core/Properties.as +57 -0
- data/rails_generators/emergent_config/templates/app/flex/com/fourD/core/Router.as +50 -0
- data/rails_generators/emergent_config/templates/app/flex/com/fourD/core/RouterUtil.as +70 -0
- data/rails_generators/emergent_config/templates/app/flex/com/fourD/core/SimpleCondition.as +42 -0
- data/rails_generators/emergent_config/templates/app/flex/com/fourD/core/SimpleZSortVO.as +1 -0
- data/rails_generators/emergent_config/templates/app/flex/com/fourD/core/SimpleZSorter.as +1 -0
- data/rails_generators/emergent_config/templates/app/flex/com/fourD/core/Tecton.as +70 -0
- data/rails_generators/emergent_config/templates/app/flex/com/fourD/core/Tecton2.as +234 -0
- data/rails_generators/emergent_config/templates/app/flex/com/fourD/core/TectonCache.as +111 -0
- data/rails_generators/emergent_config/templates/app/flex/com/fourD/core/TectonEvent.as +39 -0
- data/rails_generators/emergent_config/templates/app/flex/com/fourD/core/TectonMap.as +515 -0
- data/rails_generators/emergent_config/templates/app/flex/com/fourD/core/TectonMap2.as +289 -0
- data/rails_generators/emergent_config/templates/app/flex/com/fourD/core/TectonMapSample.mxml +73 -0
- data/rails_generators/emergent_config/templates/app/flex/com/fourD/core/TectonReceptor.as +43 -0
- data/rails_generators/emergent_config/templates/app/flex/com/fourD/core/TectonScope.as +38 -0
- data/rails_generators/emergent_config/templates/app/flex/com/fourD/core/TectonScopeProperties.as +18 -0
- data/rails_generators/emergent_config/templates/app/flex/com/fourD/core/TectonUtils.as +51 -0
- data/rails_generators/emergent_config/templates/app/flex/com/fourD/events/LayoutActionEvent.as +75 -0
- data/rails_generators/emergent_config/templates/app/flex/com/fourD/layouts/CarouselLayout.as +85 -0
- data/rails_generators/emergent_config/templates/app/flex/com/fourD/layouts/CircleLayout.as +102 -0
- data/rails_generators/emergent_config/templates/app/flex/com/fourD/layouts/CoverFlowLayout.as +136 -0
- data/rails_generators/emergent_config/templates/app/flex/com/fourD/layouts/FourDLayout.as +272 -0
- data/rails_generators/emergent_config/templates/app/flex/com/fourD/utils/TweenUtil.as +110 -0
- data/rails_generators/emergent_config/templates/app/helpers/accounts_helper.rb +93 -0
- data/rails_generators/emergent_config/templates/app/helpers/application_helper.rb +3 -0
- data/rails_generators/emergent_config/templates/app/models/account.rb +84 -0
- data/rails_generators/emergent_config/templates/app/models/account_mailer.rb +24 -0
- data/rails_generators/emergent_config/templates/app/models/account_observer.rb +17 -0
- data/rails_generators/emergent_config/templates/app/models/address.rb +2 -0
- data/rails_generators/emergent_config/templates/app/models/asset.rb +6 -0
- data/rails_generators/emergent_config/templates/app/models/asset_assignment.rb +4 -0
- data/rails_generators/emergent_config/templates/app/models/category.rb +35 -0
- data/rails_generators/emergent_config/templates/app/models/comment.rb +98 -0
- data/rails_generators/emergent_config/templates/app/models/content.rb +89 -0
- data/rails_generators/emergent_config/templates/app/models/content_assignment.rb +21 -0
- data/rails_generators/emergent_config/templates/app/models/image.rb +3 -0
- data/rails_generators/emergent_config/templates/app/models/post.rb +76 -0
- data/rails_generators/emergent_config/templates/app/models/section.rb +97 -0
- data/rails_generators/emergent_config/templates/app/models/site.rb +1 -0
- data/rails_generators/emergent_config/templates/app/models/tag.rb +1 -0
- data/rails_generators/emergent_config/templates/app/models/user.rb +4 -0
- data/rails_generators/emergent_config/templates/app/views/account_mailer/activation.erb +3 -0
- data/rails_generators/emergent_config/templates/app/views/account_mailer/signup_notification.erb +8 -0
- data/rails_generators/emergent_config/templates/config/Capfile +4 -0
- data/rails_generators/emergent_config/templates/config/README.txt +18 -0
- data/rails_generators/emergent_config/templates/config/deploy.rb +36 -0
- data/rails_generators/emergent_config/templates/config/routes.rb +72 -0
- data/rails_generators/emergent_config/templates/core/actionscript.properties +16 -0
- data/rails_generators/emergent_config/templates/core/actionscriptair.properties +16 -0
- data/rails_generators/emergent_config/templates/core/app.yaml.erb +12 -0
- data/rails_generators/emergent_config/templates/core/default_tasks.rake +51 -0
- data/rails_generators/emergent_config/templates/core/emergent_tasks.rake +42 -0
- data/rails_generators/emergent_config/templates/core/empty.txt +0 -0
- data/rails_generators/emergent_config/templates/core/expressInstall.swf +0 -0
- data/rails_generators/emergent_config/templates/core/flex.properties +2 -0
- data/rails_generators/emergent_config/templates/core/generate.rb +17 -0
- data/rails_generators/emergent_config/templates/core/html-template/AC_OETags.js +276 -0
- data/rails_generators/emergent_config/templates/core/html-template/history/history.css +6 -0
- data/rails_generators/emergent_config/templates/core/html-template/history/history.js +645 -0
- data/rails_generators/emergent_config/templates/core/html-template/history/historyFrame.html +29 -0
- data/rails_generators/emergent_config/templates/core/html-template/index.template.html +121 -0
- data/rails_generators/emergent_config/templates/core/html-template/playerProductInstall.swf +0 -0
- data/rails_generators/emergent_config/templates/core/index.html.erb +18 -0
- data/rails_generators/emergent_config/templates/core/index.yaml +11 -0
- data/rails_generators/emergent_config/templates/core/mainair-app.xml +134 -0
- data/rails_generators/emergent_config/templates/core/mainapp-config.xml +21 -0
- data/rails_generators/emergent_config/templates/core/mainapp.mxml +101 -0
- data/rails_generators/emergent_config/templates/core/project-textmate.erb +52 -0
- data/rails_generators/emergent_config/templates/core/project.properties +18 -0
- data/rails_generators/emergent_config/templates/core/projectair.properties +24 -0
- data/rails_generators/emergent_config/templates/core/restfulx.yml +14 -0
- data/rails_generators/emergent_config/templates/core/restfulx_tasks.rake +6 -0
- data/rails_generators/emergent_config/templates/core/swfobject.js +5 -0
- data/rails_generators/emergent_config/templates/db/migrate/create_accounts.rb +40 -0
- data/rails_generators/emergent_config/templates/db/migrate/create_addresses.rb +18 -0
- data/rails_generators/emergent_config/templates/db/migrate/create_asset_assignments.rb +19 -0
- data/rails_generators/emergent_config/templates/db/migrate/create_assets.rb +20 -0
- data/rails_generators/emergent_config/templates/db/migrate/create_content_assignments.rb +26 -0
- data/rails_generators/emergent_config/templates/db/migrate/create_contents.rb +21 -0
- data/rails_generators/emergent_config/templates/db/migrate/create_sessions.rb +16 -0
- data/rails_generators/emergent_config/templates/db/migrate/create_sites.rb +27 -0
- data/rails_generators/emergent_config/templates/db/migrate/create_users.rb +15 -0
- data/rails_generators/emergent_config/templates/lib/analytics.swc +0 -0
- data/rails_generators/emergent_config/templates/lib/app_controller.rb.erb +26 -0
- data/rails_generators/emergent_config/templates/lib/as3corelib-0.92.1.swc +0 -0
- data/rails_generators/emergent_config/templates/lib/as3crypto-1.3patched.swc +0 -0
- data/rails_generators/emergent_config/templates/lib/as3crypto.swc +0 -0
- data/rails_generators/emergent_config/templates/lib/as3ds-1.04.swc +0 -0
- data/rails_generators/emergent_config/templates/lib/as3httpclientlib-1.0.swc +0 -0
- data/rails_generators/emergent_config/templates/lib/authenticated_system.rb +189 -0
- data/rails_generators/emergent_config/templates/lib/authenticated_test_helper.rb +11 -0
- data/rails_generators/emergent_config/templates/lib/containerEx.swc +0 -0
- data/rails_generators/emergent_config/templates/lib/flare.swc +0 -0
- data/rails_generators/emergent_config/templates/lib/flash_session_hack.rb +27 -0
- data/rails_generators/emergent_config/templates/lib/flex2BrowserManager.swc +0 -0
- data/rails_generators/emergent_config/templates/lib/flexlib.swc +0 -0
- data/rails_generators/emergent_config/templates/lib/fluint.swc +0 -0
- data/rails_generators/emergent_config/templates/lib/mate_0_8_6_enhanced.swc +0 -0
- data/rails_generators/emergent_config/templates/lib/openflux.swc +0 -0
- data/rails_generators/emergent_config/templates/lib/pv3d.swc +0 -0
- data/rails_generators/emergent_config/templates/lib/restfulx.swc +0 -0
- data/rails_generators/emergent_config/templates/lib/site_keys.rb +38 -0
- data/rails_generators/emergent_config/templates/lib/tweenMax.swc +0 -0
- data/rails_generators/emergent_config/templates/lib/urlkitFlex3.swc +0 -0
- data/rails_generators/emergent_config/templates/shell_script +31 -0
- data/rails_generators/emergent_controller/USAGE +5 -0
- data/rails_generators/emergent_controller/emergent_controller_generator.rb +25 -0
- data/rails_generators/emergent_controller/templates/controller.as.erb +37 -0
- data/rails_generators/emergent_core/USAGE +5 -0
- data/rails_generators/emergent_core/emergent_core_generator.rb +157 -0
- data/rails_generators/emergent_iphone/USAGE +5 -0
- data/rails_generators/emergent_iphone/emergent_iphone_generator.rb +27 -0
- data/rails_generators/emergent_scaffold/USAGE +5 -0
- data/rails_generators/emergent_scaffold/emergent_scaffold_generator.rb +157 -0
- data/rails_generators/emergent_scaffold/templates/component.mxml.erb +101 -0
- data/rails_generators/emergent_scaffold/templates/controller.rb.erb +101 -0
- data/rails_generators/emergent_scaffold/templates/edit_index_view.mxml.erb +114 -0
- data/rails_generators/emergent_scaffold/templates/edit_show_view.mxml.erb +84 -0
- data/rails_generators/emergent_scaffold/templates/filter_view.mxml.erb +1 -0
- data/rails_generators/emergent_scaffold/templates/fixtures.yml.erb +128 -0
- data/rails_generators/emergent_scaffold/templates/index_view.mxml.erb +58 -0
- data/rails_generators/emergent_scaffold/templates/item_renderer.mxml.erb +53 -0
- data/rails_generators/emergent_scaffold/templates/manager.as.erb +31 -0
- data/rails_generators/emergent_scaffold/templates/migration.rb.erb +22 -0
- data/rails_generators/emergent_scaffold/templates/model.as.erb +42 -0
- data/rails_generators/emergent_scaffold/templates/model.rb.erb +11 -0
- data/rails_generators/emergent_scaffold/templates/presentation_model.as.erb +33 -0
- data/rails_generators/emergent_scaffold/templates/presenter.as.erb +98 -0
- data/rails_generators/emergent_scaffold/templates/show_view.mxml.erb +50 -0
- data/rails_generators/emergent_scaffold/templates/view_map.mxml.erb +40 -0
- data/rails_generators/emergent_scaffold/templates/views_panel.mxml.erb +64 -0
- data/rails_generators/emergent_styler/USAGE +5 -0
- data/rails_generators/emergent_styler/emergent_styler_generator.rb +21 -0
- data/rails_generators/rx_yaml_scaffold/USAGE +51 -0
- data/rails_generators/rx_yaml_scaffold/rx_yaml_scaffold_generator.rb +49 -0
- data/script/console +10 -0
- data/script/destroy +14 -0
- data/script/generate +14 -0
- data/spec/emergent_core_spec.rb +7 -0
- data/spec/spec_helper.rb +16 -0
- data/tasks/ann.rake +80 -0
- data/tasks/bones.rake +20 -0
- data/tasks/gem.rake +201 -0
- data/tasks/git.rake +40 -0
- data/tasks/manifest.rake +48 -0
- data/tasks/notes.rake +27 -0
- data/tasks/post_load.rake +39 -0
- data/tasks/rdoc.rake +50 -0
- data/tasks/rubyforge.rake +55 -0
- data/tasks/setup.rb +279 -0
- data/tasks/spec.rake +54 -0
- data/tasks/svn.rake +47 -0
- data/tasks/test.rake +40 -0
- data/test/test_emergent_core.rb +0 -0
- data/test/test_emergent_iphone_generator.rb +46 -0
- data/test/test_generator_helper.rb +29 -0
- metadata +437 -0
@@ -0,0 +1,114 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
<core:FourDComponent
|
3
|
+
xmlns:mx="http://ns.adobe.com/mxml/2009"
|
4
|
+
xmlns:analytics="com.google.analytics.components.*"
|
5
|
+
xmlns:map="<%= base_package %>.controllers.map.*"
|
6
|
+
xmlns:views="<%= base_package %>.views.<%= class_name.pluralize.dcfirst %>.*"
|
7
|
+
xmlns:presentation="<%= base_package %>.models.presentation.*"
|
8
|
+
xmlns:url="http://www.allurent.com/2006/urlkit"
|
9
|
+
xmlns:core="com.fourD.core.*"
|
10
|
+
width="100%">
|
11
|
+
<mx:Script>
|
12
|
+
<![CDATA[
|
13
|
+
import org.restfulx.Rx;
|
14
|
+
|
15
|
+
<% for model in belongs_tos -%>
|
16
|
+
import <%= base_package %>.models.domain.<%= model.camelcase %>;
|
17
|
+
<% end -%>
|
18
|
+
import <%= base_package %>.models.domain.<%= class_name %>;
|
19
|
+
|
20
|
+
]]></mx:Script>
|
21
|
+
|
22
|
+
<!-- Presenter and Model________________________________________________________ -->
|
23
|
+
|
24
|
+
<!-- Presenter Wraps the View and Handles Navigation Animations
|
25
|
+
Model allows you to easily call CRUD methods and handle sorting on data -->
|
26
|
+
<mx:Declarations>
|
27
|
+
<presentation:<%= class_name.pluralize %>Model id="model"/>
|
28
|
+
</mx:Declarations>
|
29
|
+
|
30
|
+
<!-- URL Stuff _________________________________________________________________ -->
|
31
|
+
|
32
|
+
<mx:Declarations>
|
33
|
+
<url:UrlRuleSet id="urlRules">
|
34
|
+
<url:UrlValueRule urlFormat="/*" sourceValue="<%= class_name.pluralize.dcfirst %>DataGrid.selectedItem" defaultValue=""/>
|
35
|
+
<url:UrlValueRule urlFormat="/*" sourceValue="currentState" defaultValue=""/>
|
36
|
+
</url:UrlRuleSet>
|
37
|
+
|
38
|
+
<!-- Used to set the current component in the states -->
|
39
|
+
<mx:Object id="urlComponent"/>
|
40
|
+
</mx:Declarations>
|
41
|
+
|
42
|
+
<!-- GUI ______________________________________________________________________ -->
|
43
|
+
|
44
|
+
<mx:VDividedBox width="100%" height="100%" horizontalScrollPolicy="off">
|
45
|
+
<mx:VBox width="100%" height="100%">
|
46
|
+
<mx:Panel id="<%= class_name.pluralize.dcfirst %>Panel"
|
47
|
+
width="100%" height="100%">
|
48
|
+
<mx:DataGrid id="<%= class_name.pluralize.dcfirst %>DataGrid"
|
49
|
+
height="100%"
|
50
|
+
width="100%"
|
51
|
+
horizontalScrollPolicy="on"
|
52
|
+
dragEnabled="true"
|
53
|
+
dragMoveEnabled="true"
|
54
|
+
dropEnabled="true"
|
55
|
+
dataProvider="{Rx.models.index(<%= class_name %>)}"
|
56
|
+
change="model.<%= class_name.dcfirst %> = <%= class_name.pluralize.dcfirst %>DataGrid.selectedItem as <%= class_name %>">
|
57
|
+
<mx:columns>
|
58
|
+
<% for attribute in attributes -%><% unless attribute.name == "with_user" %><% if attribute.type == "boolean" -%>
|
59
|
+
<mx:DataGridColumn editable="false" width="80" minWidth="80"
|
60
|
+
headerText="<%= attribute.flex_name.ucfirst %>"
|
61
|
+
dataField="<%= attribute.flex_name %>">
|
62
|
+
</mx:DataGridColumn>
|
63
|
+
<% else -%>
|
64
|
+
<mx:DataGridColumn dataField="<%= attribute.flex_name %>" headerText="<%= attribute.name.ucfirst %>"
|
65
|
+
width="150" minWidth="100"/>
|
66
|
+
<% end -%><% end -%>
|
67
|
+
<% end -%>
|
68
|
+
</mx:columns>
|
69
|
+
</mx:DataGrid>
|
70
|
+
</mx:Panel>
|
71
|
+
</mx:VBox>
|
72
|
+
|
73
|
+
<mx:VBox width="100%" height="100%">
|
74
|
+
<mx:Panel id="edit<%= class_name %>Panel" title="Edit <%= class_name %>" width="100%" height="100%" paddingRight="55">
|
75
|
+
<mx:Form paddingTop="30" width="100%" height="100%"><% for attribute in attributes -%><% unless attribute.name == "with_user" %>
|
76
|
+
<mx:FormItem label="<%= attribute.flex_name.ucfirst %>" width="100%">
|
77
|
+
<% if attribute.type == :boolean -%>
|
78
|
+
<mx:CheckBox id="<%= attribute.flex_name %>CheckBox" selected="{_<%= class_name.dcfirst %>.<%= attribute.flex_name %>}"/>
|
79
|
+
<% elsif attribute.type == :string -%>
|
80
|
+
<mx:TextInput id="<%= attribute.flex_name %>TextInput" width="100%" text="{model.<%= class_name.dcfirst %>.<%= attribute.flex_name %>}"
|
81
|
+
change="model.<%= class_name.dcfirst %>.<%= attribute.flex_name %> = <%= attribute.flex_name %>TextInput.text"/>
|
82
|
+
<% elsif attribute.type == :text -%>
|
83
|
+
<mx:TextArea id="<%= attribute.flex_name %>TextArea" width="100%" height="150" text="{model.<%= class_name.dcfirst %>.<%= attribute.flex_name %>}"
|
84
|
+
change="model.<%= class_name.dcfirst %>.<%= attribute.flex_name %> = <%= attribute.flex_name %>TextArea.text"/>
|
85
|
+
<% elsif attribute.type == :datetime || attribute.type == :time -%>
|
86
|
+
<rcomponents:DateTimeTextInput id="<%= attribute.flex_name %>DateTimeTextInput" width="200" date="{model.<%= class_name.dcfirst %>.<%= attribute.flex_name %>}"/>
|
87
|
+
<% elsif attribute.type == :date -%>
|
88
|
+
<mx:DateField id="<%= attribute.flex_name %>DateField" selectedDate="{model.<%= class_name.dcfirst %>.<%= attribute.flex_name %>}"/>
|
89
|
+
<% else -%>
|
90
|
+
<mx:TextInput id="<%= attribute.flex_name %>TextInput" width="100%" text="{model.<%= class_name.dcfirst %>.<%= attribute.flex_name %>}"
|
91
|
+
change="model.<%= class_name.dcfirst %>.<%= attribute.flex_name %> = <%= attribute.flex_name %>TextInput.text as Number"/>
|
92
|
+
<% end -%>
|
93
|
+
</mx:FormItem>
|
94
|
+
<% end -%>
|
95
|
+
<% end -%>
|
96
|
+
<% for model in belongs_tos -%>
|
97
|
+
<mx:FormItem label="<%= model.camelcase %>" width="100%">
|
98
|
+
<mx:ComboBox id="<%= model.camelcase(:lower) %>ComboBox" width="200"
|
99
|
+
labelField="{<%= model.camelcase %>.LABEL}"
|
100
|
+
dataProvider="{Rx.models.index(<%= model.camelcase %>)}" prompt="<%= model.camelcase %> ..."
|
101
|
+
selectedItem="{model.<%= class_name.dcfirst %>.<%= model.camelcase(:lower) %>}"/>
|
102
|
+
</mx:FormItem>
|
103
|
+
<% end -%>
|
104
|
+
<mx:FormItem label="Actions" width="100%">
|
105
|
+
<mx:HBox id="crudBar" width="100%">
|
106
|
+
<mx:Button id="saveButton" label="Save Comment" click="model.save(model.<%= class_name.dcfirst %>)"/>
|
107
|
+
<mx:Button id="destroyButton" label="Delete Comment" click="model.destroy(model.<%= class_name.dcfirst %>)"/>
|
108
|
+
</mx:HBox>
|
109
|
+
</mx:FormItem>
|
110
|
+
</mx:Form>
|
111
|
+
</mx:Panel>
|
112
|
+
</mx:VBox>
|
113
|
+
</mx:VDividedBox>
|
114
|
+
</core:FourDComponent>
|
@@ -0,0 +1,84 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
<mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml" width="100%" label="<%= class_name %>" horizontalAlign="center" paddingTop="30"
|
3
|
+
creationComplete="creationComplete(event)"
|
4
|
+
xmlns:url="http://www.allurent.com/2006/urlkit">
|
5
|
+
<mx:Script><![CDATA[
|
6
|
+
import org.restfulx.Rx;
|
7
|
+
|
8
|
+
<% for model in belongs_tos -%>
|
9
|
+
import <%= base_package %>.models.domain.<%= model.camelcase %>;
|
10
|
+
<% end -%>
|
11
|
+
import <%= base_package %>.models.presentation.<%= class_name.pluralize %>Model;
|
12
|
+
import <%= base_package %>.models.domain.<%= class_name %>;
|
13
|
+
<% for attribute in attributes -%>
|
14
|
+
<% if attribute.model_type -%>
|
15
|
+
import <%= base_package %>.models.<%= attribute.flex_name.capitalize_without_downcasing %>;
|
16
|
+
<% end -%>
|
17
|
+
<% end -%>
|
18
|
+
// import <%= base_package %>.views.component.<%= class_name.dcfirst %>.<%= class_name.pluralize %>EditPresenter;
|
19
|
+
|
20
|
+
/** This is the presentation model object for this view, it is injected by the application controller when view is created. */
|
21
|
+
[Bindable] // This must be instantiated here. If you do = new <%= class_name.pluralize %>Model() in creationComplete, the dispatcher will be null!
|
22
|
+
public var model:<%= class_name.pluralize %>Model = new <%= class_name.pluralize %>Model();
|
23
|
+
|
24
|
+
// [Bindable]
|
25
|
+
// public var presenter:<%= class_name.pluralize %>EditPresenter;
|
26
|
+
|
27
|
+
private function creationComplete(event:Event):void
|
28
|
+
{
|
29
|
+
// presenter = new <%= class_name.pluralize %>EditPresenter(this);
|
30
|
+
}
|
31
|
+
|
32
|
+
]]></mx:Script>
|
33
|
+
|
34
|
+
<!-- URL Stuff _________________________________________________________________ -->
|
35
|
+
|
36
|
+
<url:UrlRuleSet id="urlRules">
|
37
|
+
<!-- <url:UrlValueRule urlFormat="/*" sourceValue="titleTextInput.text" defaultValue=""/>-->
|
38
|
+
<url:UrlValueRule urlFormat="/*" sourceValue="currentState" defaultValue=""/>
|
39
|
+
</url:UrlRuleSet>
|
40
|
+
|
41
|
+
<!-- Used to set the current component in the states -->
|
42
|
+
<mx:Object id="urlComponent"/>
|
43
|
+
|
44
|
+
<!-- GUI ______________________________________________________________________ -->
|
45
|
+
|
46
|
+
<mx:Panel id="edit<%= class_name %>Panel" title="Edit <%= class_name %>" width="100%" height="100%" paddingRight="55">
|
47
|
+
<mx:Form paddingTop="30" width="100%" height="100%"><% for attribute in attributes -%><% unless attribute.name == "with_user" %>
|
48
|
+
<mx:FormItem label="<%= attribute.flex_name.capitalize_without_downcasing %>" width="100%">
|
49
|
+
<% if attribute.type == :boolean -%>
|
50
|
+
<mx:CheckBox id="<%= attribute.flex_name %>CheckBox" selected="{_<%= class_name.dcfirst %>.<%= attribute.flex_name %>}"/>
|
51
|
+
<% elsif attribute.type == :string -%>
|
52
|
+
<mx:TextInput id="<%= attribute.flex_name %>TextInput" width="100%" text="{model.<%= class_name.dcfirst %>.<%= attribute.flex_name %>}"
|
53
|
+
change="model.<%= class_name.dcfirst %>.<%= attribute.flex_name %> = <%= attribute.flex_name %>TextInput.text"/>
|
54
|
+
<% elsif attribute.type == :text -%>
|
55
|
+
<mx:TextArea id="<%= attribute.flex_name %>TextArea" width="100%" height="150" text="{model.<%= class_name.dcfirst %>.<%= attribute.flex_name %>}"
|
56
|
+
change="model.<%= class_name.dcfirst %>.<%= attribute.flex_name %> = <%= attribute.flex_name %>TextArea.text"/>
|
57
|
+
<% elsif attribute.type == :datetime || attribute.type == :time -%>
|
58
|
+
<rcomponents:DateTimeTextInput id="<%= attribute.flex_name %>DateTimeTextInput" width="200" date="{model.<%= class_name.dcfirst %>.<%= attribute.flex_name %>}"/>
|
59
|
+
<% elsif attribute.type == :date -%>
|
60
|
+
<mx:DateField id="<%= attribute.flex_name %>DateField" selectedDate="{model.<%= class_name.dcfirst %>.<%= attribute.flex_name %>}"/>
|
61
|
+
<% else -%>
|
62
|
+
<mx:TextInput id="<%= attribute.flex_name %>TextInput" width="100%" text="{model.<%= class_name.dcfirst %>.<%= attribute.flex_name %>}"
|
63
|
+
change="model.<%= class_name.dcfirst %>.<%= attribute.flex_name %> = <%= attribute.flex_name %>TextInput.text as Number"/>
|
64
|
+
<% end -%>
|
65
|
+
</mx:FormItem>
|
66
|
+
<% end -%>
|
67
|
+
<% end -%>
|
68
|
+
<% for model in belongs_tos -%>
|
69
|
+
<mx:FormItem label="<%= model.camelcase %>" width="100%">
|
70
|
+
<mx:ComboBox id="<%= model.camelcase(:lower) %>ComboBox" width="200"
|
71
|
+
labelField="{<%= model.camelcase %>.LABEL}"
|
72
|
+
dataProvider="{Rx.models.index(<%= model.camelcase %>)}" prompt="<%= model.camelcase %> ..."
|
73
|
+
selectedItem="{model.<%= class_name.dcfirst %>.<%= model.camelcase(:lower) %>}"/>
|
74
|
+
</mx:FormItem>
|
75
|
+
<% end -%>
|
76
|
+
<mx:FormItem label="Actions" width="100%">
|
77
|
+
<mx:HBox id="crudBar" width="100%">
|
78
|
+
<mx:Button id="saveButton" label="Save <%= class_name %>" click="model.save(model.<%= class_name.dcfirst %>)"/>
|
79
|
+
<mx:Button id="destroyButton" label="Delete <%= class_name %>" click="model.destroy()"/>
|
80
|
+
</mx:HBox>
|
81
|
+
</mx:FormItem>
|
82
|
+
</mx:Form>
|
83
|
+
</mx:Panel>
|
84
|
+
</mx:VBox>
|
@@ -0,0 +1 @@
|
|
1
|
+
svn checkout http://flexcairngorm.googlecode.com/svn/trunk/ flexcairngorm-read-only
|
@@ -0,0 +1,128 @@
|
|
1
|
+
# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
|
2
|
+
|
3
|
+
<% unless attributes.empty? -%>
|
4
|
+
<%= class_name.downcase -%>_one:
|
5
|
+
<% for attribute in attributes -%><% unless attribute.name == "with_user" %>
|
6
|
+
<%= attribute.name %>: <%= attribute.default("#{class_name}1") %>
|
7
|
+
<% end -%><% end -%>
|
8
|
+
|
9
|
+
<%= class_name.downcase -%>_two:
|
10
|
+
<% for attribute in attributes -%><% unless attribute.name == "with_user" %>
|
11
|
+
<%= attribute.name %>: <%= attribute.default("#{class_name}2") %>
|
12
|
+
<% end -%><% end -%>
|
13
|
+
|
14
|
+
<%= class_name.downcase -%>_three:
|
15
|
+
<% for attribute in attributes -%><% unless attribute.name == "with_user" %>
|
16
|
+
<%= attribute.name %>: <%= attribute.default("#{class_name}3") %>
|
17
|
+
<% end -%><% end -%>
|
18
|
+
|
19
|
+
<%= class_name.downcase -%>_four:
|
20
|
+
<% for attribute in attributes -%><% unless attribute.name == "with_user" %>
|
21
|
+
<%= attribute.name %>: <%= attribute.default("#{class_name}4") %>
|
22
|
+
<% end -%><% end -%>
|
23
|
+
|
24
|
+
<%= class_name.downcase -%>_four:
|
25
|
+
<% for attribute in attributes -%><% unless attribute.name == "with_user" %>
|
26
|
+
<%= attribute.name %>: <%= attribute.default("#{class_name}5") %>
|
27
|
+
<% end -%><% end -%>
|
28
|
+
|
29
|
+
<%= class_name.downcase -%>_four:
|
30
|
+
<% for attribute in attributes -%><% unless attribute.name == "with_user" %>
|
31
|
+
<%= attribute.name %>: <%= attribute.default("#{class_name}6") %>
|
32
|
+
<% end -%><% end -%>
|
33
|
+
|
34
|
+
<%= class_name.downcase -%>_four:
|
35
|
+
<% for attribute in attributes -%><% unless attribute.name == "with_user" %>
|
36
|
+
<%= attribute.name %>: <%= attribute.default("#{class_name}7") %>
|
37
|
+
<% end -%><% end -%>
|
38
|
+
|
39
|
+
<%= class_name.downcase -%>_four:
|
40
|
+
<% for attribute in attributes -%><% unless attribute.name == "with_user" %>
|
41
|
+
<%= attribute.name %>: <%= attribute.default("#{class_name}8") %>
|
42
|
+
<% end -%><% end -%>
|
43
|
+
|
44
|
+
<%= class_name.downcase -%>_four:
|
45
|
+
<% for attribute in attributes -%><% unless attribute.name == "with_user" %>
|
46
|
+
<%= attribute.name %>: <%= attribute.default("#{class_name}9") %>
|
47
|
+
<% end -%><% end -%>
|
48
|
+
|
49
|
+
<%= class_name.downcase -%>_four:
|
50
|
+
<% for attribute in attributes -%><% unless attribute.name == "with_user" %>
|
51
|
+
<%= attribute.name %>: <%= attribute.default("#{class_name}10") %>
|
52
|
+
<% end -%><% end -%>
|
53
|
+
|
54
|
+
<%= class_name.downcase -%>_four:
|
55
|
+
<% for attribute in attributes -%><% unless attribute.name == "with_user" %>
|
56
|
+
<%= attribute.name %>: <%= attribute.default("#{class_name}11") %>
|
57
|
+
<% end -%><% end -%>
|
58
|
+
|
59
|
+
<%= class_name.downcase -%>_four:
|
60
|
+
<% for attribute in attributes -%><% unless attribute.name == "with_user" %>
|
61
|
+
<%= attribute.name %>: <%= attribute.default("#{class_name}12") %>
|
62
|
+
<% end -%><% end -%>
|
63
|
+
|
64
|
+
<%= class_name.downcase -%>_four:
|
65
|
+
<% for attribute in attributes -%><% unless attribute.name == "with_user" %>
|
66
|
+
<%= attribute.name %>: <%= attribute.default("#{class_name}13") %>
|
67
|
+
<% end -%><% end -%>
|
68
|
+
|
69
|
+
<%= class_name.downcase -%>_four:
|
70
|
+
<% for attribute in attributes -%><% unless attribute.name == "with_user" %>
|
71
|
+
<%= attribute.name %>: <%= attribute.default("#{class_name}14") %>
|
72
|
+
<% end -%><% end -%>
|
73
|
+
|
74
|
+
<%= class_name.downcase -%>_four:
|
75
|
+
<% for attribute in attributes -%><% unless attribute.name == "with_user" %>
|
76
|
+
<%= attribute.name %>: <%= attribute.default("#{class_name}15") %>
|
77
|
+
<% end -%><% end -%>
|
78
|
+
|
79
|
+
<%= class_name.downcase -%>_four:
|
80
|
+
<% for attribute in attributes -%><% unless attribute.name == "with_user" %>
|
81
|
+
<%= attribute.name %>: <%= attribute.default("#{class_name}16") %>
|
82
|
+
<% end -%><% end -%>
|
83
|
+
|
84
|
+
<%= class_name.downcase -%>_four:
|
85
|
+
<% for attribute in attributes -%><% unless attribute.name == "with_user" %>
|
86
|
+
<%= attribute.name %>: <%= attribute.default("#{class_name}17") %>
|
87
|
+
<% end -%><% end -%>
|
88
|
+
|
89
|
+
<%= class_name.downcase -%>_four:
|
90
|
+
<% for attribute in attributes -%><% unless attribute.name == "with_user" %>
|
91
|
+
<%= attribute.name %>: <%= attribute.default("#{class_name}18") %>
|
92
|
+
<% end -%><% end -%>
|
93
|
+
|
94
|
+
<%= class_name.downcase -%>_four:
|
95
|
+
<% for attribute in attributes -%><% unless attribute.name == "with_user" %>
|
96
|
+
<%= attribute.name %>: <%= attribute.default("#{class_name}19") %>
|
97
|
+
<% end -%><% end -%>
|
98
|
+
|
99
|
+
<%= class_name.downcase -%>_four:
|
100
|
+
<% for attribute in attributes -%><% unless attribute.name == "with_user" %>
|
101
|
+
<%= attribute.name %>: <%= attribute.default("#{class_name}20") %>
|
102
|
+
<% end -%><% end -%>
|
103
|
+
|
104
|
+
<%= class_name.downcase -%>_four:
|
105
|
+
<% for attribute in attributes -%><% unless attribute.name == "with_user" %>
|
106
|
+
<%= attribute.name %>: <%= attribute.default("#{class_name}21") %>
|
107
|
+
<% end -%><% end -%>
|
108
|
+
|
109
|
+
<%= class_name.downcase -%>_four:
|
110
|
+
<% for attribute in attributes -%><% unless attribute.name == "with_user" %>
|
111
|
+
<%= attribute.name %>: <%= attribute.default("#{class_name}22") %>
|
112
|
+
<% end -%><% end -%>
|
113
|
+
|
114
|
+
<%= class_name.downcase -%>_four:
|
115
|
+
<% for attribute in attributes -%><% unless attribute.name == "with_user" %>
|
116
|
+
<%= attribute.name %>: <%= attribute.default("#{class_name}23") %>
|
117
|
+
<% end -%><% end -%>
|
118
|
+
|
119
|
+
<%= class_name.downcase -%>_four:
|
120
|
+
<% for attribute in attributes -%><% unless attribute.name == "with_user" %>
|
121
|
+
<%= attribute.name %>: <%= attribute.default("#{class_name}24") %>
|
122
|
+
<% end -%><% end -%>
|
123
|
+
|
124
|
+
<%= class_name.downcase -%>_four:
|
125
|
+
<% for attribute in attributes -%><% unless attribute.name == "with_user" %>
|
126
|
+
<%= attribute.name %>: <%= attribute.default("#{class_name}25") %>
|
127
|
+
<% end -%><% end -%>
|
128
|
+
<% end -%>
|
@@ -0,0 +1,58 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
<core:FourDComponent
|
3
|
+
xmlns:mx="http://ns.adobe.com/mxml/2009"
|
4
|
+
xmlns:analytics="com.google.analytics.components.*"
|
5
|
+
xmlns:map="<%= base_package %>.controllers.map.*"
|
6
|
+
xmlns:url="http://www.allurent.com/2006/urlkit"
|
7
|
+
xmlns:core="com.fourD.core.*"
|
8
|
+
xmlns:views="<%= base_package %>.views.<%= class_name.pluralize.dcfirst %>.*"
|
9
|
+
xmlns:presentation="<%= base_package %>.models.presentation.*"
|
10
|
+
width="100%" height="100%">
|
11
|
+
<mx:Script>
|
12
|
+
<![CDATA[
|
13
|
+
import org.restfulx.Rx;
|
14
|
+
|
15
|
+
<% for model in belongs_tos -%>
|
16
|
+
import <%= base_package %>.models.domain.<%= model.camelcase %>;
|
17
|
+
<% end -%>
|
18
|
+
import <%= base_package %>.models.domain.<%= class_name %>;
|
19
|
+
|
20
|
+
]]>
|
21
|
+
</mx:Script>
|
22
|
+
|
23
|
+
<!-- Presenter and Model________________________________________________________ -->
|
24
|
+
|
25
|
+
<!-- Presenter Wraps the View and Handles Navigation Animations
|
26
|
+
Model allows you to easily call CRUD methods and handle sorting on data -->
|
27
|
+
<mx:Declarations>
|
28
|
+
<presentation:<%= class_name.pluralize %>Model id="model"/>
|
29
|
+
</mx:Declarations>
|
30
|
+
|
31
|
+
<!-- URL Stuff _________________________________________________________________ -->
|
32
|
+
|
33
|
+
<mx:Declarations>
|
34
|
+
<!-- Used to set the current component in the states -->
|
35
|
+
<mx:Object id="urlComponent"/>
|
36
|
+
|
37
|
+
<url:UrlRuleSet id="urlRules">
|
38
|
+
<url:UrlValueRule urlFormat="/*" sourceValue="currentState" />
|
39
|
+
<url:UrlDelegateRule rule="{urlComponent.urlRules}" />
|
40
|
+
</url:UrlRuleSet>
|
41
|
+
</mx:Declarations>
|
42
|
+
|
43
|
+
<!-- GUI ______________________________________________________________________ -->
|
44
|
+
|
45
|
+
<mx:Canvas id="indexViewCanvas">
|
46
|
+
<mx:HBox id="dynamicDataGridTitleBar" width="100%" height="10%">
|
47
|
+
<% for attribute in attributes -%>
|
48
|
+
<mx:FxButton label="<%= attribute.flex_name.ucfirst %>" width="100%" height="100%"/>
|
49
|
+
<% end -%>
|
50
|
+
</mx:HBox>
|
51
|
+
<mx:DataGroup id="dynamicDataGrid" width="100%" height="100%" itemRenderer="<%= base_package %>.views.<%= class_name.pluralize.dcfirst %>.<%= class_name %>ItemRenderer">
|
52
|
+
<mx:layout>
|
53
|
+
<mx:VerticalLayout/>
|
54
|
+
</mx:layout>
|
55
|
+
</mx:DataGroup>
|
56
|
+
</mx:Canvas>
|
57
|
+
|
58
|
+
</core:FourDComponent>
|
@@ -0,0 +1,53 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
<core:FourDComponent
|
3
|
+
xmlns:mx="http://ns.adobe.com/mxml/2009"
|
4
|
+
xmlns:core="com.fourD.core.*"
|
5
|
+
xmlns:local="*"
|
6
|
+
width="100" height="100">
|
7
|
+
|
8
|
+
<mx:Script>
|
9
|
+
<![CDATA[
|
10
|
+
import org.restfulx.Rx;
|
11
|
+
import <%= base_package %>.models.domain.<%= class_name %>;
|
12
|
+
|
13
|
+
[Bindable]
|
14
|
+
private var <%= class_name.dcfirst %>:<%= class_name %>;
|
15
|
+
|
16
|
+
override public function set data(value:Object):void {
|
17
|
+
super.data = value;
|
18
|
+
if (value is <%= class_name %>) {
|
19
|
+
<%= class_name.dcfirst %> = <%= class_name %>(value);
|
20
|
+
}
|
21
|
+
}
|
22
|
+
|
23
|
+
]]>
|
24
|
+
</mx:Script>
|
25
|
+
<mx:Group width="100%" height="100%">
|
26
|
+
<mx:layout>
|
27
|
+
<mx:HorizontalLayout/>
|
28
|
+
</mx:layout>
|
29
|
+
<% for attribute in attributes -%>
|
30
|
+
<mx:Button label="{<%= class_name.dcfirst %>.<%= attribute.flex_name %>}" width="100%" height="100%"/>
|
31
|
+
<% end -%>
|
32
|
+
</mx:Group>
|
33
|
+
|
34
|
+
<!--<mx:HBox verticalAlign="middle" horizontalAlign="center" height="100%" width="100%">
|
35
|
+
<mx:Image source="@Embed('images/icons/locked.gif')" visible="{isLocked}" includeInLayout="{isLocked}"/>
|
36
|
+
<mx:Image height="32" width="32" source="{icon32}" visible="{!showThumbnail}" includeInLayout="{!showThumbnail}"/>
|
37
|
+
<mx:Image id="thumbnail" autoLoad="{showThumbnail}" source="{thumbnailUrl}" visible="{showThumbnail}" includeInLayout="{showThumbnail}"/>
|
38
|
+
</mx:HBox>
|
39
|
+
<mx:Label width="125" textAlign="center" text="{nodeName}" height="25" fontSize="10" truncateToFit="true" /> -->
|
40
|
+
|
41
|
+
<!--<mx:VBox id="buttons" visible="false" verticalGap="4" paddingRight="8" right="8" top="12">
|
42
|
+
<mx:Button id="purchase" icon="@Embed('/assets/icon_cart_empty.png')"
|
43
|
+
click="dispatchEvent(new ProductThumbEvent(ProductThumbEvent.PURCHASE, product))"
|
44
|
+
width="30" toolTip="Add to cart"/>
|
45
|
+
<mx:Button id="compare" icon="@Embed('/assets/icon_compare.png')"
|
46
|
+
click="dispatchEvent(new ProductThumbEvent(ProductThumbEvent.COMPARE, product))"
|
47
|
+
width="30" toolTip="Add to compare list"/>
|
48
|
+
<mx:Button id="details" icon="@Embed('/assets/icon_details.png')"
|
49
|
+
click="dispatchEvent(new ProductThumbEvent(ProductThumbEvent.DETAILS, product))"
|
50
|
+
width="30" toolTip="Show details"/>
|
51
|
+
</mx:VBox> -->
|
52
|
+
|
53
|
+
</core:FourDComponent>
|
@@ -0,0 +1,31 @@
|
|
1
|
+
package <%= base_package %>.controllers.manager {
|
2
|
+
|
3
|
+
import <%= base_package %>.controllers.manager.ResourcesManager;
|
4
|
+
import <%= base_package %>.controllers.event.ResourceEvent;
|
5
|
+
import <%= base_package %>.models.constant.ResourceResult;
|
6
|
+
import <%= base_package %>.models.domain.<%= class_name %>;
|
7
|
+
|
8
|
+
import org.restfulx.Rx;
|
9
|
+
import org.restfulx.collections.ModelsCollection;
|
10
|
+
|
11
|
+
public class <%= class_name %>Manager extends ResourcesManager {
|
12
|
+
|
13
|
+
private var _current<%= class_name %>:<%= class_name %>; [Bindable]
|
14
|
+
public function get current<%= class_name %>():<%= class_name %> { return _current<%= class_name %>; }
|
15
|
+
public function set current<%= class_name %>(value:<%= class_name %>):void {
|
16
|
+
_current<%= class_name %> = value;
|
17
|
+
}
|
18
|
+
|
19
|
+
private var _<%= class_name.pluralize.dcfirst %>:ModelsCollection;
|
20
|
+
public function get <%= class_name.pluralize.dcfirst %>():ModelsCollection { return _<%= class_name.pluralize.dcfirst %>; }
|
21
|
+
public function set <%= class_name.pluralize.dcfirst %>(value:ModelsCollection):void {
|
22
|
+
_<%= class_name.pluralize.dcfirst %> = value;
|
23
|
+
}
|
24
|
+
|
25
|
+
public function <%= class_name %>Manager() {
|
26
|
+
<%= class_name.pluralize.dcfirst %> = Rx.models.index(<%= class_name %>);
|
27
|
+
setModel(current<%= class_name %>);
|
28
|
+
resourceResultName = ResourceResult.<%= class_name.upcase %>;
|
29
|
+
}
|
30
|
+
}
|
31
|
+
}
|
@@ -0,0 +1,22 @@
|
|
1
|
+
class <%= migration_name %> < ActiveRecord::Migration
|
2
|
+
def self.up
|
3
|
+
create_table :<%= table_name %> do |t|
|
4
|
+
<% for attribute in attributes -%>
|
5
|
+
<% if attribute.name == "with_user" %>
|
6
|
+
# belongs_to the following...
|
7
|
+
<% else %> t.<%= attribute.type %> :<%= attribute.name %>
|
8
|
+
<% end -%>
|
9
|
+
<% end -%>
|
10
|
+
<% for model in belongs_tos -%>
|
11
|
+
t.references :<%= model %>
|
12
|
+
<% end -%>
|
13
|
+
<% unless options[:skip_timestamps] %>
|
14
|
+
t.timestamps
|
15
|
+
<% end -%>
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
def self.down
|
20
|
+
drop_table :<%= table_name %>
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,42 @@
|
|
1
|
+
package <%= base_package %>.models.domain {
|
2
|
+
<% if has_manies.length > 0 -%>
|
3
|
+
import org.restfulx.models.ModelsCollection;
|
4
|
+
<% end -%>
|
5
|
+
import org.restfulx.models.RxModel;
|
6
|
+
|
7
|
+
[Resource(name="<%= resource_controller_name %>")]
|
8
|
+
[Bindable]
|
9
|
+
public class <%= class_name %> extends RxModel {
|
10
|
+
<% if attributes && !attributes.empty? && attributes[0].flex_type != "Boolean" -%>
|
11
|
+
public static const LABEL:String = "<%= attributes[0].flex_name %>";
|
12
|
+
<% else -%>
|
13
|
+
public static const LABEL:String = "id";
|
14
|
+
<% end -%>
|
15
|
+
|
16
|
+
<% for attribute in attributes -%>
|
17
|
+
<% if attribute.type == :datetime || attribute.type == :time -%>
|
18
|
+
[DateTime]
|
19
|
+
<% end -%>
|
20
|
+
public var <%= attribute.flex_name %>:<%= attribute.flex_type %>;
|
21
|
+
|
22
|
+
<% end -%>
|
23
|
+
<% for model in belongs_tos -%>
|
24
|
+
[BelongsTo]
|
25
|
+
public var <%= model.camelcase(:lower) %>:<%= model.camelcase %>;
|
26
|
+
|
27
|
+
<% end -%>
|
28
|
+
<% for model in has_ones -%>
|
29
|
+
[HasOne]
|
30
|
+
public var <%= model.camelcase(:lower) %>:<%= model.camelcase %>;
|
31
|
+
|
32
|
+
<% end -%>
|
33
|
+
<% for model in has_manies -%>
|
34
|
+
[HasMany]
|
35
|
+
public var <%= model.camelcase(:lower) %>:ModelsCollection;
|
36
|
+
|
37
|
+
<% end -%>
|
38
|
+
public function <%= class_name %>() {
|
39
|
+
super(LABEL);
|
40
|
+
}
|
41
|
+
}
|
42
|
+
}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
class <%= class_name %> < ActiveRecord::Base
|
2
|
+
<% for model in has_ones -%>
|
3
|
+
has_one :<%= model %>, :dependent => :destroy
|
4
|
+
<% end -%>
|
5
|
+
<% for model in has_manies -%>
|
6
|
+
has_many :<%= model %>, :dependent => :delete_all
|
7
|
+
<% end -%>
|
8
|
+
<% for model in belongs_tos -%>
|
9
|
+
belongs_to :<%= model %>
|
10
|
+
<% end -%>
|
11
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
package <%= base_package %>.models.presentation {
|
2
|
+
|
3
|
+
import <%= base_package %>.models.domain.<%= class_name %>;
|
4
|
+
import <%= base_package %>.models.constant.Resource;
|
5
|
+
|
6
|
+
import org.restfulx.models.ModelsCollection;
|
7
|
+
|
8
|
+
public class <%= class_name.pluralize %>Model extends ResourcesModel {
|
9
|
+
|
10
|
+
private var _<%= class_name.dcfirst %>Dirty; [Bindable]
|
11
|
+
public function get <%= class_name.dcfirst %>Dirty():Boolean { return _<%= class_name.dcfirst %>Dirty; }
|
12
|
+
public function set <%= class_name.dcfirst %>Dirty(value:Boolean):void {
|
13
|
+
_<%= class_name.dcfirst %>Dirty = value;
|
14
|
+
}
|
15
|
+
|
16
|
+
private var _<%= class_name.dcfirst %>:<%= class_name %>; [Bindable]
|
17
|
+
public function get <%= class_name.dcfirst %>():<%= class_name %> { return _<%= class_name.dcfirst %>; }
|
18
|
+
public function set <%= class_name.dcfirst %>(value:<%= class_name %>):void {
|
19
|
+
_<%= class_name.dcfirst %> = value;
|
20
|
+
}
|
21
|
+
|
22
|
+
private var _<%= class_name.pluralize.dcfirst %>:ModelsCollection;
|
23
|
+
public function get <%= class_name.pluralize.dcfirst %>():ModelsCollection { return _<%= class_name.pluralize.dcfirst %>; }
|
24
|
+
public function set <%= class_name.pluralize.dcfirst %>(value:ModelsCollection):void {
|
25
|
+
_<%= class_name.pluralize.dcfirst %> = value;
|
26
|
+
}
|
27
|
+
|
28
|
+
public function <%= class_name.pluralize %>Model() {
|
29
|
+
<%= class_name.dcfirst %> = new <%= class_name %>();
|
30
|
+
resourceName = Resource.<%= class_name.upcase %>;
|
31
|
+
}
|
32
|
+
}
|
33
|
+
}
|