shuttl 0.4.5 → 0.5.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: bd9516e4822c4131d8105f377a04c3f992c71312
4
- data.tar.gz: d8f2d89c374881a87d0e6ae99bb79d303b8d3e4e
3
+ metadata.gz: e36d4ab0677cd2150644d0406e2efbc595c2f710
4
+ data.tar.gz: 5ebb94d513cf478ace65b075c32c31f0dcdd990b
5
5
  SHA512:
6
- metadata.gz: 93e1e8996dc1b10c169fe1d6e0e3556e24929ab9884f4841283186ea28075af525470dda3827bf2ba26479dbaf382b3ad3475b091e549d8ecab150f4c82e017b
7
- data.tar.gz: ece5e70349e5d45dccee64ed4bc23924d7f582e70b9a43aca6de4074e8783297a97ab5481561cd6152d849b820606317f61a83a7b0841c930a1adcd94f4cebbe
6
+ metadata.gz: a060c942f0b9257586d3a94b881649431e2ca341be410e8e1a5f4a91366a8b8563eb720a2cceecee09b4e2ee75f637dfc8506889844b3778558dbdd4332b7a37
7
+ data.tar.gz: 6faa53146180edde3099678da5b46c7eabd04de6697937646e6ec8a5157dc6fa7695fa377d84ff5c4f833c4533cd44b0a090df92028f0925ca95b7ee35e25d34
@@ -17,6 +17,7 @@ class Build < CommandBase
17
17
  step = 1
18
18
  @image = shuttlConfig.build options[:stage], @cwd, options[:clean] do |v|
19
19
  v.strip!
20
+ v = v.gsub('\n', '\\n')
20
21
  if (log = JSON.parse(v)) && log.has_key?("stream")
21
22
  $stdout.puts log['stream']
22
23
  if log['stream'].include? 'Step'
@@ -1,5 +1,6 @@
1
1
  require 'docker'
2
2
  require 'colorize'
3
+ require 'rbconfig'
3
4
 
4
5
  require_relative '../dsl/eval'
5
6
  require_relative 'base'
@@ -34,11 +35,19 @@ class Start < CommandBase
34
35
 
35
36
  def startContainer (options)
36
37
  $stdout.puts "Starting image"
38
+ hostConfig = {
39
+ "Binds" => @current_image_info['volumes'].map {|mountPoint, hostDir| "#{hostDir}:#{mountPoint}"}
40
+ }
41
+ if RbConfig::CONFIG['host_os'].downcase.include?('darwin')
42
+ hostConfig['PortBindings'] = {
43
+ '80/tcp' => [{ 'HostPort' => '8080' }],
44
+ }
45
+ puts 'listening on port 8080 for mac osx'
46
+ end
47
+
37
48
  @container = Docker::Container.create(
38
49
  'Image' => @image.id,
39
- 'HostConfig' => {
40
- "Binds" => @current_image_info['volumes'].map {|mountPoint, hostDir| "#{hostDir}:#{mountPoint}"}
41
- }
50
+ 'HostConfig' => hostConfig
42
51
  ).start
43
52
  begin
44
53
  catch (Booted) do
data/src/settings.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  module ShuttlSettings
2
- VERSION = "0.4.5"
2
+ VERSION = "0.5.0"
3
3
  BUILD = 1
4
4
  APIURL='http://172.17.0.4/'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shuttl
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.5
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yoseph Radding