soapbox 0.1.3 → 0.1.7

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -5,7 +5,7 @@ source "http://rubygems.org"
5
5
  gem "rails", "~>3.0.0"
6
6
  gem "devise", "1.1.2"
7
7
  gem 'formtastic', "1.2.3"
8
- gem 'polypaperclip', "0.1.8"
8
+ gem 'polypaperclip', "0.1.13"
9
9
  gem 'paper_trail', '~> 2'
10
10
  gem "will_paginate", "2.3.15"
11
11
  gem 'acts-as-taggable-on'
data/Gemfile.lock CHANGED
@@ -81,10 +81,10 @@ GEM
81
81
  cocaine (>= 0.0.2)
82
82
  mime-types
83
83
  polyglot (0.3.2)
84
- polypaperclip (0.1.8)
84
+ polypaperclip (0.1.13)
85
85
  paperclip (~> 2.3)
86
86
  rails (~> 3.0.0)
87
- rake (= 0.8.7)
87
+ rake (~> 0.8.7)
88
88
  rack (1.2.3)
89
89
  rack-mount (0.6.14)
90
90
  rack (>= 1.0.0)
@@ -135,7 +135,7 @@ DEPENDENCIES
135
135
  inherited_resources (= 1.2.2)
136
136
  jeweler (~> 1.6.0)
137
137
  paper_trail (~> 2)
138
- polypaperclip (= 0.1.8)
138
+ polypaperclip (= 0.1.13)
139
139
  rails (~> 3.0.0)
140
140
  rcov
141
141
  shoulda
data/README.rdoc CHANGED
@@ -1,6 +1,6 @@
1
1
  = soapbox
2
2
 
3
- Soapbox is a rails 3 cms. It manages pages, users, permissions, redirects, galleries, attachments, menus, and more out of the box. It's easy to extend to manage all kinds of other content and attach files and images to them and manage permissions over them.
3
+ Soapbox is a Rails 3 CMS by {Killit Creative}[link:http://killitcreative.com]. It manages pages, users, permissions, redirects, galleries, attachments, menus, and more out of the box. It's easy to extend to manage all kinds of other content and attach files and images to them and manage permissions over them.
4
4
 
5
5
  == Contributing to soapbox
6
6
 
@@ -17,6 +17,37 @@ Soapbox is a rails 3 cms. It manages pages, users, permissions, redirects, galle
17
17
  Copyright (c) 2011 Gabe Coyne. See LICENSE.txt for
18
18
  further details.
19
19
 
20
+ == Install
21
+
22
+ Add soapbox to your Gemfile
23
+
24
+ gem 'soapbox'
25
+
26
+ Run 'bundle install'
27
+
28
+ Generate soapbox tables
29
+
30
+ rails g soapbox_migration
31
+ rake db:migrate
32
+
33
+ Create a super user to admin the site
34
+
35
+ rails c
36
+ User.create(:email => "your@email.address", :password => "xxxxxx", :super_user => true)
37
+
38
+ Fire it up
39
+
40
+ rails s
41
+
42
+ You have everything you need out of the gate for a super basic site
43
+
44
+ Then start customizing
45
+
46
+ - Start adding page templates by creating new layout files in app/views/pages/templates
47
+ - Start adding pages by login into /admin
48
+ - Add your google analytics credentials to /admin/analytics
49
+
50
+
20
51
  == Scaffold Generator
21
52
 
22
53
  rails g soapbox_scaffold plugin_name field:type field:type
@@ -51,6 +82,7 @@ rails g soapbox_scaffold plugin_name field:type field:type
51
82
 
52
83
  == Todos
53
84
 
85
+ - rake soapbox_override app/views/admin/pages/form.html.erb - pull file out into app to customize
54
86
  - shortcodes - [partial:locals,args] - render "shortcodes/partial", :params => args.split(",")
55
87
  - add default permission stuff for shared list and admin_controller - create, edit, delete, admin, etc
56
88
  - analytics - PageRankr - http://rubydoc.info/gems/PageRankr/2.0.1/frames
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.3
1
+ 0.1.7
@@ -106,6 +106,6 @@ protected
106
106
  @resources.paginate(:page => params[:page], :per_page => 20)
107
107
  end
108
108
  def get_permissions
109
- @permissions = YAML::load(File.open("#{RAILS_ROOT}/config/permissions.yml"))
109
+ @permissions = YAML::load(File.open("#{::Rails.root.to_s}/config/permissions.yml"))
110
110
  end
111
111
  end
@@ -7,7 +7,7 @@ module PluginHelper
7
7
  end
8
8
  html = ""
9
9
  html << "<ul id='#{ id || "" }'>"
10
- permissions = YAML::load(File.open("#{RAILS_ROOT}/config/permissions.yml"))
10
+ permissions = YAML::load(File.open("#{::Rails.root.to_s}/config/permissions.yml"))
11
11
  plugins.each do |plugin|
12
12
  next if permissions[plugin] && !current_user.can?(["admin","create"],plugin)
13
13
  html << "<li #{ plugin.children.empty? ? "" : "class='has_sub'" }>"
@@ -7,8 +7,8 @@
7
7
  <% #debugger %>
8
8
  <% if params[:type] &&
9
9
  (
10
- FileTest.exist?(File.join(RAILS_ROOT, 'app', 'views', params[:controller],'_'+params[:type]+'.html.erb')) ||
11
- FileTest.exist?(File.join(RAILS_ROOT, 'vendor', 'plugins', 'soapbox', 'app', 'views', params[:controller],'_'+params[:type]+'.html.erb'))
10
+ FileTest.exist?(File.join(::Rails.root.to_s, 'app', 'views', params[:controller],'_'+params[:type]+'.html.erb')) ||
11
+ FileTest.exist?(File.join(::Rails.root.to_s, 'vendor', 'plugins', 'soapbox', 'app', 'views', params[:controller],'_'+params[:type]+'.html.erb'))
12
12
  ) %>
13
13
  <%= render "admin/attachments/#{params[:type]}", :collection => collection %>
14
14
  <% else %>
data/config/routes.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  Rails.application.routes.draw do |map|
2
-
2
+
3
3
  devise_for :members
4
4
  devise_for :users, :controllers => { :sessions => "devise/sessions" }
5
5
 
@@ -17,6 +17,10 @@ class SoapboxMigrationGenerator < Rails::Generators::Base
17
17
  end
18
18
 
19
19
  def create_migration_file
20
- migration_template 'migration.rb', 'db/migrate/create_soapbox_tables.rb'
20
+ migration_template 'migration.rb', 'db/migrate/create_soapbox_tables.rb'
21
+ puts "make sure to run - rake db:migrate"
22
+ puts "you'll also want to add a super admin so you can login to /admin"
23
+ puts "rails c"
24
+ puts 'User.create(:email => "your@email.address", :password => "xxxxxx", :super_user => true)'
21
25
  end
22
26
  end
@@ -232,6 +232,21 @@ class CreateSoapboxTables < ActiveRecord::Migration
232
232
 
233
233
  add_index "versions", ["item_type", "item_id"], :name => "index_versions_on_item_type_and_item_id"
234
234
 
235
+ Plugin.create(:title => "Pages", :route => "admin_pages_path", :active => true)
236
+ Plugin.create(:title => "Users", :route => "admin_pages_path", :active => true)
237
+ Plugin.create(:title => "Files", :route => "admin_pages_path", :active => true)
238
+
239
+ Plugin.create(:title => "Menus", :route => "admin_menus_path", :active => true, :parent => Page.find_by_title("Page"))
240
+ Plugin.create(:title => "Redirects", :route => "admin_redirects_path", :active => true, :parent => Page.find_by_title("Page"))
241
+ Plugin.create(:title => "Organize", :route => "tree_admin_pages_path", :active => true, :parent => Page.find_by_title("Page"))
242
+
243
+ Plugin.create(:title => "Groups", :route => "admin_groups_path", :active => true, :parent => Page.find_by_title("Users"))
244
+ Plugin.create(:title => "Members", :route => "admin_members_path", :active => true, :parent => Page.find_by_title("Users"))
245
+
246
+ Setting.create({:name => "site_name", :value => "Soapbox Site"})
247
+ Setting.create({:name => "admin_email", :value => "info@mydomain.com"})
248
+ Setting.create({:name => "copyright", :value => "Soapbox CMS"})
249
+
235
250
  end
236
251
 
237
252
  def self.down
@@ -22,8 +22,8 @@ module Paperclip
22
22
  :preserve_files => false
23
23
  }
24
24
 
25
- if defined?(RAILS_ROOT) and File.exists?("#{RAILS_ROOT}/config/paperclip.yml")
26
- @default_options.merge!(YAML.load_file("#{RAILS_ROOT}/config/paperclip.yml")[RAILS_ENV].symbolize_keys) rescue nil
25
+ if defined?(::Rails.root.to_s) and File.exists?("#{::Rails.root.to_s}/config/paperclip.yml")
26
+ @default_options.merge!(YAML.load_file("#{::Rails.root.to_s}/config/paperclip.yml")[RAILS_ENV].symbolize_keys) rescue nil
27
27
  end
28
28
 
29
29
  end
data/soapbox.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{soapbox}
8
- s.version = "0.1.3"
8
+ s.version = "0.1.7"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = [%q{Gabe Coyne}, %q{Killit Creative}]
12
- s.date = %q{2011-07-29}
12
+ s.date = %q{2011-08-01}
13
13
  s.description = %q{manage pages, users, permissions, settings, analytics, files, users, and extend}
14
14
  s.email = %q{gabe@killitcreative.com}
15
15
  s.extra_rdoc_files = [
@@ -554,7 +554,7 @@ Gem::Specification.new do |s|
554
554
  s.add_runtime_dependency(%q<rails>, ["~> 3.0.0"])
555
555
  s.add_runtime_dependency(%q<devise>, ["= 1.1.2"])
556
556
  s.add_runtime_dependency(%q<formtastic>, ["= 1.2.3"])
557
- s.add_runtime_dependency(%q<polypaperclip>, ["= 0.1.8"])
557
+ s.add_runtime_dependency(%q<polypaperclip>, ["= 0.1.13"])
558
558
  s.add_runtime_dependency(%q<paper_trail>, ["~> 2"])
559
559
  s.add_runtime_dependency(%q<will_paginate>, ["= 2.3.15"])
560
560
  s.add_runtime_dependency(%q<acts-as-taggable-on>, [">= 0"])
@@ -574,7 +574,7 @@ Gem::Specification.new do |s|
574
574
  s.add_dependency(%q<rails>, ["~> 3.0.0"])
575
575
  s.add_dependency(%q<devise>, ["= 1.1.2"])
576
576
  s.add_dependency(%q<formtastic>, ["= 1.2.3"])
577
- s.add_dependency(%q<polypaperclip>, ["= 0.1.8"])
577
+ s.add_dependency(%q<polypaperclip>, ["= 0.1.13"])
578
578
  s.add_dependency(%q<paper_trail>, ["~> 2"])
579
579
  s.add_dependency(%q<will_paginate>, ["= 2.3.15"])
580
580
  s.add_dependency(%q<acts-as-taggable-on>, [">= 0"])
@@ -595,7 +595,7 @@ Gem::Specification.new do |s|
595
595
  s.add_dependency(%q<rails>, ["~> 3.0.0"])
596
596
  s.add_dependency(%q<devise>, ["= 1.1.2"])
597
597
  s.add_dependency(%q<formtastic>, ["= 1.2.3"])
598
- s.add_dependency(%q<polypaperclip>, ["= 0.1.8"])
598
+ s.add_dependency(%q<polypaperclip>, ["= 0.1.13"])
599
599
  s.add_dependency(%q<paper_trail>, ["~> 2"])
600
600
  s.add_dependency(%q<will_paginate>, ["= 2.3.15"])
601
601
  s.add_dependency(%q<acts-as-taggable-on>, [">= 0"])
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: soapbox
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
4
+ hash: 21
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 3
10
- version: 0.1.3
9
+ - 7
10
+ version: 0.1.7
11
11
  platform: ruby
12
12
  authors:
13
13
  - Gabe Coyne
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2011-07-29 00:00:00 Z
19
+ date: 2011-08-01 00:00:00 Z
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
22
22
  type: :runtime
@@ -74,12 +74,12 @@ dependencies:
74
74
  requirements:
75
75
  - - "="
76
76
  - !ruby/object:Gem::Version
77
- hash: 11
77
+ hash: 1
78
78
  segments:
79
79
  - 0
80
80
  - 1
81
- - 8
82
- version: 0.1.8
81
+ - 13
82
+ version: 0.1.13
83
83
  prerelease: false
84
84
  version_requirements: *id004
85
85
  - !ruby/object:Gem::Dependency