scraptacular 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.md +5 -3
- data/lib/scraptacular.rb +4 -0
- data/lib/scraptacular/version.rb +1 -1
- data/scraptacular.gemspec +1 -0
- data/spec/scraptacular_spec.rb +19 -0
- metadata +29 -5
- checksums.yaml +0 -15
data/README.md
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
# Scraptacular
|
2
2
|
|
3
|
+
[](https://codeclimate.com/github/rvandervort/scraptacular)
|
4
|
+
|
3
5
|
Organized web-scraping.
|
4
6
|
## Installation
|
5
7
|
|
@@ -90,7 +92,7 @@ $ scraptacular -d /path/to/scraper_definitions.rb -s /path/to/sessions.rb -o /pa
|
|
90
92
|
```ruby
|
91
93
|
require 'scraptacular'
|
92
94
|
|
93
|
-
# Set up the definitions
|
95
|
+
# Set up the definitions and sessions
|
94
96
|
scraper :my_scraper do
|
95
97
|
end
|
96
98
|
|
@@ -102,10 +104,10 @@ scrape_group "My Group" do
|
|
102
104
|
end
|
103
105
|
|
104
106
|
# Run all groups
|
105
|
-
results = Scraptacular.
|
107
|
+
results = Scraptacular.run
|
106
108
|
|
107
109
|
# Run a single group
|
108
|
-
results = Scraptacular.
|
110
|
+
results = Scraptacular.run({group: "My Group"})
|
109
111
|
|
110
112
|
```
|
111
113
|
|
data/lib/scraptacular.rb
CHANGED
data/lib/scraptacular/version.rb
CHANGED
data/scraptacular.gemspec
CHANGED
@@ -0,0 +1,19 @@
|
|
1
|
+
require 'spec_helper.rb'
|
2
|
+
|
3
|
+
describe 'Scraptacular' do
|
4
|
+
let(:world) { Scraptacular::World.new }
|
5
|
+
|
6
|
+
before :each do
|
7
|
+
Scraptacular.stub(:world).and_return(world)
|
8
|
+
end
|
9
|
+
|
10
|
+
describe "#run" do
|
11
|
+
let(:options) { Hash.new }
|
12
|
+
let(:out) { stub }
|
13
|
+
|
14
|
+
it "delegates to the world instance" do
|
15
|
+
world.should_receive(:run).with(options, out)
|
16
|
+
Scraptacular.run(options, out)
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
metadata
CHANGED
@@ -1,18 +1,20 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: scraptacular
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
|
+
prerelease:
|
5
6
|
platform: ruby
|
6
7
|
authors:
|
7
8
|
- Roger Vandervort
|
8
9
|
autorequire:
|
9
10
|
bindir: bin
|
10
11
|
cert_chain: []
|
11
|
-
date: 2013-
|
12
|
+
date: 2013-06-15 00:00:00.000000000 Z
|
12
13
|
dependencies:
|
13
14
|
- !ruby/object:Gem::Dependency
|
14
15
|
name: mechanize
|
15
16
|
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
16
18
|
requirements:
|
17
19
|
- - ~>
|
18
20
|
- !ruby/object:Gem::Version
|
@@ -20,13 +22,31 @@ dependencies:
|
|
20
22
|
type: :runtime
|
21
23
|
prerelease: false
|
22
24
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
23
26
|
requirements:
|
24
27
|
- - ~>
|
25
28
|
- !ruby/object:Gem::Version
|
26
29
|
version: '2.5'
|
30
|
+
- !ruby/object:Gem::Dependency
|
31
|
+
name: rspec
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
34
|
+
requirements:
|
35
|
+
- - ! '>='
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: '0'
|
38
|
+
type: :development
|
39
|
+
prerelease: false
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ! '>='
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: '0'
|
27
46
|
- !ruby/object:Gem::Dependency
|
28
47
|
name: simplecov
|
29
48
|
requirement: !ruby/object:Gem::Requirement
|
49
|
+
none: false
|
30
50
|
requirements:
|
31
51
|
- - ~>
|
32
52
|
- !ruby/object:Gem::Version
|
@@ -34,6 +54,7 @@ dependencies:
|
|
34
54
|
type: :development
|
35
55
|
prerelease: false
|
36
56
|
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
37
58
|
requirements:
|
38
59
|
- - ~>
|
39
60
|
- !ruby/object:Gem::Version
|
@@ -72,29 +93,31 @@ files:
|
|
72
93
|
- spec/scraptacular/suite_spec.rb
|
73
94
|
- spec/scraptacular/url_spec.rb
|
74
95
|
- spec/scraptacular/world_spec.rb
|
96
|
+
- spec/scraptacular_spec.rb
|
75
97
|
- spec/spec_helper.rb
|
76
98
|
homepage: https://github.com/rvandervort/scraptacular
|
77
99
|
licenses: []
|
78
|
-
metadata: {}
|
79
100
|
post_install_message:
|
80
101
|
rdoc_options: []
|
81
102
|
require_paths:
|
82
103
|
- lib
|
83
104
|
required_ruby_version: !ruby/object:Gem::Requirement
|
105
|
+
none: false
|
84
106
|
requirements:
|
85
107
|
- - ! '>='
|
86
108
|
- !ruby/object:Gem::Version
|
87
109
|
version: '0'
|
88
110
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
111
|
+
none: false
|
89
112
|
requirements:
|
90
113
|
- - ! '>='
|
91
114
|
- !ruby/object:Gem::Version
|
92
115
|
version: '0'
|
93
116
|
requirements: []
|
94
117
|
rubyforge_project:
|
95
|
-
rubygems_version:
|
118
|
+
rubygems_version: 1.8.25
|
96
119
|
signing_key:
|
97
|
-
specification_version:
|
120
|
+
specification_version: 3
|
98
121
|
summary: Organized web scraping
|
99
122
|
test_files:
|
100
123
|
- spec/scraptacular/command_line_spec.rb
|
@@ -105,4 +128,5 @@ test_files:
|
|
105
128
|
- spec/scraptacular/suite_spec.rb
|
106
129
|
- spec/scraptacular/url_spec.rb
|
107
130
|
- spec/scraptacular/world_spec.rb
|
131
|
+
- spec/scraptacular_spec.rb
|
108
132
|
- spec/spec_helper.rb
|
checksums.yaml
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
---
|
2
|
-
!binary "U0hBMQ==":
|
3
|
-
metadata.gz: !binary |-
|
4
|
-
ZDYyMzNjY2M5ZGRjYmUyNGJjYzkyNGU5OWNmZTlmZTg4NWU3OTkyOQ==
|
5
|
-
data.tar.gz: !binary |-
|
6
|
-
OTljY2E2NWNmOGYxMmE3NThkZjQxMmJlMGY3NzA4MGMxOTZjOWI5NQ==
|
7
|
-
!binary "U0hBNTEy":
|
8
|
-
metadata.gz: !binary |-
|
9
|
-
OGY2ZWE1YjJkNGNkMDRmMWUyYmNlMzk5YWNkYWJjY2U5YjIwNmE0YmUzNjhi
|
10
|
-
OTFkM2U0YjcwZGM4MWY3NDhjMTg4MzZjYzQwZmNmZDRjNjI0ZTVlNjM0NmM5
|
11
|
-
OTVmNmEwNjM2MGZhZDkxZDg3M2QzMGE5YTU5NjYwZGJmZjhiYTI=
|
12
|
-
data.tar.gz: !binary |-
|
13
|
-
ZjI0YWFmZTc3Y2VlMWYzMjJmZDhiM2RlZjBhOWMxMmE1MTU3ZWMxZjBlYTVj
|
14
|
-
MWY4MzliZWU4Mjc1Y2U1ZmQxMzlmMDBiYjZmZjRmZDI0YjM0ZjIwZjkwMWM4
|
15
|
-
MjZhOTk5MmZlNmMzODg4MjI5N2Q2ZjU4ZjU3NjUzNmQ3MzI1ZmE=
|