egg 0.9.0 → 0.10.0

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
- SHA1:
3
- metadata.gz: 78400ef63b85075bae4dea0fe174b765215c5d4c
4
- data.tar.gz: a96ea239294e05e85e85d247fea18c48bfa3634d
2
+ SHA256:
3
+ metadata.gz: 32bcf99fe8e9537b1e235446d51b86eccfaaf810a7340e70b0d6f526a2a59d4d
4
+ data.tar.gz: dd3fb8262550cd37467f042596b4dc4afa6b0639438e42cc769c678107e3345d
5
5
  SHA512:
6
- metadata.gz: 4ecc1400f44c3c7ad1c452011c7d34525af61cd942aa9bf042afcdbb12fd86c98a328bfcc08eb174c5d48dc32e1aa0ff743fd962b8d08612cf8057bedbae610e
7
- data.tar.gz: 8e99cb10911f5834bec8f0dd862ef1cf883e856f5220abef602229365b7f473651a10fb0958d3e6ffe51877fc5928d2ef17dfa84ae200ca2a4c950c16f8b186a
6
+ metadata.gz: be762f48f2481312dc4bb5aedacf18ab11180b7524d4170ae56fa47c5acbed548b9ae2b4e28dd5660499fe92900e494a95c6dbb0cc6301b741f91b86329a4857
7
+ data.tar.gz: bf527d2016aa0553b048cc890c14a415cffc2dea656dbf0048da7da7f2a233b76772f40862ca30593c39513abe3905f74165906547f00a2b5e311c1c405edc8f
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- egg (0.8.0)
4
+ egg (0.10.0)
5
5
  thor (~> 0.19.0)
6
6
 
7
7
  GEM
data/lib/egg.rb CHANGED
@@ -13,4 +13,3 @@ require_relative "egg/version"
13
13
  require_relative "egg/cli"
14
14
  require_relative "egg/templates"
15
15
  require_relative "egg/configuration"
16
- require_relative "egg/docker_compose"
@@ -38,7 +38,6 @@ module Egg
38
38
  desc "build", "Just build the docker containers"
39
39
  def build
40
40
  config = Configuration.load "./egg_config.rb"
41
- config.write_docker_files
42
41
  config.docker_pull_build
43
42
  end
44
43
  end
@@ -22,17 +22,13 @@ module Egg
22
22
  warn e.backtrace.join("\n")
23
23
  end
24
24
 
25
- attr_accessor :docker_compose,
26
- :ssh_support,
27
- :ruby_version,
25
+ attr_accessor :ssh_support,
28
26
  :supervisor,
29
27
  :dotenv
30
28
 
31
29
  def initialize(&configuration_block)
32
- self.docker_compose = DockerCompose.new
33
30
  self.ssh_support = false
34
- self.ruby_version = "2.4"
35
- self.dotenv = DotenvUtil.new(File.read(".env.template"))
31
+ self.dotenv = DotenvUtil.new(File.read(".env.template")) if File.exist?(".env.template")
36
32
  instance_eval(&configuration_block)
37
33
  self
38
34
  end
@@ -64,19 +60,10 @@ module Egg
64
60
  end
65
61
 
66
62
  def run_setup
67
- write_docker_files
68
-
69
63
  docker_pull_build
70
- File.write(".env", dotenv.generate_env)
71
-
72
64
  run_after_startup
73
65
  end
74
66
 
75
- def write_docker_files
76
- dockerignore = Templates[".dockerignore"].result(binding)
77
- File.write(".dockerignore", dockerignore)
78
- end
79
-
80
67
  def docker_pull_build
81
68
  system("docker-compose pull")
82
69
  system("docker-compose build") || raise($CHILD_STATUS)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Egg
4
- VERSION = "0.9.0".freeze
4
+ VERSION = "0.10.0".freeze
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: egg
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
4
+ version: 0.10.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Carl Thuringer
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2017-11-22 00:00:00.000000000 Z
12
+ date: 2018-02-05 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: thor
@@ -145,12 +145,9 @@ files:
145
145
  - lib/egg.rb
146
146
  - lib/egg/cli.rb
147
147
  - lib/egg/configuration.rb
148
- - lib/egg/docker_compose.rb
149
- - lib/egg/docker_compose/service.rb
150
148
  - lib/egg/templates.rb
151
149
  - lib/egg/version.rb
152
150
  - templates/.dockerignore
153
- - templates/docker-compose.yml
154
151
  - templates/egg_config.rb
155
152
  - templates/supervisord.conf
156
153
  homepage: http://github.com/bellycard/egg
@@ -174,7 +171,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
174
171
  version: '0'
175
172
  requirements: []
176
173
  rubyforge_project:
177
- rubygems_version: 2.6.11
174
+ rubygems_version: 2.7.3
178
175
  signing_key:
179
176
  specification_version: 4
180
177
  summary: Egg helps you develop with Docker!
@@ -1,35 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require "yaml"
4
-
5
- # Wraps the generation of Docker Compose file
6
- class DockerCompose
7
- attr_reader :docker_compose,
8
- :services
9
-
10
- def initialize(_compose_config = {})
11
- @services = []
12
- print "Use of docker_compose is deprecated. Please craft the docker-compose.yml file yourself. This module will be dropped in a future egg."
13
- end
14
-
15
- def configure
16
- yield docker_compose
17
- end
18
-
19
- def to_yaml
20
- output = { "version" => "2" }
21
- output["services"] = services.each_with_object({}) do |service, hash|
22
- hash[service.name] = service.to_hash
23
- end
24
-
25
- output.to_yaml
26
- end
27
-
28
- def service(name)
29
- service = Service.new(name)
30
- services << service
31
- service
32
- end
33
- end
34
-
35
- require_relative "docker_compose/service"
@@ -1,41 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- class DockerCompose
4
- # Wraps the definition of docker-compose services
5
- class Service
6
- attr_reader :name, :links, :environment
7
- attr_accessor :dockerfile,
8
- :command,
9
- :ports,
10
- :volumes,
11
- :image
12
-
13
- def initialize(name)
14
- @name = name
15
-
16
- @links = []
17
- @environment = []
18
- end
19
-
20
- def link(service)
21
- @links << service.name
22
- end
23
-
24
- def env(variable, value)
25
- @environment << "#{variable}=#{value}"
26
- end
27
-
28
- def to_hash
29
- output = {
30
- "environment" => environment,
31
- "links" => links,
32
- "volumes" => volumes,
33
- "ports" => ports
34
- }
35
-
36
- image ? output["image"] = image : output["build"] = "."
37
- output["command"] = command if command
38
- output.each_with_object({}) { |(k, v), hash| hash[k] = v if v }
39
- end
40
- end
41
- end
@@ -1,10 +0,0 @@
1
- version: '2'
2
-
3
- services:
4
- app: &app
5
- build: .
6
- command: rails s -p 3000
7
- ports:
8
- - "3000:3000"
9
- volumes:
10
- - .:/app