kelbim 0.1.0 → 0.1.1

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: d76367e3e72459fcb48c7e7c2ac7644c91bfc2a8
4
- data.tar.gz: 4fcd4b448eb952c926b96330d53a462de3e1daeb
3
+ metadata.gz: 24d58bfe4fcc0264afb8bc73eecf45edf71ff0b5
4
+ data.tar.gz: a3a87c7119740a1442033f5aedc0c0af07d98b81
5
5
  SHA512:
6
- metadata.gz: 344fa9f5496e7564195c040e9772091a6a9a608f57e6a1bc6bea44391cb295d32b67a17a9ba2067539b1c7e512b741be4124a5fd10cd4a2d7339b8c64187bebf
7
- data.tar.gz: 9441923f6b77523ee48a530376438f3c35c7e28bc8b93e0500bc83f2188ebdb9e761916f4cd867eb3da2da2c92acdcc23f2faf6a7dc5f53f21ae39134d329f5d
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 EKB
38
- vi ELB
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
@@ -6,7 +6,7 @@ require 'json'
6
6
  require 'kelbim'
7
7
  require 'optparse'
8
8
  require 'rspec'
9
- require 'kelbim/rspec_formatter'
9
+ require 'kelbim/rspec-formatter'
10
10
 
11
11
  DEFAULT_FILENAME = 'ELBfile'
12
12
 
@@ -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 = (is_internal and not load_balancer.fetch(:listeners, []).empty?) ? '' : ("\n " + output_testcase(load_balancer).strip + "\n")
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(load_balancer)
93
- dns_name = load_balancer[:dns_name]
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
- host = #{dns_name.inspect}
99
- EOS
100
-
101
- ports.each do |port|
102
- out.concat(<<-EOS)
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
@@ -1,5 +1,5 @@
1
1
  module Kelbim
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
4
4
 
5
5
  Version = Kelbim::VERSION
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.0
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/rspec_formatter.rb
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