kitsune 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -2,7 +2,7 @@ require 'rake'
2
2
 
3
3
  gem_spec = Gem::Specification.new do |gem_spec|
4
4
  gem_spec.name = "kitsune"
5
- gem_spec.version = "0.1.1"
5
+ gem_spec.version = "0.1.2"
6
6
  gem_spec.summary = "Integrated Rails Content Management System."
7
7
  gem_spec.email = "matt@toastyapps.com"
8
8
  gem_spec.homepage = "http://github.com/toastyapps/kitsune"
@@ -22,6 +22,7 @@ class KitsuneGenerator < Rails::Generator::Base
22
22
  end
23
23
 
24
24
  unless !!@dont_include_users
25
+ m.sleep 1 unless !!@dont_include_pages
25
26
  m.migration_template "migrations/create_kitsune_users.rb", 'db/migrate', :migration_file_name => "kitsune_create_kitsune_users"
26
27
  end
27
28
 
data/lib/kitsune.rb CHANGED
@@ -8,7 +8,7 @@ module Kitsune
8
8
  autoload :Page, 'kitsune/page'
9
9
  class << self
10
10
  def version
11
- '0.1.1'
11
+ '0.1.2'
12
12
  end
13
13
 
14
14
  def authenticate
data/lib/kitsune/page.rb CHANGED
@@ -9,10 +9,14 @@ module Kitsune
9
9
 
10
10
  before_save :update_url
11
11
  belongs_to :page, :foreign_key => "parent_id"
12
- belongs_to :parent
12
+ belongs_to :parent, :class_name => 'Page'
13
13
 
14
14
  def update_url
15
- write_attribute :url, title
15
+ unless url.present?
16
+ write_attribute :url, CGI.escape(title.downcase.gsub(/\s+/, '-'))
17
+ else
18
+ write_attribute :url, CGI.escape(url)
19
+ end
16
20
  end
17
21
  end
18
22
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kitsune
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matthew Mongeau <matt@toastyapps.com>