lux 0.7 → 0.9

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: 3eaee859f2e47a11dd2f1561c33a655478b89b76
4
- data.tar.gz: 8bfdb4795d60647e9711c3823d6259f14f5ac438
3
+ metadata.gz: a59ca3dfc3b9dc7b392ba2eccb2e03fdf762a345
4
+ data.tar.gz: e64035da3da05c6d9ff4aafbe48d909e3bd09164
5
5
  SHA512:
6
- metadata.gz: cdfabbacc607ea2d2a80572d2824f1d95e7ef037b9b3cc8dccecb2a21e6ecbbbd6861e115eb9b1c7f2c2baab9afe39fa4ed0cc9fe3abcf95cbefb120854052be
7
- data.tar.gz: bb8cb85f41a41a65ab4eb03a827c4b3f61e0d3247dce0da7c87911c4e25afd64ae02a161df4fbd1ee13587ebc437e15b7ffe5ce200d613b5c4a1b2e47733ef18
6
+ metadata.gz: 3da8015452b5ed70a742a1a69951c625d632846d14b6c9ac9156f7fa19e09d0490bd0bbde71e9230fca3ceef806add3283768d0c951792e99cdb00246ee9355f
7
+ data.tar.gz: 0894977bcfef8ef4e769805cb1167358352b406ce3930b98389cd11dbfa2cd10b9a93d5b0b5a591f7e9e10f9b57d95a0f24a7f4df4ae83d90abd1005c5a07348
data/Rakefile CHANGED
@@ -1 +1,7 @@
1
1
  require "bundler/gem_tasks"
2
+
3
+ desc "Update the CSS file"
4
+ task :getcss do
5
+ sh "curl -O http://necolas.github.io/normalize.css/latest/normalize.css"
6
+ sh "curl -O https://raw.githubusercontent.com/richleland/pygments-css/master/github.css"
7
+ end
data/lib/lux/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Lux
2
- VERSION = "0.7"
2
+ VERSION = "0.9"
3
3
  end
data/lib/lux.rb CHANGED
@@ -1,6 +1,7 @@
1
- require "lux/version"
2
- require 'pathname'
1
+ require 'lux/version'
2
+
3
3
  require 'highline/import'
4
+ require 'pathname'
4
5
  require 'shellwords'
5
6
  require 'thor'
6
7
  require 'uri'
@@ -56,6 +57,7 @@ class Lux::App < Thor
56
57
  desc "start IMAGE", "Run a Docker image with user/home mapping"
57
58
  method_option :env, type: :string, aliases: '-e', desc: 'Path to environment file'
58
59
  method_option :name, type: :string, aliases: '-n', default: '<autogenerated>', desc: 'Docker container name'
60
+ method_option :port, type: :string, aliases: '-p', default: nil, desc: 'Expose ports (default all)'
59
61
  def start(image)
60
62
  image = findimage image
61
63
  raise "no image" if image.empty?
@@ -64,6 +66,7 @@ class Lux::App < Thor
64
66
  args = ["-v #{ENV['HOME']}:#{ENV['HOME']}"]
65
67
  args << "--env-file=#{options.env}" if options.env
66
68
  args << "--name=#{options.name}" unless options.name == '<autogenerated>'
69
+ args << (options.port ? "-p #{options.port}" : "-P")
67
70
  cid = `docker run -dit #{args.join(' ')} #{image} /bin/bash`.strip
68
71
  die "Container failed to start" unless cid =~ /^[a-z0-9]+$/
69
72
  system "docker exec #{cid} bash -c #{setup_cmd.shellescape}"
@@ -154,7 +157,7 @@ class Lux::App < Thor
154
157
  imageage = imageinfo[3..-3].join(' ')
155
158
  next unless matcher.call(imagename)
156
159
  if options.force or (agree("Delete #{imagename} (#{imageage}, #{imagesize})? "){|q|q.echo=true})
157
- `docker rmi #{imageinfo[2]}`
160
+ `docker rmi #{options.force ? '-f':''} #{imageinfo[2]}`
158
161
  HighLine.say "Image <%= color('#{imagename}', RED)%> deleted"
159
162
  end
160
163
  end
data/lux.gemspec CHANGED
@@ -9,7 +9,7 @@ Gem::Specification.new do |spec|
9
9
  spec.authors = ["Nick Townsend"]
10
10
  spec.email = ["nick.townsend@mac.com"]
11
11
 
12
- spec.summary = %q{Handy utilities for working with Docker and Git}
12
+ spec.summary = %q{Handy utilities for working with Docker}
13
13
  spec.homepage = "https://github.com/townsen/lux"
14
14
  spec.license = "MIT"
15
15
 
@@ -22,6 +22,7 @@ Gem::Specification.new do |spec|
22
22
 
23
23
  spec.add_runtime_dependency "thor", "~> 0.19"
24
24
  spec.add_runtime_dependency "highline", "~> 1.7"
25
+ spec.add_runtime_dependency "docker-api", "~> 1.22"
25
26
  spec.add_runtime_dependency "rake", "~> 10.0"
26
27
 
27
28
  spec.add_development_dependency "bundler", "~> 1.9"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lux
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.7'
4
+ version: '0.9'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nick Townsend
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-07-31 00:00:00.000000000 Z
11
+ date: 2015-08-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -38,6 +38,20 @@ dependencies:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '1.7'
41
+ - !ruby/object:Gem::Dependency
42
+ name: docker-api
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '1.22'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '1.22'
41
55
  - !ruby/object:Gem::Dependency
42
56
  name: rake
43
57
  requirement: !ruby/object:Gem::Requirement
@@ -110,5 +124,5 @@ rubyforge_project:
110
124
  rubygems_version: 2.4.5
111
125
  signing_key:
112
126
  specification_version: 4
113
- summary: Handy utilities for working with Docker and Git
127
+ summary: Handy utilities for working with Docker
114
128
  test_files: []