dockdev 0.3.2 → 0.3.4

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: 0b7b86b883c97824f15ae36cd1a9978afef21a3a35e91ce572aeebc6f0478d22
4
+ data.tar.gz: c9785a3b8cfa52bfc921e03b8e1777f861ea384045f4d73586b6a7c4660c4552
5
5
  SHA512:
6
- metadata.gz: 0360cefb9a2f4e040b20c0835205af2c6fd8225f6fee1d7b73d5fe05c3e55af248a54a756374558e2ff9d9cf913fe2fde58bac5d503379f4894fb18400a60f4b
7
- data.tar.gz: 7806457e9d7409f25f145b9b955e7712d293444e6ee432853b34345f4166c4b4e43592da90b67b850d71170a240be7630ba2decaa716b3d42d8b1c86a187c221
6
+ metadata.gz: 680b7704599c9eb1baf14d64848cf78192d023b98ce6dfeb7d001afca8af457f2a881aec7111dce8ef2b8d983de7d85c924c0531a9dbe69b5730ab7f8e7653ce
7
+ data.tar.gz: 6423f6aa0b2a13a6df92f4a11902d4e6b0df8fa1e7d498a2df3bcc95904fddadebaa1a776e97dc7e67eb1d3c7294d042af6a831e895715595c52c5bb8b6b8510
@@ -25,6 +25,10 @@ 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
+ script << "echo 'alias be=bundle exec' >> ~/.bashrc"
31
+
28
32
  #
29
33
  # looking at source code
30
34
  # https://github.com/rubygems/rubygems/blob/master/bundler/lib/bundler/shared_helpers.rb#L246
@@ -35,12 +39,20 @@ module Dockdev
35
39
  if not d.source.nil?
36
40
  src = d.source
37
41
  if src.path.to_s != "."
38
- mount_hash[src.path.expand_path.to_s] = File.join(dir_inside_docker, d.name)
42
+ pathInsideDocker = File.join(dir_inside_docker, d.name)
43
+ mount_hash[src.path.expand_path.to_s] = pathInsideDocker
44
+ script << "bundle config --global local.#{d.name} #{pathInsideDocker}"
39
45
  #res[d.name] = src.path.expand_path.to_s
40
46
  end
41
47
  end
42
48
  end
43
49
 
50
+ scriptOut = File.join(@path,"to-be-executed-once-inside-docker.sh")
51
+ File.open(scriptOut,"w") do |f|
52
+ f.write script.join("\n")
53
+ end
54
+ `chmod +x #{scriptOut}`
55
+
44
56
  end
45
57
 
46
58
  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.4"
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.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris