minke 1.9.2 → 1.9.3

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
- YjMxOWI0OGVkOWM4NjdhMGZhNWQxMzdmNzM3NWYzZDQ5OTAwZGI4Yg==
4
+ MzM2NjJiN2ViZjQ5MDZkNWYxNzgzOTdjYWE1MWIzNDNmOWFiZGZhMQ==
5
5
  data.tar.gz: !binary |-
6
- N2VlNDlkNTU5YjNhNmZjNDc1MjM4MTc1MjIzYWM3YmRjOGY4ZDQ5Mw==
6
+ MjE1N2Y4MmFmNmFmYmNhMDQ0NDdhZGMxNzNjMTFlN2NkNjc0MTBkNA==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NWYyZDY3OTUwZGJhYzc2MjdiZmZmYjY4NmIzODViMWUwNDNkNzk0NzdmNDFj
10
- OGNjY2RjYTZlMTg2OGVhMDIxODc0NDNmYzQ2ZTI4YjJmNmU0NGRhYzQ4ODY3
11
- MTE2M2ZiODU1ZGZmZDBkYzhlMWIzOTU4Y2IyNDdmYzA2ZmRkYmM=
9
+ NTY3ZWQxNTRmYWVjMzcyNDk5OTJjODA0YjY0OTFjNjc2OTgzYmM2ZjJkMTM5
10
+ OTljOGU0ZmU1ZjdjNmEyMDc3ZWZiODg2Nzk0NmQzOTM0MThjMDE1YmJiZGM0
11
+ MTYwOTYyYTllZTM5MzE4NGJlNmM5OGZhOWNkY2FkNDY3YjgxNjM=
12
12
  data.tar.gz: !binary |-
13
- YmM0OTFiMjc5YTFmZWQ4NzI2OTk2OGU0MzQ5YWIyY2Q2ZWFmYzYyMTBiNDdj
14
- YzVlMmVkMTBmMWMwNGJiYjQ2NjMwOTJlMWM5NmQxNGM1YTEzMmY1OWY2YzZj
15
- ZTY0MGY1MjNjZTI5ODg2ZDVmYzY4YzU5ZmE1Yzc3YjBlNTE1ZDA=
13
+ ZTYzZWIxMzZjYmQ3MTVmZGMzODhmNGMzYjFkNjMzZGU5ZjliMDcyY2NmNDQ0
14
+ ODUzMzBiNGIzNjA4Nzg1MjA2MWNjZmI3ZmI1YTdlYzYzMzk3NjViOWFhMTE4
15
+ OGIwMmU0ZmI1YzY4NTI5ZjE1NTdhNDM1YWQzM2Q1YzVlYmY4Njk=
data/docker/Dockerfile CHANGED
@@ -9,5 +9,11 @@ RUN apt-get update -q \
9
9
  "https://github.com/docker/compose/releases/download/${COMPOSE_VERSION}/docker-compose-Linux-x86_64" \
10
10
  && chmod +x /usr/local/bin/docker-compose
11
11
 
12
+ RUN curl -sSL https://rvm.io/mpapis.asc | gpg --import -
13
+ RUN curl -sSL https://get.rvm.io | bash -s stable --ruby --with-gems="bundle"
14
+
12
15
  COPY ./Gemfile Gemfile
13
- RUN bundle install
16
+
17
+ RUN /bin/bash -c "source /usr/local/rvm/scripts/rvm && rvm @global do bundle install"
18
+
19
+ CMD ["source /usr/local/rvm/scripts/rvm"]
data/docker/Gemfile CHANGED
@@ -1,8 +1,12 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
3
  gem "rake"
4
- gem "cucumber", "~> 1.3.10"
4
+ gem "bundler"
5
+ gem "cucumber"
5
6
  gem "cucumber-rest-api", "= 0.3"
7
+ gem 'cucumber-api', '~> 0.3'
8
+ gem 'nokogiri'
9
+
6
10
  gem 'minke'
7
11
  gem 'minke-generator-swift'
8
12
  gem 'minke-generator-netmvc'
@@ -38,6 +38,7 @@ module Minke
38
38
 
39
39
  # write the shell script
40
40
  Minke::Generators::write_bash_script output_folder + "/_build/minke.sh"
41
+ Minke::Generators::create_rvm_files output_folder + "/_build/", "@variables.application_name
41
42
  end
42
43
 
43
44
  def build_image docker_file
@@ -2,12 +2,14 @@ module Minke
2
2
  module Generators
3
3
  SCRIPT = <<-EOF
4
4
  #!/bin/bash
5
-
6
5
  DOCKER_SOCK="/var/run/docker.sock:/var/run/docker.sock"
7
- BUNDLE_COMMAND="set :bundle_flags, \"--path \#{shared_path}/bundles --quiet\" && bundle install -j3 && bundle update"
6
+ BUNDLE_COMMAND="bundle install -j3 && bundle update"
8
7
  ERROR="Please specify a command e.g. ./minke.sh rake app:test"
9
8
  COMMAND=""
10
9
  NEW_UUID=$(base64 /dev/urandom | tr -d '/+' | head -c 32 | tr '[:upper:]' '[:lower:]')
10
+ GEMSET=$(<.ruby-gemset)
11
+ GEMSETFOLDER="/usr/local/rvm/gems/ruby-2.3.0@${GEMSET}"
12
+
11
13
 
12
14
  if [ "$1" == '' ]; then
13
15
  echo $ERROR;
@@ -20,7 +22,7 @@ module Minke
20
22
  echo "Running command: ${COMMAND}"
21
23
 
22
24
  eval "docker network create minke_${NEW_UUID}"
23
- eval "docker run --rm -it --net=minke_${NEW_UUID} -v ${DOCKER_SOCK} -v ${DIR}:${DIR} -e DOCKER_NETWORK=minke_${NEW_UUID} -w ${DIR}/_build nicholasjackson/minke /bin/bash -c '${BUNDLE_COMMAND} && ${COMMAND}'"
25
+ 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
26
  eval "docker network rm minke_${NEW_UUID}"
25
27
  EOF
26
28
 
@@ -29,6 +31,12 @@ module Minke
29
31
  File.chmod(0755, path)
30
32
  end
31
33
 
34
+ def create_rvm_files folder, application_name
35
+ File.write("#{folder}.ruby-gemset", application_name)
36
+ File.write("#{folder}.ruby-version", '2')
37
+ end
38
+
32
39
  module_function :write_bash_script
40
+ module_function :create_rvm_files
33
41
  end
34
42
  end
data/lib/minke/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Minke
2
- VERSION = "1.9.2"
2
+ VERSION = "1.9.3"
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.2
4
+ version: 1.9.3
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-22 00:00:00.000000000 Z
11
+ date: 2016-06-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler