active_admin-state_machine 0.1.0 → 1.0.0.pre3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/CHANGELOG.md +9 -0
- data/README.md +56 -8
- data/lib/active_admin/state_machine/dsl.rb +7 -2
- data/lib/active_admin/state_machine/version.rb +3 -1
- data/lib/active_admin/state_machine.rb +7 -0
- metadata +106 -441
- data/Rakefile +0 -17
- data/spec/dummy/README.rdoc +0 -261
- data/spec/dummy/Rakefile +0 -7
- data/spec/dummy/app/admin/admin_users.rb +0 -20
- data/spec/dummy/app/admin/categories.rb +0 -5
- data/spec/dummy/app/admin/dashboard.rb +0 -33
- data/spec/dummy/app/admin/posts.rb +0 -21
- data/spec/dummy/app/assets/javascripts/active_admin.js +0 -1
- data/spec/dummy/app/assets/javascripts/application.js +0 -15
- data/spec/dummy/app/assets/stylesheets/active_admin.css.scss +0 -29
- data/spec/dummy/app/assets/stylesheets/application.css +0 -13
- data/spec/dummy/app/controllers/application_controller.rb +0 -3
- data/spec/dummy/app/helpers/application_helper.rb +0 -2
- data/spec/dummy/app/models/ability.rb +0 -12
- data/spec/dummy/app/models/admin_user.rb +0 -11
- data/spec/dummy/app/models/category.rb +0 -4
- data/spec/dummy/app/models/post.rb +0 -31
- data/spec/dummy/app/views/layouts/application.html.erb +0 -14
- data/spec/dummy/config/application.rb +0 -65
- data/spec/dummy/config/boot.rb +0 -10
- data/spec/dummy/config/database.sample.yml +0 -25
- data/spec/dummy/config/database.travis.yml +0 -4
- data/spec/dummy/config/database.yml +0 -12
- data/spec/dummy/config/environment.rb +0 -5
- data/spec/dummy/config/environments/development.rb +0 -38
- data/spec/dummy/config/environments/production.rb +0 -67
- data/spec/dummy/config/environments/test.rb +0 -37
- data/spec/dummy/config/initializers/active_admin.rb +0 -211
- data/spec/dummy/config/initializers/backtrace_silencers.rb +0 -7
- data/spec/dummy/config/initializers/devise.rb +0 -252
- data/spec/dummy/config/initializers/inflections.rb +0 -15
- data/spec/dummy/config/initializers/mime_types.rb +0 -5
- data/spec/dummy/config/initializers/secret_token.rb +0 -7
- data/spec/dummy/config/initializers/session_store.rb +0 -8
- data/spec/dummy/config/initializers/wrap_parameters.rb +0 -14
- data/spec/dummy/config/locales/devise.en.yml +0 -59
- data/spec/dummy/config/locales/en.yml +0 -10
- data/spec/dummy/config/routes.rb +0 -61
- data/spec/dummy/config.ru +0 -4
- data/spec/dummy/db/development.sqlite3 +0 -0
- data/spec/dummy/db/migrate/20130817004304_devise_create_admin_users.rb +0 -52
- data/spec/dummy/db/migrate/20130817004306_create_admin_notes.rb +0 -17
- data/spec/dummy/db/migrate/20130817004307_move_admin_notes_to_comments.rb +0 -26
- data/spec/dummy/db/migrate/20130817005638_create_posts.rb +0 -11
- data/spec/dummy/db/migrate/20130829000200_create_categories.rb +0 -11
- data/spec/dummy/db/migrate/20131025231118_add_super_admin_to_admin_users.rb +0 -5
- data/spec/dummy/db/schema.rb +0 -65
- data/spec/dummy/db/seeds.rb +0 -1
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/log/development.log +0 -9116
- data/spec/dummy/log/test.log +0 -2969
- data/spec/dummy/public/404.html +0 -26
- data/spec/dummy/public/422.html +0 -26
- data/spec/dummy/public/500.html +0 -25
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/dummy/script/rails +0 -6
- data/spec/dummy/tmp/cache/assets/C6E/0F0/sprockets%2F930c17aa4002b266315478d747cec213 +0 -0
- data/spec/dummy/tmp/cache/assets/CA3/0F0/sprockets%2F6111c5f7d680071cae83281d5237bb52 +0 -0
- data/spec/dummy/tmp/cache/assets/CAE/C10/sprockets%2Fa28299b4afd821b21049164940fe6a29 +0 -0
- data/spec/dummy/tmp/cache/assets/CDB/040/sprockets%2Fc732474e67003a4eb840eb44c5ca9385 +0 -0
- data/spec/dummy/tmp/cache/assets/CE1/700/sprockets%2F9e9ac16860d51b9e1245e02a8bd98125 +0 -0
- data/spec/dummy/tmp/cache/assets/CE6/660/sprockets%2F90e738777deb87d405d03a2f251b547d +0 -0
- data/spec/dummy/tmp/cache/assets/CED/B50/sprockets%2F23b334e745d2ceb50b677668a367de99 +0 -0
- data/spec/dummy/tmp/cache/assets/CF3/0A0/sprockets%2F75abab8c479e90729ca78828102e5e78 +0 -0
- data/spec/dummy/tmp/cache/assets/CF6/EE0/sprockets%2F3f96414b8e9655fb831972cc81b6b95d +0 -0
- data/spec/dummy/tmp/cache/assets/D00/800/sprockets%2F5fe66f0484322d5cda7408c0cb030c36 +0 -0
- data/spec/dummy/tmp/cache/assets/D09/E60/sprockets%2Fd61ab529e52f740f6d26a7b3bc082914 +0 -0
- data/spec/dummy/tmp/cache/assets/D0B/400/sprockets%2Ff4f1a7e6cca869f56232e07440d0242e +0 -0
- data/spec/dummy/tmp/cache/assets/D0D/8D0/sprockets%2Fb048e1909af567b1e61c8f18dd3b4134 +0 -0
- data/spec/dummy/tmp/cache/assets/D0E/750/sprockets%2F535f852b14c3f64b6d4498e281ba6aa3 +0 -0
- data/spec/dummy/tmp/cache/assets/D1B/330/sprockets%2Fb7c84f061393bf7dac846cd173863c57 +0 -0
- data/spec/dummy/tmp/cache/assets/D20/AE0/sprockets%2F25d0f6af9dd375937908ad493464d3ce +0 -0
- data/spec/dummy/tmp/cache/assets/D2F/A20/sprockets%2F006e5a12b1bb0fc15555ad556589be6b +0 -0
- data/spec/dummy/tmp/cache/assets/D38/540/sprockets%2F86e1ad844bc9df4491a2a52b870421db +0 -0
- data/spec/dummy/tmp/cache/assets/D3E/AA0/sprockets%2F77115ed12f0f2812dd9284b1badf974e +0 -0
- data/spec/dummy/tmp/cache/assets/D45/B50/sprockets%2F3eb36e58b929a7cb215ec6cd90730f38 +0 -0
- data/spec/dummy/tmp/cache/assets/D45/BD0/sprockets%2F2def1531b613ed7a7dbfb87119f63667 +0 -0
- data/spec/dummy/tmp/cache/assets/D48/640/sprockets%2F9f4f18d910b678b1d0777e04cdaf6f24 +0 -0
- data/spec/dummy/tmp/cache/assets/D4C/C80/sprockets%2F298e59aa2551dcef562bdfd65908462d +0 -0
- data/spec/dummy/tmp/cache/assets/D59/D70/sprockets%2Fed9f0de1b65ae8d7ef89087c83728461 +0 -0
- data/spec/dummy/tmp/cache/assets/D63/930/sprockets%2F8877deb95181465893a12fc98feefea9 +0 -0
- data/spec/dummy/tmp/cache/assets/D67/9A0/sprockets%2F2b5fbe497968ed201d0ff0dca410d319 +0 -0
- data/spec/dummy/tmp/cache/assets/D78/560/sprockets%2Fdbe66652ccfa390de76149634dd82e1f +0 -0
- data/spec/dummy/tmp/cache/assets/D93/4C0/sprockets%2F857ecd2092cee11f740b3cf2e373ad2a +0 -0
- data/spec/dummy/tmp/cache/assets/D9A/FA0/sprockets%2Fe32c0ff23c6a4084195aafcff444fe63 +0 -0
- data/spec/dummy/tmp/cache/assets/DA3/450/sprockets%2Ff6563ad6efdc449e5219ea221c75fcc3 +0 -0
- data/spec/dummy/tmp/cache/assets/DA4/050/sprockets%2Fb09f488a4f238bf22bc82cef50a6f84d +0 -0
- data/spec/dummy/tmp/cache/assets/DD7/FE0/sprockets%2Ff00de35ea71cb4fc5fc5e96860f5ee55 +0 -0
- data/spec/dummy/tmp/cache/assets/DDE/420/sprockets%2Ffb8b186d5bf0307f86f65fc787d2adeb +0 -0
- data/spec/dummy/tmp/cache/assets/DE6/B50/sprockets%2Febd2b61aa5d1e7bd84e31523e1bc71ac +0 -0
- data/spec/dummy/tmp/cache/assets/DF0/870/sprockets%2F1e4ab2eb47da0bb42b6e37e38639cbae +0 -0
- data/spec/dummy/tmp/cache/assets/DFA/CD0/sprockets%2F6bb1e8a62edbd48cf00dc678d1f0f65a +0 -0
- data/spec/dummy/tmp/cache/assets/E32/990/sprockets%2F2f6fe5d3fae5b4dba7e7cc36ca68e415 +0 -0
- data/spec/dummy/tmp/cache/sass/021f0a44d22f3712e4de7c01de2d6b99f65f2482/_bourbon-deprecated-upcoming.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/021f0a44d22f3712e4de7c01de2d6b99f65f2482/_bourbon.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/0733f78978a3764d0f20e2bea650007fb2bf064b/_compact.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/0733f78978a3764d0f20e2bea650007fb2bf064b/_flex-grid.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/0733f78978a3764d0f20e2bea650007fb2bf064b/_grid-width.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/0733f78978a3764d0f20e2bea650007fb2bf064b/_linear-gradient.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/0733f78978a3764d0f20e2bea650007fb2bf064b/_modular-scale.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/0733f78978a3764d0f20e2bea650007fb2bf064b/_px-to-em.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/0733f78978a3764d0f20e2bea650007fb2bf064b/_radial-gradient.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/0733f78978a3764d0f20e2bea650007fb2bf064b/_tint-shade.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/0733f78978a3764d0f20e2bea650007fb2bf064b/_transition-property-name.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/2fd82df35090e4bb74fb9a41455f20a1e79db68a/_batch_actions.css.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/2fd82df35090e4bb74fb9a41455f20a1e79db68a/_blank_slates.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/2fd82df35090e4bb74fb9a41455f20a1e79db68a/_breadcrumbs.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/2fd82df35090e4bb74fb9a41455f20a1e79db68a/_buttons.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/2fd82df35090e4bb74fb9a41455f20a1e79db68a/_columns.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/2fd82df35090e4bb74fb9a41455f20a1e79db68a/_comments.css.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/2fd82df35090e4bb74fb9a41455f20a1e79db68a/_date_picker.css.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/2fd82df35090e4bb74fb9a41455f20a1e79db68a/_dropdown_menu.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/2fd82df35090e4bb74fb9a41455f20a1e79db68a/_flash_messages.css.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/2fd82df35090e4bb74fb9a41455f20a1e79db68a/_grid.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/2fd82df35090e4bb74fb9a41455f20a1e79db68a/_index_list.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/2fd82df35090e4bb74fb9a41455f20a1e79db68a/_links.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/2fd82df35090e4bb74fb9a41455f20a1e79db68a/_pagination.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/2fd82df35090e4bb74fb9a41455f20a1e79db68a/_panels.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/2fd82df35090e4bb74fb9a41455f20a1e79db68a/_popovers.css.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/2fd82df35090e4bb74fb9a41455f20a1e79db68a/_scopes.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/2fd82df35090e4bb74fb9a41455f20a1e79db68a/_status_tags.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/2fd82df35090e4bb74fb9a41455f20a1e79db68a/_table_tools.css.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/2fd82df35090e4bb74fb9a41455f20a1e79db68a/_tables.css.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/49a924645aad7b7327372ccd94e45cbdf78ae4ff/_all.css.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/49a924645aad7b7327372ccd94e45cbdf78ae4ff/_buttons.css.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/49a924645aad7b7327372ccd94e45cbdf78ae4ff/_gradients.css.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/49a924645aad7b7327372ccd94e45cbdf78ae4ff/_icons.css.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/49a924645aad7b7327372ccd94e45cbdf78ae4ff/_reset.css.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/49a924645aad7b7327372ccd94e45cbdf78ae4ff/_rounded.css.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/49a924645aad7b7327372ccd94e45cbdf78ae4ff/_sections.css.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/49a924645aad7b7327372ccd94e45cbdf78ae4ff/_shadows.css.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/49a924645aad7b7327372ccd94e45cbdf78ae4ff/_typography.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/49a924645aad7b7327372ccd94e45cbdf78ae4ff/_utilities.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/49a924645aad7b7327372ccd94e45cbdf78ae4ff/_variables.css.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/97d1d5c145c2924a55e7b5d99d290112170b74f0/_footer.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/97d1d5c145c2924a55e7b5d99d290112170b74f0/_main_structure.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/97d1d5c145c2924a55e7b5d99d290112170b74f0/_title_bar.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/a88ac2680a1680d7d2a5f8b0c7dc7f5e3131ade5/_button.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/a88ac2680a1680d7d2a5f8b0c7dc7f5e3131ade5/_clearfix.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/a88ac2680a1680d7d2a5f8b0c7dc7f5e3131ade5/_font-family.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/a88ac2680a1680d7d2a5f8b0c7dc7f5e3131ade5/_hide-text.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/a88ac2680a1680d7d2a5f8b0c7dc7f5e3131ade5/_html5-input-types.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/a88ac2680a1680d7d2a5f8b0c7dc7f5e3131ade5/_position.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/a88ac2680a1680d7d2a5f8b0c7dc7f5e3131ade5/_prefixer.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/a88ac2680a1680d7d2a5f8b0c7dc7f5e3131ade5/_retina-image.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/a88ac2680a1680d7d2a5f8b0c7dc7f5e3131ade5/_size.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/a88ac2680a1680d7d2a5f8b0c7dc7f5e3131ade5/_timing-functions.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/a88ac2680a1680d7d2a5f8b0c7dc7f5e3131ade5/_triangle.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/c10713f51b89c2fd0ebe39519f07849be30ad7dc/_deprecated-webkit-gradient.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/c10713f51b89c2fd0ebe39519f07849be30ad7dc/_gradient-positions-parser.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/c10713f51b89c2fd0ebe39519f07849be30ad7dc/_linear-positions-parser.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/c10713f51b89c2fd0ebe39519f07849be30ad7dc/_radial-arg-parser.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/c10713f51b89c2fd0ebe39519f07849be30ad7dc/_radial-positions-parser.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/c10713f51b89c2fd0ebe39519f07849be30ad7dc/_render-gradients.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/c10713f51b89c2fd0ebe39519f07849be30ad7dc/_shape-size-stripper.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/c440ddc8eb3b4ee623e7dfe6ab824cc1e13dc16d/_animation.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/c440ddc8eb3b4ee623e7dfe6ab824cc1e13dc16d/_appearance.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/c440ddc8eb3b4ee623e7dfe6ab824cc1e13dc16d/_backface-visibility.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/c440ddc8eb3b4ee623e7dfe6ab824cc1e13dc16d/_background-image.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/c440ddc8eb3b4ee623e7dfe6ab824cc1e13dc16d/_background.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/c440ddc8eb3b4ee623e7dfe6ab824cc1e13dc16d/_border-image.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/c440ddc8eb3b4ee623e7dfe6ab824cc1e13dc16d/_border-radius.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/c440ddc8eb3b4ee623e7dfe6ab824cc1e13dc16d/_box-sizing.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/c440ddc8eb3b4ee623e7dfe6ab824cc1e13dc16d/_columns.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/c440ddc8eb3b4ee623e7dfe6ab824cc1e13dc16d/_flex-box.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/c440ddc8eb3b4ee623e7dfe6ab824cc1e13dc16d/_font-face.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/c440ddc8eb3b4ee623e7dfe6ab824cc1e13dc16d/_hidpi-media-query.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/c440ddc8eb3b4ee623e7dfe6ab824cc1e13dc16d/_image-rendering.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/c440ddc8eb3b4ee623e7dfe6ab824cc1e13dc16d/_inline-block.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/c440ddc8eb3b4ee623e7dfe6ab824cc1e13dc16d/_keyframes.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/c440ddc8eb3b4ee623e7dfe6ab824cc1e13dc16d/_linear-gradient.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/c440ddc8eb3b4ee623e7dfe6ab824cc1e13dc16d/_perspective.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/c440ddc8eb3b4ee623e7dfe6ab824cc1e13dc16d/_placeholder.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/c440ddc8eb3b4ee623e7dfe6ab824cc1e13dc16d/_radial-gradient.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/c440ddc8eb3b4ee623e7dfe6ab824cc1e13dc16d/_transform.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/c440ddc8eb3b4ee623e7dfe6ab824cc1e13dc16d/_transition.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/c440ddc8eb3b4ee623e7dfe6ab824cc1e13dc16d/_user-select.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/c7fb764b3bec96a92cf65b0d831789c5ca3c5ed7/active_admin.css.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/cb0cbb3d3d7b7c51feca169c780bb955b45511b4/_dashboard.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/cb0cbb3d3d7b7c51feca169c780bb955b45511b4/_logged_out.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/eeb938f07a558025f0485a33a8e74dcc19262df9/_base.css.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/eeb938f07a558025f0485a33a8e74dcc19262df9/_forms.css.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/eeb938f07a558025f0485a33a8e74dcc19262df9/_header.css.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/eeb938f07a558025f0485a33a8e74dcc19262df9/_mixins.css.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/eeb938f07a558025f0485a33a8e74dcc19262df9/_typography.css.scssc +0 -0
- data/spec/dummy/tmp/cache/sass/eeb938f07a558025f0485a33a8e74dcc19262df9/print.css.scssc +0 -0
- data/spec/dummy/tmp/pids/server.pid +0 -1
- data/spec/factories/admin_users.rb +0 -8
- data/spec/factories/categories.rb +0 -17
- data/spec/factories/posts.rb +0 -11
- data/spec/features/authorization_spec.rb +0 -23
- data/spec/features/custom_block_spec.rb +0 -25
- data/spec/features/js_confirmation_spec.rb +0 -51
- data/spec/spec_helper.rb +0 -54
- data/spec/support/post_helpers.rb +0 -22
@@ -1,23 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
|
3
|
-
feature "Authorized Access" do
|
4
|
-
|
5
|
-
given(:user) { create(:user) }
|
6
|
-
given(:admin) { create(:user, super_admin: true) }
|
7
|
-
|
8
|
-
given(:category) { create(:category, num_posts: 1) }
|
9
|
-
given(:post) { category.posts.first }
|
10
|
-
|
11
|
-
scenario 'should not show button if not authorized' do
|
12
|
-
login_and_navigate_to_post user, post
|
13
|
-
|
14
|
-
has_no_action_item "Peer Review"
|
15
|
-
end
|
16
|
-
|
17
|
-
scenario 'should show button if authorized' do
|
18
|
-
login_and_navigate_to_post admin, post
|
19
|
-
|
20
|
-
has_action_item "Peer Review"
|
21
|
-
end
|
22
|
-
|
23
|
-
end
|
@@ -1,25 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
|
3
|
-
feature "Custom Block" do
|
4
|
-
|
5
|
-
given(:admin) { create(:user, super_admin: true) }
|
6
|
-
|
7
|
-
given(:category) { create(:category, num_posts: 0) }
|
8
|
-
given(:post) { create(:post, :reviewed, category: category) }
|
9
|
-
|
10
|
-
scenario 'uses block for controller action if provided' do
|
11
|
-
login_and_navigate_to_post admin, post
|
12
|
-
|
13
|
-
click_link "Reopen"
|
14
|
-
|
15
|
-
current_path.should == admin_dashboard_path
|
16
|
-
post.should be_reviewed
|
17
|
-
end
|
18
|
-
|
19
|
-
scenario 'respects :http_verb provided' do
|
20
|
-
login_and_navigate_to_post admin, post
|
21
|
-
|
22
|
-
link = find(".action_item a", text: "Reopen")
|
23
|
-
link['data-method'].should == 'get'
|
24
|
-
end
|
25
|
-
end
|
@@ -1,51 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
|
3
|
-
feature "JS Confirmations" do
|
4
|
-
|
5
|
-
given(:admin) { create(:user, super_admin: true) }
|
6
|
-
|
7
|
-
given(:category) { create(:category, num_posts: 0) }
|
8
|
-
given(:post) { create(:post, :reviewed, category: category) }
|
9
|
-
|
10
|
-
scenario 'accepting JS confirmation performs action', js: true do
|
11
|
-
login_and_navigate_to_post admin, post
|
12
|
-
|
13
|
-
page.driver.browser.accept_js_confirms
|
14
|
-
click_link "Publish Post"
|
15
|
-
|
16
|
-
page.driver.confirm_messages.should include "Do you want to publish now?"
|
17
|
-
page.should have_css(".flash.flash_notice", text: "Post successfully published")
|
18
|
-
|
19
|
-
post_should_have_status "published"
|
20
|
-
end
|
21
|
-
|
22
|
-
scenario 'rejecting JS confirmatino skips action', js: true do
|
23
|
-
login_and_navigate_to_post admin, post
|
24
|
-
|
25
|
-
page.driver.browser.reject_js_confirms
|
26
|
-
click_link "Publish Post"
|
27
|
-
|
28
|
-
page.driver.confirm_messages.should include "Do you want to publish now?"
|
29
|
-
page.should_not have_css(".flash.flash_notice", text: "Post successfully published")
|
30
|
-
|
31
|
-
post_should_have_status "reviewed"
|
32
|
-
end
|
33
|
-
|
34
|
-
scenario 'JS prompt has default transation', js: true do
|
35
|
-
login_and_navigate_to_post admin, post
|
36
|
-
|
37
|
-
page.driver.browser.accept_js_confirms
|
38
|
-
click_link "Reopen"
|
39
|
-
|
40
|
-
page.driver.confirm_messages.should include "Are you sure you want to reopen?"
|
41
|
-
end
|
42
|
-
|
43
|
-
scenario 'JS prompt uses Proc for message', js: true do
|
44
|
-
login_and_navigate_to_post admin, post
|
45
|
-
|
46
|
-
page.driver.browser.accept_js_confirms
|
47
|
-
click_link "Archive"
|
48
|
-
|
49
|
-
page.driver.confirm_messages.should include "Do you want to archive?"
|
50
|
-
end
|
51
|
-
end
|
data/spec/spec_helper.rb
DELETED
@@ -1,54 +0,0 @@
|
|
1
|
-
# This file was generated by the `rspec --init` command. Conventionally, all
|
2
|
-
# specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
|
3
|
-
# Require this file using `require "spec_helper"` to ensure that it is only
|
4
|
-
# loaded once.
|
5
|
-
#
|
6
|
-
# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
|
7
|
-
|
8
|
-
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
9
|
-
ENV['RAILS_ENV'] ||= 'test'
|
10
|
-
|
11
|
-
require File.expand_path("../dummy/config/environment.rb", __FILE__)
|
12
|
-
require 'rspec/rails'
|
13
|
-
require 'rspec/autorun'
|
14
|
-
require 'shoulda-matchers'
|
15
|
-
require 'capybara/rails'
|
16
|
-
require 'capybara/rspec'
|
17
|
-
require 'capybara/webkit'
|
18
|
-
require 'database_cleaner'
|
19
|
-
require 'factory_girl_rails'
|
20
|
-
|
21
|
-
Capybara.default_selector = :css
|
22
|
-
Capybara.javascript_driver = :webkit
|
23
|
-
Rails.backtrace_cleaner.remove_silencers!
|
24
|
-
|
25
|
-
# Load support files
|
26
|
-
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
|
27
|
-
|
28
|
-
DatabaseCleaner.strategy = :truncation
|
29
|
-
|
30
|
-
RSpec.configure do |config|
|
31
|
-
config.run_all_when_everything_filtered = true
|
32
|
-
config.mock_with :rspec
|
33
|
-
config.infer_base_class_for_anonymous_controllers = false
|
34
|
-
|
35
|
-
|
36
|
-
# Run specs in random order to surface order dependencies. If you find an
|
37
|
-
# order dependency and want to debug it, you can fix the order by providing
|
38
|
-
# the seed, which is printed after each run.
|
39
|
-
# --seed 1234
|
40
|
-
config.order = 'random'
|
41
|
-
|
42
|
-
config.include Warden::Test::Helpers, type: :feature
|
43
|
-
config.include FactoryGirl::Syntax::Methods # Defines #create as FactoryGirl.create
|
44
|
-
|
45
|
-
config.before :each do
|
46
|
-
DatabaseCleaner.clean_with :truncation
|
47
|
-
end
|
48
|
-
|
49
|
-
config.after(:each, :type => :feature) do
|
50
|
-
DatabaseCleaner.clean # Truncate the database
|
51
|
-
Capybara.reset_sessions! # Forget the (simulated) browser state
|
52
|
-
Capybara.use_default_driver # Revert Capybara.current_driver to Capybara.default_driver
|
53
|
-
end
|
54
|
-
end
|
@@ -1,22 +0,0 @@
|
|
1
|
-
def post_should_have_status(status)
|
2
|
-
within ".attributes_table" do
|
3
|
-
page.should have_content(status)
|
4
|
-
end
|
5
|
-
end
|
6
|
-
|
7
|
-
def login_and_navigate_to_post(user, post)
|
8
|
-
login_as user
|
9
|
-
visit admin_category_post_path(post.category, post)
|
10
|
-
end
|
11
|
-
|
12
|
-
def has_action_item(item)
|
13
|
-
within ".action_items" do
|
14
|
-
page.should have_link(item)
|
15
|
-
end
|
16
|
-
end
|
17
|
-
|
18
|
-
def has_no_action_item(item)
|
19
|
-
within ".action_items" do
|
20
|
-
page.should_not have_link(item)
|
21
|
-
end
|
22
|
-
end
|