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.
- data/.travis.yml +1 -5
- data/Gemfile +2 -1
- data/README.markdown +2 -2
- data/deface.gemspec +7 -6
- data/gemfiles/rails4_0.gemfile +5 -0
- data/lib/deface.rb +2 -1
- data/lib/deface/action_view_extensions.rb +22 -6
- data/lib/deface/applicator.rb +5 -2
- data/lib/deface/dsl/loader.rb +18 -4
- data/lib/deface/environment.rb +11 -5
- data/lib/deface/parser.rb +19 -14
- data/lib/deface/railtie.rb +12 -2
- data/lib/deface/sources/slim.rb +13 -0
- data/lib/deface/template_helper.rb +2 -0
- data/lib/generators/deface/templates/override.html.slim.deface +3 -0
- data/spec/assets/shared/_hi.html.slim +1 -0
- data/spec/assets/shared/public.html.slim +5 -0
- data/spec/deface/action_view_template_spec.rb +2 -1
- data/spec/deface/dsl/loader_spec.rb +60 -5
- data/spec/deface/environment_spec.rb +8 -6
- data/spec/deface/override_spec.rb +17 -3
- data/spec/deface/parser_spec.rb +26 -17
- data/spec/deface/template_helper_spec.rb +20 -2
- data/spec/generators/deface/override_generator_spec.rb +7 -0
- data/spec/spec_helper.rb +7 -3
- data/tasks/precompile.rake +1 -0
- metadata +297 -241
@@ -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,
|
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,
|
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,
|
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,
|
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,
|
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,
|
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
|
data/spec/deface/parser_spec.rb
CHANGED
@@ -90,6 +90,12 @@ module Deface
|
|
90
90
|
Deface::Parser.convert("<p id=\"<% method_name %>\"></p>").to_s.should == "<p data-erb-id=\"<% method_name %>\"></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=\"<% method_name %22test%22 %>\"></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=\"<% method_name %>\"></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
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
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
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
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=\"<%= x 'y' + "z" %>\">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=\"<% method_name %22test%22 %>\"></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 => 'value' %>").should == "<% method(:key => 'value' %>"
|
191
200
|
Deface::Parser.undo_erb_markup!("<% method(:key => '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 =
|
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
|
-
|
data/tasks/precompile.rake
CHANGED
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
|
-
|
7
|
+
authors:
|
8
|
+
- Brian D Quinn
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
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
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
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
|
-
|
202
|
-
require_paths:
|
203
|
-
|
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
|
-
|
209
|
-
|
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
|
-
|
215
|
-
|
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.
|
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
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
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:
|