crabfarm 0.3.4 → 0.3.5

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c304e14669cf10f756664e0971f04051644c41ed
4
- data.tar.gz: 820b288d8a92ce0d9fdb2bba0a61441f49b773c5
3
+ metadata.gz: 5732944441ee66f0cfb3f4545c383cbd5b022549
4
+ data.tar.gz: 34fab2b972d79c63f852234d72c6580f4f9d9628
5
5
  SHA512:
6
- metadata.gz: 00c1879c2ec15db0706a42970822cc8b3431f602f224b51b2f8ea0e3ee4fb194020bb1299d191b90d00b541ec93941b85f75454446e24d46d65e3a1979f03a03
7
- data.tar.gz: 2bdff2459cf55d9c936fa48d34af8e82d66df08d0e97ed7062dac4e1c6c79c14bcd4eeac53f76e9b3e4da434ae3bc30c9e0bb7630aad2cadee37afe53cf3bcef
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], _options)
102
- Crabfarm::Modes::Generator.generate_reducer(GlobalState.app_path, args[0]) if _options[:reducer]
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
- <% 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 %>
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
- # 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
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
@@ -2,7 +2,6 @@ class <%= reducer_class %> < Crabfarm::BaseReducer
2
2
 
3
3
  def run
4
4
  # You can replace the following line after running the owner navigator specs once.
5
- # Take a look at the 'Testing' section of the README.md for more information!
6
5
  take_snapshot_and_fail
7
6
  end
8
7
 
@@ -1,3 +1,3 @@
1
1
  module Crabfarm
2
- VERSION = "0.3.4"
2
+ VERSION = "0.3.5"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: crabfarm
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.4
4
+ version: 0.3.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ignacio Baixas