shakespeare 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -25,7 +25,7 @@ begin
25
25
  require 'jeweler'
26
26
  Jeweler::Tasks.new do |s|
27
27
  s.name = "shakespeare"
28
- s.version = "0.2.0"
28
+ s.version = "0.2.1"
29
29
  s.author = "Paul Campbell"
30
30
  s.email = "paul@rslw.com"
31
31
  s.homepage = "http://www.github.com/paulca/shakespeare"
@@ -1,16 +1,18 @@
1
- module Shakespeare
2
- module Helpers
3
- def self.included(base)
4
- base.send(:helper_method, :page_content) if base.respond_to?(:helper_method)
5
- end
6
-
7
- def page_content
8
- @page_content = Page.find_by_url("#{controller_name}/#{action_name}")
9
- end
10
-
11
- def protect_in_production
12
- return true unless Shakespeare.env == 'production'
13
- render :text => 'Unauthorized' unless Shakespeare::Settings.allow_anonymous
14
- end
15
- end
1
+ module Shakespeare
2
+ module Helpers
3
+ def self.included(base)
4
+ if base.respond_to?(:helper_method)
5
+ base.send(:helper_method, :page_content, :protect_in_production)
6
+ end
7
+ end
8
+
9
+ def page_content
10
+ @page_content = Page.find_by_url("#{controller_name}/#{action_name}")
11
+ end
12
+
13
+ def protect_in_production
14
+ return true unless Shakespeare.env == 'production'
15
+ render :text => 'Unauthorized' unless Shakespeare::Settings.allow_anonymous
16
+ end
17
+ end
16
18
  end
data/shakespeare.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{shakespeare}
8
- s.version = "0.2.0"
8
+ s.version = "0.2.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Paul Campbell"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shakespeare
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Paul Campbell