trusty-cms 3.8.2 → 3.8.3
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.
- checksums.yaml +4 -4
- data/.gitignore +0 -1
- data/Gemfile.lock +1 -1
- data/app/helpers/scoped_helper.rb +1 -1
- data/app/models/trusty_cms/config.rb +2 -5
- data/config/application.rb +4 -4
- data/config/initializers/devise.rb +1 -1
- data/db/migrate/{001_create_radiant_tables.rb → 001_create_trusty_tables.rb} +1 -1
- data/db/migrate/20111016150725_extend_page_part_content_limit.rb +0 -2
- data/lib/configuration_extensions/configuration_extensions.rb +9 -9
- data/lib/tasks/extensions.rake +4 -4
- data/lib/tasks/framework.rake +28 -28
- data/lib/tasks/radiant_config.rake +4 -4
- data/lib/trusty_cms.rb +1 -1
- data/lib/trusty_cms/config/definition.rb +1 -1
- data/lib/trusty_cms/extension_loader.rb +1 -1
- data/lib/trusty_cms/extension_path.rb +1 -1
- data/lib/trusty_cms/initializer.rb +14 -14
- data/lib/trusty_cms/taggable.rb +1 -1
- data/lib/trusty_cms/task_support.rb +2 -2
- data/spec/dummy/config/application.rb +8 -8
- data/vendor/extensions/clipped-extension/lib/tasks/clipped_extension_tasks.rake +2 -2
- data/vendor/extensions/multi-site-extension/lib/tasks/scoped_admin_extension_tasks.rake +2 -2
- metadata +3 -103
- data/CONTRIBUTORS.md +0 -279
- data/Vagrantfile +0 -122
- data/app/mailers/password_mailer.rb +0 -10
- data/bin/ci/before_script +0 -10
- data/bin/trusty_test +0 -3
- data/lib/generators/extension/USAGE +0 -30
- data/lib/generators/extension/extension_generator.rb +0 -97
- data/lib/generators/extension/templates/README.md +0 -6
- data/lib/generators/extension/templates/RSpecRakefile +0 -109
- data/lib/generators/extension/templates/Rakefile +0 -25
- data/lib/generators/extension/templates/cucumber.yml +0 -1
- data/lib/generators/extension/templates/cucumber_env.rb +0 -11
- data/lib/generators/extension/templates/cucumber_paths.rb +0 -22
- data/lib/generators/extension/templates/en.yml +0 -3
- data/lib/generators/extension/templates/extension.rb +0 -21
- data/lib/generators/extension/templates/functional_test.rb +0 -15
- data/lib/generators/extension/templates/gemspec.rb +0 -29
- data/lib/generators/extension/templates/lib.rb +0 -8
- data/lib/generators/extension/templates/migration.rb +0 -9
- data/lib/generators/extension/templates/radiant_config.rb +0 -3
- data/lib/generators/extension/templates/routes.rb +0 -5
- data/lib/generators/extension/templates/spec.opts +0 -6
- data/lib/generators/extension/templates/spec_helper.rb +0 -42
- data/lib/generators/extension/templates/tasks.rake +0 -47
- data/lib/generators/extension/templates/test_helper.rb +0 -26
- data/lib/generators/extension_controller/USAGE +0 -36
- data/lib/generators/extension_controller/extension_controller_generator.rb +0 -84
- data/lib/generators/extension_controller/templates/controller.rb +0 -10
- data/lib/generators/extension_controller/templates/controller_spec.rb +0 -23
- data/lib/generators/extension_controller/templates/functional_test.rb +0 -11
- data/lib/generators/extension_controller/templates/helper.rb +0 -2
- data/lib/generators/extension_controller/templates/helper_spec.rb +0 -11
- data/lib/generators/extension_controller/templates/helper_test.rb +0 -4
- data/lib/generators/extension_controller/templates/view.html.erb +0 -2
- data/lib/generators/extension_controller/templates/view_spec.rb +0 -12
- data/lib/generators/extension_mailer/USAGE +0 -17
- data/lib/generators/extension_mailer/extension_mailer_generator.rb +0 -68
- data/lib/generators/extension_mailer/templates/fixture.erb +0 -3
- data/lib/generators/extension_mailer/templates/mailer.rb +0 -15
- data/lib/generators/extension_mailer/templates/unit_test.rb +0 -21
- data/lib/generators/extension_mailer/templates/view.erb +0 -3
- data/lib/generators/extension_migration/USAGE +0 -34
- data/lib/generators/extension_migration/extension_migration_generator.rb +0 -25
- data/lib/generators/extension_migration/templates/migration.rb +0 -11
- data/lib/generators/extension_model/USAGE +0 -35
- data/lib/generators/extension_model/extension_model_generator.rb +0 -68
- data/lib/generators/extension_model/templates/fixtures.yml +0 -19
- data/lib/generators/extension_model/templates/migration.rb +0 -16
- data/lib/generators/extension_model/templates/model.rb +0 -2
- data/lib/generators/extension_model/templates/model_spec.rb +0 -11
- data/lib/generators/extension_model/templates/unit_test.rb +0 -8
- data/lib/generators/generator_base_extension.rb +0 -18
- data/lib/generators/instance/instance_generator.rb +0 -148
- data/lib/generators/instance/templates/databases/db2.yml +0 -40
- data/lib/generators/instance/templates/databases/mysql.yml +0 -47
- data/lib/generators/instance/templates/databases/postgresql.yml +0 -44
- data/lib/generators/instance/templates/databases/sqlite3.yml +0 -16
- data/lib/generators/instance/templates/databases/sqlserver.yml +0 -21
- data/lib/generators/instance/templates/instance_boot.rb +0 -122
- data/lib/generators/instance/templates/instance_config.ru +0 -2
- data/lib/generators/instance/templates/instance_environment.rb +0 -93
- data/lib/generators/instance/templates/instance_gemfile +0 -78
- data/lib/generators/instance/templates/instance_generate +0 -6
- data/lib/generators/instance/templates/instance_radiant_config.rb +0 -16
- data/lib/generators/instance/templates/instance_rakefile +0 -3
- data/lib/generators/instance/templates/instance_routes.rb +0 -1
- data/lib/generators/language_extension/USAGE +0 -27
- data/lib/generators/language_extension/language_extension_generator.rb +0 -71
- data/lib/generators/language_extension/templates/README +0 -3
- data/lib/generators/language_extension/templates/RSpecRakefile +0 -123
- data/lib/generators/language_extension/templates/Rakefile +0 -25
- data/lib/generators/language_extension/templates/available_tags.yml +0 -553
- data/lib/generators/language_extension/templates/cucumber.yml +0 -1
- data/lib/generators/language_extension/templates/cucumber_env.rb +0 -16
- data/lib/generators/language_extension/templates/cucumber_paths.rb +0 -14
- data/lib/generators/language_extension/templates/extension.rb +0 -12
- data/lib/generators/language_extension/templates/functional_test.rb +0 -15
- data/lib/generators/language_extension/templates/gemspec.rb +0 -24
- data/lib/generators/language_extension/templates/lang.yml +0 -181
- data/lib/generators/language_extension/templates/lib.rb +0 -8
- data/lib/generators/language_extension/templates/spec.opts +0 -6
- data/lib/generators/language_extension/templates/spec_helper.rb +0 -36
- data/lib/generators/language_extension/templates/tasks.rake +0 -28
- data/lib/generators/language_extension/templates/test_helper.rb +0 -26
- data/lib/generators/trusty_cms/USAGE +0 -8
- data/lib/generators/trusty_cms/templates/Rakefile.erb +0 -7
- data/lib/generators/trusty_cms/templates/application.rb.erb +0 -149
- data/lib/generators/trusty_cms/templates/boot.rb.erb +0 -9
- data/lib/generators/trusty_cms/templates/config.ru.erb +0 -4
- data/lib/generators/trusty_cms/templates/database.yml.erb +0 -28
- data/lib/generators/trusty_cms/templates/environment.rb.erb +0 -5
- data/lib/generators/trusty_cms/templates/environments/development.rb.erb +0 -24
- data/lib/generators/trusty_cms/templates/environments/production.rb.erb +0 -26
- data/lib/generators/trusty_cms/templates/environments/test.rb.erb +0 -35
- data/lib/generators/trusty_cms/templates/initializers/secret_token.rb.erb +0 -13
- data/lib/generators/trusty_cms/templates/initializers/session_store.rb.erb +0 -8
- data/lib/generators/trusty_cms/templates/initializers/trusty_cms_config.rb.erb +0 -16
- data/lib/generators/trusty_cms/templates/preinitializer.rb.erb +0 -18
- data/lib/generators/trusty_cms/templates/routes.rb.erb +0 -0
- data/lib/generators/trusty_cms/trusty_cms_generator.rb +0 -32
|
@@ -1 +0,0 @@
|
|
|
1
|
-
default: --format progress features --tags ~@proposed,~@in_progress
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
# Sets up the Rails environment for Cucumber
|
|
2
|
-
ENV["Rails.env"] = "test"
|
|
3
|
-
# Extension root
|
|
4
|
-
extension_env = File.expand_path(File.dirname(__FILE__) + '/../../../../../config/environment')
|
|
5
|
-
require extension_env+'.rb'
|
|
6
|
-
|
|
7
|
-
Dir.glob(File.join(TRUSTY_CMS_ROOT, "features", "**", "*.rb")).each {|step| require step}
|
|
8
|
-
|
|
9
|
-
Cucumber::Rails::World.class_eval do
|
|
10
|
-
include Dataset
|
|
11
|
-
datasets_directory "#{TRUSTY_CMS_ROOT}/spec/datasets"
|
|
12
|
-
Dataset::Resolver.default = Dataset::DirectoryResolver.new("#{TRUSTY_CMS_ROOT}/spec/datasets", File.dirname(__FILE__) + '/../../spec/datasets', File.dirname(__FILE__) + '/../datasets')
|
|
13
|
-
self.datasets_database_dump_path = "#{Rails.root}/tmp/dataset"
|
|
14
|
-
|
|
15
|
-
# dataset :<%= file_name %>
|
|
16
|
-
end
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
# Uncomment this if you reference any of your controllers in activate
|
|
2
|
-
# require_dependency "application_controller"
|
|
3
|
-
require "radiant-<%= file_name %>_language_pack-extension"
|
|
4
|
-
|
|
5
|
-
class <%= class_name %> < TrustyCms::Extension
|
|
6
|
-
version TrustyCms<%= class_name %>::VERSION
|
|
7
|
-
description TrustyCms<%= class_name %>::DESCRIPTION
|
|
8
|
-
url TrustyCms<%= class_name %>::URL
|
|
9
|
-
|
|
10
|
-
def activate
|
|
11
|
-
end
|
|
12
|
-
end
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
require File.dirname(__FILE__) + '/../test_helper'
|
|
2
|
-
|
|
3
|
-
class <%= class_name %>Test < Test::Unit::TestCase
|
|
4
|
-
|
|
5
|
-
# Replace this with your real tests.
|
|
6
|
-
def test_this_extension
|
|
7
|
-
flunk
|
|
8
|
-
end
|
|
9
|
-
|
|
10
|
-
def test_initialization
|
|
11
|
-
assert_equal File.join(File.expand_path(Rails.root), 'vendor', 'extensions', '<%= file_name %>'), <%= class_name %>.root
|
|
12
|
-
assert_equal '<%= extension_name %>', <%= class_name %>.extension_name
|
|
13
|
-
end
|
|
14
|
-
|
|
15
|
-
end
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
# -*- encoding: utf-8 -*-
|
|
2
|
-
$:.push File.expand_path("../lib", __FILE__)
|
|
3
|
-
require "radiant-<%= file_name %>_language_pack-extension"
|
|
4
|
-
|
|
5
|
-
Gem::Specification.new do |s|
|
|
6
|
-
s.name = "radiant-<%= file_name %>_language_pack-extension"
|
|
7
|
-
s.version = TrustyCms<%= class_name %>::VERSION
|
|
8
|
-
s.platform = Gem::Platform::RUBY
|
|
9
|
-
s.authors = TrustyCms<%= class_name %>::AUTHORS
|
|
10
|
-
s.email = TrustyCms<%= class_name %>::EMAIL
|
|
11
|
-
s.homepage = TrustyCms<%= class_name %>::URL
|
|
12
|
-
s.summary = TrustyCms<%= class_name %>::SUMMARY
|
|
13
|
-
s.description = TrustyCms<%= class_name %>::DESCRIPTION
|
|
14
|
-
|
|
15
|
-
ignores = if File.exist?('.gitignore')
|
|
16
|
-
File.read('.gitignore').split("\n").inject([]) {|a,p| a + Dir[p] }
|
|
17
|
-
else
|
|
18
|
-
[]
|
|
19
|
-
end
|
|
20
|
-
s.files = Dir['**/*'] - ignores
|
|
21
|
-
s.test_files = Dir['test/**/*','spec/**/*','features/**/*'] - ignores
|
|
22
|
-
# s.executables = Dir['bin/*'] - ignores
|
|
23
|
-
s.require_paths = ["lib"]
|
|
24
|
-
end
|
|
@@ -1,181 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
<%= localization_name %>:
|
|
3
|
-
account: 'Account'
|
|
4
|
-
activerecord:
|
|
5
|
-
errors:
|
|
6
|
-
messages:
|
|
7
|
-
blank: 'this must not be blank' # required
|
|
8
|
-
invalid: 'this does not match the expected format' #invalid_format
|
|
9
|
-
not_a_number: 'this must be a number' # must be number
|
|
10
|
-
taken: 'this name is already in use' # name_in_use
|
|
11
|
-
too_long: 'this must not be longer than %{count} characters' # character_limit
|
|
12
|
-
too_short: 'this must be at least %{count} characters long' # character_minimum
|
|
13
|
-
models:
|
|
14
|
-
page:
|
|
15
|
-
attributes:
|
|
16
|
-
slug:
|
|
17
|
-
taken: 'slug already in use for child of parent' # slug_in_use
|
|
18
|
-
user:
|
|
19
|
-
attributes:
|
|
20
|
-
email:
|
|
21
|
-
invalid: 'invalid e-mail address' # invalid_email
|
|
22
|
-
login:
|
|
23
|
-
taken: 'login already in use' # login already in use
|
|
24
|
-
password:
|
|
25
|
-
confirmation: 'must match confirmation' # password_confirmation
|
|
26
|
-
add_child: 'Add Child'
|
|
27
|
-
add_part: 'Add Part'
|
|
28
|
-
add_tab: 'Add Tab'
|
|
29
|
-
admin: 'Administrator'
|
|
30
|
-
available_tags: 'Available Tags'
|
|
31
|
-
available_tags_for: 'Available Tags for'
|
|
32
|
-
body: 'Body'
|
|
33
|
-
breadcrumb: 'Breadcrumb'
|
|
34
|
-
buttons:
|
|
35
|
-
create: 'Create %{name}'
|
|
36
|
-
save_and_continue: 'Save and Continue Editing'
|
|
37
|
-
save_changes: 'Save Changes'
|
|
38
|
-
cancel: 'Cancel'
|
|
39
|
-
change: 'Change'
|
|
40
|
-
close: 'Close'
|
|
41
|
-
content: 'Content'
|
|
42
|
-
content_type: 'Content‑Type'
|
|
43
|
-
creating_status: 'Creating %{model}…'
|
|
44
|
-
date:
|
|
45
|
-
abbr_day_names: [Sun, Mon, Tue, Wed, Thu, Fri, Sat]
|
|
46
|
-
abbr_month_names: [~, Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec]
|
|
47
|
-
day_names: [Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday]
|
|
48
|
-
formats:
|
|
49
|
-
default: "%Y-%m-%d"
|
|
50
|
-
long: "%B %e, %Y"
|
|
51
|
-
only_day: "%e"
|
|
52
|
-
short: "%e %b"
|
|
53
|
-
month_names: [~, January, February, March, April, May, June, July, August, September, October, November, December]
|
|
54
|
-
order: [ :year, :month, :day ]
|
|
55
|
-
delete_layout: 'Delete Layout'
|
|
56
|
-
delete_pages: 'Delete %{pages}'
|
|
57
|
-
delete_snippet: 'Delete Snippet'
|
|
58
|
-
delete_user: 'Delete User'
|
|
59
|
-
description: 'Description'
|
|
60
|
-
design: 'Design'
|
|
61
|
-
designer: 'Designer'
|
|
62
|
-
draft: 'Draft'
|
|
63
|
-
edit_layout: 'Edit Layout'
|
|
64
|
-
edit_page: 'Edit Page'
|
|
65
|
-
edit_snippet: 'Edit Snippet'
|
|
66
|
-
edit_user: 'Edit User'
|
|
67
|
-
email_address: 'E-mail Address'
|
|
68
|
-
extension: 'Extension'
|
|
69
|
-
extensions: 'Extensions'
|
|
70
|
-
filter: 'Filter'
|
|
71
|
-
hidden: 'Hidden'
|
|
72
|
-
hide: 'Hide'
|
|
73
|
-
keywords: 'Keywords'
|
|
74
|
-
language: 'Language'
|
|
75
|
-
layout: 'Layout'
|
|
76
|
-
layouts: 'Layouts'
|
|
77
|
-
log_out: 'Logout'
|
|
78
|
-
logged_in_as: 'Logged in as'
|
|
79
|
-
login: 'Login'
|
|
80
|
-
modify: 'Modify'
|
|
81
|
-
more: 'More'
|
|
82
|
-
name: 'Name'
|
|
83
|
-
new_layout: 'New Layout'
|
|
84
|
-
new_page: 'New Page'
|
|
85
|
-
new_password: 'New Password'
|
|
86
|
-
new_snippet: 'New Snippet'
|
|
87
|
-
new_user: 'New User'
|
|
88
|
-
no_pages: 'No Pages'
|
|
89
|
-
notes: 'Notes'
|
|
90
|
-
optional: 'Optional'
|
|
91
|
-
or: 'or'
|
|
92
|
-
page: 'Page'
|
|
93
|
-
page_page: 'Page Part'
|
|
94
|
-
page_title: 'Page Title'
|
|
95
|
-
page_type: 'Page Type'
|
|
96
|
-
pages: 'Pages'
|
|
97
|
-
pages_controller:
|
|
98
|
-
removed_many: "The pages were successfully removed from the site."
|
|
99
|
-
removed_one: "The page was successfully removed from the site."
|
|
100
|
-
saved: "Your page has been saved below."
|
|
101
|
-
password: 'Password'
|
|
102
|
-
password_confirmation: 'Confirm New Password'
|
|
103
|
-
personal: 'Personal'
|
|
104
|
-
personal_preferences: 'Personal Preferences'
|
|
105
|
-
please_login: 'Please Login'
|
|
106
|
-
powered_by: 'Powered by'
|
|
107
|
-
preferences: 'Preferences'
|
|
108
|
-
preferences_controller:
|
|
109
|
-
error_updating: 'There was an error updating your preferences.'
|
|
110
|
-
updated: 'Your preferences have been updated.'
|
|
111
|
-
published: 'Published'
|
|
112
|
-
published_at: 'Published at'
|
|
113
|
-
reference: 'Reference'
|
|
114
|
-
remember_me: 'Remember me'
|
|
115
|
-
remove: 'Remove'
|
|
116
|
-
remove_layout: 'Remove Layout'
|
|
117
|
-
remove_page: 'Remove Page'
|
|
118
|
-
remove_pages: 'Remove %{pages}'
|
|
119
|
-
remove_tab: 'Remove Tab'
|
|
120
|
-
remove_user: 'Remove user'
|
|
121
|
-
required: 'Required'
|
|
122
|
-
resource_controller:
|
|
123
|
-
not_found: "%{humanized_model_name} could not be found."
|
|
124
|
-
removed: "%{humanized_model_name} has been deleted."
|
|
125
|
-
saved: "%{humanized_model_name} saved below."
|
|
126
|
-
update_conflict: "%{humanized_model_name} has been modified since it was last loaded. Changes cannot be saved without potentially losing data."
|
|
127
|
-
validation_errors: "Validation errors occurred while processing this form. Please take a moment to review the form and correct any input errors before continuing."
|
|
128
|
-
reviewed: 'Reviewed'
|
|
129
|
-
roles: 'Roles'
|
|
130
|
-
saving_changes: Saving Changes
|
|
131
|
-
saving_preferences: Saving preferences
|
|
132
|
-
search_tags: 'Search Tags:'
|
|
133
|
-
select:
|
|
134
|
-
inherit: '<inherit>'
|
|
135
|
-
none: '<none>'
|
|
136
|
-
normal: '<normal>'
|
|
137
|
-
settings: 'Settings'
|
|
138
|
-
slug: 'Slug'
|
|
139
|
-
snippet: 'Snippet'
|
|
140
|
-
snippets: 'Snippets'
|
|
141
|
-
status: 'Status'
|
|
142
|
-
# Warnings and info text:
|
|
143
|
-
text:
|
|
144
|
-
layouts:
|
|
145
|
-
remove_warning: 'Are you sure you want to <strong class="warning">permanently remove</strong> the following layout?'
|
|
146
|
-
pages:
|
|
147
|
-
remove_warning: 'Are you sure you want to <strong class="warning">permanently remove</strong> the following %{pages}?'
|
|
148
|
-
snippets:
|
|
149
|
-
remove_warning: 'Are you sure you want to <strong class="warning">permanently remove</strong> the following snippet?'
|
|
150
|
-
users:
|
|
151
|
-
remove_warning: 'Are you sure you want to <strong class="warning">permanently remove</strong> the following user?'
|
|
152
|
-
this_file_language: "<%= file_name.capitalize %>"
|
|
153
|
-
time:
|
|
154
|
-
am: 'am'
|
|
155
|
-
formats:
|
|
156
|
-
datetime:
|
|
157
|
-
formats:
|
|
158
|
-
default: "%Y-%m-%dT%H:%M:%S%Z"
|
|
159
|
-
default: "%a %b %d %H:%M:%S %Z %Y"
|
|
160
|
-
long: "%B %d, %Y %H:%M"
|
|
161
|
-
only_second: "%S"
|
|
162
|
-
short: "%d %b %H:%M"
|
|
163
|
-
time: "%H:%M"
|
|
164
|
-
timestamp: "%I:%M %p on %B %d, %Y"
|
|
165
|
-
pm: 'pm'
|
|
166
|
-
timestamp:
|
|
167
|
-
at: 'at'
|
|
168
|
-
by: 'by'
|
|
169
|
-
last_updated: 'Last Updated'
|
|
170
|
-
user: 'User'
|
|
171
|
-
username: 'Username'
|
|
172
|
-
username_or_email: 'Username or E-mail Address'
|
|
173
|
-
users: 'Users'
|
|
174
|
-
users_controller:
|
|
175
|
-
cannot_delete_self: 'You cannot delete yourself.'
|
|
176
|
-
version: 'Version'
|
|
177
|
-
view_site: 'View Site'
|
|
178
|
-
website: 'Website'
|
|
179
|
-
welcome_controller:
|
|
180
|
-
invalid_user: 'Invalid username, e-mail address, or password.'
|
|
181
|
-
logged_out: 'You are now logged out.'
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
module TrustyCms<%= class_name %>
|
|
2
|
-
VERSION = "1.0.0"
|
|
3
|
-
SUMMARY = "<%= localization_name.capitalize %> language pack for TrustyCms CMS"
|
|
4
|
-
DESCRIPTION = "Adds <%= localization_name.capitalize %> translations to the TrustyCms CMS interface."
|
|
5
|
-
URL = "<%= homepage %>"
|
|
6
|
-
AUTHORS = ["<%= author_name %>"]
|
|
7
|
-
EMAIL = ["<%= author_email %>"]
|
|
8
|
-
end
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
unless defined? TRUSTY_CMS_ROOT
|
|
2
|
-
ENV["Rails.env"] = "test"
|
|
3
|
-
case
|
|
4
|
-
when ENV["RADIANT_ENV_FILE"]
|
|
5
|
-
require ENV["RADIANT_ENV_FILE"]
|
|
6
|
-
when File.dirname(__FILE__) =~ %r{vendor/trusty_cms/vendor/extensions}
|
|
7
|
-
require "#{File.expand_path(File.dirname(__FILE__) + "/../../../../../../")}/config/environment"
|
|
8
|
-
else
|
|
9
|
-
require "#{File.expand_path(File.dirname(__FILE__) + "/../../../../")}/config/environment"
|
|
10
|
-
end
|
|
11
|
-
end
|
|
12
|
-
require "#{TRUSTY_CMS_ROOT}/spec/spec_helper"
|
|
13
|
-
|
|
14
|
-
Dataset::Resolver.default << (File.dirname(__FILE__) + "/datasets")
|
|
15
|
-
|
|
16
|
-
if File.directory?(File.dirname(__FILE__) + "/matchers")
|
|
17
|
-
Dir[File.dirname(__FILE__) + "/matchers/*.rb"].each {|file| require file }
|
|
18
|
-
end
|
|
19
|
-
|
|
20
|
-
Spec::Runner.configure do |config|
|
|
21
|
-
# config.use_transactional_fixtures = true
|
|
22
|
-
# config.use_instantiated_fixtures = false
|
|
23
|
-
# config.fixture_path = Rails.root + '/spec/fixtures'
|
|
24
|
-
|
|
25
|
-
# You can declare fixtures for each behaviour like this:
|
|
26
|
-
# describe "...." do
|
|
27
|
-
# fixtures :table_a, :table_b
|
|
28
|
-
#
|
|
29
|
-
# Alternatively, if you prefer to declare them only once, you can
|
|
30
|
-
# do so here, like so ...
|
|
31
|
-
#
|
|
32
|
-
# config.global_fixtures = :table_a, :table_b
|
|
33
|
-
#
|
|
34
|
-
# If you declare global fixtures, be aware that they will be declared
|
|
35
|
-
# for all of your examples, even those that don't use them.
|
|
36
|
-
end
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
namespace :radiant do
|
|
2
|
-
namespace :extensions do
|
|
3
|
-
namespace :<%= file_name %> do
|
|
4
|
-
|
|
5
|
-
desc "Runs the migration of the <%= localization_name %> language pack"
|
|
6
|
-
task :migrate => :environment do
|
|
7
|
-
require 'trusty_cms/extension_migrator'
|
|
8
|
-
if ENV["VERSION"]
|
|
9
|
-
<%= class_name %>.migrator.migrate(ENV["VERSION"].to_i)
|
|
10
|
-
else
|
|
11
|
-
<%= class_name %>.migrator.migrate
|
|
12
|
-
end
|
|
13
|
-
end
|
|
14
|
-
|
|
15
|
-
desc "Copies public assets of the <%= localization_name %> language pack to the instance public/ directory."
|
|
16
|
-
task :update => :environments do
|
|
17
|
-
is_svn_or_dir = proc {|path| path =~ /\.svn/ || File.directory?(path) }
|
|
18
|
-
puts "Copying assets from <%= class_name %>"
|
|
19
|
-
Dir[<%= class_name %>.root + "/public/**/*"].reject(&is_svn_or_dir).each do |file|
|
|
20
|
-
path = file.sub(<%= class_name %>.root, '')
|
|
21
|
-
directory = File.dirname(path)
|
|
22
|
-
mkdir_p Rails.root + directory, :verbose => false
|
|
23
|
-
cp file, Rails.root + path, :verbose => false
|
|
24
|
-
end
|
|
25
|
-
end
|
|
26
|
-
end
|
|
27
|
-
end
|
|
28
|
-
end
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
require 'test/unit'
|
|
2
|
-
# Load the environment
|
|
3
|
-
unless defined? TRUSTY_CMS_ROOT
|
|
4
|
-
ENV["Rails.env"] = "test"
|
|
5
|
-
case
|
|
6
|
-
when ENV["RADIANT_ENV_FILE"]
|
|
7
|
-
require ENV["RADIANT_ENV_FILE"]
|
|
8
|
-
when File.dirname(__FILE__) =~ %r{vendor/trusty_cms/vendor/extensions}
|
|
9
|
-
require "#{File.expand_path(File.dirname(__FILE__) + "/../../../../../../")}/config/environment"
|
|
10
|
-
else
|
|
11
|
-
require "#{File.expand_path(File.dirname(__FILE__) + "/../../../../")}/config/environment"
|
|
12
|
-
end
|
|
13
|
-
end
|
|
14
|
-
require "#{TRUSTY_CMS_ROOT}/test/test_helper"
|
|
15
|
-
|
|
16
|
-
class Test::Unit::TestCase
|
|
17
|
-
|
|
18
|
-
# Include a helper to make testing Radius tags easier
|
|
19
|
-
test_helper :extension_tags
|
|
20
|
-
|
|
21
|
-
# Add the fixture directory to the fixture path
|
|
22
|
-
self.fixture_path << File.dirname(__FILE__) + "/fixtures"
|
|
23
|
-
|
|
24
|
-
# Add more helper methods to be used by all extension tests here...
|
|
25
|
-
|
|
26
|
-
end
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env rake
|
|
2
|
-
# Add your own tasks in files placed in lib/tasks ending in .rake,
|
|
3
|
-
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
|
|
4
|
-
|
|
5
|
-
require File.expand_path('../config/application', __FILE__)
|
|
6
|
-
STDOUT.sync = true
|
|
7
|
-
TrustyCms::Application.load_tasks
|
|
@@ -1,149 +0,0 @@
|
|
|
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 'rack/cache'
|
|
14
|
-
|
|
15
|
-
if defined?(Bundler)
|
|
16
|
-
# If you precompile assets before deploying to production, use this line
|
|
17
|
-
Bundler.require(*Rails.groups(:assets => %w(development test)))
|
|
18
|
-
# If you want your assets lazily compiled in production, use this line
|
|
19
|
-
# Bundler.require(:default, :assets, Rails.env)
|
|
20
|
-
end
|
|
21
|
-
|
|
22
|
-
module TrustyCms
|
|
23
|
-
class Application < Rails::Application
|
|
24
|
-
|
|
25
|
-
attr_accessor :captcha_public_key, :captcha_private_key
|
|
26
|
-
|
|
27
|
-
include TrustyCms::Initializer
|
|
28
|
-
|
|
29
|
-
config.autoload_paths += %W(#{TRUSTY_CMS_ROOT}/lib)
|
|
30
|
-
|
|
31
|
-
# Initialize extension paths
|
|
32
|
-
config.initialize_extension_paths
|
|
33
|
-
extension_loader = ExtensionLoader.instance {|l| l.initializer = self }
|
|
34
|
-
extension_loader.paths(:load).reverse_each do |path, value|
|
|
35
|
-
config.autoload_paths.unshift path
|
|
36
|
-
$LOAD_PATH.unshift path
|
|
37
|
-
end
|
|
38
|
-
# config.add_plugin_paths(extension_loader.paths(:plugin))
|
|
39
|
-
radiant_locale_paths = Dir[File.join(TRUSTY_CMS_ROOT, 'config', 'locales', '*.{rb,yml}')]
|
|
40
|
-
config.i18n.load_path = radiant_locale_paths + extension_loader.paths(:locale)
|
|
41
|
-
|
|
42
|
-
config.encoding = 'utf-8'
|
|
43
|
-
# Skip frameworks you're not going to use (only works if using vendor/rails).
|
|
44
|
-
# To use Rails without a database, you must remove the Active Record framework
|
|
45
|
-
# config.frameworks -= [ :action_mailer ]
|
|
46
|
-
|
|
47
|
-
# Only load the extensions named here, in the order given. By default all
|
|
48
|
-
# extensions in vendor/extensions are loaded, in alphabetical order. :all
|
|
49
|
-
# can be used as a placeholder for all extensions not explicitly named.
|
|
50
|
-
|
|
51
|
-
# An example of how to add extensions:
|
|
52
|
-
# config.extensions = [ :snippets, :clipped, :layouts, :reorder, :multi_site, :rad_social]
|
|
53
|
-
|
|
54
|
-
config.extensions = [ ]
|
|
55
|
-
|
|
56
|
-
# By default, only English translations are loaded. Remove any of these from
|
|
57
|
-
# the list below if you'd like to provide any of the additional options
|
|
58
|
-
# config.ignore_extensions []
|
|
59
|
-
|
|
60
|
-
config.captcha_public_key = "6LcbvwsAAAAAACQjq3ZNqqBuDIHUR6gUthjhT9_Z"
|
|
61
|
-
config.captcha_private_key = "6LcbvwsAAAAAALftkG9kwwqbPCeThnSOyn-TK8n5"
|
|
62
|
-
|
|
63
|
-
# Your secret key for verifying cookie session data integrity.
|
|
64
|
-
# If you change this key, all old sessions will become invalid!
|
|
65
|
-
# Make sure the secret is at least 30 characters and all random,
|
|
66
|
-
# no regular words or you'll be exposed to dictionary attacks.
|
|
67
|
-
|
|
68
|
-
# Comment out this line if you want to turn off all caching, or
|
|
69
|
-
# add options to modify the behavior. In the majority of deployment
|
|
70
|
-
# scenarios it is desirable to leave TrustyCms's cache enabled and in
|
|
71
|
-
# the default configuration.
|
|
72
|
-
#
|
|
73
|
-
# Additional options:
|
|
74
|
-
# :use_x_sendfile => true
|
|
75
|
-
# Turns on X-Sendfile support for Apache with mod_xsendfile or lighttpd.
|
|
76
|
-
# :use_x_accel_redirect => '/some/virtual/path'
|
|
77
|
-
# Turns on X-Accel-Redirect support for nginx. You have to provide
|
|
78
|
-
# a path that corresponds to a virtual location in your webserver
|
|
79
|
-
# configuration.
|
|
80
|
-
# :entitystore => "radiant:tmp/cache/entity"
|
|
81
|
-
# Sets the entity store type (preceding the colon) and storage
|
|
82
|
-
# location (following the colon, relative to Rails.root).
|
|
83
|
-
# We recommend you use radiant: since this will enable manual expiration.
|
|
84
|
-
# :metastore => "radiant:tmp/cache/meta"
|
|
85
|
-
# Sets the meta store type and storage location. We recommend you use
|
|
86
|
-
# radiant: since this will enable manual expiration and acceleration headers.
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
# TODO: We're not sure this is actually working, but we can't really test this until the app initializes.
|
|
90
|
-
config.middleware.use Rack::Cache,
|
|
91
|
-
:private_headers => ['Authorization'],
|
|
92
|
-
:entitystore => "radiant:tmp/cache/entity",
|
|
93
|
-
:metastore => "radiant:tmp/cache/meta",
|
|
94
|
-
:verbose => false,
|
|
95
|
-
:allow_reload => false,
|
|
96
|
-
:allow_revalidate => false
|
|
97
|
-
# TODO: There's got to be a better place for this, but in order for assets to work fornow, we need ConditionalGet
|
|
98
|
-
# TODO: Workaround from: https://github.com/rtomayko/rack-cache/issues/80
|
|
99
|
-
config.middleware.insert_before(Rack::ConditionalGet, Rack::Cache)
|
|
100
|
-
config.assets.enabled = true
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
config.filter_parameters += [:password, :password_confirmation]
|
|
105
|
-
|
|
106
|
-
# Use the database for sessions instead of the cookie-based default,
|
|
107
|
-
# which shouldn't be used to store highly confidential information
|
|
108
|
-
# (create the session table with 'rake db:sessions:create')
|
|
109
|
-
# config.action_controller.session_store = :cookie_store DEPRECATED
|
|
110
|
-
|
|
111
|
-
# Activate observers that should always be running
|
|
112
|
-
config.active_record.observers = :user_action_observer
|
|
113
|
-
|
|
114
|
-
# The internationalization framework can be changed to have another default locale (standard is :en) or more load paths.
|
|
115
|
-
# All files from config/locales/*.rb,yml are added automatically.
|
|
116
|
-
# config.i18n.load_path << Dir[File.join(Rails.root, 'my', 'locales', '*.{rb,yml}')]
|
|
117
|
-
# config.i18n.default_locale = :'en'
|
|
118
|
-
|
|
119
|
-
# Make Active Record use UTC-base instead of local time
|
|
120
|
-
config.time_zone = 'UTC'
|
|
121
|
-
|
|
122
|
-
# Set the default field error proc
|
|
123
|
-
config.action_view.field_error_proc = Proc.new do |html, instance|
|
|
124
|
-
if html !~ /label/
|
|
125
|
-
%{<span class="error-with-fieldxxxx">#{html} <span class="error">#{[instance.error_message].flatten.first}</span></span>}.html_safe
|
|
126
|
-
else
|
|
127
|
-
html
|
|
128
|
-
end
|
|
129
|
-
end
|
|
130
|
-
|
|
131
|
-
config.after_initialize do
|
|
132
|
-
extension_loader.load_extensions
|
|
133
|
-
extension_loader.load_extension_initalizers
|
|
134
|
-
|
|
135
|
-
#Dir["#{TRUSTY_CMS_ROOT}/config/initializers/**/*.rb"].sort.each do |initializer|
|
|
136
|
-
# load(initializer)
|
|
137
|
-
#end
|
|
138
|
-
|
|
139
|
-
extension_loader.activate_extensions # also calls initialize_views
|
|
140
|
-
#config.add_controller_paths(extension_loader.paths(:controller))
|
|
141
|
-
#config.add_eager_load_paths(extension_loader.paths(:eager_load))
|
|
142
|
-
|
|
143
|
-
# Add new inflection rules using the following format:
|
|
144
|
-
ActiveSupport::Inflector.inflections do |inflect|
|
|
145
|
-
inflect.uncountable 'config'
|
|
146
|
-
end
|
|
147
|
-
end
|
|
148
|
-
end
|
|
149
|
-
end
|