rake-compiler-dock 0.4.0 → 0.4.1

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
2
  SHA1:
3
- metadata.gz: 6c62efef1a82d18b2fd09f02ba508c683693b306
4
- data.tar.gz: c6908768b4f5af935e1080fad7f2f08d5942cfe4
3
+ metadata.gz: d972c1947e89297809fcea04b48cf9044de9f248
4
+ data.tar.gz: 83f36b3533e6940d3b37efda8290b17a72475e3c
5
5
  SHA512:
6
- metadata.gz: cba0c38a91c5325e7bfc9137f7b197da46064db824cb6f425b84854993a7dfcd4b5bf7e066f427b6205e72732f69fb43ce3da0d613062df07b100cc1d251e43b
7
- data.tar.gz: efed7ff1813b06cce9b396b208843146a19b4e0ed0f6a6def118655099ad378ce2bb3ceb2e64875ae21d3ee185ce99c4017420981edaaf185518c763ebe16fa5
6
+ metadata.gz: 86dc09c161ee24cb22087eb4753493a867c4ab3c431c3e62c1d386469b6a8cff628aa195f799bfcdc69d657d1d5469a7c89e4a9f0fb49b6e5e7793763c3ab37b
7
+ data.tar.gz: 0a380df5a0fe45293fd54c7f769a1997ae0d51bcf1299004054057ba8b53d1788b99d6fa17da035926ef18bf81692da8a3ca70411d1d95e8c9c53339d451b1ed
checksums.yaml.gz.sig CHANGED
Binary file
data.tar.gz.sig CHANGED
@@ -1,2 +1 @@
1
- K�cݗ`�Уw�.=_���hc�v��td��W:E�`�4�.�?��'_�כ3E]0���҃I������5�6��v�&����ß�Gћ�����j��Y���K���ĻO�MC���ްR��D�˫����l��w���鄍�|�TP庅���?��{WbȑA��09�\V�t�
2
- ,�m1ә���rwN)ZT0�z���*O|�U�e9�H�h��Us����r�lgcR&v������۔��
1
+ Y?�?m��fce���l��t1�+f���3_
data/History.md CHANGED
@@ -1,3 +1,10 @@
1
+ 0.4.1 / 2015-07-01
2
+ ------------------
3
+ * Make rake-compiler-dock compatible to ruby-1.8 to ease the usage in gems still supporting 1.8.
4
+ * Use separate VERSION and IMAGE_VERSION, to avoid unnecessary image downloads.
5
+ * Finetune help texts and add FAQ links.
6
+
7
+
1
8
  0.4.0 / 2015-06-29
2
9
  ------------------
3
10
  * Add support for OS-X.
data/Rakefile CHANGED
@@ -2,5 +2,5 @@ require "bundler/gem_tasks"
2
2
  require "rake_compiler_dock"
3
3
 
4
4
  task :build do
5
- sh "docker build -t larskanis/rake-compiler-dock:#{RakeCompilerDock::VERSION} ."
5
+ sh "docker build -t larskanis/rake-compiler-dock:#{RakeCompilerDock::IMAGE_VERSION} ."
6
6
  end
@@ -6,7 +6,7 @@ args = ARGV.empty? ? ['bash'] : ARGV.dup
6
6
 
7
7
  if $stdin.tty?
8
8
  # An interactive session should not leave the container on Ctrl-C
9
- args << {sigfw: false}
9
+ args << {:sigfw => false}
10
10
  end
11
11
 
12
12
  begin
@@ -7,14 +7,14 @@ module RakeCompilerDock
7
7
  NND = "#{ESC}0m"
8
8
 
9
9
  ColorMap = {
10
- black: 0,
11
- red: 1,
12
- green: 2,
13
- yellow: 3,
14
- blue: 4,
15
- magenta: 5,
16
- cyan: 6,
17
- white: 7,
10
+ :black => 0,
11
+ :red => 1,
12
+ :green => 2,
13
+ :yellow => 3,
14
+ :blue => 4,
15
+ :magenta => 5,
16
+ :cyan => 6,
17
+ :white => 7,
18
18
  }
19
19
 
20
20
  ColorMap.each do |color, code|
@@ -67,23 +67,33 @@ module RakeCompilerDock
67
67
  def b2d_start
68
68
  @b2d_start_text = `boot2docker start` rescue SystemCallError
69
69
  @b2d_start_status = $?.exitstatus
70
+ @b2d_start_envset = false
70
71
 
71
72
  if @b2d_start_status == 0
72
- @b2d_start_text.scan(/(unset |Remove-Item Env:\\)(?<key>.+?)$/) do |r, |
73
- io.puts " #{$&}"
73
+ io.puts @b2d_start_text
74
+ @b2d_start_text.scan(/(unset |Remove-Item Env:\\)(.+?)$/) do |_, key|
74
75
  ENV.delete(key)
76
+ @b2d_start_envset = true
75
77
  end
76
- @b2d_start_text.scan(/(export |\$Env:)(?<key>.+?)(=| = ")(?<val>.*?)(|\")$/) do |key, val|
77
- io.puts " #{$&}"
78
+ @b2d_start_text.scan(/(export |\$Env:)(.+?)(=| = ")(.*?)(|\")$/) do |_, key, _, val, _|
78
79
  ENV[key] = val
80
+ @b2d_start_envset = true
79
81
  end
80
82
  end
83
+
84
+ if @b2d_start_envset
85
+ io.puts yellow("Using above environment variables for starting rake-compiler-dock.")
86
+ end
81
87
  end
82
88
 
83
89
  def b2d_start_ok?
84
90
  @b2d_start_status == 0
85
91
  end
86
92
 
93
+ def b2d_start_has_env?
94
+ @b2d_start_envset
95
+ end
96
+
87
97
  def help_text
88
98
  help = []
89
99
  if !ok? && docker_client_avail? && !b2d_avail?
@@ -103,9 +113,11 @@ module RakeCompilerDock
103
113
  help << yellow("On SuSE")
104
114
  help << " sudo systemctl start docker"
105
115
  help << ""
106
- help << yellow("And re-check with '") + white("docker version") + yellow("'")
116
+ help << yellow("Then re-check with '") + white("docker version") + yellow("'")
117
+ help << yellow("or have a look at the FAQs: http://git.io/vtD2Z")
107
118
  else
108
- help << yellow(" Please check why '") + white("docker version") + yellow("' fails.")
119
+ help << yellow(" Please check why '") + white("docker version") + yellow("' fails")
120
+ help << yellow(" or have a look at the FAQs: http://git.io/vtD2Z")
109
121
  end
110
122
  elsif !ok? && !b2d_avail?
111
123
  case RUBY_PLATFORM
@@ -136,17 +148,25 @@ module RakeCompilerDock
136
148
  elsif !ok? && !b2d_init_ok?
137
149
  help << red("boot2docker is installed but couldn't be initialized.")
138
150
  help << ""
139
- help << yellow(" Please check why '") + white("boot2docker init") + yellow("' fails.")
151
+ help << yellow(" Please check why '") + white("boot2docker init") + yellow("' fails")
152
+ help << yellow(" or have a look at the FAQs: http://git.io/vtDBH")
140
153
  elsif !ok? && !b2d_start_ok?
141
154
  help << red("boot2docker is installed but couldn't be started.")
142
155
  help << ""
143
156
  help << yellow(" Please check why '") + white("boot2docker start") + yellow("' fails.")
144
- help << yellow(" You might need to re-init with '") + white("boot2docker delete") + yellow("'.")
157
+ help << yellow(" You might need to re-init with '") + white("boot2docker delete") + yellow("'")
158
+ help << yellow(" or have a look at the FAQs: http://git.io/vtDBH")
145
159
  elsif !ok? && b2d_start_ok?
146
160
  help << red("boot2docker is installed and started, but 'docker version' failed.")
147
161
  help << ""
148
- help << yellow(" Please check why '") + white("docker version") + yellow("' fails.")
149
- help << yellow(" You might need to re-init with '") + white("boot2docker delete") + yellow("'.")
162
+ if b2d_start_has_env?
163
+ help << yellow(" Please copy and paste above environment variables to your terminal")
164
+ help << yellow(" and check why '") + white("docker version") + yellow("' fails.")
165
+ else
166
+ help << yellow(" Please check why '") + white("docker version") + yellow("' fails.")
167
+ end
168
+ help << yellow(" You might need to re-init with '") + white("boot2docker delete") + yellow("'")
169
+ help << yellow(" or have a look at the FAQs: http://git.io/vtDBH")
150
170
  end
151
171
 
152
172
  help.join("\n")
@@ -15,7 +15,7 @@ module RakeCompilerDock
15
15
  end
16
16
 
17
17
  def image_name
18
- ENV['RAKE_COMPILER_DOCK_IMAGE'] || "larskanis/rake-compiler-dock:#{VERSION}"
18
+ ENV['RAKE_COMPILER_DOCK_IMAGE'] || "larskanis/rake-compiler-dock:#{IMAGE_VERSION}"
19
19
  end
20
20
 
21
21
  def exec(*args)
@@ -52,6 +52,8 @@ module RakeCompilerDock
52
52
  user = make_valid_name(`id -nu`.chomp)
53
53
  group = make_valid_name(`id -ng`.chomp)
54
54
 
55
+ drun_args = docker_opts + [image_name] + runargs
56
+
55
57
  cmd = ["docker", "run",
56
58
  "-v", "#{pwd}:#{make_valid_path(pwd)}",
57
59
  "-e", "UID=#{uid}",
@@ -62,9 +64,7 @@ module RakeCompilerDock
62
64
  "-e", "http_proxy=#{ENV['http_proxy']}",
63
65
  "-e", "https_proxy=#{ENV['https_proxy']}",
64
66
  "-w", make_valid_path(pwd),
65
- *docker_opts,
66
- image_name,
67
- *runargs]
67
+ *drun_args]
68
68
 
69
69
  cmdline = Shellwords.join(cmd)
70
70
  if verbose_flag(options) == true
@@ -107,7 +107,6 @@ module RakeCompilerDock
107
107
  check = DockerCheck.new($stderr)
108
108
  unless check.ok?
109
109
  at_exit do
110
- $stderr.puts
111
110
  check.print_help_text
112
111
  end
113
112
  raise DockerIsNotAvailable, "Docker is not available"
@@ -1,3 +1,4 @@
1
1
  module RakeCompilerDock
2
- VERSION = "0.4.0"
2
+ VERSION = "0.4.1"
3
+ IMAGE_VERSION = "0.4.0"
3
4
  end
@@ -13,7 +13,6 @@ Gem::Specification.new do |spec|
13
13
  Use rake-compiler-dock to enter an interactive shell session or add a task to your Rakefile to automate your cross build.}
14
14
  spec.homepage = "https://github.com/larskanis/rake-compiler-dock"
15
15
  spec.license = "MIT"
16
- spec.required_ruby_version = '>= 1.9.3'
17
16
 
18
17
  spec.files = `git ls-files -z`.split("\x0")
19
18
  spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rake-compiler-dock
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lars Kanis
@@ -10,26 +10,26 @@ bindir: bin
10
10
  cert_chain:
11
11
  - |
12
12
  -----BEGIN CERTIFICATE-----
13
- MIIDLjCCAhagAwIBAgIBAzANBgkqhkiG9w0BAQUFADA9MQ4wDAYDVQQDDAVrYW5p
14
- czEXMBUGCgmSJomT8ixkARkWB2NvbWNhcmQxEjAQBgoJkiaJk/IsZAEZFgJkZTAe
15
- Fw0xNTAyMjYxNDIyNDRaFw0xNjAyMjYxNDIyNDRaMD0xDjAMBgNVBAMMBWthbmlz
16
- MRcwFQYKCZImiZPyLGQBGRYHY29tY2FyZDESMBAGCgmSJomT8ixkARkWAmRlMIIB
17
- IjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEApop+rNmg35bzRugZ21VMGqI6
18
- HGzPLO4VHYncWn/xmgPU/ZMcZdfj6MzIaZJ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PyLGQBGRYCZGUwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDZb4Uv
18
+ RFJfRu/VEWiy3psh2jinETjiuBrL0NeRFGf8H7iU9+gx/DI/FFhfHGLrDeIskrJx
19
+ YIWDMmEjVO10UUdj7wu4ZhmU++0Cd7Kq9/TyP/shIP3IjqHjVLCnJ3P6f1cl5rxZ
20
+ gqo+d3BAoDrmPk0rtaf6QopwUw9RBiF8V4HqvpiY+ruJotP5UQDP4/lVOKvA8PI9
21
+ P0GmVbFBrbc7Zt5h78N3UyOK0u+nvOC23BvyHXzCtcFsXCoEkt+Wwh0RFqVZdnjM
22
+ LMO2vULHKKHDdX54K/sbVCj9pN9h1aotNzrEyo55zxn0G9PHg/G3P8nMvAXPkUTe
23
+ brhXrfCwWRvOXA4TAgMBAAGjOTA3MAkGA1UdEwQCMAAwCwYDVR0PBAQDAgSwMB0G
24
+ A1UdDgQWBBRAHK81igrXodaDj8a8/BIKsaZrETANBgkqhkiG9w0BAQUFAAOCAQEA
25
+ MSeqyuvnysrcVerV+iQHfW1k53W8sl0pA8f8t/VFp7fUfKXJ9K7AGby4y9xOsqII
26
+ AeHuFrYoCxgoJL2k088/IKdu5bsuJ4FWzDpIV70uSOZsPKhlBiLqDLvccFnB/XBe
27
+ 3qSVN9x1I/lkVT4j55MqKjvvkn5GCfKz6JLPHgwEihiV0qmgsX2uZnxU4JbAbI5R
28
+ 4NX+7Dq+AuZUp5MtQslByeESOalT3SBfXSQ8QkZPwMVstsRm2h+0kVRu/AQHiGwJ
29
+ 6jkDey5mE3jQb893U6ihl55uLkVQwxZZTq/flNWjTIcbbvKKafEGdGv5uOlB+KRL
30
+ PRtgPFlA2jDgUr1EPAIH1Q==
31
31
  -----END CERTIFICATE-----
32
- date: 2015-06-29 00:00:00.000000000 Z
32
+ date: 2015-07-01 00:00:00.000000000 Z
33
33
  dependencies:
34
34
  - !ruby/object:Gem::Dependency
35
35
  name: bundler
@@ -104,7 +104,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
104
104
  requirements:
105
105
  - - ">="
106
106
  - !ruby/object:Gem::Version
107
- version: 1.9.3
107
+ version: '0'
108
108
  required_rubygems_version: !ruby/object:Gem::Requirement
109
109
  requirements:
110
110
  - - ">="
@@ -117,3 +117,4 @@ signing_key:
117
117
  specification_version: 4
118
118
  summary: Docker based cross compiler environment for building binary windows gems.
119
119
  test_files: []
120
+ has_rdoc:
metadata.gz.sig CHANGED
@@ -1,3 +1,2 @@
1
- \
2
- P)m���%�����:�Y�� U�����5���ɰ�o���I-Ȃ�is�� ��B���xx��}n�����'��으�'�q��� -iu��AB�;ƆfLs�\���"��ތ$�;� MU��17pZ��Mx���b蹄�[��oW�*�0 � ;����� akL dW<S; !.N(���
3
- h׀"�I�-�6�z
1
+ G��0 ���{��n��L�\�d�����δ�[`�{����i,�31����#`Ȇp���c��y+t�A�l��W��SڎS>��s�?E0�7{\_ׯ-l��-�yX�����خT�^�@�R��簫����En�)T <N� ���oHN���c }R`�ſ{�!?X�F�x�I���&,�Bm�x��J�~���T�^�0�T�h���
2
+ ��3�dz!1,� [eLJ vw8y��Ԍ��1IHGQ�s�����lӝ