deface 0.5.2 → 0.5.3

Sign up to get free protection for your applications and to get access to all the features.
data/README.markdown CHANGED
@@ -7,13 +7,13 @@ It allows you to easily target html & erb elements as the hooks for customizatio
7
7
 
8
8
  Demo & Testing
9
9
  ---------------
10
- You can play with Deface and see it's parsing in action at [deface.heroku.com](http://deface.heroku.com)
10
+ You can play with Deface and see its parsing in action at [deface.heroku.com](http://deface.heroku.com)
11
11
 
12
12
 
13
13
  Deface::Override
14
14
  =======
15
15
 
16
- A new instance of the Deface::Override class is initialized for each customization you wish to define. When initializing a new override you must supply only one Target, Action & Source parameter and any number of Optional parameters. Note, the source parameter is not required when the "remove" action is specified.
16
+ A new instance of the Deface::Override class is initialized for each customization you wish to define. When initializing a new override you must supply only one Target, Action & Source parameter and any number of Optional parameters. Note: the source parameter is not required when the "remove" action is specified.
17
17
 
18
18
  Target
19
19
  ------
@@ -117,7 +117,7 @@ Deface uses the amazing Nokogiri library (and in turn libxml) for parsing HTML /
117
117
 
118
118
  1. Ensure that your layout views include doctype, html, head and body tags in a single file, as Nokogiri will create such elements if it detects any of these tags have been incorrectly nested.
119
119
 
120
- 2. Parsing will fail and result in invalid output if ERB blocks are responsible for closing a HTML tag what was opened normally, i.e. don't do this:
120
+ 2. Parsing will fail and result in invalid output if ERB blocks are responsible for closing an HTML tag that was opened normally, i.e. don't do this:
121
121
 
122
122
 
123
123
  <div <%= ">" %>
data/deface.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{deface}
8
- s.version = "0.5.2"
8
+ s.version = "0.5.3"
9
9
 
10
10
  s.authors = ["Brian Quinn"]
11
11
  s.description = %q{Deface is a library that allows you to customize ERB views in a Rails application without editing the underlying view.}
@@ -7,3 +7,5 @@ ActionView::Template.class_eval do
7
7
  rails_initialize(source, identifier, handler, details)
8
8
  end
9
9
  end
10
+ #fix for Rails 3.1 not setting virutal_path anymore (BOO!)
11
+ ActionView::Resolver::Path.class_eval { alias_method :virtual, :to_s }
@@ -191,9 +191,10 @@ module Deface
191
191
  def self.find(details)
192
192
  return [] if @@all.empty? || details.empty?
193
193
 
194
- result = []
195
-
196
194
  virtual_path = details[:virtual_path]
195
+ return [] if virtual_path.nil?
196
+
197
+ result = []
197
198
  result << @@all[virtual_path.to_sym].try(:values)
198
199
 
199
200
  result.flatten.compact
data/tasks/deface.rake CHANGED
@@ -1,6 +1,6 @@
1
1
  namespace :deface do
2
2
  desc 'Gets source of html element from template.'
3
- task :get_source, :template_path, :selector, :needs => :environment do |t, args|
3
+ task :get_source, [:template_path, :selector] => [:environment] do |t, args|
4
4
  include Deface::TemplateHelper
5
5
 
6
6
  begin
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: deface
3
3
  version: !ruby/object:Gem::Version
4
- hash: 15
4
+ hash: 13
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 5
9
- - 2
10
- version: 0.5.2
9
+ - 3
10
+ version: 0.5.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Brian Quinn
@@ -15,8 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-06-03 00:00:00 +01:00
19
- default_executable:
18
+ date: 2011-06-13 00:00:00 Z
20
19
  dependencies:
21
20
  - !ruby/object:Gem::Dependency
22
21
  name: nokogiri
@@ -80,7 +79,6 @@ files:
80
79
  - spec/deface/template_spec.rb
81
80
  - spec/spec_helper.rb
82
81
  - tasks/deface.rake
83
- has_rdoc: true
84
82
  homepage: http://github.com/railsdog/deface
85
83
  licenses: []
86
84
 
@@ -110,7 +108,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
110
108
  requirements: []
111
109
 
112
110
  rubyforge_project:
113
- rubygems_version: 1.5.0
111
+ rubygems_version: 1.8.5
114
112
  signing_key:
115
113
  specification_version: 3
116
114
  summary: Deface is a library that allows you to customize ERB views in Rails