refinerycms-copywriting 2.0.1 → 2.0.2
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.
- data/app/helpers/refinery/copywriting/copywriting_helper.rb +19 -0
- data/lib/refinery/copywriting/engine.rb +1 -2
- data/lib/refinery/copywriting.rb +0 -4
- data/spec/dummy/README.rdoc +261 -0
- data/spec/dummy/Rakefile +7 -0
- data/spec/dummy/app/assets/javascripts/application.js +15 -0
- data/spec/dummy/app/assets/stylesheets/application.css +13 -0
- data/spec/dummy/app/controllers/application_controller.rb +3 -0
- data/spec/dummy/app/helpers/application_helper.rb +2 -0
- data/spec/dummy/app/views/sitemap/index.xml.builder +25 -0
- data/spec/dummy/config/application.rb +62 -0
- data/spec/dummy/config/boot.rb +6 -0
- data/spec/dummy/config/database.yml +18 -0
- data/spec/dummy/config/database.yml.mysql +20 -0
- data/spec/dummy/config/database.yml.postgresql +58 -0
- data/spec/dummy/config/database.yml.sqlite3 +18 -0
- data/spec/dummy/config/environment.rb +5 -0
- data/spec/dummy/config/environments/development.rb +37 -0
- data/spec/dummy/config/environments/production.rb +71 -0
- data/spec/dummy/config/environments/test.rb +37 -0
- data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/dummy/config/initializers/devise.rb +229 -0
- data/spec/dummy/config/initializers/inflections.rb +15 -0
- data/spec/dummy/config/initializers/mime_types.rb +5 -0
- data/spec/dummy/config/initializers/refinery/core.rb +48 -0
- data/spec/dummy/config/initializers/refinery/images.rb +41 -0
- data/spec/dummy/config/initializers/refinery/pages.rb +44 -0
- data/spec/dummy/config/initializers/refinery/resources.rb +26 -0
- data/spec/dummy/config/initializers/secret_token.rb +7 -0
- data/spec/dummy/config/initializers/session_store.rb +8 -0
- data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/spec/dummy/config/locales/en.yml +5 -0
- data/spec/dummy/config/routes.rb +3 -0
- data/spec/dummy/config.ru +4 -0
- data/spec/dummy/db/migrate/20120416115049_create_copywritings.refinery_copywriting.rb +24 -0
- data/spec/dummy/db/migrate/20120416115050_create_copywriting_translation_table.refinery_copywriting.rb +42 -0
- data/spec/dummy/db/migrate/20120416115051_add_phrase_type.refinery_copywriting.rb +12 -0
- data/spec/dummy/db/migrate/20120416115052_add_refinery_prefix_to_tables.refinery_copywriting.rb +14 -0
- data/spec/dummy/db/migrate/20120416115053_add_phrase_last_access_at.refinery_copywriting.rb +12 -0
- data/spec/dummy/db/migrate/20120416115054_create_refinerycms_authentication_schema.refinery_authentication.rb +44 -0
- data/spec/dummy/db/migrate/20120416115055_create_refinerycms_images_schema.refinery_images.rb +16 -0
- data/spec/dummy/db/migrate/20120416115056_create_refinerycms_resources_schema.refinery_resources.rb +14 -0
- data/spec/dummy/db/migrate/20120416115057_create_refinerycms_pages_schema.refinery_pages.rb +59 -0
- data/spec/dummy/db/migrate/20120416115058_create_seo_meta.seo_meta_engine.rb +24 -0
- data/spec/dummy/db/schema.rb +177 -0
- data/spec/dummy/db/seeds.rb +10 -0
- data/spec/dummy/dummy_dev +0 -0
- data/spec/dummy/dummy_test +0 -0
- data/spec/dummy/log/development.log +389 -0
- data/spec/dummy/log/test.log +1894 -0
- data/spec/dummy/public/404.html +26 -0
- data/spec/dummy/public/422.html +26 -0
- data/spec/dummy/public/500.html +25 -0
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/dummy/script/rails +6 -0
- data/spec/dummy/tmp/index/development/refinery/page/102_111_117.ind +2 -0
- data/spec/dummy/tmp/index/development/refinery/page/104_111_109.ind +0 -0
- data/spec/dummy/tmp/index/development/refinery/page/110_111_116.ind +1 -0
- data/spec/dummy/tmp/index/development/refinery/page/112_97_103.ind +0 -0
- data/spec/dummy/tmp/index/development/refinery/page/97_98_111.ind +0 -0
- data/spec/dummy/tmp/index/development/refinery/page/size +1 -0
- data/spec/dummy/tmp/index/development/refinery/page/version +1 -0
- data/spec/dummy/tmp/index/test/refinery/page/112_97_103.ind +1 -0
- data/spec/dummy/tmp/index/test/refinery/page/116_101_115.ind +0 -0
- data/spec/dummy/tmp/index/test/refinery/page/size +1 -0
- data/spec/dummy/tmp/index/test/refinery/page/version +1 -0
- data/spec/helpers/copywriting_helper_spec.rb +8 -8
- metadata +65 -3
- data/app/helpers/copywriting_helper.rb +0 -16
- data/lib/tasks/rspec.rake +0 -4
@@ -0,0 +1,71 @@
|
|
1
|
+
Dummy::Application.configure do
|
2
|
+
|
3
|
+
# Refinery has set config.assets.initialize_on_precompile = false by default.
|
4
|
+
config.assets.initialize_on_precompile = false
|
5
|
+
|
6
|
+
# Settings specified here will take precedence over those in config/application.rb
|
7
|
+
|
8
|
+
# Code is not reloaded between requests
|
9
|
+
config.cache_classes = true
|
10
|
+
|
11
|
+
# Full error reports are disabled and caching is turned on
|
12
|
+
config.consider_all_requests_local = false
|
13
|
+
config.action_controller.perform_caching = true
|
14
|
+
|
15
|
+
# Disable Rails's static asset server (Apache or nginx will already do this)
|
16
|
+
config.serve_static_assets = false
|
17
|
+
|
18
|
+
# Compress JavaScripts and CSS
|
19
|
+
config.assets.compress = true
|
20
|
+
|
21
|
+
# Don't fallback to assets pipeline if a precompiled asset is missed
|
22
|
+
config.assets.compile = true
|
23
|
+
|
24
|
+
# Generate digests for assets URLs
|
25
|
+
config.assets.digest = true
|
26
|
+
|
27
|
+
# Defaults to Rails.root.join("public/assets")
|
28
|
+
# config.assets.manifest = YOUR_PATH
|
29
|
+
|
30
|
+
# Specifies the header that your server uses for sending files
|
31
|
+
# config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
|
32
|
+
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
|
33
|
+
|
34
|
+
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
|
35
|
+
# config.force_ssl = true
|
36
|
+
|
37
|
+
# See everything in the log (default is :info)
|
38
|
+
# config.log_level = :debug
|
39
|
+
|
40
|
+
# Prepend all log lines with the following tags
|
41
|
+
# config.log_tags = [ :subdomain, :uuid ]
|
42
|
+
|
43
|
+
# Use a different logger for distributed setups
|
44
|
+
# config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
|
45
|
+
|
46
|
+
# Use a different cache store in production
|
47
|
+
# config.cache_store = :mem_cache_store
|
48
|
+
|
49
|
+
# Enable serving of images, stylesheets, and JavaScripts from an asset server
|
50
|
+
# config.action_controller.asset_host = "http://assets.example.com"
|
51
|
+
|
52
|
+
# Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added)
|
53
|
+
# config.assets.precompile += %w( search.js )
|
54
|
+
|
55
|
+
# Disable delivery errors, bad email addresses will be ignored
|
56
|
+
# config.action_mailer.raise_delivery_errors = false
|
57
|
+
|
58
|
+
# Enable threaded mode
|
59
|
+
# config.threadsafe!
|
60
|
+
|
61
|
+
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
|
62
|
+
# the I18n.default_locale when a translation can not be found)
|
63
|
+
config.i18n.fallbacks = true
|
64
|
+
|
65
|
+
# Send deprecation notices to registered listeners
|
66
|
+
config.active_support.deprecation = :notify
|
67
|
+
|
68
|
+
# Log the query plan for queries taking more than this (works
|
69
|
+
# with SQLite, MySQL, and PostgreSQL)
|
70
|
+
# config.active_record.auto_explain_threshold_in_seconds = 0.5
|
71
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
Dummy::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
|
+
# Configure static asset server for tests with Cache-Control for performance
|
11
|
+
config.serve_static_assets = true
|
12
|
+
config.static_cache_control = "public, max-age=3600"
|
13
|
+
|
14
|
+
# Log error messages when you accidentally call methods on nil
|
15
|
+
config.whiny_nils = true
|
16
|
+
|
17
|
+
# Show full error reports and disable caching
|
18
|
+
config.consider_all_requests_local = true
|
19
|
+
config.action_controller.perform_caching = false
|
20
|
+
|
21
|
+
# Raise exceptions instead of rendering exception templates
|
22
|
+
config.action_dispatch.show_exceptions = false
|
23
|
+
|
24
|
+
# Disable request forgery protection in test environment
|
25
|
+
config.action_controller.allow_forgery_protection = false
|
26
|
+
|
27
|
+
# Tell Action Mailer not to deliver emails to the real world.
|
28
|
+
# The :test delivery method accumulates sent emails in the
|
29
|
+
# ActionMailer::Base.deliveries array.
|
30
|
+
config.action_mailer.delivery_method = :test
|
31
|
+
|
32
|
+
# Raise exception on mass assignment protection for Active Record models
|
33
|
+
config.active_record.mass_assignment_sanitizer = :strict
|
34
|
+
|
35
|
+
# Print deprecation notices to the stderr
|
36
|
+
config.active_support.deprecation = :stderr
|
37
|
+
end
|
@@ -0,0 +1,7 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
|
4
|
+
# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
|
5
|
+
|
6
|
+
# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
|
7
|
+
# Rails.backtrace_cleaner.remove_silencers!
|
@@ -0,0 +1,229 @@
|
|
1
|
+
require 'devise'
|
2
|
+
|
3
|
+
# Use this hook to configure devise mailer, warden hooks and so forth.
|
4
|
+
# Many of these configuration options can be set straight in your model.
|
5
|
+
Devise.setup do |config|
|
6
|
+
# ==> Mailer Configuration
|
7
|
+
# Configure the e-mail address which will be shown in Devise::Mailer,
|
8
|
+
# note that it will be overwritten if you use your own mailer class with default "from" parameter.
|
9
|
+
# config.mailer_sender = "please-change-me-at-config-initializers-devise@example.com"
|
10
|
+
|
11
|
+
# Configure the class responsible to send e-mails.
|
12
|
+
# config.mailer = "Devise::Mailer"
|
13
|
+
|
14
|
+
# Automatically apply schema changes in tableless databases
|
15
|
+
config.apply_schema = false
|
16
|
+
|
17
|
+
# ==> ORM configuration
|
18
|
+
# Load and configure the ORM. Supports :active_record (default) and
|
19
|
+
# :mongoid (bson_ext recommended) by default. Other ORMs may be
|
20
|
+
# available as additional gems.
|
21
|
+
require 'devise/orm/active_record'
|
22
|
+
|
23
|
+
# ==> Configuration for any authentication mechanism
|
24
|
+
# Configure which keys are used when authenticating a user. The default is
|
25
|
+
# just :email. You can configure it to use [:username, :subdomain], so for
|
26
|
+
# authenticating a user, both parameters are required. Remember that those
|
27
|
+
# parameters are used only when authenticating and not when retrieving from
|
28
|
+
# session. If you need permissions, you should implement that in a before filter.
|
29
|
+
# You can also supply a hash where the value is a boolean determining whether
|
30
|
+
# or not authentication should be aborted when the value is not present.
|
31
|
+
config.authentication_keys = [ :login ]
|
32
|
+
|
33
|
+
# Configure parameters from the request object used for authentication. Each entry
|
34
|
+
# given should be a request method and it will automatically be passed to the
|
35
|
+
# find_for_authentication method and considered in your model lookup. For instance,
|
36
|
+
# if you set :request_keys to [:subdomain], :subdomain will be used on authentication.
|
37
|
+
# The same considerations mentioned for authentication_keys also apply to request_keys.
|
38
|
+
# config.request_keys = []
|
39
|
+
|
40
|
+
# Configure which authentication keys should be case-insensitive.
|
41
|
+
# These keys will be downcased upon creating or modifying a user and when used
|
42
|
+
# to authenticate or find a user. Default is :email.
|
43
|
+
config.case_insensitive_keys = []
|
44
|
+
|
45
|
+
# Configure which authentication keys should have whitespace stripped.
|
46
|
+
# These keys will have whitespace before and after removed upon creating or
|
47
|
+
# modifying a user and when used to authenticate or find a user. Default is :email.
|
48
|
+
# config.strip_whitespace_keys = [ :email ]
|
49
|
+
|
50
|
+
# Tell if authentication through request.params is enabled. True by default.
|
51
|
+
# It can be set to an array that will enable params authentication only for the
|
52
|
+
# given stratragies, for example, `config.params_authenticatable = [:database]` will
|
53
|
+
# enable it only for database (email + password) authentication.
|
54
|
+
# config.params_authenticatable = true
|
55
|
+
|
56
|
+
# Tell if authentication through HTTP Basic Auth is enabled. False by default.
|
57
|
+
# It can be set to an array that will enable http authentication only for the
|
58
|
+
# given stratragies, for example, `config.http_authenticatable = [:token]` will
|
59
|
+
# enable it only for token authentication.
|
60
|
+
# config.http_authenticatable = false
|
61
|
+
|
62
|
+
# If http headers should be returned for AJAX requests. True by default.
|
63
|
+
# config.http_authenticatable_on_xhr = true
|
64
|
+
|
65
|
+
# The realm used in Http Basic Authentication. "Application" by default.
|
66
|
+
# config.http_authentication_realm = "Application"
|
67
|
+
|
68
|
+
# It will change confirmation, password recovery and other workflows
|
69
|
+
# to behave the same regardless if the e-mail provided was right or wrong.
|
70
|
+
# Does not affect registerable.
|
71
|
+
# config.paranoid = true
|
72
|
+
|
73
|
+
# By default Devise will store the user in session. You can skip storage for
|
74
|
+
# :http_auth and :token_auth by adding those symbols to the array below.
|
75
|
+
# Notice that if you are skipping storage for all authentication paths, you
|
76
|
+
# may want to disable generating routes to Devise's sessions controller by
|
77
|
+
# passing :skip => :sessions to `devise_for` in your config/routes.rb
|
78
|
+
config.skip_session_storage = [:http_auth]
|
79
|
+
|
80
|
+
# ==> Configuration for :database_authenticatable
|
81
|
+
# For bcrypt, this is the cost for hashing the password and defaults to 10. If
|
82
|
+
# using other encryptors, it sets how many times you want the password re-encrypted.
|
83
|
+
#
|
84
|
+
# Limiting the stretches to just one in testing will increase the performance of
|
85
|
+
# your test suite dramatically. However, it is STRONGLY RECOMMENDED to not use
|
86
|
+
# a value less than 10 in other environments.
|
87
|
+
config.stretches = Rails.env.test? ? 1 : 10
|
88
|
+
|
89
|
+
# Setup a pepper to generate the encrypted password.
|
90
|
+
# config.pepper = <%= SecureRandom.hex(64).inspect %>
|
91
|
+
|
92
|
+
# ==> Configuration for :confirmable
|
93
|
+
# A period that the user is allowed to access the website even without
|
94
|
+
# confirming his account. For instance, if set to 2.days, the user will be
|
95
|
+
# able to access the website for two days without confirming his account,
|
96
|
+
# access will be blocked just in the third day. Default is 0.days, meaning
|
97
|
+
# the user cannot access the website without confirming his account.
|
98
|
+
# config.allow_unconfirmed_access_for = 2.days
|
99
|
+
|
100
|
+
# If true, requires any email changes to be confirmed (exctly the same way as
|
101
|
+
# initial account confirmation) to be applied. Requires additional unconfirmed_email
|
102
|
+
# db field (see migrations). Until confirmed new email is stored in
|
103
|
+
# unconfirmed email column, and copied to email column on successful confirmation.
|
104
|
+
# config.reconfirmable = true
|
105
|
+
|
106
|
+
# Defines which key will be used when confirming an account
|
107
|
+
# config.confirmation_keys = [ :email ]
|
108
|
+
|
109
|
+
# ==> Configuration for :rememberable
|
110
|
+
# The time the user will be remembered without asking for credentials again.
|
111
|
+
# config.remember_for = 2.weeks
|
112
|
+
|
113
|
+
# If true, extends the user's remember period when remembered via cookie.
|
114
|
+
# config.extend_remember_period = false
|
115
|
+
|
116
|
+
# If true, uses the password salt as remember token. This should be turned
|
117
|
+
# to false if you are not using database authenticatable.
|
118
|
+
config.use_salt_as_remember_token = true
|
119
|
+
|
120
|
+
# Options to be passed to the created cookie. For instance, you can set
|
121
|
+
# :secure => true in order to force SSL only cookies.
|
122
|
+
# config.cookie_options = {}
|
123
|
+
|
124
|
+
# ==> Configuration for :validatable
|
125
|
+
# Range for password length. Default is 6..128.
|
126
|
+
config.password_length = 4..128
|
127
|
+
|
128
|
+
# Email regex used to validate email formats. It simply asserts that
|
129
|
+
# an one (and only one) @ exists in the given string. This is mainly
|
130
|
+
# to give user feedback and not to assert the e-mail validity.
|
131
|
+
# config.email_regexp = /\A[^@]+@[^@]+\z/
|
132
|
+
|
133
|
+
# ==> Configuration for :timeoutable
|
134
|
+
# The time you want to timeout the user session without activity. After this
|
135
|
+
# time the user will be asked for credentials again. Default is 30 minutes.
|
136
|
+
# config.timeout_in = 30.minutes
|
137
|
+
|
138
|
+
# ==> Configuration for :lockable
|
139
|
+
# Defines which strategy will be used to lock an account.
|
140
|
+
# :failed_attempts = Locks an account after a number of failed attempts to sign in.
|
141
|
+
# :none = No lock strategy. You should handle locking by yourself.
|
142
|
+
# config.lock_strategy = :failed_attempts
|
143
|
+
|
144
|
+
# Defines which key will be used when locking and unlocking an account
|
145
|
+
# config.unlock_keys = [ :email ]
|
146
|
+
|
147
|
+
# Defines which strategy will be used to unlock an account.
|
148
|
+
# :email = Sends an unlock link to the user email
|
149
|
+
# :time = Re-enables login after a certain amount of time (see :unlock_in below)
|
150
|
+
# :both = Enables both strategies
|
151
|
+
# :none = No unlock strategy. You should handle unlocking by yourself.
|
152
|
+
# config.unlock_strategy = :both
|
153
|
+
|
154
|
+
# Number of authentication tries before locking an account if lock_strategy
|
155
|
+
# is failed attempts.
|
156
|
+
# config.maximum_attempts = 20
|
157
|
+
|
158
|
+
# Time interval to unlock the account if :time is enabled as unlock_strategy.
|
159
|
+
# config.unlock_in = 1.hour
|
160
|
+
|
161
|
+
# ==> Configuration for :recoverable
|
162
|
+
#
|
163
|
+
# Defines which key will be used when recovering the password for an account
|
164
|
+
# config.reset_password_keys = [ :email ]
|
165
|
+
|
166
|
+
# Time interval you can reset your password with a reset password key.
|
167
|
+
# Don't put a too small interval or your users won't have the time to
|
168
|
+
# change their passwords.
|
169
|
+
config.reset_password_within = 6.hours
|
170
|
+
|
171
|
+
# ==> Configuration for :encryptable
|
172
|
+
# Allow you to use another encryption algorithm besides bcrypt (default). You can use
|
173
|
+
# :sha1, :sha512 or encryptors from others authentication tools as :clearance_sha1,
|
174
|
+
# :authlogic_sha512 (then you should set stretches above to 20 for default behavior)
|
175
|
+
# and :restful_authentication_sha1 (then you should set stretches to 10, and copy
|
176
|
+
# REST_AUTH_SITE_KEY to pepper)
|
177
|
+
# config.encryptor = :sha512
|
178
|
+
|
179
|
+
# ==> Configuration for :token_authenticatable
|
180
|
+
# Defines name of the authentication token params key
|
181
|
+
# config.token_authentication_key = :auth_token
|
182
|
+
|
183
|
+
# ==> Scopes configuration
|
184
|
+
# Turn scoped views on. Before rendering "sessions/new", it will first check for
|
185
|
+
# "users/sessions/new". It's turned off by default because it's slower if you
|
186
|
+
# are using only default views.
|
187
|
+
# config.scoped_views = false
|
188
|
+
|
189
|
+
# Configure the default scope given to Warden. By default it's the first
|
190
|
+
# devise role declared in your routes (usually :user).
|
191
|
+
# config.default_scope = :user
|
192
|
+
|
193
|
+
# Configure sign_out behavior.
|
194
|
+
# Sign_out action can be scoped (i.e. /users/sign_out affects only :user scope).
|
195
|
+
# The default is true, which means any logout action will sign out all active scopes.
|
196
|
+
# config.sign_out_all_scopes = true
|
197
|
+
|
198
|
+
# ==> Navigation configuration
|
199
|
+
# Lists the formats that should be treated as navigational. Formats like
|
200
|
+
# :html, should redirect to the sign in page when the user does not have
|
201
|
+
# access, but formats like :xml or :json, should return 401.
|
202
|
+
#
|
203
|
+
# If you have any extra navigational formats, like :iphone or :mobile, you
|
204
|
+
# should add them to the navigational formats lists.
|
205
|
+
#
|
206
|
+
# The "*/*" below is required to match Internet Explorer requests.
|
207
|
+
# config.navigational_formats = ["*/*", :html]
|
208
|
+
|
209
|
+
# The default HTTP method used to sign out a resource. Default is :delete.
|
210
|
+
config.sign_out_via = :delete
|
211
|
+
|
212
|
+
# ==> OmniAuth
|
213
|
+
# Add a new OmniAuth provider. Check the wiki for more information on setting
|
214
|
+
# up on your models and hooks.
|
215
|
+
# config.omniauth :github, 'APP_ID', 'APP_SECRET', :scope => 'user,public_repo'
|
216
|
+
|
217
|
+
# ==> Warden configuration
|
218
|
+
# If you want to use other strategies, that are not supported by Devise, or
|
219
|
+
# change the failure app, you can configure them inside the config.warden block.
|
220
|
+
#
|
221
|
+
# config.warden do |manager|
|
222
|
+
# manager.intercept_401 = false
|
223
|
+
# manager.default_strategies(:scope => :user).unshift :some_external_strategy
|
224
|
+
# end
|
225
|
+
|
226
|
+
# Please do not change the router_name away from :refinery
|
227
|
+
# otherwise Refinery may not function properly. Thanks!
|
228
|
+
config.router_name = :refinery
|
229
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# Add new inflection rules using the following format
|
4
|
+
# (all these examples are active by default):
|
5
|
+
# ActiveSupport::Inflector.inflections do |inflect|
|
6
|
+
# inflect.plural /^(ox)$/i, '\1en'
|
7
|
+
# inflect.singular /^(ox)en/i, '\1'
|
8
|
+
# inflect.irregular 'person', 'people'
|
9
|
+
# inflect.uncountable %w( fish sheep )
|
10
|
+
# end
|
11
|
+
#
|
12
|
+
# These inflection rules are supported but not enabled by default:
|
13
|
+
# ActiveSupport::Inflector.inflections do |inflect|
|
14
|
+
# inflect.acronym 'RESTful'
|
15
|
+
# end
|
@@ -0,0 +1,48 @@
|
|
1
|
+
Refinery::Core.configure do |config|
|
2
|
+
# When true will rescue all not found errors and display a friendly error page
|
3
|
+
config.rescue_not_found = Rails.env.production?
|
4
|
+
|
5
|
+
# When true will use Amazon's Simple Storage Service instead of
|
6
|
+
# the default file system for storing resources and images
|
7
|
+
config.s3_backend = !(ENV['S3_KEY'].nil? || ENV['S3_SECRET'].nil?)
|
8
|
+
|
9
|
+
# Whenever Refinery caches anything and can set a cache key, it will add
|
10
|
+
# a prefix to the cache key containing the string you set here.
|
11
|
+
# config.base_cache_key = :refinery
|
12
|
+
|
13
|
+
# Site name
|
14
|
+
# config.site_name = "Company Name"
|
15
|
+
|
16
|
+
# This activates Google Analytics tracking within your website. If this
|
17
|
+
# config is left blank or set to UA-xxxxxx-x then no remote calls to
|
18
|
+
# Google Analytics are made.
|
19
|
+
# config.google_analytics_page_code = "UA-xxxxxx-x"
|
20
|
+
|
21
|
+
# Enable/disable authenticity token on frontend
|
22
|
+
# config.authenticity_token_on_frontend = true
|
23
|
+
|
24
|
+
# Hide/show child pages in menu
|
25
|
+
# config.menu_hide_children = false
|
26
|
+
|
27
|
+
# CSS class selectors for menu helper
|
28
|
+
# config.menu_css = {:selected=>"selected", :first=>"first", :last=>"last"}
|
29
|
+
|
30
|
+
# Should set this if concerned about DOS attacks. See
|
31
|
+
# http://markevans.github.com/dragonfly/file.Configuration.html#Configuration
|
32
|
+
# config.dragonfly_secret = "f86bc1e5c80941dd9b34b03c40416a7b67051959467fbb85"
|
33
|
+
|
34
|
+
# Show/hide IE6 upgrade message in the backend
|
35
|
+
# config.ie6_upgrade_message_enabled = true
|
36
|
+
|
37
|
+
# Show/hide browser update message in the backend
|
38
|
+
# config.show_internet_explorer_upgrade_message = false
|
39
|
+
|
40
|
+
# Add extra tags to the wymeditor whitelist e.g. = {'tag' => {'attributes' => {'1' => 'href'}}} or just {'tag' => {}}
|
41
|
+
# config.wymeditor_whitelist_tags = {}
|
42
|
+
|
43
|
+
# Register extra javascript for backend
|
44
|
+
# config.register_javascript "prototype-rails"
|
45
|
+
|
46
|
+
# Register extra stylesheet for backend (optional options)
|
47
|
+
# config.register_stylesheet "custom", :media => 'screen'
|
48
|
+
end
|
@@ -0,0 +1,41 @@
|
|
1
|
+
Refinery::Images.configure do |config|
|
2
|
+
# Configures the maximum allowed upload size (in bytes) for an image
|
3
|
+
# config.max_image_size = 5242880
|
4
|
+
|
5
|
+
# Configure how many images per page should be displayed when a dialog is presented that contains images
|
6
|
+
# config.pages_per_dialog = 18
|
7
|
+
|
8
|
+
# Configure how many images per page should be displayed when a dialog is presented that
|
9
|
+
# contains images and image resize options
|
10
|
+
# config.pages_per_dialog_that_have_size_options = 12
|
11
|
+
|
12
|
+
# Configure how many images per page should be displayed in the list of images in the admin area
|
13
|
+
# config.pages_per_admin_index = 20
|
14
|
+
|
15
|
+
# Configure image sizes
|
16
|
+
# config.user_image_sizes = {:small=>"110x110>", :medium=>"225x255>", :large=>"450x450>"}
|
17
|
+
|
18
|
+
# Configure image view options
|
19
|
+
# config.image_views = [:grid, :list]
|
20
|
+
|
21
|
+
# Configure default image view
|
22
|
+
# config.preferred_image_view = :grid
|
23
|
+
|
24
|
+
# Configure S3 (you can also use ENV for this)
|
25
|
+
# The s3_backend setting by default defers to the core setting for this but can be set just for images.
|
26
|
+
# config.s3_backend = Refinery::Core.s3_backend
|
27
|
+
# config.s3_bucket_name = ENV['S3_BUCKET']
|
28
|
+
# config.s3_access_key_id = ENV['S3_KEY']
|
29
|
+
# config.s3_secret_access_key = ENV['S3_SECRET']
|
30
|
+
# config.s3_region = ENV['S3_REGION]
|
31
|
+
|
32
|
+
# Configure Dragonfly
|
33
|
+
# This is where in the middleware stack to insert the Dragonfly middleware
|
34
|
+
# config.dragonfly_insert_before = "ActionDispatch::Callbacks"
|
35
|
+
# config.dragonfly_secret = "f86bc1e5c80941dd9b34b03c40416a7b67051959467fbb85"
|
36
|
+
# If you decide to trust file extensions replace :ext below with :format
|
37
|
+
# config.dragonfly_url_format = "/system/images/:job/:basename.:ext"
|
38
|
+
# config.datastore_root_path = nil
|
39
|
+
# config.trust_file_extensions = false
|
40
|
+
|
41
|
+
end
|
@@ -0,0 +1,44 @@
|
|
1
|
+
Refinery::Pages.configure do |config|
|
2
|
+
# Configure specific page templates
|
3
|
+
# config.types.register :home do |home|
|
4
|
+
# home.parts = %w[intro body]
|
5
|
+
# end
|
6
|
+
|
7
|
+
# Configure global page default parts
|
8
|
+
# config.default_parts = ["Body", "Side Body"]
|
9
|
+
|
10
|
+
# Configure how many pages per page should be displayed when a dialog is presented that contains a links to pages
|
11
|
+
# config.pages_per_dialog = 14
|
12
|
+
|
13
|
+
# Configure how many pages per page should be displayed in the list of pages in the admin area
|
14
|
+
# config.pages_per_admin_index = 20
|
15
|
+
|
16
|
+
# Configure whether to strip diacritics from Western characters
|
17
|
+
# config.approximate_ascii = false
|
18
|
+
|
19
|
+
# Configure whether to strip non-ASCII characters from the friendly_id string
|
20
|
+
# config.strip_non_ascii = false
|
21
|
+
|
22
|
+
# Set this to true if you want to override slug which automatically gets generated
|
23
|
+
# when you create a page
|
24
|
+
# config.use_custom_slugs = false
|
25
|
+
|
26
|
+
# Set this to true if you want backend pages to be cached
|
27
|
+
# config.cache_pages_backend = false
|
28
|
+
|
29
|
+
# Set this to true to activate full-page-cache
|
30
|
+
# config.cache_pages_full = false
|
31
|
+
|
32
|
+
# Set this to true to fully expand the page hierarchy in the admin
|
33
|
+
# config.auto_expand_admin_tree = true
|
34
|
+
|
35
|
+
# config.layout_template_whitelist = ["application"]
|
36
|
+
|
37
|
+
# config.view_template_whitelist = ["home", "show"]
|
38
|
+
|
39
|
+
# config.use_layout_templates = false
|
40
|
+
|
41
|
+
# config.use_view_templates = false
|
42
|
+
|
43
|
+
# config.absolute_page_links = false
|
44
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
Refinery::Resources.configure do |config|
|
2
|
+
# Configures the maximum allowed upload size (in bytes) for a file upload
|
3
|
+
# config.max_file_size = 52428800
|
4
|
+
|
5
|
+
# Configure how many resources per page should be displayed when a dialog is presented that contains resources
|
6
|
+
# config.pages_per_dialog = 12
|
7
|
+
|
8
|
+
# Configure how many resources per page should be displayed in the list of resources in the admin area
|
9
|
+
# config.pages_per_admin_index = 20
|
10
|
+
|
11
|
+
# Configure S3 (you can also use ENV for this)
|
12
|
+
# The s3_backend setting by default defers to the core setting for this but can be set just for resources.
|
13
|
+
# config.s3_backend = Refinery::Core.s3_backend
|
14
|
+
# config.s3_bucket_name = ENV['S3_BUCKET']
|
15
|
+
# config.s3_access_key_id = ENV['S3_KEY']
|
16
|
+
# config.s3_secret_access_key = ENV['S3_SECRET']
|
17
|
+
# config.s3_region = ENV['S3_REGION]
|
18
|
+
|
19
|
+
# Configure Dragonfly
|
20
|
+
# This is where in the middleware stack to insert the Dragonfly middleware
|
21
|
+
# config.dragonfly_insert_before = "ActionDispatch::Callbacks"
|
22
|
+
# config.dragonfly_secret = "f86bc1e5c80941dd9b34b03c40416a7b67051959467fbb85"
|
23
|
+
# config.dragonfly_url_format = "/system/resources/:job/:basename.:format"
|
24
|
+
# config.datastore_root_path = nil
|
25
|
+
|
26
|
+
end
|
@@ -0,0 +1,7 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# Your secret key for verifying the integrity of signed cookies.
|
4
|
+
# If you change this key, all old signed cookies will become invalid!
|
5
|
+
# Make sure the secret is at least 30 characters and all random,
|
6
|
+
# no regular words or you'll be exposed to dictionary attacks.
|
7
|
+
Dummy::Application.config.secret_token = 'bbffdbd0eedb482db8aa89da83832728336e38033add1d6c27a2563671e7b71f026eaf8932fefe43173d4f2b330a236f6c31c2f187236a250e5bb267c778c1b7'
|
@@ -0,0 +1,8 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
Dummy::Application.config.session_store :cookie_store, :key => '_dummy_session'
|
4
|
+
|
5
|
+
# Use the database for sessions instead of the cookie-based default,
|
6
|
+
# which shouldn't be used to store highly confidential information
|
7
|
+
# (create the session table with "rails generate session_migration")
|
8
|
+
# Dummy::Application.config.session_store :active_record_store
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
#
|
3
|
+
# This file contains settings for ActionController::ParamsWrapper which
|
4
|
+
# is enabled by default.
|
5
|
+
|
6
|
+
# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
|
7
|
+
ActiveSupport.on_load(:action_controller) do
|
8
|
+
wrap_parameters :format => [:json]
|
9
|
+
end
|
10
|
+
|
11
|
+
# Disable root element in JSON by default.
|
12
|
+
ActiveSupport.on_load(:active_record) do
|
13
|
+
self.include_root_in_json = false
|
14
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# This migration comes from refinery_copywriting (originally 1)
|
2
|
+
class CreateCopywritings < ActiveRecord::Migration
|
3
|
+
|
4
|
+
def self.up
|
5
|
+
create_table :copywriting_phrases do |t|
|
6
|
+
t.string :name
|
7
|
+
t.text :default
|
8
|
+
t.text :value
|
9
|
+
t.string :scope
|
10
|
+
t.integer :page_id
|
11
|
+
|
12
|
+
t.timestamps
|
13
|
+
end
|
14
|
+
|
15
|
+
add_index :copywriting_phrases, [:name, :scope]
|
16
|
+
end
|
17
|
+
|
18
|
+
def self.down
|
19
|
+
Refinery::UserPlugin.destroy_all({:name => "refinerycms_copywriting"})
|
20
|
+
|
21
|
+
drop_table :copywriting_phrases
|
22
|
+
end
|
23
|
+
|
24
|
+
end
|
@@ -0,0 +1,42 @@
|
|
1
|
+
# This migration comes from refinery_copywriting (originally 2)
|
2
|
+
class CreateCopywritingTranslationTable < ActiveRecord::Migration
|
3
|
+
|
4
|
+
def self.up
|
5
|
+
::Refinery::Copywriting::Phrase.table_name = Refinery::Copywriting::Phrase.table_name.sub('refinery_', '')
|
6
|
+
::Refinery::Copywriting::Phrase.module_eval do
|
7
|
+
has_many :translations, :foreign_key => 'copywriting_phrase_id'
|
8
|
+
end
|
9
|
+
::Refinery::Copywriting::Phrase.translation_class.table_name = Refinery::Copywriting::Phrase.translation_class.table_name.sub('refinery_', '')
|
10
|
+
|
11
|
+
::Refinery::Copywriting::Phrase.create_translation_table!({
|
12
|
+
:value => :text
|
13
|
+
}, {
|
14
|
+
:migrate_data => true
|
15
|
+
})
|
16
|
+
|
17
|
+
rename_column Refinery::Copywriting::Phrase.translation_class.table_name, :copywriting_phrase_id, :refinery_copywriting_phrase_id
|
18
|
+
|
19
|
+
::Refinery::Copywriting::Phrase.table_name = "refinery_#{Refinery::Copywriting::Phrase.table_name}"
|
20
|
+
::Refinery::Copywriting::Phrase.module_eval do
|
21
|
+
has_many :translations, :foreign_key => 'refinery_copywriting_phrase_id'
|
22
|
+
end
|
23
|
+
::Refinery::Copywriting::Phrase.translation_class.table_name = "refinery_#{Refinery::Copywriting::Phrase.translation_class.table_name}"
|
24
|
+
end
|
25
|
+
|
26
|
+
def self.down
|
27
|
+
::Refinery::Copywriting::Phrase.table_name = Refinery::Copywriting::Phrase.table_name.sub('refinery_', '')
|
28
|
+
::Refinery::Copywriting::Phrase.module_eval do
|
29
|
+
has_many :translations, :foreign_key => 'refinery_copywriting_phrase_id'
|
30
|
+
end
|
31
|
+
::Refinery::Copywriting::Phrase.translation_class.table_name = Refinery::Copywriting::Phrase.translation_class.table_name.sub('refinery_', '')
|
32
|
+
|
33
|
+
::Refinery::Copywriting::Phrase.drop_translation_table! :migrate_data => true
|
34
|
+
|
35
|
+
::Refinery::Copywriting::Phrase.table_name = "refinery_#{Refinery::Copywriting::Phrase.table_name}"
|
36
|
+
::Refinery::Copywriting::Phrase.module_eval do
|
37
|
+
has_many :translations, :foreign_key => 'copywriting_phrase_id'
|
38
|
+
end
|
39
|
+
::Refinery::Copywriting::Phrase.translation_class.table_name = "refinery_#{Refinery::Copywriting::Phrase.translation_class.table_name}"
|
40
|
+
end
|
41
|
+
|
42
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
# This migration comes from refinery_copywriting (originally 3)
|
2
|
+
class AddPhraseType < ActiveRecord::Migration
|
3
|
+
|
4
|
+
def self.up
|
5
|
+
add_column :copywriting_phrases, :phrase_type, :string
|
6
|
+
end
|
7
|
+
|
8
|
+
def self.down
|
9
|
+
remove_column :copywriting_phrases, :phrase_type
|
10
|
+
end
|
11
|
+
|
12
|
+
end
|