guilded 1.0.2 → 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
data/History.txt CHANGED
@@ -1,3 +1,8 @@
1
+ = 1.0.3 2009-11-16
2
+
3
+ * The reset_guilded filter is now automatically set up in ActionController.
4
+
5
+
1
6
  = 1.0.2 2009-11-13
2
7
 
3
8
  * Fixed issue with human_attribute_name override not accepting an options hash. Was breaking remarkable gem.
data/README.rdoc CHANGED
@@ -149,8 +149,8 @@ do not have to include it in every template):
149
149
 
150
150
  <%= g_apply_behavior %>
151
151
 
152
- You also must reset the Guilded singleton that manages everything after each rendering. The best way to do this is a before
153
- filter in your application controller:
152
+ A before filter is automatically set up in your application controller to reset the Guilded singleton that manages
153
+ everything after each rendering. The code looks like this:
154
154
 
155
155
  before_filter :reset_guilded
156
156
 
@@ -162,7 +162,9 @@ filter in your application controller:
162
162
  Guilded::Guilder.instance.reset!
163
163
  end
164
164
 
165
- Then install one or more Guilded components and you are on your way!
165
+ You may want to opt out of this before filter in actions that do not use a layout for efficiency.
166
+
167
+ Next, install one or more Guilded components and you are on your way!
166
168
 
167
169
 
168
170
  == LICENSE
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.2
1
+ 1.0.3
data/guilded.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{guilded}
8
- s.version = "1.0.2"
8
+ s.version = "1.0.3"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["C. Jason Harrelson (midas)"]
12
- s.date = %q{2009-11-13}
12
+ s.date = %q{2009-11-16}
13
13
  s.description = %q{Guilded intends to provide a toolset for creating and consuming reusable web components. Currently, this problem domain is filled with JavaScript frameworks. These frameworks are wonderful and work very well. However, they do not degrade gracefully and are not accessible (in most cases). Guilded seeks to provide the same level of "componentization" and ease of use without sacrificing degradability and accessibility. Guilded will achieve these goals by applying each technology at our disposal (HTML, CSS and JavaScript) to do as it was intended.}
14
14
  s.email = %q{jason@lookforwardenterprises.com}
15
15
  s.extra_rdoc_files = [
@@ -29,6 +29,7 @@ Gem::Specification.new do |s|
29
29
  "lib/guilded/rails.rb",
30
30
  "lib/guilded/rails/active_record/human_attribute_hint.rb",
31
31
  "lib/guilded/rails/active_record/human_attribute_override.rb",
32
+ "lib/guilded/rails/controller_actions.rb",
32
33
  "lib/guilded/rails/helpers.rb",
33
34
  "lib/guilded/rails/inactive_record/human_attribute_hint.rb",
34
35
  "lib/guilded/rails/view_helpers.rb",
data/lib/guilded.rb CHANGED
@@ -72,7 +72,8 @@ require 'guilded/rails/inactive_record/human_attribute_hint'
72
72
  # <%= g_load_alerter :skin => 'blueish', :id => 'load_alerter' %>
73
73
  #
74
74
  module Guilded
75
- VERSION = '1.0.1'
75
+ VERSION = '1.0.3'
76
76
  end
77
77
 
78
- ActionView::Base.send( :include, Guilded::Rails::ViewHelpers ) if defined?( ActionView )
78
+ ActionView::Base.send( :include, Guilded::Rails::ViewHelpers ) if defined?( ActionView )
79
+ ActionController::Base.send( :include, Guilded::Rails::ControllerActions ) if defined?( ActionController::Base )
data/lib/guilded/rails.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  module Guilded
2
- module Rails
2
+ module Rails
3
3
  end
4
4
  end
@@ -0,0 +1,20 @@
1
+ module Guilded
2
+ module Rails
3
+ module ControllerActions
4
+
5
+ def self.included( base )
6
+ base.instance_eval do
7
+ before_filter :reset_guilded
8
+ end
9
+ base.send( :include, InstanceMethods )
10
+ end
11
+
12
+ module InstanceMethods
13
+ def reset_guilded
14
+ Guilded::Guilder.instance.reset!
15
+ end
16
+ end
17
+
18
+ end
19
+ end
20
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: guilded
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - C. Jason Harrelson (midas)
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-11-13 00:00:00 -06:00
12
+ date: 2009-11-16 00:00:00 -06:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -54,6 +54,7 @@ files:
54
54
  - lib/guilded/rails.rb
55
55
  - lib/guilded/rails/active_record/human_attribute_hint.rb
56
56
  - lib/guilded/rails/active_record/human_attribute_override.rb
57
+ - lib/guilded/rails/controller_actions.rb
57
58
  - lib/guilded/rails/helpers.rb
58
59
  - lib/guilded/rails/inactive_record/human_attribute_hint.rb
59
60
  - lib/guilded/rails/view_helpers.rb