http_stub_docker 0.0.10 → 0.0.11

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: d0c1779bb2a8fe12e40948f13ce41ef09426d5f6
4
- data.tar.gz: c8125929abadd80021be788c27cef997efde1b40
3
+ metadata.gz: 70818bb933aad8fadb23302c2e7a0767cf25bfb8
4
+ data.tar.gz: b382d8c1e4d087ac0d86e85c73b202e46be483fe
5
5
  SHA512:
6
- metadata.gz: a618e436af63f1523215bc69fb3fcbbd01c182e7dcee101f7a31e40eb1b910013180d7ca6a126b7284eeca28fa8748e0ddf37c48c664dcce3a75cc2e2586c962
7
- data.tar.gz: 59ecdb8c85f13a672cf789f333167e1bc4c517cfd36c7d34d051897c232d1f7bbe5c3e4cae0e4473c571553a236f65c29725b034167df6959d813406717cf091
6
+ metadata.gz: e6376e7f3e6c86e2a2ec9600aa1a9513bdcc2f94b160e7352c6a187a085bd70834667a40491af6ac959ace5a357aabb56bbba6893166f84dacdd3fc096331a51
7
+ data.tar.gz: 6f52271b5f4ec00a672ce82a0229d84975e215b50ae5bc93f346505cdfbec1ede1a8622d9855616270487595c1477ec069792345f774be7932675387f4677323
@@ -5,9 +5,7 @@ module HttpStubDocker
5
5
 
6
6
  PUBLISH_SCRIPT = "#{HttpStubDocker::BASE_DIR}/bin/push_docker_image_to_ecr.sh".freeze
7
7
 
8
- VALID_STUB_RESPONSE_CODES = %w{ 200 302 }.freeze
9
-
10
- private_constant :PUBLISH_SCRIPT, :VALID_STUB_RESPONSE_CODES
8
+ private_constant :PUBLISH_SCRIPT
11
9
 
12
10
  def initialize(args)
13
11
  define_test_task(args)
@@ -22,8 +20,7 @@ module HttpStubDocker
22
20
  task(:test) do
23
21
  Bundler.require(:test)
24
22
  Wait.until!(description: "#{args.stub_name} is running", timeout_in_seconds: 10) do
25
- response = Net::HTTP.get_response(URI("#{args.external_base_uri}/http_stub"))
26
- raise "#{args.stub_name} is not running" unless VALID_STUB_RESPONSE_CODES.include?(response.code)
23
+ raise "#{args.stub_name} is not running" unless server_running?(args)
27
24
  end
28
25
  puts "#{args.stub_name} is running"
29
26
  end
@@ -47,6 +44,11 @@ module HttpStubDocker
47
44
  end
48
45
  end
49
46
 
47
+ def server_running?(args)
48
+ response = Net::HTTP.get_response(URI("#{args.external_base_uri}/http_stub/status"))
49
+ response.body == (args.configurer ? "Initialized" : "Started")
50
+ end
51
+
50
52
  end
51
53
 
52
54
  end
metadata CHANGED
@@ -1,97 +1,97 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: http_stub_docker
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.10
4
+ version: 0.0.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - dueckes
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-10-17 00:00:00.000000000 Z
11
+ date: 2016-10-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
17
+ - - '>='
18
18
  - !ruby/object:Gem::Version
19
19
  version: '10.4'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ">="
24
+ - - '>='
25
25
  - !ruby/object:Gem::Version
26
26
  version: '10.4'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: http_stub
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ~>
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0.26'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - "~>"
38
+ - - ~>
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0.26'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rubocop
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - "~>"
45
+ - - ~>
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0.44'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - "~>"
52
+ - - ~>
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0.44'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rspec
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - "~>"
59
+ - - ~>
60
60
  - !ruby/object:Gem::Version
61
61
  version: '3.5'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - "~>"
66
+ - - ~>
67
67
  - !ruby/object:Gem::Version
68
68
  version: '3.5'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: wait_until
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - "~>"
73
+ - - ~>
74
74
  - !ruby/object:Gem::Version
75
75
  version: '0.3'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - "~>"
80
+ - - ~>
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0.3'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: travis-lint
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - "~>"
87
+ - - ~>
88
88
  - !ruby/object:Gem::Version
89
89
  version: '2.0'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - "~>"
94
+ - - ~>
95
95
  - !ruby/object:Gem::Version
96
96
  version: '2.0'
97
97
  description: Tools for building and distributing http_stub Docker containers
@@ -100,16 +100,16 @@ executables: []
100
100
  extensions: []
101
101
  extra_rdoc_files: []
102
102
  files:
103
- - "./bin/push_docker_image_to_ecr.sh"
104
- - "./lib/http_stub_docker.rb"
105
- - "./lib/http_stub_docker/rake/arguments.rb"
106
- - "./lib/http_stub_docker/rake/container_tasks.rb"
107
- - "./lib/http_stub_docker/rake/pipeline_tasks.rb"
108
- - "./lib/http_stub_docker/rake/resource_tasks.rb"
109
- - "./lib/http_stub_docker/rake/server_daemon_tasks.rb"
110
- - "./lib/http_stub_docker/rake/task_generator.rb"
111
- - "./resource/.dockerignore"
112
- - "./resource/Dockerfile.erb"
103
+ - ./bin/push_docker_image_to_ecr.sh
104
+ - ./lib/http_stub_docker.rb
105
+ - ./lib/http_stub_docker/rake/arguments.rb
106
+ - ./lib/http_stub_docker/rake/container_tasks.rb
107
+ - ./lib/http_stub_docker/rake/pipeline_tasks.rb
108
+ - ./lib/http_stub_docker/rake/resource_tasks.rb
109
+ - ./lib/http_stub_docker/rake/server_daemon_tasks.rb
110
+ - ./lib/http_stub_docker/rake/task_generator.rb
111
+ - ./resource/.dockerignore
112
+ - ./resource/Dockerfile.erb
113
113
  homepage: http://github.com/MYOB-Technology/http_stub_docker
114
114
  licenses:
115
115
  - MIT
@@ -120,17 +120,17 @@ require_paths:
120
120
  - lib
121
121
  required_ruby_version: !ruby/object:Gem::Requirement
122
122
  requirements:
123
- - - ">="
123
+ - - '>='
124
124
  - !ruby/object:Gem::Version
125
125
  version: '2.0'
126
126
  required_rubygems_version: !ruby/object:Gem::Requirement
127
127
  requirements:
128
- - - ">="
128
+ - - '>='
129
129
  - !ruby/object:Gem::Version
130
130
  version: '0'
131
131
  requirements: []
132
132
  rubyforge_project: http_stub_docker
133
- rubygems_version: 2.5.1
133
+ rubygems_version: 2.4.8
134
134
  signing_key:
135
135
  specification_version: 4
136
136
  summary: Docker tools for http_stub