ext_bundler 2.0.3 → 2.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ext_bundler/version.rb +1 -1
- data/lib/ext_bundler.rb +10 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e68d432372e10b0aba398b32c1e0bd2f1f8c6c26
|
4
|
+
data.tar.gz: f57467044d096114632e1683cdb7678aef24e13c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5210b9e0aff4c5da09d3052f0f213d88ac5f3d3aa9e0540bd4deb6e97079912155ed8ddcc1ddc0e150e29f5390bbe70fa186f7b363e9460550b9a551a56be5cb
|
7
|
+
data.tar.gz: bce870548e1402ac548a54f24e930e4d640e723bc88ee0252b03601c6352bd3290c6f07e319cd8ec8e65acc9ac4abe092cb80127c432f2976cdf418f3ce87c34
|
data/lib/ext_bundler/version.rb
CHANGED
data/lib/ext_bundler.rb
CHANGED
@@ -3,12 +3,20 @@ module ExtBundler
|
|
3
3
|
if names.is_a? Hash
|
4
4
|
@@gem_dev = names
|
5
5
|
self.class.send :define_singleton_method, :gem_dev do
|
6
|
-
|
6
|
+
env = defined?(Rails.env) ? Rails.env.to_sym : false
|
7
|
+
@@gem_dev.find_all do |_gem, options|
|
8
|
+
groups = options[:groups]
|
9
|
+
options[:require] && (groups.empty? || groups.include?(env))
|
10
|
+
end.map(&:first).each{ |gem| require gem }
|
7
11
|
end
|
8
12
|
else
|
13
|
+
# TODO allow multiple paths
|
9
14
|
@gem_dev_path ||= File.readlines('.gem-dev').first.strip if File.exist?('.gem-dev')
|
10
15
|
@@gem_dev[names.to_sym] ? gem(names, path: "#{@gem_dev_path}/#{names}", require: false) : gem(names, *args)
|
11
|
-
@@gem_dev[names.to_sym] =
|
16
|
+
@@gem_dev[names.to_sym] = {
|
17
|
+
require: (args.last.is_a?(Hash) ? args.last : {})[:require].nil?,
|
18
|
+
groups: @groups.dup,
|
19
|
+
}
|
12
20
|
end
|
13
21
|
end
|
14
22
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ext_bundler
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Patrice Lebel
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-11-
|
11
|
+
date: 2017-11-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|