cide 0.6.3 → 0.7.0

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: c95bbb126fea1de3d9609f587c10c3b680a95d62
4
- data.tar.gz: 68642299cb38bec976f53eb43391a4648220ea2d
3
+ metadata.gz: ade361f4711d1dbb93055c6a1877cdd72b14de85
4
+ data.tar.gz: e4cad913efd19e87397c4ba10ee82a4ca25be701
5
5
  SHA512:
6
- metadata.gz: 140c67ec886ce32ec2c37acec604d692219cfa38f6d32a7bf7de2d130c9dd738477699de9c10669b751dc6bdb9565e0d2ab629f992b28483f0e26e4f670a9822
7
- data.tar.gz: de9b145835d96ae07fdafd4a402a6a6069e299daedf21fce217bd859102344a9c26dc1b40dc5cc1e2e3291340c03f8237ad1dbb3ce97687c6eafcbf410207f50
6
+ metadata.gz: 47d3acc50632780d3cd87dc1bdff7ee08b2388d0e4fa2df63239df2e18965f3e8f33072a2b3a79a5fef7f2fa62bcd332c1b3ec30d60eb4d90209a78463c9c084
7
+ data.tar.gz: 4b702e34ac5ecb06f1437332418ec942cf99c4b85af972834c45dbf975aa9799d6496ea98abca24d744942e4e5aa06b18b21f779cc649d3cb28150b6d2bf3369
data/CHANGELOG.md CHANGED
@@ -1,4 +1,10 @@
1
1
 
2
+ 0.7.0 / 2016-02-10
3
+ ==================
4
+
5
+ * NEW: --guest_export_dir to override the path on guest machine
6
+ * CHANGE/FIX: --run now takes a string instead of an array
7
+
2
8
  0.6.3 / 2015-02-09
3
9
  ==================
4
10
 
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cide (0.6.3)
4
+ cide (0.7.0)
5
5
  thor (~> 0.19)
6
6
  virtus (~> 1.0)
7
7
 
data/cide.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = 'cide'
5
- s.version = '0.6.3'
5
+ s.version = '0.7.0'
6
6
  s.authors = ['zimbatm']
7
7
  s.email = ['zimbatm@zimbatm.com']
8
8
  s.summary = 'Isolated test runner with Docker'
data/lib/cide/cli.rb CHANGED
@@ -33,9 +33,14 @@ module CIDE
33
33
  aliases: %w(-o --host_export_dir),
34
34
  default: nil
35
35
 
36
+ method_option 'guest_export_dir',
37
+ desc: 'Change the ouput directory on the host',
38
+ aliases: %w(-i),
39
+ default: nil
40
+
36
41
  method_option 'run',
37
42
  desc: 'Override the script to run',
38
- type: :array,
43
+ type: :string,
39
44
  aliases: ['-r'],
40
45
  default: []
41
46
 
@@ -58,10 +63,8 @@ module CIDE
58
63
  banner 'Config'
59
64
  build = Build::Config.load(Dir.pwd)
60
65
  exit 1 if build.nil?
61
- export_dir = options.export_dir
62
- export_dir ||= File.dirname(build.export_dir) if build.export_dir
63
66
  ssh_key = File.expand_path(options.ssh_key)
64
- build.run = options.run unless options.run.empty?
67
+ build.run = ['sh', '-e', '-c', options.run] unless options.run.empty?
65
68
  name = CIDE::Docker.id options.name
66
69
  tag = "cide/#{name}"
67
70
  say_status :config, build.inspect
@@ -120,10 +123,17 @@ module CIDE
120
123
  ## Export ##
121
124
  return unless options.export
122
125
  banner 'Export'
123
- fail 'export flag set but no export_dir given' if build.export_dir.nil?
124
126
 
125
- guest_export_dir = File.expand_path(build.export_dir, CIDE_SRC_DIR)
126
- host_export_dir = File.expand_path(export_dir, Dir.pwd)
127
+ source_export_dir = options.guest_export_dir || build.export_dir
128
+ fail 'export flag set but no export_dir given' if source_export_dir.nil?
129
+
130
+ target_export_dir = options.export_dir || source_export_dir
131
+
132
+ target_export_dir = File.dirname(target_export_dir)
133
+
134
+ guest_export_dir = File.expand_path(source_export_dir, CIDE_SRC_DIR)
135
+ host_export_dir = File.expand_path(target_export_dir, Dir.pwd)
136
+
127
137
  docker :cp, [id, guest_export_dir].join(':'), host_export_dir
128
138
  rescue Docker::Error => ex
129
139
  say_status :status, 'ERROR', :red
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cide
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.3
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - zimbatm