docparser 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.coveralls.yml +1 -0
- data/.travis.yml +7 -1
- data/Gemfile +3 -2
- data/README.md +2 -1
- data/docparser.gemspec +10 -10
- data/lib/docparser/version.rb +1 -1
- data/test/lib/docparser/document_test.rb +9 -0
- data/test/test_helper.rb +6 -1
- metadata +32 -45
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: edbb546c57582191dd0dbb7acc77a4451bdfd9a0
|
4
|
+
data.tar.gz: 6f5e932a6cbaaafc93d9d7abb35ed647055efd46
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 433c99cae004c59432928aceb5d3f75e3fc5a9a33eadbd9fb6c7ae7cb359678eaa938304dfce8d4627e56f159ede28af2671e46d33c5357e5e33e7d51a045157
|
7
|
+
data.tar.gz: 89748f88e7ac14f99f75fdccbfcae36e439bdcd1a92e57baab761b1c27856503077a437ee30ea7844b755d3d4afb3e113ca24dd83915779c97124cd808e03bef
|
data/.coveralls.yml
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
service_name: travis-ci
|
data/.travis.yml
CHANGED
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
# DocParser
|
2
2
|
|
3
|
-
[![Build Status](https://travis-ci.org/jurriaan/docparser.png?branch=master)](https://travis-ci.org/jurriaan/docparser)
|
3
|
+
[![Gem Version](https://badge.fury.io/rb/docparser.png)](http://badge.fury.io/rb/docparser) [![Build Status](https://travis-ci.org/jurriaan/docparser.png?branch=master)](https://travis-ci.org/jurriaan/docparser) [![Dependency Status](https://gemnasium.com/jurriaan/docparser.png)](https://gemnasium.com/jurriaan/docparser) [![Coverage Status](https://coveralls.io/repos/jurriaan/docparser/badge.png?branch=master)](https://coveralls.io/r/jurriaan/docparser)
|
4
|
+
|
4
5
|
|
5
6
|
DocParser is a web scraping/screen scraping tool.
|
6
7
|
|
data/docparser.gemspec
CHANGED
@@ -1,4 +1,3 @@
|
|
1
|
-
# coding: utf-8
|
2
1
|
lib = File.expand_path('../lib', __FILE__)
|
3
2
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
3
|
require 'docparser/version'
|
@@ -12,20 +11,21 @@ Gem::Specification.new do |spec|
|
|
12
11
|
spec.summary = %q{DocParser is a Ruby Gem for webscraping}
|
13
12
|
spec.homepage = "https://github.com/jurriaan/docparser"
|
14
13
|
spec.license = "MIT"
|
14
|
+
spec.platform = Gem::Platform::RUBY
|
15
15
|
|
16
16
|
spec.files = `git ls-files`.split($/)
|
17
17
|
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
18
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
19
|
spec.require_paths = ["lib"]
|
20
20
|
|
21
|
-
spec.add_runtime_dependency 'nokogiri'
|
22
|
-
spec.add_runtime_dependency 'parallel'
|
23
|
-
spec.add_runtime_dependency 'axlsx'
|
24
|
-
spec.add_runtime_dependency 'terminal-table'
|
25
|
-
spec.add_runtime_dependency 'pageme'
|
26
|
-
spec.add_runtime_dependency 'json'
|
27
|
-
spec.add_runtime_dependency 'log4r'
|
21
|
+
spec.add_runtime_dependency 'nokogiri', '~> 1.5.9'
|
22
|
+
spec.add_runtime_dependency 'parallel', '~> 0.6.4'
|
23
|
+
spec.add_runtime_dependency 'axlsx', '~> 1.3.6'
|
24
|
+
spec.add_runtime_dependency 'terminal-table', '~> 1.4.5'
|
25
|
+
spec.add_runtime_dependency 'pageme', '~> 0.0.3'
|
26
|
+
spec.add_runtime_dependency 'json', '~> 1.7.7'
|
27
|
+
spec.add_runtime_dependency 'log4r', '~> 1.1.10'
|
28
28
|
|
29
|
-
spec.add_development_dependency
|
30
|
-
spec.
|
29
|
+
spec.add_development_dependency 'yard'
|
30
|
+
spec.required_ruby_version = '>= 2.0.0'
|
31
31
|
end
|
data/lib/docparser/version.rb
CHANGED
@@ -113,6 +113,15 @@ describe DocParser::Document do
|
|
113
113
|
@test_doc.results.must_equal [[['test'], ['test', 'test2']]]
|
114
114
|
end
|
115
115
|
|
116
|
+
it 'should be possible to not use outputs' do
|
117
|
+
parser = Class.new do
|
118
|
+
define_method(:outputs) { [] }
|
119
|
+
end.new
|
120
|
+
test_doc = DocParser::Document.new(filename: @test_doc_path,
|
121
|
+
parser: parser)
|
122
|
+
test_doc.html.must_include('Test HTML')
|
123
|
+
end
|
124
|
+
|
116
125
|
it 'should be possible to specify outputs directly' do
|
117
126
|
@test_doc.add_row ['test!'], output: $output
|
118
127
|
@test_doc.results.must_equal [[['test!']]]
|
data/test/test_helper.rb
CHANGED
@@ -1,4 +1,9 @@
|
|
1
1
|
require 'simplecov'
|
2
|
+
require 'coveralls'
|
3
|
+
SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
|
4
|
+
SimpleCov::Formatter::HTMLFormatter,
|
5
|
+
Coveralls::SimpleCov::Formatter
|
6
|
+
]
|
2
7
|
SimpleCov.start do
|
3
8
|
#add_filter '/test/'
|
4
9
|
end
|
@@ -11,4 +16,4 @@ require 'simple_mock'
|
|
11
16
|
require File.expand_path('../lib/docparser.rb', __dir__)
|
12
17
|
$TEST_DIR = __dir__
|
13
18
|
$ROOT_DIR = File.expand_path('..', $TEST_DIR)
|
14
|
-
$SUPPORT_DIR = File.join(__dir__, 'support/')
|
19
|
+
$SUPPORT_DIR = File.join(__dir__, 'support/')
|
metadata
CHANGED
@@ -1,129 +1,115 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: docparser
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jurriaan Pruis
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-04-
|
11
|
+
date: 2013-04-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ~>
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 1.5.9
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ~>
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: 1.5.9
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: parallel
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ~>
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
33
|
+
version: 0.6.4
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ~>
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
40
|
+
version: 0.6.4
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: axlsx
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - ~>
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
47
|
+
version: 1.3.6
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - ~>
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
54
|
+
version: 1.3.6
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: terminal-table
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - ~>
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version:
|
61
|
+
version: 1.4.5
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- -
|
66
|
+
- - ~>
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version:
|
68
|
+
version: 1.4.5
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: pageme
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- -
|
73
|
+
- - ~>
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version:
|
75
|
+
version: 0.0.3
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- -
|
80
|
+
- - ~>
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version:
|
82
|
+
version: 0.0.3
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: json
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- -
|
87
|
+
- - ~>
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version:
|
89
|
+
version: 1.7.7
|
90
90
|
type: :runtime
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- -
|
94
|
+
- - ~>
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version:
|
96
|
+
version: 1.7.7
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: log4r
|
99
|
-
requirement: !ruby/object:Gem::Requirement
|
100
|
-
requirements:
|
101
|
-
- - '>='
|
102
|
-
- !ruby/object:Gem::Version
|
103
|
-
version: '0'
|
104
|
-
type: :runtime
|
105
|
-
prerelease: false
|
106
|
-
version_requirements: !ruby/object:Gem::Requirement
|
107
|
-
requirements:
|
108
|
-
- - '>='
|
109
|
-
- !ruby/object:Gem::Version
|
110
|
-
version: '0'
|
111
|
-
- !ruby/object:Gem::Dependency
|
112
|
-
name: bundler
|
113
99
|
requirement: !ruby/object:Gem::Requirement
|
114
100
|
requirements:
|
115
101
|
- - ~>
|
116
102
|
- !ruby/object:Gem::Version
|
117
|
-
version:
|
118
|
-
type: :
|
103
|
+
version: 1.1.10
|
104
|
+
type: :runtime
|
119
105
|
prerelease: false
|
120
106
|
version_requirements: !ruby/object:Gem::Requirement
|
121
107
|
requirements:
|
122
108
|
- - ~>
|
123
109
|
- !ruby/object:Gem::Version
|
124
|
-
version:
|
110
|
+
version: 1.1.10
|
125
111
|
- !ruby/object:Gem::Dependency
|
126
|
-
name:
|
112
|
+
name: yard
|
127
113
|
requirement: !ruby/object:Gem::Requirement
|
128
114
|
requirements:
|
129
115
|
- - '>='
|
@@ -143,6 +129,7 @@ executables: []
|
|
143
129
|
extensions: []
|
144
130
|
extra_rdoc_files: []
|
145
131
|
files:
|
132
|
+
- .coveralls.yml
|
146
133
|
- .gitignore
|
147
134
|
- .rubocop.yml
|
148
135
|
- .travis.yml
|
@@ -238,7 +225,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
238
225
|
requirements:
|
239
226
|
- - '>='
|
240
227
|
- !ruby/object:Gem::Version
|
241
|
-
version:
|
228
|
+
version: 2.0.0
|
242
229
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
243
230
|
requirements:
|
244
231
|
- - '>='
|