alchemy_kono_mailup 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 (125) hide show
  1. checksums.yaml +7 -0
  2. data/MIT-LICENSE +20 -0
  3. data/README.rdoc +3 -0
  4. data/Rakefile +26 -0
  5. data/app/assets/images/alchemy_kono_mailup/.keep +0 -0
  6. data/app/assets/javascripts/alchemy_kono_mailup/application.js +13 -0
  7. data/app/assets/stylesheets/alchemy_kono_mailup/application.css +15 -0
  8. data/app/controllers/alchemy/admin/essence_mailup_lists_controller.rb +22 -0
  9. data/app/controllers/alchemy_kono_mailup/admin/base_controller.rb +5 -0
  10. data/app/controllers/alchemy_kono_mailup/admin/mailup_configs_controller.rb +13 -0
  11. data/app/controllers/alchemy_kono_mailup/admin/tokens_controller.rb +16 -0
  12. data/app/helpers/alchemy_kono_mailup/application_helper.rb +22 -0
  13. data/app/models/alchemy/essence_mailup_list.rb +4 -0
  14. data/app/models/alchemy_kono_mailup/base_subscription_form.rb +11 -0
  15. data/app/models/alchemy_kono_mailup/mailup_config.rb +6 -0
  16. data/app/views/alchemy/essences/_essence_mailup_list_editor.html.erb +11 -0
  17. data/app/views/alchemy/essences/_essence_mailup_list_view.html.erb +3 -0
  18. data/app/views/alchemy_kono_mailup/admin/mailup_configs/main.html.erb +19 -0
  19. data/app/views/layouts/alchemy_kono_mailup/application.html.erb +14 -0
  20. data/config/initializers/alchemy.rb +26 -0
  21. data/config/initializers/kono_mailup.rb +9 -0
  22. data/config/routes.rb +21 -0
  23. data/db/migrate/20171127105007_create_alchemy_kono_mailup_alchemy_essence_mailup_lists.rb +13 -0
  24. data/lib/alchemy_kono_mailup.rb +21 -0
  25. data/lib/alchemy_kono_mailup/ability.rb +58 -0
  26. data/lib/alchemy_kono_mailup/engine.rb +22 -0
  27. data/lib/alchemy_kono_mailup/version.rb +3 -0
  28. data/lib/generators/alchemy_kono_mailup/install/USAGE +9 -0
  29. data/lib/generators/alchemy_kono_mailup/install/install_generator.rb +20 -0
  30. data/lib/generators/alchemy_kono_mailup/install/templates/initializers.rb +4 -0
  31. data/lib/generators/alchemy_kono_mailup/subscription_form/USAGE +7 -0
  32. data/lib/generators/alchemy_kono_mailup/subscription_form/subscription_form_generator.rb +75 -0
  33. data/lib/generators/alchemy_kono_mailup/subscription_form/templates/form_controller.rb.erb +70 -0
  34. data/lib/generators/alchemy_kono_mailup/subscription_form/templates/form_model.rb.erb +5 -0
  35. data/lib/generators/alchemy_kono_mailup/subscription_form/templates/form_view.html.erb +29 -0
  36. data/lib/tasks/alchemy_kono_mailup_tasks.rake +4 -0
  37. data/spec/dummy/README.rdoc +28 -0
  38. data/spec/dummy/Rakefile +6 -0
  39. data/spec/dummy/app/assets/images/.keep +0 -0
  40. data/spec/dummy/app/assets/javascripts/application.js +13 -0
  41. data/spec/dummy/app/assets/stylesheets/alchemy/elements/article.scss +30 -0
  42. data/spec/dummy/app/assets/stylesheets/application.css +16 -0
  43. data/spec/dummy/app/controllers/application_controller.rb +5 -0
  44. data/spec/dummy/app/controllers/concerns/.keep +0 -0
  45. data/spec/dummy/app/controllers/mailup_subscription_forms_controller.rb +73 -0
  46. data/spec/dummy/app/helpers/application_helper.rb +2 -0
  47. data/spec/dummy/app/mailers/.keep +0 -0
  48. data/spec/dummy/app/models/.keep +0 -0
  49. data/spec/dummy/app/models/concerns/.keep +0 -0
  50. data/spec/dummy/app/models/mailup_subscription_form.rb +7 -0
  51. data/spec/dummy/app/views/alchemy/elements/_article_editor.html.erb +5 -0
  52. data/spec/dummy/app/views/alchemy/elements/_article_view.html.erb +7 -0
  53. data/spec/dummy/app/views/alchemy/elements/_mailup_subscription_editor.html.erb +3 -0
  54. data/spec/dummy/app/views/alchemy/elements/_mailup_subscription_view.html.erb +27 -0
  55. data/spec/dummy/app/views/alchemy/page_layouts/_standard.html.erb +1 -0
  56. data/spec/dummy/app/views/layouts/application.html.erb +16 -0
  57. data/spec/dummy/bin/bundle +3 -0
  58. data/spec/dummy/bin/rails +4 -0
  59. data/spec/dummy/bin/rake +4 -0
  60. data/spec/dummy/bin/setup +29 -0
  61. data/spec/dummy/config.ru +4 -0
  62. data/spec/dummy/config/alchemy/config.yml +194 -0
  63. data/spec/dummy/config/alchemy/elements.yml +27 -0
  64. data/spec/dummy/config/alchemy/page_layouts.yml +8 -0
  65. data/spec/dummy/config/application.rb +32 -0
  66. data/spec/dummy/config/boot.rb +5 -0
  67. data/spec/dummy/config/database.yml +25 -0
  68. data/spec/dummy/config/environment.rb +5 -0
  69. data/spec/dummy/config/environments/development.rb +41 -0
  70. data/spec/dummy/config/environments/production.rb +79 -0
  71. data/spec/dummy/config/environments/test.rb +42 -0
  72. data/spec/dummy/config/initializers/assets.rb +11 -0
  73. data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
  74. data/spec/dummy/config/initializers/cookies_serializer.rb +3 -0
  75. data/spec/dummy/config/initializers/devise.rb +265 -0
  76. data/spec/dummy/config/initializers/dragonfly.rb +35 -0
  77. data/spec/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  78. data/spec/dummy/config/initializers/inflections.rb +16 -0
  79. data/spec/dummy/config/initializers/kono_mailup.rb +13 -0
  80. data/spec/dummy/config/initializers/mime_types.rb +4 -0
  81. data/spec/dummy/config/initializers/session_store.rb +3 -0
  82. data/spec/dummy/config/initializers/to_time_preserves_timezone.rb +10 -0
  83. data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
  84. data/spec/dummy/config/locales/alchemy.de.yml +31 -0
  85. data/spec/dummy/config/locales/alchemy.en.yml +31 -0
  86. data/spec/dummy/config/locales/alchemy.es.yml +31 -0
  87. data/spec/dummy/config/locales/en.yml +23 -0
  88. data/spec/dummy/config/routes.rb +9 -0
  89. data/spec/dummy/config/secrets_example.yml +24 -0
  90. data/spec/dummy/db/migrate/20171124145455_acts_as_taggable_on_migration.acts_as_taggable_on_engine.rb +36 -0
  91. data/spec/dummy/db/migrate/20171124145456_add_missing_unique_indices.acts_as_taggable_on_engine.rb +26 -0
  92. data/spec/dummy/db/migrate/20171124145457_add_taggings_counter_cache_to_tags.acts_as_taggable_on_engine.rb +20 -0
  93. data/spec/dummy/db/migrate/20171124145458_add_missing_taggable_index.acts_as_taggable_on_engine.rb +15 -0
  94. data/spec/dummy/db/migrate/20171124145459_change_collation_for_tag_names.acts_as_taggable_on_engine.rb +15 -0
  95. data/spec/dummy/db/migrate/20171124145460_add_missing_indexes_on_taggings.acts_as_taggable_on_engine.rb +23 -0
  96. data/spec/dummy/db/migrate/20171124145461_alchemy_two_point_six.alchemy.rb +379 -0
  97. data/spec/dummy/db/migrate/20171124145462_remove_do_not_index_from_alchemy_essence_texts.alchemy.rb +6 -0
  98. data/spec/dummy/db/migrate/20171124145463_remove_do_not_index_from_alchemy_essence_richtexts.alchemy.rb +6 -0
  99. data/spec/dummy/db/migrate/20171124145464_add_published_at_to_alchemy_pages.alchemy.rb +6 -0
  100. data/spec/dummy/db/migrate/20171124145465_add_parent_element_id_to_alchemy_elements.alchemy.rb +7 -0
  101. data/spec/dummy/db/migrate/20171124145466_add_link_text_to_alchemy_essence_files.alchemy.rb +6 -0
  102. data/spec/dummy/db/migrate/20171124145467_add_locale_to_alchemy_languages.alchemy.rb +8 -0
  103. data/spec/dummy/db/migrate/20171124145468_add_timebased_publishing_columns_to_pages.alchemy.rb +33 -0
  104. data/spec/dummy/db/migrate/20171124145469_add_image_file_format_to_alchemy_pictures.alchemy.rb +10 -0
  105. data/spec/dummy/db/migrate/20171124145470_change_alchemy_pages_locked_to_locked_at.alchemy.rb +23 -0
  106. data/spec/dummy/db/migrate/20171124145471_add_index_to_alchemy_pages_rgt.alchemy.rb +10 -0
  107. data/spec/dummy/db/migrate/20171124145472_add_foreign_key_indices_and_null_constraints.alchemy.rb +21 -0
  108. data/spec/dummy/db/migrate/20171124145473_add_foreign_keys.alchemy.rb +28 -0
  109. data/spec/dummy/db/migrate/20171124145474_create_alchemy_users.alchemy_devise.rb +34 -0
  110. data/spec/dummy/db/migrate/20171124145475_add_alchemy_roles_to_alchemy_users.alchemy_devise.rb +23 -0
  111. data/spec/dummy/db/migrate/20171124145476_add_indexes_to_alchemy_users.alchemy_devise.rb +12 -0
  112. data/spec/dummy/db/migrate/20171124145629_create_settings.kono_mailup.rb +18 -0
  113. data/spec/dummy/db/migrate/20171127115017_create_alchemy_kono_mailup_alchemy_essence_mailup_lists.alchemy_kono_mailup.rb +14 -0
  114. data/spec/dummy/db/schema.rb +351 -0
  115. data/spec/dummy/db/seeds.rb +1 -0
  116. data/spec/dummy/lib/assets/.keep +0 -0
  117. data/spec/dummy/log/.keep +0 -0
  118. data/spec/dummy/public/404.html +67 -0
  119. data/spec/dummy/public/422.html +67 -0
  120. data/spec/dummy/public/500.html +66 -0
  121. data/spec/dummy/public/favicon.ico +0 -0
  122. data/spec/dummy/vendor/assets/javascripts/alchemy/admin/all.js +11 -0
  123. data/spec/dummy/vendor/assets/stylesheets/alchemy/admin/all.css +12 -0
  124. data/spec/models/alchemy_kono_mailup/alchemy/essence_mailup_list_spec.rb +7 -0
  125. metadata +393 -0
@@ -0,0 +1,7 @@
1
+ <%- cache(element) do -%>
2
+ <%= element_view_for(element, tag: 'article') do |el| -%>
3
+ <h2><%= el.render :headline %></h2>
4
+ <%= el.render :picture, size: '1200x600' %>
5
+ <%= el.render :text %>
6
+ <%- end -%>
7
+ <%- end -%>
@@ -0,0 +1,3 @@
1
+ <%= element_editor_for(element) do |el| -%>
2
+ <%= el.edit :newsletter_list %>
3
+ <%- end -%>
@@ -0,0 +1,27 @@
1
+ <%- cache(element) do -%>
2
+
3
+ <%= element_view_for(element) do |el| -%>
4
+
5
+ <% @mailup_subscription ||= MailupSubscriptionForm.new(
6
+ newsletter_list: element.content_by_name(:newsletter_list).ingredient,
7
+ element_id: element.id
8
+ ) %>
9
+
10
+ <%= form_for(@mailup_subscription, url: main_app.mailup_subscription_forms_path) do |f| %>
11
+
12
+ <div><%= f.label :email %><%= f.text_field :email %></div>
13
+ <div><%= f.label :first_name %><%= f.text_field :first_name %></div>
14
+ <div><%= f.label :last_name %><%= f.text_field :last_name %></div>
15
+
16
+ <%= f.hidden_field :newsletter_list %>
17
+ <%= f.hidden_field :element_id %>
18
+
19
+ <div>
20
+ <%= f.submit :subscribe %>
21
+ </div>
22
+
23
+ <% end %>
24
+
25
+
26
+ <%- end -%>
27
+ <%- end -%>
@@ -0,0 +1 @@
1
+ <%= render_elements %>
@@ -0,0 +1,16 @@
1
+ <!DOCTYPE html>
2
+ <html lang="<%= @page.language_code %>">
3
+ <head>
4
+ <%= render "alchemy/pages/meta_data" %>
5
+ <%= stylesheet_link_tag 'application', media: 'all' %>
6
+ <%= javascript_include_tag 'application' %>
7
+ <%= csrf_meta_tags %>
8
+ </head>
9
+ <body>
10
+ <% if flash[:notice] %>
11
+ <div class="notice"><%= flash[:notice] %></div>
12
+ <% end %>
13
+ <%= yield %>
14
+ <%= render "alchemy/edit_mode" %>
15
+ </body>
16
+ </html>
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
3
+ load Gem.bin_path('bundler', 'bundle')
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+ APP_PATH = File.expand_path('../../config/application', __FILE__)
3
+ require_relative '../config/boot'
4
+ require 'rails/commands'
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+ require_relative '../config/boot'
3
+ require 'rake'
4
+ Rake.application.run
@@ -0,0 +1,29 @@
1
+ #!/usr/bin/env ruby
2
+ require 'pathname'
3
+
4
+ # path to your application root.
5
+ APP_ROOT = Pathname.new File.expand_path('../../', __FILE__)
6
+
7
+ Dir.chdir APP_ROOT do
8
+ # This script is a starting point to setup your application.
9
+ # Add necessary setup steps to this file:
10
+
11
+ puts "== Installing dependencies =="
12
+ system "gem install bundler --conservative"
13
+ system "bundle check || bundle install"
14
+
15
+ # puts "\n== Copying sample files =="
16
+ # unless File.exist?("config/database.yml")
17
+ # system "cp config/database.yml.sample config/database.yml"
18
+ # end
19
+
20
+ puts "\n== Preparing database =="
21
+ system "bin/rake db:setup"
22
+
23
+ puts "\n== Removing old logs and tempfiles =="
24
+ system "rm -f log/*"
25
+ system "rm -rf tmp/cache"
26
+
27
+ puts "\n== Restarting application server =="
28
+ system "touch tmp/restart.txt"
29
+ end
@@ -0,0 +1,4 @@
1
+ # This file is used by Rack-based servers to start the application.
2
+
3
+ require ::File.expand_path('../config/environment', __FILE__)
4
+ run Rails.application
@@ -0,0 +1,194 @@
1
+ # encoding: UTF-8
2
+ #
3
+ # == This is the global Alchemy configuration file
4
+ #
5
+
6
+ # === Require SSL for login form and all admin modules
7
+ #
8
+ # NOTE: You have to create a SSL certificate on your server to make this work
9
+ #
10
+ require_ssl: false
11
+
12
+ # === Auto Log Out Time
13
+ #
14
+ # The amount of time of inactivity in minutes after which the user is kicked out of his current session.
15
+ #
16
+ # NOTE: This is only active in production environments
17
+ #
18
+ auto_logout_time: 30
19
+
20
+ # === Redirect Options
21
+ #
22
+ # redirect_to_public_child [Boolean] # Alchemy redirects to the first public child page found, if a page is not visible.
23
+ #
24
+ redirect_to_public_child: true
25
+
26
+ # === Page caching
27
+ #
28
+ # Enable/Disable page caching globally.
29
+ #
30
+ # NOTE: You can enable/disable page caching for single Alchemy::PageLayouts in the page_layout.yml file.
31
+ #
32
+ cache_pages: true
33
+
34
+ # === Sitemap
35
+ #
36
+ # Alchemy creates a XML, Google compatible, sitemap for you.
37
+ #
38
+ # The url is: http://your-domain.tld/sitemap.xml
39
+ #
40
+ # ==== Config Options:
41
+ #
42
+ # show_root [Boolean] # Show language root page in sitemap?
43
+ # show_flag [Boolean] # Enables the Checkbox in Page#update overlay. So your customer can set the visibility of pages in the sitemap.
44
+ #
45
+ sitemap:
46
+ show_root: true
47
+ show_flag: false
48
+
49
+ # === URL nesting
50
+ #
51
+ # Since Alchemy 2.6.0, page urls are nested, respectively to their tree position.
52
+ #
53
+ # Disable +url_nesting+ to get slug only urls.
54
+ #
55
+ # NOTE: After changing the url_nesting, you should run one of these convert rake tasks:
56
+ #
57
+ # rake alchemy:convert:urlnames:to_nested
58
+ # rake alchemy:convert:urlnames:to_slug
59
+ #
60
+ url_nesting: true
61
+
62
+ # === Picture rendering settings
63
+ #
64
+ # Alchemy uses Dragonfly to render images. Use {size: "XXXxYYY", crop: BOOLEAN [true]} to resize images.
65
+ #
66
+ # See http://markevans.github.com/dragonfly for further infos.
67
+ #
68
+ # ==== Options:
69
+ #
70
+ # output_image_jpg_quality [Integer] # If image gets rendered as JPG this is the quality setting for it. (Default 85)
71
+ # preprocess_image_resize [String] # Use this option to resize images to that value. Downsizing example: '1000x1000>' (Default nil)
72
+ # image_output_format [String] # The global image output format setting. (Default +original+)
73
+ #
74
+ # NOTE: You can always override the output format in the options of your Essence. I.E. {format: 'gif'}
75
+ #
76
+ output_image_jpg_quality: 85
77
+ preprocess_image_resize:
78
+ image_output_format: original
79
+
80
+ # This is used by the seeder to create the default site.
81
+ default_site:
82
+ name: Default Site
83
+ host: '*'
84
+
85
+ # This is the default language when a new site gets created.
86
+ default_language:
87
+ code: en
88
+ name: English
89
+ page_layout: index
90
+ frontpage_name: Index
91
+
92
+ # === Mailer Settings:
93
+ #
94
+ # To send emails via contact forms, you can create your form fields here and set which fields are to be validated.
95
+ #
96
+ # === Validating fields:
97
+ #
98
+ # Pass the field name as a symbol and a message_id (will be translated) to :validate_fields:
99
+ #
100
+ # ==== Options:
101
+ #
102
+ # page_layout_name: [String] # A +Alchemy::PageLayout+ name. Used to render the contactform on a page with this layout.
103
+ # fields: [Array] # An Array of fieldnames.
104
+ # validate_fields: [Array] # An Array of fieldnames to be validated on presence.
105
+ #
106
+ # ==== Translating validation messages:
107
+ #
108
+ # The validation messages are passed through ::I18n.t so you can translate it in your language yml file.
109
+ #
110
+ # ==== Example:
111
+ #
112
+ # de:
113
+ # activemodel:
114
+ # attributes:
115
+ # alchemy/message:
116
+ # firstname: Vorname
117
+ #
118
+ mailer:
119
+ page_layout_name: contact
120
+ forward_to_page: false
121
+ mail_success_page: thanks
122
+ mail_from: your.mail@your-domain.com
123
+ mail_to: your.mail@your-domain.com
124
+ subject: A new contact form message
125
+ fields: [salutation, firstname, lastname, address, zip, city, phone, email, message]
126
+ validate_fields: [lastname, email]
127
+
128
+ # === User roles
129
+ #
130
+ # You can add own user roles.
131
+ #
132
+ # Further documentation for the auth system used please visit:
133
+ #
134
+ # https://github.com/ryanb/cancan/wiki
135
+ #
136
+ # ==== Translating User roles
137
+ #
138
+ # Userroles can be translated inside your the language yml file under:
139
+ #
140
+ # alchemy:
141
+ # user_roles:
142
+ # rolename: Name of the role
143
+ #
144
+ user_roles: [member, author, editor, admin]
145
+
146
+ # === Uploader Settings
147
+ #
148
+ # upload_limit [Integer] # Set an amount of files upload limit of files which can be uploaded at once. Set 0 for unlimited.
149
+ # file_size_limit* [Integer] # Set a file size limit in mega bytes for a per file limit.
150
+ #
151
+ # *) Allow filetypes to upload. Pass * to allow all kind of files.
152
+ #
153
+ uploader:
154
+ upload_limit: 50
155
+ file_size_limit: 100
156
+ allowed_filetypes:
157
+ alchemy/attachments:
158
+ - '*'
159
+ alchemy/pictures:
160
+ - jpg
161
+ - jpeg
162
+ - gif
163
+ - png
164
+ - svg
165
+
166
+ # === Link Target Options
167
+ #
168
+ # Values for the link target selectbox inside the page link overlay.
169
+ # The value gets attached as a data-link-target attribute to the link.
170
+ #
171
+ # == Example:
172
+ #
173
+ # Open all links set to overlay inside an jQuery UI Dialog Window.
174
+ #
175
+ # jQuery(a[data-link-target="overlay"]).dialog();
176
+ #
177
+ link_target_options: [blank]
178
+
179
+ # Should pages that redirect to an external url open the link in a new tab/window?
180
+ open_external_links_in_new_tab: true
181
+
182
+ # === Format matchers
183
+ #
184
+ # Named aliases for regular expressions that can be used in various places.
185
+ # The most common use case is the format validation of essences, or attribute validations of your individual models.
186
+ #
187
+ # == Example:
188
+ #
189
+ # validates_format_of :url, with: Alchemy::Config.get('format_matchers')['url']
190
+ #
191
+ format_matchers:
192
+ email: !ruby/regexp '/\A[^@\s]+@([^@\s]+\.)+[^@\s]+\z/'
193
+ url: !ruby/regexp '/\A[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5}(:[0-9]{1,5})?(\/.*)?\z/ix'
194
+ link_url: !ruby/regexp '/^(mailto:|\/|[a-z]+:\/\/)/'
@@ -0,0 +1,27 @@
1
+ # == In this configuration, you set up Alchemy's element layouts.
2
+ #
3
+ # For further information please see http://guides.alchemy-cms.com/stable/elements.html
4
+
5
+ - name: article
6
+ hint: true
7
+ unique: true
8
+ contents:
9
+ - name: headline
10
+ type: EssenceText
11
+ default: ':article_headline'
12
+ hint: true
13
+ - name: picture
14
+ type: EssencePicture
15
+ hint: true
16
+ - name: text
17
+ type: EssenceRichtext
18
+ default: ':article_text'
19
+ hint: true
20
+
21
+ - name: mailup_subscription
22
+ hint: true
23
+ contents:
24
+ - name: newsletter_list
25
+ type: EssenceMailupList
26
+ validate:
27
+ - presence
@@ -0,0 +1,8 @@
1
+ # == This file defines the page layouts for new pages.
2
+ #
3
+ # For further information please see http://guides.alchemy-cms.com/stable/page_layouts.html
4
+
5
+ - name: index
6
+ unique: true
7
+ elements: [article,mailup_subscription]
8
+ autogenerate: [article]
@@ -0,0 +1,32 @@
1
+ require File.expand_path('../boot', __FILE__)
2
+
3
+ # Pick the frameworks you want:
4
+ require "active_record/railtie"
5
+ require "action_controller/railtie"
6
+ require "action_mailer/railtie"
7
+ require "action_view/railtie"
8
+ require "sprockets/railtie"
9
+ # require "rails/test_unit/railtie"
10
+
11
+ Bundler.require(*Rails.groups)
12
+ require "alchemy_kono_mailup"
13
+
14
+ module Dummy
15
+ class Application < Rails::Application
16
+ # Settings in config/environments/* take precedence over those specified here.
17
+ # Application configuration should go into files in config/initializers
18
+ # -- all .rb files in that directory are automatically loaded.
19
+
20
+ # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
21
+ # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
22
+ # config.time_zone = 'Central Time (US & Canada)'
23
+
24
+ # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
25
+ # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
26
+ # config.i18n.default_locale = :de
27
+
28
+ # Do not swallow errors in after_commit/after_rollback callbacks.
29
+ #config.active_record.raise_in_transactional_callbacks = true
30
+ end
31
+ end
32
+
@@ -0,0 +1,5 @@
1
+ # Set up gems listed in the Gemfile.
2
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../../../Gemfile', __FILE__)
3
+
4
+ require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE'])
5
+ $LOAD_PATH.unshift File.expand_path('../../../../lib', __FILE__)
@@ -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,5 @@
1
+ # Load the Rails application.
2
+ require File.expand_path('../application', __FILE__)
3
+
4
+ # Initialize the Rails application.
5
+ Rails.application.initialize!
@@ -0,0 +1,41 @@
1
+ Rails.application.configure do
2
+ # Settings specified here will take precedence over those in config/application.rb.
3
+
4
+ # In the development environment your application's code is reloaded on
5
+ # every request. This slows down response time but is perfect for development
6
+ # since you don't have to restart the web server when you make code changes.
7
+ config.cache_classes = false
8
+
9
+ # Do not eager load code on boot.
10
+ config.eager_load = false
11
+
12
+ # Show full error reports and disable caching.
13
+ config.consider_all_requests_local = true
14
+ config.action_controller.perform_caching = false
15
+
16
+ # Don't care if the mailer can't send.
17
+ config.action_mailer.raise_delivery_errors = false
18
+
19
+ # Print deprecation notices to the Rails logger.
20
+ config.active_support.deprecation = :log
21
+
22
+ # Raise an error on page load if there are pending migrations.
23
+ config.active_record.migration_error = :page_load
24
+
25
+ # Debug mode disables concatenation and preprocessing of assets.
26
+ # This option may cause significant delays in view rendering with a large
27
+ # number of complex assets.
28
+ config.assets.debug = true
29
+
30
+ # Asset digests allow you to set far-future HTTP expiration dates on all assets,
31
+ # yet still be able to expire them through the digest params.
32
+ config.assets.digest = true
33
+
34
+ # Adds additional error checking when serving assets at runtime.
35
+ # Checks for improperly declared sprockets dependencies.
36
+ # Raises helpful error messages.
37
+ config.assets.raise_runtime_errors = true
38
+
39
+ # Raises error for missing translations
40
+ # config.action_view.raise_on_missing_translations = true
41
+ end