date_book 0.0.1

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 (203) hide show
  1. checksums.yaml +7 -0
  2. data/.idea/vcs.xml +6 -0
  3. data/.rspec +2 -0
  4. data/.rubocop.yml +23 -0
  5. data/.rubocop_todo.yml +7 -0
  6. data/.ruby-gemset +1 -0
  7. data/.ruby-version +1 -0
  8. data/.travis.yml +3 -0
  9. data/Gemfile +94 -0
  10. data/Gemfile.lock +385 -0
  11. data/LICENSE.txt +20 -0
  12. data/README.md +64 -0
  13. data/Rakefile +30 -0
  14. data/VERSION +1 -0
  15. data/app/assets/images/date_book/.keep +0 -0
  16. data/app/assets/javascripts/date_book.js +21 -0
  17. data/app/assets/javascripts/date_book/calendar_events.js +57 -0
  18. data/app/assets/javascripts/date_book/event_form.js +31 -0
  19. data/app/assets/javascripts/date_book/popovers.js +3 -0
  20. data/app/assets/javascripts/date_book/wysiwyg.js +8 -0
  21. data/app/assets/stylesheets/date_book.css.scss +46 -0
  22. data/app/controllers/date_book/calendars_controller.rb +60 -0
  23. data/app/controllers/date_book/date_book_controller.rb +24 -0
  24. data/app/controllers/date_book/events_controller.rb +105 -0
  25. data/app/controllers/date_book/graphql_controller.rb +35 -0
  26. data/app/graphql/date_book_schema.rb +18 -0
  27. data/app/graphql/types/calendar_type.rb +14 -0
  28. data/app/graphql/types/date_time_type.rb +7 -0
  29. data/app/graphql/types/event_occurrence_type.rb +11 -0
  30. data/app/graphql/types/event_type.rb +19 -0
  31. data/app/graphql/types/mutation_type.rb +5 -0
  32. data/app/graphql/types/profile_type.rb +7 -0
  33. data/app/graphql/types/query_type.rb +57 -0
  34. data/app/helpers/date_book/application_helper.rb +35 -0
  35. data/app/helpers/date_book/calendar_helper.rb +4 -0
  36. data/app/helpers/date_book/events_helper.rb +42 -0
  37. data/app/jobs/date_book/application_job.rb +6 -0
  38. data/app/mailers/date_book/application_mailer.rb +9 -0
  39. data/app/views/date_book/application/_all_day_checkbox.html.haml +1 -0
  40. data/app/views/date_book/application/_date_range.html.haml +8 -0
  41. data/app/views/date_book/application/_wysiwyg.html.haml +65 -0
  42. data/app/views/date_book/calendars/_form.html.haml +6 -0
  43. data/app/views/date_book/calendars/edit.html.haml +5 -0
  44. data/app/views/date_book/calendars/index.html.haml +28 -0
  45. data/app/views/date_book/calendars/new.html.haml +5 -0
  46. data/app/views/date_book/calendars/show.html.haml +28 -0
  47. data/app/views/date_book/events/_event.json.jbuilder +12 -0
  48. data/app/views/date_book/events/_form.html.haml +16 -0
  49. data/app/views/date_book/events/_occurrence_dates.html.haml +11 -0
  50. data/app/views/date_book/events/edit.html.haml +5 -0
  51. data/app/views/date_book/events/fields/_date.html.haml +1 -0
  52. data/app/views/date_book/events/fields/_day.html.haml +1 -0
  53. data/app/views/date_book/events/fields/_day_of_week.html.haml +19 -0
  54. data/app/views/date_book/events/fields/_duration.html.haml +6 -0
  55. data/app/views/date_book/events/fields/_interval.html.haml +1 -0
  56. data/app/views/date_book/events/fields/_time.html.haml +1 -0
  57. data/app/views/date_book/events/index.html.haml +16 -0
  58. data/app/views/date_book/events/new.html.haml +5 -0
  59. data/app/views/date_book/events/popover.html.haml +7 -0
  60. data/app/views/date_book/events/rules/_daily.html.haml +4 -0
  61. data/app/views/date_book/events/rules/_monthly.html.haml +5 -0
  62. data/app/views/date_book/events/rules/_singular.html.haml +4 -0
  63. data/app/views/date_book/events/rules/_weekly.html.haml +5 -0
  64. data/app/views/date_book/events/show.html.haml +16 -0
  65. data/app/views/layouts/_date_book_scripts.html.haml +4 -0
  66. data/app/views/layouts/blank.html.haml +1 -0
  67. data/bin/rails +15 -0
  68. data/config/locales/en.yml +44 -0
  69. data/config/routes.rb +12 -0
  70. data/date_book.gemspec +337 -0
  71. data/db/migrate/20170807133845_create_calendars.rb +11 -0
  72. data/db/migrate/20170807133846_create_events.rb +20 -0
  73. data/db/migrate/20170807133847_create_schedules.rb +25 -0
  74. data/db/migrate/20170807133848_add_fields_to_schedule.rb +6 -0
  75. data/db/migrate/20170807133849_create_event_occurrences.rb +16 -0
  76. data/db/migrate/20170807133850_add_fields_to_event_occurrences.rb +5 -0
  77. data/lib/date_book.rb +40 -0
  78. data/lib/date_book/concerns/ability.rb +27 -0
  79. data/lib/date_book/concerns/acts_as_calendar.rb +29 -0
  80. data/lib/date_book/concerns/acts_as_event.rb +66 -0
  81. data/lib/date_book/concerns/acts_as_event_occurrence.rb +67 -0
  82. data/lib/date_book/concerns/acts_as_ownable.rb +29 -0
  83. data/lib/date_book/concerns/acts_as_owner.rb +18 -0
  84. data/lib/date_book/concerns/acts_as_schedule.rb +44 -0
  85. data/lib/date_book/configuration.rb +43 -0
  86. data/lib/date_book/engine.rb +40 -0
  87. data/lib/date_book/localization.rb +32 -0
  88. data/lib/date_book/version.rb +8 -0
  89. data/lib/generators/date_book/install/install_generator.rb +110 -0
  90. data/lib/generators/date_book/install/templates/app/models/ability.rb +16 -0
  91. data/lib/generators/date_book/install/templates/app/models/calendar.rb +3 -0
  92. data/lib/generators/date_book/install/templates/app/models/event.rb +3 -0
  93. data/lib/generators/date_book/install/templates/app/models/event_occurrence.rb +3 -0
  94. data/lib/generators/date_book/install/templates/app/models/schedule.rb +3 -0
  95. data/lib/generators/date_book/install/templates/config/initializers/date_book.rb +5 -0
  96. data/lib/generators/date_book/utils.rb +25 -0
  97. data/lib/tasks/date_book_tasks.rake +5 -0
  98. data/spec/abilities/calendar_spec.rb +39 -0
  99. data/spec/abilities/event_spec.rb +44 -0
  100. data/spec/controllers/date_book/calendars_controller_spec.rb +259 -0
  101. data/spec/controllers/date_book/events_controller_spec.rb +283 -0
  102. data/spec/dummy/Rakefile +9 -0
  103. data/spec/dummy/app/assets/config/manifest.js +5 -0
  104. data/spec/dummy/app/assets/images/.keep +0 -0
  105. data/spec/dummy/app/assets/javascripts/application.js +15 -0
  106. data/spec/dummy/app/assets/stylesheets/application.css.scss +4 -0
  107. data/spec/dummy/app/assets/stylesheets/bootstrap-everything.scss +54 -0
  108. data/spec/dummy/app/controllers/application_controller.rb +21 -0
  109. data/spec/dummy/app/controllers/concerns/.keep +0 -0
  110. data/spec/dummy/app/helpers/application_helper.rb +4 -0
  111. data/spec/dummy/app/mailers/application_mailer.rb +6 -0
  112. data/spec/dummy/app/models/ability.rb +16 -0
  113. data/spec/dummy/app/models/application_record.rb +5 -0
  114. data/spec/dummy/app/models/calendar.rb +3 -0
  115. data/spec/dummy/app/models/concerns/.keep +0 -0
  116. data/spec/dummy/app/models/event.rb +3 -0
  117. data/spec/dummy/app/models/event_occurrence.rb +3 -0
  118. data/spec/dummy/app/models/role.rb +13 -0
  119. data/spec/dummy/app/models/schedule.rb +3 -0
  120. data/spec/dummy/app/models/user.rb +9 -0
  121. data/spec/dummy/app/views/application/403.html.haml +9 -0
  122. data/spec/dummy/app/views/application/404.html.haml +9 -0
  123. data/spec/dummy/app/views/layouts/application.html.haml +43 -0
  124. data/spec/dummy/app/views/pages/index.html.haml +1 -0
  125. data/spec/dummy/bin/bundle +5 -0
  126. data/spec/dummy/bin/rails +6 -0
  127. data/spec/dummy/bin/rake +6 -0
  128. data/spec/dummy/bin/setup +36 -0
  129. data/spec/dummy/bin/update +31 -0
  130. data/spec/dummy/config.ru +7 -0
  131. data/spec/dummy/config/application.rb +38 -0
  132. data/spec/dummy/config/boot.rb +7 -0
  133. data/spec/dummy/config/cable.yml +9 -0
  134. data/spec/dummy/config/database.yml +25 -0
  135. data/spec/dummy/config/environment.rb +7 -0
  136. data/spec/dummy/config/environments/development.rb +60 -0
  137. data/spec/dummy/config/environments/test.rb +45 -0
  138. data/spec/dummy/config/initializers/application_controller_renderer.rb +7 -0
  139. data/spec/dummy/config/initializers/assets.rb +14 -0
  140. data/spec/dummy/config/initializers/backtrace_silencers.rb +10 -0
  141. data/spec/dummy/config/initializers/bootstrap_leather.rb +9 -0
  142. data/spec/dummy/config/initializers/cookies_serializer.rb +7 -0
  143. data/spec/dummy/config/initializers/date_book.rb +5 -0
  144. data/spec/dummy/config/initializers/devise.rb +277 -0
  145. data/spec/dummy/config/initializers/filter_parameter_logging.rb +6 -0
  146. data/spec/dummy/config/initializers/high_voltage.rb +3 -0
  147. data/spec/dummy/config/initializers/inflections.rb +17 -0
  148. data/spec/dummy/config/initializers/mime_types.rb +5 -0
  149. data/spec/dummy/config/initializers/new_framework_defaults.rb +29 -0
  150. data/spec/dummy/config/initializers/rolify.rb +7 -0
  151. data/spec/dummy/config/initializers/session_store.rb +5 -0
  152. data/spec/dummy/config/initializers/wrap_parameters.rb +17 -0
  153. data/spec/dummy/config/locales/devise.en.yml +64 -0
  154. data/spec/dummy/config/locales/en.yml +23 -0
  155. data/spec/dummy/config/puma.rb +49 -0
  156. data/spec/dummy/config/routes.rb +15 -0
  157. data/spec/dummy/config/secrets.yml +22 -0
  158. data/spec/dummy/config/spring.rb +8 -0
  159. data/spec/dummy/db/migrate/20170728171103_create_users_table.rb +7 -0
  160. data/spec/dummy/db/migrate/20170807134122_add_devise_to_users.rb +49 -0
  161. data/spec/dummy/db/migrate/20170807134128_rolify_create_roles.rb +19 -0
  162. data/spec/dummy/db/migrate/20170807134137_create_calendars.date_book.rb +12 -0
  163. data/spec/dummy/db/migrate/20170807134138_create_events.date_book.rb +21 -0
  164. data/spec/dummy/db/migrate/20170807134139_create_schedules.date_book.rb +26 -0
  165. data/spec/dummy/db/migrate/20170807134140_add_fields_to_schedule.date_book.rb +7 -0
  166. data/spec/dummy/db/migrate/20170807134141_create_event_occurrences.date_book.rb +17 -0
  167. data/spec/dummy/db/migrate/20170807134142_add_fields_to_event_occurrences.date_book.rb +6 -0
  168. data/spec/dummy/db/schema.rb +101 -0
  169. data/spec/dummy/db/seeds.rb +0 -0
  170. data/spec/dummy/db/seeds/calendars.seeds.rb +22 -0
  171. data/spec/dummy/db/seeds/events.seeds.rb +89 -0
  172. data/spec/dummy/db/seeds/users.seeds.rb +16 -0
  173. data/spec/dummy/lib/assets/.keep +0 -0
  174. data/spec/dummy/lib/basic_benchmark.rb +9 -0
  175. data/spec/dummy/log/.keep +0 -0
  176. data/spec/factories/calendars.rb +11 -0
  177. data/spec/factories/events.rb +12 -0
  178. data/spec/factories/roles.rb +5 -0
  179. data/spec/factories/users.rb +9 -0
  180. data/spec/features/calendars_spec.rb +185 -0
  181. data/spec/features/events_spec.rb +201 -0
  182. data/spec/helpers/date_book/calendar_helper_spec.rb +17 -0
  183. data/spec/helpers/date_book/events_helper_spec.rb +17 -0
  184. data/spec/models/calendar_spec.rb +26 -0
  185. data/spec/models/event_spec.rb +67 -0
  186. data/spec/models/role_spec.rb +5 -0
  187. data/spec/rails_helper.rb +116 -0
  188. data/spec/requests/date_book/events_spec.rb +56 -0
  189. data/spec/routing/date_book/calendars_routing_spec.rb +49 -0
  190. data/spec/routing/date_book/events_routing_spec.rb +54 -0
  191. data/spec/spec_helper.rb +102 -0
  192. data/spec/support/controller_behaviors.rb +101 -0
  193. data/spec/support/controller_macros.rb +25 -0
  194. data/spec/support/factory_girl.rb +3 -0
  195. data/spec/support/feature_behaviors.rb +150 -0
  196. data/spec/support/loaded_site.rb +5 -0
  197. data/spec/support/loaded_site/calendars.rb +5 -0
  198. data/spec/support/loaded_site/events.rb +6 -0
  199. data/spec/support/loaded_site/users.rb +5 -0
  200. data/spec/support/request_behaviors.rb +89 -0
  201. data/spec/support/shared_connection.rb +14 -0
  202. data/spec/support/utilities.rb +53 -0
  203. metadata +817 -0
@@ -0,0 +1,3 @@
1
+ class Event < ApplicationRecord
2
+ acts_as_event
3
+ end
@@ -0,0 +1,3 @@
1
+ class EventOccurrence < ApplicationRecord
2
+ acts_as_event_occurrence
3
+ end
@@ -0,0 +1,13 @@
1
+ class Role < ApplicationRecord
2
+ has_and_belongs_to_many :users, :join_table => :users_roles
3
+
4
+ belongs_to :resource,
5
+ :polymorphic => true,
6
+ :optional => true
7
+
8
+ validates :resource_type,
9
+ :inclusion => { :in => Rolify.resource_types },
10
+ :allow_nil => true
11
+
12
+ scopify
13
+ end
@@ -0,0 +1,3 @@
1
+ class Schedule < Schedulable::Model::Schedule
2
+ acts_as_schedule
3
+ end
@@ -0,0 +1,9 @@
1
+ class User < ApplicationRecord
2
+ rolify
3
+ acts_as_owner
4
+
5
+ # Include default devise modules. Others available are:
6
+ # :confirmable, :lockable, :timeoutable and :omniauthable
7
+ devise :database_authenticatable, :registerable,
8
+ :recoverable, :rememberable, :trackable, :validatable
9
+ end
@@ -0,0 +1,9 @@
1
+ - add_hero_unit do
2
+ %h1
3
+ 403 - Forbidden
4
+ %p
5
+ You want far too much
6
+ %br
7
+ We will never reach the sky
8
+ %br
9
+ Access is denied.
@@ -0,0 +1,9 @@
1
+ - add_hero_unit do
2
+ %h1
3
+ 404 - Page Not Found
4
+ %p
5
+ You step in the stream,
6
+ %br
7
+ But the water has moved on.
8
+ %br
9
+ This page is not here.
@@ -0,0 +1,43 @@
1
+ !!!
2
+ %html{ lang: "en" }
3
+ %head
4
+ = render_title # For the title tag, including SEO content
5
+ = render_keywords # Defaults to what you put in the config file
6
+ = render_description # Can be hooked up within a mountable rails engine, too.
7
+ = responsive_meta_tag # If you're using the responsive features, you need this in your head
8
+
9
+ = stylesheet_link_tag 'application'
10
+
11
+ = render_head_css
12
+ = javascript_include_tag 'application'
13
+ = csrf_meta_tags
14
+
15
+ %body
16
+ %nav.navbar.navbar-static-top.navbar-inverse
17
+ .container
18
+ .navbar-header
19
+ = link_to BootstrapLeather.configuration.application_title, main_app.root_path, class: 'navbar-brand'
20
+ .pull-right
21
+ %button.menu-button.navbar-toggle.collapsed{ data: { toggle:'collapse', target:'#navbar-activities' }, type:'button' }
22
+ %span.sr-only
23
+ Toggle navigation
24
+ %span.sr-hidden
25
+ Menu
26
+ .collapse.navbar-collapse
27
+ = nav_list class: 'navbar-nav navbar-right' do
28
+ = nav_item 'Calendars', date_book.calendars_path
29
+ - if user_signed_in?
30
+ = nav_item 'Sign Out', main_app.destroy_user_session_path, method: :delete
31
+ - else
32
+ = nav_item 'Sign In', main_app.new_user_session_path
33
+ .container
34
+ = render_hero_unit
35
+ .row
36
+ .content
37
+ = render_h1 # For the h1 tag containing the title alone
38
+ #alert_area
39
+ = alert_flash_messages
40
+ = yield
41
+
42
+ %footer
43
+ = render_footer_javascript
@@ -0,0 +1 @@
1
+ - add_title 'Hello World'
@@ -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,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,38 @@
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 'date_book'
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 :haml
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
+
36
+ config.autoload_paths << Rails.root.join('lib')
37
+ end
38
+ 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,60 @@
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
+
58
+ # For Devise
59
+ config.action_mailer.default_url_options = { host: 'localhost', port: 3000 }
60
+ 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!