jeffrafter-spreadhead 0.6.1 → 0.6.2
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/TUTORIAL.textile +5 -3
- data/VERSION +1 -1
- data/lib/spreadhead/render.rb +3 -1
- data/lib/tasks/spreadhead_tasks.rake +6 -2
- metadata +2 -2
data/TUTORIAL.textile
CHANGED
@@ -13,7 +13,9 @@ By default this should install the RedCloth gem, the BlueCloth gem, and the rsl-
|
|
13
13
|
Rails::Initializer.run do |config|
|
14
14
|
# Specify gems that this application depends on and have them installed with
|
15
15
|
# rake gems:install
|
16
|
-
config.gem "spreadhead",
|
16
|
+
config.gem "jeffrafter-spreadhead",
|
17
|
+
:lib => 'spreadhead',
|
18
|
+
:source => 'http://gems.github.com'
|
17
19
|
|
18
20
|
# Skip frameworks you're not going to use. To use Rails without a database,
|
19
21
|
# you must remove the Active Record framework.
|
@@ -48,7 +50,7 @@ To enable the application you need to modify initializer, where you can control
|
|
48
50
|
module Spreadhead
|
49
51
|
module PagesAuth
|
50
52
|
def self.filter(controller)
|
51
|
-
controller.
|
53
|
+
controller.send(:redirect_to, '/') unless controller.send(:signed_in?)
|
52
54
|
end
|
53
55
|
end
|
54
56
|
end
|
@@ -62,7 +64,7 @@ If you give everyone access, this is probably still a bad idea and you will want
|
|
62
64
|
module Spreadhead
|
63
65
|
module PagesAuth
|
64
66
|
def self.filter(controller)
|
65
|
-
controller.
|
67
|
+
controller.send(:redirect_to, '/') unless controller.send(:admin?)
|
66
68
|
end
|
67
69
|
end
|
68
70
|
end
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.6.
|
1
|
+
0.6.2
|
data/lib/spreadhead/render.rb
CHANGED
@@ -2,10 +2,14 @@ require 'active_record/fixtures'
|
|
2
2
|
|
3
3
|
namespace :spreadhead do
|
4
4
|
desc "Export a set of fixtures from the current database pages"
|
5
|
-
task :export => [:environment] do
|
5
|
+
task :export => [:environment] do |tasks, args|
|
6
6
|
data = File.join(RAILS_ROOT, 'db', 'data')
|
7
7
|
Dir.mkdir(data) unless File.exists?(data)
|
8
|
-
|
8
|
+
if args.revisions
|
9
|
+
Page.to_fixtures(data);
|
10
|
+
else
|
11
|
+
Page.current.to_fixtures(data)
|
12
|
+
end
|
9
13
|
end
|
10
14
|
|
11
15
|
desc "Import a set of page fixtures into the current database (overwrites existing pages)"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jeffrafter-spreadhead
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jeff Rafter
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-
|
12
|
+
date: 2009-09-07 00:00:00 -07:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|