docker-stack 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/Gemfile +0 -9
- data/README.md +5 -3
- data/docker-stack.gemspec +2 -1
- data/lib/docker/stack/controller.rb +11 -9
- data/lib/docker/stack/version.rb +1 -1
- metadata +15 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fcd36792e8fd4007c8d21e051c7d1752aa4ecbfb3dd98055f4b3914ac24d3799
|
4
|
+
data.tar.gz: 6e87294ea6e21cc4e22e21987c1dfb4285eb790362c3ed4186cb87d86a2c8aca
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d42f1ab254370abb44fcaa6b7ce27293d955f82a3a8b8f4b0b45f21a6424aa44892aa3fa4b68205fe8e4f5daa1dfca2a52b65146c022ab646d8f9eae31550e3f
|
7
|
+
data.tar.gz: 87081d43640cc58b2c18bb9401bc51830af3a3b1416f02a72ca76a4de6296079155db4390f97a269b4f68cf287d5d3ceb61563cf7c711a97239c4c63248bd969
|
data/Gemfile
CHANGED
@@ -30,15 +30,6 @@ else
|
|
30
30
|
gem 'rails', ENV['RAILS_VERSION']
|
31
31
|
end
|
32
32
|
end
|
33
|
-
|
34
|
-
case ENV['RAILS_VERSION']
|
35
|
-
when /^4.2/
|
36
|
-
gem 'coffee-rails', '~> 4.1.0'
|
37
|
-
gem 'responders', '~> 2.0'
|
38
|
-
gem 'sass-rails', '>= 5.0'
|
39
|
-
when /^4.[01]/
|
40
|
-
gem 'sass-rails', '< 5.0'
|
41
|
-
end
|
42
33
|
# rubocop:enable Bundler/DuplicatedGem
|
43
34
|
end
|
44
35
|
# END ENGINE_CART BLOCK
|
data/README.md
CHANGED
@@ -4,16 +4,18 @@ Rails generators, Rake tasks, and support modules to run dependencies in Docker
|
|
4
4
|
|
5
5
|
Code: [![Version](https://badge.fury.io/rb/docker-stack.png)](http://badge.fury.io/rb/docker-stack)
|
6
6
|
[![Build Status](https://travis-ci.org/mbklein/docker-stack.png?branch=master)](https://travis-ci.org/mbklein/docker-stack)
|
7
|
-
[![Coverage Status](https://coveralls.io/repos/github/mbklein/docker-stack/badge.svg?branch=master)](https://coveralls.io/github/mbklein/docker-stack?branch=master)
|
8
7
|
[![Code Climate](https://codeclimate.com/github/mbklein/docker-stack/badges/gpa.svg)](https://codeclimate.com/github/mbklein/docker-stack)
|
9
8
|
[![Dependency Update Status](https://gemnasium.com/mbklein/docker-stack.png)](https://gemnasium.com/mbklein/docker-stack)
|
10
|
-
[![Dependency Maintenance Status](https://dependencyci.com/github/mbklein/docker-stack/badge)](https://dependencyci.com/github/mbklein/docker-stack)
|
11
9
|
|
12
10
|
Docs: [![Documentation Status](https://inch-ci.org/github/mbklein/docker-stack.svg?branch=master)](https://inch-ci.org/github/mbklein/docker-stack)
|
13
11
|
[![API Docs](http://img.shields.io/badge/API-docs-blue.svg)](http://rubydoc.info/gems/docker-stack)
|
14
12
|
[![Apache 2.0 License](http://img.shields.io/badge/APACHE2-license-blue.svg)](./LICENSE.txt)
|
15
13
|
|
16
|
-
Originally written as a drop-in replacement for [`solr_wrapper`](https://github.com/cbeer/solr_wrapper) and [`fcrepo_wrapper`](https://github.com/cbeer/fcrepo_wrapper) to ease development and testing of [Samvera](https://github.com/
|
14
|
+
Originally written as a drop-in replacement for [`solr_wrapper`](https://github.com/cbeer/solr_wrapper) and [`fcrepo_wrapper`](https://github.com/cbeer/fcrepo_wrapper) to ease development and testing of [Samvera](https://github.com/samvera/) applications, but with an eye toward adding support for additional services.
|
15
|
+
|
16
|
+
## Prerequisites
|
17
|
+
|
18
|
+
`Docker::Stack` depends on [Docker](https://docker.com/) for container virtualization. Before using this gem to start or manage support services, please download and install the [Docker Community Edition](https://store.docker.com/search?type=edition&offering=community).
|
17
19
|
|
18
20
|
## Installation
|
19
21
|
|
data/docker-stack.gemspec
CHANGED
@@ -22,11 +22,12 @@ Gem::Specification.new do |spec|
|
|
22
22
|
|
23
23
|
spec.add_dependency 'docker-api'
|
24
24
|
spec.add_dependency 'docker-compose'
|
25
|
-
spec.add_dependency 'rails',
|
25
|
+
spec.add_dependency 'rails', '~> 5.0'
|
26
26
|
|
27
27
|
spec.add_development_dependency 'bixby'
|
28
28
|
spec.add_development_dependency 'bundler', '~> 1.16'
|
29
29
|
spec.add_development_dependency 'byebug'
|
30
|
+
spec.add_development_dependency 'coveralls'
|
30
31
|
spec.add_development_dependency 'engine_cart'
|
31
32
|
spec.add_development_dependency 'mocha'
|
32
33
|
spec.add_development_dependency 'pry-byebug'
|
@@ -46,22 +46,23 @@ module Docker
|
|
46
46
|
end
|
47
47
|
end
|
48
48
|
|
49
|
-
# rubocop:disable Style/StderrPuts
|
50
49
|
def wait_for_services
|
51
50
|
Timeout.timeout(120) do
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
$stderr.print '.' if warn?
|
51
|
+
warn_inline 'Waiting up to two minutes for services to become healthy.'
|
52
|
+
until all_healthy?
|
53
|
+
warn_inline '.'
|
56
54
|
sleep 2
|
57
55
|
end
|
58
|
-
|
56
|
+
warn_inline
|
59
57
|
end
|
60
58
|
true
|
61
59
|
rescue Timeout::Error
|
62
60
|
raise 'Timed out waiting for services to become healthy'
|
63
61
|
end
|
64
|
-
|
62
|
+
|
63
|
+
def all_healthy?
|
64
|
+
status.all? { |v| v[:status] == 'healthy' }
|
65
|
+
end
|
65
66
|
|
66
67
|
def run
|
67
68
|
dc.up(detached: @daemon || block_given?)
|
@@ -107,8 +108,9 @@ module Docker
|
|
107
108
|
Signal.trap('INT', old_trap)
|
108
109
|
end
|
109
110
|
|
110
|
-
def
|
111
|
-
$-W > 0 # rubocop:disable Style/GlobalVars
|
111
|
+
def warn_inline(message = "\n")
|
112
|
+
return unless $-W > 0 # rubocop:disable Style/GlobalVars
|
113
|
+
$stderr.print message
|
112
114
|
end
|
113
115
|
end
|
114
116
|
end
|
data/lib/docker/stack/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: docker-stack
|
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
|
- Michael Klein
|
@@ -94,6 +94,20 @@ dependencies:
|
|
94
94
|
- - ">="
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: coveralls
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
97
111
|
- !ruby/object:Gem::Dependency
|
98
112
|
name: engine_cart
|
99
113
|
requirement: !ruby/object:Gem::Requirement
|