eac_launcher 0.3.1 → 0.3.2

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: 1d410f2c08231928e1531dda72287207d04477d1
4
- data.tar.gz: 40a329c0dbbddf47ff95cdb18d147eebca5ca5df
3
+ metadata.gz: cbf92881899793eadfed0da3d1f071b4c4e3ab2e
4
+ data.tar.gz: 2b6b80b197ac17d6f8fe0dd10dddce9c06b15769
5
5
  SHA512:
6
- metadata.gz: e1261386616cfd588ac8aa9ef95172c0592f4f01516fcee710b27bc1ff3ef283dc5a32cb4d888b73c85460d8c02366693f247e9f7c2bddc124bfaa7af7b6c912
7
- data.tar.gz: 8daf62a7b0877999962ab27bd10f4cb3b54248a38a56bb72540ddfc061d7ca6f80e9c8c6e5769e92df86d63c9f8ad03df85d125a2ed2c22725da09d1e6325cf9
6
+ metadata.gz: 5d248573f77e07ffc6603bd99688cd9918c4700e04799ae81b97670440efe1152965a9b924d960f67369ca6792848d9b117f21f7c5d969f2f9a8f6049eb21aae
7
+ data.tar.gz: c930ed45b92017191a9ec5fa96a93d1430742e69c77f06c948a0b162984ce8aba496068012848cdb4ab214cbb0574916f74af77de730a3443de8b0fbae277da8
@@ -46,11 +46,9 @@ module EacLauncher
46
46
  end
47
47
 
48
48
  def isolated_build_gem
49
- old_bundle_gemfile = ENV['BUNDLE_GEMFILE']
50
- ENV['BUNDLE_GEMFILE'] = nil
51
- EacRubyUtils::Envs.local.command('gem', 'build', gemspec_file).execute!
52
- ensure
53
- ENV['BUNDLE_GEMFILE'] = old_bundle_gemfile
49
+ on_clean_ruby do
50
+ EacRubyUtils::Envs.local.command('gem', 'build', gemspec_file).execute!
51
+ end
54
52
  end
55
53
 
56
54
  def check_gem_empty_size
@@ -84,6 +82,30 @@ module EacLauncher
84
82
  return if ::File.basename(output_file, '.gem') == spec.full_name
85
83
  raise("Builded gem is not the same version of gemspec (#{spec}, #{output_file})")
86
84
  end
85
+
86
+ def bundle_dependencies
87
+ gemfile = @gem_root.subpath('Gemfile')
88
+ return unless ::File.exist?(gemfile)
89
+ Dir.chdir(@gem_root) do
90
+ EacRubyUtils::Envs.local.command('bundle', 'install').execute!
91
+ end
92
+ end
93
+
94
+ def on_clean_ruby
95
+ on_clear_envvars('BUNDLE', 'RUBY') { yield }
96
+ end
97
+
98
+ def on_clear_envvars(*start_with_vars)
99
+ old_values = envvars_starting_with(start_with_vars)
100
+ old_values.keys.each { |k| ENV.delete(k) }
101
+ yield
102
+ ensure
103
+ old_values.each { |k, v| ENV[k] = v } if old_values
104
+ end
105
+
106
+ def envvars_starting_with(start_with_vars)
107
+ ENV.select { |k, _v| start_with_vars.any? { |var| k.start_with?(var) } }
108
+ end
87
109
  end
88
110
  end
89
111
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EacLauncher
4
- VERSION = '0.3.1'.freeze
4
+ VERSION = '0.3.2'.freeze
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eac_launcher
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Esquilo Azul Company
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-05-26 00:00:00.000000000 Z
11
+ date: 2018-05-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport