dockerb 0.1.0 → 0.2.0

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: a81a3c5aff1e0173841b373f5eeb824d6d6b3cb0
4
- data.tar.gz: a64dabef24ce96b12bb66857fd644e67f33fc5f1
3
+ metadata.gz: 14d5e41c4d635b290a505132331122c259fce1d3
4
+ data.tar.gz: 3ddd2abea4d80f62f6ce84474f77b25d519a8f04
5
5
  SHA512:
6
- metadata.gz: 92c0cbeda3f9d9a3335db3d3f4e27f7f9919388448d5f013e67a795fc85a641f2c4b07b3f80dc08f737e4bc6debb8a4f7baa89e7e088ad93fff13bdef5f1371e
7
- data.tar.gz: 5f619a914b0398a5c2eff8b8e4afa3d216d6b79d007fc0841f7f0f1546dcb1189ae3d0ec7edef9c04f0ad02190f2eb84ede81c782ac2a691b7354dd07a9df6d9
6
+ metadata.gz: 99474e7578b8ebe576d04407908eb43c6482da4db61367488a07a96b21de8e9fdfdc6046adbfad1b8e04f00fc727be348e9c822a1df630418fc3da889270af99
7
+ data.tar.gz: dcea795e9c15eb366c15668b722f9453a8862c1d00ec4bc633bd451e6a009f3243c47674e63b1e79e888f69aaca16300d51f50c415da2281c949cb51c909e01c
@@ -1,3 +1,3 @@
1
1
  module Dockerb
2
- VERSION = "0.1.0"
2
+ VERSION = "0.2.0"
3
3
  end
data/lib/dockerb.rb CHANGED
@@ -26,13 +26,18 @@ module Dockerb
26
26
  ADD Gemfile /app/
27
27
  ADD Gemfile.lock /app/
28
28
  ADD vendor/cache /app/vendor/cache
29
- RUN bundle install --quiet --local --jobs 4 || bundle check
29
+ RUN (bundle install --quiet --local --jobs 4 || bundle check) && #{delete_gem_junk}
30
30
  EOF
31
31
  end
32
32
 
33
33
  def install_gem(name)
34
34
  version = File.read("Gemfile.lock")[/^ #{name} \((.+)\)/, 1] || raise("Gem #{name} not found in Gemfile.lock")
35
- "RUN gem install -v #{version} #{name}"
35
+ "RUN gem install -v #{version} #{name} && #{delete_gem_junk}"
36
+ end
37
+
38
+ # lower image size by not shipping test/spec/ext files
39
+ def delete_gem_junk
40
+ %{find /usr/local/lib/ruby/gems/*/gems/ -maxdepth 2 -name "ext" -o -name "test" -o -name "spec" | xargs rm -r}
36
41
  end
37
42
  end
38
43
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dockerb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Grosser
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-01-31 00:00:00.000000000 Z
11
+ date: 2015-02-20 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email: michael@grosser.it