rich_cms 2.1.1 → 2.1.2

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -1,5 +1,10 @@
1
1
  = Rich-CMS CHANGELOG
2
2
 
3
+ == Version 2.1.2 (November 9, 2010)
4
+
5
+ * Defining the 'to_key' method in the correct file (which fixes Authlogic in Rails 3)
6
+ * Fixed the Rails generators once and for all
7
+
3
8
  == Version 2.1.1 (November 8, 2010)
4
9
 
5
10
  * Fixed the Rails 3 generators which conflicted with Rich-I18n
data/README.textile CHANGED
@@ -20,7 +20,7 @@ Add Rich-CMS in @Gemfile@ as a gem dependency:
20
20
  Run the following in your console to install with Bundler:
21
21
 
22
22
  <pre>
23
- bundle install
23
+ sudo bundle install
24
24
  </pre>
25
25
 
26
26
  h3. Using Rich-CMS as gem in Rails 2
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.1.1
1
+ 2.1.2
@@ -16,6 +16,7 @@ module Rich
16
16
  filename = "config/initializers/enrichments.rb"
17
17
  line = "\nRich::Cms::Engine.authenticate(:authlogic, {:class_name => \"#{model_class_name}\", :identifier => :email})"
18
18
 
19
+ create_file filename unless File.exists?(filename)
19
20
  return if File.open(filename).readlines.collect(&:strip).include? line.strip
20
21
 
21
22
  File.open(filename, "a+") do |file|
@@ -5,8 +5,4 @@ class <%= model_class_name %> < ActiveRecord::Base
5
5
  c.crypted_password_field = :crypted_password
6
6
  end
7
7
 
8
- def to_key
9
- new_record? ? nil : [self.send self.class.primary_key]
10
- end
11
-
12
8
  end
@@ -4,4 +4,8 @@ class <%= model_class_name %>Session < Authlogic::Session::Base
4
4
  generalize_credentials_error_messages true
5
5
  params_key "user_credentials"
6
6
 
7
+ def to_key
8
+ new_record? ? nil : [self.send self.class.primary_key]
9
+ end
10
+
7
11
  end
@@ -16,6 +16,7 @@ module Rich
16
16
  filename = "config/initializers/enrichments.rb"
17
17
  line = "\nRich::Cms::Engine.register(\".#{model_file_name}\", {:class_name => \"#{model_class_name}\"})"
18
18
 
19
+ create_file filename unless File.exists?(filename)
19
20
  return if File.open(filename).readlines.collect(&:strip).include? line.strip
20
21
 
21
22
  File.open(filename, "a+") do |file|
@@ -15,9 +15,12 @@ class RichAuthlogicUserGenerator < Rails::Generator::Base
15
15
  end
16
16
 
17
17
  def after_generate
18
- File.open(destination_path("config/initializers/enrichments.rb"), "a+") do |file|
19
- file << "\nRich::Cms::Engine.authenticate(:authlogic, {:class_name => \"#{model_class_name}\", :identifier => :email})"
20
- end
18
+ filename = destination_path("config/initializers/enrichments.rb")
19
+ line = "\nRich::Cms::Engine.authenticate(:authlogic, {:class_name => \"#{model_class_name}\", :identifier => :email})"
20
+
21
+ File.open(filename, "a+") do |file|
22
+ file << line
23
+ end unless File.open(filename).readlines.collect(&:strip).include? line.strip
21
24
 
22
25
  system "rake db:migrate" if options[:migrate]
23
26
  end
@@ -14,9 +14,12 @@ class RichCmsContentGenerator < Rails::Generator::Base
14
14
  end
15
15
 
16
16
  def after_generate
17
- File.open(destination_path("config/initializers/enrichments.rb"), "a+") do |file|
18
- file << "\nRich::Cms::Engine.register(\".#{model_file_name}\", {:class_name => \"#{model_class_name}\"})"
19
- end
17
+ filename = destination_path("config/initializers/enrichments.rb")
18
+ line = "\nRich::Cms::Engine.register(\".#{model_file_name}\", {:class_name => \"#{model_class_name}\"})"
19
+
20
+ File.open(filename, "a+") do |file|
21
+ file << line
22
+ end unless File.open(filename).readlines.collect(&:strip).include? line.strip
20
23
 
21
24
  system "rake db:migrate" if options[:migrate]
22
25
  end
data/rich_cms.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{rich_cms}
8
- s.version = "2.1.1"
8
+ s.version = "2.1.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Paul Engel"]
12
- s.date = %q{2010-11-08}
12
+ s.date = %q{2010-11-09}
13
13
  s.description = %q{Rich-CMS is a module of E9s (http://github.com/archan937/e9s) which provides a frontend for your CMS content. You can use this gem to manage CMS content or translations (in an internationalized application). The installation and setup process is very easily done. You will have to register content at the Rich-CMS engine and also you will have to specify the authentication mechanism. Both are one-liners.}
14
14
  s.email = %q{paul.engel@holder.nl}
15
15
  s.extra_rdoc_files = [
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rich_cms
3
3
  version: !ruby/object:Gem::Version
4
- hash: 9
4
+ hash: 15
5
5
  prerelease: false
6
6
  segments:
7
7
  - 2
8
8
  - 1
9
- - 1
10
- version: 2.1.1
9
+ - 2
10
+ version: 2.1.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Paul Engel
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-11-08 00:00:00 +01:00
18
+ date: 2010-11-09 00:00:00 +01:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency