json_voorhees 1.0.0 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +17 -48
- data/lib/generators/json_voorhees/app_environment/USAGE +8 -0
- data/lib/generators/json_voorhees/app_environment/app_environment_generator.rb +93 -0
- data/lib/generators/json_voorhees/app_make_admin/app_make_admin_generator.rb +19 -34
- data/lib/generators/json_voorhees/app_make_tests/app_make_tests_generator.rb +5 -19
- data/lib/generators/json_voorhees/app_make_user/app_make_user_generator.rb +13 -73
- data/lib/generators/json_voorhees/app_scaffold/app_scaffold_generator.rb +2 -12
- data/lib/generators/json_voorhees/engine_create_controller/engine_create_controller_generator.rb +1 -6
- data/lib/generators/json_voorhees/engine_scaffold/engine_scaffold_generator.rb +3 -12
- data/lib/generators/json_voorhees/massive_scaffold/massive_scaffold_generator.rb +12 -28
- data/lib/generators/json_voorhees/setup_app/setup_app_generator.rb +32 -97
- data/lib/generators/json_voorhees/setup_app/templates/api_controller_with_arcadex.rb +8 -23
- data/lib/generators/json_voorhees/setup_engine/setup_engine_generator.rb +0 -3
- data/lib/json_voorhees/version.rb +1 -1
- data/test/fresh_copy/test_app/Gemfile +12 -17
- data/test/fresh_copy/test_app/Gemfile.lock +56 -61
- data/test/fresh_copy/test_app/Rakefile +1 -1
- data/test/fresh_copy/test_app/app/assets/stylesheets/application.css +5 -3
- data/test/fresh_copy/test_app/app/views/layouts/application.html.erb +2 -2
- data/test/fresh_copy/test_app/bin/rails +4 -0
- data/test/fresh_copy/test_app/bin/rake +4 -0
- data/test/fresh_copy/test_app/bin/spring +18 -0
- data/test/fresh_copy/test_app/config/database.yml +8 -8
- data/test/fresh_copy/test_app/config/environment.rb +1 -1
- data/test/fresh_copy/test_app/config/environments/development.rb +10 -2
- data/test/fresh_copy/test_app/config/environments/production.rb +7 -9
- data/test/fresh_copy/test_app/config/environments/test.rb +5 -2
- data/test/fresh_copy/test_app/config/initializers/assets.rb +8 -0
- data/test/fresh_copy/test_app/config/initializers/cookies_serializer.rb +3 -0
- data/test/fresh_copy/test_app/config/initializers/mime_types.rb +0 -1
- data/test/fresh_copy/test_app/config/initializers/session_store.rb +1 -1
- data/test/fresh_copy/test_app/config/routes.rb +1 -1
- data/test/fresh_copy/test_app/config/secrets.yml +22 -0
- data/test/fresh_copy/test_app/public/404.html +20 -11
- data/test/fresh_copy/test_app/public/422.html +20 -11
- data/test/fresh_copy/test_app/public/500.html +19 -10
- data/test/fresh_copy/test_app/test/test_helper.rb +1 -6
- data/test/lib/generators/json_voorhees/app_environment_generator_test.rb +16 -0
- metadata +15 -21
- data/lib/generators/json_voorhees/app_make_admin/templates/views/admin_home_no_user +0 -1
- data/lib/generators/json_voorhees/app_make_tests/templates/no_auth_request.rb.erb +0 -114
- data/lib/generators/json_voorhees/app_make_user/templates/active_admin_register.rb.erb +0 -83
- data/lib/generators/json_voorhees/app_make_user/templates/user/include_authorization.rb +0 -4
- data/lib/generators/json_voorhees/app_make_user/templates/user/specs/factory_girl.rb +0 -14
- data/lib/generators/json_voorhees/app_make_user/templates/user/specs/model_specs.rb +0 -61
- data/lib/generators/json_voorhees/app_make_user/templates/user/specs/no_arcadex_request_specs.rb +0 -85
- data/lib/generators/json_voorhees/app_make_user/templates/user/specs/request_specs.rb +0 -244
- data/lib/generators/json_voorhees/app_make_user/templates/user/specs/route_specs.rb +0 -91
- data/lib/generators/json_voorhees/app_make_user/templates/user/user_authorizations.rb +0 -92
- data/lib/generators/json_voorhees/app_make_user/templates/user/user_controller.rb +0 -169
- data/lib/generators/json_voorhees/app_make_user/templates/user/user_model.rb +0 -35
- data/lib/generators/json_voorhees/app_make_user/templates/user/user_routes.rb +0 -32
- data/lib/generators/json_voorhees/app_make_user/templates/user/user_serializer.rb +0 -43
- data/lib/generators/json_voorhees/engine_create_controller/templates/no_auth_controller_template.rb.erb +0 -61
- data/lib/generators/json_voorhees/setup_app/templates/api_controller_no_arcadex.rb +0 -33
- data/test/fresh_copy/test_app/config/initializers/secret_token.rb +0 -12
| @@ -1,11 +1,11 @@ | |
| 1 | 
            -
             | 
| 1 | 
            +
            Rails.application.configure do
         | 
| 2 2 | 
             
              # Settings specified here will take precedence over those in config/application.rb.
         | 
| 3 3 |  | 
| 4 4 | 
             
              # Code is not reloaded between requests.
         | 
| 5 5 | 
             
              config.cache_classes = true
         | 
| 6 6 |  | 
| 7 7 | 
             
              # Eager load code on boot. This eager loads most of Rails and
         | 
| 8 | 
            -
              # your application in memory, allowing both  | 
| 8 | 
            +
              # your application in memory, allowing both threaded web servers
         | 
| 9 9 | 
             
              # and those relying on copy on write to perform better.
         | 
| 10 10 | 
             
              # Rake tasks automatically ignore this option for performance.
         | 
| 11 11 | 
             
              config.eager_load = true
         | 
| @@ -32,8 +32,7 @@ TestApp::Application.configure do | |
| 32 32 | 
             
              # Generate digests for assets URLs.
         | 
| 33 33 | 
             
              config.assets.digest = true
         | 
| 34 34 |  | 
| 35 | 
            -
              #  | 
| 36 | 
            -
              config.assets.version = '1.0'
         | 
| 35 | 
            +
              # `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb
         | 
| 37 36 |  | 
| 38 37 | 
             
              # Specifies the header that your server uses for sending files.
         | 
| 39 38 | 
             
              # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
         | 
| @@ -57,16 +56,12 @@ TestApp::Application.configure do | |
| 57 56 | 
             
              # Enable serving of images, stylesheets, and JavaScripts from an asset server.
         | 
| 58 57 | 
             
              # config.action_controller.asset_host = "http://assets.example.com"
         | 
| 59 58 |  | 
| 60 | 
            -
              # Precompile additional assets.
         | 
| 61 | 
            -
              # application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
         | 
| 62 | 
            -
              # config.assets.precompile += %w( search.js )
         | 
| 63 | 
            -
             | 
| 64 59 | 
             
              # Ignore bad email addresses and do not raise email delivery errors.
         | 
| 65 60 | 
             
              # Set this to true and configure the email server for immediate delivery to raise delivery errors.
         | 
| 66 61 | 
             
              # config.action_mailer.raise_delivery_errors = false
         | 
| 67 62 |  | 
| 68 63 | 
             
              # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
         | 
| 69 | 
            -
              # the I18n.default_locale when a translation  | 
| 64 | 
            +
              # the I18n.default_locale when a translation cannot be found).
         | 
| 70 65 | 
             
              config.i18n.fallbacks = true
         | 
| 71 66 |  | 
| 72 67 | 
             
              # Send deprecation notices to registered listeners.
         | 
| @@ -77,4 +72,7 @@ TestApp::Application.configure do | |
| 77 72 |  | 
| 78 73 | 
             
              # Use default logging formatter so that PID and timestamp are not suppressed.
         | 
| 79 74 | 
             
              config.log_formatter = ::Logger::Formatter.new
         | 
| 75 | 
            +
             | 
| 76 | 
            +
              # Do not dump schema after migrations.
         | 
| 77 | 
            +
              config.active_record.dump_schema_after_migration = false
         | 
| 80 78 | 
             
            end
         | 
| @@ -1,4 +1,4 @@ | |
| 1 | 
            -
             | 
| 1 | 
            +
            Rails.application.configure do
         | 
| 2 2 | 
             
              # Settings specified here will take precedence over those in config/application.rb.
         | 
| 3 3 |  | 
| 4 4 | 
             
              # The test environment is used exclusively to run your application's
         | 
| @@ -14,7 +14,7 @@ TestApp::Application.configure do | |
| 14 14 |  | 
| 15 15 | 
             
              # Configure static asset server for tests with Cache-Control for performance.
         | 
| 16 16 | 
             
              config.serve_static_assets  = true
         | 
| 17 | 
            -
              config.static_cache_control =  | 
| 17 | 
            +
              config.static_cache_control = 'public, max-age=3600'
         | 
| 18 18 |  | 
| 19 19 | 
             
              # Show full error reports and disable caching.
         | 
| 20 20 | 
             
              config.consider_all_requests_local       = true
         | 
| @@ -33,4 +33,7 @@ TestApp::Application.configure do | |
| 33 33 |  | 
| 34 34 | 
             
              # Print deprecation notices to the stderr.
         | 
| 35 35 | 
             
              config.active_support.deprecation = :stderr
         | 
| 36 | 
            +
             | 
| 37 | 
            +
              # Raises error for missing translations
         | 
| 38 | 
            +
              # config.action_view.raise_on_missing_translations = true
         | 
| 36 39 | 
             
            end
         | 
| @@ -0,0 +1,8 @@ | |
| 1 | 
            +
            # Be sure to restart your server when you modify this file.
         | 
| 2 | 
            +
             | 
| 3 | 
            +
            # Version of your assets, change this if you want to expire all your assets.
         | 
| 4 | 
            +
            Rails.application.config.assets.version = '1.0'
         | 
| 5 | 
            +
             | 
| 6 | 
            +
            # Precompile additional assets.
         | 
| 7 | 
            +
            # application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
         | 
| 8 | 
            +
            # Rails.application.config.assets.precompile += %w( search.js )
         | 
| @@ -0,0 +1,22 @@ | |
| 1 | 
            +
            # Be sure to restart your server when you modify this file.
         | 
| 2 | 
            +
             | 
| 3 | 
            +
            # Your secret key is used for verifying the integrity of signed cookies.
         | 
| 4 | 
            +
            # If you change this key, all old signed cookies will become invalid!
         | 
| 5 | 
            +
             | 
| 6 | 
            +
            # Make sure the secret is at least 30 characters and all random,
         | 
| 7 | 
            +
            # no regular words or you'll be exposed to dictionary attacks.
         | 
| 8 | 
            +
            # You can use `rake secret` to generate a secure secret key.
         | 
| 9 | 
            +
             | 
| 10 | 
            +
            # Make sure the secrets in this file are kept private
         | 
| 11 | 
            +
            # if you're sharing your code publicly.
         | 
| 12 | 
            +
             | 
| 13 | 
            +
            development:
         | 
| 14 | 
            +
              secret_key_base: 1d2c4f184a647c4a04a51f9da9c9ff3ff93308483416c8ea18ef5a3c44daf2769c53fa3a685d767607b4bc722e5fed36fc8c4feacc82e6f199ddc7bc32f57b41
         | 
| 15 | 
            +
             | 
| 16 | 
            +
            test:
         | 
| 17 | 
            +
              secret_key_base: 6752a3de1def6ec7fe6c0f052cd59ee32d08df100cc1acc14dea8a1ae87cff83aea16e87255cfdbc7ad45d76bcf122a6e706c35bdf9096dd2cd4146c48710651
         | 
| 18 | 
            +
             | 
| 19 | 
            +
            # Do not keep production secrets in the repository,
         | 
| 20 | 
            +
            # instead read values from the environment.
         | 
| 21 | 
            +
            production:
         | 
| 22 | 
            +
              secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>
         | 
| @@ -2,17 +2,23 @@ | |
| 2 2 | 
             
            <html>
         | 
| 3 3 | 
             
            <head>
         | 
| 4 4 | 
             
              <title>The page you were looking for doesn't exist (404)</title>
         | 
| 5 | 
            +
              <meta name="viewport" content="width=device-width,initial-scale=1">
         | 
| 5 6 | 
             
              <style>
         | 
| 6 7 | 
             
              body {
         | 
| 7 8 | 
             
                background-color: #EFEFEF;
         | 
| 8 9 | 
             
                color: #2E2F30;
         | 
| 9 10 | 
             
                text-align: center;
         | 
| 10 11 | 
             
                font-family: arial, sans-serif;
         | 
| 12 | 
            +
                margin: 0;
         | 
| 11 13 | 
             
              }
         | 
| 12 14 |  | 
| 13 15 | 
             
              div.dialog {
         | 
| 14 | 
            -
                width:  | 
| 15 | 
            -
                 | 
| 16 | 
            +
                width: 95%;
         | 
| 17 | 
            +
                max-width: 33em;
         | 
| 18 | 
            +
                margin: 4em auto 0;
         | 
| 19 | 
            +
              }
         | 
| 20 | 
            +
             | 
| 21 | 
            +
              div.dialog > div {
         | 
| 16 22 | 
             
                border: 1px solid #CCC;
         | 
| 17 23 | 
             
                border-right-color: #999;
         | 
| 18 24 | 
             
                border-left-color: #999;
         | 
| @@ -21,7 +27,8 @@ | |
| 21 27 | 
             
                border-top-left-radius: 9px;
         | 
| 22 28 | 
             
                border-top-right-radius: 9px;
         | 
| 23 29 | 
             
                background-color: white;
         | 
| 24 | 
            -
                padding: 7px  | 
| 30 | 
            +
                padding: 7px 12% 0;
         | 
| 31 | 
            +
                box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
         | 
| 25 32 | 
             
              }
         | 
| 26 33 |  | 
| 27 34 | 
             
              h1 {
         | 
| @@ -30,19 +37,19 @@ | |
| 30 37 | 
             
                line-height: 1.5em;
         | 
| 31 38 | 
             
              }
         | 
| 32 39 |  | 
| 33 | 
            -
               | 
| 34 | 
            -
                 | 
| 35 | 
            -
                 | 
| 36 | 
            -
                padding: 1em 0;
         | 
| 40 | 
            +
              div.dialog > p {
         | 
| 41 | 
            +
                margin: 0 0 1em;
         | 
| 42 | 
            +
                padding: 1em;
         | 
| 37 43 | 
             
                background-color: #F7F7F7;
         | 
| 38 44 | 
             
                border: 1px solid #CCC;
         | 
| 39 45 | 
             
                border-right-color: #999;
         | 
| 46 | 
            +
                border-left-color: #999;
         | 
| 40 47 | 
             
                border-bottom-color: #999;
         | 
| 41 48 | 
             
                border-bottom-left-radius: 4px;
         | 
| 42 49 | 
             
                border-bottom-right-radius: 4px;
         | 
| 43 50 | 
             
                border-top-color: #DADADA;
         | 
| 44 51 | 
             
                color: #666;
         | 
| 45 | 
            -
                box-shadow:0 3px 8px rgba(50, 50, 50, 0.17);
         | 
| 52 | 
            +
                box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
         | 
| 46 53 | 
             
              }
         | 
| 47 54 | 
             
              </style>
         | 
| 48 55 | 
             
            </head>
         | 
| @@ -50,9 +57,11 @@ | |
| 50 57 | 
             
            <body>
         | 
| 51 58 | 
             
              <!-- This file lives in public/404.html -->
         | 
| 52 59 | 
             
              <div class="dialog">
         | 
| 53 | 
            -
                < | 
| 54 | 
            -
             | 
| 60 | 
            +
                <div>
         | 
| 61 | 
            +
                  <h1>The page you were looking for doesn't exist.</h1>
         | 
| 62 | 
            +
                  <p>You may have mistyped the address or the page may have moved.</p>
         | 
| 63 | 
            +
                </div>
         | 
| 64 | 
            +
                <p>If you are the application owner check the logs for more information.</p>
         | 
| 55 65 | 
             
              </div>
         | 
| 56 | 
            -
              <p>If you are the application owner check the logs for more information.</p>
         | 
| 57 66 | 
             
            </body>
         | 
| 58 67 | 
             
            </html>
         | 
| @@ -2,17 +2,23 @@ | |
| 2 2 | 
             
            <html>
         | 
| 3 3 | 
             
            <head>
         | 
| 4 4 | 
             
              <title>The change you wanted was rejected (422)</title>
         | 
| 5 | 
            +
              <meta name="viewport" content="width=device-width,initial-scale=1">
         | 
| 5 6 | 
             
              <style>
         | 
| 6 7 | 
             
              body {
         | 
| 7 8 | 
             
                background-color: #EFEFEF;
         | 
| 8 9 | 
             
                color: #2E2F30;
         | 
| 9 10 | 
             
                text-align: center;
         | 
| 10 11 | 
             
                font-family: arial, sans-serif;
         | 
| 12 | 
            +
                margin: 0;
         | 
| 11 13 | 
             
              }
         | 
| 12 14 |  | 
| 13 15 | 
             
              div.dialog {
         | 
| 14 | 
            -
                width:  | 
| 15 | 
            -
                 | 
| 16 | 
            +
                width: 95%;
         | 
| 17 | 
            +
                max-width: 33em;
         | 
| 18 | 
            +
                margin: 4em auto 0;
         | 
| 19 | 
            +
              }
         | 
| 20 | 
            +
             | 
| 21 | 
            +
              div.dialog > div {
         | 
| 16 22 | 
             
                border: 1px solid #CCC;
         | 
| 17 23 | 
             
                border-right-color: #999;
         | 
| 18 24 | 
             
                border-left-color: #999;
         | 
| @@ -21,7 +27,8 @@ | |
| 21 27 | 
             
                border-top-left-radius: 9px;
         | 
| 22 28 | 
             
                border-top-right-radius: 9px;
         | 
| 23 29 | 
             
                background-color: white;
         | 
| 24 | 
            -
                padding: 7px  | 
| 30 | 
            +
                padding: 7px 12% 0;
         | 
| 31 | 
            +
                box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
         | 
| 25 32 | 
             
              }
         | 
| 26 33 |  | 
| 27 34 | 
             
              h1 {
         | 
| @@ -30,19 +37,19 @@ | |
| 30 37 | 
             
                line-height: 1.5em;
         | 
| 31 38 | 
             
              }
         | 
| 32 39 |  | 
| 33 | 
            -
               | 
| 34 | 
            -
                 | 
| 35 | 
            -
                 | 
| 36 | 
            -
                padding: 1em 0;
         | 
| 40 | 
            +
              div.dialog > p {
         | 
| 41 | 
            +
                margin: 0 0 1em;
         | 
| 42 | 
            +
                padding: 1em;
         | 
| 37 43 | 
             
                background-color: #F7F7F7;
         | 
| 38 44 | 
             
                border: 1px solid #CCC;
         | 
| 39 45 | 
             
                border-right-color: #999;
         | 
| 46 | 
            +
                border-left-color: #999;
         | 
| 40 47 | 
             
                border-bottom-color: #999;
         | 
| 41 48 | 
             
                border-bottom-left-radius: 4px;
         | 
| 42 49 | 
             
                border-bottom-right-radius: 4px;
         | 
| 43 50 | 
             
                border-top-color: #DADADA;
         | 
| 44 51 | 
             
                color: #666;
         | 
| 45 | 
            -
                box-shadow:0 3px 8px rgba(50, 50, 50, 0.17);
         | 
| 52 | 
            +
                box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
         | 
| 46 53 | 
             
              }
         | 
| 47 54 | 
             
              </style>
         | 
| 48 55 | 
             
            </head>
         | 
| @@ -50,9 +57,11 @@ | |
| 50 57 | 
             
            <body>
         | 
| 51 58 | 
             
              <!-- This file lives in public/422.html -->
         | 
| 52 59 | 
             
              <div class="dialog">
         | 
| 53 | 
            -
                < | 
| 54 | 
            -
             | 
| 60 | 
            +
                <div>
         | 
| 61 | 
            +
                  <h1>The change you wanted was rejected.</h1>
         | 
| 62 | 
            +
                  <p>Maybe you tried to change something you didn't have access to.</p>
         | 
| 63 | 
            +
                </div>
         | 
| 64 | 
            +
                <p>If you are the application owner check the logs for more information.</p>
         | 
| 55 65 | 
             
              </div>
         | 
| 56 | 
            -
              <p>If you are the application owner check the logs for more information.</p>
         | 
| 57 66 | 
             
            </body>
         | 
| 58 67 | 
             
            </html>
         | 
| @@ -2,17 +2,23 @@ | |
| 2 2 | 
             
            <html>
         | 
| 3 3 | 
             
            <head>
         | 
| 4 4 | 
             
              <title>We're sorry, but something went wrong (500)</title>
         | 
| 5 | 
            +
              <meta name="viewport" content="width=device-width,initial-scale=1">
         | 
| 5 6 | 
             
              <style>
         | 
| 6 7 | 
             
              body {
         | 
| 7 8 | 
             
                background-color: #EFEFEF;
         | 
| 8 9 | 
             
                color: #2E2F30;
         | 
| 9 10 | 
             
                text-align: center;
         | 
| 10 11 | 
             
                font-family: arial, sans-serif;
         | 
| 12 | 
            +
                margin: 0;
         | 
| 11 13 | 
             
              }
         | 
| 12 14 |  | 
| 13 15 | 
             
              div.dialog {
         | 
| 14 | 
            -
                width:  | 
| 15 | 
            -
                 | 
| 16 | 
            +
                width: 95%;
         | 
| 17 | 
            +
                max-width: 33em;
         | 
| 18 | 
            +
                margin: 4em auto 0;
         | 
| 19 | 
            +
              }
         | 
| 20 | 
            +
             | 
| 21 | 
            +
              div.dialog > div {
         | 
| 16 22 | 
             
                border: 1px solid #CCC;
         | 
| 17 23 | 
             
                border-right-color: #999;
         | 
| 18 24 | 
             
                border-left-color: #999;
         | 
| @@ -21,7 +27,8 @@ | |
| 21 27 | 
             
                border-top-left-radius: 9px;
         | 
| 22 28 | 
             
                border-top-right-radius: 9px;
         | 
| 23 29 | 
             
                background-color: white;
         | 
| 24 | 
            -
                padding: 7px  | 
| 30 | 
            +
                padding: 7px 12% 0;
         | 
| 31 | 
            +
                box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
         | 
| 25 32 | 
             
              }
         | 
| 26 33 |  | 
| 27 34 | 
             
              h1 {
         | 
| @@ -30,19 +37,19 @@ | |
| 30 37 | 
             
                line-height: 1.5em;
         | 
| 31 38 | 
             
              }
         | 
| 32 39 |  | 
| 33 | 
            -
               | 
| 34 | 
            -
                 | 
| 35 | 
            -
                 | 
| 36 | 
            -
                padding: 1em 0;
         | 
| 40 | 
            +
              div.dialog > p {
         | 
| 41 | 
            +
                margin: 0 0 1em;
         | 
| 42 | 
            +
                padding: 1em;
         | 
| 37 43 | 
             
                background-color: #F7F7F7;
         | 
| 38 44 | 
             
                border: 1px solid #CCC;
         | 
| 39 45 | 
             
                border-right-color: #999;
         | 
| 46 | 
            +
                border-left-color: #999;
         | 
| 40 47 | 
             
                border-bottom-color: #999;
         | 
| 41 48 | 
             
                border-bottom-left-radius: 4px;
         | 
| 42 49 | 
             
                border-bottom-right-radius: 4px;
         | 
| 43 50 | 
             
                border-top-color: #DADADA;
         | 
| 44 51 | 
             
                color: #666;
         | 
| 45 | 
            -
                box-shadow:0 3px 8px rgba(50, 50, 50, 0.17);
         | 
| 52 | 
            +
                box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
         | 
| 46 53 | 
             
              }
         | 
| 47 54 | 
             
              </style>
         | 
| 48 55 | 
             
            </head>
         | 
| @@ -50,8 +57,10 @@ | |
| 50 57 | 
             
            <body>
         | 
| 51 58 | 
             
              <!-- This file lives in public/500.html -->
         | 
| 52 59 | 
             
              <div class="dialog">
         | 
| 53 | 
            -
                < | 
| 60 | 
            +
                <div>
         | 
| 61 | 
            +
                  <h1>We're sorry, but something went wrong.</h1>
         | 
| 62 | 
            +
                </div>
         | 
| 63 | 
            +
                <p>If you are the application owner check the logs for more information.</p>
         | 
| 54 64 | 
             
              </div>
         | 
| 55 | 
            -
              <p>If you are the application owner check the logs for more information.</p>
         | 
| 56 65 | 
             
            </body>
         | 
| 57 66 | 
             
            </html>
         | 
| @@ -1,14 +1,9 @@ | |
| 1 | 
            -
            ENV[ | 
| 1 | 
            +
            ENV['RAILS_ENV'] ||= 'test'
         | 
| 2 2 | 
             
            require File.expand_path('../../config/environment', __FILE__)
         | 
| 3 3 | 
             
            require 'rails/test_help'
         | 
| 4 4 |  | 
| 5 5 | 
             
            class ActiveSupport::TestCase
         | 
| 6 | 
            -
              ActiveRecord::Migration.check_pending!
         | 
| 7 | 
            -
             | 
| 8 6 | 
             
              # Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order.
         | 
| 9 | 
            -
              #
         | 
| 10 | 
            -
              # Note: You'll currently still have to declare fixtures explicitly in integration tests
         | 
| 11 | 
            -
              # -- they do not yet inherit this setting
         | 
| 12 7 | 
             
              fixtures :all
         | 
| 13 8 |  | 
| 14 9 | 
             
              # Add more helper methods to be used by all tests here...
         | 
| @@ -0,0 +1,16 @@ | |
| 1 | 
            +
            require 'test_helper'
         | 
| 2 | 
            +
            require 'generators/app_environment/app_environment_generator'
         | 
| 3 | 
            +
             | 
| 4 | 
            +
            module JsonVoorhees
         | 
| 5 | 
            +
              class AppEnvironmentGeneratorTest < Rails::Generators::TestCase
         | 
| 6 | 
            +
                tests AppEnvironmentGenerator
         | 
| 7 | 
            +
                destination Rails.root.join('tmp/generators')
         | 
| 8 | 
            +
                setup :prepare_destination
         | 
| 9 | 
            +
             | 
| 10 | 
            +
                # test "generator runs without errors" do
         | 
| 11 | 
            +
                #   assert_nothing_raised do
         | 
| 12 | 
            +
                #     run_generator ["arguments"]
         | 
| 13 | 
            +
                #   end
         | 
| 14 | 
            +
                # end
         | 
| 15 | 
            +
              end
         | 
| 16 | 
            +
            end
         | 
    
        metadata
    CHANGED
    
    | @@ -1,14 +1,14 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: json_voorhees
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 1. | 
| 4 | 
            +
              version: 1.3.0
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Cleophus Robinson
         | 
| 8 8 | 
             
            autorequire: 
         | 
| 9 9 | 
             
            bindir: bin
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date: 2014-10- | 
| 11 | 
            +
            date: 2014-10-26 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: rails
         | 
| @@ -55,13 +55,14 @@ files: | |
| 55 55 | 
             
            - app/helpers/json_voorhees/application_helper.rb
         | 
| 56 56 | 
             
            - app/views/layouts/json_voorhees/application.html.erb
         | 
| 57 57 | 
             
            - config/routes.rb
         | 
| 58 | 
            +
            - lib/generators/json_voorhees/app_environment/USAGE
         | 
| 59 | 
            +
            - lib/generators/json_voorhees/app_environment/app_environment_generator.rb
         | 
| 58 60 | 
             
            - lib/generators/json_voorhees/app_make_admin/USAGE
         | 
| 59 61 | 
             
            - lib/generators/json_voorhees/app_make_admin/app_make_admin_generator.rb
         | 
| 60 62 | 
             
            - lib/generators/json_voorhees/app_make_admin/templates/dashboard.rb.erb
         | 
| 61 63 | 
             
            - lib/generators/json_voorhees/app_make_admin/templates/defcon_admin_register.rb.erb
         | 
| 62 64 | 
             
            - lib/generators/json_voorhees/app_make_admin/templates/views/_footer.html.erb
         | 
| 63 65 | 
             
            - lib/generators/json_voorhees/app_make_admin/templates/views/_header.html.erb
         | 
| 64 | 
            -
            - lib/generators/json_voorhees/app_make_admin/templates/views/admin_home_no_user
         | 
| 65 66 | 
             
            - lib/generators/json_voorhees/app_make_admin/templates/views/admin_home_with_user
         | 
| 66 67 | 
             
            - lib/generators/json_voorhees/app_make_admin/templates/views/application
         | 
| 67 68 | 
             
            - lib/generators/json_voorhees/app_make_admin/templates/views/application.css.scss
         | 
| @@ -72,23 +73,10 @@ files: | |
| 72 73 | 
             
            - lib/generators/json_voorhees/app_make_tests/app_make_tests_generator.rb
         | 
| 73 74 | 
             
            - lib/generators/json_voorhees/app_make_tests/templates/factory.rb.erb
         | 
| 74 75 | 
             
            - lib/generators/json_voorhees/app_make_tests/templates/model.rb.erb
         | 
| 75 | 
            -
            - lib/generators/json_voorhees/app_make_tests/templates/no_auth_request.rb.erb
         | 
| 76 76 | 
             
            - lib/generators/json_voorhees/app_make_tests/templates/request.rb.erb
         | 
| 77 77 | 
             
            - lib/generators/json_voorhees/app_make_tests/templates/routing.rb.erb
         | 
| 78 78 | 
             
            - lib/generators/json_voorhees/app_make_user/USAGE
         | 
| 79 79 | 
             
            - lib/generators/json_voorhees/app_make_user/app_make_user_generator.rb
         | 
| 80 | 
            -
            - lib/generators/json_voorhees/app_make_user/templates/active_admin_register.rb.erb
         | 
| 81 | 
            -
            - lib/generators/json_voorhees/app_make_user/templates/user/include_authorization.rb
         | 
| 82 | 
            -
            - lib/generators/json_voorhees/app_make_user/templates/user/specs/factory_girl.rb
         | 
| 83 | 
            -
            - lib/generators/json_voorhees/app_make_user/templates/user/specs/model_specs.rb
         | 
| 84 | 
            -
            - lib/generators/json_voorhees/app_make_user/templates/user/specs/no_arcadex_request_specs.rb
         | 
| 85 | 
            -
            - lib/generators/json_voorhees/app_make_user/templates/user/specs/request_specs.rb
         | 
| 86 | 
            -
            - lib/generators/json_voorhees/app_make_user/templates/user/specs/route_specs.rb
         | 
| 87 | 
            -
            - lib/generators/json_voorhees/app_make_user/templates/user/user_authorizations.rb
         | 
| 88 | 
            -
            - lib/generators/json_voorhees/app_make_user/templates/user/user_controller.rb
         | 
| 89 | 
            -
            - lib/generators/json_voorhees/app_make_user/templates/user/user_model.rb
         | 
| 90 | 
            -
            - lib/generators/json_voorhees/app_make_user/templates/user/user_routes.rb
         | 
| 91 | 
            -
            - lib/generators/json_voorhees/app_make_user/templates/user/user_serializer.rb
         | 
| 92 80 | 
             
            - lib/generators/json_voorhees/app_scaffold/USAGE
         | 
| 93 81 | 
             
            - lib/generators/json_voorhees/app_scaffold/app_scaffold_generator.rb
         | 
| 94 82 | 
             
            - lib/generators/json_voorhees/create_engine/USAGE
         | 
| @@ -96,7 +84,6 @@ files: | |
| 96 84 | 
             
            - lib/generators/json_voorhees/engine_create_controller/USAGE
         | 
| 97 85 | 
             
            - lib/generators/json_voorhees/engine_create_controller/engine_create_controller_generator.rb
         | 
| 98 86 | 
             
            - lib/generators/json_voorhees/engine_create_controller/templates/controller_template.rb.erb
         | 
| 99 | 
            -
            - lib/generators/json_voorhees/engine_create_controller/templates/no_auth_controller_template.rb.erb
         | 
| 100 87 | 
             
            - lib/generators/json_voorhees/engine_create_model/USAGE
         | 
| 101 88 | 
             
            - lib/generators/json_voorhees/engine_create_model/engine_create_model_generator.rb
         | 
| 102 89 | 
             
            - lib/generators/json_voorhees/engine_create_model/templates/model.rb
         | 
| @@ -111,7 +98,6 @@ files: | |
| 111 98 | 
             
            - lib/generators/json_voorhees/setup_app/USAGE
         | 
| 112 99 | 
             
            - lib/generators/json_voorhees/setup_app/setup_app_generator.rb
         | 
| 113 100 | 
             
            - lib/generators/json_voorhees/setup_app/templates/active_admin_token_register.rb.erb
         | 
| 114 | 
            -
            - lib/generators/json_voorhees/setup_app/templates/api_controller_no_arcadex.rb
         | 
| 115 101 | 
             
            - lib/generators/json_voorhees/setup_app/templates/api_controller_with_arcadex.rb
         | 
| 116 102 | 
             
            - lib/generators/json_voorhees/setup_app/templates/app_index_controller.rb
         | 
| 117 103 | 
             
            - lib/generators/json_voorhees/setup_app/templates/hidden_rspec.rb
         | 
| @@ -173,6 +159,7 @@ files: | |
| 173 159 | 
             
            - test/fresh_copy/test_app/bin/bundle
         | 
| 174 160 | 
             
            - test/fresh_copy/test_app/bin/rails
         | 
| 175 161 | 
             
            - test/fresh_copy/test_app/bin/rake
         | 
| 162 | 
            +
            - test/fresh_copy/test_app/bin/spring
         | 
| 176 163 | 
             
            - test/fresh_copy/test_app/config.ru
         | 
| 177 164 | 
             
            - test/fresh_copy/test_app/config/application.rb
         | 
| 178 165 | 
             
            - test/fresh_copy/test_app/config/boot.rb
         | 
| @@ -181,15 +168,17 @@ files: | |
| 181 168 | 
             
            - test/fresh_copy/test_app/config/environments/development.rb
         | 
| 182 169 | 
             
            - test/fresh_copy/test_app/config/environments/production.rb
         | 
| 183 170 | 
             
            - test/fresh_copy/test_app/config/environments/test.rb
         | 
| 171 | 
            +
            - test/fresh_copy/test_app/config/initializers/assets.rb
         | 
| 184 172 | 
             
            - test/fresh_copy/test_app/config/initializers/backtrace_silencers.rb
         | 
| 173 | 
            +
            - test/fresh_copy/test_app/config/initializers/cookies_serializer.rb
         | 
| 185 174 | 
             
            - test/fresh_copy/test_app/config/initializers/filter_parameter_logging.rb
         | 
| 186 175 | 
             
            - test/fresh_copy/test_app/config/initializers/inflections.rb
         | 
| 187 176 | 
             
            - test/fresh_copy/test_app/config/initializers/mime_types.rb
         | 
| 188 | 
            -
            - test/fresh_copy/test_app/config/initializers/secret_token.rb
         | 
| 189 177 | 
             
            - test/fresh_copy/test_app/config/initializers/session_store.rb
         | 
| 190 178 | 
             
            - test/fresh_copy/test_app/config/initializers/wrap_parameters.rb
         | 
| 191 179 | 
             
            - test/fresh_copy/test_app/config/locales/en.yml
         | 
| 192 180 | 
             
            - test/fresh_copy/test_app/config/routes.rb
         | 
| 181 | 
            +
            - test/fresh_copy/test_app/config/secrets.yml
         | 
| 193 182 | 
             
            - test/fresh_copy/test_app/db/seeds.rb
         | 
| 194 183 | 
             
            - test/fresh_copy/test_app/public/404.html
         | 
| 195 184 | 
             
            - test/fresh_copy/test_app/public/422.html
         | 
| @@ -199,6 +188,7 @@ files: | |
| 199 188 | 
             
            - test/fresh_copy/test_app/test/test_helper.rb
         | 
| 200 189 | 
             
            - test/integration/navigation_test.rb
         | 
| 201 190 | 
             
            - test/json_voorhees_test.rb
         | 
| 191 | 
            +
            - test/lib/generators/json_voorhees/app_environment_generator_test.rb
         | 
| 202 192 | 
             
            - test/lib/generators/json_voorhees/app_make_admin_generator_test.rb
         | 
| 203 193 | 
             
            - test/lib/generators/json_voorhees/app_make_user_generator_test.rb
         | 
| 204 194 | 
             
            - test/lib/generators/json_voorhees/app_scaffold_generator_test.rb
         | 
| @@ -230,13 +220,14 @@ required_rubygems_version: !ruby/object:Gem::Requirement | |
| 230 220 | 
             
                  version: '0'
         | 
| 231 221 | 
             
            requirements: []
         | 
| 232 222 | 
             
            rubyforge_project: 
         | 
| 233 | 
            -
            rubygems_version: 2. | 
| 223 | 
            +
            rubygems_version: 2.2.2
         | 
| 234 224 | 
             
            signing_key: 
         | 
| 235 225 | 
             
            specification_version: 4
         | 
| 236 226 | 
             
            summary: Generators to build up a json api.
         | 
| 237 227 | 
             
            test_files:
         | 
| 238 228 | 
             
            - test/integration/navigation_test.rb
         | 
| 239 229 | 
             
            - test/lib/generators/json_voorhees/engine_create_model_generator_test.rb
         | 
| 230 | 
            +
            - test/lib/generators/json_voorhees/app_environment_generator_test.rb
         | 
| 240 231 | 
             
            - test/lib/generators/json_voorhees/app_make_user_generator_test.rb
         | 
| 241 232 | 
             
            - test/lib/generators/json_voorhees/engine_make_model_generator_test.rb
         | 
| 242 233 | 
             
            - test/lib/generators/json_voorhees/app_scaffold_generator_test.rb
         | 
| @@ -283,6 +274,7 @@ test_files: | |
| 283 274 | 
             
            - test/test_helper.rb
         | 
| 284 275 | 
             
            - test/test_script.txt
         | 
| 285 276 | 
             
            - test/fresh_copy/test_app/Gemfile.lock
         | 
| 277 | 
            +
            - test/fresh_copy/test_app/bin/spring
         | 
| 286 278 | 
             
            - test/fresh_copy/test_app/bin/rake
         | 
| 287 279 | 
             
            - test/fresh_copy/test_app/bin/rails
         | 
| 288 280 | 
             
            - test/fresh_copy/test_app/bin/bundle
         | 
| @@ -296,11 +288,12 @@ test_files: | |
| 296 288 | 
             
            - test/fresh_copy/test_app/config/locales/en.yml
         | 
| 297 289 | 
             
            - test/fresh_copy/test_app/config/application.rb
         | 
| 298 290 | 
             
            - test/fresh_copy/test_app/config/initializers/mime_types.rb
         | 
| 299 | 
            -
            - test/fresh_copy/test_app/config/initializers/secret_token.rb
         | 
| 300 291 | 
             
            - test/fresh_copy/test_app/config/initializers/inflections.rb
         | 
| 301 292 | 
             
            - test/fresh_copy/test_app/config/initializers/session_store.rb
         | 
| 302 293 | 
             
            - test/fresh_copy/test_app/config/initializers/filter_parameter_logging.rb
         | 
| 294 | 
            +
            - test/fresh_copy/test_app/config/initializers/assets.rb
         | 
| 303 295 | 
             
            - test/fresh_copy/test_app/config/initializers/backtrace_silencers.rb
         | 
| 296 | 
            +
            - test/fresh_copy/test_app/config/initializers/cookies_serializer.rb
         | 
| 304 297 | 
             
            - test/fresh_copy/test_app/config/initializers/wrap_parameters.rb
         | 
| 305 298 | 
             
            - test/fresh_copy/test_app/config/routes.rb
         | 
| 306 299 | 
             
            - test/fresh_copy/test_app/config/environment.rb
         | 
| @@ -309,6 +302,7 @@ test_files: | |
| 309 302 | 
             
            - test/fresh_copy/test_app/config/environments/test.rb
         | 
| 310 303 | 
             
            - test/fresh_copy/test_app/config/environments/development.rb
         | 
| 311 304 | 
             
            - test/fresh_copy/test_app/config/environments/production.rb
         | 
| 305 | 
            +
            - test/fresh_copy/test_app/config/secrets.yml
         | 
| 312 306 | 
             
            - test/fresh_copy/test_app/db/seeds.rb
         | 
| 313 307 | 
             
            - test/fresh_copy/test_app/Rakefile
         | 
| 314 308 | 
             
            - test/fresh_copy/test_app/README.rdoc
         | 
| @@ -1 +0,0 @@ | |
| 1 | 
            -
            <h1> Admin </h1>
         | 
| @@ -1,114 +0,0 @@ | |
| 1 | 
            -
            require "rails_helper"
         | 
| 2 | 
            -
             | 
| 3 | 
            -
            #-#-#-#-#REST#-#-#-#-#
         | 
| 4 | 
            -
            RSpec.describe ::<%= module_camel %>::V<%= api_version %>::<%= resource_camel %>, :type => :request do
         | 
| 5 | 
            -
              describe "Index" do
         | 
| 6 | 
            -
                before(:example) do
         | 
| 7 | 
            -
                end
         | 
| 8 | 
            -
                # get /api/<%= api_version %>/<%= resource_plural %>
         | 
| 9 | 
            -
                it "Gets all of the <%= resource_singular %>s" do
         | 
| 10 | 
            -
                  FactoryGirl.create_list(:<%= module_snake %>_<%= resource_singular %>_<%= api_version %>, 10)
         | 
| 11 | 
            -
                  get 'api/<%= api_version %>/<%= resource_plural %>'
         | 
| 12 | 
            -
                  expect(response.status).to eq(200) #ok
         | 
| 13 | 
            -
                  expect(::<%= module_camel %>::V<%= api_version %>::<%= resource_camel %>.count).to eq(10)
         | 
| 14 | 
            -
                  expect(json["<%= resource_plural %>"].length).to eq(10)
         | 
| 15 | 
            -
                end
         | 
| 16 | 
            -
              end
         | 
| 17 | 
            -
            end
         | 
| 18 | 
            -
            RSpec.describe ::<%= module_camel %>::V<%= api_version %>::<%= resource_camel %>, :type => :request do
         | 
| 19 | 
            -
              describe "Show" do
         | 
| 20 | 
            -
                before(:example) do
         | 
| 21 | 
            -
                end
         | 
| 22 | 
            -
                # get /api/<%= api_version %>/<%= resource_plural %>/1
         | 
| 23 | 
            -
                it "Gets a <%= resource_singular %> by id" do
         | 
| 24 | 
            -
                  <%= resource_singular %> = FactoryGirl.create(:<%= module_snake %>_<%= resource_singular %>_<%= api_version %>)
         | 
| 25 | 
            -
                  get "api/<%= api_version %>/<%= resource_plural %>/#{<%= resource_singular %>.id}"
         | 
| 26 | 
            -
                  expect(response.status).to eq(200) #ok
         | 
| 27 | 
            -
                end
         | 
| 28 | 
            -
              end
         | 
| 29 | 
            -
            end
         | 
| 30 | 
            -
            RSpec.describe ::<%= module_camel %>::V<%= api_version %>::<%= resource_camel %>, :type => :request do
         | 
| 31 | 
            -
              describe "Create" do
         | 
| 32 | 
            -
                before(:example) do
         | 
| 33 | 
            -
                end
         | 
| 34 | 
            -
                # post /api/<%= api_version %>/<%= resource_plural %>
         | 
| 35 | 
            -
                it "Creates <%= resource_singular %>" do
         | 
| 36 | 
            -
                  attrs = FactoryGirl.attributes_for(:<%= module_snake %>_<%= resource_singular %>_<%= api_version %>)
         | 
| 37 | 
            -
                  #attrs[:column] = "LaunchU"  
         | 
| 38 | 
            -
                  hash = {"<%= resource_singular %>" => attrs}
         | 
| 39 | 
            -
                  post 'api/<%= api_version %>/<%= resource_plural %>', hash
         | 
| 40 | 
            -
                  expect(response.status).to eq(200) #ok
         | 
| 41 | 
            -
                end
         | 
| 42 | 
            -
              end
         | 
| 43 | 
            -
            end
         | 
| 44 | 
            -
            RSpec.describe ::<%= module_camel %>::V<%= api_version %>::<%= resource_camel %>, :type => :request do
         | 
| 45 | 
            -
              describe "Update" do
         | 
| 46 | 
            -
                before(:example) do
         | 
| 47 | 
            -
                end
         | 
| 48 | 
            -
                # patch/put /api/<%= api_version %>/<%= resource_plural %>/1
         | 
| 49 | 
            -
                it "Updates <%= resource_singular %>" do
         | 
| 50 | 
            -
                  #Create the <%= resource_singular %> through the api
         | 
| 51 | 
            -
                  attrs = FactoryGirl.attributes_for(:<%= module_snake %>_<%= resource_singular %>_<%= api_version %>)
         | 
| 52 | 
            -
                  #attrs[:column] = "LaunchU"  
         | 
| 53 | 
            -
                  <%= resource_singular %> = FactoryGirl.create(:<%= module_snake %>_<%= resource_singular %>_<%= api_version %>)
         | 
| 54 | 
            -
                  #Now update the created <%= resource_singular %> by changing the <%= resource_singular %>name
         | 
| 55 | 
            -
                  #attrs[:column] = "BlastOff"
         | 
| 56 | 
            -
                  hash = {"<%= resource_singular %>" => attrs}
         | 
| 57 | 
            -
                  put "api/<%= api_version %>/<%= resource_plural %>/#{<%= resource_singular %>.id}", hash
         | 
| 58 | 
            -
                  expect(response.status).to eq(200) #ok
         | 
| 59 | 
            -
                end
         | 
| 60 | 
            -
              end
         | 
| 61 | 
            -
            end
         | 
| 62 | 
            -
            RSpec.describe ::<%= module_camel %>::V<%= api_version %>::<%= resource_camel %>, :type => :request do
         | 
| 63 | 
            -
              describe "Destroy" do
         | 
| 64 | 
            -
                before(:example) do
         | 
| 65 | 
            -
                end
         | 
| 66 | 
            -
                # delete /api/<%= api_version %>/<%= resource_plural %>/1
         | 
| 67 | 
            -
                it "Deletes <%= resource_singular %>" do
         | 
| 68 | 
            -
                  #Create the <%= resource_singular %> through the api
         | 
| 69 | 
            -
                  attrs = FactoryGirl.attributes_for(:<%= module_snake %>_<%= resource_singular %>_<%= api_version %>)
         | 
| 70 | 
            -
                  #attrs[:column] = "LaunchU"  
         | 
| 71 | 
            -
                  <%= resource_singular %> = FactoryGirl.create(:<%= module_snake %>_<%= resource_singular %>_<%= api_version %>)
         | 
| 72 | 
            -
                  expect(<%= module_camel %>::V<%= api_version %>::<%= resource_camel %>.count).to eq(1)
         | 
| 73 | 
            -
                  #Now delete the <%= resource_singular %> through the api
         | 
| 74 | 
            -
                  delete "api/<%= api_version %>/<%= resource_plural %>/#{<%= resource_singular %>.id}"
         | 
| 75 | 
            -
                  expect(json).to eq({})
         | 
| 76 | 
            -
                  expect(response.status).to eq(200) #ok
         | 
| 77 | 
            -
                  expect(<%= module_camel %>::V<%= api_version %>::<%= resource_camel %>.count).to eq(0)
         | 
| 78 | 
            -
                end
         | 
| 79 | 
            -
              end
         | 
| 80 | 
            -
            end
         | 
| 81 | 
            -
            #-#-#-#-#Collection Routes#-#-#-#-#
         | 
| 82 | 
            -
            RSpec.describe ::<%= module_camel %>::V<%= api_version %>::<%= resource_camel %>, :type => :request do
         | 
| 83 | 
            -
              describe "Collection Routes" do
         | 
| 84 | 
            -
                before(:example) do
         | 
| 85 | 
            -
                end
         | 
| 86 | 
            -
                # get /api/1/collection
         | 
| 87 | 
            -
                it "checks response of a collection route" do
         | 
| 88 | 
            -
             | 
| 89 | 
            -
                end
         | 
| 90 | 
            -
              end
         | 
| 91 | 
            -
            end
         | 
| 92 | 
            -
            #-#-#-#-#Serialization#-#-#-#-#
         | 
| 93 | 
            -
            RSpec.describe ::<%= module_camel %>::V<%= api_version %>::<%= resource_camel %>, :type => :request do
         | 
| 94 | 
            -
              describe "Serialization" do
         | 
| 95 | 
            -
                before(:example) do
         | 
| 96 | 
            -
                end
         | 
| 97 | 
            -
                it "checks the index json sent back" do
         | 
| 98 | 
            -
             | 
| 99 | 
            -
                end
         | 
| 100 | 
            -
              end
         | 
| 101 | 
            -
            end
         | 
| 102 | 
            -
            #-#-#-#-#Errors#-#-#-#-#
         | 
| 103 | 
            -
            RSpec.describe ::<%= module_camel %>::V<%= api_version %>::<%= resource_camel %>, :type => :request do
         | 
| 104 | 
            -
              describe "Errors" do
         | 
| 105 | 
            -
                before(:example) do
         | 
| 106 | 
            -
                end
         | 
| 107 | 
            -
                # get /api/<%= api_version %>/<%= resource_plural %>/1
         | 
| 108 | 
            -
                it "checks for a 404" do
         | 
| 109 | 
            -
                  <%= resource_singular %> = FactoryGirl.create(:<%= module_snake %>_<%= resource_singular %>_<%= api_version %>)
         | 
| 110 | 
            -
                  get "api/<%= api_version %>/<%= resource_plural %>/#{<%= resource_singular %>.id + 1}", nil, @header
         | 
| 111 | 
            -
                  expect(response.status).to eq(404) #ok
         | 
| 112 | 
            -
                end
         | 
| 113 | 
            -
              end
         | 
| 114 | 
            -
            end
         |