trusty-cms 3.8.2 → 3.8.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (124) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +0 -1
  3. data/Gemfile.lock +1 -1
  4. data/app/helpers/scoped_helper.rb +1 -1
  5. data/app/models/trusty_cms/config.rb +2 -5
  6. data/config/application.rb +4 -4
  7. data/config/initializers/devise.rb +1 -1
  8. data/db/migrate/{001_create_radiant_tables.rb → 001_create_trusty_tables.rb} +1 -1
  9. data/db/migrate/20111016150725_extend_page_part_content_limit.rb +0 -2
  10. data/lib/configuration_extensions/configuration_extensions.rb +9 -9
  11. data/lib/tasks/extensions.rake +4 -4
  12. data/lib/tasks/framework.rake +28 -28
  13. data/lib/tasks/radiant_config.rake +4 -4
  14. data/lib/trusty_cms.rb +1 -1
  15. data/lib/trusty_cms/config/definition.rb +1 -1
  16. data/lib/trusty_cms/extension_loader.rb +1 -1
  17. data/lib/trusty_cms/extension_path.rb +1 -1
  18. data/lib/trusty_cms/initializer.rb +14 -14
  19. data/lib/trusty_cms/taggable.rb +1 -1
  20. data/lib/trusty_cms/task_support.rb +2 -2
  21. data/spec/dummy/config/application.rb +8 -8
  22. data/vendor/extensions/clipped-extension/lib/tasks/clipped_extension_tasks.rake +2 -2
  23. data/vendor/extensions/multi-site-extension/lib/tasks/scoped_admin_extension_tasks.rake +2 -2
  24. metadata +3 -103
  25. data/CONTRIBUTORS.md +0 -279
  26. data/Vagrantfile +0 -122
  27. data/app/mailers/password_mailer.rb +0 -10
  28. data/bin/ci/before_script +0 -10
  29. data/bin/trusty_test +0 -3
  30. data/lib/generators/extension/USAGE +0 -30
  31. data/lib/generators/extension/extension_generator.rb +0 -97
  32. data/lib/generators/extension/templates/README.md +0 -6
  33. data/lib/generators/extension/templates/RSpecRakefile +0 -109
  34. data/lib/generators/extension/templates/Rakefile +0 -25
  35. data/lib/generators/extension/templates/cucumber.yml +0 -1
  36. data/lib/generators/extension/templates/cucumber_env.rb +0 -11
  37. data/lib/generators/extension/templates/cucumber_paths.rb +0 -22
  38. data/lib/generators/extension/templates/en.yml +0 -3
  39. data/lib/generators/extension/templates/extension.rb +0 -21
  40. data/lib/generators/extension/templates/functional_test.rb +0 -15
  41. data/lib/generators/extension/templates/gemspec.rb +0 -29
  42. data/lib/generators/extension/templates/lib.rb +0 -8
  43. data/lib/generators/extension/templates/migration.rb +0 -9
  44. data/lib/generators/extension/templates/radiant_config.rb +0 -3
  45. data/lib/generators/extension/templates/routes.rb +0 -5
  46. data/lib/generators/extension/templates/spec.opts +0 -6
  47. data/lib/generators/extension/templates/spec_helper.rb +0 -42
  48. data/lib/generators/extension/templates/tasks.rake +0 -47
  49. data/lib/generators/extension/templates/test_helper.rb +0 -26
  50. data/lib/generators/extension_controller/USAGE +0 -36
  51. data/lib/generators/extension_controller/extension_controller_generator.rb +0 -84
  52. data/lib/generators/extension_controller/templates/controller.rb +0 -10
  53. data/lib/generators/extension_controller/templates/controller_spec.rb +0 -23
  54. data/lib/generators/extension_controller/templates/functional_test.rb +0 -11
  55. data/lib/generators/extension_controller/templates/helper.rb +0 -2
  56. data/lib/generators/extension_controller/templates/helper_spec.rb +0 -11
  57. data/lib/generators/extension_controller/templates/helper_test.rb +0 -4
  58. data/lib/generators/extension_controller/templates/view.html.erb +0 -2
  59. data/lib/generators/extension_controller/templates/view_spec.rb +0 -12
  60. data/lib/generators/extension_mailer/USAGE +0 -17
  61. data/lib/generators/extension_mailer/extension_mailer_generator.rb +0 -68
  62. data/lib/generators/extension_mailer/templates/fixture.erb +0 -3
  63. data/lib/generators/extension_mailer/templates/mailer.rb +0 -15
  64. data/lib/generators/extension_mailer/templates/unit_test.rb +0 -21
  65. data/lib/generators/extension_mailer/templates/view.erb +0 -3
  66. data/lib/generators/extension_migration/USAGE +0 -34
  67. data/lib/generators/extension_migration/extension_migration_generator.rb +0 -25
  68. data/lib/generators/extension_migration/templates/migration.rb +0 -11
  69. data/lib/generators/extension_model/USAGE +0 -35
  70. data/lib/generators/extension_model/extension_model_generator.rb +0 -68
  71. data/lib/generators/extension_model/templates/fixtures.yml +0 -19
  72. data/lib/generators/extension_model/templates/migration.rb +0 -16
  73. data/lib/generators/extension_model/templates/model.rb +0 -2
  74. data/lib/generators/extension_model/templates/model_spec.rb +0 -11
  75. data/lib/generators/extension_model/templates/unit_test.rb +0 -8
  76. data/lib/generators/generator_base_extension.rb +0 -18
  77. data/lib/generators/instance/instance_generator.rb +0 -148
  78. data/lib/generators/instance/templates/databases/db2.yml +0 -40
  79. data/lib/generators/instance/templates/databases/mysql.yml +0 -47
  80. data/lib/generators/instance/templates/databases/postgresql.yml +0 -44
  81. data/lib/generators/instance/templates/databases/sqlite3.yml +0 -16
  82. data/lib/generators/instance/templates/databases/sqlserver.yml +0 -21
  83. data/lib/generators/instance/templates/instance_boot.rb +0 -122
  84. data/lib/generators/instance/templates/instance_config.ru +0 -2
  85. data/lib/generators/instance/templates/instance_environment.rb +0 -93
  86. data/lib/generators/instance/templates/instance_gemfile +0 -78
  87. data/lib/generators/instance/templates/instance_generate +0 -6
  88. data/lib/generators/instance/templates/instance_radiant_config.rb +0 -16
  89. data/lib/generators/instance/templates/instance_rakefile +0 -3
  90. data/lib/generators/instance/templates/instance_routes.rb +0 -1
  91. data/lib/generators/language_extension/USAGE +0 -27
  92. data/lib/generators/language_extension/language_extension_generator.rb +0 -71
  93. data/lib/generators/language_extension/templates/README +0 -3
  94. data/lib/generators/language_extension/templates/RSpecRakefile +0 -123
  95. data/lib/generators/language_extension/templates/Rakefile +0 -25
  96. data/lib/generators/language_extension/templates/available_tags.yml +0 -553
  97. data/lib/generators/language_extension/templates/cucumber.yml +0 -1
  98. data/lib/generators/language_extension/templates/cucumber_env.rb +0 -16
  99. data/lib/generators/language_extension/templates/cucumber_paths.rb +0 -14
  100. data/lib/generators/language_extension/templates/extension.rb +0 -12
  101. data/lib/generators/language_extension/templates/functional_test.rb +0 -15
  102. data/lib/generators/language_extension/templates/gemspec.rb +0 -24
  103. data/lib/generators/language_extension/templates/lang.yml +0 -181
  104. data/lib/generators/language_extension/templates/lib.rb +0 -8
  105. data/lib/generators/language_extension/templates/spec.opts +0 -6
  106. data/lib/generators/language_extension/templates/spec_helper.rb +0 -36
  107. data/lib/generators/language_extension/templates/tasks.rake +0 -28
  108. data/lib/generators/language_extension/templates/test_helper.rb +0 -26
  109. data/lib/generators/trusty_cms/USAGE +0 -8
  110. data/lib/generators/trusty_cms/templates/Rakefile.erb +0 -7
  111. data/lib/generators/trusty_cms/templates/application.rb.erb +0 -149
  112. data/lib/generators/trusty_cms/templates/boot.rb.erb +0 -9
  113. data/lib/generators/trusty_cms/templates/config.ru.erb +0 -4
  114. data/lib/generators/trusty_cms/templates/database.yml.erb +0 -28
  115. data/lib/generators/trusty_cms/templates/environment.rb.erb +0 -5
  116. data/lib/generators/trusty_cms/templates/environments/development.rb.erb +0 -24
  117. data/lib/generators/trusty_cms/templates/environments/production.rb.erb +0 -26
  118. data/lib/generators/trusty_cms/templates/environments/test.rb.erb +0 -35
  119. data/lib/generators/trusty_cms/templates/initializers/secret_token.rb.erb +0 -13
  120. data/lib/generators/trusty_cms/templates/initializers/session_store.rb.erb +0 -8
  121. data/lib/generators/trusty_cms/templates/initializers/trusty_cms_config.rb.erb +0 -16
  122. data/lib/generators/trusty_cms/templates/preinitializer.rb.erb +0 -18
  123. data/lib/generators/trusty_cms/templates/routes.rb.erb +0 -0
  124. data/lib/generators/trusty_cms/trusty_cms_generator.rb +0 -32
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3692c255ff72ea8bacc0f457e1d9ec4d17e24f6fbc42898a00e5af4d5d64fd1b
4
- data.tar.gz: f09cdfa8786b2a032f9200a1e0d7537b6fb527a784412bac003c38f543f3ee1d
3
+ metadata.gz: 03c798051f6a9e3ca039cde76868c92f4c167851a51a7faba5e0f094cbc28bba
4
+ data.tar.gz: 1622ca9cff174468884c1b605563870e1edbb19ed6a2289b8782f01641f65dd2
5
5
  SHA512:
6
- metadata.gz: 4416a9fcb0f24f337fee5f589a0881cc0376bbddf6a9ca77ffe615a21eccf48e541c9ca9d37b0e18733d869a48c9b75d533b6d738c7c6449883c9e15af05b98b
7
- data.tar.gz: 955e197762b016537768a1d4ed93f19a49547d33d67c893b387f09be44f70a5abce0afd9ba9527dd6b0304911d5db4c86febd9491eda4469766700fdbfefa040
6
+ metadata.gz: fed160cae1847c602d13b8db042f2d494f4d673fb5eac40745d5214a453bc7d4743199984cd737c07a9be1d739bec5cf6988b2ddf3f9958a0907184bcb2bd76d
7
+ data.tar.gz: 109ac3bb659fc9ea54806ca3e292e286aeef883a40d315d3a88f7d0e6810efd8647be7db598e919b3adc5abc3b11eb4fff1f96a6f398fc5a330e44fcc841db24
data/.gitignore CHANGED
@@ -16,7 +16,6 @@ spec/datasets/tmp
16
16
  .idea
17
17
  rerun.txt
18
18
  *.swp
19
- radiant-*.gem
20
19
  .rvmrc
21
20
  .bundle
22
21
  .ruby-version
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- trusty-cms (3.8.2)
4
+ trusty-cms (3.8.3)
5
5
  RedCloth (= 4.3.2)
6
6
  acts_as_list (~> 0.9.5)
7
7
  acts_as_tree (>= 2.6.1, < 2.9.0)
@@ -4,7 +4,7 @@ module ScopedHelper
4
4
  base.module_eval do
5
5
  def title
6
6
  t = current_site.name
7
- t = TrustyCms::Config['admin.title'] || 'Radiant CMS' if t.blank?
7
+ t = TrustyCms::Config['admin.title'] || 'TrustyCMS' if t.blank?
8
8
  t
9
9
  end
10
10
 
@@ -41,7 +41,6 @@ module TrustyCms
41
41
  # end
42
42
  # end
43
43
  #
44
- # and usually in a config/radiant_config.rb file either in radiant itself, in the application directory
45
44
  # or in an extension. TrustyCms currently defines the following settings and makes them editable by
46
45
  # admin users on the site configuration page:
47
46
  #
@@ -135,7 +134,7 @@ module TrustyCms
135
134
  end
136
135
 
137
136
  def cache_file
138
- File.join(cache_path,'radiant_config_cache.txt')
137
+ File.join(cache_path,'trusty_config_cache.txt')
139
138
  end
140
139
 
141
140
  def site_settings
@@ -177,9 +176,7 @@ module TrustyCms
177
176
  # * :allow_blank should be false if the config item must not be blank or nil
178
177
  # * :allow_change should be false if the config item can only be set, not changed. Add a default to specify an unchanging config entry.
179
178
  # * :allow_display should be false if the config item should not be showable in radius tags
180
- #
181
- # From the main radiant config/initializers/radiant_config.rb:
182
- #
179
+ #
183
180
  # TrustyCms.config do |config|
184
181
  # config.define 'defaults.locale', :select_from => lambda { TrustyCms::AvailableLocales.locales }, :allow_blank => true
185
182
  # config.define 'defaults.page.parts', :default => "Body,Extended"
@@ -37,16 +37,16 @@ module TrustyCms
37
37
  end
38
38
  paths["app/helpers"] = []
39
39
  # config.add_plugin_paths(extension_loader.paths(:plugin))
40
- radiant_locale_paths = Dir[File.join(TRUSTY_CMS_ROOT, 'config', 'locales', '*.{rb,yml}')]
41
- config.i18n.load_path = radiant_locale_paths + extension_loader.paths(:locale)
40
+ trusty_locale_paths = Dir[File.join(TRUSTY_CMS_ROOT, 'config', 'locales', '*.{rb,yml}')]
41
+ config.i18n.load_path = trusty_locale_paths + extension_loader.paths(:locale)
42
42
  I18n.enforce_available_locales = true
43
43
 
44
44
  config.encoding = 'utf-8'
45
45
 
46
46
  config.middleware.use Rack::Cache,
47
47
  :private_headers => ['Authorization'],
48
- :entitystore => "radiant:tmp/cache/entity",
49
- :metastore => "radiant:tmp/cache/meta",
48
+ :entitystore => "trusty:tmp/cache/entity",
49
+ :metastore => "trusty:tmp/cache/meta",
50
50
  :verbose => false,
51
51
  :allow_reload => false,
52
52
  :allow_revalidate => false
@@ -92,7 +92,7 @@ Devise.setup do |config|
92
92
  # It will change confirmation, password recovery and other workflows
93
93
  # to behave the same regardless if the e-mail provided was right or wrong.
94
94
  # Does not affect registerable.
95
- # config.paranoid = true
95
+ config.paranoid = true
96
96
 
97
97
  # By default Devise will store the user in session. You can skip storage for
98
98
  # particular strategies by setting this option.
@@ -1,4 +1,4 @@
1
- class CreateRadiantTables < ActiveRecord::Migration[5.2]
1
+ class CreateTrustyTables < ActiveRecord::Migration[5.2]
2
2
  def self.up
3
3
  create_table "config", :force => true do |t|
4
4
  t.column "key", :string, :limit => 40, :default => "", :null => false
@@ -1,8 +1,6 @@
1
1
  class ExtendPagePartContentLimit < ActiveRecord::Migration[5.2]
2
2
  def self.up
3
3
  if ActiveRecord::Base.connection.adapter_name =~ /m[sy]sql/i
4
- # Make sure text longer than 64kB is not cropped in MySQL and MSSQL
5
- # See https://github.com/radiant/radiant-sheets-extension/issues/10
6
4
  change_column :page_parts, :content, :text, :limit => 1048575
7
5
  end
8
6
  end
@@ -27,7 +27,7 @@ module TrustyCms
27
27
  Rails.configuration
28
28
  end
29
29
 
30
- # Returns the root directory of this radiant installation (which is usually the gem directory).
30
+ # Returns the root directory of this installation (which is usually the gem directory).
31
31
  # This is not the same as Rails.root, which is the instance directory and tends to contain only site-delivery material.
32
32
  #
33
33
  def root
@@ -56,7 +56,7 @@ module TrustyCms
56
56
  end
57
57
 
58
58
  def vendor?
59
- File.exist?("#{Rails.root}/vendor/radiant")
59
+ File.exist?("#{Rails.root}/vendor/trusty")
60
60
  end
61
61
 
62
62
  def app?
@@ -82,8 +82,8 @@ class Rails::Application::Configuration
82
82
 
83
83
  # The TrustyCms::Configuration class extends Rails::Configuration with three purposes:
84
84
  # * to reset some rails defaults so that files are found in TRUSTY_CMS_ROOT instead of Rails.root
85
- # * to notice that some gems and plugins are in fact radiant extensions
86
- # * to notice that some radiant extensions add load paths (for plugins, controllers, metal, etc)
85
+ # * to notice that some gems and plugins are in fact trusty extensions
86
+ # * to notice that some trusty extensions add load paths (for plugins, controllers, metal, etc)
87
87
 
88
88
  attr_accessor :extension_paths, :ignored_extensions
89
89
 
@@ -177,7 +177,7 @@ class Rails::Application::Configuration
177
177
  end
178
178
 
179
179
  # Returns an alphabetical list of every extension found among all the load paths and bundled gems. Any plugin or
180
- # gem whose path ends in the form +radiant-something-extension+ is considered to be an extension.
180
+ # gem whose path ends in the form +trusty-something-extension+ is considered to be an extension.
181
181
  #
182
182
  # TrustyCms.configuration.available_extensions # => [:name, :name, :name, :name]
183
183
  #
@@ -204,7 +204,7 @@ class Rails::Application::Configuration
204
204
  end
205
205
  end
206
206
 
207
- # Scans the bundled gems for any whose name match the +radiant-something-extension+ format
207
+ # Scans the bundled gems for any whose name match the +trusty-something-extension+ format
208
208
  # and returns a list of their names as symbols.
209
209
  #
210
210
  # TrustyCms.configuration.gem_extensions # => [:name, :name]
@@ -221,7 +221,7 @@ class Rails::Application::Configuration
221
221
  # Old extension-dependency mechanism now deprecated
222
222
  #
223
223
  def extension(ext)
224
- ::ActiveSupport::Deprecation.warn("Extension dependencies have been deprecated and are no longer supported in radiant 1.0. Extensions with dependencies should be packaged as gems and use the .gemspec to declare them.", caller)
224
+ ::ActiveSupport::Deprecation.warn("Extension dependencies have been deprecated and are no longer supported in trusty 1.0. Extensions with dependencies should be packaged as gems and use the .gemspec to declare them.", caller)
225
225
  end
226
226
 
227
227
  # Old gem-invogation method now deprecated
@@ -299,7 +299,7 @@ class VendorBoot < Boot
299
299
  end
300
300
 
301
301
  def load_error_message
302
- "Please verify that vendor/radiant contains a complete copy of the TrustyCms sources."
302
+ "Please verify that vendor/trusty contains a complete copy of the TrustyCms sources."
303
303
  end
304
304
  end
305
305
 
@@ -315,7 +315,7 @@ class AppBoot < Boot
315
315
  end
316
316
 
317
317
  class GemBoot < Boot
318
- # The location and version of the radiant gem should be set in your Gemfile
318
+ # The location and version of the trusty gem should be set in your Gemfile
319
319
  def load_error_message
320
320
  "Have you run `bundle install`?'."
321
321
  end
@@ -38,9 +38,9 @@ namespace :test do
38
38
  if File.directory?(File.join(directory, 'test'))
39
39
  chdir directory do
40
40
  if RUBY_PLATFORM =~ /win32/
41
- system "rake.cmd test RADIANT_ENV_FILE=#{Rails.root}/config/environment"
41
+ system "rake.cmd test TRUSTY_ENV_FILE=#{Rails.root}/config/environment"
42
42
  else
43
- system "rake test RADIANT_ENV_FILE=#{Rails.root}/config/environment"
43
+ system "rake test TRUSTY_ENV_FILE=#{Rails.root}/config/environment"
44
44
  end
45
45
  end
46
46
  end
@@ -64,9 +64,9 @@ namespace :spec do
64
64
  puts %{\nRunning specs on #{extension} extension from #{directory}/spec\n}
65
65
  chdir directory do
66
66
  if RUBY_PLATFORM =~ /win32/
67
- system "rake.cmd spec RADIANT_ENV_FILE=#{Rails.root}/config/environment"
67
+ system "rake.cmd spec TRUSTY_ENV_FILE=#{Rails.root}/config/environment"
68
68
  else
69
- system "rake spec RADIANT_ENV_FILE=#{Rails.root}/config/environment"
69
+ system "rake spec TRUSTY_ENV_FILE=#{Rails.root}/config/environment"
70
70
  end
71
71
  end
72
72
  end
@@ -2,28 +2,28 @@
2
2
  unless File.directory? "#{Rails.root}/app"
3
3
  namespace :trusty_cms do
4
4
  namespace :freeze do
5
- desc "Lock this application to the current gems (by unpacking them into vendor/radiant)"
5
+ desc "Lock this application to the current gems (by unpacking them into vendor/trusty)"
6
6
  task :gems do
7
7
  require 'rubygems'
8
8
  require 'rubygems/gem_runner'
9
9
 
10
- radiant = (version = ENV['VERSION']) ?
10
+ trusty = (version = ENV['VERSION']) ?
11
11
  Gem.cache.search('trusty-cms', "= #{version}").first :
12
12
  Gem.cache.search('trusty-cms').sort_by { |g| g.version }.last
13
13
 
14
- version ||= radiant.version
14
+ version ||= trusty.version
15
15
 
16
- unless radiant
17
- puts "No radiant gem #{version} is installed. Do 'gem list radiant' to see what you have available."
16
+ unless trusty
17
+ puts "No trusty gem #{version} is installed. Do 'gem list trusty' to see what you have available."
18
18
  exit
19
19
  end
20
20
 
21
- puts "Freezing to the gems for TrustyCms #{radiant.version}"
22
- rm_rf "vendor/radiant"
21
+ puts "Freezing to the gems for TrustyCms #{trusty.version}"
22
+ rm_rf "vendor/trusty"
23
23
 
24
24
  chdir("vendor") do
25
- Gem::GemRunner.new.run(["unpack", "radiant", "--version", "=#{version}"])
26
- FileUtils.mv(Dir.glob("radiant*").first, "radiant")
25
+ Gem::GemRunner.new.run(["unpack", "trusty", "--version", "=#{version}"])
26
+ FileUtils.mv(Dir.glob("trusty*").first, "trusty")
27
27
  end
28
28
  end
29
29
 
@@ -35,30 +35,30 @@ unless File.directory? "#{Rails.root}/app"
35
35
  exit 1
36
36
  end
37
37
 
38
- radiant_git = "git://github.com/pgharts/trusty-cms.git"
38
+ trusty_git = "git://github.com/pgharts/trusty-cms.git"
39
39
 
40
40
  if File.exist?("vendor/trusty_cms/.git/HEAD")
41
- cd("vendor/radiant") { system "git checkout master"; system "git pull origin master"}
41
+ cd("vendor/trusty") { system "git checkout master"; system "git pull origin master"}
42
42
  else
43
- system "git clone #{radiant_git} vendor/radiant"
43
+ system "git clone #{trusty_git} vendor/trusty"
44
44
  end
45
45
 
46
46
  case
47
47
  when ENV['TAG']
48
- cd("vendor/radiant") { system "git checkout -b v#{ENV['TAG']} #{ENV['TAG']}"}
48
+ cd("vendor/trusty") { system "git checkout -b v#{ENV['TAG']} #{ENV['TAG']}"}
49
49
  when ENV['BRANCH']
50
- cd("vendor/radiant") { system "git checkout --track -b #{ENV['BRANCH']} origin/#{ENV['BRANCH']}"}
50
+ cd("vendor/trusty") { system "git checkout --track -b #{ENV['BRANCH']} origin/#{ENV['BRANCH']}"}
51
51
  when ENV['REVISION']
52
- cd("vendor/radiant") { system "git checkout -b REV_#{ENV['REVISION']} #{ENV['REVISION']}"}
52
+ cd("vendor/trusty") { system "git checkout -b REV_#{ENV['REVISION']} #{ENV['REVISION']}"}
53
53
  end
54
54
 
55
- cd("vendor/radiant") { system "git submodule update --init"}
55
+ cd("vendor/trusty") { system "git submodule update --init"}
56
56
  end
57
57
  end
58
58
 
59
59
  desc "Unlock this application from freeze of gems or edge and return to a fluid use of system gems"
60
60
  task :unfreeze do
61
- rm_rf "vendor/radiant"
61
+ rm_rf "vendor/trusty"
62
62
  end
63
63
 
64
64
  desc "Update configs, scripts, html, images, sass, stylesheets and javascripts from TrustyCms."
@@ -94,7 +94,7 @@ unless File.directory? "#{Rails.root}/app"
94
94
  install "#{File.dirname(__FILE__)}/../generators/instance/templates/instance_generate", "#{local_base}/generate", :mode => 0755
95
95
  end
96
96
 
97
- desc "Update your javascripts from your current radiant install"
97
+ desc "Update your javascripts from your current trusty install"
98
98
  task :javascripts do
99
99
  FileUtils.mkdir_p("#{Rails.root}/public/javascripts/admin/")
100
100
  copy_javascripts = proc do |project_dir, scripts|
@@ -110,7 +110,7 @@ unless File.directory? "#{Rails.root}/app"
110
110
  TrustyCms::TaskSupport.cache_admin_js
111
111
  end
112
112
 
113
- desc "Update Gemfile from your current radiant install, backing up if required."
113
+ desc "Update Gemfile from your current trusty install, backing up if required."
114
114
  task :bundle do
115
115
  require 'erb'
116
116
  file = "#{Rails.root}/Gemfile"
@@ -128,7 +128,7 @@ unless File.directory? "#{Rails.root}/app"
128
128
  active_db_gem = db_gems.keys.find { |g| Gem.loaded_specs[g] } || 'sqlite3'
129
129
 
130
130
  File.open(tmpfile, 'w') do |f|
131
- radiant_version = TrustyCms::VERSION.to_s
131
+ trusty_version = TrustyCms::VERSION.to_s
132
132
  db = db_gems[active_db_gem]
133
133
  f.write ERB.new(File.read(genfile)).result(binding)
134
134
  end
@@ -138,7 +138,7 @@ unless File.directory? "#{Rails.root}/app"
138
138
  if File.exist?(file)
139
139
  FileUtils.cp(file, backfile)
140
140
  warning << "** WARNING **
141
- Your old Gemfile has been saved as Gemfile.bak. If you had radiant extensions or other gems in that file, please copy those lines to the new file. After checking the Gemfile, please run `bundle install` to update your application."
141
+ Your old Gemfile has been saved as Gemfile.bak. If you had trusty extensions or other gems in that file, please copy those lines to the new file. After checking the Gemfile, please run `bundle install` to update your application."
142
142
  else
143
143
  warning << "** WARNING **
144
144
  A Gemfile has been created in your application directory. If you have config.gem entries in your old environment.rb (now .bak), please move them to the Gemfile. When you're happy with it, run `bundle install` to install the gems."
@@ -149,7 +149,7 @@ A Gemfile has been created in your application directory. If you have config.gem
149
149
  puts warning
150
150
  end
151
151
 
152
- desc "Update configuration files from your current radiant install"
152
+ desc "Update configuration files from your current trusty install"
153
153
  task :configs do
154
154
  require 'erb'
155
155
  instances = {
@@ -187,7 +187,7 @@ A Gemfile has been created in your application directory. If you have config.gem
187
187
  [:env, :development, :test, :cucumber, :production].each do |env_file|
188
188
  File.open(tmps[env_file], 'w') do |f|
189
189
  app_name = File.basename(File.expand_path(Rails.root))
190
- radiant_version = TrustyCms::VERSION.to_s
190
+ trusty_version = TrustyCms::VERSION.to_s
191
191
  f.write ERB.new(File.read(gens[env_file])).result(binding)
192
192
  end
193
193
  unless File.exist?(instances[env_file]) && FileUtils.compare_file(instances[env_file], tmps[env_file])
@@ -206,16 +206,16 @@ the new files: #{warning}"
206
206
  end
207
207
  end
208
208
 
209
- desc "Update static HTML files from your current radiant install"
209
+ desc "Update static HTML files from your current trusty install"
210
210
  task :static_html do
211
211
  project_dir = Rails.root + "/public/"
212
212
  html_files = Dir["#{File.dirname(__FILE__)}/../../public/*.html"].delete_if { |f| f =~ /404.html|500.html/ }
213
213
  FileUtils.cp(html_files, project_dir)
214
214
  end
215
215
 
216
- desc "Update admin and radiant images from your current radiant install"
216
+ desc "Update admin and trusty images from your current trusty install"
217
217
  task :images do
218
- %w{admin radiant}.each do |d|
218
+ %w{admin trusty}.each do |d|
219
219
  project_dir = Rails.root + "/public/images/#{d}/"
220
220
  FileUtils.mkdir_p(project_dir)
221
221
  images = Dir["#{File.dirname(__FILE__)}/../../public/images/#{d}/*"]
@@ -223,7 +223,7 @@ the new files: #{warning}"
223
223
  end
224
224
  end
225
225
 
226
- desc "Update admin stylesheets from your current radiant install"
226
+ desc "Update admin stylesheets from your current trusty install"
227
227
  task :stylesheets do
228
228
  project_dir = Rails.root + '/public/stylesheets/admin/'
229
229
 
@@ -234,7 +234,7 @@ the new files: #{warning}"
234
234
  copy_stylesheets[Rails.root + '/public/stylesheets/admin/',Dir["#{File.dirname(__FILE__)}/../../public/stylesheets/admin/*.css"]]
235
235
  end
236
236
 
237
- desc "Update admin sass files from your current radiant install"
237
+ desc "Update admin sass files from your current trusty install"
238
238
  task :sass do
239
239
  copy_sass = proc do |project_dir, sass_files|
240
240
  sass_files.reject!{|s| File.basename(s) == 'overrides.sass'} if File.exists?(project_dir + 'overrides.sass') || File.exists?(project_dir + '../overrides.css')
@@ -1,16 +1,16 @@
1
1
  require 'trusty_cms/task_support'
2
2
  namespace :trusty_cms do
3
3
  namespace :config do
4
- desc "Export TrustyCms::Config to Rails.root/config/radiant_config.yml. Specify a path with RADIANT_CONFIG_PATH - defaults to Rails.root/config/radiant_config.yml"
4
+ desc "Export TrustyCms::Config to Rails.root/config/trusty_config.yml. Specify a path with TRUSTY_CONFIG_PATH - defaults to Rails.root/config/trusty_config.yml"
5
5
  task :export => :environment do
6
- config_path = ENV['RADIANT_CONFIG_PATH'] || "#{Rails.root}/config/radiant_config.yml"
6
+ config_path = ENV['TRUSTY_CONFIG_PATH'] || "#{Rails.root}/config/trusty_config.yml"
7
7
  clear = ENV['CLEAR_CONFIG'] || nil
8
8
  TrustyCms::TaskSupport.config_export(config_path)
9
9
  end
10
10
 
11
- desc "Import TrustyCms::Config from Rails.root/config/radiant_config.yml. Specify a path with RADIANT_CONFIG_PATH - defaults to Rails.root/config/radiant_config.yml Set CLEAR_CONFIG=true to delete all existing settings before import"
11
+ desc "Import TrustyCms::Config from Rails.root/config/trusty_config.yml. Specify a path with TRUSTY_CONFIG_PATH - defaults to Rails.root/config/trusty_config.yml Set CLEAR_CONFIG=true to delete all existing settings before import"
12
12
  task :import => :environment do
13
- config_path = ENV['RADIANT_CONFIG_PATH'] || "#{Rails.root}/config/radiant_config.yml"
13
+ config_path = ENV['TRUSTY_CONFIG_PATH'] || "#{Rails.root}/config/trusty_config.yml"
14
14
  clear = ENV['CLEAR_CONFIG'] || nil
15
15
  TrustyCms::TaskSupport.config_import(config_path, clear)
16
16
  end
data/lib/trusty_cms.rb CHANGED
@@ -2,6 +2,6 @@ TRUSTY_CMS_ROOT = File.expand_path(File.join(File.dirname(__FILE__), "..")) unle
2
2
 
3
3
  unless defined? TrustyCms::VERSION
4
4
  module TrustyCms
5
- VERSION = '3.8.2'
5
+ VERSION = '3.8.3'
6
6
  end
7
7
  end
@@ -6,7 +6,7 @@ module TrustyCms
6
6
 
7
7
  # Configuration 'definitions' are metadata held in memory that add restriction and description to individual config entries.
8
8
  #
9
- # By default radiant's configuration machinery is open and ad-hoc: config items are just globally-accessible variables.
9
+ # By default trusty's configuration machinery is open and ad-hoc: config items are just globally-accessible variables.
10
10
  # They're created when first mentioned and then available in all parts of the application. The definition mechanism is a way
11
11
  # to place limits on that behavior. It allows you to protect a config entry, to specify the values it can take and to
12
12
  # validate it when it changes. In the next update it will also allow you to declare that
@@ -120,7 +120,7 @@ module TrustyCms
120
120
  # Builds an ExtensionPath object from the supplied path, working out the name of the extension on the way.
121
121
  # The ExtensionPath object will later be used to scan and load the extension.
122
122
  # An extension name can be supplied in addition to the path. It will be processed in the usual way to
123
- # remove radiant- and -extension and any verion numbering.
123
+ # remove trusty- and -extension and any verion numbering.
124
124
  #
125
125
  def record_path(path, name=nil)
126
126
  ExtensionPath.from_path(path, name)
@@ -37,7 +37,7 @@ module TrustyCms
37
37
  end
38
38
 
39
39
  # Builds a new ExtensionPath object from the supplied path, working out the name of the extension by
40
- # stripping the extra bits from radiant-something-extension-1.0.0 to leave just 'something'. The object
40
+ # stripping the extra bits from trusty-something-extension-1.0.0 to leave just 'something'. The object
41
41
  # is returned, and also remembered here for later use by the initializer (to find load paths) and the
42
42
  # ExtensionLoader, to load and activate the extension.
43
43
  #
@@ -23,13 +23,13 @@ module TrustyCms
23
23
  module Initializer
24
24
 
25
25
  # Rails::Initializer is essentially a list of startup steps and we extend it here by:
26
- # * overriding or extending some of those steps so that they use radiant and extension paths
26
+ # * overriding or extending some of those steps so that they use trusty and extension paths
27
27
  # as well as (or instead of) the rails defaults.
28
28
  # * appending some extra steps to set up the admin UI and activate extensions
29
29
 
30
30
 
31
- # Returns true in the very unusual case where radiant has been deployed as a rails app itself, rather than
32
- # loaded as a gem or from vendor/. This is only likely in situations where radiant is customised so heavily
31
+ # Returns true in the very unusual case where trusty has been deployed as a rails app itself, rather than
32
+ # loaded as a gem or from vendor/. This is only likely in situations where trusty is customised so heavily
33
33
  # that extensions are not sufficient.
34
34
  #
35
35
  def deployed_as_app?
@@ -43,7 +43,7 @@ module TrustyCms
43
43
  super
44
44
  end
45
45
 
46
- # Overrides the Rails initializer to load metal from TRUSTY_CMS_ROOT and from radiant extensions.
46
+ # Overrides the Rails initializer to load metal from TRUSTY_CMS_ROOT and from trusty extensions.
47
47
  #
48
48
  def initialize_metal
49
49
  Rails::Rack::Metal.requested_metals = configuration.metals
@@ -57,11 +57,11 @@ module TrustyCms
57
57
  Rails::Rack::Metal, :if => Rails::Rack::Metal.metals.any?)
58
58
  end
59
59
 
60
- # Extends the Rails initializer to add locale paths from TRUSTY_CMS_ROOT and from radiant extensions.
60
+ # Extends the Rails initializer to add locale paths from TRUSTY_CMS_ROOT and from trusty extensions.
61
61
  #
62
62
  def initialize_i18n
63
- radiant_locale_paths = Dir[File.join(TRUSTY_CMS_ROOT, 'config', 'locales', '*.{rb,yml}')]
64
- configuration.i18n.load_path = radiant_locale_paths + extension_loader.paths(:locale)
63
+ trusty_locale_paths = Dir[File.join(TRUSTY_CMS_ROOT, 'config', 'locales', '*.{rb,yml}')]
64
+ configuration.i18n.load_path = trusty_locale_paths + extension_loader.paths(:locale)
65
65
  super
66
66
  end
67
67
 
@@ -81,40 +81,40 @@ module TrustyCms
81
81
  @bundler_loaded ||= Bundler.require :default, Rails.env
82
82
  end
83
83
 
84
- # Extends the Rails initializer also to load radiant extensions (which have been excluded from the list of plugins).
84
+ # Extends the Rails initializer also to load trusty extensions (which have been excluded from the list of plugins).
85
85
  #
86
86
  def load_plugins
87
87
  super
88
88
  extension_loader.load_extensions
89
89
  end
90
90
 
91
- # Extends the Rails initializer to run initializers from radiant and from extensions. The load order will be:
91
+ # Extends the Rails initializer to run initializers from trusty and from extensions. The load order will be:
92
92
  # 1. TRUSTY_CMS_ROOT/config/intializers/*.rb
93
93
  # 2. Rails.root/config/intializers/*.rb
94
94
  # 3. config/initializers/*.rb found in extensions, in extension load order.
95
95
  #
96
- # In the now rare case where radiant is deployed as an ordinary rails application, step 1 is skipped
96
+ # In the now rare case where trusty is deployed as an ordinary rails application, step 1 is skipped
97
97
  # because it is equivalent to step 2.
98
98
  #
99
99
  def load_application_initializers
100
- load_radiant_initializers unless deployed_as_app?
100
+ load_trusty_initializers unless deployed_as_app?
101
101
  super
102
102
  extension_loader.load_extension_initalizers
103
103
  end
104
104
 
105
105
  # Loads initializers found in TRUSTY_CMS_ROOT/config/initializers.
106
106
  #
107
- def load_radiant_initializers
107
+ def load_trusty_initializers
108
108
  Dir["#{TRUSTY_CMS_ROOT}/config/initializers/**/*.rb"].sort.each do |initializer|
109
109
  load(initializer)
110
110
  end
111
111
  end
112
112
 
113
113
  # Extends the Rails initializer with some extra steps at the end of initialization:
114
- # * hook up radiant view paths in controllers and notifiers
114
+ # * hook up trusty view paths in controllers and notifiers
115
115
  # * initialize the navigation tabs in the admin interface
116
116
  # * initialize the extendable partial sets that make up the admin interface
117
- # * call +activate+ on all radiant extensions
117
+ # * call +activate+ on all trusty extensions
118
118
  # * add extension controller paths
119
119
  # * mark extension app paths for eager loading
120
120
  #