bootstrap_leather 0.9.4 → 0.10.4

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.
Files changed (174) hide show
  1. checksums.yaml +4 -4
  2. data/.rspec +1 -0
  3. data/.rubocop.yml +23 -0
  4. data/.rubocop_todo.yml +12 -0
  5. data/.ruby-gemset +1 -1
  6. data/.ruby-version +1 -1
  7. data/.travis.yml +5 -0
  8. data/Gemfile +40 -7
  9. data/LICENSE.txt +1 -1
  10. data/README.md +260 -0
  11. data/Rakefile +35 -20
  12. data/VERSION +1 -1
  13. data/app/helpers/bootstrap_leather/alerts_helper.rb +36 -0
  14. data/app/helpers/bootstrap_leather/application_helper.rb +21 -0
  15. data/app/helpers/bootstrap_leather/badges_helper.rb +21 -0
  16. data/app/helpers/bootstrap_leather/carousels_helper.rb +32 -0
  17. data/app/helpers/bootstrap_leather/foot_helper.rb +14 -0
  18. data/app/helpers/bootstrap_leather/grid_helper.rb +10 -0
  19. data/app/helpers/bootstrap_leather/head_helper.rb +67 -0
  20. data/app/helpers/bootstrap_leather/hero_unit_helper.rb +14 -0
  21. data/app/helpers/bootstrap_leather/icons_helper.rb +33 -0
  22. data/app/helpers/bootstrap_leather/modals_helper.rb +20 -0
  23. data/app/helpers/bootstrap_leather/navigation_helper.rb +71 -0
  24. data/app/helpers/bootstrap_leather/tabs_helper.rb +28 -0
  25. data/app/helpers/bootstrap_leather/thumbnails_helper.rb +13 -0
  26. data/app/helpers/bootstrap_leather/typography_helper.rb +38 -0
  27. data/app/helpers/bootstrap_leather/widgets_helper.rb +29 -0
  28. data/app/views/bootstrap_leather/{_alert.html.haml → alerts/_alert.html.haml} +1 -1
  29. data/app/views/bootstrap_leather/{_alert_flash_messages.html.haml → alerts/_alert_flash_messages.html.haml} +0 -0
  30. data/app/views/bootstrap_leather/{_badge.html.haml → badges/_badge.html.haml} +1 -1
  31. data/app/views/bootstrap_leather/badges/_badge_to.html.haml +3 -0
  32. data/app/views/bootstrap_leather/{_carousel.html.haml → carousels/_carousel.html.haml} +0 -0
  33. data/app/views/bootstrap_leather/{_carousel_with_thumbnails.html.haml → carousels/_carousel_with_thumbnails.html.haml} +0 -0
  34. data/app/views/bootstrap_leather/{_footer_javascript.html.haml → foot/_footer_javascript.html.haml} +0 -0
  35. data/app/views/bootstrap_leather/{_head_css.html.haml → head/_head_css.html.haml} +0 -0
  36. data/app/views/bootstrap_leather/{_hero_unit.html.haml → hero_unit/_hero_unit.html.haml} +0 -0
  37. data/app/views/bootstrap_leather/{_icon.html.haml → icons/_icon.html.haml} +0 -0
  38. data/app/views/bootstrap_leather/{_icon_button_to.html.haml → icons/_icon_button_to.html.haml} +0 -0
  39. data/app/views/bootstrap_leather/{_icon_link_to.html.haml → icons/_icon_link_to.html.haml} +0 -0
  40. data/app/views/bootstrap_leather/{_modal.html.haml → modals/_modal.html.haml} +2 -2
  41. data/app/views/bootstrap_leather/navigation/_dropdown_nav_item.html.haml +6 -0
  42. data/app/views/bootstrap_leather/navigation/_hamburger_menu.html.haml +6 -0
  43. data/app/views/bootstrap_leather/{_logo_and_title.html.haml → navigation/_logo_and_title.html.haml} +0 -0
  44. data/app/views/bootstrap_leather/{_nav_heading.html.haml → navigation/_nav_heading.html.haml} +0 -0
  45. data/app/views/bootstrap_leather/{_nav_item.html.haml → navigation/_nav_item.html.haml} +0 -0
  46. data/app/views/bootstrap_leather/{_nav_list.html.haml → navigation/_nav_list.html.haml} +0 -0
  47. data/app/views/bootstrap_leather/navigation/_navbar.html.haml +14 -0
  48. data/app/views/bootstrap_leather/navigation/_navbar_contents.html.haml +5 -0
  49. data/app/views/bootstrap_leather/tabs/_tabs.html.haml +10 -0
  50. data/app/views/bootstrap_leather/{_thumbnail.html.haml → thumbnails/_thumbnail.html.haml} +0 -0
  51. data/app/views/bootstrap_leather/{_definition_list.html.haml → typography/_dl.html.haml} +0 -0
  52. data/app/views/bootstrap_leather/{_page_header.html.haml → typography/_page_header.html.haml} +1 -1
  53. data/app/views/bootstrap_leather/widgets/_widgets.html.haml +10 -0
  54. data/bin/rails +15 -0
  55. data/bootstrap_leather.gemspec +219 -57
  56. data/config/locales/en.yml +9 -0
  57. data/lib/bootstrap_leather/configuration.rb +16 -12
  58. data/lib/bootstrap_leather/engine.rb +19 -4
  59. data/lib/bootstrap_leather/localization.rb +20 -18
  60. data/lib/bootstrap_leather/version.rb +4 -1
  61. data/lib/bootstrap_leather.rb +6 -2
  62. data/lib/generators/bootstrap_leather/install/install_generator.rb +21 -19
  63. data/lib/generators/bootstrap_leather/install/templates/initializer.rb +3 -1
  64. data/lib/generators/bootstrap_leather/utils.rb +13 -4
  65. data/lib/templates/erb/scaffold/_form.html.erb +11 -0
  66. data/lib/templates/erb/scaffold/edit.html.erb +9 -0
  67. data/lib/templates/erb/scaffold/index.html.erb +29 -0
  68. data/lib/templates/erb/scaffold/new.html.erb +7 -0
  69. data/lib/templates/erb/scaffold/show.html.erb +12 -0
  70. data/lib/templates/haml/scaffold/_form.html.haml +10 -0
  71. data/lib/templates/haml/scaffold/edit.html.haml +8 -0
  72. data/lib/templates/haml/scaffold/index.html.haml +21 -0
  73. data/lib/templates/haml/scaffold/new.html.haml +6 -0
  74. data/lib/templates/haml/scaffold/show.html.haml +10 -0
  75. data/spec/dummy/Rakefile +9 -0
  76. data/spec/dummy/app/assets/images/.keep +0 -0
  77. data/spec/dummy/app/assets/javascripts/application.js +16 -0
  78. data/spec/dummy/app/assets/stylesheets/application.scss +19 -0
  79. data/spec/dummy/app/assets/stylesheets/bootstrap-everything.scss +54 -0
  80. data/spec/dummy/app/controllers/application_controller.rb +6 -0
  81. data/spec/dummy/app/controllers/concerns/.keep +0 -0
  82. data/spec/dummy/app/controllers/doo_dads_controller.rb +58 -0
  83. data/spec/dummy/app/controllers/erbits_controller.rb +58 -0
  84. data/spec/dummy/app/controllers/whatzits_controller.rb +58 -0
  85. data/spec/dummy/app/helpers/application_helper.rb +4 -0
  86. data/spec/dummy/app/mailers/application_mailer.rb +6 -0
  87. data/spec/dummy/app/models/application_record.rb +5 -0
  88. data/spec/dummy/app/models/concerns/.keep +0 -0
  89. data/spec/dummy/app/models/doo_dad.rb +3 -0
  90. data/spec/dummy/app/models/erbit.rb +2 -0
  91. data/spec/dummy/app/models/whatzit.rb +2 -0
  92. data/spec/dummy/app/views/doo_dads/_form.html.haml +16 -0
  93. data/spec/dummy/app/views/doo_dads/edit.html.haml +7 -0
  94. data/spec/dummy/app/views/doo_dads/index.html.haml +23 -0
  95. data/spec/dummy/app/views/doo_dads/new.html.haml +5 -0
  96. data/spec/dummy/app/views/doo_dads/show.html.haml +12 -0
  97. data/spec/dummy/app/views/erbits/_form.html.erb +5 -0
  98. data/spec/dummy/app/views/erbits/edit.html.erb +9 -0
  99. data/spec/dummy/app/views/erbits/index.html.erb +27 -0
  100. data/spec/dummy/app/views/erbits/new.html.erb +7 -0
  101. data/spec/dummy/app/views/erbits/show.html.erb +12 -0
  102. data/spec/dummy/app/views/layouts/application.html.haml +22 -0
  103. data/spec/dummy/app/views/pages/index.html.haml +1 -0
  104. data/spec/dummy/app/views/pages/style_guide.html.haml +801 -0
  105. data/spec/dummy/app/views/whatzits/_form.html.haml +4 -0
  106. data/spec/dummy/app/views/whatzits/edit.html.haml +8 -0
  107. data/spec/dummy/app/views/whatzits/index.html.haml +19 -0
  108. data/spec/dummy/app/views/whatzits/new.html.haml +6 -0
  109. data/spec/dummy/app/views/whatzits/show.html.haml +10 -0
  110. data/spec/dummy/bin/bundle +5 -0
  111. data/spec/dummy/bin/rails +6 -0
  112. data/spec/dummy/bin/rake +6 -0
  113. data/spec/dummy/bin/setup +36 -0
  114. data/spec/dummy/bin/update +31 -0
  115. data/spec/dummy/config/application.rb +36 -0
  116. data/spec/dummy/config/boot.rb +7 -0
  117. data/spec/dummy/config/cable.yml +9 -0
  118. data/spec/dummy/config/database.yml +25 -0
  119. data/spec/dummy/config/environment.rb +7 -0
  120. data/spec/dummy/config/environments/development.rb +57 -0
  121. data/spec/dummy/config/environments/test.rb +45 -0
  122. data/spec/dummy/config/initializers/application_controller_renderer.rb +7 -0
  123. data/spec/dummy/config/initializers/assets.rb +14 -0
  124. data/spec/dummy/config/initializers/backtrace_silencers.rb +10 -0
  125. data/spec/dummy/config/initializers/bootstrap_leather.rb +9 -0
  126. data/spec/dummy/config/initializers/cookies_serializer.rb +7 -0
  127. data/spec/dummy/config/initializers/filter_parameter_logging.rb +6 -0
  128. data/spec/dummy/config/initializers/high_voltage.rb +5 -0
  129. data/spec/dummy/config/initializers/inflections.rb +17 -0
  130. data/spec/dummy/config/initializers/mime_types.rb +5 -0
  131. data/spec/dummy/config/initializers/new_framework_defaults.rb +29 -0
  132. data/spec/dummy/config/initializers/session_store.rb +5 -0
  133. data/spec/dummy/config/initializers/wrap_parameters.rb +17 -0
  134. data/spec/dummy/config/locales/en.yml +23 -0
  135. data/spec/dummy/config/puma.rb +49 -0
  136. data/spec/dummy/config/routes.rb +8 -0
  137. data/spec/dummy/config/secrets.yml +22 -0
  138. data/spec/dummy/config/spring.rb +8 -0
  139. data/spec/dummy/config.ru +7 -0
  140. data/spec/dummy/db/migrate/20170407151055_create_doo_dads.rb +10 -0
  141. data/spec/dummy/db/migrate/20170408145839_create_whatzits.rb +10 -0
  142. data/spec/dummy/db/migrate/20170408161201_create_erbits.rb +10 -0
  143. data/spec/dummy/db/schema.rb +36 -0
  144. data/spec/dummy/db/seeds.rb +7 -0
  145. data/spec/dummy/db/test.sqlite3 +0 -0
  146. data/spec/factories/doo_dad.rb +6 -0
  147. data/spec/factories/erbit.rb +6 -0
  148. data/spec/factories/whatzit.rb +6 -0
  149. data/spec/helpers/bootstrap_leather/alerts_helper_spec.rb +62 -0
  150. data/spec/helpers/bootstrap_leather/badges_helper_spec.rb +41 -0
  151. data/spec/helpers/bootstrap_leather/carousels_helper_spec.rb +44 -0
  152. data/spec/helpers/bootstrap_leather/foot_helper_spec.rb +20 -0
  153. data/spec/helpers/bootstrap_leather/grid_helper_spec.rb +10 -0
  154. data/spec/helpers/bootstrap_leather/head_helper_spec.rb +82 -0
  155. data/spec/helpers/bootstrap_leather/hero_unit_helper_spec.rb +20 -0
  156. data/spec/helpers/bootstrap_leather/icon_helper_spec.rb +48 -0
  157. data/spec/helpers/bootstrap_leather/modals_helper_spec.rb +22 -0
  158. data/spec/helpers/bootstrap_leather/navigation_helper_spec.rb +110 -0
  159. data/spec/helpers/bootstrap_leather/tabs_helper_spec.rb +39 -0
  160. data/spec/helpers/bootstrap_leather/thumbnails_helper_spec.rb +20 -0
  161. data/spec/helpers/bootstrap_leather/typography_helper_spec.rb +43 -0
  162. data/spec/helpers/bootstrap_leather/widgets_helper_spec.rb +22 -0
  163. data/spec/rails_helper.rb +88 -0
  164. data/spec/spec_helper.rb +102 -0
  165. metadata +360 -44
  166. data/.document +0 -5
  167. data/README.rdoc +0 -194
  168. data/app/helpers/bootstrap_leather_helper.rb +0 -232
  169. data/app/views/bootstrap_leather/_badge_to.html.haml +0 -4
  170. data/app/views/bootstrap_leather/_dropdown_nav_item.html.haml +0 -11
  171. data/app/views/bootstrap_leather/_navbar.html.haml +0 -39
  172. data/app/views/bootstrap_leather/_tabs.html.haml +0 -10
  173. data/app/views/bootstrap_leather/_widgets.html.haml +0 -9
  174. data/lib/bootstrap_leather/railtie.rb +0 -9
@@ -0,0 +1,4 @@
1
+ = bootstrap_form_for(whatzit) do |f|
2
+ = f.text_field :name
3
+ = f.text_area :description
4
+ = f.submit
@@ -0,0 +1,8 @@
1
+ - add_title :editing.l(name: 'Whatzit')
2
+
3
+ = render 'form', whatzit: @whatzit
4
+
5
+ %p
6
+ = link_to :show.l, @whatzit
7
+ |
8
+ = link_to :back.l, whatzits_path
@@ -0,0 +1,19 @@
1
+ - add_title 'Whatzits'
2
+
3
+ %table.table.table-bordered
4
+ %thead
5
+ %tr
6
+ %th Name
7
+ %th Description
8
+ %th{colspan: '3'}
9
+ %tbody
10
+ - @whatzits.each do |whatzit|
11
+ %tr
12
+ %td= whatzit.name
13
+ %td= whatzit.description
14
+ %td= link_to :show.l, whatzit, class: 'btn btn-success'
15
+ %td= link_to :edit.l, edit_whatzit_path(whatzit), class: 'btn btn-info'
16
+ %td= link_to :destroy.l, whatzit, method: :delete, data: { confirm: :are_you_sure.l }, class: 'btn btn-danger'
17
+
18
+ %p
19
+ = link_to :new.l(name: 'Whatzit'), new_whatzit_path, class: 'btn btn-primary'
@@ -0,0 +1,6 @@
1
+ - add_title :new.l(name: 'Whatzit')
2
+
3
+ = render 'form', whatzit: @whatzit
4
+
5
+ %p
6
+ = link_to :back.l, whatzits_path
@@ -0,0 +1,10 @@
1
+ - add_title :showing.l(name: 'Whatzit')
2
+ %dl
3
+ %dt Name:</dt>
4
+ %dd= @whatzit.name
5
+ %dt Description:</dt>
6
+ %dd= @whatzit.description
7
+ %p
8
+ = link_to :edit.l, edit_whatzit_path(@whatzit)
9
+ |
10
+ = link_to :back.l, whatzits_path
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
5
+ load Gem.bin_path('bundler', 'bundle')
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ APP_PATH = File.expand_path('../config/application', __dir__)
5
+ require_relative '../config/boot'
6
+ require 'rails/commands'
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ require_relative '../config/boot'
5
+ require 'rake'
6
+ Rake.application.run
@@ -0,0 +1,36 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ require 'pathname'
5
+ require 'fileutils'
6
+ include FileUtils
7
+
8
+ # path to your application root.
9
+ APP_ROOT = Pathname.new File.expand_path('../../', __FILE__)
10
+
11
+ def system!(*args)
12
+ system(*args) || abort("\n== Command #{args} failed ==")
13
+ end
14
+
15
+ chdir APP_ROOT do
16
+ # This script is a starting point to setup your application.
17
+ # Add necessary setup steps to this file.
18
+
19
+ puts '== Installing dependencies =='
20
+ system! 'gem install bundler --conservative'
21
+ system('bundle check') || system!('bundle install')
22
+
23
+ # puts "\n== Copying sample files =="
24
+ # unless File.exist?('config/database.yml')
25
+ # cp 'config/database.yml.sample', 'config/database.yml'
26
+ # end
27
+
28
+ puts "\n== Preparing database =="
29
+ system! 'bin/rails db:setup'
30
+
31
+ puts "\n== Removing old logs and tempfiles =="
32
+ system! 'bin/rails log:clear tmp:clear'
33
+
34
+ puts "\n== Restarting application server =="
35
+ system! 'bin/rails restart'
36
+ end
@@ -0,0 +1,31 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ require 'pathname'
5
+ require 'fileutils'
6
+ include FileUtils
7
+
8
+ # path to your application root.
9
+ APP_ROOT = Pathname.new File.expand_path('../../', __FILE__)
10
+
11
+ def system!(*args)
12
+ system(*args) || abort("\n== Command #{args} failed ==")
13
+ end
14
+
15
+ chdir APP_ROOT do
16
+ # This script is a way to update your development environment automatically.
17
+ # Add necessary update steps to this file.
18
+
19
+ puts '== Installing dependencies =='
20
+ system! 'gem install bundler --conservative'
21
+ system('bundle check') || system!('bundle install')
22
+
23
+ puts "\n== Updating database =="
24
+ system! 'bin/rails db:migrate'
25
+
26
+ puts "\n== Removing old logs and tempfiles =="
27
+ system! 'bin/rails log:clear tmp:clear'
28
+
29
+ puts "\n== Restarting application server =="
30
+ system! 'bin/rails restart'
31
+ end
@@ -0,0 +1,36 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative 'boot'
4
+
5
+ # Pick the frameworks you want:
6
+ require 'active_record/railtie'
7
+ require 'action_controller/railtie'
8
+ require 'action_view/railtie'
9
+ require 'action_mailer/railtie'
10
+ require 'active_job/railtie'
11
+ require 'action_cable/engine'
12
+ # require "rails/test_unit/railtie"
13
+ require 'sprockets/railtie'
14
+
15
+ Bundler.require(*Rails.groups)
16
+ require 'bootstrap_leather'
17
+
18
+ module Dummy
19
+ class Application < Rails::Application
20
+ # Settings in config/environments/* take precedence over those specified
21
+ # here.
22
+ # Application configuration should go into files in config/initializers
23
+ # -- all .rb files in that directory are automatically loaded.
24
+
25
+ config.generators do |g|
26
+ g.orm :active_record
27
+ g.template_engine :erb
28
+ g.test_framework :rspec, fixture: false
29
+ g.stylesheets false
30
+ g.javascripts false
31
+ end
32
+
33
+ config.time_zone = 'America/Denver'
34
+ config.active_record.default_timezone = :local
35
+ end
36
+ end
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Set up gems listed in the Gemfile.
4
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../../Gemfile', __dir__)
5
+
6
+ require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE'])
7
+ $LOAD_PATH.unshift File.expand_path('../../../lib', __dir__)
@@ -0,0 +1,9 @@
1
+ development:
2
+ adapter: async
3
+
4
+ test:
5
+ adapter: async
6
+
7
+ production:
8
+ adapter: redis
9
+ url: redis://localhost:6379/1
@@ -0,0 +1,25 @@
1
+ # SQLite version 3.x
2
+ # gem install sqlite3
3
+ #
4
+ # Ensure the SQLite 3 gem is defined in your Gemfile
5
+ # gem 'sqlite3'
6
+ #
7
+ default: &default
8
+ adapter: sqlite3
9
+ pool: 5
10
+ timeout: 5000
11
+
12
+ development:
13
+ <<: *default
14
+ database: db/development.sqlite3
15
+
16
+ # Warning: The database defined as "test" will be erased and
17
+ # re-generated from your development database when you run "rake".
18
+ # Do not set this db to the same as development or production.
19
+ test:
20
+ <<: *default
21
+ database: db/test.sqlite3
22
+
23
+ production:
24
+ <<: *default
25
+ database: db/production.sqlite3
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Load the Rails application.
4
+ require_relative 'application'
5
+
6
+ # Initialize the Rails application.
7
+ Rails.application.initialize!
@@ -0,0 +1,57 @@
1
+ # frozen_string_literal: true
2
+
3
+ Rails.application.configure do
4
+ # Settings specified here will take precedence over those in
5
+ # config/application.rb.
6
+
7
+ # In the development environment your application's code is reloaded on
8
+ # every request. This slows down response time but is perfect for development
9
+ # since you don't have to restart the web server when you make code changes.
10
+ config.cache_classes = false
11
+
12
+ # Do not eager load code on boot.
13
+ config.eager_load = false
14
+
15
+ # Show full error reports.
16
+ config.consider_all_requests_local = true
17
+
18
+ # Enable/disable caching. By default caching is disabled.
19
+ if Rails.root.join('tmp/caching-dev.txt').exist?
20
+ config.action_controller.perform_caching = true
21
+
22
+ config.cache_store = :memory_store
23
+ config.public_file_server.headers = {
24
+ 'Cache-Control' => 'public, max-age=172800'
25
+ }
26
+ else
27
+ config.action_controller.perform_caching = false
28
+
29
+ config.cache_store = :null_store
30
+ end
31
+
32
+ # Don't care if the mailer can't send.
33
+ config.action_mailer.raise_delivery_errors = false
34
+
35
+ config.action_mailer.perform_caching = false
36
+
37
+ # Print deprecation notices to the Rails logger.
38
+ config.active_support.deprecation = :log
39
+
40
+ # Raise an error on page load if there are pending migrations.
41
+ config.active_record.migration_error = :page_load
42
+
43
+ # Debug mode disables concatenation and preprocessing of assets.
44
+ # This option may cause significant delays in view rendering with a large
45
+ # number of complex assets.
46
+ config.assets.debug = true
47
+
48
+ # Suppress logger output for asset requests.
49
+ config.assets.quiet = true
50
+
51
+ # Raises error for missing translations
52
+ # config.action_view.raise_on_missing_translations = true
53
+
54
+ # Use an evented file watcher to asynchronously detect changes in source code,
55
+ # routes, locales, etc. This feature depends on the listen gem.
56
+ # config.file_watcher = ActiveSupport::EventedFileUpdateChecker
57
+ end
@@ -0,0 +1,45 @@
1
+ # frozen_string_literal: true
2
+
3
+ Rails.application.configure do
4
+ # Settings specified here will take precedence over those in
5
+ # config/application.rb.
6
+
7
+ # The test environment is used exclusively to run your application's
8
+ # test suite. You never need to work with it otherwise. Remember that
9
+ # your test database is "scratch space" for the test suite and is wiped
10
+ # and recreated between test runs. Don't rely on the data there!
11
+ config.cache_classes = true
12
+
13
+ # Do not eager load code on boot. This avoids loading your whole application
14
+ # just for the purpose of running a single test. If you are using a tool that
15
+ # preloads Rails for running tests, you may have to set it to true.
16
+ config.eager_load = false
17
+
18
+ # Configure public file server for tests with Cache-Control for performance.
19
+ config.public_file_server.enabled = true
20
+ config.public_file_server.headers = {
21
+ 'Cache-Control' => 'public, max-age=3600'
22
+ }
23
+
24
+ # Show full error reports and disable caching.
25
+ config.consider_all_requests_local = true
26
+ config.action_controller.perform_caching = false
27
+
28
+ # Raise exceptions instead of rendering exception templates.
29
+ config.action_dispatch.show_exceptions = false
30
+
31
+ # Disable request forgery protection in test environment.
32
+ config.action_controller.allow_forgery_protection = false
33
+ config.action_mailer.perform_caching = false
34
+
35
+ # Tell Action Mailer not to deliver emails to the real world.
36
+ # The :test delivery method accumulates sent emails in the
37
+ # ActionMailer::Base.deliveries array.
38
+ config.action_mailer.delivery_method = :test
39
+
40
+ # Print deprecation notices to the stderr.
41
+ config.active_support.deprecation = :stderr
42
+
43
+ # Raises error for missing translations
44
+ # config.action_view.raise_on_missing_translations = true
45
+ end
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+ # Be sure to restart your server when you modify this file.
3
+
4
+ # ApplicationController.renderer.defaults.merge!(
5
+ # http_host: 'example.org',
6
+ # https: false
7
+ # )
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Be sure to restart your server when you modify this file.
4
+
5
+ # Version of your assets, change this if you want to expire all your assets.
6
+ Rails.application.config.assets.version = '1.0'
7
+
8
+ # # Add additional assets to the asset load path
9
+ # Rails.application.config.assets.paths << Emoji.images_path
10
+ #
11
+ # # Precompile additional assets.
12
+ # # application.js, application.css, and all non-JS/CSS in app/assets folder
13
+ # # are already added.
14
+ # Rails.application.config.assets.precompile += %w( search.js )
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+ # # Be sure to restart your server when you modify this file.
3
+ #
4
+ # # You can add backtrace silencers for libraries that you're using but don't
5
+ # # wish to see in your backtraces.
6
+ # Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
7
+ #
8
+ # # You can also remove all the silencers if you're trying to debug a problem
9
+ # # that might stem from framework code.
10
+ # Rails.backtrace_cleaner.remove_silencers!
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ BootstrapLeather.configure do |config|
4
+ config.application_logo = '/assets/logo.svg'
5
+ config.application_path = '/'
6
+ config.application_title = 'Dummy Site'
7
+ config.application_description = 'This site is not real.'
8
+ config.application_keywords = 'fake, dummy, development'
9
+ end
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Be sure to restart your server when you modify this file.
4
+
5
+ # Specify a serializer for the signed and encrypted cookie jars.
6
+ # Valid options are :json, :marshal, and :hybrid.
7
+ Rails.application.config.action_dispatch.cookies_serializer = :json
@@ -0,0 +1,6 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Be sure to restart your server when you modify this file.
4
+
5
+ # Configure sensitive parameters which will be filtered from the log file.
6
+ Rails.application.config.filter_parameters += [:password]
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ HighVoltage.configure do |config|
4
+ config.home_page = 'index'
5
+ end
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+ # Be sure to restart your server when you modify this file.
3
+
4
+ # Add new inflection rules using the following format. Inflections
5
+ # are locale specific, and you may define rules for as many different
6
+ # locales as you wish. All of these examples are active by default:
7
+ # ActiveSupport::Inflector.inflections(:en) do |inflect|
8
+ # inflect.plural /^(ox)$/i, '\1en'
9
+ # inflect.singular /^(ox)en/i, '\1'
10
+ # inflect.irregular 'person', 'people'
11
+ # inflect.uncountable %w( fish sheep )
12
+ # end
13
+
14
+ # These inflection rules are supported but not enabled by default:
15
+ # ActiveSupport::Inflector.inflections(:en) do |inflect|
16
+ # inflect.acronym 'RESTful'
17
+ # end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+ # Be sure to restart your server when you modify this file.
3
+
4
+ # Add new mime types for use in respond_to blocks:
5
+ # Mime::Type.register "text/richtext", :rtf
@@ -0,0 +1,29 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Be sure to restart your server when you modify this file.
4
+ #
5
+ # This file contains migration options to ease your Rails 5.0 upgrade.
6
+ #
7
+ # Read the Guide for Upgrading Ruby on Rails for more info on each option.
8
+
9
+ # Enable per-form CSRF tokens. Previous versions had false.
10
+ Rails.application.config.action_controller.per_form_csrf_tokens = true
11
+
12
+ # Enable origin-checking CSRF mitigation. Previous versions had false.
13
+ Rails.application.config.action_controller
14
+ .forgery_protection_origin_check = true
15
+
16
+ # Make Ruby 2.4 preserve the timezone of the receiver when calling `to_time`.
17
+ # Previous versions had false.
18
+ ActiveSupport.to_time_preserves_timezone = true
19
+
20
+ # Require `belongs_to` associations by default. Previous versions had false.
21
+ Rails.application.config.active_record.belongs_to_required_by_default = true
22
+
23
+ # Do not halt callback chains when a callback returns false. Previous versions
24
+ # had true.
25
+ ActiveSupport.halt_callback_chains_on_return_false = false
26
+
27
+ # Configure SSL options to enable HSTS with subdomains. Previous versions had
28
+ # false.
29
+ Rails.application.config.ssl_options = { hsts: { subdomains: true } }
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Be sure to restart your server when you modify this file.
4
+
5
+ Rails.application.config.session_store :cookie_store, key: '_dummy_session'
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Be sure to restart your server when you modify this file.
4
+
5
+ # This file contains settings for ActionController::ParamsWrapper which
6
+ # is enabled by default.
7
+
8
+ # Enable parameter wrapping for JSON. You can disable this by
9
+ # setting :format to an empty array.
10
+ ActiveSupport.on_load(:action_controller) do
11
+ wrap_parameters format: [:json]
12
+ end
13
+
14
+ # To enable root element in JSON for ActiveRecord objects.
15
+ # ActiveSupport.on_load(:active_record) do
16
+ # self.include_root_in_json = true
17
+ # end
@@ -0,0 +1,23 @@
1
+ # Files in the config/locales directory are used for internationalization
2
+ # and are automatically loaded by Rails. If you want to use locales other
3
+ # than English, add the necessary files in this directory.
4
+ #
5
+ # To use the locales, use `I18n.t`:
6
+ #
7
+ # I18n.t 'hello'
8
+ #
9
+ # In views, this is aliased to just `t`:
10
+ #
11
+ # <%= t('hello') %>
12
+ #
13
+ # To use a different locale, set it with `I18n.locale`:
14
+ #
15
+ # I18n.locale = :es
16
+ #
17
+ # This would use the information in config/locales/es.yml.
18
+ #
19
+ # To learn more, please read the Rails Internationalization guide
20
+ # available at http://guides.rubyonrails.org/i18n.html.
21
+
22
+ en:
23
+ hello: "Hello world"
@@ -0,0 +1,49 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Puma can serve each request in a thread from an internal thread pool.
4
+ # The `threads` method setting takes two numbers a minimum and maximum.
5
+ # Any libraries that use thread pools should be configured to match
6
+ # the maximum value specified for Puma. Default is set to 5 threads for minimum
7
+ # and maximum, this matches the default thread size of Active Record.
8
+ #
9
+ threads_count = ENV.fetch('RAILS_MAX_THREADS') { 5 }.to_i
10
+ threads threads_count, threads_count
11
+
12
+ # Specifies the `port` that Puma will listen on to receive requests,
13
+ # default is 3000.
14
+ port ENV.fetch('PORT') { 3000 }
15
+
16
+ # Specifies the `environment` that Puma will run in.
17
+ #
18
+ environment ENV.fetch('RAILS_ENV') { 'development' }
19
+
20
+ # Specifies the number of `workers` to boot in clustered mode.
21
+ # Workers are forked webserver processes. If using threads and workers together
22
+ # the concurrency of the application would be max `threads` * `workers`.
23
+ # Workers do not work on JRuby or Windows (both of which do not support
24
+ # processes).
25
+ #
26
+ # workers ENV.fetch("WEB_CONCURRENCY") { 2 }
27
+
28
+ # Use the `preload_app!` method when specifying a `workers` number.
29
+ # This directive tells Puma to first boot the application and load code
30
+ # before forking the application. This takes advantage of Copy On Write
31
+ # process behavior so workers use less memory. If you use this option
32
+ # you need to make sure to reconnect any threads in the `on_worker_boot`
33
+ # block.
34
+ #
35
+ # preload_app!
36
+
37
+ # The code in the `on_worker_boot` will be called if you are using
38
+ # clustered mode by specifying a number of `workers`. After each worker
39
+ # process is booted this block will be run, if you are using `preload_app!`
40
+ # option you will want to use this block to reconnect to any threads
41
+ # or connections that may have been created at application boot, Ruby
42
+ # cannot share connections between processes.
43
+ #
44
+ # on_worker_boot do
45
+ # ActiveRecord::Base.establish_connection if defined?(ActiveRecord)
46
+ # end
47
+
48
+ # Allow puma to be restarted by `rails restart` command.
49
+ plugin :tmp_restart
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ Rails.application.routes.draw do
4
+ resources :erbits
5
+ resources :whatzits
6
+ resources :doo_dads
7
+ mount BootstrapLeather::Engine => '/bootstrap_leather'
8
+ end
@@ -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 `rails 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: 78be21acd2b18cb0497414742c7c525422b1a577d440feb2e9e7b54c7eb7acaddcca8c53a3756975f1a79f93ac31235339219d3fcb4998100be482aa453c935a
15
+
16
+ test:
17
+ secret_key_base: 005e11b247f2ba012ad0d7aab9cff4286a9943b4c0d7c143682ccce90cd12ae22b3fb525ce11111550325aab21d603819f6d2602e419d59eb88c2bdcffb021ca
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"] %>
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ %w[
4
+ .ruby-version
5
+ .rbenv-vars
6
+ tmp/restart.txt
7
+ tmp/caching-dev.txt
8
+ ].each { |path| Spring.watch(path) }
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ # This file is used by Rack-based servers to start the application.
4
+
5
+ require_relative 'config/environment'
6
+
7
+ run Rails.application
@@ -0,0 +1,10 @@
1
+ class CreateDooDads < ActiveRecord::Migration[5.0]
2
+ def change
3
+ create_table :doo_dads do |t|
4
+ t.string :name
5
+ t.text :body
6
+
7
+ t.timestamps
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,10 @@
1
+ class CreateWhatzits < ActiveRecord::Migration[5.0]
2
+ def change
3
+ create_table :whatzits do |t|
4
+ t.string :name
5
+ t.text :description
6
+
7
+ t.timestamps
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,10 @@
1
+ class CreateErbits < ActiveRecord::Migration[5.0]
2
+ def change
3
+ create_table :erbits do |t|
4
+ t.string :name
5
+ t.text :description
6
+
7
+ t.timestamps
8
+ end
9
+ end
10
+ end