drydocker 0.1.4 → 0.1.5

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: 148d6f965d8c1652b9431ad76f88d834ef6cf57d
4
- data.tar.gz: 6f956115387705fddf190fc4ecd21463faf1d910
3
+ metadata.gz: 2087edb0fea5b7cd272581650bf518a62e0f3cf4
4
+ data.tar.gz: dbcb288e04130111067a590580cfed6138ecc236
5
5
  SHA512:
6
- metadata.gz: ef9dd041f76a0270c550117cf47143d84aba3706c7e56d11caa74dfae820aa3f7619e4998a15fffb210d348c2a48f370193a57ee3d9376bd76cb38a90af75a9c
7
- data.tar.gz: c3ef15922603fdf70c8f37181807e6ec26d1830efb4f11c239febd6c6f04ca8ef795f29d40ce2d45329d4728b21974d303cad93c486d1e7848cda906c18900e4
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 (`gem install drydocker`), or as a docker
10
- image (`docker pull silarsis/drydocker`)
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
- * Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
34
+ * Create a Pull Request.
34
35
 
35
36
  ## Links
36
37
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.4
1
+ 0.1.5
data/bin/drydocker CHANGED
@@ -37,6 +37,10 @@ class DrydockerOptions
37
37
  opts.on('-p', '--path [PATH]') do |path|
38
38
  options[:path] = path
39
39
  end
40
+
41
+ opts.on('-v', '--[no-]verbose') do |verbose|
42
+ options[:verbose] = verbose
43
+ end
40
44
  end
41
45
  opt_parser.parse!(args)
42
46
  options
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.4 ruby lib
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.4"
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-12"
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
- @testing = config[:testing]
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 system("docker ps | grep #{config.name}")
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
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-12 00:00:00.000000000 Z
11
+ date: 2015-01-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: listen