noodall-components-promo-driver 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/MIT-LICENSE +20 -0
- data/README.markdown +27 -0
- data/Rakefile +37 -0
- data/app/models/promo_driver.rb +7 -0
- data/app/views/admin/components/_promo_driver.html.erb +28 -0
- data/app/views/components/_promo_driver.html.erb +7 -0
- data/config/routes.rb +2 -0
- data/lib/noodall-components-promo-driver.rb +4 -0
- data/lib/noodall-components-promo-driver/engine.rb +4 -0
- data/lib/noodall-components-promo-driver/version.rb +3 -0
- data/lib/tasks/cucumber.rake +65 -0
- data/lib/tasks/noodall-components-promo-driver_tasks.rake +4 -0
- data/test/dummy/Rakefile +7 -0
- data/test/dummy/app/assets/javascripts/application.js +9 -0
- data/test/dummy/app/assets/stylesheets/application.css +7 -0
- data/test/dummy/app/controllers/application_controller.rb +26 -0
- data/test/dummy/app/helpers/application_helper.rb +2 -0
- data/test/dummy/app/models/content_page.rb +8 -0
- data/test/dummy/app/models/user.rb +20 -0
- data/test/dummy/app/views/admin/nodes/_content_page.html.erb +45 -0
- data/test/dummy/app/views/layouts/application.html.erb +14 -0
- data/test/dummy/app/views/nodes/content_page.html.erb +5 -0
- data/test/dummy/config.ru +4 -0
- data/test/dummy/config/application.rb +51 -0
- data/test/dummy/config/boot.rb +10 -0
- data/test/dummy/config/environment.rb +5 -0
- data/test/dummy/config/environments/development.rb +30 -0
- data/test/dummy/config/environments/production.rb +60 -0
- data/test/dummy/config/environments/test.rb +39 -0
- data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/test/dummy/config/initializers/inflections.rb +10 -0
- data/test/dummy/config/initializers/mime_types.rb +5 -0
- data/test/dummy/config/initializers/noodall.rb +1 -0
- data/test/dummy/config/initializers/noodall_dragonfly.rb +8 -0
- data/test/dummy/config/initializers/secret_token.rb +7 -0
- data/test/dummy/config/initializers/session_store.rb +8 -0
- data/test/dummy/config/initializers/wrap_parameters.rb +10 -0
- data/test/dummy/config/locales/en.yml +5 -0
- data/test/dummy/config/mongo.yml +6 -0
- data/test/dummy/config/routes.rb +3 -0
- data/test/dummy/log/development.log +293 -0
- data/test/dummy/log/test.log +9350 -0
- data/test/dummy/public/404.html +26 -0
- data/test/dummy/public/422.html +26 -0
- data/test/dummy/public/500.html +26 -0
- data/test/dummy/public/favicon.ico +0 -0
- data/test/dummy/script/rails +6 -0
- data/test/dummy/tmp/cache/762/0A0/global_update_time +0 -0
- data/test/dummy/tmp/cache/assets/BE2/E60/sprockets%2F55067f311d087315e03077331d26e028 +0 -0
- data/test/dummy/tmp/cache/assets/C2D/C10/sprockets%2F87e8130740670602c57c54e49b83b894 +0 -0
- data/test/dummy/tmp/cache/assets/C3F/100/sprockets%2F2845142267d156034f45dba24bf32361 +0 -0
- data/test/dummy/tmp/cache/assets/C5A/5B0/sprockets%2F86125dc29915450b318756f64f20fd48 +0 -0
- data/test/dummy/tmp/cache/assets/C5E/130/sprockets%2F8991438883398e1a58219e4e51a30a4d +0 -0
- data/test/dummy/tmp/cache/assets/C65/790/sprockets%2Fd75630d87598dfb21776752319ba4927 +0 -0
- data/test/dummy/tmp/cache/assets/C68/230/sprockets%2F571229842c227999b6075f80fca884c8 +0 -0
- data/test/dummy/tmp/cache/assets/C6C/F20/sprockets%2F1837b772135524a80a0bb625a0de5742 +0 -0
- data/test/dummy/tmp/cache/assets/C76/2B0/sprockets%2F126cf6572926c982003162a19bdc13d5 +0 -0
- data/test/dummy/tmp/cache/assets/C77/130/sprockets%2F537589ec48406e3f388e706b5838769e +0 -0
- data/test/dummy/tmp/cache/assets/C7A/B90/sprockets%2F71c342132990e5b748d66b0553e0db27 +0 -0
- data/test/dummy/tmp/cache/assets/C96/C90/sprockets%2Fc5eb703a4001697530b7c23ac60810c6 +0 -0
- data/test/dummy/tmp/cache/assets/C97/B70/sprockets%2F6519957ddbd2767673bb95d606a61199 +0 -0
- data/test/dummy/tmp/cache/assets/C9A/0D0/sprockets%2F3b9159503e398e28f97b2974124fee57 +0 -0
- data/test/dummy/tmp/cache/assets/CA6/410/sprockets%2Fef8388dbe78e008986058725958190ef +0 -0
- data/test/dummy/tmp/cache/assets/CA8/F30/sprockets%2F6f04d767584667678b8f3e3fc9855a47 +0 -0
- data/test/dummy/tmp/cache/assets/CB1/6B0/sprockets%2F58efc71823f91325c05c8c42360960dc +0 -0
- data/test/dummy/tmp/cache/assets/CB1/730/sprockets%2F152a8a1114c77f39711d71689d7ec0d6 +0 -0
- data/test/dummy/tmp/cache/assets/CB3/740/sprockets%2Ffce48424be53115c14f227447db59863 +0 -0
- data/test/dummy/tmp/cache/assets/CB5/A70/sprockets%2F0350e8850873563a761f6dc5ded259c0 +0 -0
- data/test/dummy/tmp/cache/assets/CB8/830/sprockets%2F6d15d61315fa8568fa39d2c027a88916 +0 -0
- data/test/dummy/tmp/cache/assets/CCE/3D0/sprockets%2F790d32893a0b316ba466de51a222b34f +0 -0
- data/test/dummy/tmp/cache/assets/CD0/580/sprockets%2F70e413ba305520aa8c87548ac9651ce0 +0 -0
- data/test/dummy/tmp/cache/assets/CD5/FC0/sprockets%2F7f9cf004d2c80c6a63f2a94424c80340 +0 -0
- data/test/dummy/tmp/cache/assets/CD8/1F0/sprockets%2F90adc2b942bb96301b006f4354cf4598 +0 -0
- data/test/dummy/tmp/cache/assets/CD8/230/sprockets%2F3141ad3b37277e826ea29a4b115b96a9 +0 -0
- data/test/dummy/tmp/cache/assets/CDB/5D0/sprockets%2F300fd5a8253e6414d944d55b511f57fb +0 -0
- data/test/dummy/tmp/cache/assets/CDD/4A0/sprockets%2Ff2aca751685ee25d084b4ad330386593 +0 -0
- data/test/dummy/tmp/cache/assets/CDE/B50/sprockets%2F12892380f66b91104aae8c7bed18c716 +0 -0
- data/test/dummy/tmp/cache/assets/CDE/C30/sprockets%2Fb78528091c8ccc26f0111f07edf43079 +0 -0
- data/test/dummy/tmp/cache/assets/CE0/DA0/sprockets%2Fc5c93f348f53070f72ec86a0a4115f92 +0 -0
- data/test/dummy/tmp/cache/assets/CE8/F60/sprockets%2F2647e608a8c7d0d3282fe73d87321f5c +0 -0
- data/test/dummy/tmp/cache/assets/CE9/F90/sprockets%2F8d761696d5863c95abbf121b934ba843 +0 -0
- data/test/dummy/tmp/cache/assets/CEB/6F0/sprockets%2F8a9c046477aa5d6f52530628e8c5b86c +0 -0
- data/test/dummy/tmp/cache/assets/CEB/D60/sprockets%2F41b4deec96f01c9d219f791537383f34 +0 -0
- data/test/dummy/tmp/cache/assets/D02/5F0/sprockets%2F17be013f2e6b97d2085bd1e7232c135e +0 -0
- data/test/dummy/tmp/cache/assets/D06/330/sprockets%2F82f4b6bc86eb65234f1bc3611830b28b +0 -0
- data/test/dummy/tmp/cache/assets/D06/B50/sprockets%2Faff6355b6185736a000e1d15a518bfc9 +0 -0
- data/test/dummy/tmp/cache/assets/D07/CD0/sprockets%2F3c82a0061453786ad9da45970aaa4c9c +0 -0
- data/test/dummy/tmp/cache/assets/D09/920/sprockets%2F3646b0380d85365375dbd4e0b2f65bda +0 -0
- data/test/dummy/tmp/cache/assets/D09/BF0/sprockets%2F6f9e9a504c4216920c0b54c6c29ec4b2 +0 -0
- data/test/dummy/tmp/cache/assets/D0B/1A0/sprockets%2F9a63863ffbd86fbe042341155b24af06 +0 -0
- data/test/dummy/tmp/cache/assets/D0D/810/sprockets%2F957e06ca106e2c986f4c7215ed3a33d2 +0 -0
- data/test/dummy/tmp/cache/assets/D0F/AB0/sprockets%2Fe198de4b6ce18589140c11ca882f16c0 +0 -0
- data/test/dummy/tmp/cache/assets/D11/620/sprockets%2Ff592c2f0d3cbed11838d7524d64515b9 +0 -0
- data/test/dummy/tmp/cache/assets/D14/5F0/sprockets%2F1df9d9d3d1d7cc56a756226cb1062929 +0 -0
- data/test/dummy/tmp/cache/assets/D15/5A0/sprockets%2F7e27de352863addc1a359457e19c85b0 +0 -0
- data/test/dummy/tmp/cache/assets/D16/CB0/sprockets%2Fba4a4b9e0237cc07286fc9250f29489f +0 -0
- data/test/dummy/tmp/cache/assets/D17/220/sprockets%2Fc8a2974b2d3682a77144c282b7f9bef2 +0 -0
- data/test/dummy/tmp/cache/assets/D17/9E0/sprockets%2F160797c75a54422aed0ca864cee69d75 +0 -0
- data/test/dummy/tmp/cache/assets/D19/BA0/sprockets%2Ff927fe2855f7548278c3920ff21a0cab +0 -0
- data/test/dummy/tmp/cache/assets/D1B/590/sprockets%2Fb9d9d8891dd93182d53445065ec4ca0f +0 -0
- data/test/dummy/tmp/cache/assets/D1C/8B0/sprockets%2F6030883a75c8e4e950cf186a5a8e5bd9 +0 -0
- data/test/dummy/tmp/cache/assets/D1C/DF0/sprockets%2Fea7d61316225703ff1c9f897e69e1d1e +0 -0
- data/test/dummy/tmp/cache/assets/D1F/4F0/sprockets%2F009f7a6d835fda9ee4b37079c6490f80 +0 -0
- data/test/dummy/tmp/cache/assets/D23/690/sprockets%2Fcc680ab39854d539ce3ea16f829f9293 +0 -0
- data/test/dummy/tmp/cache/assets/D27/590/sprockets%2F2644fb3aa8b69005305c617b2f1ba0fc +0 -0
- data/test/dummy/tmp/cache/assets/D27/7D0/sprockets%2F0ec18603d92ab7ca45bf3ee3300760a2 +0 -0
- data/test/dummy/tmp/cache/assets/D2D/3E0/sprockets%2Fe6ea912977905c7ee5b866f9bd6e3166 +0 -0
- data/test/dummy/tmp/cache/assets/D32/A10/sprockets%2F13fe41fee1fe35b49d145bcc06610705 +0 -0
- data/test/dummy/tmp/cache/assets/D40/930/sprockets%2Fd5feaba5b454861d8d116d1a7782365e +0 -0
- data/test/dummy/tmp/cache/assets/D42/6C0/sprockets%2F0be91130150ca8c4b0bc551bba0b329a +0 -0
- data/test/dummy/tmp/cache/assets/D47/A30/sprockets%2Fa0b61151c676eb8f99f21db5aaa96887 +0 -0
- data/test/dummy/tmp/cache/assets/D48/BA0/sprockets%2F554eeae52375d4364fdb06d28e389a5d +0 -0
- data/test/dummy/tmp/cache/assets/D49/3B0/sprockets%2Fc72d397fef920408ea05cf2c817807fd +0 -0
- data/test/dummy/tmp/cache/assets/D4B/6A0/sprockets%2Fd5ef7de762d483790803d5ea92ccb543 +0 -0
- data/test/dummy/tmp/cache/assets/D4C/350/sprockets%2Fb3f1c16b7eee7839802cbe5566fd2593 +0 -0
- data/test/dummy/tmp/cache/assets/D50/D20/sprockets%2F98b742787a1d1be39cfc2de64c8690e4 +0 -0
- data/test/dummy/tmp/cache/assets/D52/DA0/sprockets%2Fcaf9c75a6f076be650f04098f789a7a6 +0 -0
- data/test/dummy/tmp/cache/assets/D54/ED0/sprockets%2F71c9fa01091d432b131da3bb73faf3d4 +0 -0
- data/test/dummy/tmp/cache/assets/D57/9B0/sprockets%2Fc7d468d1c7555ced6f5f59c4d464814f +0 -0
- data/test/dummy/tmp/cache/assets/D5A/250/sprockets%2F5874bd6557c828efc5b91684d2d8dbd7 +0 -0
- data/test/dummy/tmp/cache/assets/D5B/E00/sprockets%2F1fe5a153e3faf713f11b3796f2cb1a20 +0 -0
- data/test/dummy/tmp/cache/assets/D5E/750/sprockets%2F848e1dc8fc0158e6aaa415732da11a5a +0 -0
- data/test/dummy/tmp/cache/assets/D60/940/sprockets%2Fb8238a1c204ec5ec14badf352c71369d +0 -0
- data/test/dummy/tmp/cache/assets/D61/880/sprockets%2F2fe14eb0aca562625edd9134a7356ec1 +0 -0
- data/test/dummy/tmp/cache/assets/D66/B80/sprockets%2F41bd17c8023ac91e6c164d5f735dc5db +0 -0
- data/test/dummy/tmp/cache/assets/D68/AE0/sprockets%2Fb0f73a7b2af62847f3afef98b002035d +0 -0
- data/test/dummy/tmp/cache/assets/D69/0C0/sprockets%2Fa5ad46dd4be6762f4ac6f0315583fd21 +0 -0
- data/test/dummy/tmp/cache/assets/D6A/1E0/sprockets%2F84a8d98bad85de10b5042f0cd0c73e55 +0 -0
- data/test/dummy/tmp/cache/assets/D6D/0C0/sprockets%2F581b0b7046dfcd26d8bb023a764fb9e8 +0 -0
- data/test/dummy/tmp/cache/assets/D6D/EF0/sprockets%2F8e71c1e48f3fbc6047a411ad954dd64b +0 -0
- data/test/dummy/tmp/cache/assets/D73/850/sprockets%2Fe4203af670fbd18c907ffdd2496b465c +0 -0
- data/test/dummy/tmp/cache/assets/D77/B00/sprockets%2F5f1d949ed01fc11d0d55c994f517e7cc +0 -0
- data/test/dummy/tmp/cache/assets/D78/D40/sprockets%2F964edd2750dc5a5cd08681dddcf08980 +0 -0
- data/test/dummy/tmp/cache/assets/D7A/690/sprockets%2F559ce9dd89cd16e5aac3a0a44958a358 +0 -0
- data/test/dummy/tmp/cache/assets/D7C/140/sprockets%2F8687b050c1ef291d64ebf9d66714eeaf +0 -0
- data/test/dummy/tmp/cache/assets/D84/1B0/sprockets%2F6fafa981bed589f7772431cf9c34a91e +0 -0
- data/test/dummy/tmp/cache/assets/D84/210/sprockets%2Fabd0103ccec2b428ac62c94e4c40b384 +0 -0
- data/test/dummy/tmp/cache/assets/D85/1D0/sprockets%2F66fde86ccbc44f3c5b90a6424f8c4999 +0 -0
- data/test/dummy/tmp/cache/assets/D85/AD0/sprockets%2F6d97dbe78d01f72385928e8b54fbfcb3 +0 -0
- data/test/dummy/tmp/cache/assets/D85/BE0/sprockets%2Ffd99e09cceca14e956c16c05b9e67829 +0 -0
- data/test/dummy/tmp/cache/assets/D91/DA0/sprockets%2Fdf69fd1bfa3c7b863e435ab799779e78 +0 -0
- data/test/dummy/tmp/cache/assets/D9A/7A0/sprockets%2Fe30eea2c5d45e0fe5f7410a87c77c17a +0 -0
- data/test/dummy/tmp/cache/assets/D9B/C80/sprockets%2F045c1571fff5d9e29eab1a2e4533ecd5 +0 -0
- data/test/dummy/tmp/cache/assets/D9C/EE0/sprockets%2Fb169ffcd08484fa3037d1aa2268bdce8 +0 -0
- data/test/dummy/tmp/cache/assets/DA2/C00/sprockets%2F7fb05640479f729fda613baacfb3d7f4 +0 -0
- data/test/dummy/tmp/cache/assets/DA5/DC0/sprockets%2F5b2e91d47f333eda09c6a4793dd5fcd5 +0 -0
- data/test/dummy/tmp/cache/assets/DA6/FE0/sprockets%2Fd9ae81c1ae878a8f4f229a821ae2dc48 +0 -0
- data/test/dummy/tmp/cache/assets/DAB/D60/sprockets%2Ff75d62f9315ad483c7c3eddf465be7a4 +0 -0
- data/test/dummy/tmp/cache/assets/DB8/490/sprockets%2F0bd6d0b4f0976b866f82ddef96f7ae78 +0 -0
- data/test/dummy/tmp/cache/assets/DBF/0C0/sprockets%2F122c5b8dc9c5e2e32bc3c919da52a4bb +0 -0
- data/test/dummy/tmp/cache/assets/DC8/5A0/sprockets%2F741fb85aaa41ddd6626c7c6ae3e73ad3 +0 -0
- data/test/dummy/tmp/cache/assets/DC9/650/sprockets%2Fb3a862a9eb5f7552b5bafd62de350ce3 +0 -0
- data/test/dummy/tmp/cache/assets/DCA/3D0/sprockets%2F09e2ea7525cb06cfbadfe058b5c733f5 +0 -0
- data/test/dummy/tmp/cache/assets/DCC/620/sprockets%2F53b8e8a5f475e4b7bc9ce3ac50c1e15b +0 -0
- data/test/dummy/tmp/cache/assets/DCD/E20/sprockets%2F6646a1b31978fee6a4040abdd7dcbff5 +0 -0
- data/test/dummy/tmp/cache/assets/DF1/490/sprockets%2Fac06524de92ef1dbdaa3471ecd3a663f +0 -0
- data/test/dummy/tmp/cache/assets/DF2/F90/sprockets%2F0ed1cae186572728a5c7af6bb7abcba4 +0 -0
- data/test/dummy/tmp/cache/assets/DFA/160/sprockets%2Fe5f1dcbe7b61a2eb143837f54bebd6d5 +0 -0
- data/test/dummy/tmp/cache/assets/E01/DF0/sprockets%2F7deb50e8de167fdd3338603c5ecabc7e +0 -0
- data/test/dummy/tmp/cache/assets/E04/890/sprockets%2F2f5173deea6c795b8fdde723bb4b63af +0 -0
- data/test/dummy/tmp/cache/assets/E06/1E0/sprockets%2Fcf4856bcddc8af06d5f1ee6a7b79d070 +0 -0
- data/test/dummy/tmp/cache/assets/E0A/730/sprockets%2Fbddaa7d4f07e6967cda47773abe9e4f1 +0 -0
- data/test/dummy/tmp/cache/assets/E10/AD0/sprockets%2Fcb5c5f3f84dfcf4a88bf557d0c848fb3 +0 -0
- data/test/dummy/tmp/cache/assets/E11/050/sprockets%2Ff5b2a6d9507ecefaf4af97a9f83a933f +0 -0
- data/test/dummy/tmp/cache/assets/E25/250/sprockets%2Fdd2c5faa7a0ccdfd53d8c7e84f02a623 +0 -0
- data/test/dummy/tmp/cache/assets/E28/660/sprockets%2Fadeea7d95a7e4772a4b5ac83cfc04cb2 +0 -0
- data/test/dummy/tmp/cache/assets/E3B/560/sprockets%2F58b59d9bfe3dcb9c3c1ad82d7feef216 +0 -0
- data/test/dummy/tmp/cache/assets/E58/720/sprockets%2F61efb8aa1ee84d2cccbde181c2ce199c +0 -0
- data/test/dummy/tmp/cache/assets/E6A/A90/sprockets%2Fcbb9a5c1bbee15ed877edf938c93ea7b +0 -0
- data/test/dummy/tmp/cache/assets/E76/7F0/sprockets%2Ffcad2b18a8cbd8ea73f27a2a04cf0aac +0 -0
- data/test/dummy/tmp/capybara/capybara-201112021714515675347267.html +22 -0
- data/test/dummy/tmp/capybara/capybara-201112021718075169183561.html +13 -0
- data/test/dummy/tmp/capybara/capybara-201112021720067651889246.html +24 -0
- data/test/dummy/tmp/capybara/capybara-201112021724179814196096.html +584 -0
- data/test/dummy/tmp/capybara/capybara-201112021732073144849648.html +15 -0
- data/test/dummy/tmp/capybara/capybara-201112021733381531617462.html +584 -0
- data/test/dummy/tmp/capybara/capybara-201112021737011978469071.html +25 -0
- metadata +415 -0
data/MIT-LICENSE
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright 2012 Steve England
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.markdown
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
# Noodall Promo Driver Component
|
2
|
+
|
3
|
+
A simple "Promo Driver" component for Noodall.
|
4
|
+
|
5
|
+
A "Promo Driver" consists of an image, a link and and link title.
|
6
|
+
|
7
|
+
## Install
|
8
|
+
|
9
|
+
Add to your `Gemfile`
|
10
|
+
|
11
|
+
gem 'noodall-components-promo-driver', :git => 'git@github.com:noodall/noodall-components-promo-driver.git'
|
12
|
+
|
13
|
+
Run `bundle install`
|
14
|
+
|
15
|
+
bundle install
|
16
|
+
|
17
|
+
## Configuration
|
18
|
+
|
19
|
+
Noodall Promo Driver adds a `PromoDriver` component. Add it to your slots.
|
20
|
+
|
21
|
+
In `config/initializers/noodall.rb`
|
22
|
+
|
23
|
+
Noodall::Node.slot :large, PromoDriver
|
24
|
+
Noodall::Node.slot :small, PromoDriver
|
25
|
+
|
26
|
+
You can now add `PromoDriver` components to your Nodes.
|
27
|
+
|
data/Rakefile
ADDED
@@ -0,0 +1,37 @@
|
|
1
|
+
#!/usr/bin/env rake
|
2
|
+
begin
|
3
|
+
require 'bundler/setup'
|
4
|
+
rescue LoadError
|
5
|
+
puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
|
6
|
+
end
|
7
|
+
begin
|
8
|
+
require 'rdoc/task'
|
9
|
+
rescue LoadError
|
10
|
+
require 'rdoc/rdoc'
|
11
|
+
require 'rake/rdoctask'
|
12
|
+
RDoc::Task = Rake::RDocTask
|
13
|
+
end
|
14
|
+
|
15
|
+
RDoc::Task.new(:rdoc) do |rdoc|
|
16
|
+
rdoc.rdoc_dir = 'rdoc'
|
17
|
+
rdoc.title = 'NoodallComponentsPromoDriver'
|
18
|
+
rdoc.options << '--line-numbers'
|
19
|
+
rdoc.rdoc_files.include('README.rdoc')
|
20
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
21
|
+
end
|
22
|
+
|
23
|
+
|
24
|
+
|
25
|
+
Bundler::GemHelper.install_tasks
|
26
|
+
|
27
|
+
require 'rake/testtask'
|
28
|
+
|
29
|
+
Rake::TestTask.new(:test) do |t|
|
30
|
+
t.libs << 'lib'
|
31
|
+
t.libs << 'test'
|
32
|
+
t.pattern = 'test/**/*_test.rb'
|
33
|
+
t.verbose = false
|
34
|
+
end
|
35
|
+
|
36
|
+
|
37
|
+
task :default => :test
|
@@ -0,0 +1,28 @@
|
|
1
|
+
<%= fields_for :node do |f| %>
|
2
|
+
<%= f.fields_for slot_name, component do |f| %>
|
3
|
+
<%= f.hidden_field :_type %>
|
4
|
+
<%= error_messages_for :object => component %>
|
5
|
+
|
6
|
+
<p class="file-selectable">
|
7
|
+
<% unless component.asset.nil? %>
|
8
|
+
<span class="file-detail"><%= component.asset.image? ? image_tag( component.asset.url('70x70#', :jpg) ) : asset_icon(component.asset) %></span>
|
9
|
+
<% end -%>
|
10
|
+
<span class="select-file" data-file-types="images">Select File</span>
|
11
|
+
<%= f.hidden_field :asset_id, :class => "asset_id" %>
|
12
|
+
</p>
|
13
|
+
|
14
|
+
<p>
|
15
|
+
<%= f.label :link %><br />
|
16
|
+
<span class="input-wrap">
|
17
|
+
<%= f.text_field :link %><br/>
|
18
|
+
<span class="link-node">Content</span> |
|
19
|
+
<span class="link-asset">Asset</span>
|
20
|
+
</span>
|
21
|
+
</p>
|
22
|
+
<p>
|
23
|
+
<%= f.label :link_label %><br />
|
24
|
+
<span class="input-wrap"><%= f.text_field :link_label %></span>
|
25
|
+
</p>
|
26
|
+
|
27
|
+
<% end
|
28
|
+
end %>
|
@@ -0,0 +1,7 @@
|
|
1
|
+
<div id="<%= slot_code %>" class="component promo-driver <%= 'double' if expand %> <%= additional_classes %>">
|
2
|
+
<% unless component.asset.nil? %>
|
3
|
+
<%= link_to(component.link) do %>
|
4
|
+
<%= image_tag(component.asset.url('200x108#', component.asset.web_image_extension), alt: component.link_label) %>
|
5
|
+
<% end %>
|
6
|
+
<% end %>
|
7
|
+
</div>
|
data/config/routes.rb
ADDED
@@ -0,0 +1,65 @@
|
|
1
|
+
# IMPORTANT: This file is generated by cucumber-rails - edit at your own peril.
|
2
|
+
# It is recommended to regenerate this file in the future when you upgrade to a
|
3
|
+
# newer version of cucumber-rails. Consider adding your own code to a new file
|
4
|
+
# instead of editing this one. Cucumber will automatically load all features/**/*.rb
|
5
|
+
# files.
|
6
|
+
|
7
|
+
|
8
|
+
unless ARGV.any? {|a| a =~ /^gems/} # Don't load anything when running the gems:* tasks
|
9
|
+
|
10
|
+
vendored_cucumber_bin = Dir["#{Rails.root}/vendor/{gems,plugins}/cucumber*/bin/cucumber"].first
|
11
|
+
$LOAD_PATH.unshift(File.dirname(vendored_cucumber_bin) + '/../lib') unless vendored_cucumber_bin.nil?
|
12
|
+
|
13
|
+
begin
|
14
|
+
require 'cucumber/rake/task'
|
15
|
+
|
16
|
+
namespace :cucumber do
|
17
|
+
Cucumber::Rake::Task.new({:ok => 'db:test:prepare'}, 'Run features that should pass') do |t|
|
18
|
+
t.binary = vendored_cucumber_bin # If nil, the gem's binary is used.
|
19
|
+
t.fork = true # You may get faster startup if you set this to false
|
20
|
+
t.profile = 'default'
|
21
|
+
end
|
22
|
+
|
23
|
+
Cucumber::Rake::Task.new({:wip => 'db:test:prepare'}, 'Run features that are being worked on') do |t|
|
24
|
+
t.binary = vendored_cucumber_bin
|
25
|
+
t.fork = true # You may get faster startup if you set this to false
|
26
|
+
t.profile = 'wip'
|
27
|
+
end
|
28
|
+
|
29
|
+
Cucumber::Rake::Task.new({:rerun => 'db:test:prepare'}, 'Record failing features and run only them if any exist') do |t|
|
30
|
+
t.binary = vendored_cucumber_bin
|
31
|
+
t.fork = true # You may get faster startup if you set this to false
|
32
|
+
t.profile = 'rerun'
|
33
|
+
end
|
34
|
+
|
35
|
+
desc 'Run all features'
|
36
|
+
task :all => [:ok, :wip]
|
37
|
+
|
38
|
+
task :statsetup do
|
39
|
+
require 'rails/code_statistics'
|
40
|
+
::STATS_DIRECTORIES << %w(Cucumber\ features features) if File.exist?('features')
|
41
|
+
::CodeStatistics::TEST_TYPES << "Cucumber features" if File.exist?('features')
|
42
|
+
end
|
43
|
+
end
|
44
|
+
desc 'Alias for cucumber:ok'
|
45
|
+
task :cucumber => 'cucumber:ok'
|
46
|
+
|
47
|
+
task :default => :cucumber
|
48
|
+
|
49
|
+
task :features => :cucumber do
|
50
|
+
STDERR.puts "*** The 'features' task is deprecated. See rake -T cucumber ***"
|
51
|
+
end
|
52
|
+
|
53
|
+
# In case we don't have ActiveRecord, append a no-op task that we can depend upon.
|
54
|
+
task 'db:test:prepare' do
|
55
|
+
end
|
56
|
+
|
57
|
+
task :stats => 'cucumber:statsetup'
|
58
|
+
rescue LoadError
|
59
|
+
desc 'cucumber rake task not available (cucumber not installed)'
|
60
|
+
task :cucumber do
|
61
|
+
abort 'Cucumber rake task is not available. Be sure to install cucumber as a gem or plugin'
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
end
|
data/test/dummy/Rakefile
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
#!/usr/bin/env rake
|
2
|
+
# Add your own tasks in files placed in lib/tasks ending in .rake,
|
3
|
+
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
|
4
|
+
|
5
|
+
require File.expand_path('../config/application', __FILE__)
|
6
|
+
|
7
|
+
Dummy::Application.load_tasks
|
@@ -0,0 +1,9 @@
|
|
1
|
+
// This is a manifest file that'll be compiled into including all the files listed below.
|
2
|
+
// Add new JavaScript/Coffee code in separate files in this directory and they'll automatically
|
3
|
+
// be included in the compiled file accessible from http://example.com/assets/application.js
|
4
|
+
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
|
5
|
+
// the compiled file.
|
6
|
+
//
|
7
|
+
//= require jquery
|
8
|
+
//= require jquery_ujs
|
9
|
+
//= require_tree .
|
@@ -0,0 +1,7 @@
|
|
1
|
+
/*
|
2
|
+
* This is a manifest file that'll automatically include all the stylesheets available in this directory
|
3
|
+
* and any sub-directories. You're free to add application-wide styles to this file and they'll appear at
|
4
|
+
* the top of the compiled file, but it's generally better to create a new file per style scope.
|
5
|
+
*= require_self
|
6
|
+
*= require_tree .
|
7
|
+
*/
|
@@ -0,0 +1,26 @@
|
|
1
|
+
class ApplicationController < ActionController::Base
|
2
|
+
@@current_user = User.find_or_create_by_full_name("Demo User")
|
3
|
+
|
4
|
+
def self.current_user=(user)
|
5
|
+
@@current_user = user
|
6
|
+
end
|
7
|
+
|
8
|
+
def current_user
|
9
|
+
@@current_user
|
10
|
+
end
|
11
|
+
helper_method :current_user
|
12
|
+
|
13
|
+
def destroy_user_session_path
|
14
|
+
''
|
15
|
+
end
|
16
|
+
helper_method :destroy_user_session_path
|
17
|
+
|
18
|
+
def authenticate_user!
|
19
|
+
true
|
20
|
+
end
|
21
|
+
|
22
|
+
def anybody_signed_in?
|
23
|
+
true
|
24
|
+
end
|
25
|
+
protect_from_forgery
|
26
|
+
end
|
@@ -0,0 +1,8 @@
|
|
1
|
+
class ContentPage < Noodall::Node
|
2
|
+
# Define which Node Templates can be used as children of Nodes using this template
|
3
|
+
sub_templates ContentPage
|
4
|
+
|
5
|
+
# Define the number of each slot type this Node Template allows. Slots are defined in 'config/initializers/noodall.rb'
|
6
|
+
# small_slots 4
|
7
|
+
small_slots 1
|
8
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
class User
|
2
|
+
include MongoMapper::Document
|
3
|
+
include Canable::Cans
|
4
|
+
|
5
|
+
key :email, String
|
6
|
+
key :full_name, String
|
7
|
+
key :groups, Array
|
8
|
+
|
9
|
+
cattr_accessor :editor_groups
|
10
|
+
|
11
|
+
def admin?
|
12
|
+
groups.include?('website administrator')
|
13
|
+
end
|
14
|
+
|
15
|
+
def editor?
|
16
|
+
return true if self.class.editor_groups.blank?
|
17
|
+
admin? or (self.class.editor_groups & groups).size > 0
|
18
|
+
end
|
19
|
+
|
20
|
+
end
|
@@ -0,0 +1,45 @@
|
|
1
|
+
<%= render :partial => 'noodall/admin/nodes/body', :locals => { :f => f } %>
|
2
|
+
<% content_for :component_table do %>
|
3
|
+
<!--
|
4
|
+
modify this table to look like your template and link slots to correct anchors
|
5
|
+
<table class="component-table">
|
6
|
+
<tr>
|
7
|
+
<td rowspan="2" class="content"></td>
|
8
|
+
<td colspan="2" rowspan="4" class="content"></td>
|
9
|
+
<td><a href="#small_component_form_0" class="slot_link">4</a></td>
|
10
|
+
</tr>
|
11
|
+
<tr>
|
12
|
+
<td><a href="#small_component_form_1" class="slot_link">5</a></td>
|
13
|
+
</tr>
|
14
|
+
<tr>
|
15
|
+
<td></td>
|
16
|
+
<td><a href="#small_component_form_2" class="slot_link">6</a></td>
|
17
|
+
</tr>
|
18
|
+
<tr>
|
19
|
+
<td></td>
|
20
|
+
<td><a href="#small_component_form_3" class="slot_link">7</a></td>
|
21
|
+
</tr>
|
22
|
+
<tr>
|
23
|
+
<td></td>
|
24
|
+
<td colspan="2"><a href="#wide_component_form_0" class="slot_link">1</a></td>
|
25
|
+
<td></td>
|
26
|
+
</tr>
|
27
|
+
<tr>
|
28
|
+
<td></td>
|
29
|
+
<td colspan="2"><a href="#wide_component_form_1" class="slot_link">2</a></td>
|
30
|
+
<td></td>
|
31
|
+
</tr>
|
32
|
+
<tr>
|
33
|
+
<td></td>
|
34
|
+
<td colspan="2"><a href="#wide_component_form_2" class="slot_link">3</a></td>
|
35
|
+
<td></td>
|
36
|
+
</tr>
|
37
|
+
<tr>
|
38
|
+
<td></td>
|
39
|
+
<td></td>
|
40
|
+
<td></td>
|
41
|
+
<td></td>
|
42
|
+
</tr>
|
43
|
+
</table>
|
44
|
+
-->
|
45
|
+
<% end -%>
|
@@ -0,0 +1,51 @@
|
|
1
|
+
require File.expand_path('../boot', __FILE__)
|
2
|
+
|
3
|
+
# Pick the frameworks you want:
|
4
|
+
# require "active_record/railtie"
|
5
|
+
require "action_controller/railtie"
|
6
|
+
require "action_mailer/railtie"
|
7
|
+
require "active_resource/railtie"
|
8
|
+
require "sprockets/railtie"
|
9
|
+
require "rails/test_unit/railtie"
|
10
|
+
|
11
|
+
Bundler.require
|
12
|
+
require "noodall-components-promo-driver"
|
13
|
+
|
14
|
+
module Dummy
|
15
|
+
class Application < Rails::Application
|
16
|
+
# Settings in config/environments/* take precedence over those specified here.
|
17
|
+
# Application configuration should go into files in config/initializers
|
18
|
+
# -- all .rb files in that directory are automatically loaded.
|
19
|
+
|
20
|
+
# Custom directories with classes and modules you want to be autoloadable.
|
21
|
+
# config.autoload_paths += %W(#{config.root}/extras)
|
22
|
+
|
23
|
+
# Only load the plugins named here, in the order given (default is alphabetical).
|
24
|
+
# :all can be used as a placeholder for all plugins not explicitly named.
|
25
|
+
# config.plugins = [ :exception_notification, :ssl_requirement, :all ]
|
26
|
+
|
27
|
+
# Activate observers that should always be running.
|
28
|
+
# config.active_record.observers = :cacher, :garbage_collector, :forum_observer
|
29
|
+
|
30
|
+
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
|
31
|
+
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
|
32
|
+
# config.time_zone = 'Central Time (US & Canada)'
|
33
|
+
|
34
|
+
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
|
35
|
+
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
|
36
|
+
# config.i18n.default_locale = :de
|
37
|
+
|
38
|
+
# Configure the default encoding used in templates for Ruby 1.9.
|
39
|
+
config.encoding = "utf-8"
|
40
|
+
|
41
|
+
# Configure sensitive parameters which will be filtered from the log file.
|
42
|
+
config.filter_parameters += [:password]
|
43
|
+
|
44
|
+
# Enable the asset pipeline
|
45
|
+
config.assets.enabled = true
|
46
|
+
|
47
|
+
# Version of your assets, change this if you want to expire all your assets
|
48
|
+
config.assets.version = '1.0'
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|