baha 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- YTUxODZmMWUzYTBhNzI5YTIzZWU0NjAwNzUyMjRiMTMzY2VjNjkyOA==
4
+ ZjdhNDQ0OGVkNzBlMzZiNGYyMTEyNDNlNmYzZWM5YjEwMDA5MDJlNQ==
5
5
  data.tar.gz: !binary |-
6
- MzU1Nzg5YjQ3Y2RiNzMwYTIzMmU2ZTQ5ZjQ5ZmVmMDMxNWQ0ZDIwZA==
6
+ YWMwZmM3MmZkZjY5OThlZjA1MWNlZWQ0NzYyZmM1NDg0MTkxZjk2MQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NGZiYmFmMTY5ZGRmNDQ1MGJkMzIzMmYyYmIyYjAwZjJkZGY3ZTg5OTExN2Rh
10
- NzRkZjY0MDI3NmQ5MTU2NTg1MjUwMmYwN2ZmNjFiY2RlOWEzMDk4NTJlMmI0
11
- YjZkMjJlYTJiYTk0ZTk1ODI5M2JmNjMyYzQ3OTczZmQ3YTM5NGM=
9
+ MDRkZTdkNmM5MTdmOGRhMGMyNDIzOTJmMzRmYzI2Mjk3MTQwYWE5ZjlmYTNm
10
+ MjAzZTc2YmM1N2JjMTFhNjYzODI2MzZkM2NlNjgyMzEyOGUyYTk4ZTQ3MzA3
11
+ YTk2YjY5Zjg5Yjk2ODg1OGU5YmM0YjZiNTI4NDM0YTM2NTcxMTM=
12
12
  data.tar.gz: !binary |-
13
- YWYzZmFlNjMzMjZkOTgzNjA2N2JhZjNiNTQ4MjRjZTBhNzg1OTFhMzJjZmEw
14
- MTg1NjYzZjVkNWUwZWI2ZjUxZDU4ZjM1Yzk2MmQ1ZmM5NTkzZDk4ZTIyNDI0
15
- NDY0ZDE3ZTQyZDRiMzhiYjg2MTcyYWM0YTNkM2Y5YmQ3YmZiYzc=
13
+ NDM1YTRhYWI5YTIxZTI1MjlmMDNiM2I4YzI3ZDBhZmQwZmZhMGMwYWUxM2Zj
14
+ ZTY5NWU4Mjc3NDkzYjBhYTA4MDdhYTBkMTFjY2VkODVhYTAxODJkZTY0MDU5
15
+ ZDg2OWU5MzFkMzU0ZTM3MjA5ODAyMjhhNWNkNmEwMDQ2ZDU1MmQ=
data/lib/baha/builder.rb CHANGED
@@ -6,7 +6,8 @@ require 'fileutils'
6
6
  require 'tempfile'
7
7
  require 'shellwords'
8
8
 
9
- class Baha::Builder
9
+ module Baha
10
+ class Builder
10
11
  LOG = Baha::Log.for_name("Builder")
11
12
 
12
13
  class BuildError < RuntimeError
@@ -154,4 +155,5 @@ class Baha::Builder
154
155
  >
155
156
  eos
156
157
  end
157
- end
158
+ end
159
+ end
data/lib/baha/cli.rb CHANGED
@@ -2,8 +2,10 @@ require 'thor'
2
2
  require 'baha/builder'
3
3
  require 'baha/log'
4
4
  require 'baha/dockerfile'
5
+ require 'baha/version'
5
6
 
6
- class Baha::CLI < Thor
7
+ module Baha
8
+ class CLI < Thor
7
9
  desc "build [options] CONFIG", "Builds all docker images based on the given config"
8
10
  long_desc <<-LONGDESC
9
11
  Reads the CONFIG file and builds all of the docker images in the order they appear.
@@ -120,3 +122,4 @@ class Baha::CLI < Thor
120
122
  puts "baha " + Baha::VERSION
121
123
  end
122
124
  end
125
+ end
data/lib/baha/config.rb CHANGED
@@ -3,7 +3,8 @@ require 'pathname'
3
3
  require 'baha/log'
4
4
  require 'baha/dockerfile'
5
5
 
6
- class Baha::Config
6
+ module Baha
7
+ class Config
7
8
  DEFAULTS = {
8
9
  :parent => 'ubuntu:14.04.1',
9
10
  :bind => '/.baha',
@@ -152,4 +153,5 @@ class Baha::Config
152
153
  >
153
154
  eos
154
155
  end
155
- end
156
+ end
157
+ end
data/lib/baha/log.rb CHANGED
@@ -1,4 +1,5 @@
1
- class Baha::Log
1
+ module Baha
2
+ class Log
2
3
  require 'logger'
3
4
  LEVELS = {
4
5
  :debug => Logger::DEBUG,
@@ -77,4 +78,5 @@ class Baha::Log
77
78
  end
78
79
  end
79
80
  end
80
- end
81
+ end
82
+ end
@@ -1,7 +1,8 @@
1
1
  require 'baha/pre_build'
2
2
  require 'open3'
3
3
 
4
- class Baha::PreBuild::Module::Command
4
+ module Baha
5
+ class PreBuild::Module::Command
5
6
  LOG = Baha::Log.for_name("Module::Command")
6
7
 
7
8
  def self.execute(mod)
@@ -45,7 +46,7 @@ class Baha::PreBuild::Module::Command
45
46
 
46
47
  end
47
48
  end
48
-
49
+ end
49
50
  Baha::PreBuild::Module.register(:command) do |mod|
50
51
  Baha::PreBuild::Module::Command.execute(mod)
51
- end
52
+ end
@@ -1,7 +1,8 @@
1
1
  require 'baha/pre_build'
2
2
  require 'open-uri'
3
3
 
4
- class Baha::PreBuild::Module::Download
4
+ module Baha
5
+ class PreBuild::Module::Download
5
6
  LOG = Baha::Log.for_name("Module::Download")
6
7
 
7
8
  def self.execute(mod)
@@ -22,7 +23,8 @@ class Baha::PreBuild::Module::Download
22
23
  end
23
24
  end
24
25
  end
26
+ end
25
27
 
26
28
  Baha::PreBuild::Module.register(:download) do |mod|
27
29
  Baha::PreBuild::Module::Download.execute(mod)
28
- end
30
+ end
@@ -2,7 +2,8 @@ require 'baha/pre_build'
2
2
  require 'erb'
3
3
  require 'ostruct'
4
4
 
5
- class Baha::PreBuild::Module::Template
5
+ module Baha
6
+ class PreBuild::Module::Template
6
7
  LOG = Baha::Log.for_name("Module::Template")
7
8
 
8
9
  class ErbBinding < OpenStruct
@@ -42,7 +43,8 @@ class Baha::PreBuild::Module::Template
42
43
  end
43
44
  end
44
45
  end
46
+ end
45
47
 
46
48
  Baha::PreBuild::Module.register(:template) do |mod|
47
49
  Baha::PreBuild::Module::Template.execute(mod)
48
- end
50
+ end
data/lib/baha/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Baha
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
data/lib/baha.rb CHANGED
@@ -2,4 +2,7 @@ require 'baha/version'
2
2
  require 'baha/container_options'
3
3
  require 'baha/image'
4
4
  require 'baha/config'
5
- require 'baha/log'
5
+ require 'baha/log'
6
+
7
+ module Baha
8
+ end
@@ -8,7 +8,7 @@ describe Baha::Config do
8
8
  end
9
9
  describe "#parse" do
10
10
  context "with valid Dockerfile" do
11
- subject { Baha::Dockerfile.parse(fixture('Dockerfile')) }
11
+ subject { Baha::Dockerfile.parse(fixture('Dockerfile.example')) }
12
12
  its(['parent']) { should eq('ubuntu:14.04.1')}
13
13
  its(['run']) { should eq([
14
14
  "echo \"Hello\"",
@@ -35,4 +35,4 @@ describe Baha::Config do
35
35
  it { expect { Baha::Dockerfile.parse(fixture('Dockerfile.invalid')) }.to raise_error(Baha::DockerfileParseError) }
36
36
  end
37
37
  end
38
- end
38
+ end
@@ -12,4 +12,4 @@ images:
12
12
  - { download: 'http://www.google.com', file: 'myfile.txt' }
13
13
  - name: dockerfile
14
14
  tag: 1.0
15
- dockerfile: Dockerfile
15
+ dockerfile: Dockerfile.example
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: baha
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justen Walker
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-12-07 00:00:00.000000000 Z
11
+ date: 2014-12-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -194,7 +194,7 @@ files:
194
194
  - spec/container_options/option_spec.rb
195
195
  - spec/container_options/volumes_spec.rb
196
196
  - spec/dockerfile_spec.rb
197
- - spec/fixtures/Dockerfile
197
+ - spec/fixtures/Dockerfile.example
198
198
  - spec/fixtures/Dockerfile.invalid
199
199
  - spec/fixtures/base_image.yml
200
200
  - spec/fixtures/config_build.yml
@@ -248,7 +248,7 @@ test_files:
248
248
  - spec/container_options/option_spec.rb
249
249
  - spec/container_options/volumes_spec.rb
250
250
  - spec/dockerfile_spec.rb
251
- - spec/fixtures/Dockerfile
251
+ - spec/fixtures/Dockerfile.example
252
252
  - spec/fixtures/Dockerfile.invalid
253
253
  - spec/fixtures/base_image.yml
254
254
  - spec/fixtures/config_build.yml
File without changes