rich_cms 2.0.1 → 2.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -1,5 +1,9 @@
1
1
  = Rich-CMS CHANGELOG
2
2
 
3
+ == Version 2.0.2 (September 9, 2010)
4
+
5
+ * Corrected the Rich::Cms::Engine.to_content_tag implementation when using combined keys
6
+
3
7
  == Version 2.0.1 (September 3, 2010)
4
8
 
5
9
  * Tweaked determination of whether to show a text input or textarea when editing content
@@ -9,7 +13,16 @@
9
13
 
10
14
  == Version 2.0.0 (September 3, 2010)
11
15
 
12
- * Updated the look and feel
16
+ * Complete new look and feel (using CSS3, no images and IE6+ compatible, Safari, Chrome and Firefox)
17
+ * Using RaccoonTip (yay!)
18
+ * Including jQuery dependencies the correct way
19
+ * Moved app, assets and config to lib directory
20
+ * Added lib/app/controllers to the load path
21
+ * Added lib/app/views to view paths
22
+ * Using Jzip::Engine instead of Jzip::Plugin
23
+ * Refactored ActionController::Base a bit
24
+ * Deriving the CMS content (to edit) the correct way within Rich.Cms.Editor
25
+ * Improved the Rich::Cms::Engine.to_content_tag implementation
13
26
 
14
27
  == Version 1.0.0 (August 15, 2010)
15
28
 
data/README.textile CHANGED
@@ -85,11 +85,21 @@ Rich-CMS requires a rendered DOM element provided with meta data of the content
85
85
  => "<div class='cms_content' data-key='test_content' data-value='Hello world!'>Hello world!</div>"
86
86
  </pre>
87
87
 
88
+ When using a combined key for content identification, just call it as follows:
89
+
90
+ <pre>
91
+ >> Rich::Cms::Engine.to_content_tag(".cms_content", {:key => key, :locale => I18n.locale})
92
+ => "<div class='cms_content' data-key='test_content' data-locale='nl' data-value='Hallo wereld!'>Hallo wereld!</div>"
93
+ </pre>
94
+
95
+ *Note*: In this case, the content was registered with @Rich::Cms::Engine.register(".cms_content", {:class_name => "Cms::StaticContent", :key => [:key, :locale]})@
96
+
88
97
  We have also provided you a helper method to render Rich-CMS content tags:
89
98
 
90
99
  <pre>
91
100
  ...
92
101
  <%= rich_cms_tag ".cms_content", "test_content" %>
102
+ <%= rich_cms_tag ".cms_content", {:key => "test_content", :locale => I18n.locale} %>
93
103
  ...
94
104
  </pre>
95
105
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.0.1
1
+ 2.0.2
@@ -10,8 +10,13 @@ module Rich
10
10
  end
11
11
 
12
12
  def fetch(ref, as_content_item = true)
13
- reference = ref.is_a?(Hash) || (identifiers.size != 1) ? ref : {identifiers.first => ref}
14
-
13
+ reference = if ref.is_a?(Hash)
14
+ ref
15
+ elsif identifiers.size == 1
16
+ {identifiers.first => ref}
17
+ end
18
+ reference.stringify_keys! if reference.is_a?(Hash)
19
+
15
20
  unless valid_reference?(reference)
16
21
  raise ArgumentError, "Invalid reference #{reference.inspect} (#{reference.values_at(*identifiers).inspect}) passed for #{identifiers.inspect}"
17
22
  end
@@ -53,7 +58,7 @@ module Rich
53
58
  private
54
59
 
55
60
  def valid_reference?(reference)
56
- reference.is_a?(Hash) && (identifiers - reference.stringify_keys.keys).empty? && reference.values_at(*identifiers).compact!.nil?
61
+ reference.is_a?(Hash) && (identifiers - reference.keys).empty? && reference.values_at(*identifiers).compact!.nil?
57
62
  end
58
63
 
59
64
  end
@@ -44,10 +44,7 @@ module Rich
44
44
  end
45
45
  end
46
46
 
47
- def to_content_tag(*args)
48
- selector = args.shift
49
- options = args.extract_options!
50
- identifiers = args
47
+ def to_content_tag(selector, identifiers, options = {})
51
48
  editable_content[selector].fetch(identifiers).to_tag options
52
49
  end
53
50
 
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.0.1"
8
+ s.version = "2.0.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-09-03}
12
+ s.date = %q{2010-09-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: 13
4
+ hash: 11
5
5
  prerelease: false
6
6
  segments:
7
7
  - 2
8
8
  - 0
9
- - 1
10
- version: 2.0.1
9
+ - 2
10
+ version: 2.0.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-09-03 00:00:00 +02:00
18
+ date: 2010-09-09 00:00:00 +02:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency