caboose-cms 0.0.4 → 0.0.5

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.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
@@ -2,3 +2,29 @@
2
2
  # task :caboose do
3
3
  # # Task goes here
4
4
  # end
5
+
6
+ def init_file(filename, str = nil)
7
+ if !File.exists(filename)
8
+ File.open(filename, 'w') do |file|
9
+ file.write str unless str.nil?
10
+ end
11
+ end
12
+ end
13
+
14
+ desc "Initialize a caboose installation"
15
+ task :init do
16
+
17
+ # Add the js and css files
18
+ init_file(Rails.root.join('app','assets','javascripts','caboose_before.js'))
19
+ init_file(Rails.root.join('app','assets','javascripts','caboose_after.js'))
20
+ init_file(Rails.root.join('app','assets','stylesheets','caboose_before.css'))
21
+ init_file(Rails.root.join('app','assets','stylesheets','caboose_after.css'))
22
+
23
+ # Add the caboose initializer file
24
+ str = ""
25
+ str << "Caboose::salt = 'CHANGE THIS TO A UNIQUE STRING!!!'\n\n"
26
+ str << "Caboose::assets_path = Rails.root.join('app', 'assets', 'caboose')\n\n"
27
+ str << "Caboose::plugins = []\n"
28
+ init_file(Rails.root.join('config','initializers','caboose.rb'), str)
29
+
30
+ end
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.0.4
4
+ version: 0.0.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: