trusty-clipped-extension 2.0.2.pre.beta → 2.0.3.pre.beta
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -13
- data/Gemfile +45 -1
- data/Gemfile.lock +88 -11
- data/Rakefile +26 -110
- data/app/assets/javascripts/admin/assets.js +4 -4
- data/app/assets/stylesheets/admin/assets.sass +2 -4
- data/app/controllers/admin/assets_controller.rb +3 -1
- data/app/views/admin/assets/_asset_table.html.haml +1 -0
- data/app/views/admin/assets/_form.html.haml +3 -3
- data/app/views/admin/assets/_page_assets.html.haml +1 -1
- data/app/views/admin/assets/edit.html.haml +3 -3
- data/app/views/admin/assets/index.html.haml +2 -3
- data/app/views/admin/assets/new.html.haml +18 -18
- data/app/views/admin/assets/remove.html.haml +1 -1
- data/app/views/admin/pages/_assets.html.haml +7 -5
- data/config/application.rb +136 -0
- data/config/boot.rb +8 -0
- data/config/environment.rb +5 -0
- data/config/locales/en.yml +1 -1
- data/lib/trusty-clipped-extension.rb +1 -1
- data/rebuild +5 -0
- data/spec/ci/database.mysql.yml +27 -0
- data/spec/dummy/README.rdoc +28 -0
- data/spec/dummy/Rakefile +5 -0
- data/spec/dummy/bin/bundle +3 -0
- data/spec/dummy/bin/rails +4 -0
- data/spec/dummy/bin/rake +4 -0
- data/spec/dummy/bin/setup +29 -0
- data/spec/dummy/config/application.rb +152 -0
- data/spec/dummy/config/boot.rb +6 -0
- data/spec/dummy/config/database.yml +28 -0
- data/spec/dummy/config/environment.rb +5 -0
- data/spec/dummy/config/environments/development.rb +49 -0
- data/spec/dummy/config/environments/production.rb +79 -0
- data/spec/dummy/config/environments/test.rb +42 -0
- data/spec/dummy/config/initializers/assets.rb +11 -0
- data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/dummy/config/initializers/cookies_serializer.rb +3 -0
- data/spec/dummy/config/initializers/filter_parameter_logging.rb +4 -0
- data/spec/dummy/config/initializers/inflections.rb +16 -0
- data/spec/dummy/config/initializers/mime_types.rb +4 -0
- data/spec/dummy/config/initializers/session_store.rb +3 -0
- data/spec/dummy/config/initializers/trusty_cms_config.rb +20 -0
- data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/spec/dummy/config/locales/en.yml +23 -0
- data/spec/dummy/config/routes.rb +0 -0
- data/spec/dummy/config/secrets.yml +22 -0
- data/spec/dummy/config.ru +4 -0
- data/spec/dummy/db/schema.rb +144 -0
- data/spec/dummy/public/404.html +67 -0
- data/spec/dummy/public/422.html +67 -0
- data/spec/dummy/public/500.html +66 -0
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/dummy/tmp/cache/747/A70/TrustyCms%3A%3AConfig +0 -0
- data/spec/dummy/tmp/cache/85C/FA0/TrustyCms.cache_mtime +0 -0
- data/spec/dummy/tmp/cache/assets/test/sass/4efd780dc9118042804451835b878259e2afc5d1/_base.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sass/4efd780dc9118042804451835b878259e2afc5d1/main.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sass/66b1a0010012929c45ead4236f8cf67ab5e3ad10/_boxes.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sass/66b1a0010012929c45ead4236f8cf67ab5e3ad10/_gradients.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sass/66b1a0010012929c45ead4236f8cf67ab5e3ad10/_links.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sass/8d307e13c2e74a3d7d4d0eecd3e5daf9e7b1293d/_actions.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sass/8d307e13c2e74a3d7d4d0eecd3e5daf9e7b1293d/_avatars.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sass/8d307e13c2e74a3d7d4d0eecd3e5daf9e7b1293d/_content.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sass/8d307e13c2e74a3d7d4d0eecd3e5daf9e7b1293d/_dateinput.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sass/8d307e13c2e74a3d7d4d0eecd3e5daf9e7b1293d/_deprecated.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sass/8d307e13c2e74a3d7d4d0eecd3e5daf9e7b1293d/_dropdown.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sass/8d307e13c2e74a3d7d4d0eecd3e5daf9e7b1293d/_footer.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sass/8d307e13c2e74a3d7d4d0eecd3e5daf9e7b1293d/_forms.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sass/8d307e13c2e74a3d7d4d0eecd3e5daf9e7b1293d/_header.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sass/8d307e13c2e74a3d7d4d0eecd3e5daf9e7b1293d/_index.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sass/8d307e13c2e74a3d7d4d0eecd3e5daf9e7b1293d/_jquery-ui-structure.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sass/8d307e13c2e74a3d7d4d0eecd3e5daf9e7b1293d/_jquery-ui-theme.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sass/8d307e13c2e74a3d7d4d0eecd3e5daf9e7b1293d/_jquery-ui.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sass/8d307e13c2e74a3d7d4d0eecd3e5daf9e7b1293d/_layout.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sass/8d307e13c2e74a3d7d4d0eecd3e5daf9e7b1293d/_messages.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sass/8d307e13c2e74a3d7d4d0eecd3e5daf9e7b1293d/_popup.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sass/8d307e13c2e74a3d7d4d0eecd3e5daf9e7b1293d/_tabcontrol.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sass/8d307e13c2e74a3d7d4d0eecd3e5daf9e7b1293d/_toolbar.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sass/8d307e13c2e74a3d7d4d0eecd3e5daf9e7b1293d/_treetable.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sass/8d307e13c2e74a3d7d4d0eecd3e5daf9e7b1293d/_typography.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sass/8d307e13c2e74a3d7d4d0eecd3e5daf9e7b1293d/_validations.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/0253c2b6b6b5d225c38e795a508043e3 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/05634c84f3e97c2e300a0988e9c571b4 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/07c2bf9b54e44d186c3dc4fe775bf217 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/0a5bab0f5c49aafe2bef1ad4f0fdaa95 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/0b12b1d454f82ce157eba2a99c57b1c5 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/0d0f578e1d526a5592454fd915f28722 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/118a0efcdfc1be878d85967fb9eab9ab +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/126b3a20fbb3ee31f8d29ce1c0a3bae1 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/128df4bcf253b7dbb8bb8b6bd40b92d5 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/133ae3a6ec8ce5c435266446d406c497 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/13da4e71b104d636208b7ea380c9028b +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/1a0cf8baad9957cea0290cac02ee4324 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/22a8f218bcf0b68fecca4d5aa7b728b9 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/276aad4896e9ee6929626bcea973ec2f +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/27977269178c1332d1b0085b9830c8c7 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/2960553254e8b34684bd62fcd9ebcc88 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/298838d1f354a7ce98875c7225e6a6a7 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/29d248927769199391aa7c6b060730f2 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/2b29e5c4175ed37eae13bb9445cd0398 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/2c6aad6774b77dd0212ff0921a552fda +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/2e05b1c8f1f2eaa2c143c1097921fbaf +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/30f472e5b1cb95fcada64f956701fcfe +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/3722e239d8e0fc45691762190af60480 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/3cc3bb17b7fbe5eeeb9e2fd59f353ac2 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/4036e4e74ec8caaf31ebfa8200b11fc6 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/4bde469b10d79020fae3d263ac3d7c41 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/4dba5139e0cb793331971197e100dab7 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/50340e99333efe25311ff69d804d0044 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/566ea75053eeef9a45333422ebe11758 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/57ba3771151e2d17eb1f1df421fe8a96 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/5a8e4705d0930604da5dad00d49e7f49 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/5eed3bf8cfe6dcb764bea5c574d2d9c9 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/5f879c30ff953be36c9bd3bc12c58b15 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/649393b36e60cee5747d66aa96862184 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/649cb21e9d0e916026c8ff574f21cb7d +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/65aef06e5485abe748ec0f8ab5e83fa5 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/6745248fbc6beb42d1ab2b04b63c5c1a +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/6781fb6027c64b314bd774aa672574f6 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/6b3ab0bc5c8316baa291af39f5c44038 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/6da37e398c8c9f006f6b544cd714d834 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/72ce50f2edca010cee5ad75904a615c9 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/74021cd8376ee1203af17bed0d2bf27f +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/76d535649eb9bd798d9e1e9f64860451 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/7b3ae6ac77163f1d1c0bac4b66d0d910 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/7e97394489bc5dd3989b7dcdbd33d080 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/7eaf5a863f069a5571b3b0e12f2167fb +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/8117019177512a419d0852f3d871604e +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/8211e5da25cd8db999f3e83acc70b884 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/82426bfd2b08cc8ec14a62d560643a8c +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/83eee805228b7b26a9e9027d05b95402 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/858821775db3375fa2cdcfb2e1efe3cd +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/8cdfbf142f9e5dcb6785a6e61ca4861e +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/9316fc95ea7bd5108f6838f6c7e7be4e +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/95e0849d56a2a9e1e55d874be2c04ae2 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/965a1812be0bfc82e220e7f22ae384dc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/a1832984208c42e9a47980b4d6ac2dc9 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/a1e86c22b2e6cfbcdf9d68792bcedb7f +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/ad62c91ea509a5e8e4caf11c4922f392 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/b06ccd7385c6bd56ee7c6562a97e6b85 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/b2f5b7fb5cbed27d897a0368d4a6d5d2 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/b7505543b40b8ab466e9efe586d95346 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/bab4140b592b87efaf49c7bf60598425 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/baf8b56ddb9ca0245e093e29ade35c0a +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/be3cf8499757ed7678ee0a25d4aa3112 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/be5b781b3de58aa915133b4d41b76a0b +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/c0fc05e9c36943a5437ef516f58ebcd8 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/cb78e79ec2dd8bccf18927386de178ae +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/d2b5bbda0041b5ef56873dc8941d5ad9 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/dcc163a0f3096123d374f5632ad48d4b +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/df7b2d1131b58c69eef783a1ab4be24e +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/e1f5e19236dcdd3e73c8b8dedb8e3daf +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/e57bae9b7a4c75c1d0c2a3e1c1aae160 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/e63e2d8b377101ea8de761b46eb0f50f +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/ea25d11b296786fb90debfd6972d97d8 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/ec5a73c71a7a240d83eab2b121328bcd +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/efd49fd3ad186d8dce200e0ca411e35d +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/f35adec61f96a28e6d188caddee1fd4b +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/f5855ddab883d0ee58146d0369cc8227 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/f58cd07201e2fffd12f2e1829869c350 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/f657dcaacbf72b65af3abd6b22bf68b3 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/f91592d9720c5a81657c3198d7d525ac +0 -0
- data/spec/features/admin_login_spec.rb +92 -0
- data/spec/fixtures/users.yml +16 -0
- data/spec/lib/asset_tags_spec.rb +107 -107
- data/spec/lib/frame_grab_spec.rb +17 -17
- data/spec/lib/geometry_transformation_spec.rb +63 -63
- data/spec/rails_helper.rb +73 -0
- data/spec/spec_helper.rb +13 -35
- data/spec/support/custom_actions.rb +9 -0
- data/trusty-clipped-extension.gemspec +1 -1
- metadata +309 -31
- data/spec/ci/before_script +0 -23
- data/spec/ci/script +0 -2
- data/spec/controllers/admin/assets_controller_spec.rb +0 -50
- data/spec/controllers/admin/page_attachments_controller_spec.rb +0 -50
- data/spec/datasets/assets_dataset.rb +0 -36
- data/spec/models/asset_spec.rb +0 -72
- data/spec/models/asset_type_spec.rb +0 -70
- data/spec/models/post_processing_spec.rb +0 -62
@@ -0,0 +1,136 @@
|
|
1
|
+
require File.expand_path('../boot', __FILE__)
|
2
|
+
|
3
|
+
require 'rails/all'
|
4
|
+
require 'acts_as_tree'
|
5
|
+
require 'configuration_extensions/configuration_extensions'
|
6
|
+
require 'radius'
|
7
|
+
require 'trusty_cms/extension_loader'
|
8
|
+
require 'trusty_cms/initializer'
|
9
|
+
require 'compass'
|
10
|
+
require 'rack/cache'
|
11
|
+
require 'trustygems'
|
12
|
+
|
13
|
+
|
14
|
+
if defined?(Bundler)
|
15
|
+
# If you precompile assets before deploying to production, use this line
|
16
|
+
Bundler.require(*Rails.groups(:assets => %w(development test)))
|
17
|
+
# If you want your assets lazily compiled in production, use this line
|
18
|
+
# Bundler.require(:default, :assets, Rails.env)
|
19
|
+
end
|
20
|
+
|
21
|
+
module TrustyCms
|
22
|
+
class Application < Rails::Application
|
23
|
+
include TrustyCms::Initializer
|
24
|
+
config.active_record.whitelist_attributes = true
|
25
|
+
config.autoload_paths += %W(#{config.root}/lib)
|
26
|
+
Sass.load_paths << Compass::Frameworks['compass'].stylesheets_directory
|
27
|
+
|
28
|
+
# Enable the asset pipeline
|
29
|
+
config.assets.enabled = true
|
30
|
+
|
31
|
+
# Version of your assets, change this if you want to expire all your assets
|
32
|
+
config.assets.version = '1.0'
|
33
|
+
|
34
|
+
# Initialize extension paths
|
35
|
+
config.initialize_extension_paths
|
36
|
+
extension_loader = ExtensionLoader.instance {|l| l.initializer = self }
|
37
|
+
extension_loader.paths(:load).reverse_each do |path|
|
38
|
+
config.autoload_paths.unshift path
|
39
|
+
$LOAD_PATH.unshift path
|
40
|
+
end
|
41
|
+
paths["app/helpers"] = []
|
42
|
+
# config.add_plugin_paths(extension_loader.paths(:plugin))
|
43
|
+
radiant_locale_paths = Dir[File.join(TRUSTY_CMS_ROOT, 'config', 'locales', '*.{rb,yml}')]
|
44
|
+
config.i18n.load_path = radiant_locale_paths + extension_loader.paths(:locale)
|
45
|
+
I18n.enforce_available_locales = true
|
46
|
+
|
47
|
+
config.encoding = 'utf-8'
|
48
|
+
|
49
|
+
# Skip frameworks you're not going to use (only works if using vendor/rails).
|
50
|
+
# To use Rails without a database, you must remove the Active Record framework
|
51
|
+
# config.frameworks -= [ :action_mailer ]
|
52
|
+
|
53
|
+
# Only load the extensions named here, in the order given. By default all
|
54
|
+
# extensions in vendor/extensions are loaded, in alphabetical order. :all
|
55
|
+
# can be used as a placeholder for all extensions not explicitly named.
|
56
|
+
# config.extensions = [ :all ]
|
57
|
+
|
58
|
+
# By default, only English translations are loaded. Remove any of these from
|
59
|
+
# the list below if you'd like to provide any of the additional options
|
60
|
+
# config.ignore_extensions []
|
61
|
+
|
62
|
+
# Comment out this line if you want to turn off all caching, or
|
63
|
+
# add options to modify the behavior. In the majority of deployment
|
64
|
+
# scenarios it is desirable to leave TrustyCms's cache enabled and in
|
65
|
+
# the default configuration.
|
66
|
+
#
|
67
|
+
# Additional options:
|
68
|
+
# :use_x_sendfile => true
|
69
|
+
# Turns on X-Sendfile support for Apache with mod_xsendfile or lighttpd.
|
70
|
+
# :use_x_accel_redirect => '/some/virtual/path'
|
71
|
+
# Turns on X-Accel-Redirect support for nginx. You have to provide
|
72
|
+
# a path that corresponds to a virtual location in your webserver
|
73
|
+
# configuration.
|
74
|
+
# :entitystore => "radiant:tmp/cache/entity"
|
75
|
+
# Sets the entity store type (preceding the colon) and storage
|
76
|
+
# location (following the colon, relative to Rails.root).
|
77
|
+
# We recommend you use radiant: since this will enable manual expiration.
|
78
|
+
# :metastore => "radiant:tmp/cache/meta"
|
79
|
+
# Sets the meta store type and storage location. We recommend you use
|
80
|
+
# radiant: since this will enable manual expiration and acceleration headers.
|
81
|
+
|
82
|
+
|
83
|
+
config.middleware.use Rack::Cache,
|
84
|
+
:private_headers => ['Authorization'],
|
85
|
+
:entitystore => "radiant:tmp/cache/entity",
|
86
|
+
:metastore => "radiant:tmp/cache/meta",
|
87
|
+
:verbose => false,
|
88
|
+
:allow_reload => false,
|
89
|
+
:allow_revalidate => false
|
90
|
+
# TODO: There's got to be a better place for this, but in order for assets to work fornow, we need ConditionalGet
|
91
|
+
# TODO: Workaround from: https://github.com/rtomayko/rack-cache/issues/80
|
92
|
+
config.middleware.insert_before(Rack::ConditionalGet, Rack::Cache)
|
93
|
+
config.assets.enabled = true
|
94
|
+
|
95
|
+
|
96
|
+
config.filter_parameters += [:password, :password_confirmation]
|
97
|
+
|
98
|
+
# Use the database for sessions instead of the cookie-based default,
|
99
|
+
# which shouldn't be used to store highly confidential information
|
100
|
+
# (create the session table with 'rake db:sessions:create')
|
101
|
+
# config.action_controller.session_store = :cookie_store DEPRECATED
|
102
|
+
|
103
|
+
# Activate observers that should always be running
|
104
|
+
config.active_record.observers = :user_action_observer
|
105
|
+
|
106
|
+
# The internationalization framework can be changed to have another default locale (standard is :en) or more load paths.
|
107
|
+
# All files from config/locales/*.rb,yml are added automatically.
|
108
|
+
# config.i18n.load_path << Dir[File.join(Rails.root, 'my', 'locales', '*.{rb,yml}')]
|
109
|
+
# config.i18n.default_locale = :'en'
|
110
|
+
|
111
|
+
# Make Active Record use UTC-base instead of local time
|
112
|
+
config.time_zone = 'UTC'
|
113
|
+
|
114
|
+
# Set the default field error proc
|
115
|
+
config.action_view.field_error_proc = Proc.new do |html, instance|
|
116
|
+
if html !~ /label/
|
117
|
+
%{<span class="error-with-field">#{html} <span class="error">#{[instance.error_message].flatten.first}</span></span>}
|
118
|
+
else
|
119
|
+
html
|
120
|
+
end
|
121
|
+
end
|
122
|
+
config.after_initialize do
|
123
|
+
extension_loader.load_extensions
|
124
|
+
extension_loader.load_extension_initalizers
|
125
|
+
|
126
|
+
extension_loader.activate_extensions # also calls initialize_views
|
127
|
+
#config.add_controller_paths(extension_loader.paths(:controller))
|
128
|
+
#config.add_eager_load_paths(extension_loader.paths(:eager_load))
|
129
|
+
|
130
|
+
# Add new inflection rules using the following format:
|
131
|
+
ActiveSupport::Inflector.inflections do |inflect|
|
132
|
+
inflect.uncountable 'config'
|
133
|
+
end
|
134
|
+
end
|
135
|
+
end
|
136
|
+
end
|
data/config/boot.rb
ADDED
@@ -0,0 +1,8 @@
|
|
1
|
+
# Don't change this file!
|
2
|
+
# Configure your app in config/environment.rb and config/environments/*.rb
|
3
|
+
|
4
|
+
|
5
|
+
# Set up gems listed in the Gemfile.
|
6
|
+
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
|
7
|
+
|
8
|
+
require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE'])
|
data/config/locales/en.yml
CHANGED
@@ -51,7 +51,7 @@ en:
|
|
51
51
|
documents: 'Documents'
|
52
52
|
caption: 'Caption'
|
53
53
|
confirm_refresh_assets: 'Are you sure you want to regenerate every asset thumbnail? This is likely to take a long time and use a lot of server resources: <strong class="warning">the performance of your site is very likely to be affected</strong> and your browser may time out before the operation is complete. This is only recommended if your asset collection is small!'
|
54
|
-
confirm_remove_asset: 'Are you sure you want to
|
54
|
+
confirm_remove_asset: 'Are you sure you want to permanently remove the following asset?'
|
55
55
|
confirm_remove_from_page: 'Are you sure you want to remove this assets from the page?'
|
56
56
|
delete_asset: 'Delete Asset'
|
57
57
|
detach: 'Detach'
|
@@ -1,5 +1,5 @@
|
|
1
1
|
module TrustyCmsClippedExtension
|
2
|
-
VERSION = "2.0.
|
2
|
+
VERSION = "2.0.3-beta"
|
3
3
|
SUMMARY = %q{Assets for TrustyCms CMS}
|
4
4
|
DESCRIPTION = %q{Asset-management derived from Keith Bingman's Paperclipped extension.}
|
5
5
|
URL = "https://github.com/pgharts/trusty-clipped-extension"
|
data/rebuild
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
---
|
2
|
+
sudo: false
|
3
|
+
cache: bundler
|
4
|
+
|
5
|
+
language: ruby
|
6
|
+
rvm:
|
7
|
+
- 2.1.5
|
8
|
+
|
9
|
+
services: mysql
|
10
|
+
|
11
|
+
before_script:
|
12
|
+
- cp spec/ci/database.mysql.yml config/database.yml;
|
13
|
+
- bundle exec rake app:db:create
|
14
|
+
- bundle exec rake app:db:migrate
|
15
|
+
|
16
|
+
|
17
|
+
script:
|
18
|
+
- bundle exec rake app:spec
|
19
|
+
|
20
|
+
branches:
|
21
|
+
only:
|
22
|
+
- master
|
23
|
+
|
24
|
+
notifications:
|
25
|
+
recipients:
|
26
|
+
- sipple@trustarts.org
|
27
|
+
slack: trustarts:FrVc7H8dDadhctfZ7NvHTZES
|
@@ -0,0 +1,28 @@
|
|
1
|
+
== README
|
2
|
+
|
3
|
+
This README would normally document whatever steps are necessary to get the
|
4
|
+
application up and running.
|
5
|
+
|
6
|
+
Things you may want to cover:
|
7
|
+
|
8
|
+
* Ruby version
|
9
|
+
|
10
|
+
* System dependencies
|
11
|
+
|
12
|
+
* Configuration
|
13
|
+
|
14
|
+
* Database creation
|
15
|
+
|
16
|
+
* Database initialization
|
17
|
+
|
18
|
+
* How to run the test suite
|
19
|
+
|
20
|
+
* Services (job queues, cache servers, search engines, etc.)
|
21
|
+
|
22
|
+
* Deployment instructions
|
23
|
+
|
24
|
+
* ...
|
25
|
+
|
26
|
+
|
27
|
+
Please feel free to use a different markup language if you do not plan to run
|
28
|
+
<tt>rake doc:app</tt>.
|
data/spec/dummy/Rakefile
ADDED
data/spec/dummy/bin/rake
ADDED
@@ -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,152 @@
|
|
1
|
+
require File.expand_path('../boot', __FILE__)
|
2
|
+
|
3
|
+
require 'rails/all'
|
4
|
+
require 'acts_as_tree'
|
5
|
+
require "trusty_cms"
|
6
|
+
require 'ckeditor'
|
7
|
+
require 'radius'
|
8
|
+
require 'trusty_cms/extension_loader'
|
9
|
+
require 'trusty_cms/initializer'
|
10
|
+
require 'string_extensions/string_extensions'
|
11
|
+
require 'active_record_extensions/active_record_extensions'
|
12
|
+
require 'configuration_extensions/configuration_extensions'
|
13
|
+
require 'compass'
|
14
|
+
require 'rack/cache'
|
15
|
+
require "sass-rails"
|
16
|
+
|
17
|
+
if defined?(Bundler)
|
18
|
+
require 'rake'
|
19
|
+
# If you precompile assets before deploying to production, use this line
|
20
|
+
Bundler.require(*Rails.groups(:assets => %w(development test)))
|
21
|
+
# If you want your assets lazily compiled in production, use this line
|
22
|
+
# Bundler.require(:default, :assets, Rails.env)
|
23
|
+
end
|
24
|
+
|
25
|
+
module TrustyCms
|
26
|
+
class Application < Rails::Application
|
27
|
+
include TrustyCms::Initializer
|
28
|
+
|
29
|
+
config.autoload_paths += %W(#{TRUSTY_CMS_ROOT}/lib)
|
30
|
+
config.autoload_paths += %W(#{config.root}/lib)
|
31
|
+
config.autoload_paths += %W(#{config.root}/app/helpers)
|
32
|
+
|
33
|
+
Sass.load_paths << Compass::Frameworks['compass'].stylesheets_directory
|
34
|
+
|
35
|
+
# Initialize extension paths
|
36
|
+
config.initialize_extension_paths
|
37
|
+
extension_loader = ExtensionLoader.instance {|l| l.initializer = self }
|
38
|
+
extension_loader.paths(:load).reverse_each do |path, value|
|
39
|
+
config.autoload_paths.unshift path
|
40
|
+
$LOAD_PATH.unshift path
|
41
|
+
end
|
42
|
+
# config.add_plugin_paths(extension_loader.paths(:plugin))
|
43
|
+
# TODO: Come back and look at this.
|
44
|
+
radiant_locale_paths = Dir[File.join(TRUSTY_CMS_ROOT, 'config', 'locales', '*.{rb,yml}')]
|
45
|
+
config.i18n.load_path = radiant_locale_paths + extension_loader.paths(:locale)
|
46
|
+
|
47
|
+
config.encoding = 'utf-8'
|
48
|
+
# Skip frameworks you're not going to use (only works if using vendor/rails).
|
49
|
+
# To use Rails without a database, you must remove the Active Record framework
|
50
|
+
# config.frameworks -= [ :action_mailer ]
|
51
|
+
|
52
|
+
# Only load the extensions named here, in the order given. By default all
|
53
|
+
# extensions in vendor/extensions are loaded, in alphabetical order. :all
|
54
|
+
# can be used as a placeholder for all extensions not explicitly named.
|
55
|
+
|
56
|
+
# An example of how to add extensions:
|
57
|
+
# config.extensions = [ :snippets, :clipped, :layouts, :reorder, :multi_site, :rad_social]
|
58
|
+
|
59
|
+
config.extensions = [:clipped]
|
60
|
+
config.extensions_migration_order = [:clipped]
|
61
|
+
|
62
|
+
# By default, only English translations are loaded. Remove any of these from
|
63
|
+
# the list below if you'd like to provide any of the additional options
|
64
|
+
# config.ignore_extensions []
|
65
|
+
|
66
|
+
# Your secret key for verifying cookie session data integrity.
|
67
|
+
# If you change this key, all old sessions will become invalid!
|
68
|
+
# Make sure the secret is at least 30 characters and all random,
|
69
|
+
# no regular words or you'll be exposed to dictionary attacks.
|
70
|
+
|
71
|
+
# Comment out this line if you want to turn off all caching, or
|
72
|
+
# add options to modify the behavior. In the majority of deployment
|
73
|
+
# scenarios it is desirable to leave TrustyCms's cache enabled and in
|
74
|
+
# the default configuration.
|
75
|
+
#
|
76
|
+
# Additional options:
|
77
|
+
# :use_x_sendfile => true
|
78
|
+
# Turns on X-Sendfile support for Apache with mod_xsendfile or lighttpd.
|
79
|
+
# :use_x_accel_redirect => '/some/virtual/path'
|
80
|
+
# Turns on X-Accel-Redirect support for nginx. You have to provide
|
81
|
+
# a path that corresponds to a virtual location in your webserver
|
82
|
+
# configuration.
|
83
|
+
# :entitystore => "radiant:tmp/cache/entity"
|
84
|
+
# Sets the entity store type (preceding the colon) and storage
|
85
|
+
# location (following the colon, relative to Rails.root).
|
86
|
+
# We recommend you use radiant: since this will enable manual expiration.
|
87
|
+
# :metastore => "radiant:tmp/cache/meta"
|
88
|
+
# Sets the meta store type and storage location. We recommend you use
|
89
|
+
# radiant: since this will enable manual expiration and acceleration headers.
|
90
|
+
|
91
|
+
# TODO: We're not sure this is actually working, but we can't really test this until the app initializes.
|
92
|
+
config.middleware.use Rack::Cache,
|
93
|
+
:private_headers => ['Authorization'],
|
94
|
+
:entitystore => "radiant:tmp/cache/entity",
|
95
|
+
:metastore => "radiant:tmp/cache/meta",
|
96
|
+
:verbose => false,
|
97
|
+
:allow_reload => false,
|
98
|
+
:allow_revalidate => false
|
99
|
+
# TODO: There's got to be a better place for this, but in order for assets to work fornow, we need ConditionalGet
|
100
|
+
# TODO: Workaround from: https://github.com/rtomayko/rack-cache/issues/80
|
101
|
+
config.middleware.insert_before(Rack::ConditionalGet, Rack::Cache)
|
102
|
+
config.assets.enabled = true
|
103
|
+
|
104
|
+
|
105
|
+
|
106
|
+
config.filter_parameters += [:password, :password_confirmation]
|
107
|
+
|
108
|
+
# Use the database for sessions instead of the cookie-based default,
|
109
|
+
# which shouldn't be used to store highly confidential information
|
110
|
+
# (create the session table with 'rake db:sessions:create')
|
111
|
+
# config.action_controller.session_store = :cookie_store DEPRECATED
|
112
|
+
|
113
|
+
# Activate observers that should always be running
|
114
|
+
#config.active_record.observers = :user_action_observer
|
115
|
+
|
116
|
+
# The internationalization framework can be changed to have another default locale (standard is :en) or more load paths.
|
117
|
+
# All files from config/locales/*.rb,yml are added automatically.
|
118
|
+
# config.i18n.load_path << Dir[File.join(Rails.root, 'my', 'locales', '*.{rb,yml}')]
|
119
|
+
# config.i18n.default_locale = :'en'
|
120
|
+
|
121
|
+
# Make Active Record use UTC-base instead of local time
|
122
|
+
config.time_zone = 'UTC'
|
123
|
+
|
124
|
+
# Set the default field error proc
|
125
|
+
config.action_view.field_error_proc = Proc.new do |html, instance|
|
126
|
+
if html !~ /label/
|
127
|
+
%{<span class="error-with-fieldxxxx">#{html} <span class="error">#{[instance.error_message].flatten.first}</span></span>}.html_safe
|
128
|
+
else
|
129
|
+
html
|
130
|
+
end
|
131
|
+
end
|
132
|
+
|
133
|
+
config.after_initialize do
|
134
|
+
extension_loader.load_extensions
|
135
|
+
extension_loader.load_extension_initalizers
|
136
|
+
|
137
|
+
#Dir["#{TRUSTY_CMS_ROOT}/config/initializers/**/*.rb"].sort.each do |initializer|
|
138
|
+
# load(initializer)
|
139
|
+
#end
|
140
|
+
|
141
|
+
extension_loader.activate_extensions # also calls initialize_views
|
142
|
+
#config.add_controller_paths(extension_loader.paths(:controller))
|
143
|
+
#config.add_eager_load_paths(extension_loader.paths(:eager_load))
|
144
|
+
|
145
|
+
# Add new inflection rules using the following format:
|
146
|
+
ActiveSupport::Inflector.inflections do |inflect|
|
147
|
+
inflect.uncountable 'config'
|
148
|
+
end
|
149
|
+
|
150
|
+
end
|
151
|
+
end
|
152
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
#
|
2
|
+
# This is only an example configuration. Please see the Rails
|
3
|
+
# documentation for more details.
|
4
|
+
#
|
5
|
+
|
6
|
+
development:
|
7
|
+
adapter: mysql
|
8
|
+
database: trusty_cms_dev
|
9
|
+
username: root
|
10
|
+
password:
|
11
|
+
host: localhost
|
12
|
+
|
13
|
+
test: &TEST
|
14
|
+
adapter: mysql
|
15
|
+
database: trusty_cms_test
|
16
|
+
username: root
|
17
|
+
password:
|
18
|
+
host: localhost
|
19
|
+
|
20
|
+
production:
|
21
|
+
adapter: mysql
|
22
|
+
database: trusty_cms_live
|
23
|
+
username: root
|
24
|
+
password:
|
25
|
+
socket: /tmp/mysql.sock
|
26
|
+
|
27
|
+
cucumber:
|
28
|
+
<<: *TEST
|
@@ -0,0 +1,49 @@
|
|
1
|
+
TrustyCms::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
|
+
config.whiny_nils = true
|
13
|
+
|
14
|
+
# Show full error reports and disable caching.
|
15
|
+
config.consider_all_requests_local = true
|
16
|
+
config.action_controller.perform_caching = false
|
17
|
+
|
18
|
+
# Don't care if the mailer can't send.
|
19
|
+
config.action_mailer.raise_delivery_errors = false
|
20
|
+
config.domain = ".local"
|
21
|
+
|
22
|
+
# Print deprecation notices to the Rails logger.
|
23
|
+
config.active_support.deprecation = :log
|
24
|
+
|
25
|
+
# Raise an error on page load if there are pending migrations.
|
26
|
+
config.active_record.migration_error = :page_load
|
27
|
+
|
28
|
+
# Debug mode disables concatenation and preprocessing of assets.
|
29
|
+
# This option may cause significant delays in view rendering with a large
|
30
|
+
# number of complex assets.
|
31
|
+
#config.assets.debug = true
|
32
|
+
|
33
|
+
# Asset digests allow you to set far-future HTTP expiration dates on all assets,
|
34
|
+
# yet still be able to expire them through the digest params.
|
35
|
+
#config.assets.digest = true
|
36
|
+
|
37
|
+
# Adds additional error checking when serving assets at runtime.
|
38
|
+
# Checks for improperly declared sprockets dependencies.
|
39
|
+
# Raises helpful error messages.
|
40
|
+
#config.assets.raise_runtime_errors = true
|
41
|
+
|
42
|
+
# Raises error for missing translations
|
43
|
+
# config.action_view.raise_on_missing_translations = true
|
44
|
+
|
45
|
+
config.after_initialize do
|
46
|
+
SiteController.cache_timeout = 0.minutes
|
47
|
+
end
|
48
|
+
|
49
|
+
end
|
@@ -0,0 +1,79 @@
|
|
1
|
+
Rails.application.configure do
|
2
|
+
# Settings specified here will take precedence over those in config/application.rb.
|
3
|
+
|
4
|
+
# Code is not reloaded between requests.
|
5
|
+
config.cache_classes = true
|
6
|
+
|
7
|
+
# Eager load code on boot. This eager loads most of Rails and
|
8
|
+
# your application in memory, allowing both threaded web servers
|
9
|
+
# and those relying on copy on write to perform better.
|
10
|
+
# Rake tasks automatically ignore this option for performance.
|
11
|
+
config.eager_load = true
|
12
|
+
|
13
|
+
# Full error reports are disabled and caching is turned on.
|
14
|
+
config.consider_all_requests_local = false
|
15
|
+
config.action_controller.perform_caching = true
|
16
|
+
|
17
|
+
# Enable Rack::Cache to put a simple HTTP cache in front of your application
|
18
|
+
# Add `rack-cache` to your Gemfile before enabling this.
|
19
|
+
# For large-scale production use, consider using a caching reverse proxy like
|
20
|
+
# NGINX, varnish or squid.
|
21
|
+
# config.action_dispatch.rack_cache = true
|
22
|
+
|
23
|
+
# Disable serving static files from the `/public` folder by default since
|
24
|
+
# Apache or NGINX already handles this.
|
25
|
+
config.serve_static_files = ENV['RAILS_SERVE_STATIC_FILES'].present?
|
26
|
+
|
27
|
+
# Compress JavaScripts and CSS.
|
28
|
+
config.assets.js_compressor = :uglifier
|
29
|
+
# config.assets.css_compressor = :sass
|
30
|
+
|
31
|
+
# Do not fallback to assets pipeline if a precompiled asset is missed.
|
32
|
+
config.assets.compile = false
|
33
|
+
|
34
|
+
# Asset digests allow you to set far-future HTTP expiration dates on all assets,
|
35
|
+
# yet still be able to expire them through the digest params.
|
36
|
+
config.assets.digest = true
|
37
|
+
|
38
|
+
# `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb
|
39
|
+
|
40
|
+
# Specifies the header that your server uses for sending files.
|
41
|
+
# config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache
|
42
|
+
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX
|
43
|
+
|
44
|
+
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
|
45
|
+
# config.force_ssl = true
|
46
|
+
|
47
|
+
# Use the lowest log level to ensure availability of diagnostic information
|
48
|
+
# when problems arise.
|
49
|
+
config.log_level = :debug
|
50
|
+
|
51
|
+
# Prepend all log lines with the following tags.
|
52
|
+
# config.log_tags = [ :subdomain, :uuid ]
|
53
|
+
|
54
|
+
# Use a different logger for distributed setups.
|
55
|
+
# config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
|
56
|
+
|
57
|
+
# Use a different cache store in production.
|
58
|
+
# config.cache_store = :mem_cache_store
|
59
|
+
|
60
|
+
# Enable serving of images, stylesheets, and JavaScripts from an asset server.
|
61
|
+
# config.action_controller.asset_host = 'http://assets.example.com'
|
62
|
+
|
63
|
+
# Ignore bad email addresses and do not raise email delivery errors.
|
64
|
+
# Set this to true and configure the email server for immediate delivery to raise delivery errors.
|
65
|
+
# config.action_mailer.raise_delivery_errors = false
|
66
|
+
|
67
|
+
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
|
68
|
+
# the I18n.default_locale when a translation cannot be found).
|
69
|
+
config.i18n.fallbacks = true
|
70
|
+
|
71
|
+
# Send deprecation notices to registered listeners.
|
72
|
+
config.active_support.deprecation = :notify
|
73
|
+
|
74
|
+
# Use default logging formatter so that PID and timestamp are not suppressed.
|
75
|
+
config.log_formatter = ::Logger::Formatter.new
|
76
|
+
|
77
|
+
# Do not dump schema after migrations.
|
78
|
+
config.active_record.dump_schema_after_migration = false
|
79
|
+
end
|
@@ -0,0 +1,42 @@
|
|
1
|
+
TrustyCms::Application.configure do
|
2
|
+
# Settings specified here will take precedence over those in config/application.rb.
|
3
|
+
|
4
|
+
# The test environment is used exclusively to run your application's
|
5
|
+
# test suite. You never need to work with it otherwise. Remember that
|
6
|
+
# your test database is "scratch space" for the test suite and is wiped
|
7
|
+
# and recreated between test runs. Don't rely on the data there!
|
8
|
+
config.cache_classes = true
|
9
|
+
|
10
|
+
# Do not eager load code on boot. This avoids loading your whole application
|
11
|
+
# just for the purpose of running a single test. If you are using a tool that
|
12
|
+
# preloads Rails for running tests, you may have to set it to true.
|
13
|
+
config.eager_load = false
|
14
|
+
|
15
|
+
# Configure static file server for tests with Cache-Control for performance.
|
16
|
+
config.serve_static_files = true
|
17
|
+
config.static_cache_control = 'public, max-age=3600'
|
18
|
+
|
19
|
+
# Show full error reports and disable caching.
|
20
|
+
config.consider_all_requests_local = true
|
21
|
+
config.action_controller.perform_caching = false
|
22
|
+
|
23
|
+
# Raise exceptions instead of rendering exception templates.
|
24
|
+
config.action_dispatch.show_exceptions = false
|
25
|
+
|
26
|
+
# Disable request forgery protection in test environment.
|
27
|
+
config.action_controller.allow_forgery_protection = false
|
28
|
+
|
29
|
+
# Tell Action Mailer not to deliver emails to the real world.
|
30
|
+
# The :test delivery method accumulates sent emails in the
|
31
|
+
# ActionMailer::Base.deliveries array.
|
32
|
+
config.action_mailer.delivery_method = :test
|
33
|
+
|
34
|
+
# Randomize the order test cases are executed.
|
35
|
+
config.active_support.test_order = :random
|
36
|
+
|
37
|
+
# Print deprecation notices to the stderr.
|
38
|
+
config.active_support.deprecation = :stderr
|
39
|
+
|
40
|
+
# Raises error for missing translations
|
41
|
+
# config.action_view.raise_on_missing_translations = true
|
42
|
+
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# Version of your assets, change this if you want to expire all your assets.
|
4
|
+
Rails.application.config.assets.version = '1.0'
|
5
|
+
|
6
|
+
# Add additional assets to the asset load path
|
7
|
+
# Rails.application.config.assets.paths << Emoji.images_path
|
8
|
+
|
9
|
+
# Precompile additional assets.
|
10
|
+
# application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
|
11
|
+
# Rails.application.config.assets.precompile += %w( search.js )
|