html_validation 1.1.3 → 1.1.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2a14f92b82d273a901cd9699da7962d6979dff15
4
- data.tar.gz: 4fe843bbb5dd49f74380d10dda1b985d520927e9
3
+ metadata.gz: 1c71f1d5bf532b471165022225527f2eb624abac
4
+ data.tar.gz: 3544c06a88e7c88ccf01beea50da0dfb3e706683
5
5
  SHA512:
6
- metadata.gz: ec8af3ec8def23bd515561f5e4ce57e3b71ffdcfee915da193108e29826f7b9e07073917b804a099d900d1425d97f4c4798eeb4d0664434a8b7861588147e4c9
7
- data.tar.gz: 683f22aac5d805990b85effedbbd20af6f892d069c7c26ef188a9b7448623fa5bd434494ee6f10d44c5a1365d6c740e4e17a4032ee35e90f6ef2abfe0d278427
6
+ metadata.gz: 2f5f523eb348772060dc955ad5500ce2e51d873d20c3f226cf907ddce96a51739df3133be57e07b2bd6ff61c3299d4fd97cbf764094c4055efd79d7e45ec6df7
7
+ data.tar.gz: f2baacdf1e9248d68733eafcf23c04629ed61bc1f9d2207f1bac9d332ae19214f702cfe4d278f69968f23a85bf473d05296bb4e9dac710325bd8668699c163ac
@@ -98,12 +98,12 @@ class HTMLValidationResult
98
98
  # if the errors change position in the file (up or down b/c you add or remove code),
99
99
  # accepted exception strings will remain valid.
100
100
  def filter(str)
101
- str.gsub!(/^line.*trimming empty.*\n/, '') # the messages about empty are overzealous, and not invalid
102
- str.gsub!(/^line.*proprietary.*\n/, '') if options[:ignore_proprietary] # if you use IE only attributes like wrap, or spellcheck or things not in standard
103
- str.gsub!(/^line.*(?:Error|Warning):.*<\/?(?:#{options[:ignored_tag_errors].join('|')})>.*\n/, '') if options[:ignored_tag_errors] && options[:ignored_tag_errors].any?
104
- str.gsub!(/^line.*(?:Error|Warning):.* attribute \"(?:#{options[:ignored_attribute_errors].join('|')})\".*\n/, '') if options[:ignored_attribute_errors] && options[:ignored_attribute_errors].any?
101
+ str = str.gsub(/^line.*trimming empty.*\n/, '') # the messages about empty are overzealous, and not invalid
102
+ str = str.gsub(/^line.*proprietary.*\n/, '') if options[:ignore_proprietary] # if you use IE only attributes like wrap, or spellcheck or things not in standard
103
+ str = str.gsub(/^line.*(?:Error|Warning):.*<\/?(?:#{options[:ignored_tag_errors].join('|')})>.*\n/, '') if options[:ignored_tag_errors] && options[:ignored_tag_errors].any?
104
+ str = str.gsub(/^line.*(?:Error|Warning):.* attribute \"(?:#{options[:ignored_attribute_errors].join('|')})\".*\n/, '') if options[:ignored_attribute_errors] && options[:ignored_attribute_errors].any?
105
105
  if options[:ignored_errors] && options[:ignored_errors].any? && str.gsub(/^line.*(?:Error|Warning):/, '') =~ ignored_errors_regex
106
- str.gsub!(Regexp.new(/^line.*(?:Error|Warning):/.source + '.*' + ignored_errors_regex.source + '.*' +/\n/.source), '')
106
+ str = str.gsub(Regexp.new(/^line.*(?:Error|Warning):/.source + '.*' + ignored_errors_regex.source + '.*' +/\n/.source), '')
107
107
  end
108
108
  str.gsub(/line [0-9]+ column [0-9]+ -/, '')
109
109
  # /line [0-9]+ column [0-9]+ - / + =~ "line 1 column 1 - Warning: missing <!DOCTYPE> declaration"
@@ -123,4 +123,4 @@ class HTMLValidationResult
123
123
  result
124
124
  end
125
125
 
126
- end
126
+ end
@@ -123,8 +123,8 @@ module PageValidations
123
123
 
124
124
  def default_result_file_path
125
125
  posix = RbConfig::CONFIG['host_os'] =~ /(darwin|linux)/
126
- rootpath = Rails.root if defined?(Rails)
127
- rootpath ||= ::PageValidations.data_path if ::PageValidations.data_path
126
+ rootpath = ::PageValidations.data_path if ::PageValidations.data_path
127
+ rootpath ||= Rails.root if defined?(Rails)
128
128
  rootpath ||= posix ? '/tmp/' : "c:\\tmp\\"
129
129
  File.join(rootpath, '.validation')
130
130
  end
@@ -133,9 +133,9 @@ module PageValidations
133
133
 
134
134
  # Takes a url or filepath qne trims and sanitizes it for use as a filename.
135
135
  def filenameize(path)
136
- path.gsub!(/www.|^(http:\/\/|\/|C:\\)/, '')
137
- path.gsub(/[^0-9A-Za-z.]/, '_')
136
+ new_path = path.gsub(/www.|^(http:\/\/|\/|C:\\)/, '')
137
+ new_path.gsub(/[^0-9A-Za-z.]/, '_')
138
138
  end
139
139
 
140
140
  end
141
- end
141
+ end
@@ -1,3 +1,3 @@
1
1
  module PageValidations
2
- HTML_VALIDATOR_VERSION = "1.1.3"
2
+ HTML_VALIDATOR_VERSION = "1.1.4"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: html_validation
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.3
4
+ version: 1.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric Beland
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-08-04 00:00:00.000000000 Z
11
+ date: 2018-01-01 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: HTML Validation lets you validate html locally. Lets you build html validation
14
14
  into your test suite, but break the rules if you must.
@@ -45,7 +45,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
45
45
  version: '0'
46
46
  requirements: []
47
47
  rubyforge_project:
48
- rubygems_version: 2.4.2
48
+ rubygems_version: 2.5.1
49
49
  signing_key:
50
50
  specification_version: 4
51
51
  summary: Local HTML validation for tests and RSpec.