crabfarm 0.3.4 → 0.3.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/crabfarm/cli.rb +2 -2
- data/lib/crabfarm/templates/navigator.rb.erb +12 -12
- data/lib/crabfarm/templates/reducer.rb.erb +0 -1
- data/lib/crabfarm/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5732944441ee66f0cfb3f4545c383cbd5b022549
|
4
|
+
data.tar.gz: 34fab2b972d79c63f852234d72c6580f4f9d9628
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bc67baf038a0f87955a21d8a9a1baf851a2c1a32fe3f3861c9529e7ddf46aee7ffe5e16855443dca5ca5fcc3a839d56788c232efc673fb46cdc933b57f4afcbe
|
7
|
+
data.tar.gz: b35b59b5b5d5412c4a6290f00f636dd6e27ef6977f6de94f69940b8dde05d4b6c5f2d3e6580c32479514924c03f94c26a9eda43d2b46ca0789b688dea9516a3c
|
data/lib/crabfarm/cli.rb
CHANGED
@@ -98,8 +98,8 @@ module Crabfarm
|
|
98
98
|
next puts "This command can only be ran inside a crabfarm application" unless GlobalState.inside_crawler_app?
|
99
99
|
|
100
100
|
require "crabfarm/modes/generator"
|
101
|
-
Crabfarm::Modes::Generator.generate_navigator(GlobalState.app_path, args[0],
|
102
|
-
Crabfarm::Modes::Generator.generate_reducer(GlobalState.app_path, args[0]) if
|
101
|
+
Crabfarm::Modes::Generator.generate_navigator(GlobalState.app_path, args[0], options)
|
102
|
+
Crabfarm::Modes::Generator.generate_reducer(GlobalState.app_path, args[0]) if options[:reducer]
|
103
103
|
end
|
104
104
|
end
|
105
105
|
|
@@ -1,19 +1,19 @@
|
|
1
1
|
class <%= navigator_class %> < Crabfarm::BaseNavigator
|
2
2
|
|
3
3
|
def run
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
4
|
+
<% if navigator_url.nil? %>
|
5
|
+
# replace the following by your navigation code:
|
6
|
+
raise NotImplementedError.new 'You must provide some navigation code for <%= navigator_class %>'
|
7
|
+
<% else %>
|
8
|
+
browser.goto '<%= navigator_url %>'
|
9
|
+
<% end %>
|
10
10
|
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
11
|
+
# Call the homonymous reducer over the entire document and output it by default
|
12
|
+
# You can call other reducers by using the `reduce` method, like this:
|
13
|
+
#
|
14
|
+
# reduce browser.search('td').first, using: MyOtherReducer
|
15
|
+
#
|
16
|
+
reduce_with_defaults
|
17
17
|
end
|
18
18
|
|
19
19
|
end
|
data/lib/crabfarm/version.rb
CHANGED