deface 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +5 -0
- data/deface.gemspec +2 -1
- data/lib/deface/original_validator.rb +2 -0
- data/spec/deface/override_spec.rb +21 -6
- metadata +18 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 97ffccb90e6da94c30f13a7e7fa0ff5cb58b46e0
|
4
|
+
data.tar.gz: 53c04295d2d4ce3d84247cd92a235c65aae26463
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 25ae8cc02921a14f84262ee46bfb5e940314e652abd05bfc72a87c403471039fe83326d4a7ef3869e3fd1994654fb109492f71f5b8baa46558e8f850a499c0af
|
7
|
+
data.tar.gz: bc8523db0265c48f27a56ca31a82893c82ccb029e70098255d80a6f911438ab5241d5f0022118fcc156c9e43b4b030e7da737f1ccfb51676ce8ac77d58a9802e
|
data/Gemfile
CHANGED
data/deface.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = "deface"
|
3
|
-
s.version = "1.0.
|
3
|
+
s.version = "1.0.1"
|
4
4
|
|
5
5
|
s.authors = ["Brian D Quinn"]
|
6
6
|
s.description = "Deface is a library that allows you to customize ERB, Haml and Slim views in a Rails application without editing the underlying view."
|
@@ -18,6 +18,7 @@ Gem::Specification.new do |s|
|
|
18
18
|
s.add_dependency('nokogiri', '~> 1.6.0')
|
19
19
|
s.add_dependency('rails', '>= 3.1')
|
20
20
|
s.add_dependency('colorize', '>= 0.5.8')
|
21
|
+
s.add_dependency('polyglot')
|
21
22
|
|
22
23
|
s.add_development_dependency('rspec', '>= 2.11.0')
|
23
24
|
s.add_development_dependency('haml', '>= 3.1.4')
|
@@ -64,17 +64,32 @@ module Deface
|
|
64
64
|
|
65
65
|
it "should return true when input contains similar (ignoring whitespace)" do
|
66
66
|
if RUBY_PLATFORM == 'java'
|
67
|
-
@original.validate_original("<p><erb loud=\"\"> something </erb></p>").
|
68
|
-
@original.validate_original("<p><erb loud=\"\">something\n</erb> </p>").
|
67
|
+
expect( @original.validate_original("<p><erb loud=\"\"> something </erb></p>") ).to eql true
|
68
|
+
expect( @original.validate_original("<p><erb loud=\"\">something\n</erb> </p>") ).to eql true
|
69
69
|
else
|
70
|
-
@original.validate_original("<p><erb loud> something </erb></p>").
|
71
|
-
@original.validate_original("<p><erb loud>something\n</erb> </p>").
|
70
|
+
expect( @original.validate_original("<p><erb loud> something </erb></p>") ).to eql true
|
71
|
+
expect( @original.validate_original("<p><erb loud>something\n</erb> </p>") ).to eql true
|
72
|
+
end
|
73
|
+
end
|
74
|
+
|
75
|
+
it "should return true when input is an array" do
|
76
|
+
if RUBY_PLATFORM == 'java'
|
77
|
+
expect( @original.validate_original(["<p><erb loud=\"\"> something ","</erb></p>"]) ).to eql true
|
78
|
+
expect( @original.validate_original(["<p><erb loud=\"\">something\n","</erb> </p>"]) ).to eql true
|
79
|
+
else
|
80
|
+
expect( @original.validate_original(["<p><erb loud> something"," </erb></p>"]) ).to eql true
|
81
|
+
expect( @original.validate_original(["<p><erb loud>something\n","</erb> </p>"]) ).to eql true
|
72
82
|
end
|
73
83
|
end
|
74
84
|
|
75
85
|
it "should return false when and input contains different string" do
|
76
|
-
@original.validate_original("wrong").
|
86
|
+
expect( @original.validate_original("wrong") ).to eql false
|
87
|
+
end
|
88
|
+
|
89
|
+
it "should return false with input being an array and is a different string" do
|
90
|
+
expect( @original.validate_original(["wrong", "again"]) ).to eql false
|
77
91
|
end
|
92
|
+
|
78
93
|
end
|
79
94
|
|
80
95
|
|
@@ -385,7 +400,7 @@ module Deface
|
|
385
400
|
end
|
386
401
|
|
387
402
|
it "should remove old action" do
|
388
|
-
@replacement.args.has_key?(:replace).
|
403
|
+
expect( @replacement.args.has_key?(:replace)).to eql false
|
389
404
|
end
|
390
405
|
|
391
406
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: deface
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brian D Quinn
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2014-09-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|
@@ -52,6 +52,20 @@ dependencies:
|
|
52
52
|
- - '>='
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: 0.5.8
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: polyglot
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - '>='
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
55
69
|
- !ruby/object:Gem::Dependency
|
56
70
|
name: rspec
|
57
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -252,7 +266,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
252
266
|
version: '0'
|
253
267
|
requirements: []
|
254
268
|
rubyforge_project:
|
255
|
-
rubygems_version: 2.
|
269
|
+
rubygems_version: 2.0.14
|
256
270
|
signing_key:
|
257
271
|
specification_version: 4
|
258
272
|
summary: Deface is a library that allows you to customize ERB, Haml and Slim views
|
@@ -295,3 +309,4 @@ test_files:
|
|
295
309
|
- spec/deface/utils/failure_finder_spec.rb
|
296
310
|
- spec/generators/deface/override_generator_spec.rb
|
297
311
|
- spec/spec_helper.rb
|
312
|
+
has_rdoc:
|