sixarm_ruby_xml_strip 2.1.0 → 2.1.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 26c6aba211d756fa67a9814e8037e68fb4f75eec
4
+ data.tar.gz: ba5edb68143c79d20680a380ddfdda0ac315e6b7
5
+ SHA512:
6
+ metadata.gz: 9d5e77ce245aa30cc2a2d29e17cd45b517e88efdb56aa892ddab5fb63418cebfa2a724bd842314c718ae048880354cb351ac13ef10aa064e86517eed9dddd240
7
+ data.tar.gz: 0d116ef69b3040b16cdf6c8feb1772764661d2da0552de9fb234eaeb1daf87fec5f0e1470169a48ade2134d7c3bebb66fd6ef819935258e4491f1c53daa7ee24
Binary file
data.tar.gz.sig CHANGED
Binary file
data/Rakefile CHANGED
@@ -1,8 +1,10 @@
1
1
  # -*- coding: utf-8 -*-
2
- require 'rake'
3
- require 'rake/testtask'
2
+ require "rake"
3
+ require "rake/testtask"
4
+
5
+ task :default => :test
4
6
 
5
7
  Rake::TestTask.new(:test) do |t|
6
- t.libs << 'lib' << 'test'
7
- t.pattern = 'test/*.rb'
8
+ t.libs.push("lib", "test")
9
+ t.pattern = "test/**/*.rb"
8
10
  end
@@ -3,7 +3,7 @@
3
3
  Please see README
4
4
  =end
5
5
 
6
- require 'sixarm_ruby_rexml'
6
+ require "sixarm_ruby_rexml"
7
7
 
8
8
  module XML
9
9
 
@@ -1,9 +1,9 @@
1
1
  # -*- coding: utf-8 -*-
2
- require 'minitest/autorun'
3
- require 'simplecov'
2
+ require "minitest/autorun"
3
+ require "simplecov"
4
4
  SimpleCov.start
5
- require 'sixarm_ruby_xml_strip'
6
- require 'pathname'
5
+ require "sixarm_ruby_xml_strip"
6
+ require "pathname"
7
7
 
8
8
  describe XML do
9
9
 
@@ -14,22 +14,18 @@ describe XML do
14
14
  describe ".strip_all" do
15
15
 
16
16
  it "=> String" do
17
- assert_kind_of(String, XML.strip_all(""))
17
+ XML.strip_all("").must_be_kind_of String
18
18
  end
19
19
 
20
20
  it "strips everything from a sample string" do
21
21
  s="<foo a=b c=d><!--comment-->Hello<!-[if bar]>Microsoft<![endif]>World</foo>"
22
- expect="<foo>HelloWorld</foo>"
23
- actual=XML.strip_all(s)
24
- assert_equal(expect,actual)
22
+ XML.strip_all(s).must_equal "<foo>HelloWorld</foo>"
25
23
  end
26
24
 
27
25
  it "strip everything from a real document with Microsoft Word HTML" do
28
26
  dirty=File.open(TESTPATH + "microsoft_word_dirty.html", "rb")
29
27
  clean=File.open(TESTPATH + "microsoft_word_clean.html", "rb")
30
- expect=clean.read
31
- actual=XML.strip_all(dirty.read)
32
- assert_equal(expect,actual)
28
+ XML.strip_all(dirty.read).must_equal clean.read
33
29
  end
34
30
 
35
31
  end
@@ -37,14 +33,12 @@ describe XML do
37
33
  describe ".strip_attributes" do
38
34
 
39
35
  it "=> String" do
40
- assert_kind_of(String, XML.strip_attributes(""))
36
+ XML.strip_attributes("").must_be_kind_of String
41
37
  end
42
38
 
43
39
  it "strips all attributes" do
44
40
  s="<foo a=b c=d e=f>Hello</foo>"
45
- expect="<foo>Hello</foo>"
46
- actual=XML.strip_attributes(s)
47
- assert_equal(expect,actual)
41
+ XML.strip_attributes(s).must_equal "<foo>Hello</foo>"
48
42
  end
49
43
 
50
44
  end
@@ -52,28 +46,24 @@ describe XML do
52
46
  describe ".strip_comments" do
53
47
 
54
48
  it "=> String" do
55
- assert_kind_of(String, XML.strip_comments(""))
49
+ XML.strip_comments("").must_be_kind_of String
56
50
  end
57
51
 
58
52
  it "strips all comments" do
59
53
  s="Hello<!--comment-->World"
60
- expect="HelloWorld"
61
- actual=XML.strip_comments(s)
62
- assert_equal(expect,actual)
54
+ XML.strip_comments(s).must_equal "HelloWorld"
63
55
  end
64
56
  end
65
57
 
66
58
  describe ".strip_micrsoft" do
67
59
 
68
60
  it "=> String" do
69
- assert_kind_of(String, XML.strip_microsoft(""))
61
+ XML.strip_microsoft("").must_be_kind_of String
70
62
  end
71
63
 
72
64
  it "strips Microsoft-specific markup" do
73
65
  s="Hello<!-[if foo]>Microsoft<![endif]->World"
74
- expect="HelloWorld"
75
- actual=XML.strip_microsoft(s)
76
- assert_equal(expect,actual)
66
+ XML.strip_microsoft(s).must_equal "HelloWorld"
77
67
  end
78
68
 
79
69
  end
@@ -81,14 +71,12 @@ describe XML do
81
71
  describe ".strip_unprintables" do
82
72
 
83
73
  it "=> String" do
84
- assert_kind_of(String, XML.strip_unprintables(""))
74
+ XML.strip_unprintables("").must_be_kind_of String
85
75
  end
86
76
 
87
77
  it "strips unprintable characters" do
88
- s="HelloWorld" #TODO create test that has unprintables
89
- expect="HelloWorld"
90
- actual=XML.strip_unprintables(s)
91
- assert_equal(expect,actual)
78
+ s="\aHello\bWorld\b"
79
+ XML.strip_unprintables(s).must_equal "HelloWorld"
92
80
  end
93
81
 
94
82
  end
metadata CHANGED
@@ -1,93 +1,206 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sixarm_ruby_xml_strip
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
5
- prerelease:
4
+ version: 2.1.2
6
5
  platform: ruby
7
6
  authors:
8
7
  - SixArm
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain:
12
- - !binary |-
13
- LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURCRENDQW0yZ0F3SUJB
14
- Z0lKQUtQd0VFVFU1YkhvTUEwR0NTcUdTSWIzRFFFQkJRVUFNR0F4Q3pBSkJn
15
- TlYKQkFZVEFsVlRNUk13RVFZRFZRUUlFd3BEWVd4cFptOXlibWxoTVJZd0ZB
16
- WURWUVFIRXcxVFlXNGdSbkpoYm1OcApjMk52TVE4d0RRWURWUVFLRXdaVGFY
17
- aEJjbTB4RXpBUkJnTlZCQU1UQ25OcGVHRnliUzVqYjIwd0hoY05NVEF4Ck1q
18
- RXpNak15TnpFeldoY05NVE13T1RBNE1qTXlOekV6V2pCZ01Rc3dDUVlEVlFR
19
- R0V3SlZVekVUT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+a0ezdnyNvF520arJWvqA4GrOo8F+TT2vVrjscgYjiVGdSq+8wQv
42
+ Efa5jhe8QwG7R1rdpMMP5yBSAqWuFBczMveX5j4rp9Ifw5/XsZbgwcmdm26bjhzh
43
+ w2grAHIhvR9mztm6uXQlZhv1fu3P+RWHDSYhnZSCJSCdxPzQJ1mG5T5ahiL3HvCZ
44
+ 2AC9FOGkybW6DJEFSFFMlNk0IILsa/gNp8ufGuTVLWF9FUUdMNK+TMbghnifT8/1
45
+ n+ES/gQPOnvmVkLDGw==
46
+ -----END CERTIFICATE-----
47
+ date: 2017-08-13 00:00:00.000000000 Z
39
48
  dependencies:
40
49
  - !ruby/object:Gem::Dependency
41
50
  name: sixarm_ruby_rexml
42
- requirement: &21808540 !ruby/object:Gem::Requirement
43
- none: false
51
+ requirement: !ruby/object:Gem::Requirement
44
52
  requirements:
45
- - - ! '>='
53
+ - - ">="
46
54
  - !ruby/object:Gem::Version
47
55
  version: 2.1.0
56
+ - - "<"
57
+ - !ruby/object:Gem::Version
58
+ version: '3'
48
59
  type: :runtime
49
60
  prerelease: false
50
- version_requirements: *21808540
51
- description:
61
+ version_requirements: !ruby/object:Gem::Requirement
62
+ requirements:
63
+ - - ">="
64
+ - !ruby/object:Gem::Version
65
+ version: 2.1.0
66
+ - - "<"
67
+ - !ruby/object:Gem::Version
68
+ version: '3'
69
+ - !ruby/object:Gem::Dependency
70
+ name: minitest
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: 5.7.0
76
+ - - "<"
77
+ - !ruby/object:Gem::Version
78
+ version: '6'
79
+ type: :development
80
+ prerelease: false
81
+ version_requirements: !ruby/object:Gem::Requirement
82
+ requirements:
83
+ - - ">="
84
+ - !ruby/object:Gem::Version
85
+ version: 5.7.0
86
+ - - "<"
87
+ - !ruby/object:Gem::Version
88
+ version: '6'
89
+ - !ruby/object:Gem::Dependency
90
+ name: sixarm_ruby_minitest_extensions
91
+ requirement: !ruby/object:Gem::Requirement
92
+ requirements:
93
+ - - '='
94
+ - !ruby/object:Gem::Version
95
+ version: 1.0.5
96
+ type: :development
97
+ prerelease: false
98
+ version_requirements: !ruby/object:Gem::Requirement
99
+ requirements:
100
+ - - '='
101
+ - !ruby/object:Gem::Version
102
+ version: 1.0.5
103
+ - !ruby/object:Gem::Dependency
104
+ name: rake
105
+ requirement: !ruby/object:Gem::Requirement
106
+ requirements:
107
+ - - ">"
108
+ - !ruby/object:Gem::Version
109
+ version: 10.4.2
110
+ - - "<"
111
+ - !ruby/object:Gem::Version
112
+ version: '11'
113
+ type: :development
114
+ prerelease: false
115
+ version_requirements: !ruby/object:Gem::Requirement
116
+ requirements:
117
+ - - ">"
118
+ - !ruby/object:Gem::Version
119
+ version: 10.4.2
120
+ - - "<"
121
+ - !ruby/object:Gem::Version
122
+ version: '11'
123
+ - !ruby/object:Gem::Dependency
124
+ name: simplecov
125
+ requirement: !ruby/object:Gem::Requirement
126
+ requirements:
127
+ - - ">="
128
+ - !ruby/object:Gem::Version
129
+ version: 0.10.0
130
+ - - "<"
131
+ - !ruby/object:Gem::Version
132
+ version: '2'
133
+ type: :development
134
+ prerelease: false
135
+ version_requirements: !ruby/object:Gem::Requirement
136
+ requirements:
137
+ - - ">="
138
+ - !ruby/object:Gem::Version
139
+ version: 0.10.0
140
+ - - "<"
141
+ - !ruby/object:Gem::Version
142
+ version: '2'
143
+ - !ruby/object:Gem::Dependency
144
+ name: coveralls
145
+ requirement: !ruby/object:Gem::Requirement
146
+ requirements:
147
+ - - ">="
148
+ - !ruby/object:Gem::Version
149
+ version: 0.8.2
150
+ - - "<"
151
+ - !ruby/object:Gem::Version
152
+ version: '2'
153
+ type: :development
154
+ prerelease: false
155
+ version_requirements: !ruby/object:Gem::Requirement
156
+ requirements:
157
+ - - ">="
158
+ - !ruby/object:Gem::Version
159
+ version: 0.8.2
160
+ - - "<"
161
+ - !ruby/object:Gem::Version
162
+ version: '2'
163
+ description: XML#strip methods to clean up XML and HTML
52
164
  email: sixarm@sixarm.com
53
165
  executables: []
54
166
  extensions: []
55
167
  extra_rdoc_files: []
56
168
  files:
57
- - .gemtest
58
169
  - Rakefile
59
- - README.md
60
- - VERSION
61
170
  - lib/sixarm_ruby_xml_strip.rb
62
171
  - test/sixarm_ruby_xml_strip_test.rb
63
172
  - test/sixarm_ruby_xml_strip_test/microsoft_word_clean.html
64
173
  - test/sixarm_ruby_xml_strip_test/microsoft_word_dirty.html
65
174
  homepage: http://sixarm.com/
66
- licenses: []
175
+ licenses:
176
+ - Apache-2.0
177
+ - Artistic-2.0
178
+ - BSD-3-Clause
179
+ - GPL-3.0
180
+ - MIT
181
+ - MPL-2.0
182
+ metadata: {}
67
183
  post_install_message:
68
184
  rdoc_options: []
69
185
  require_paths:
70
186
  - lib
71
187
  required_ruby_version: !ruby/object:Gem::Requirement
72
- none: false
73
188
  requirements:
74
- - - ! '>='
189
+ - - ">="
75
190
  - !ruby/object:Gem::Version
76
191
  version: '0'
77
192
  required_rubygems_version: !ruby/object:Gem::Requirement
78
- none: false
79
193
  requirements:
80
- - - ! '>='
194
+ - - ">="
81
195
  - !ruby/object:Gem::Version
82
196
  version: '0'
83
197
  requirements: []
84
198
  rubyforge_project:
85
- rubygems_version: 1.8.11
199
+ rubygems_version: 2.6.12
86
200
  signing_key:
87
- specification_version: 3
88
- summary: SixArm.com » Ruby » XML#strip methods to clean up XML and HTML
201
+ specification_version: 4
202
+ summary: SixArm.com Ruby XML#strip
89
203
  test_files:
90
204
  - test/sixarm_ruby_xml_strip_test.rb
91
205
  - test/sixarm_ruby_xml_strip_test/microsoft_word_clean.html
92
206
  - test/sixarm_ruby_xml_strip_test/microsoft_word_dirty.html
93
- has_rdoc: true
metadata.gz.sig CHANGED
Binary file
data/.gemtest DELETED
File without changes
data/README.md DELETED
@@ -1,68 +0,0 @@
1
- # SixArm.com » Ruby » <br> XML#strip methods to clean XML & HTML
2
-
3
- * Docs: <http://sixarm.com/sixarm_ruby_xml_strip/doc>
4
- * Repo: <http://github.com/sixarm/sixarm_ruby_xml_strip>
5
- * Email: Joel Parker Henderson, <joel@sixarm.com>
6
-
7
-
8
- ## Introduction
9
-
10
- Methods that work on an XML/HTML text string:
11
-
12
- * XML.strip_all: delete all extraneous junk
13
- * XML.strip_attributes: delete all attributes
14
- * XML.strip_comments: delete all comments
15
- * XML.strip_microsoft: delete all proprietary Microsoft code
16
- * XML.strip_unprintables: delete all unprintable characters
17
-
18
- For docs go to <http://sixarm.com/sixarm_ruby_xml_strip/doc>
19
-
20
- Want to help? We're happy to get pull requests.
21
-
22
-
23
- ## Quickstart
24
-
25
- Install:
26
-
27
- gem install sixarm_ruby_xml_strip
28
-
29
- Bundler:
30
-
31
- gem "sixarm_ruby_xml_strip", "=2.0.4"
32
-
33
- Require:
34
-
35
- require "sixarm_ruby_xml_strip"
36
-
37
-
38
- ## Changes
39
-
40
- * 2012-03-14 2.0.4 Tune up tests to use pathname for sample files
41
- * 2012-03-13 2.0.0 Lift the XML#load methods from the sixarm_ruby_ramp gem
42
- ## License
43
-
44
- You may choose any of these open source licenses:
45
-
46
- * Apache License
47
- * BSD License
48
- * CreativeCommons License, Non-commercial Share Alike
49
- * GNU General Public License Version 2 (GPL 2)
50
- * GNU Lesser General Public License (LGPL)
51
- * MIT License
52
- * Perl Artistic License
53
- * Ruby License
54
-
55
- The software is provided "as is", without warranty of any kind,
56
- express or implied, including but not limited to the warranties of
57
- merchantability, fitness for a particular purpose and noninfringement.
58
-
59
- In no event shall the authors or copyright holders be liable for any
60
- claim, damages or other liability, whether in an action of contract,
61
- tort or otherwise, arising from, out of or in connection with the
62
- software or the use or other dealings in the software.
63
-
64
- This license is for the included software that is created by SixArm;
65
- some of the included software may have its own licenses, copyrights,
66
- authors, etc. and these do take precedence over the SixArm license.
67
-
68
- Copyright (c) 2005-2013 Joel Parker Henderson
data/VERSION DELETED
@@ -1 +0,0 @@
1
- 2.0.4