wraith 3.1.5 → 3.1.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b46d4dbbdf987f28e8b9a3e60fc06c1793005661
4
- data.tar.gz: 2474e450479b2924885d3e346490e1cedbd46e3d
3
+ metadata.gz: e5827f2c5d55c875d5318a17cfdc13076ed555a2
4
+ data.tar.gz: a2518470c451b11cdf5bf9a1204c1873761c1ab1
5
5
  SHA512:
6
- metadata.gz: 276fe80f4441613f9fdf5c1f4593af438b0b30d780aaebde344fe96a94e58d3aeec3e337f00054efc9b77120a376e50d422fc8802b104f44cfa41c937196bfdc
7
- data.tar.gz: e8f7ebcf7bea45995887e9f091e95476c1cc8ccf631ab1e5771d2127d7844af0b51d38978dbca41e2c8262c28c2f93aa9253211f3860ed4ddd452e9e8bd6085c
6
+ metadata.gz: f043f4f16c2bffaa810cae36a8d9bfde3e8b05fdb4867dbc4458e0b38cec937f6a5515b92355d3d1dc85a20b4f0d21c03f29794748c5b29e567a538b8d88635b
7
+ data.tar.gz: 37dea7edb15a164c1da1199e0b11cfd10fec8bb4764bb8c1d9a3c7aab5fb485fb29463489b332379073ef37ab5de58d730ff64139a049cb87a5f80f5984c975a
@@ -19,12 +19,12 @@ class Wraith::Validate
19
19
  end
20
20
 
21
21
  def validate_basic_properties
22
- if wraith.engine.nil?
23
- fail MissingRequiredPropertyError, "You must specify a browser engine! #{docs_prompt}"
24
- end
25
- unless wraith.domains
26
- fail MissingRequiredPropertyError, "You must specify at least one domain for Wraith to do anything! #{docs_prompt}"
27
- end
22
+ fail MissingRequiredPropertyError, "You must specify a browser engine! #{docs_prompt}" if wraith.engine.nil?
23
+
24
+ fail MissingRequiredPropertyError, "You must specify at least one domain for Wraith to do anything! #{docs_prompt}" unless wraith.domains
25
+
26
+ fail MissingRequiredPropertyError, "You must specify a directory for capture! #{docs_prompt}" if wraith.directory.nil?
27
+
28
28
  # @TODO validate fuzz is not nil, etc
29
29
  end
30
30
 
@@ -1,3 +1,3 @@
1
1
  module Wraith
2
- VERSION = "3.1.5"
2
+ VERSION = "3.1.6"
3
3
  end
@@ -7,6 +7,8 @@ describe "Wraith config validator" do
7
7
  test: http://www.bbc.com
8
8
 
9
9
  browser: "casperjs"
10
+
11
+ directory: some/dir
10
12
  ')
11
13
  end
12
14
 
@@ -47,6 +49,15 @@ describe "Wraith config validator" do
47
49
  ')
48
50
  Wraith::Validate.new(config, true).validate("capture")
49
51
  end
52
+
53
+ it "should fail if no directory is specified" do
54
+ config["domains"] = YAML.load('
55
+ test: http://something.bbc.com
56
+ live: http://www.bbc.com
57
+ ')
58
+ config["directory"] = nil
59
+ expect { Wraith::Validate.new(config, true).validate("capture") }.to raise_error MissingRequiredPropertyError
60
+ end
50
61
  end
51
62
 
52
63
  describe "validations specific to history mode" do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wraith
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.5
4
+ version: 3.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dave Blooman