deface 1.0.0.rc2 → 1.0.0.rc3

Sign up to get free protection for your applications and to get access to all the features.
@@ -19,6 +19,8 @@ module Deface
19
19
  Deface::Override.new(:virtual_path => "posts/new", :name => "Posts#new", :replace => "h1", :text => "<h1>argh!</h1>")
20
20
  end
21
21
 
22
+ let(:railties_collection_accessor) { Rails.version >= "4.0" ? :_all : :all }
23
+
22
24
  describe ".overrides" do
23
25
 
24
26
  it "should return all overrides" do
@@ -35,7 +37,7 @@ module Deface
35
37
  before do
36
38
  Rails.application.stub :root => Pathname.new(File.join(File.dirname(__FILE__), '..', "assets"))
37
39
  Rails.application.stub :paths => {}
38
- Rails.application.stub_chain :railties, :all => []
40
+ Rails.application.stub_chain :railties, railties_collection_accessor => []
39
41
 
40
42
  Deface::DSL::Loader.should_receive(:register)
41
43
  end
@@ -52,7 +54,7 @@ module Deface
52
54
  end
53
55
 
54
56
  it "should enumerate_and_load nil when railtie has no app/overrides path set" do
55
- Rails.application.stub_chain :railties, :all => [mock('railtie', :root => "/some/path")]
57
+ Rails.application.stub_chain :railties, railties_collection_accessor => [mock('railtie', :root => "/some/path")]
56
58
 
57
59
  Rails.application.config.deface.overrides.should_receive(:enumerate_and_load).with(nil, Rails.application.root)
58
60
  Rails.application.config.deface.overrides.should_receive(:enumerate_and_load).with(nil, "/some/path")
@@ -60,7 +62,7 @@ module Deface
60
62
  end
61
63
 
62
64
  it "should enumerate_and_load path when railtie has app/overrides path set" do
63
- Rails.application.stub_chain :railties, :all => [ mock('railtie', :root => "/some/path", :paths => {"app/overrides" => ["app/some_path"] } )]
65
+ Rails.application.stub_chain :railties, railties_collection_accessor => [ mock('railtie', :root => "/some/path", :paths => {"app/overrides" => ["app/some_path"] } )]
64
66
 
65
67
  Rails.application.config.deface.overrides.should_receive(:enumerate_and_load).with(nil, Rails.application.root)
66
68
  Rails.application.config.deface.overrides.should_receive(:enumerate_and_load).with(["app/some_path"] , "/some/path")
@@ -68,7 +70,7 @@ module Deface
68
70
  end
69
71
 
70
72
  it "should enumerate_and_load railties first, followed by the application iteslf" do
71
- Rails.application.stub_chain :railties, :all => [ mock('railtie', :root => "/some/path", :paths => {"app/overrides" => ["app/some_path"] } )]
73
+ Rails.application.stub_chain :railties, railties_collection_accessor => [ mock('railtie', :root => "/some/path", :paths => {"app/overrides" => ["app/some_path"] } )]
72
74
 
73
75
  Rails.application.config.deface.overrides.should_receive(:enumerate_and_load).with(["app/some_path"] , "/some/path").ordered
74
76
  Rails.application.config.deface.overrides.should_receive(:enumerate_and_load).with(nil, Rails.application.root).ordered
@@ -77,7 +79,7 @@ module Deface
77
79
 
78
80
  it "should ignore railtie with no root" do
79
81
  railtie = mock('railtie')
80
- Rails.application.stub_chain :railties, :all => [railtie]
82
+ Rails.application.stub_chain :railties, railties_collection_accessor => [railtie]
81
83
 
82
84
  railtie.should_receive(:respond_to?).with(:root)
83
85
  railtie.should_not_receive(:respond_to?).with(:paths)
@@ -99,7 +101,7 @@ module Deface
99
101
 
100
102
  it "should keep a reference to which railtie/app defined the override" do
101
103
  Rails.application.stub :root => assets_path, :paths => {"app/overrides" => ["dummy_app"] }
102
- Rails.application.stub_chain :railties, :all => [ engine ]
104
+ Rails.application.stub_chain :railties, railties_collection_accessor => [ engine ]
103
105
 
104
106
  Rails.application.config.deface.overrides.load_all(Rails.application)
105
107
 
@@ -127,6 +127,20 @@ module Deface
127
127
  end
128
128
  end
129
129
 
130
+ describe "with :slim" do
131
+
132
+ before(:each) do
133
+ @override = Deface::Override.new(:virtual_path => "posts/index", :name => "Posts#index", :replace => "h1",
134
+ :slim => %q{strong class="code" id="message"= 'Hello, World!'})
135
+ end
136
+
137
+ it "should return erb converted from slim as source" do
138
+ @override.source.should == "<strong class=\"code\" id=\"message\"><%= ::Temple::Utils.escape_html_safe(('Hello, World!')) %><%\n%></strong>"
139
+
140
+ @override.source_argument.should == :slim
141
+ end
142
+ end
143
+
130
144
 
131
145
  describe "with :partial containing erb" do
132
146
 
@@ -200,7 +214,7 @@ module Deface
200
214
  let(:parsed) { Deface::Parser.convert("<h1>World</h1><% if true %><p>True that!</p><% end %><p>Hello</p>") }
201
215
 
202
216
  before(:each) do
203
- @override = Deface::Override.new(:virtual_path => "posts/index", :name => "Posts#index", :insert_after => "h1",
217
+ @override = Deface::Override.new(:virtual_path => "posts/index", :name => "Posts#index", :insert_after => "h1",
204
218
  :copy => {:start => "code:contains('if true')", :end => "code:contains('end')"})
205
219
 
206
220
  @override.stub(:parsed_document).and_return(parsed)
@@ -259,14 +273,14 @@ module Deface
259
273
  let(:parsed) { Deface::Parser.convert("<h1>World</h1><% if true %><p>True that!</p><% end %><%= hello %>") }
260
274
 
261
275
  before(:each) do
262
- @override = Deface::Override.new(:virtual_path => "posts/index", :name => "Posts#index", :insert_after => "h1",
276
+ @override = Deface::Override.new(:virtual_path => "posts/index", :name => "Posts#index", :insert_after => "h1",
263
277
  :cut => {:start => "code:contains('if true')", :end => "code:contains('end')"})
264
278
 
265
279
  @override.stub(:parsed_document).and_return(parsed)
266
280
  end
267
281
 
268
282
  it "should remove cut element from original parsed source" do
269
- @override.source
283
+ @override.source
270
284
  if RUBY_PLATFORM == 'java'
271
285
  parsed.to_s.gsub(/\n/,'').should == "<h1>World</h1><code erb-loud=\"\"> hello </code>"
272
286
  else
@@ -90,6 +90,12 @@ module Deface
90
90
  Deface::Parser.convert("<p id=\"<% method_name %>\"></p>").to_s.should == "<p data-erb-id=\"&lt;% method_name %&gt;\"></p>"
91
91
  end
92
92
 
93
+ if RUBY_PLATFORM == 'java'
94
+ it "should convert <% ... %> contains double quoted value" do
95
+ Deface::Parser.convert("<p <% method_name \"test\" %>></p>").to_s.should == "<p data-erb-0=\"&lt;% method_name %22test%22 %&gt;\"></p>"
96
+ end
97
+ end
98
+
93
99
  it "should convert <% ... %> inside single quoted attr value" do
94
100
  Deface::Parser.convert("<p id='<% method_name %>'></p>").to_s.should == "<p data-erb-id=\"&lt;% method_name %&gt;\"></p>"
95
101
  end
@@ -143,26 +149,23 @@ module Deface
143
149
  tag.text.should eq " method_name( :key => 'value' ) "
144
150
  end
145
151
 
146
- if "".encoding_aware?
147
- it "should respect valid encoding tag" do
148
- source = %q{<%# encoding: ISO-8859-1 %>Can you say ümlaut?}
149
- Deface::Parser.convert(source)
150
- source.encoding.name.should == 'ISO-8859-1'
151
- end
152
-
153
- it "should force default encoding" do
154
- source = %q{Can you say ümlaut?}
155
- source.force_encoding('ISO-8859-1')
156
- Deface::Parser.convert(source)
157
- source.encoding.should == Encoding.default_external
158
- end
152
+ it "should respect valid encoding tag" do
153
+ source = %q{<%# encoding: ISO-8859-1 %>Can you say ümlaut?}
154
+ Deface::Parser.convert(source)
155
+ source.encoding.name.should == 'ISO-8859-1'
156
+ end
159
157
 
160
- it "should force default encoding" do
161
- source = %q{<%# encoding: US-ASCII %>Can you say ümlaut?}
162
- lambda { Deface::Parser.convert(source) }.should raise_error(ActionView::WrongEncodingError)
163
- end
158
+ it "should force default encoding" do
159
+ source = %q{Can you say ümlaut?}
160
+ source.force_encoding('ISO-8859-1')
161
+ Deface::Parser.convert(source)
162
+ source.encoding.should == Encoding.default_external
164
163
  end
165
164
 
165
+ it "should force default encoding" do
166
+ source = %q{<%# encoding: US-ASCII %>Can you say ümlaut?}
167
+ lambda { Deface::Parser.convert(source) }.should raise_error(ActionView::WrongEncodingError)
168
+ end
166
169
  end
167
170
 
168
171
  describe "#undo_erb_markup" do
@@ -186,6 +189,12 @@ module Deface
186
189
  Deface::Parser.undo_erb_markup!("<a data-erb-href=\"&lt;%= x 'y' + &quot;z&quot; %&gt;\">A Link</a>").should == %(<a href="<%= x 'y' + \"z\" %>">A Link</a>)
187
190
  end
188
191
 
192
+ if RUBY_PLATFORM == 'java'
193
+ it "should revert data-erb-x containing double quoted value" do
194
+ Deface::Parser.undo_erb_markup!("<p data-erb-0=\"&lt;% method_name %22test%22 %&gt;\"></p>").should == %(<p <% method_name \"test\" %>></p>)
195
+ end
196
+ end
197
+
189
198
  it "should unescape contents of code tags" do
190
199
  Deface::Parser.undo_erb_markup!("<% method(:key =&gt; 'value' %>").should == "<% method(:key => 'value' %>"
191
200
  Deface::Parser.undo_erb_markup!("<% method(:key =&gt; 'value'\n %>").should == "<% method(:key => 'value'\n %>"
@@ -17,7 +17,11 @@ module Deface
17
17
  end
18
18
 
19
19
  it "should return converted source for partial containing haml" do
20
- load_template_source("shared/hello", true).should =="<div class='<%= @some %>' id='message'><%= 'Hello, World!' %>\n</div>\n"
20
+ load_template_source("shared/hello", true).should == "<div class='<%= @some %>' id='message'><%= 'Hello, World!' %>\n</div>\n"
21
+ end
22
+
23
+ it "should return converted source for partial containing slim" do
24
+ load_template_source("shared/hi", true).should == "<div class=\"some\" id=\"message\"><%= ::Temple::Utils.escape_html_safe((\"Hi, World!\")) %><%\n%></div>"
21
25
  end
22
26
 
23
27
  it "should return source for template" do
@@ -28,6 +32,11 @@ module Deface
28
32
  load_template_source("shared/pirate", false).gsub(/\s/, '').should == "<divid='content'><divclass='left'><p><%=print_information%></p></div><divclass='right'id='<%=@right%>'><%=render:partial=>\"sidebar\"%></div></div>"
29
33
  end
30
34
 
35
+ it "should return converted source for template containing slim" do
36
+ result = "<divid=\"content\"><%%><divclass=\"left\"><%%><p><%=::Temple::Utils.escape_html_safe((print_information))%><%%></p></div><divclass=\"right\"<%_slim_codeattributes1=@right;case(_slim_codeattributes1);whentrue%>id=\"id\"<%whenfalse,nil;else%>id=\"<%=::Temple::Utils.escape_html_safe((_slim_codeattributes1))%>\"<%end%>><%%><%=::Temple::Utils.escape_html_safe((render:partial=>\"sidebar\"))%><%%></div></div>"
37
+ load_template_source("shared/public", false).gsub(/\s/, '').should == result
38
+ end
39
+
31
40
  it "should return source for namespaced template" do
32
41
  load_template_source("admin/posts/index", false).should == "<h1>Manage Posts</h1>\n"
33
42
  end
@@ -54,7 +63,11 @@ module Deface
54
63
  end
55
64
 
56
65
  it "should return converted and overridden source for partial containing haml" do
57
- load_template_source("shared/hello", true).should =="<div class=\"<%= @some %>\" id=\"message\"><%= 'Goodbye World!' %></div>"
66
+ load_template_source("shared/hello", true).should == "<div class=\"<%= @some %>\" id=\"message\"><%= 'Goodbye World!' %></div>"
67
+ end
68
+
69
+ it "should return converted and overridden source for partial containing slim" do
70
+ load_template_source("shared/hi", true).should == "<div class=\"some\" id=\"message\"><%= ::Temple::Utils.escape_html_safe((\"Hi, World!\")) %><%\n%></div>"
58
71
  end
59
72
 
60
73
  it "should return overridden source for partial excluding overrides" do
@@ -69,6 +82,11 @@ module Deface
69
82
  load_template_source("shared/pirate", false).gsub(/\s/, '').should == "<divid=\"content\"><divclass=\"left\"><h1>Argh!</h1></div><divclass=\"right\"id=\"<%=@right%>\"><%=render:partial=>\"sidebar\"%></div></div>"
70
83
  end
71
84
 
85
+ it "should return converted and overridden source for template containing slim" do
86
+ result = "<divid=\"content\"><%%><divclass=\"left\"><%%><p><%=::Temple::Utils.escape_html_safe((print_information))%><%%></p></div><divclass=\"right\"<%_slim_codeattributes1=@right;case(_slim_codeattributes1);whentrue%>id=\"id\"<%whenfalse,nil;else%>id=\"<%=::Temple::Utils.escape_html_safe((_slim_codeattributes1))%>\"<%end%>><%%><%=::Temple::Utils.escape_html_safe((render:partial=>\"sidebar\"))%><%%></div></div>"
87
+ load_template_source("shared/public", false).gsub(/\s/, '').should == result
88
+ end
89
+
72
90
  it "should return source for namespaced template including overrides" do
73
91
  load_template_source("admin/posts/index", false).should == "<h1>Argh!</h1>"
74
92
  end
@@ -23,4 +23,11 @@ describe Deface::Generators::OverrideGenerator do
23
23
  end
24
24
  end
25
25
 
26
+ context 'using slim' do
27
+ it "should generate a deface override with the correct path" do
28
+ run_generator %w(posts/_post add_headline -e slim)
29
+ assert_file 'app/overrides/posts/_post/add_headline.html.slim.deface', "/\n insert_after 'h1'\nh2 These robots are awesome.\n"
30
+ end
31
+ end
32
+
26
33
  end
data/spec/spec_helper.rb CHANGED
@@ -1,12 +1,14 @@
1
1
  require 'simplecov'
2
2
  SimpleCov.start 'rails'
3
3
  require 'rspec'
4
+ require 'active_support'
4
5
  require 'action_view'
5
6
  require 'action_controller'
6
7
  require 'deface'
7
8
  require 'rails/generators'
8
- #have to manually require following for testing purposes
9
+ # have to manually require following for testing purposes
9
10
  require 'deface/action_view_extensions'
11
+ require 'rails/version'
10
12
 
11
13
  #adding fake class as it's needed by haml 4.0, don't
12
14
  #want to have to require the entire rails stack in specs.
@@ -18,6 +20,7 @@ module Rails
18
20
  end
19
21
 
20
22
  require 'haml'
23
+ require 'slim'
21
24
  require 'deface/haml_converter'
22
25
  require 'generators/deface/override_generator'
23
26
  require 'time'
@@ -37,7 +40,7 @@ end
37
40
 
38
41
  shared_context "mock Rails" do
39
42
  before(:each) do
40
- rails_version = Gem.loaded_specs['rails'].version.to_s
43
+ rails_version = Rails::VERSION::STRING
41
44
 
42
45
  # mock rails to keep specs FAST!
43
46
  unless defined? Rails
@@ -68,6 +71,7 @@ shared_context "mock Rails" do
68
71
  Time.zone.stub(:now).and_return Time.parse('1979-05-25')
69
72
 
70
73
  require "haml/template/plugin"
74
+ require 'slim/erb_converter'
71
75
  end
72
76
  end
73
77
 
@@ -77,6 +81,7 @@ shared_context "mock Rails.application" do
77
81
  before(:each) do
78
82
  Rails.application.config.stub :deface => Deface::Environment.new
79
83
  Rails.application.config.deface.haml_support = true
84
+ Rails.application.config.deface.slim_support = true
80
85
  end
81
86
  end
82
87
 
@@ -91,4 +96,3 @@ class Dummy
91
96
  Rails.application.config.deface.overrides.all
92
97
  end
93
98
  end
94
-
@@ -4,6 +4,7 @@ namespace :deface do
4
4
 
5
5
  desc "Precompiles overrides into template files"
6
6
  task :precompile => [:environment, :clean] do |t, args|
7
+ require "deface/action_view_extensions"
7
8
  Deface::Precompiler.precompile()
8
9
  end
9
10
 
metadata CHANGED
@@ -1,258 +1,314 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: deface
3
- version: !ruby/object:Gem::Version
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0.rc3
4
5
  prerelease: 6
5
- version: 1.0.0.rc2
6
6
  platform: ruby
7
- authors:
8
- - Brian D Quinn
7
+ authors:
8
+ - Brian D Quinn
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
-
13
- date: 2013-03-23 00:00:00 Z
14
- dependencies:
15
- - !ruby/object:Gem::Dependency
16
- name: nokogiri
17
- prerelease: false
18
- requirement: &id001 !ruby/object:Gem::Requirement
19
- none: false
20
- requirements:
21
- - - ~>
22
- - !ruby/object:Gem::Version
23
- version: 1.5.9
24
- type: :runtime
25
- version_requirements: *id001
26
- - !ruby/object:Gem::Dependency
27
- name: rails
28
- prerelease: false
29
- requirement: &id002 !ruby/object:Gem::Requirement
30
- none: false
31
- requirements:
32
- - - ~>
33
- - !ruby/object:Gem::Version
34
- version: "3.1"
35
- type: :runtime
36
- version_requirements: *id002
37
- - !ruby/object:Gem::Dependency
38
- name: colorize
39
- prerelease: false
40
- requirement: &id003 !ruby/object:Gem::Requirement
41
- none: false
42
- requirements:
43
- - - ">="
44
- - !ruby/object:Gem::Version
45
- version: 0.5.8
46
- type: :runtime
47
- version_requirements: *id003
48
- - !ruby/object:Gem::Dependency
49
- name: rspec
50
- prerelease: false
51
- requirement: &id004 !ruby/object:Gem::Requirement
52
- none: false
53
- requirements:
54
- - - ">="
55
- - !ruby/object:Gem::Version
56
- version: 2.11.0
57
- type: :development
58
- version_requirements: *id004
59
- - !ruby/object:Gem::Dependency
60
- name: haml
61
- prerelease: false
62
- requirement: &id005 !ruby/object:Gem::Requirement
63
- none: false
64
- requirements:
65
- - - ">="
66
- - !ruby/object:Gem::Version
67
- version: 3.1.4
68
- type: :development
69
- version_requirements: *id005
70
- - !ruby/object:Gem::Dependency
71
- name: simplecov
72
- prerelease: false
73
- requirement: &id006 !ruby/object:Gem::Requirement
74
- none: false
75
- requirements:
76
- - - ">="
77
- - !ruby/object:Gem::Version
78
- version: 0.6.4
79
- type: :development
80
- version_requirements: *id006
81
- - !ruby/object:Gem::Dependency
82
- name: generator_spec
83
- prerelease: false
84
- requirement: &id007 !ruby/object:Gem::Requirement
85
- none: false
86
- requirements:
87
- - - ~>
88
- - !ruby/object:Gem::Version
89
- version: 0.8.5
90
- type: :development
91
- version_requirements: *id007
92
- description: Deface is a library that allows you to customize ERB & HAML views in a Rails application without editing the underlying view.
12
+ date: 2013-06-19 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: nokogiri
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ~>
20
+ - !ruby/object:Gem::Version
21
+ version: 1.6.0
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ~>
28
+ - !ruby/object:Gem::Version
29
+ version: 1.6.0
30
+ - !ruby/object:Gem::Dependency
31
+ name: rails
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - ! '>='
36
+ - !ruby/object:Gem::Version
37
+ version: '3.1'
38
+ type: :runtime
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: '3.1'
46
+ - !ruby/object:Gem::Dependency
47
+ name: colorize
48
+ requirement: !ruby/object:Gem::Requirement
49
+ none: false
50
+ requirements:
51
+ - - ! '>='
52
+ - !ruby/object:Gem::Version
53
+ version: 0.5.8
54
+ type: :runtime
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: 0.5.8
62
+ - !ruby/object:Gem::Dependency
63
+ name: rspec
64
+ requirement: !ruby/object:Gem::Requirement
65
+ none: false
66
+ requirements:
67
+ - - ! '>='
68
+ - !ruby/object:Gem::Version
69
+ version: 2.11.0
70
+ type: :development
71
+ prerelease: false
72
+ version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ! '>='
76
+ - !ruby/object:Gem::Version
77
+ version: 2.11.0
78
+ - !ruby/object:Gem::Dependency
79
+ name: haml
80
+ requirement: !ruby/object:Gem::Requirement
81
+ none: false
82
+ requirements:
83
+ - - ! '>='
84
+ - !ruby/object:Gem::Version
85
+ version: 3.1.4
86
+ type: :development
87
+ prerelease: false
88
+ version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
90
+ requirements:
91
+ - - ! '>='
92
+ - !ruby/object:Gem::Version
93
+ version: 3.1.4
94
+ - !ruby/object:Gem::Dependency
95
+ name: slim
96
+ requirement: !ruby/object:Gem::Requirement
97
+ none: false
98
+ requirements:
99
+ - - ! '>='
100
+ - !ruby/object:Gem::Version
101
+ version: 2.0.0
102
+ type: :development
103
+ prerelease: false
104
+ version_requirements: !ruby/object:Gem::Requirement
105
+ none: false
106
+ requirements:
107
+ - - ! '>='
108
+ - !ruby/object:Gem::Version
109
+ version: 2.0.0
110
+ - !ruby/object:Gem::Dependency
111
+ name: simplecov
112
+ requirement: !ruby/object:Gem::Requirement
113
+ none: false
114
+ requirements:
115
+ - - ! '>='
116
+ - !ruby/object:Gem::Version
117
+ version: 0.6.4
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ none: false
122
+ requirements:
123
+ - - ! '>='
124
+ - !ruby/object:Gem::Version
125
+ version: 0.6.4
126
+ - !ruby/object:Gem::Dependency
127
+ name: generator_spec
128
+ requirement: !ruby/object:Gem::Requirement
129
+ none: false
130
+ requirements:
131
+ - - ~>
132
+ - !ruby/object:Gem::Version
133
+ version: 0.8.5
134
+ type: :development
135
+ prerelease: false
136
+ version_requirements: !ruby/object:Gem::Requirement
137
+ none: false
138
+ requirements:
139
+ - - ~>
140
+ - !ruby/object:Gem::Version
141
+ version: 0.8.5
142
+ description: Deface is a library that allows you to customize ERB, Haml and Slim views
143
+ in a Rails application without editing the underlying view.
93
144
  email: brian@spreecommerce.com
94
145
  executables: []
95
-
96
146
  extensions: []
97
-
98
- extra_rdoc_files:
99
- - README.markdown
100
- files:
101
- - .gitignore
102
- - .rspec
103
- - .travis.yml
104
- - Gemfile
105
- - MIT-LICENSE
106
- - README.markdown
107
- - Rakefile
108
- - deface.gemspec
109
- - gemfiles/haml4_0.gemfile
110
- - gemfiles/rails3_1.gemfile
111
- - gemfiles/rails3_2.gemfile
112
- - init.rb
113
- - lib/deface.rb
114
- - lib/deface/action_view_extensions.rb
115
- - lib/deface/actions/action.rb
116
- - lib/deface/actions/add_to_attributes.rb
117
- - lib/deface/actions/attribute_action.rb
118
- - lib/deface/actions/element_action.rb
119
- - lib/deface/actions/insert_after.rb
120
- - lib/deface/actions/insert_before.rb
121
- - lib/deface/actions/insert_bottom.rb
122
- - lib/deface/actions/insert_top.rb
123
- - lib/deface/actions/remove.rb
124
- - lib/deface/actions/remove_from_attributes.rb
125
- - lib/deface/actions/replace.rb
126
- - lib/deface/actions/replace_contents.rb
127
- - lib/deface/actions/set_attributes.rb
128
- - lib/deface/actions/surround.rb
129
- - lib/deface/actions/surround_action.rb
130
- - lib/deface/actions/surround_contents.rb
131
- - lib/deface/applicator.rb
132
- - lib/deface/dsl/context.rb
133
- - lib/deface/dsl/loader.rb
134
- - lib/deface/environment.rb
135
- - lib/deface/generators
136
- - lib/deface/haml_converter.rb
137
- - lib/deface/matchers/element.rb
138
- - lib/deface/matchers/range.rb
139
- - lib/deface/original_validator.rb
140
- - lib/deface/override.rb
141
- - lib/deface/parser.rb
142
- - lib/deface/precompiler.rb
143
- - lib/deface/railtie.rb
144
- - lib/deface/search.rb
145
- - lib/deface/sources/copy.rb
146
- - lib/deface/sources/cut.rb
147
- - lib/deface/sources/erb.rb
148
- - lib/deface/sources/haml.rb
149
- - lib/deface/sources/partial.rb
150
- - lib/deface/sources/source.rb
151
- - lib/deface/sources/template.rb
152
- - lib/deface/sources/text.rb
153
- - lib/deface/template_helper.rb
154
- - lib/deface/utils/failure_finder.rb
155
- - lib/generators/deface/USAGE
156
- - lib/generators/deface/override_generator.rb
157
- - lib/generators/deface/templates/override.html.erb.deface
158
- - lib/generators/deface/templates/override.html.haml.deface
159
- - spec/assets/admin/posts/index.html.erb
160
- - spec/assets/dummy_app/overrides/posts/index/app_override.html.erb.deface
161
- - spec/assets/dummy_app/overrides/posts/precompileme/precompileme.html.erb.deface
162
- - spec/assets/dummy_engine/overrides/users/index/engine_override.html.erb.deface
163
- - spec/assets/posts/precompileme.html.erb
164
- - spec/assets/shared/_hello.html.haml
165
- - spec/assets/shared/_post.html.erb
166
- - spec/assets/shared/person.html.erb
167
- - spec/assets/shared/pirate.html.haml
168
- - spec/deface/action_view_template_spec.rb
169
- - spec/deface/actions/add_to_attributes_spec.rb
170
- - spec/deface/actions/insert_after_spec.rb
171
- - spec/deface/actions/insert_before_spec.rb
172
- - spec/deface/actions/insert_bottom_spec.rb
173
- - spec/deface/actions/insert_top_spec.rb
174
- - spec/deface/actions/remove_from_attributes_spec.rb
175
- - spec/deface/actions/remove_spec.rb
176
- - spec/deface/actions/replace_contents_spec.rb
177
- - spec/deface/actions/replace_spec.rb
178
- - spec/deface/actions/set_attributes_spec.rb
179
- - spec/deface/actions/surround_contents_spec.rb
180
- - spec/deface/actions/surround_spec.rb
181
- - spec/deface/applicator_spec.rb
182
- - spec/deface/dsl/context_spec.rb
183
- - spec/deface/dsl/loader_spec.rb
184
- - spec/deface/environment_spec.rb
185
- - spec/deface/haml_converter_spec.rb
186
- - spec/deface/override_spec.rb
187
- - spec/deface/parser_spec.rb
188
- - spec/deface/precompiler_spec.rb
189
- - spec/deface/search_spec.rb
190
- - spec/deface/template_helper_spec.rb
191
- - spec/deface/utils/failure_finder_spec.rb
192
- - spec/generators/deface/override_generator_spec.rb
193
- - spec/spec_helper.rb
194
- - tasks/precompile.rake
195
- - tasks/utils.rake
196
- homepage: http://github.com/railsdog/deface
147
+ extra_rdoc_files:
148
+ - README.markdown
149
+ files:
150
+ - .gitignore
151
+ - .rspec
152
+ - .travis.yml
153
+ - Gemfile
154
+ - MIT-LICENSE
155
+ - README.markdown
156
+ - Rakefile
157
+ - deface.gemspec
158
+ - gemfiles/haml4_0.gemfile
159
+ - gemfiles/rails3_1.gemfile
160
+ - gemfiles/rails3_2.gemfile
161
+ - gemfiles/rails4_0.gemfile
162
+ - init.rb
163
+ - lib/deface.rb
164
+ - lib/deface/action_view_extensions.rb
165
+ - lib/deface/actions/action.rb
166
+ - lib/deface/actions/add_to_attributes.rb
167
+ - lib/deface/actions/attribute_action.rb
168
+ - lib/deface/actions/element_action.rb
169
+ - lib/deface/actions/insert_after.rb
170
+ - lib/deface/actions/insert_before.rb
171
+ - lib/deface/actions/insert_bottom.rb
172
+ - lib/deface/actions/insert_top.rb
173
+ - lib/deface/actions/remove.rb
174
+ - lib/deface/actions/remove_from_attributes.rb
175
+ - lib/deface/actions/replace.rb
176
+ - lib/deface/actions/replace_contents.rb
177
+ - lib/deface/actions/set_attributes.rb
178
+ - lib/deface/actions/surround.rb
179
+ - lib/deface/actions/surround_action.rb
180
+ - lib/deface/actions/surround_contents.rb
181
+ - lib/deface/applicator.rb
182
+ - lib/deface/dsl/context.rb
183
+ - lib/deface/dsl/loader.rb
184
+ - lib/deface/environment.rb
185
+ - lib/deface/generators
186
+ - lib/deface/haml_converter.rb
187
+ - lib/deface/matchers/element.rb
188
+ - lib/deface/matchers/range.rb
189
+ - lib/deface/original_validator.rb
190
+ - lib/deface/override.rb
191
+ - lib/deface/parser.rb
192
+ - lib/deface/precompiler.rb
193
+ - lib/deface/railtie.rb
194
+ - lib/deface/search.rb
195
+ - lib/deface/sources/copy.rb
196
+ - lib/deface/sources/cut.rb
197
+ - lib/deface/sources/erb.rb
198
+ - lib/deface/sources/haml.rb
199
+ - lib/deface/sources/partial.rb
200
+ - lib/deface/sources/slim.rb
201
+ - lib/deface/sources/source.rb
202
+ - lib/deface/sources/template.rb
203
+ - lib/deface/sources/text.rb
204
+ - lib/deface/template_helper.rb
205
+ - lib/deface/utils/failure_finder.rb
206
+ - lib/generators/deface/USAGE
207
+ - lib/generators/deface/override_generator.rb
208
+ - lib/generators/deface/templates/override.html.erb.deface
209
+ - lib/generators/deface/templates/override.html.haml.deface
210
+ - lib/generators/deface/templates/override.html.slim.deface
211
+ - spec/assets/admin/posts/index.html.erb
212
+ - spec/assets/dummy_app/overrides/posts/index/app_override.html.erb.deface
213
+ - spec/assets/dummy_app/overrides/posts/precompileme/precompileme.html.erb.deface
214
+ - spec/assets/dummy_engine/overrides/users/index/engine_override.html.erb.deface
215
+ - spec/assets/posts/precompileme.html.erb
216
+ - spec/assets/shared/_hello.html.haml
217
+ - spec/assets/shared/_hi.html.slim
218
+ - spec/assets/shared/_post.html.erb
219
+ - spec/assets/shared/person.html.erb
220
+ - spec/assets/shared/pirate.html.haml
221
+ - spec/assets/shared/public.html.slim
222
+ - spec/deface/action_view_template_spec.rb
223
+ - spec/deface/actions/add_to_attributes_spec.rb
224
+ - spec/deface/actions/insert_after_spec.rb
225
+ - spec/deface/actions/insert_before_spec.rb
226
+ - spec/deface/actions/insert_bottom_spec.rb
227
+ - spec/deface/actions/insert_top_spec.rb
228
+ - spec/deface/actions/remove_from_attributes_spec.rb
229
+ - spec/deface/actions/remove_spec.rb
230
+ - spec/deface/actions/replace_contents_spec.rb
231
+ - spec/deface/actions/replace_spec.rb
232
+ - spec/deface/actions/set_attributes_spec.rb
233
+ - spec/deface/actions/surround_contents_spec.rb
234
+ - spec/deface/actions/surround_spec.rb
235
+ - spec/deface/applicator_spec.rb
236
+ - spec/deface/dsl/context_spec.rb
237
+ - spec/deface/dsl/loader_spec.rb
238
+ - spec/deface/environment_spec.rb
239
+ - spec/deface/haml_converter_spec.rb
240
+ - spec/deface/override_spec.rb
241
+ - spec/deface/parser_spec.rb
242
+ - spec/deface/precompiler_spec.rb
243
+ - spec/deface/search_spec.rb
244
+ - spec/deface/template_helper_spec.rb
245
+ - spec/deface/utils/failure_finder_spec.rb
246
+ - spec/generators/deface/override_generator_spec.rb
247
+ - spec/spec_helper.rb
248
+ - tasks/precompile.rake
249
+ - tasks/utils.rake
250
+ homepage: https://github.com/spree/deface
197
251
  licenses: []
198
-
199
252
  post_install_message:
200
- rdoc_options:
201
- - --charset=UTF-8
202
- require_paths:
203
- - lib
204
- required_ruby_version: !ruby/object:Gem::Requirement
253
+ rdoc_options:
254
+ - --charset=UTF-8
255
+ require_paths:
256
+ - lib
257
+ required_ruby_version: !ruby/object:Gem::Requirement
205
258
  none: false
206
- requirements:
207
- - - ">="
208
- - !ruby/object:Gem::Version
209
- version: "0"
210
- required_rubygems_version: !ruby/object:Gem::Requirement
259
+ requirements:
260
+ - - ! '>='
261
+ - !ruby/object:Gem::Version
262
+ version: '0'
263
+ required_rubygems_version: !ruby/object:Gem::Requirement
211
264
  none: false
212
- requirements:
213
- - - ">"
214
- - !ruby/object:Gem::Version
215
- version: 1.3.1
265
+ requirements:
266
+ - - ! '>'
267
+ - !ruby/object:Gem::Version
268
+ version: 1.3.1
216
269
  requirements: []
217
-
218
270
  rubyforge_project:
219
- rubygems_version: 1.8.24
271
+ rubygems_version: 1.8.25
220
272
  signing_key:
221
273
  specification_version: 3
222
- summary: Deface is a library that allows you to customize ERB & HAML views in Rails
223
- test_files:
224
- - spec/assets/admin/posts/index.html.erb
225
- - spec/assets/dummy_app/overrides/posts/index/app_override.html.erb.deface
226
- - spec/assets/dummy_app/overrides/posts/precompileme/precompileme.html.erb.deface
227
- - spec/assets/dummy_engine/overrides/users/index/engine_override.html.erb.deface
228
- - spec/assets/posts/precompileme.html.erb
229
- - spec/assets/shared/_hello.html.haml
230
- - spec/assets/shared/_post.html.erb
231
- - spec/assets/shared/person.html.erb
232
- - spec/assets/shared/pirate.html.haml
233
- - spec/deface/action_view_template_spec.rb
234
- - spec/deface/actions/add_to_attributes_spec.rb
235
- - spec/deface/actions/insert_after_spec.rb
236
- - spec/deface/actions/insert_before_spec.rb
237
- - spec/deface/actions/insert_bottom_spec.rb
238
- - spec/deface/actions/insert_top_spec.rb
239
- - spec/deface/actions/remove_from_attributes_spec.rb
240
- - spec/deface/actions/remove_spec.rb
241
- - spec/deface/actions/replace_contents_spec.rb
242
- - spec/deface/actions/replace_spec.rb
243
- - spec/deface/actions/set_attributes_spec.rb
244
- - spec/deface/actions/surround_contents_spec.rb
245
- - spec/deface/actions/surround_spec.rb
246
- - spec/deface/applicator_spec.rb
247
- - spec/deface/dsl/context_spec.rb
248
- - spec/deface/dsl/loader_spec.rb
249
- - spec/deface/environment_spec.rb
250
- - spec/deface/haml_converter_spec.rb
251
- - spec/deface/override_spec.rb
252
- - spec/deface/parser_spec.rb
253
- - spec/deface/precompiler_spec.rb
254
- - spec/deface/search_spec.rb
255
- - spec/deface/template_helper_spec.rb
256
- - spec/deface/utils/failure_finder_spec.rb
257
- - spec/generators/deface/override_generator_spec.rb
258
- - spec/spec_helper.rb
274
+ summary: Deface is a library that allows you to customize ERB, Haml and Slim views
275
+ in Rails
276
+ test_files:
277
+ - spec/assets/admin/posts/index.html.erb
278
+ - spec/assets/dummy_app/overrides/posts/index/app_override.html.erb.deface
279
+ - spec/assets/dummy_app/overrides/posts/precompileme/precompileme.html.erb.deface
280
+ - spec/assets/dummy_engine/overrides/users/index/engine_override.html.erb.deface
281
+ - spec/assets/posts/precompileme.html.erb
282
+ - spec/assets/shared/_hello.html.haml
283
+ - spec/assets/shared/_hi.html.slim
284
+ - spec/assets/shared/_post.html.erb
285
+ - spec/assets/shared/person.html.erb
286
+ - spec/assets/shared/pirate.html.haml
287
+ - spec/assets/shared/public.html.slim
288
+ - spec/deface/action_view_template_spec.rb
289
+ - spec/deface/actions/add_to_attributes_spec.rb
290
+ - spec/deface/actions/insert_after_spec.rb
291
+ - spec/deface/actions/insert_before_spec.rb
292
+ - spec/deface/actions/insert_bottom_spec.rb
293
+ - spec/deface/actions/insert_top_spec.rb
294
+ - spec/deface/actions/remove_from_attributes_spec.rb
295
+ - spec/deface/actions/remove_spec.rb
296
+ - spec/deface/actions/replace_contents_spec.rb
297
+ - spec/deface/actions/replace_spec.rb
298
+ - spec/deface/actions/set_attributes_spec.rb
299
+ - spec/deface/actions/surround_contents_spec.rb
300
+ - spec/deface/actions/surround_spec.rb
301
+ - spec/deface/applicator_spec.rb
302
+ - spec/deface/dsl/context_spec.rb
303
+ - spec/deface/dsl/loader_spec.rb
304
+ - spec/deface/environment_spec.rb
305
+ - spec/deface/haml_converter_spec.rb
306
+ - spec/deface/override_spec.rb
307
+ - spec/deface/parser_spec.rb
308
+ - spec/deface/precompiler_spec.rb
309
+ - spec/deface/search_spec.rb
310
+ - spec/deface/template_helper_spec.rb
311
+ - spec/deface/utils/failure_finder_spec.rb
312
+ - spec/generators/deface/override_generator_spec.rb
313
+ - spec/spec_helper.rb
314
+ has_rdoc: