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 +4 -4
- data/lib/shakedown/configuration.rb +21 -4
- data/lib/shakedown/runner.rb +1 -1
- data/lib/shakedown/version.rb +1 -1
- data/lib/shakedown.rb +7 -6
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ebfcbbf3ca9f9b6189b8cc74fd49dba588a64326
|
4
|
+
data.tar.gz: e6d6cf59453bf5b279f18f7fae8b019f3be992de
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
10
|
-
@stop
|
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
|
-
@
|
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
|
data/lib/shakedown/runner.rb
CHANGED
data/lib/shakedown/version.rb
CHANGED
data/lib/shakedown.rb
CHANGED
@@ -3,12 +3,11 @@ require "uri"
|
|
3
3
|
require "json"
|
4
4
|
require "formatador"
|
5
5
|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
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.
|
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-
|
11
|
+
date: 2015-03-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|