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,98 @@
|
|
1
|
+
package <%= base_package %>.views.<%= class_name.pluralize.dcfirst %> {
|
2
|
+
|
3
|
+
import flash.events.Event;
|
4
|
+
import flash.events.MouseEvent;
|
5
|
+
|
6
|
+
import mx.events.FlexEvent;
|
7
|
+
import mx.events.ListEvent;
|
8
|
+
import mx.core.Application;
|
9
|
+
|
10
|
+
import org.restfulx.Rx;
|
11
|
+
import org.restfulx.utils.RxUtils;
|
12
|
+
|
13
|
+
import extras.framework.Presenter;
|
14
|
+
import com.fourD.core.FourDComponent;
|
15
|
+
import com.fourD.animators.FourDTweenCollection;
|
16
|
+
|
17
|
+
import <%= base_package %>.models.constant.URL;
|
18
|
+
import <%= base_package %>.models.presentation.<%= class_name.pluralize %>Model;
|
19
|
+
import <%= base_package %>.views.<%= class_name.pluralize.dcfirst %>.<%= class_name.pluralize %>View;
|
20
|
+
|
21
|
+
public class <%= class_name.pluralize %>Presenter extends Presenter {
|
22
|
+
|
23
|
+
// all the tweens you could ever desire :)
|
24
|
+
public var t:FourDTweenCollection;
|
25
|
+
|
26
|
+
public function get <%= class_name.pluralize.dcfirst %>View():<%= class_name.pluralize %>View { return this.view as <%= class_name.pluralize %>View; }
|
27
|
+
|
28
|
+
/**
|
29
|
+
* Presenter Constructor.
|
30
|
+
* Creates the <%= class_name.pluralize %>class_name from the RxEvent data.
|
31
|
+
* This allows common RESTful functions (show, create, update, delete)
|
32
|
+
* to be reused by multiple views, thereby following the DRY principle.
|
33
|
+
*/
|
34
|
+
public function <%= class_name.pluralize %>Presenter() {
|
35
|
+
}
|
36
|
+
|
37
|
+
/**
|
38
|
+
* Handle view creation complete initialization
|
39
|
+
*
|
40
|
+
* @param event creation complete event
|
41
|
+
*
|
42
|
+
*/
|
43
|
+
override protected function onCreationComplete(event:FlexEvent):void {
|
44
|
+
// This should ideally be done through some sort of event map
|
45
|
+
// but that's too complicated for me to think about right now...
|
46
|
+
|
47
|
+
/* components = [view.<%= class_name.dcfirst %>IndexView,
|
48
|
+
// view.<%= class_name.dcfirst %>ShowView,
|
49
|
+
view.<%= class_name.dcfirst %>EditIndexView,
|
50
|
+
view.<%= class_name.dcfirst %>EditShowView]
|
51
|
+
visibleComponents = [view.<%= class_name.dcfirst %>EditIndexView]; */
|
52
|
+
}
|
53
|
+
|
54
|
+
/**
|
55
|
+
* This is where you define what can be found in that params object
|
56
|
+
* p Object looks like this: [{tween:myTween, view:myView, dispatchLocal:ACTION, dispatchGlobal:GLOBAL_URL, when:onComplete}]
|
57
|
+
*/
|
58
|
+
override protected function executeTweenParams(p:Object=null):void {
|
59
|
+
var childView:*;
|
60
|
+
if (p.view) {
|
61
|
+
childView = p.view;
|
62
|
+
}
|
63
|
+
if (p.dispatchLocal) {
|
64
|
+
|
65
|
+
}
|
66
|
+
if (p.dispatchGlobal) {
|
67
|
+
globalDispatcher
|
68
|
+
}
|
69
|
+
}
|
70
|
+
|
71
|
+
//-State changing (i.e. Navigation) methods for <%= class_name %>
|
72
|
+
public function goto<%= class_name %>Show(action:String="show", resource:Object=null, result:String=null):void { }
|
73
|
+
|
74
|
+
public function goto<%= class_name %>Index(action:String="show", resource:Object=null, result:String=null):void { }
|
75
|
+
|
76
|
+
public function goto<%= class_name %>EditShow(action:String="show", resource:Object=null, result:String=null):void { }
|
77
|
+
|
78
|
+
public function goto<%= class_name %>EditIndex(action:String="show", resource:Object=null, result:String=null):void { }
|
79
|
+
|
80
|
+
//-Listener methods...
|
81
|
+
|
82
|
+
/* private function onNewClick(event:MouseEvent):void {
|
83
|
+
model.newResource();
|
84
|
+
}
|
85
|
+
|
86
|
+
private function onSaveClick(event:MouseEvent):void {
|
87
|
+
model.save();
|
88
|
+
}
|
89
|
+
|
90
|
+
private function onDestroyClick(event:MouseEvent):void {
|
91
|
+
model.destroy();
|
92
|
+
}
|
93
|
+
|
94
|
+
private function onResourceSelectorChange(event:ListEvent):void {
|
95
|
+
openResource(<%= class_name.pluralize %>(resourcesSelector.selectedItem));
|
96
|
+
} */
|
97
|
+
}
|
98
|
+
}
|
@@ -0,0 +1,50 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
<mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml"
|
3
|
+
xmlns:iconview="org.integratedsemantics.flexspaces.component.folderview.iconview.*"
|
4
|
+
xmlns:paging="org.integratedsemantics.flexspaces.component.folderview.paging.*"
|
5
|
+
xmlns:url="http://www.allurent.com/2006/urlkit"
|
6
|
+
height="100%" width="100%">
|
7
|
+
|
8
|
+
<!-- URL Stuff _________________________________________________________________ -->
|
9
|
+
|
10
|
+
<url:UrlRuleSet id="urlRules">
|
11
|
+
<url:UrlValueRule urlFormat="/*" sourceValue="folderTileList.itemRenderer.data.title" defaultValue=""/>
|
12
|
+
<url:UrlValueRule urlFormat="/*" sourceValue="currentState" defaultValue="0"/>
|
13
|
+
<url:UrlDelegateRule rule="{urlComponent.urlRules}" />
|
14
|
+
</url:UrlRuleSet>
|
15
|
+
|
16
|
+
<!-- Used to set the current component in the states -->
|
17
|
+
<mx:Object id="urlComponent"/>
|
18
|
+
|
19
|
+
<!-- GUI ______________________________________________________________________ -->
|
20
|
+
|
21
|
+
<paging:Pager id="pager" pageIndex="0" pageSize="{pageSize}" totalPages="{Math.max(Math.ceil(repoFolderCollection.length/pageSize),1)}" dataProvider="{repoFolderCollection}" />
|
22
|
+
|
23
|
+
<mx:VBox verticalGap="0" height="100%" width="100%">
|
24
|
+
|
25
|
+
<mx:TileList id="folderTileList" width="100%" height="100%" columnWidth="125" rowHeight="85"
|
26
|
+
dataProvider="{pager.pageData}" doubleClickEnabled="true"
|
27
|
+
dragEnabled="true" dropEnabled="true" dragMoveEnabled="true" allowMultipleSelection="true">
|
28
|
+
|
29
|
+
<mx:itemRenderer>
|
30
|
+
<mx:Component>
|
31
|
+
<iconview:NodeView nodeName="{data.name}" icon32="{data.icon32}" isLocked="{data.isLocked}" showThumbnail="{data.showThumbnail}" thumbnailUrl="{data.thumbnailUrl}"/>
|
32
|
+
</mx:Component>
|
33
|
+
</mx:itemRenderer>
|
34
|
+
</mx:TileList>
|
35
|
+
|
36
|
+
<mx:HBox horizontalAlign="center" width="100%">
|
37
|
+
<mx:Label text="{resourceManager.getString('FolderIconView', 'pagenumLabel_page')} {pager.pageIndex+1} {resourceManager.getString('FolderIconView', 'pagenumLabel_of')} {pager.totalPages}"
|
38
|
+
color="0xFFFFFF" id="pagenumLabel"/>
|
39
|
+
<mx:Spacer width="4"/>
|
40
|
+
<paging:PagerBar id="pageBar" pager="{pager}" totalPages="{pager.totalPages}"
|
41
|
+
maxVisiblePages="10" buttonWidth="45" buttonMode="true"/>
|
42
|
+
<mx:Spacer width="4"/>
|
43
|
+
<mx:Label text="{resourceManager.getString('FolderIconView', 'itemsPerPageLabel_text')}" color="0xFFFFFF" id="itemsPerPageLabel"/>
|
44
|
+
<mx:Spacer width="4"/>
|
45
|
+
<mx:NumericStepper value="{this.pageSize}" change="this.pageSize = event.target.value" maximum="100" minimum="1" />
|
46
|
+
</mx:HBox>
|
47
|
+
|
48
|
+
</mx:VBox>
|
49
|
+
|
50
|
+
</mx:VBox>
|
@@ -0,0 +1,40 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
<EventMap xmlns="http://mate.asfusion.com/" xmlns:mx="http://www.adobe.com/2006/mxml">
|
3
|
+
|
4
|
+
<mx:Script>
|
5
|
+
<![CDATA[
|
6
|
+
|
7
|
+
import mx.events.FlexEvent;
|
8
|
+
|
9
|
+
import <%= base_package %>.models.constant.URL;
|
10
|
+
|
11
|
+
import <%= base_package %>.views.posts.<%= class_name.pluralize %>Presenter;
|
12
|
+
|
13
|
+
]]>
|
14
|
+
</mx:Script>
|
15
|
+
|
16
|
+
<!-- <Debugger level="{Debugger.ALL}"/> -->
|
17
|
+
|
18
|
+
<!-- Ask the <%= class_name.pluralize %>Presenter, the "NavigationManager/Model" for the <%= class_name.pluralize %>View, to change the Page visually! -->
|
19
|
+
|
20
|
+
<EventHandlers type="{URL.<%= class_name.upcase %>_SHOW}">
|
21
|
+
<MethodInvoker method="goto<%= class_name %>Show" generator="{<%= class_name.pluralize %>Presenter}"
|
22
|
+
arguments="{[event.action, event.resource]}"/>
|
23
|
+
</EventHandlers>
|
24
|
+
|
25
|
+
<EventHandlers type="{URL.<%= class_name.pluralize.upcase %>_INDEX}">
|
26
|
+
<MethodInvoker method="goto<%= class_name %>Index" generator="{<%= class_name.pluralize %>Presenter}"
|
27
|
+
arguments="{[event.action, event.resource]}"/>
|
28
|
+
</EventHandlers>
|
29
|
+
|
30
|
+
<EventHandlers type="{URL.<%= class_name.upcase %>_EDIT_SHOW}">
|
31
|
+
<MethodInvoker method="goto<%= class_name %>EditShow" generator="{<%= class_name.pluralize %>Presenter}"
|
32
|
+
arguments="{[event.action, event.resource]}"/>
|
33
|
+
</EventHandlers>
|
34
|
+
|
35
|
+
<EventHandlers type="{URL.<%= class_name.pluralize.upcase %>_EDIT_INDEX}">
|
36
|
+
<MethodInvoker method="goto<%= class_name %>EditIndex" generator="{<%= class_name.pluralize %>Presenter}"
|
37
|
+
arguments="{[event.action, event.resource]}"/>
|
38
|
+
</EventHandlers>
|
39
|
+
|
40
|
+
</EventMap>
|
@@ -0,0 +1,64 @@
|
|
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
|
+
currentState="editIndex">
|
12
|
+
<mx:Script>
|
13
|
+
<![CDATA[
|
14
|
+
import org.restfulx.Rx;
|
15
|
+
|
16
|
+
<% for model in belongs_tos -%>
|
17
|
+
import <%= base_package %>.models.domain.<%= model.camelcase %>;
|
18
|
+
<% end -%>
|
19
|
+
import <%= base_package %>.models.domain.<%= class_name %>;
|
20
|
+
|
21
|
+
]]>
|
22
|
+
</mx:Script>
|
23
|
+
|
24
|
+
<!-- Presenter and Model________________________________________________________ -->
|
25
|
+
|
26
|
+
<!-- Presenter Wraps the View and Handles Navigation Animations
|
27
|
+
Model allows you to easily call CRUD methods and handle sorting on data -->
|
28
|
+
<mx:Declarations>
|
29
|
+
<presentation:<%= class_name.pluralize %>Model id="model"/>
|
30
|
+
<views:<%= class_name.pluralize %>Presenter id="presenter" view="{this}"/>
|
31
|
+
</mx:Declarations>
|
32
|
+
|
33
|
+
<!-- URL Stuff _________________________________________________________________ -->
|
34
|
+
|
35
|
+
<mx:Declarations>
|
36
|
+
<!-- Used to set the current component in the states -->
|
37
|
+
<mx:Object id="urlComponent"/>
|
38
|
+
|
39
|
+
<url:UrlRuleSet id="urlRules">
|
40
|
+
<url:UrlValueRule urlFormat="/*" sourceValue="currentState" />
|
41
|
+
<url:UrlDelegateRule rule="{urlComponent.urlRules}" />
|
42
|
+
</url:UrlRuleSet>
|
43
|
+
</mx:Declarations>
|
44
|
+
|
45
|
+
<!-- GUI ______________________________________________________________________ -->
|
46
|
+
|
47
|
+
<!-- itemCreationPolicy is set by default to DEFERRED so only components in the current
|
48
|
+
state are added to the stage -->
|
49
|
+
<mx:Canvas width="100%" label="<%= class_name %>" height="100%"
|
50
|
+
verticalScrollPolicy="off" horizontalScrollPolicy="off">
|
51
|
+
<views:<%= class_name.pluralize %>IndexView id="<%= class_name.pluralize.dcfirst %>IndexView"
|
52
|
+
includeIn="index"/>
|
53
|
+
<views:<%= class_name.pluralize %>EditIndexView id="<%= class_name.pluralize.dcfirst %>EditIndexView"
|
54
|
+
includeIn="editIndex"/>
|
55
|
+
</mx:Canvas>
|
56
|
+
|
57
|
+
<!-- States ___________________________________________________________________ -->
|
58
|
+
|
59
|
+
<core:states>
|
60
|
+
<mx:State name="index"/>
|
61
|
+
<mx:State name="editIndex"/>
|
62
|
+
</core:states>
|
63
|
+
|
64
|
+
</core:FourDComponent>
|
@@ -0,0 +1,21 @@
|
|
1
|
+
class EmergentStylerGenerator < Rails::Generator::NamedBase
|
2
|
+
def manifest
|
3
|
+
record do |m|
|
4
|
+
# Ensure appropriate folder(s) exists
|
5
|
+
m.directory 'some_folder'
|
6
|
+
|
7
|
+
# Create stubs
|
8
|
+
# m.template "template.rb", "some_file_after_erb.rb"
|
9
|
+
# m.file "file", "some_file_copied"
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
protected
|
14
|
+
def banner
|
15
|
+
<<-EOS
|
16
|
+
Creates a ...
|
17
|
+
|
18
|
+
USAGE: #{$0} #{spec.name} name
|
19
|
+
EOS
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,51 @@
|
|
1
|
+
Description:
|
2
|
+
Scaffolds an entire application based on db/model.yml file. This generator
|
3
|
+
transforms entries in db/model.yml into command line calls to
|
4
|
+
"rx_scaffold".
|
5
|
+
|
6
|
+
rx_scaffold delegates the underlying rails code generation to "scaffold"
|
7
|
+
and extends it in a number of ways:
|
8
|
+
1. Generates all required Flex code.
|
9
|
+
2. You can pass special belongs_to, has_one and has_many attributes
|
10
|
+
to generate *all* appropriate relationships. No more manual code
|
11
|
+
editing.
|
12
|
+
|
13
|
+
Examples:
|
14
|
+
`./script/generate rx_yaml_scaffold`
|
15
|
+
|
16
|
+
Sample Model File:
|
17
|
+
project:
|
18
|
+
- name: string
|
19
|
+
- notes: text
|
20
|
+
- start_date: date
|
21
|
+
- end_date: date
|
22
|
+
- completed: boolean
|
23
|
+
- belongs_to: [user]
|
24
|
+
- has_many: [tasks]
|
25
|
+
|
26
|
+
location:
|
27
|
+
- name: string
|
28
|
+
- notes: text
|
29
|
+
- belongs_to: [user]
|
30
|
+
- has_many: [tasks]
|
31
|
+
|
32
|
+
task:
|
33
|
+
- name: string
|
34
|
+
- notes: text
|
35
|
+
- start_time: datetime
|
36
|
+
- end_time: datetime
|
37
|
+
- completed: boolean
|
38
|
+
- next_action: boolean
|
39
|
+
- belongs_to: [project, location, user]
|
40
|
+
|
41
|
+
note:
|
42
|
+
- content: text
|
43
|
+
- belongs_to: [user]
|
44
|
+
|
45
|
+
user:
|
46
|
+
- login: string
|
47
|
+
- first_name: string
|
48
|
+
- last_name: string
|
49
|
+
- email: string
|
50
|
+
- has_many: [tasks, projects, locations]
|
51
|
+
- has_one: [note]
|
@@ -0,0 +1,49 @@
|
|
1
|
+
require 'yaml'
|
2
|
+
|
3
|
+
class RxYamlScaffoldGenerator < Rails::Generator::Base
|
4
|
+
def extract_attrs(line, attrs)
|
5
|
+
attrs.each do |key,value|
|
6
|
+
if value.class == Array
|
7
|
+
line << " #{key}:#{value.join(',')}"
|
8
|
+
else
|
9
|
+
line << " #{key}:#{value}"
|
10
|
+
end
|
11
|
+
end
|
12
|
+
line
|
13
|
+
end
|
14
|
+
|
15
|
+
def manifest
|
16
|
+
record do |m|
|
17
|
+
models = YAML.load(File.open(File.join(RAILS_ROOT, 'db/model.yml'), 'r'))
|
18
|
+
models.each do |model|
|
19
|
+
line = ""
|
20
|
+
attrs = model[1]
|
21
|
+
if attrs.class == Array
|
22
|
+
attrs.each do |elm|
|
23
|
+
line = extract_attrs(line, elm)
|
24
|
+
end
|
25
|
+
else
|
26
|
+
line = extract_attrs(line, attrs)
|
27
|
+
end
|
28
|
+
line = model[0].camelcase + " " + line
|
29
|
+
puts 'running: rx_scaffold ' + line
|
30
|
+
Rails::Generator::Scripts::Generate.new.run(["rx_scaffold"] + line.split,
|
31
|
+
:flex_only => options[:flex_only])
|
32
|
+
puts 'done ...'
|
33
|
+
sleep 1
|
34
|
+
end
|
35
|
+
Rails::Generator::Scripts::Generate.new.run(["rx_config"], :main_only => true,
|
36
|
+
:skip_framework => options[:skip_framework])
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
protected
|
41
|
+
def add_options!(opt)
|
42
|
+
opt.separator ''
|
43
|
+
opt.separator 'Options:'
|
44
|
+
opt.on("--flex-only", "Only generate the Flex/AIR files.",
|
45
|
+
"Default: false") { |v| options[:main_only] = v }
|
46
|
+
opt.on("--skip-framework", "Don't fetch the latest framework binary. You'll have to link/build the framework yourself.",
|
47
|
+
"Default: false") { |v| options[:skip_framework] = v }
|
48
|
+
end
|
49
|
+
end
|
data/script/console
ADDED
@@ -0,0 +1,10 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# File: script/console
|
3
|
+
irb = RUBY_PLATFORM =~ /(:?mswin|mingw)/ ? 'irb.bat' : 'irb'
|
4
|
+
|
5
|
+
libs = " -r irb/completion"
|
6
|
+
# Perhaps use a console_lib to store any extra methods I may want available in the cosole
|
7
|
+
# libs << " -r #{File.dirname(__FILE__) + '/../lib/console_lib/console_logger.rb'}"
|
8
|
+
libs << " -r #{File.dirname(__FILE__) + '/../lib/emergent.rb'}"
|
9
|
+
puts "Loading emergent gem"
|
10
|
+
exec "#{irb} #{libs} --simple-prompt"
|
data/script/destroy
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
APP_ROOT = File.expand_path(File.join(File.dirname(__FILE__), '..'))
|
3
|
+
|
4
|
+
begin
|
5
|
+
require 'rubigen'
|
6
|
+
rescue LoadError
|
7
|
+
require 'rubygems'
|
8
|
+
require 'rubigen'
|
9
|
+
end
|
10
|
+
require 'rubigen/scripts/destroy'
|
11
|
+
|
12
|
+
ARGV.shift if ['--help', '-h'].include?(ARGV[0])
|
13
|
+
RubiGen::Base.use_component_sources! [:rubygems, :newgem, :newgem_theme, :test_unit]
|
14
|
+
RubiGen::Scripts::Destroy.new.run(ARGV)
|
data/script/generate
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
APP_ROOT = File.expand_path(File.join(File.dirname(__FILE__), '..'))
|
3
|
+
|
4
|
+
begin
|
5
|
+
require 'rubigen'
|
6
|
+
rescue LoadError
|
7
|
+
require 'rubygems'
|
8
|
+
require 'rubigen'
|
9
|
+
end
|
10
|
+
require 'rubigen/scripts/generate'
|
11
|
+
|
12
|
+
ARGV.shift if ['--help', '-h'].include?(ARGV[0])
|
13
|
+
RubiGen::Base.use_component_sources! [:rubygems, :newgem, :newgem_theme, :test_unit]
|
14
|
+
RubiGen::Scripts::Generate.new.run(ARGV)
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
|
2
|
+
require File.expand_path(
|
3
|
+
File.join(File.dirname(__FILE__), %w[.. lib emergent_core]))
|
4
|
+
|
5
|
+
Spec::Runner.configure do |config|
|
6
|
+
# == Mock Framework
|
7
|
+
#
|
8
|
+
# RSpec uses it's own mocking framework by default. If you prefer to
|
9
|
+
# use mocha, flexmock or RR, uncomment the appropriate line:
|
10
|
+
#
|
11
|
+
# config.mock_with :mocha
|
12
|
+
# config.mock_with :flexmock
|
13
|
+
# config.mock_with :rr
|
14
|
+
end
|
15
|
+
|
16
|
+
# EOF
|
data/tasks/ann.rake
ADDED
@@ -0,0 +1,80 @@
|
|
1
|
+
|
2
|
+
begin
|
3
|
+
require 'bones/smtp_tls'
|
4
|
+
rescue LoadError
|
5
|
+
require 'net/smtp'
|
6
|
+
end
|
7
|
+
require 'time'
|
8
|
+
|
9
|
+
namespace :ann do
|
10
|
+
|
11
|
+
# A prerequisites task that all other tasks depend upon
|
12
|
+
task :prereqs
|
13
|
+
|
14
|
+
file PROJ.ann.file do
|
15
|
+
ann = PROJ.ann
|
16
|
+
puts "Generating #{ann.file}"
|
17
|
+
File.open(ann.file,'w') do |fd|
|
18
|
+
fd.puts("#{PROJ.name} version #{PROJ.version}")
|
19
|
+
fd.puts(" by #{Array(PROJ.authors).first}") if PROJ.authors
|
20
|
+
fd.puts(" #{PROJ.url}") if PROJ.url.valid?
|
21
|
+
fd.puts(" (the \"#{PROJ.release_name}\" release)") if PROJ.release_name
|
22
|
+
fd.puts
|
23
|
+
fd.puts("== DESCRIPTION")
|
24
|
+
fd.puts
|
25
|
+
fd.puts(PROJ.description)
|
26
|
+
fd.puts
|
27
|
+
fd.puts(PROJ.changes.sub(%r/^.*$/, '== CHANGES'))
|
28
|
+
fd.puts
|
29
|
+
ann.paragraphs.each do |p|
|
30
|
+
fd.puts "== #{p.upcase}"
|
31
|
+
fd.puts
|
32
|
+
fd.puts paragraphs_of(PROJ.readme_file, p).join("\n\n")
|
33
|
+
fd.puts
|
34
|
+
end
|
35
|
+
fd.puts ann.text if ann.text
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
desc "Create an announcement file"
|
40
|
+
task :announcement => ['ann:prereqs', PROJ.ann.file]
|
41
|
+
|
42
|
+
desc "Send an email announcement"
|
43
|
+
task :email => ['ann:prereqs', PROJ.ann.file] do
|
44
|
+
ann = PROJ.ann
|
45
|
+
from = ann.email[:from] || Array(PROJ.authors).first || PROJ.email
|
46
|
+
to = Array(ann.email[:to])
|
47
|
+
|
48
|
+
### build a mail header for RFC 822
|
49
|
+
rfc822msg = "From: #{from}\n"
|
50
|
+
rfc822msg << "To: #{to.join(',')}\n"
|
51
|
+
rfc822msg << "Subject: [ANN] #{PROJ.name} #{PROJ.version}"
|
52
|
+
rfc822msg << " (#{PROJ.release_name})" if PROJ.release_name
|
53
|
+
rfc822msg << "\n"
|
54
|
+
rfc822msg << "Date: #{Time.new.rfc822}\n"
|
55
|
+
rfc822msg << "Message-Id: "
|
56
|
+
rfc822msg << "<#{"%.8f" % Time.now.to_f}@#{ann.email[:domain]}>\n\n"
|
57
|
+
rfc822msg << File.read(ann.file)
|
58
|
+
|
59
|
+
params = [:server, :port, :domain, :acct, :passwd, :authtype].map do |key|
|
60
|
+
ann.email[key]
|
61
|
+
end
|
62
|
+
|
63
|
+
params[3] = PROJ.email if params[3].nil?
|
64
|
+
|
65
|
+
if params[4].nil?
|
66
|
+
STDOUT.write "Please enter your e-mail password (#{params[3]}): "
|
67
|
+
params[4] = STDIN.gets.chomp
|
68
|
+
end
|
69
|
+
|
70
|
+
### send email
|
71
|
+
Net::SMTP.start(*params) {|smtp| smtp.sendmail(rfc822msg, from, to)}
|
72
|
+
end
|
73
|
+
end # namespace :ann
|
74
|
+
|
75
|
+
desc 'Alias to ann:announcement'
|
76
|
+
task :ann => 'ann:announcement'
|
77
|
+
|
78
|
+
CLOBBER << PROJ.ann.file
|
79
|
+
|
80
|
+
# EOF
|
data/tasks/bones.rake
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
|
2
|
+
if HAVE_BONES
|
3
|
+
|
4
|
+
namespace :bones do
|
5
|
+
|
6
|
+
desc 'Show the PROJ open struct'
|
7
|
+
task :debug do |t|
|
8
|
+
atr = if t.application.top_level_tasks.length == 2
|
9
|
+
t.application.top_level_tasks.pop
|
10
|
+
end
|
11
|
+
|
12
|
+
if atr then Bones::Debug.show_attr(PROJ, atr)
|
13
|
+
else Bones::Debug.show PROJ end
|
14
|
+
end
|
15
|
+
|
16
|
+
end # namespace :bones
|
17
|
+
|
18
|
+
end # HAVE_BONES
|
19
|
+
|
20
|
+
# EOF
|