caboose-cms 0.1.5 → 0.1.6

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.
@@ -1,3 +1,3 @@
1
1
  module Caboose
2
- VERSION = "0.1.5"
2
+ VERSION = "0.1.6"
3
3
  end
@@ -45,7 +45,21 @@ namespace :caboose do
45
45
 
46
46
  def init_config
47
47
  puts "Adding the caboose initializer file..."
48
- init_file('config/initializers/caboose.rb')
48
+
49
+ Caboose::salt = Digest::SHA1.hexdigest(DateTime.now.to_s)
50
+
51
+ str = ""
52
+ str << "# Salt to ensure passwords are encrypted securely\n"
53
+ str << "Caboose::salt = '#{Caboose::salt}'\n\n""
54
+ str << "# Where page asset files will be uploaded\n"
55
+ str << "Caboose::assets_path = Rails.root.join('app', 'assets', 'caboose')\n\n""
56
+ str << "# Register any caboose plugins\n"
57
+ str << "#Caboose::plugins + ['MyCaboosePlugin']\n\n""
58
+
59
+ filename = Rails.root.join('config','initializers','caboose.rb')
60
+ if (!File.exists?(filename))
61
+ File.open(filename, 'w') {|file| file.write(str) }
62
+ end
49
63
  end
50
64
 
51
65
  def init_routes
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: caboose-cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: