shakedown 0.0.1 → 0.0.2

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: 941f63c53eb308c3cdba21c483a4cdfa69b64c7e
4
- data.tar.gz: 0b56d8da3f43ea88b90a2263965542e6dafd3df5
3
+ metadata.gz: ebfcbbf3ca9f9b6189b8cc74fd49dba588a64326
4
+ data.tar.gz: e6d6cf59453bf5b279f18f7fae8b019f3be992de
5
5
  SHA512:
6
- metadata.gz: 828098bc619487211b165214b8b56e4e908495cbcd70d9452238c04020542ef2ba20ea56995347f1ea39343dc89b78c896ec7e0171b1288b822f06aacb668a95
7
- data.tar.gz: 26d2b98c36686808b3807e4f15a34d8c980456a504d6b6eb49768e79deeff7bdbb5e423ca50a9fe78f4059df302f4f78e2c8779936e3a80c3635b3db40860aa6
6
+ metadata.gz: f8b8ec20c4e3a0621e1f4c3763b9037fcc0111077b90d29c25d451fda338d13a96b9075a54acf9ee1511d002ec25571a356c489a6fe587e71f33b8700298781d
7
+ data.tar.gz: b912947cc9709b294e8f910cf8ce0547b1678a67f4f5f9ef74f8c162496ba5b488a6e3ea930556878e5e479eb4989aef363a044be07d5548ba91a5a97934cd45
@@ -1,13 +1,14 @@
1
1
  module Shakedown
2
2
  class Configuration
3
3
  attr_accessor :host, :namespace
4
- attr_reader :start, :stop
5
4
 
6
5
  def initialize
7
6
  @host = "http://localhost:1234"
8
7
  @namespace = nil
9
- @start = lambda {}
10
- @stop = lambda {}
8
+ @start = lambda {}
9
+ @stop = lambda {}
10
+ @before = lambda {}
11
+ @after = lambda {}
11
12
  end
12
13
 
13
14
  def start(&block)
@@ -23,7 +24,23 @@ module Shakedown
23
24
  end
24
25
 
25
26
  def stop!
26
- @start.call()
27
+ @stop.call()
28
+ end
29
+
30
+ def before(&block)
31
+ @before = block
32
+ end
33
+
34
+ def before!
35
+ @before.call()
36
+ end
37
+
38
+ def after(&block)
39
+ @after = block
40
+ end
41
+
42
+ def after!
43
+ @after.call()
27
44
  end
28
45
  end
29
46
  end
@@ -41,7 +41,7 @@ module Shakedown
41
41
  end
42
42
 
43
43
  def uri
44
- URI.parse(@url)
44
+ URI.parse(url)
45
45
  end
46
46
 
47
47
  def http
@@ -1,3 +1,3 @@
1
1
  module Shakedown
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
data/lib/shakedown.rb CHANGED
@@ -3,12 +3,11 @@ require "uri"
3
3
  require "json"
4
4
  require "formatador"
5
5
 
6
- require "shakedown/version"
7
- require "shakedown/configuration"
8
- require "shakedown/errors"
9
- require "shakedown/runner"
10
- require "shakedown/sequence"
11
-
6
+ require_relative "./shakedown/version"
7
+ require_relative "./shakedown/configuration"
8
+ require_relative "./shakedown/errors"
9
+ require_relative "./shakedown/runner"
10
+ require_relative "./shakedown/sequence"
12
11
 
13
12
  module Shakedown
14
13
  def self.configure
@@ -24,7 +23,9 @@ module Shakedown
24
23
 
25
24
  begin
26
25
  config.start!
26
+ config.before!
27
27
  sequence.run!
28
+ config.after!
28
29
  ensure
29
30
  config.stop!
30
31
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shakedown
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Casey O'Hara
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-07 00:00:00.000000000 Z
11
+ date: 2015-03-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler