drydocker 0.1.4 → 0.1.5
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 +4 -4
- data/README.md +5 -4
- data/VERSION +1 -1
- data/bin/drydocker +4 -0
- data/drydocker.gemspec +3 -3
- data/lib/drydocker.rb +9 -4
- 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: 2087edb0fea5b7cd272581650bf518a62e0f3cf4
|
4
|
+
data.tar.gz: dbcb288e04130111067a590580cfed6138ecc236
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a3e280418b00facbd62f2cc531be552c9c2dd430c7d15e8c883e0f806d30035ce0fb463454a432f7e5bdf34a2855c354dd41b0d226b9b5780685a880eda55de8
|
7
|
+
data.tar.gz: 2890bd0c906e74e463838b10d149d2fe5f539a01a8a682634dfccdf37091c39c99ead52ee4813ec94a4d4da2d4f7e3f78afee34a3b3917784296186c579156ee
|
data/README.md
CHANGED
@@ -6,8 +6,8 @@ A project to provide a simple continuous testing tool.
|
|
6
6
|
|
7
7
|
## Installation
|
8
8
|
|
9
|
-
Drydocker can be installed as a gem
|
10
|
-
|
9
|
+
Drydocker can be installed as a gem - `gem install drydocker` (or, on OS X,
|
10
|
+
`sudo gem install drydocker`)
|
11
11
|
|
12
12
|
## Usage
|
13
13
|
|
@@ -20,7 +20,8 @@ that has enough for running rspec installed, and will run `rspec spec` every
|
|
20
20
|
time it sees a change in the directory.
|
21
21
|
|
22
22
|
You can specify particular images to run in and commands to run at command line
|
23
|
-
if you need to run your tests in a different way or container.
|
23
|
+
if you need to run your tests in a different way or container. Please refer to
|
24
|
+
the output of `drydocker -h` for more information on the flags to use.
|
24
25
|
|
25
26
|
## Contributing to drydocker
|
26
27
|
|
@@ -30,7 +31,7 @@ if you need to run your tests in a different way or container.
|
|
30
31
|
* Start a feature/bugfix branch.
|
31
32
|
* Commit and push until you are happy with your contribution.
|
32
33
|
* Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
|
33
|
-
*
|
34
|
+
* Create a Pull Request.
|
34
35
|
|
35
36
|
## Links
|
36
37
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.5
|
data/bin/drydocker
CHANGED
data/drydocker.gemspec
CHANGED
@@ -2,16 +2,16 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: drydocker 0.1.
|
5
|
+
# stub: drydocker 0.1.5 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "drydocker"
|
9
|
-
s.version = "0.1.
|
9
|
+
s.version = "0.1.5"
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
12
12
|
s.require_paths = ["lib"]
|
13
13
|
s.authors = ["Kevin Littlejohn"]
|
14
|
-
s.date = "2015-01-
|
14
|
+
s.date = "2015-01-13"
|
15
15
|
s.description = "Run tests on change in a docker container continuously"
|
16
16
|
s.email = "kevin@littlejohn.id.au"
|
17
17
|
s.executables = ["drydocker"]
|
data/lib/drydocker.rb
CHANGED
@@ -4,7 +4,7 @@ require 'ptools'
|
|
4
4
|
module Drydocker
|
5
5
|
# Configuration file reader
|
6
6
|
class Config
|
7
|
-
attr_reader :name, :command, :image, :entrypoint, :path
|
7
|
+
attr_reader :name, :command, :image, :entrypoint, :path, :verbose
|
8
8
|
|
9
9
|
def self.default_config
|
10
10
|
{
|
@@ -12,7 +12,8 @@ module Drydocker
|
|
12
12
|
image: 'silarsis/drydocker',
|
13
13
|
command: 'rspec spec',
|
14
14
|
entrypoint: nil,
|
15
|
-
path: `pwd`.strip
|
15
|
+
path: `pwd`.strip,
|
16
|
+
verbose: false
|
16
17
|
}
|
17
18
|
end
|
18
19
|
|
@@ -23,7 +24,7 @@ module Drydocker
|
|
23
24
|
@entrypoint = config[:entrypoint]
|
24
25
|
@command = config[:command]
|
25
26
|
@path = config[:path]
|
26
|
-
@
|
27
|
+
@verbose = config[:verbose]
|
27
28
|
end
|
28
29
|
|
29
30
|
private
|
@@ -47,11 +48,13 @@ module Drydocker
|
|
47
48
|
run_or_start
|
48
49
|
end
|
49
50
|
listener.start # not blocking
|
51
|
+
puts 'now listening'
|
50
52
|
end
|
51
53
|
|
52
54
|
def clean_containers
|
53
55
|
fail 'No docker found' if File.which('docker').nil?
|
54
|
-
return unless
|
56
|
+
return unless `docker ps | grep #{config.name}`
|
57
|
+
puts 'cleaning up previous containers' if config.verbose
|
55
58
|
`docker kill #{config.name}`
|
56
59
|
`docker rm #{config.name}`
|
57
60
|
end
|
@@ -94,10 +97,12 @@ module Drydocker
|
|
94
97
|
end
|
95
98
|
|
96
99
|
def run
|
100
|
+
puts docker_run_cmd if config.verbose
|
97
101
|
system(docker_run_cmd)
|
98
102
|
end
|
99
103
|
|
100
104
|
def start
|
105
|
+
puts docker_start_cmd if config.verbose
|
101
106
|
system(docker_start_cmd)
|
102
107
|
end
|
103
108
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: drydocker
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kevin Littlejohn
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-01-
|
11
|
+
date: 2015-01-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: listen
|