kelbim 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/bin/kelbim +1 -1
- data/lib/kelbim/dsl/converter.rb +8 -24
- data/lib/kelbim/{rspec_formatter.rb → rspec-formatter.rb} +11 -0
- data/lib/kelbim/version.rb +1 -1
- 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: 24d58bfe4fcc0264afb8bc73eecf45edf71ff0b5
|
4
|
+
data.tar.gz: a3a87c7119740a1442033f5aedc0c0af07d98b81
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 327653552a9f554bc26d9a7d3e9192db439f5477cb5a8651b6f487920967ab6a351918cdf802d14c816f8ce41c38e21b5aee9cddd57a908e3b43d0692ba23392
|
7
|
+
data.tar.gz: d77709d9a9ce8134372b9ff383b34f0ce29fead774778b7cc58f0ca88962561f773c572a5fe173c7eea3d2664edde95fdf21be99f4feb9be43e3342d2134aae1
|
data/README.md
CHANGED
@@ -34,8 +34,8 @@ Or install it yourself as:
|
|
34
34
|
export AWS_ACCESS_KEY_ID='...'
|
35
35
|
export AWS_SECRET_ACCESS_KEY='...'
|
36
36
|
export AWS_REGION='ap-northeast-1'
|
37
|
-
kelbim -e -o ELBfile # export
|
38
|
-
vi
|
37
|
+
kelbim -e -o ELBfile # export ELB
|
38
|
+
vi ELBFile
|
39
39
|
kelbim -a --dry-run
|
40
40
|
kelbim -a # apply `ELBfile` to ELB
|
41
41
|
```
|
data/bin/kelbim
CHANGED
data/lib/kelbim/dsl/converter.rb
CHANGED
@@ -41,7 +41,7 @@ end
|
|
41
41
|
instances = output_instances(load_balancer[:instances], vpc).strip
|
42
42
|
listeners = output_listeners(load_balancer[:listeners]).strip
|
43
43
|
health_check = output_health_check(load_balancer[:health_check]).strip
|
44
|
-
testcase =
|
44
|
+
testcase = is_internal ? '' : ("\n " + output_testcase(load_balancer[:dns_name]).strip + "\n")
|
45
45
|
|
46
46
|
out = <<-EOS
|
47
47
|
load_balancer #{name}#{internal}do#{
|
@@ -89,32 +89,16 @@ end
|
|
89
89
|
return out
|
90
90
|
end
|
91
91
|
|
92
|
-
def output_testcase(
|
93
|
-
|
94
|
-
ports = load_balancer[:listeners].map {|i| i[:port] }
|
95
|
-
|
96
|
-
out = <<-EOS
|
92
|
+
def output_testcase(dns_name)
|
93
|
+
<<-EOS
|
97
94
|
spec do
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
expect {
|
105
|
-
timeout(3) do
|
106
|
-
socket = TCPSocket.open(host, #{port})
|
107
|
-
socket.close if socket
|
108
|
-
end
|
109
|
-
}.not_to raise_error
|
110
|
-
EOS
|
111
|
-
end
|
112
|
-
|
113
|
-
out.concat(<<-EOS)
|
95
|
+
# DNS Name: #{dns_name}
|
96
|
+
pending('This is an example')
|
97
|
+
url = URI.parse('http://www.example.com/')
|
98
|
+
res = Net::HTTP.start(url.host, url.port) {|http| http.get(url.path) }
|
99
|
+
expect(res).to be_a(Net::HTTPOK)
|
114
100
|
end
|
115
101
|
EOS
|
116
|
-
|
117
|
-
return out
|
118
102
|
end
|
119
103
|
|
120
104
|
def output_instances(instances, vpc)
|
@@ -18,5 +18,16 @@ module Kelbim
|
|
18
18
|
|
19
19
|
def dump_commands_to_rerun_failed_examples
|
20
20
|
end
|
21
|
+
|
22
|
+
def dump_pending
|
23
|
+
unless pending_examples.empty?
|
24
|
+
output.puts
|
25
|
+
output.puts "Pending:"
|
26
|
+
pending_examples.each do |pending_example|
|
27
|
+
output.puts pending_color(" #{pending_example.full_description}")
|
28
|
+
output.puts detail_color(" # #{pending_example.execution_result[:pending_message]}")
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
21
32
|
end # RSpecFormatter
|
22
33
|
end # Kelbim
|
data/lib/kelbim/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kelbim
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- winebarrel
|
@@ -149,7 +149,7 @@ files:
|
|
149
149
|
- lib/kelbim/ext/string-ext.rb
|
150
150
|
- lib/kelbim/logger.rb
|
151
151
|
- lib/kelbim/policy-types.rb
|
152
|
-
- lib/kelbim/
|
152
|
+
- lib/kelbim/rspec-formatter.rb
|
153
153
|
- lib/kelbim/tester.rb
|
154
154
|
- lib/kelbim/version.rb
|
155
155
|
- lib/kelbim/wrapper/elb-wrapper.rb
|