minke 1.9.7 → 1.9.8

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
- ZmE2OGE0OGIwNzIxOGFmOGJhNDZkMzI3NGY2M2I4YjA0ZjNjZjE0YQ==
4
+ MTc1YmJiMDI0MTg5MjM0YWIyZjE4YTA1OWEzNmU1OTcyNTI5NzM0Zg==
5
5
  data.tar.gz: !binary |-
6
- Y2I5NjY2YmQxYzEwZmRlNmJiYmU4YTdmMDllNzEzOWY2YWRlNTk5OQ==
6
+ ZDc0ZGZjNzc3NTY3ZDU5MGMxZjBiNjczNDBiMGQ2N2E4NGI3ZWRkMA==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- Y2ZmYjMwNjliYWM0MDViOWNiZGI2NTg4NzhjNWM0N2JhM2FlOWVmOWExNjQy
10
- ZDY2OTYxNjRhYmFkZWMzNTkzMjM0ZjEzNDg5N2QzMzNjMmU4OWQ2OWM1NjA5
11
- YjIwYjhlMDQ0OGRlZmQ0ZDc0MTI0ZDdkM2E2ZjVkNzMyZTFjZWU=
9
+ OGI1NDRjOWM2YWVjMmY3NzYyZmRmMzNkOGJlNTBiMjllMGQ0NTVjZjg5NWNm
10
+ YjU0NjkyMWE4ZjlmNTNhYjA1NDUyY2M4NzVlZTJkODJlZTExYzQ5YzllMjZh
11
+ ZmFjOGMzM2IwNzYyZWJhMDdhZmZhYzZmZjg2MmRmMWI1NTljMzk=
12
12
  data.tar.gz: !binary |-
13
- OTYxNzE2YTJlNjA1ZWQyMWE4NDQyMzViZTQ2YzMyNmYyOTc2N2NkYjU4Mjdm
14
- Yzg2MjE5ZDg2ZWM0ZjJmOTU4OTcxYmE2Y2RlYzhlZmYzYzhiNDQzODY3N2Vk
15
- NDg3Mzc5MTQ0MzUyNGQ4NWY4NjhkMDA3ZTdkNTQ5MTI4YThjZWU=
13
+ NDY0NzkzMTVlZmMxOGNjYzFjOTJkYjMwZGUxOWY4ODAwOGJmMDNiYzViNTFm
14
+ ZDQ2YmU3OWQ1YWIxYjgwNjllZDNmMzMzZTc3OTE0YTk5ZjQ2NjVhMjgwYWZi
15
+ MzY0OTlmMDQzMzExN2JhMzcwNDc1OWEwNTU5NDEyZDM1ODhjM2E=
@@ -3,7 +3,7 @@ module Minke
3
3
  SCRIPT = <<-EOF
4
4
  #!/bin/bash
5
5
  DOCKER_SOCK="/var/run/docker.sock:/var/run/docker.sock"
6
- BUNDLE_COMMAND="source /usr/local/rvm/scripts/rvm && bundle install -j3 && bundle update"
6
+ RVM_COMMAND="source /usr/local/rvm/scripts/rvm"
7
7
  ERROR="Please specify a command e.g. ./minke.sh rake app:test"
8
8
  COMMAND=""
9
9
  NEW_UUID=$(base64 /dev/urandom | tr -d '/+' | head -c 32 | tr '[:upper:]' '[:lower:]')
@@ -21,7 +21,7 @@ module Minke
21
21
  echo "Running command: ${COMMAND}"
22
22
 
23
23
  eval "docker network create minke_${NEW_UUID}"
24
- eval "docker run --rm -it --net=minke_${NEW_UUID} -v ${DOCKER_SOCK} -v ${DIR}:${DIR} -v ${DIR}/_build/vendor/gems:${GEMSETFOLDER} -e DOCKER_NETWORK=minke_${NEW_UUID} -w ${DIR}/_build nicholasjackson/minke /bin/bash -c '${BUNDLE_COMMAND} && ${COMMAND}'"
24
+ eval "docker run --rm -it --net=minke_${NEW_UUID} -v ${DOCKER_SOCK} -v ${DIR}:${DIR} -v ${DIR}/_build/vendor/gems:${GEMSETFOLDER} -e DOCKER_NETWORK=minke_${NEW_UUID} -w ${DIR}/_build nicholasjackson/minke /bin/bash -c '${RVM_COMMAND} && ${COMMAND}'"
25
25
  eval "docker network rm minke_${NEW_UUID}"
26
26
  EOF
27
27
 
@@ -6,7 +6,7 @@ namespace :app do
6
6
 
7
7
  if @config.fetch != nil
8
8
  puts 'run fetch'
9
- runner = Minke::Tasks::Fetch.new @config, :fetch, @generator_config, @docker_runner, @docker_compose_factory, @service_discovery, @logger, @helper
9
+ runner = Minke::Tasks::Fetch.new @config, :fetch, @generator_config, @docker_runner, @docker_compose_factory, @service_discovery, @logger, @helper, @system_runner
10
10
  runner.run
11
11
  end
12
12
  end
@@ -16,7 +16,7 @@ namespace :app do
16
16
  create_dependencies
17
17
 
18
18
  if @config.build != nil
19
- runner = Minke::Tasks::Build.new @config, :build, @generator_config, @docker_runner, @docker_compose_factory, @service_discovery, @logger, @helper
19
+ runner = Minke::Tasks::Build.new @config, :build, @generator_config, @docker_runner, @docker_compose_factory, @service_discovery, @logger, @helper, @system_runner
20
20
  runner.run
21
21
  end
22
22
  end
@@ -26,7 +26,7 @@ namespace :app do
26
26
  create_dependencies
27
27
 
28
28
  if @config.test != nil
29
- runner = Minke::Tasks::Test.new @config, :test, @generator_config, @docker_runner, @docker_compose_factory, @service_discovery, @logger, @helper
29
+ runner = Minke::Tasks::Test.new @config, :test, @generator_config, @docker_runner, @docker_compose_factory, @service_discovery, @logger, @helper, @system_runner
30
30
  runner.run
31
31
  end
32
32
  end
@@ -36,7 +36,7 @@ namespace :app do
36
36
  create_dependencies
37
37
 
38
38
  if @config.build != nil
39
- runner = Minke::Tasks::BuildImage.new @config, :build, @generator_config, @docker_runner, @docker_compose_factory, @service_discovery, @logger, @helper
39
+ runner = Minke::Tasks::BuildImage.new @config, :build, @generator_config, @docker_runner, @docker_compose_factory, @service_discovery, @logger, @helper, @system_runner
40
40
  runner.run
41
41
  end
42
42
  end
@@ -46,7 +46,7 @@ namespace :app do
46
46
  create_dependencies
47
47
 
48
48
  if @config.run != nil
49
- runner = Minke::Tasks::Run.new @config, :run, @generator_config, @docker_runner, @docker_compose_factory, @service_discovery, @logger, @helper
49
+ runner = Minke::Tasks::Run.new @config, :run, @generator_config, @docker_runner, @docker_compose_factory, @service_discovery, @logger, @helper, @system_runner
50
50
  runner.run
51
51
  end
52
52
  end
@@ -59,7 +59,7 @@ namespace :app do
59
59
  create_dependencies
60
60
 
61
61
  if @config.cucumber != nil
62
- runner = Minke::Tasks::Cucumber.new @config, :cucumber, @generator_config, @docker_runner, @docker_compose_factory, @service_discovery, @logger, @helper
62
+ runner = Minke::Tasks::Cucumber.new @config, :cucumber, @generator_config, @docker_runner, @docker_compose_factory, @service_discovery, @logger, @helper, @system_runner
63
63
  runner.run
64
64
  end
65
65
  end
@@ -67,7 +67,7 @@ namespace :app do
67
67
  desc "push built image to Docker registry"
68
68
  task :push do
69
69
  create_dependencies
70
- runner = Minke::Tasks::Push.new @config, :cucumber, @generator_config, @docker_runner, @docker_compose_factory, @service_discovery, @logger, @helper
70
+ runner = Minke::Tasks::Push.new @config, :cucumber, @generator_config, @docker_runner, @docker_compose_factory, @service_discovery, @logger, @helper, @system_runner
71
71
  runner.run
72
72
  end
73
73
 
@@ -94,7 +94,7 @@ namespace :app do
94
94
 
95
95
  Minke::Generators::Processor.load_generators
96
96
  processor = Minke::Generators::Processor.new variables, @docker_runner
97
-
97
+
98
98
  @generator_config = processor.get_generator @config.generator_name
99
99
  end
100
100
 
@@ -4,9 +4,16 @@ module Minke
4
4
 
5
5
  def run args = nil
6
6
  puts "## Update dependencies"
7
+
8
+ puts '### Install gems'
9
+ @system_runner.execute('bundle install -j3 && bundle update')
10
+
11
+ puts '### Install generator dependencies'
7
12
  run_with_block do
8
- @generator_settings.build_settings.build_commands.fetch.each do |command|
9
- run_command_in_container command
13
+ if @generator_settings.build_settings.build_commands.fetch != nil
14
+ @generator_settings.build_settings.build_commands.fetch.each do |command|
15
+ run_command_in_container command
16
+ end
10
17
  end
11
18
  end
12
19
  end
@@ -4,7 +4,7 @@ module Minke
4
4
  # Task is a base implementation of a rake task such as fetch, build, etc
5
5
  class Task
6
6
 
7
- def initialize config, task, generator_settings, docker_runner, docker_compose_factory, service_discovery, logger, helper
7
+ def initialize config, task, generator_settings, docker_runner, docker_compose_factory, service_discovery, logger, helper, system_runner
8
8
  @config = config
9
9
  @task = task
10
10
  @generator_settings = generator_settings
@@ -13,6 +13,7 @@ module Minke
13
13
  @logger = logger
14
14
  @helper = helper
15
15
  @task_settings = config.send(task)
16
+ @system_runner = system_runner
16
17
 
17
18
  @build_image = @generator_settings.build_settings.docker_settings.image
18
19
  @build_image = config.build_image_for(task) unless config.build_image_for(task) == nil
@@ -92,7 +93,6 @@ module Minke
92
93
  "#{url.protocol}://#{address}#{url.path}"
93
94
  elsif url.type == 'public'
94
95
  address = @service_discovery.public_address_for url.address, url.port
95
-
96
96
  "#{url.protocol}://#{address}#{url.path}"
97
97
  end
98
98
  end
data/lib/minke/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Minke
2
- VERSION = "1.9.7"
2
+ VERSION = "1.9.8"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: minke
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.9.7
4
+ version: 1.9.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nic Jackson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-06-27 00:00:00.000000000 Z
11
+ date: 2016-06-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler