dockdev 0.3.2 → 0.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b6fb675e528e81ea170a3d49c89a3e191f6702b8f988ec979d90dfc8fd0734e8
4
- data.tar.gz: 6c687ac4fa54bc379c36e2311b5d7a73e28f69b4c325d725ea7e2d2e3868d28a
3
+ metadata.gz: ae98215aa8c67bca833b8a6d1c6845ba371a9585292b3ae655ebe3e9abc39ed8
4
+ data.tar.gz: b59ed76855649a092a037e556fd790372d75d17a8212a12f9f855e2462d7bcfa
5
5
  SHA512:
6
- metadata.gz: 0360cefb9a2f4e040b20c0835205af2c6fd8225f6fee1d7b73d5fe05c3e55af248a54a756374558e2ff9d9cf913fe2fde58bac5d503379f4894fb18400a60f4b
7
- data.tar.gz: 7806457e9d7409f25f145b9b955e7712d293444e6ee432853b34345f4166c4b4e43592da90b67b850d71170a240be7630ba2decaa716b3d42d8b1c86a187c221
6
+ metadata.gz: d8bba3afd72d45475389856f6e2284a9163c4ee6312ec344cb972091abb95d1598f27f2e8f3221e53ea6d5daa5decdb4deedf274499d03bb9efa08b8305854b5
7
+ data.tar.gz: 389d29a2e8f6bb00e1f5ca80ae7b6be2b8b42919e7e857912df7f1640ff4c2cdce1250d893c865a5b7e5bdbbeb59071e9538147de83be5474f8b39798b0cef77
@@ -25,6 +25,9 @@ module Dockdev
25
25
 
26
26
  if not mount_hash.nil? and mount_hash.is_a?(Hash)
27
27
 
28
+ script = ["#!/bin/bash"]
29
+ script << "alias be > /dev/null 2>&1 && echo 'alias be=bundle exec' >> ~/.bashrc"
30
+
28
31
  #
29
32
  # looking at source code
30
33
  # https://github.com/rubygems/rubygems/blob/master/bundler/lib/bundler/shared_helpers.rb#L246
@@ -35,12 +38,20 @@ module Dockdev
35
38
  if not d.source.nil?
36
39
  src = d.source
37
40
  if src.path.to_s != "."
38
- mount_hash[src.path.expand_path.to_s] = File.join(dir_inside_docker, d.name)
41
+ pathInsideDocker = File.join(dir_inside_docker, d.name)
42
+ mount_hash[src.path.expand_path.to_s] = pathInsideDocker
43
+ script << "bundle config --global local.#{d.name} #{pathInsideDocker}"
39
44
  #res[d.name] = src.path.expand_path.to_s
40
45
  end
41
46
  end
42
47
  end
43
48
 
49
+ scriptOut = File.join(@path,"to_be_executed_inside_docker.sh")
50
+ File.open(scriptOut,"w") do |f|
51
+ f.write script.join("\n")
52
+ end
53
+ `chmod +x #{scriptOut}`
54
+
44
55
  end
45
56
 
46
57
  mount_hash
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Dockdev
4
- VERSION = "0.3.2"
4
+ VERSION = "0.3.3"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dockdev
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris