slasher 0.5.1 → 0.5.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +3 -0
- data/Gemfile.lock +40 -3
- data/README.md +5 -1
- data/spec/spec_helper.rb +3 -0
- metadata +60 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e1ee36cabdce72e25caa6ea235041ffb0e97803d
|
4
|
+
data.tar.gz: daf78e2cffaaf35d5499e66515c4e0a4e3eb6788
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b846cf03de7719317ae426ba8698510246875797f5bd956e86c07c27803e69b872256eaead22549e37d4c9f5c18ffe177fd21ce90d5d2276afa45c64158315b9
|
7
|
+
data.tar.gz: f9f9b685d6b03f3528d05386b5b99527f8dc85889e4e5bcb7040f362f5076df74fe365cc398aab496b1e99bf44d729abef05ab4e1383efb69580c965e0b621c4
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
slasher (0.5.1)
|
5
|
+
nokogiri (~> 1.6)
|
6
|
+
|
1
7
|
GEM
|
2
8
|
remote: https://rubygems.org/
|
3
9
|
specs:
|
@@ -8,22 +14,39 @@ GEM
|
|
8
14
|
rack-test (>= 0.5.4)
|
9
15
|
xpath (~> 2.0)
|
10
16
|
coderay (1.1.0)
|
17
|
+
coveralls (0.8.1)
|
18
|
+
json (~> 1.8)
|
19
|
+
rest-client (>= 1.6.8, < 2)
|
20
|
+
simplecov (~> 0.10.0)
|
21
|
+
term-ansicolor (~> 1.3)
|
22
|
+
thor (~> 0.19.1)
|
11
23
|
diff-lcs (1.2.5)
|
24
|
+
docile (1.1.5)
|
25
|
+
domain_name (0.5.24)
|
26
|
+
unf (>= 0.0.5, < 1.0.0)
|
12
27
|
faker (1.4.3)
|
13
28
|
i18n (~> 0.5)
|
29
|
+
http-cookie (1.0.2)
|
30
|
+
domain_name (~> 0.5)
|
14
31
|
i18n (0.7.0)
|
32
|
+
json (1.8.3)
|
15
33
|
method_source (0.8.2)
|
16
34
|
mime-types (2.6.1)
|
17
|
-
mini_portile (0.6.
|
18
|
-
|
35
|
+
mini_portile (0.6.2)
|
36
|
+
netrc (0.10.3)
|
37
|
+
nokogiri (1.6.6.2)
|
19
38
|
mini_portile (~> 0.6.0)
|
20
39
|
pry (0.10.1)
|
21
40
|
coderay (~> 1.1.0)
|
22
41
|
method_source (~> 0.8.1)
|
23
42
|
slop (~> 3.4)
|
24
|
-
rack (1.
|
43
|
+
rack (1.6.4)
|
25
44
|
rack-test (0.6.3)
|
26
45
|
rack (>= 1.0)
|
46
|
+
rest-client (1.8.0)
|
47
|
+
http-cookie (>= 1.0.2, < 2.0)
|
48
|
+
mime-types (>= 1.16, < 3.0)
|
49
|
+
netrc (~> 0.7)
|
27
50
|
rspec (3.2.0)
|
28
51
|
rspec-core (~> 3.2.0)
|
29
52
|
rspec-expectations (~> 3.2.0)
|
@@ -39,7 +62,19 @@ GEM
|
|
39
62
|
diff-lcs (>= 1.2.0, < 2.0)
|
40
63
|
rspec-support (~> 3.2.0)
|
41
64
|
rspec-support (3.2.2)
|
65
|
+
simplecov (0.10.0)
|
66
|
+
docile (~> 1.1.0)
|
67
|
+
json (~> 1.8)
|
68
|
+
simplecov-html (~> 0.10.0)
|
69
|
+
simplecov-html (0.10.0)
|
42
70
|
slop (3.6.0)
|
71
|
+
term-ansicolor (1.3.1)
|
72
|
+
tins (~> 1.0)
|
73
|
+
thor (0.19.1)
|
74
|
+
tins (1.5.2)
|
75
|
+
unf (0.1.4)
|
76
|
+
unf_ext
|
77
|
+
unf_ext (0.0.7.1)
|
43
78
|
xpath (2.0.0)
|
44
79
|
nokogiri (~> 1.3)
|
45
80
|
|
@@ -48,8 +83,10 @@ PLATFORMS
|
|
48
83
|
|
49
84
|
DEPENDENCIES
|
50
85
|
capybara
|
86
|
+
coveralls
|
51
87
|
faker
|
52
88
|
nokogiri
|
53
89
|
pry
|
54
90
|
rspec
|
55
91
|
rspec-collection_matchers
|
92
|
+
slasher!
|
data/README.md
CHANGED
@@ -1,5 +1,8 @@
|
|
1
1
|
# slasherrb
|
2
2
|
[![Build Status](https://semaphoreci.com/api/v1/projects/58c6aef2-91c2-428e-a803-37a8e6ffac2d/445101/badge.svg)](https://semaphoreci.com/hafizbadrie/slasherrb)
|
3
|
+
[![Gem Version](https://badge.fury.io/rb/slasher.png)](http://badge.fury.io/rb/slasher)
|
4
|
+
[![Code Climate](https://codeclimate.com/github/hafizbadrie/slasherrb/badges/gpa.svg)](https://codeclimate.com/github/hafizbadrie/slasherrb)
|
5
|
+
[![Coverage Status](https://coveralls.io/repos/hafizbadrie/slasherrb/badge.svg)](https://coveralls.io/r/hafizbadrie/slasherrb)
|
3
6
|
|
4
7
|
This project is actually the ruby version of [slasherjs](https://github.com/hafizbadrie/slasherjs). Slasher is a library that could extract the main content of an HTML article document.
|
5
8
|
The result of extraction is depending of assumption on HTML document structure itself. Therefore, there may be flaws in the result if the document doesn't match the structure that is recognised by the library.
|
@@ -29,4 +32,5 @@ This library has been tested against some websites and you can see the complete
|
|
29
32
|
1. Add more test cases: international websites
|
30
33
|
2. Anytime I want to slash a new site, I don't need to re initialize the object.
|
31
34
|
3. Add gem dependencies (nokogiri)
|
32
|
-
4.
|
35
|
+
4. Move test to travis
|
36
|
+
5. Better information for gem
|
data/spec/spec_helper.rb
CHANGED
@@ -18,9 +18,12 @@
|
|
18
18
|
# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
|
19
19
|
|
20
20
|
require 'bundler'
|
21
|
+
require 'coveralls'
|
21
22
|
Bundler.require(:default)
|
22
23
|
Dir.glob("./lib/**/*.rb") {|f| require f }
|
23
24
|
|
25
|
+
Coveralls.wear!
|
26
|
+
|
24
27
|
RSpec.configure do |config|
|
25
28
|
# rspec-expectations config goes here. You can use an alternate
|
26
29
|
# assertion/expectation library such as wrong or the stdlib/minitest
|
metadata
CHANGED
@@ -1,15 +1,71 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: slasher
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Hafiz Badrie Lubis
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-06-
|
11
|
+
date: 2015-06-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: rspec
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '3.2'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '3.2'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rspec-collection_matchers
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '1.1'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '1.1'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: capybara
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '2.4'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '2.4'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: pry
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0.10'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0.10'
|
13
69
|
- !ruby/object:Gem::Dependency
|
14
70
|
name: nokogiri
|
15
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -24,7 +80,8 @@ dependencies:
|
|
24
80
|
- - "~>"
|
25
81
|
- !ruby/object:Gem::Version
|
26
82
|
version: '1.6'
|
27
|
-
description:
|
83
|
+
description: This gem could extract the real content of and HTML article based on
|
84
|
+
weight of words in HTML dom nodes.
|
28
85
|
email: hafizbadrie@gmail.com
|
29
86
|
executables: []
|
30
87
|
extensions: []
|