voyage 1.44.0.7 → 1.44.0.8
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/LICENSE +1 -1
 - data/README.md +5 -2
 - data/lib/suspenders/adapters/heroku.rb +9 -0
 - data/lib/suspenders/app_builder.rb +4 -3
 - data/lib/suspenders/generators/app_generator.rb +1 -0
 - data/lib/voyage/app_builder.rb +41 -2
 - data/lib/voyage/generators/app_generator.rb +20 -0
 - data/lib/voyage/templates/Gemfile.erb +3 -3
 - data/lib/voyage/templates/config_dj_rails5_patches.rb +20 -0
 - data/lib/voyage/templates/favicon.ico +0 -0
 - data/lib/voyage/templates/rails_helper.rb.erb +1 -1
 - data/lib/voyage/templates/rubocop.yml +1 -0
 - data/lib/voyage/templates/voyage_layout.html.erb.erb +7 -2
 - data/lib/voyage/version.rb +2 -2
 - data/spec/adapters/heroku_spec.rb +15 -0
 - data/spec/features/new_project_spec.rb +9 -1
 - data/templates/_analytics.html.erb +4 -3
 - data/templates/bin_setup_review_app.erb +4 -1
 - data/templates/bundler_audit.rake +2 -10
 - metadata +7 -5
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA1:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 1a7660253e2c6e4fc6f64ad2e6edcd40a1b8927b
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 24ac8a58416d07799c43e391399e597a5707ef37
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 40ccda0ba49723dabca96ea51e0fea2d9a17884acbfefa5ae997d15d28292035b65bb93b76d4ca4fa8b7919a7499b36251047e650eaef6ea97f6357bfb96a1df
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: 292dfb3e8a16c2e15decc2f0a827116d82ec4761f4014689380e09bf04d191a4965f97d603c09679c5e2d96eb18188c18fce6f9f2544b4cdd8e1eebd6cdb8c2c
         
     | 
    
        data/LICENSE
    CHANGED
    
    
    
        data/README.md
    CHANGED
    
    | 
         @@ -130,6 +130,7 @@ This: 
     | 
|
| 
       130 
130 
     | 
    
         
             
            * Configures staging with `RACK_ENV` environment variable set
         
     | 
| 
       131 
131 
     | 
    
         
             
              to `staging`
         
     | 
| 
       132 
132 
     | 
    
         
             
            * Creates a [Heroku Pipeline] for review apps
         
     | 
| 
      
 133 
     | 
    
         
            +
            * Schedules automated backups for 10AM UTC for both `staging` and `production`
         
     | 
| 
       133 
134 
     | 
    
         | 
| 
       134 
135 
     | 
    
         
             
            [Heroku Pipeline]: https://devcenter.heroku.com/articles/pipelines
         
     | 
| 
       135 
136 
     | 
    
         | 
| 
         @@ -205,7 +206,7 @@ Thank you, [contributors]! 
     | 
|
| 
       205 
206 
     | 
    
         | 
| 
       206 
207 
     | 
    
         
             
            ## License
         
     | 
| 
       207 
208 
     | 
    
         | 
| 
       208 
     | 
    
         
            -
            Suspenders is Copyright © 2008- 
     | 
| 
      
 209 
     | 
    
         
            +
            Suspenders is Copyright © 2008-2017 thoughtbot.
         
     | 
| 
       209 
210 
     | 
    
         
             
            It is free software,
         
     | 
| 
       210 
211 
     | 
    
         
             
            and may be redistributed under the terms specified in the [LICENSE] file.
         
     | 
| 
       211 
212 
     | 
    
         | 
| 
         @@ -213,7 +214,7 @@ and may be redistributed under the terms specified in the [LICENSE] file. 
     | 
|
| 
       213 
214 
     | 
    
         | 
| 
       214 
215 
     | 
    
         
             
            ## About thoughtbot
         
     | 
| 
       215 
216 
     | 
    
         | 
| 
       216 
     | 
    
         
            -
            ![thoughtbot] 
     | 
| 
      
 217 
     | 
    
         
            +
            [![thoughtbot][thoughtbot-logo]][thoughtbot]
         
     | 
| 
       217 
218 
     | 
    
         | 
| 
       218 
219 
     | 
    
         
             
            Suspenders is maintained and funded by thoughtbot, inc.
         
     | 
| 
       219 
220 
     | 
    
         
             
            The names and logos for thoughtbot are trademarks of thoughtbot, inc.
         
     | 
| 
         @@ -222,5 +223,7 @@ We love open source software! 
     | 
|
| 
       222 
223 
     | 
    
         
             
            See [our other projects][community].
         
     | 
| 
       223 
224 
     | 
    
         
             
            We are [available for hire][hire].
         
     | 
| 
       224 
225 
     | 
    
         | 
| 
      
 226 
     | 
    
         
            +
            [thoughtbot]: https://thoughtbot.com?utm_source=github
         
     | 
| 
      
 227 
     | 
    
         
            +
            [thoughtbot-logo]: http://presskit.thoughtbot.com/images/thoughtbot-logo-for-readmes.svg
         
     | 
| 
       225 
228 
     | 
    
         
             
            [community]: https://thoughtbot.com/community?utm_source=github
         
     | 
| 
       226 
229 
     | 
    
         
             
            [hire]: https://thoughtbot.com?utm_source=github
         
     | 
| 
         @@ -37,6 +37,15 @@ module Suspenders 
     | 
|
| 
       37 
37 
     | 
    
         
             
                    end
         
     | 
| 
       38 
38 
     | 
    
         
             
                  end
         
     | 
| 
       39 
39 
     | 
    
         | 
| 
      
 40 
     | 
    
         
            +
                  def set_heroku_backup_schedule
         
     | 
| 
      
 41 
     | 
    
         
            +
                    %w(staging production).each do |environment|
         
     | 
| 
      
 42 
     | 
    
         
            +
                      run_toolbelt_command(
         
     | 
| 
      
 43 
     | 
    
         
            +
                        "pg:backups:schedule DATABASE_URL --at '10:00 UTC'",
         
     | 
| 
      
 44 
     | 
    
         
            +
                        environment,
         
     | 
| 
      
 45 
     | 
    
         
            +
                      )
         
     | 
| 
      
 46 
     | 
    
         
            +
                    end
         
     | 
| 
      
 47 
     | 
    
         
            +
                  end
         
     | 
| 
      
 48 
     | 
    
         
            +
             
     | 
| 
       40 
49 
     | 
    
         
             
                  def create_review_apps_setup_script
         
     | 
| 
       41 
50 
     | 
    
         
             
                    app_builder.template(
         
     | 
| 
       42 
51 
     | 
    
         
             
                      "bin_setup_review_app.erb",
         
     | 
| 
         @@ -12,6 +12,7 @@ module Suspenders 
     | 
|
| 
       12 
12 
     | 
    
         
             
                               :create_staging_heroku_app,
         
     | 
| 
       13 
13 
     | 
    
         
             
                               :create_review_apps_setup_script,
         
     | 
| 
       14 
14 
     | 
    
         
             
                               :set_heroku_rails_secrets,
         
     | 
| 
      
 15 
     | 
    
         
            +
                               :set_heroku_backup_schedule,
         
     | 
| 
       15 
16 
     | 
    
         
             
                               :set_heroku_remotes,
         
     | 
| 
       16 
17 
     | 
    
         
             
                               :set_heroku_application_host
         
     | 
| 
       17 
18 
     | 
    
         | 
| 
         @@ -370,8 +371,8 @@ Rack::Timeout.timeout = (ENV["RACK_TIMEOUT"] || 10).to_i 
     | 
|
| 
       370 
371 
     | 
    
         
             
            If you have previously run the `./bin/setup` script,
         
     | 
| 
       371 
372 
     | 
    
         
             
            you can deploy to staging and production with:
         
     | 
| 
       372 
373 
     | 
    
         | 
| 
       373 
     | 
    
         
            -
                 
     | 
| 
       374 
     | 
    
         
            -
                 
     | 
| 
      
 374 
     | 
    
         
            +
                % ./bin/deploy staging
         
     | 
| 
      
 375 
     | 
    
         
            +
                % ./bin/deploy production
         
     | 
| 
       375 
376 
     | 
    
         
             
                  MARKDOWN
         
     | 
| 
       376 
377 
     | 
    
         | 
| 
       377 
378 
     | 
    
         
             
                  append_file "README.md", instructions
         
     | 
| 
         @@ -401,7 +402,7 @@ you can deploy to staging and production with: 
     | 
|
| 
       401 
402 
     | 
    
         | 
| 
       402 
403 
     | 
    
         
             
                def setup_bundler_audit
         
     | 
| 
       403 
404 
     | 
    
         
             
                  copy_file "bundler_audit.rake", "lib/tasks/bundler_audit.rake"
         
     | 
| 
       404 
     | 
    
         
            -
                  append_file "Rakefile", %{\ntask default: " 
     | 
| 
      
 405 
     | 
    
         
            +
                  append_file "Rakefile", %{\ntask default: "bundle:audit"\n}
         
     | 
| 
       405 
406 
     | 
    
         
             
                end
         
     | 
| 
       406 
407 
     | 
    
         | 
| 
       407 
408 
     | 
    
         
             
                def setup_spring
         
     | 
    
        data/lib/voyage/app_builder.rb
    CHANGED
    
    | 
         @@ -198,7 +198,7 @@ module Suspenders 
     | 
|
| 
       198 
198 
     | 
    
         
             
                    protected
         
     | 
| 
       199 
199 
     | 
    
         | 
| 
       200 
200 
     | 
    
         
             
                    def devise_or_pages_controller?
         
     | 
| 
       201 
     | 
    
         
            -
                      devise_controller? || is_a?(HighVoltage::PagesController)
         
     | 
| 
      
 201 
     | 
    
         
            +
                      devise_controller? == true || is_a?(HighVoltage::PagesController)
         
     | 
| 
       202 
202 
     | 
    
         
             
                    end
         
     | 
| 
       203 
203 
     | 
    
         | 
| 
       204 
204 
     | 
    
         
             
                    def sanitize_hash_javascript(hash)
         
     | 
| 
         @@ -539,6 +539,9 @@ module Suspenders 
     | 
|
| 
       539 
539 
     | 
    
         
             
                def generate_data_migrations
         
     | 
| 
       540 
540 
     | 
    
         
             
                  generate 'data_migrations:install'
         
     | 
| 
       541 
541 
     | 
    
         | 
| 
      
 542 
     | 
    
         
            +
                  file = Dir['db/migrate/*_create_data_migrations.rb'].first
         
     | 
| 
      
 543 
     | 
    
         
            +
                  replace_in_file file, 'class CreateDataMigrations < ActiveRecord::Migration', "class CreateDataMigrations < ActiveRecord::Migration[4.2]"
         
     | 
| 
      
 544 
     | 
    
         
            +
             
     | 
| 
       542 
545 
     | 
    
         
             
                  empty_directory_with_keep_file 'db/data_migrate'
         
     | 
| 
       543 
546 
     | 
    
         
             
                end
         
     | 
| 
       544 
547 
     | 
    
         | 
| 
         @@ -567,7 +570,7 @@ module Suspenders 
     | 
|
| 
       567 
570 
     | 
    
         
             
                # --------
         
     | 
| 
       568 
571 
     | 
    
         
             
                def downgrade_neat_1_8_so_refills_media_mixin_works
         
     | 
| 
       569 
572 
     | 
    
         
             
                  replace_in_file 'Gemfile', "gem 'neat', '~> 2.0.0.beta.1'", "gem 'neat', '~> 1.8.0'"
         
     | 
| 
       570 
     | 
    
         
            -
                  run 'gem uninstall -x neat -v2.0.0 
     | 
| 
      
 573 
     | 
    
         
            +
                  run 'gem uninstall -x neat -v2.0.0'
         
     | 
| 
       571 
574 
     | 
    
         
             
                  run 'bundle'
         
     | 
| 
       572 
575 
     | 
    
         
             
                end
         
     | 
| 
       573 
576 
     | 
    
         
             
                # ------------
         
     | 
| 
         @@ -593,6 +596,18 @@ module Suspenders 
     | 
|
| 
       593 
596 
     | 
    
         
             
                  end
         
     | 
| 
       594 
597 
     | 
    
         
             
                end
         
     | 
| 
       595 
598 
     | 
    
         | 
| 
      
 599 
     | 
    
         
            +
                def add_app_css_file
         
     | 
| 
      
 600 
     | 
    
         
            +
                  create_file "app/assets/stylesheets/#{app_name}.sass" do <<-RUBY.gsub(/^ {8}/, '')
         
     | 
| 
      
 601 
     | 
    
         
            +
                    .main-content
         
     | 
| 
      
 602 
     | 
    
         
            +
                      padding: 18px
         
     | 
| 
      
 603 
     | 
    
         
            +
                    RUBY
         
     | 
| 
      
 604 
     | 
    
         
            +
                  end
         
     | 
| 
      
 605 
     | 
    
         
            +
                end
         
     | 
| 
      
 606 
     | 
    
         
            +
             
     | 
| 
      
 607 
     | 
    
         
            +
                def update_flashes_css_file
         
     | 
| 
      
 608 
     | 
    
         
            +
                  replace_in_file 'app/assets/stylesheets/refills/_flashes.scss', "margin-bottom: $base-spacing / 2;", "// margin-bottom: $base-spacing / 2;"
         
     | 
| 
      
 609 
     | 
    
         
            +
                end
         
     | 
| 
      
 610 
     | 
    
         
            +
             
     | 
| 
       596 
611 
     | 
    
         
             
                def add_admin_links_to_navigation
         
     | 
| 
       597 
612 
     | 
    
         
             
                  return unless @@use_devise
         
     | 
| 
       598 
613 
     | 
    
         
             
                  inject_into_file 'app/views/refills/_navigation.html.erb', after: '        <li class="nav-link"><a href="javascript:void(0)">Contact</a></li>'  do <<-RUBY
         
     | 
| 
         @@ -604,6 +619,12 @@ module Suspenders 
     | 
|
| 
       604 
619 
     | 
    
         
             
                        <li class="nav-link"><a href="/admin/users">Admin</a></li>
         
     | 
| 
       605 
620 
     | 
    
         
             
                      <% end %>
         
     | 
| 
       606 
621 
     | 
    
         
             
                    <% end %>
         
     | 
| 
      
 622 
     | 
    
         
            +
             
     | 
| 
      
 623 
     | 
    
         
            +
                    <% if current_user %>
         
     | 
| 
      
 624 
     | 
    
         
            +
                      <li class='nav-link'><%= link_to 'Sign Out', sign_out_path %></li>
         
     | 
| 
      
 625 
     | 
    
         
            +
                    <% else %>
         
     | 
| 
      
 626 
     | 
    
         
            +
                      <li class='nav-link'><%= link_to 'Sign In', sign_in_path %></li>
         
     | 
| 
      
 627 
     | 
    
         
            +
                    <% end %>
         
     | 
| 
       607 
628 
     | 
    
         
             
                    RUBY
         
     | 
| 
       608 
629 
     | 
    
         
             
                  end
         
     | 
| 
       609 
630 
     | 
    
         
             
                end
         
     | 
| 
         @@ -612,6 +633,8 @@ module Suspenders 
     | 
|
| 
       612 
633 
     | 
    
         
             
                  inject_into_file 'app/assets/stylesheets/application.scss', after: '@import "refills/flashes";'  do <<-RUBY.gsub(/^ {8}/, '')
         
     | 
| 
       613 
634 
     | 
    
         
             
                    \n@import "refills/navigation";
         
     | 
| 
       614 
635 
     | 
    
         
             
                    @import "refills/footer";
         
     | 
| 
      
 636 
     | 
    
         
            +
             
     | 
| 
      
 637 
     | 
    
         
            +
                    @import "#{app_name}";
         
     | 
| 
       615 
638 
     | 
    
         
             
                    RUBY
         
     | 
| 
       616 
639 
     | 
    
         
             
                  end
         
     | 
| 
       617 
640 
     | 
    
         
             
                end
         
     | 
| 
         @@ -655,6 +678,15 @@ module Suspenders 
     | 
|
| 
       655 
678 
     | 
    
         
             
                  template '../templates/auto_annotate_models.rake', 'lib/tasks/auto_annotate_models.rake', force: true
         
     | 
| 
       656 
679 
     | 
    
         
             
                end
         
     | 
| 
       657 
680 
     | 
    
         | 
| 
      
 681 
     | 
    
         
            +
                def update_delayed_job_migration_rails_5_1_specify_4_2
         
     | 
| 
      
 682 
     | 
    
         
            +
                  file = Dir['db/migrate/*_create_delayed_jobs.rb'].first
         
     | 
| 
      
 683 
     | 
    
         
            +
                  replace_in_file file, 'class CreateDelayedJobs < ActiveRecord::Migration', "class CreateDelayedJobs < ActiveRecord::Migration[4.2]"
         
     | 
| 
      
 684 
     | 
    
         
            +
                end
         
     | 
| 
      
 685 
     | 
    
         
            +
             
     | 
| 
      
 686 
     | 
    
         
            +
                def add_favicon
         
     | 
| 
      
 687 
     | 
    
         
            +
                  template '../templates/favicon.ico', 'app/assets/images/favicon.ico', force: true
         
     | 
| 
      
 688 
     | 
    
         
            +
                end
         
     | 
| 
      
 689 
     | 
    
         
            +
             
     | 
| 
       658 
690 
     | 
    
         
             
                # Do this last
         
     | 
| 
       659 
691 
     | 
    
         
             
                def rake_db_setup
         
     | 
| 
       660 
692 
     | 
    
         
             
                  rake 'db:migrate'
         
     | 
| 
         @@ -729,6 +761,11 @@ module Suspenders 
     | 
|
| 
       729 
761 
     | 
    
         
             
                  template '../templates/analytics_identify.html.erb.erb', 'app/views/application/_analytics_identify.html.erb', force: true
         
     | 
| 
       730 
762 
     | 
    
         
             
                end
         
     | 
| 
       731 
763 
     | 
    
         | 
| 
      
 764 
     | 
    
         
            +
                def create_database
         
     | 
| 
      
 765 
     | 
    
         
            +
                  # Suspenders version also migrates, we don't want that yet... we migrate in the rake_db_setup method
         
     | 
| 
      
 766 
     | 
    
         
            +
                  bundle_command 'exec rake db:create'
         
     | 
| 
      
 767 
     | 
    
         
            +
                end
         
     | 
| 
      
 768 
     | 
    
         
            +
             
     | 
| 
       732 
769 
     | 
    
         
             
                # --------------------------------
         
     | 
| 
       733 
770 
     | 
    
         
             
                # setup_test_environment overrides
         
     | 
| 
       734 
771 
     | 
    
         
             
                # --------------------------------
         
     | 
| 
         @@ -741,6 +778,8 @@ module Suspenders 
     | 
|
| 
       741 
778 
     | 
    
         
             
                end
         
     | 
| 
       742 
779 
     | 
    
         | 
| 
       743 
780 
     | 
    
         
             
                def configure_background_jobs_for_rspec
         
     | 
| 
      
 781 
     | 
    
         
            +
                  # template '../templates/config_dj_rails5_patches.rb', 'config/dj_rails5_patches.rb', force: true
         
     | 
| 
      
 782 
     | 
    
         
            +
             
     | 
| 
       744 
783 
     | 
    
         
             
                  run 'rails g delayed_job:active_record'
         
     | 
| 
       745 
784 
     | 
    
         
             
                end
         
     | 
| 
       746 
785 
     | 
    
         | 
| 
         @@ -33,11 +33,15 @@ module Suspenders 
     | 
|
| 
       33 
33 
     | 
    
         
             
                  invoke :add_high_voltage_static_pages
         
     | 
| 
       34 
34 
     | 
    
         
             
                  invoke :downgrade_neat_1_8_so_refills_media_mixin_works # this should be temporary until they get refills re-written to take advantage of Neat 2.0
         
     | 
| 
       35 
35 
     | 
    
         
             
                  invoke :generate_refills
         
     | 
| 
      
 36 
     | 
    
         
            +
                  invoke :add_app_css_file
         
     | 
| 
      
 37 
     | 
    
         
            +
                  invoke :update_flashes_css_file
         
     | 
| 
       36 
38 
     | 
    
         
             
                  invoke :overwrite_application_layout
         
     | 
| 
       37 
39 
     | 
    
         
             
                  invoke :generate_test_environment
         
     | 
| 
       38 
40 
     | 
    
         
             
                  invoke :update_test_environment
         
     | 
| 
       39 
41 
     | 
    
         
             
                  invoke :add_rubocop_config
         
     | 
| 
       40 
42 
     | 
    
         
             
                  invoke :add_auto_annotate_models_rake_task
         
     | 
| 
      
 43 
     | 
    
         
            +
                  invoke :update_delayed_job_migration_rails_5_1_specify_4_2
         
     | 
| 
      
 44 
     | 
    
         
            +
                  invoke :add_favicon
         
     | 
| 
       41 
45 
     | 
    
         | 
| 
       42 
46 
     | 
    
         | 
| 
       43 
47 
     | 
    
         
             
                  # Do these last
         
     | 
| 
         @@ -91,6 +95,14 @@ module Suspenders 
     | 
|
| 
       91 
95 
     | 
    
         
             
                  build :generate_refills
         
     | 
| 
       92 
96 
     | 
    
         
             
                end
         
     | 
| 
       93 
97 
     | 
    
         | 
| 
      
 98 
     | 
    
         
            +
                def add_app_css_file
         
     | 
| 
      
 99 
     | 
    
         
            +
                  build :add_app_css_file
         
     | 
| 
      
 100 
     | 
    
         
            +
                end
         
     | 
| 
      
 101 
     | 
    
         
            +
             
     | 
| 
      
 102 
     | 
    
         
            +
                def update_flashes_css_file
         
     | 
| 
      
 103 
     | 
    
         
            +
                  build :update_flashes_css_file
         
     | 
| 
      
 104 
     | 
    
         
            +
                end
         
     | 
| 
      
 105 
     | 
    
         
            +
             
     | 
| 
       94 
106 
     | 
    
         
             
                def overwrite_application_layout
         
     | 
| 
       95 
107 
     | 
    
         
             
                  build :overwrite_application_layout
         
     | 
| 
       96 
108 
     | 
    
         
             
                end
         
     | 
| 
         @@ -111,6 +123,14 @@ module Suspenders 
     | 
|
| 
       111 
123 
     | 
    
         
             
                  build :add_auto_annotate_models_rake_task
         
     | 
| 
       112 
124 
     | 
    
         
             
                end
         
     | 
| 
       113 
125 
     | 
    
         | 
| 
      
 126 
     | 
    
         
            +
                def update_delayed_job_migration_rails_5_1_specify_4_2
         
     | 
| 
      
 127 
     | 
    
         
            +
                  build :update_delayed_job_migration_rails_5_1_specify_4_2
         
     | 
| 
      
 128 
     | 
    
         
            +
                end
         
     | 
| 
      
 129 
     | 
    
         
            +
             
     | 
| 
      
 130 
     | 
    
         
            +
                def add_favicon
         
     | 
| 
      
 131 
     | 
    
         
            +
                  build :add_favicon
         
     | 
| 
      
 132 
     | 
    
         
            +
                end
         
     | 
| 
      
 133 
     | 
    
         
            +
             
     | 
| 
       114 
134 
     | 
    
         
             
                def rake_db_setup
         
     | 
| 
       115 
135 
     | 
    
         
             
                  build :rake_db_setup
         
     | 
| 
       116 
136 
     | 
    
         
             
                end
         
     | 
| 
         @@ -13,14 +13,13 @@ gem "normalize-rails", "~> 3.0.0" 
     | 
|
| 
       13 
13 
     | 
    
         
             
            gem "pg"
         
     | 
| 
       14 
14 
     | 
    
         
             
            gem "puma"
         
     | 
| 
       15 
15 
     | 
    
         
             
            gem "rack-canonical-host"
         
     | 
| 
       16 
     | 
    
         
            -
             
     | 
| 
       17 
     | 
    
         
            -
            gem 'rails', git: 'https://github.com/rails/rails.git', branch: '5-0-stable' # OMG Fix deprecation warnings...
         
     | 
| 
      
 16 
     | 
    
         
            +
            gem "rails", "<%= Voyage::RAILS_VERSION %>"
         
     | 
| 
       18 
17 
     | 
    
         
             
            gem "recipient_interceptor"
         
     | 
| 
       19 
18 
     | 
    
         
             
            gem "sass-rails", "~> 5.0"
         
     | 
| 
       20 
19 
     | 
    
         
             
            gem "simple_form"
         
     | 
| 
       21 
20 
     | 
    
         
             
            gem "skylight"
         
     | 
| 
       22 
21 
     | 
    
         
             
            gem "sprockets", ">= 3.0.0"
         
     | 
| 
       23 
     | 
    
         
            -
            gem ' 
     | 
| 
      
 22 
     | 
    
         
            +
            gem 'voyage'
         
     | 
| 
       24 
23 
     | 
    
         
             
            gem "title"
         
     | 
| 
       25 
24 
     | 
    
         
             
            gem "uglifier"
         
     | 
| 
       26 
25 
     | 
    
         | 
| 
         @@ -77,6 +76,7 @@ group :development do 
     | 
|
| 
       77 
76 
     | 
    
         
             
              gem 'better_errors' # A better error page for rails when a local 500 (or similar) is thrown
         
     | 
| 
       78 
77 
     | 
    
         
             
              gem 'binding_of_caller' # REPL in better_errors to debug in the browser at the point at which it failed
         
     | 
| 
       79 
78 
     | 
    
         
             
              gem 'bitters', '~> 1.3'
         
     | 
| 
      
 79 
     | 
    
         
            +
              gem 'fix-db-schema-conflicts' # when working with multiple developers schema order of columns is standardized.
         
     | 
| 
       80 
80 
     | 
    
         
             
              gem 'meta_request' # for chrome rails console plugin found here: https://chrome.google.com/webstore/detail/railspanel/gjpfobpafnhjhbajcjgccbbdofdckggg?hl=en-US
         
     | 
| 
       81 
81 
     | 
    
         
             
              gem 'rails-erd' # auto gen ERD Diagram of models in the app on rake db:migrate
         
     | 
| 
       82 
82 
     | 
    
         
             
              gem 'redcarpet' # used to render the readme inside a static welcome page from the high_voltage gem
         
     | 
| 
         @@ -0,0 +1,20 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            # RAILS 5 patches for delayed_job
         
     | 
| 
      
 2 
     | 
    
         
            +
            # TODO: REMOVE WHEN upstream is updated
         
     | 
| 
      
 3 
     | 
    
         
            +
             
     | 
| 
      
 4 
     | 
    
         
            +
            module DelayedWorkerPatches
         
     | 
| 
      
 5 
     | 
    
         
            +
              def reload!
         
     | 
| 
      
 6 
     | 
    
         
            +
                return unless self.class.reload_app?
         
     | 
| 
      
 7 
     | 
    
         
            +
                if defined?(ActiveSupport::Reloader)
         
     | 
| 
      
 8 
     | 
    
         
            +
                  Rails.application.reloader.reload!
         
     | 
| 
      
 9 
     | 
    
         
            +
                else
         
     | 
| 
      
 10 
     | 
    
         
            +
                  ActionDispatch::Reloader.cleanup!
         
     | 
| 
      
 11 
     | 
    
         
            +
                  ActionDispatch::Reloader.prepare!
         
     | 
| 
      
 12 
     | 
    
         
            +
                end
         
     | 
| 
      
 13 
     | 
    
         
            +
              end
         
     | 
| 
      
 14 
     | 
    
         
            +
            end
         
     | 
| 
      
 15 
     | 
    
         
            +
             
     | 
| 
      
 16 
     | 
    
         
            +
            module Delayed
         
     | 
| 
      
 17 
     | 
    
         
            +
              class Worker
         
     | 
| 
      
 18 
     | 
    
         
            +
                prepend DelayedWorkerPatches
         
     | 
| 
      
 19 
     | 
    
         
            +
              end
         
     | 
| 
      
 20 
     | 
    
         
            +
            end
         
     | 
| 
         Binary file 
     | 
| 
         @@ -26,12 +26,17 @@ 
     | 
|
| 
       26 
26 
     | 
    
         
             
                <%%= render 'flashes' -%>
         
     | 
| 
       27 
27 
     | 
    
         
             
                <%% if devise_controller? %>
         
     | 
| 
       28 
28 
     | 
    
         
             
                  <% if config[:add_refills] %><%%= render 'refills/navigation' %><% end %>
         
     | 
| 
       29 
     | 
    
         
            -
                   
     | 
| 
      
 29 
     | 
    
         
            +
                  <div class='main-content'>
         
     | 
| 
      
 30 
     | 
    
         
            +
                    <%%= yield %>
         
     | 
| 
      
 31 
     | 
    
         
            +
                  </div>
         
     | 
| 
       30 
32 
     | 
    
         
             
                <%% else %>
         
     | 
| 
       31 
33 
     | 
    
         
             
                  <div class='grid-offset'>
         
     | 
| 
       32 
34 
     | 
    
         
             
                    <div class='work-area'>
         
     | 
| 
       33 
35 
     | 
    
         
             
                      <% if config[:add_refills] %><%%= render 'refills/navigation' %><% end %>
         
     | 
| 
       34 
     | 
    
         
            -
             
     | 
| 
      
 36 
     | 
    
         
            +
             
     | 
| 
      
 37 
     | 
    
         
            +
                      <div class='main-content'>
         
     | 
| 
      
 38 
     | 
    
         
            +
                        <%%= yield %>
         
     | 
| 
      
 39 
     | 
    
         
            +
                      </div>
         
     | 
| 
       35 
40 
     | 
    
         
             
                    </div>
         
     | 
| 
       36 
41 
     | 
    
         
             
                  </div>
         
     | 
| 
       37 
42 
     | 
    
         
             
                <%% end %>
         
     | 
    
        data/lib/voyage/version.rb
    CHANGED
    
    
| 
         @@ -30,6 +30,16 @@ module Suspenders 
     | 
|
| 
       30 
30 
     | 
    
         
             
                    )
         
     | 
| 
       31 
31 
     | 
    
         
             
                  end
         
     | 
| 
       32 
32 
     | 
    
         | 
| 
      
 33 
     | 
    
         
            +
                  it "sets the heroku backup schedule" do
         
     | 
| 
      
 34 
     | 
    
         
            +
                    app_builder = double(app_name: app_name)
         
     | 
| 
      
 35 
     | 
    
         
            +
                    allow(app_builder).to receive(:run)
         
     | 
| 
      
 36 
     | 
    
         
            +
             
     | 
| 
      
 37 
     | 
    
         
            +
                    Heroku.new(app_builder).set_heroku_backup_schedule
         
     | 
| 
      
 38 
     | 
    
         
            +
             
     | 
| 
      
 39 
     | 
    
         
            +
                    expect(app_builder).to have_backup_schedule("staging")
         
     | 
| 
      
 40 
     | 
    
         
            +
                    expect(app_builder).to have_backup_schedule("production")
         
     | 
| 
      
 41 
     | 
    
         
            +
                  end
         
     | 
| 
      
 42 
     | 
    
         
            +
             
     | 
| 
       33 
43 
     | 
    
         
             
                  it "sets the application host" do
         
     | 
| 
       34 
44 
     | 
    
         
             
                    app_builder = double(app_name: app_name)
         
     | 
| 
       35 
45 
     | 
    
         
             
                    allow(app_builder).to receive(:run)
         
     | 
| 
         @@ -49,6 +59,11 @@ module Suspenders 
     | 
|
| 
       49 
59 
     | 
    
         
             
                    SuspendersTestHelpers::APP_NAME
         
     | 
| 
       50 
60 
     | 
    
         
             
                  end
         
     | 
| 
       51 
61 
     | 
    
         | 
| 
      
 62 
     | 
    
         
            +
                  def have_backup_schedule(remote_name)
         
     | 
| 
      
 63 
     | 
    
         
            +
                    have_received(:run).
         
     | 
| 
      
 64 
     | 
    
         
            +
                      with(/pg:backups:schedule DATABASE_URL --at '10:00 UTC' --remote #{remote_name}/)
         
     | 
| 
      
 65 
     | 
    
         
            +
                  end
         
     | 
| 
      
 66 
     | 
    
         
            +
             
     | 
| 
       52 
67 
     | 
    
         
             
                  def have_configured_var(remote_name, var)
         
     | 
| 
       53 
68 
     | 
    
         
             
                    have_received(:run).with(/config:add #{var}=.+ --remote #{remote_name}/)
         
     | 
| 
       54 
69 
     | 
    
         
             
                  end
         
     | 
| 
         @@ -29,6 +29,14 @@ RSpec.describe "Suspend a new project with default configuration" do 
     | 
|
| 
       29 
29 
     | 
    
         
             
                end
         
     | 
| 
       30 
30 
     | 
    
         
             
              end
         
     | 
| 
       31 
31 
     | 
    
         | 
| 
      
 32 
     | 
    
         
            +
              it "includes the bundle:audit task" do
         
     | 
| 
      
 33 
     | 
    
         
            +
                Dir.chdir(project_path) do
         
     | 
| 
      
 34 
     | 
    
         
            +
                  Bundler.with_clean_env do
         
     | 
| 
      
 35 
     | 
    
         
            +
                    expect(`rake -T`).to include('rake bundle:audit')
         
     | 
| 
      
 36 
     | 
    
         
            +
                  end
         
     | 
| 
      
 37 
     | 
    
         
            +
                end
         
     | 
| 
      
 38 
     | 
    
         
            +
              end
         
     | 
| 
      
 39 
     | 
    
         
            +
             
     | 
| 
       32 
40 
     | 
    
         
             
              it "creates .ruby-version from Suspenders .ruby-version" do
         
     | 
| 
       33 
41 
     | 
    
         
             
                ruby_version_file = IO.read("#{project_path}/.ruby-version")
         
     | 
| 
       34 
42 
     | 
    
         | 
| 
         @@ -101,7 +109,7 @@ RSpec.describe "Suspend a new project with default configuration" do 
     | 
|
| 
       101 
109 
     | 
    
         
             
                expect(analytics_partial).
         
     | 
| 
       102 
110 
     | 
    
         
             
                  to include(%{<% if ENV["SEGMENT_KEY"] %>})
         
     | 
| 
       103 
111 
     | 
    
         
             
                expect(analytics_partial).
         
     | 
| 
       104 
     | 
    
         
            -
                  to include(%{ 
     | 
| 
      
 112 
     | 
    
         
            +
                  to include(%{analytics.load("<%= ENV["SEGMENT_KEY"] %>");})
         
     | 
| 
       105 
113 
     | 
    
         
             
              end
         
     | 
| 
       106 
114 
     | 
    
         | 
| 
       107 
115 
     | 
    
         
             
              it "raises on unpermitted parameters in all environments" do
         
     | 
| 
         @@ -1,7 +1,8 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            <% if ENV["SEGMENT_KEY"] %>
         
     | 
| 
       2 
2 
     | 
    
         
             
              <script type="text/javascript">
         
     | 
| 
       3 
     | 
    
         
            -
                window.analytics=window.analytics||[] 
     | 
| 
       4 
     | 
    
         
            -
                 
     | 
| 
       5 
     | 
    
         
            -
                 
     | 
| 
      
 3 
     | 
    
         
            +
                !function(){var analytics=window.analytics=window.analytics||[];if(!analytics.initialize)if(analytics.invoked)window.console&&console.error&&console.error("Segment snippet included twice.");else{analytics.invoked=!0;analytics.methods=["trackSubmit","trackClick","trackLink","trackForm","pageview","identify","reset","group","track","ready","alias","debug","page","once","off","on"];analytics.factory=function(t){return function(){var e=Array.prototype.slice.call(arguments);e.unshift(t);analytics.push(e);return analytics}};for(var t=0;t<analytics.methods.length;t++){var e=analytics.methods[t];analytics[e]=analytics.factory(e)}analytics.load=function(t){var e=document.createElement("script");e.type="text/javascript";e.async=!0;e.src=("https:"===document.location.protocol?"https://":"http://")+"cdn.segment.com/analytics.js/v1/"+t+"/analytics.min.js";var n=document.getElementsByTagName("script")[0];n.parentNode.insertBefore(e,n)};analytics.SNIPPET_VERSION="4.0.0";
         
     | 
| 
      
 4 
     | 
    
         
            +
                analytics.load("<%= ENV["SEGMENT_KEY"] %>");
         
     | 
| 
      
 5 
     | 
    
         
            +
                analytics.page();
         
     | 
| 
      
 6 
     | 
    
         
            +
                }}();
         
     | 
| 
       6 
7 
     | 
    
         
             
              </script>
         
     | 
| 
       7 
8 
     | 
    
         
             
            <% end %>
         
     | 
| 
         @@ -11,7 +11,10 @@ fi 
     | 
|
| 
       11 
11 
     | 
    
         | 
| 
       12 
12 
     | 
    
         
             
            PARENT_APP_NAME=<%= app_name.dasherize %>-staging
         
     | 
| 
       13 
13 
     | 
    
         
             
            APP_NAME=<%= app_name.dasherize %>-staging-pr-$1
         
     | 
| 
       14 
     | 
    
         
            -
             
     | 
| 
      
 14 
     | 
    
         
            +
             
     | 
| 
      
 15 
     | 
    
         
            +
            heroku pg:backups:capture --app $PARENT_APP_NAME
         
     | 
| 
      
 16 
     | 
    
         
            +
             
     | 
| 
      
 17 
     | 
    
         
            +
            URL=`heroku pg:backups public-url --app $PARENT_APP_NAME`
         
     | 
| 
       15 
18 
     | 
    
         | 
| 
       16 
19 
     | 
    
         
             
            heroku pg:backups restore $URL DATABASE_URL --confirm $APP_NAME --app $APP_NAME
         
     | 
| 
       17 
20 
     | 
    
         
             
            heroku run rake db:migrate --exit-code --app $APP_NAME
         
     | 
| 
         @@ -1,12 +1,4 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            if Rails.env.development? || Rails.env.test?
         
     | 
| 
       2 
     | 
    
         
            -
              require "bundler/audit/ 
     | 
| 
       3 
     | 
    
         
            -
             
     | 
| 
       4 
     | 
    
         
            -
              namespace :bundler do
         
     | 
| 
       5 
     | 
    
         
            -
                desc "Updates the ruby-advisory-db and runs audit"
         
     | 
| 
       6 
     | 
    
         
            -
                task :audit do
         
     | 
| 
       7 
     | 
    
         
            -
                  %w(update check).each do |command|
         
     | 
| 
       8 
     | 
    
         
            -
                    Bundler::Audit::CLI.start [command]
         
     | 
| 
       9 
     | 
    
         
            -
                  end
         
     | 
| 
       10 
     | 
    
         
            -
                end
         
     | 
| 
       11 
     | 
    
         
            -
              end
         
     | 
| 
      
 2 
     | 
    
         
            +
              require "bundler/audit/task"
         
     | 
| 
      
 3 
     | 
    
         
            +
              Bundler::Audit::Task.new
         
     | 
| 
       12 
4 
     | 
    
         
             
            end
         
     | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,14 +1,14 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: voyage
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 1.44.0. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 1.44.0.8
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - thoughtbot, headway
         
     | 
| 
       8 
8 
     | 
    
         
             
            autorequire: 
         
     | 
| 
       9 
9 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       10 
10 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       11 
     | 
    
         
            -
            date: 2017-02 
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2017-04-02 00:00:00.000000000 Z
         
     | 
| 
       12 
12 
     | 
    
         
             
            dependencies:
         
     | 
| 
       13 
13 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       14 
14 
     | 
    
         
             
              name: bitters
         
     | 
| 
         @@ -44,14 +44,14 @@ dependencies: 
     | 
|
| 
       44 
44 
     | 
    
         
             
                requirements:
         
     | 
| 
       45 
45 
     | 
    
         
             
                - - "~>"
         
     | 
| 
       46 
46 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       47 
     | 
    
         
            -
                    version: 5.0. 
     | 
| 
      
 47 
     | 
    
         
            +
                    version: 5.1.0.rc1
         
     | 
| 
       48 
48 
     | 
    
         
             
              type: :runtime
         
     | 
| 
       49 
49 
     | 
    
         
             
              prerelease: false
         
     | 
| 
       50 
50 
     | 
    
         
             
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
       51 
51 
     | 
    
         
             
                requirements:
         
     | 
| 
       52 
52 
     | 
    
         
             
                - - "~>"
         
     | 
| 
       53 
53 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       54 
     | 
    
         
            -
                    version: 5.0. 
     | 
| 
      
 54 
     | 
    
         
            +
                    version: 5.1.0.rc1
         
     | 
| 
       55 
55 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       56 
56 
     | 
    
         
             
              name: rspec
         
     | 
| 
       57 
57 
     | 
    
         
             
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
         @@ -115,10 +115,12 @@ files: 
     | 
|
| 
       115 
115 
     | 
    
         
             
            - lib/voyage/templates/analytics_ruby_initializer.rb
         
     | 
| 
       116 
116 
     | 
    
         
             
            - lib/voyage/templates/application.js
         
     | 
| 
       117 
117 
     | 
    
         
             
            - lib/voyage/templates/auto_annotate_models.rake
         
     | 
| 
      
 118 
     | 
    
         
            +
            - lib/voyage/templates/config_dj_rails5_patches.rb
         
     | 
| 
       118 
119 
     | 
    
         
             
            - lib/voyage/templates/config_locales_en.yml.erb
         
     | 
| 
       119 
120 
     | 
    
         
             
            - lib/voyage/templates/controller_helpers.rb
         
     | 
| 
       120 
121 
     | 
    
         
             
            - lib/voyage/templates/custom_cancan_matchers.rb
         
     | 
| 
       121 
122 
     | 
    
         
             
            - lib/voyage/templates/devise_registrations_controller.rb
         
     | 
| 
      
 123 
     | 
    
         
            +
            - lib/voyage/templates/favicon.ico
         
     | 
| 
       122 
124 
     | 
    
         
             
            - lib/voyage/templates/rails_helper.rb.erb
         
     | 
| 
       123 
125 
     | 
    
         
             
            - lib/voyage/templates/rubocop.yml
         
     | 
| 
       124 
126 
     | 
    
         
             
            - lib/voyage/templates/seeder.rb.erb
         
     | 
| 
         @@ -200,7 +202,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement 
     | 
|
| 
       200 
202 
     | 
    
         
             
                  version: '0'
         
     | 
| 
       201 
203 
     | 
    
         
             
            requirements: []
         
     | 
| 
       202 
204 
     | 
    
         
             
            rubyforge_project: 
         
     | 
| 
       203 
     | 
    
         
            -
            rubygems_version: 2.6. 
     | 
| 
      
 205 
     | 
    
         
            +
            rubygems_version: 2.6.11
         
     | 
| 
       204 
206 
     | 
    
         
             
            signing_key: 
         
     | 
| 
       205 
207 
     | 
    
         
             
            specification_version: 4
         
     | 
| 
       206 
208 
     | 
    
         
             
            summary: Generate a Rails app using headway's best practices.
         
     |