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.
- data/lib/caboose/version.rb +1 -1
- data/lib/tasks/caboose.rake +15 -1
- metadata +1 -1
data/lib/caboose/version.rb
CHANGED
data/lib/tasks/caboose.rake
CHANGED
|
@@ -45,7 +45,21 @@ namespace :caboose do
|
|
|
45
45
|
|
|
46
46
|
def init_config
|
|
47
47
|
puts "Adding the caboose initializer file..."
|
|
48
|
-
|
|
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
|