eac_ruby_gems_utils 0.4.1 → 0.5.0
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 03ed15ab71663ad44165776c7ad4b0993af1a11b1886cb02118a46d31339f503
|
4
|
+
data.tar.gz: fe497eb1240ae1190394dab833df4814965fe852ce3df4c451edf570c9a7a912
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a7382fe287f7caeebeb731f0f33085aedaaa97185352088bb68e32fe7ac0443df1810e60562e9be16ebdcb9cfa982e2747654cf6a3ca191862784645dc0699de
|
7
|
+
data.tar.gz: e3fa0d3c3533ef63aaa396d54b40e958c69e6a472c903811d7c7e89c33f565e787cfb75bca150542a268497c31739252f74eed53dd7295d2d519f0adbd474b0b
|
@@ -8,13 +8,14 @@ module EacRubyGemsUtils
|
|
8
8
|
require_sub __FILE__
|
9
9
|
enable_simple_cache
|
10
10
|
|
11
|
-
|
12
|
-
|
11
|
+
GEMSPEC_EXTNAME = '.gemspec'
|
12
|
+
|
13
|
+
common_constructor :root do
|
13
14
|
@root = ::Pathname.new(root).expand_path
|
14
15
|
end
|
15
16
|
|
16
17
|
def to_s
|
17
|
-
|
18
|
+
name
|
18
19
|
end
|
19
20
|
|
20
21
|
def bundle(*args)
|
@@ -29,6 +30,18 @@ module EacRubyGemsUtils
|
|
29
30
|
::Bundler::LockfileParser.new(::Bundler.read_file(gemfile_lock_path))
|
30
31
|
end
|
31
32
|
|
33
|
+
def name
|
34
|
+
name_by_gemspec || name_by_path
|
35
|
+
end
|
36
|
+
|
37
|
+
def name_by_gemspec
|
38
|
+
gemspec_path.if_present { |v| v.basename(GEMSPEC_EXTNAME).to_path }
|
39
|
+
end
|
40
|
+
|
41
|
+
def name_by_path
|
42
|
+
root.basename.to_s
|
43
|
+
end
|
44
|
+
|
32
45
|
def rake(*args)
|
33
46
|
raise "File \"#{rakefile_path}\" does not exist" unless rakefile_path.exist?
|
34
47
|
|
@@ -45,6 +58,10 @@ module EacRubyGemsUtils
|
|
45
58
|
root.join('Gemfile.lock')
|
46
59
|
end
|
47
60
|
|
61
|
+
def gemspec_path_uncached
|
62
|
+
::Pathname.glob("#{root.to_path}/*#{GEMSPEC_EXTNAME}").first
|
63
|
+
end
|
64
|
+
|
48
65
|
def rakefile_path_uncached
|
49
66
|
root.join('Rakefile')
|
50
67
|
end
|
@@ -9,13 +9,17 @@ module EacRubyGemsUtils
|
|
9
9
|
class Multiple
|
10
10
|
enable_console_speaker
|
11
11
|
enable_simple_cache
|
12
|
-
common_constructor :gems
|
12
|
+
common_constructor :gems, :options, default: [{}]
|
13
13
|
set_callback :initialize, :after, :run
|
14
14
|
|
15
15
|
def ok?
|
16
16
|
failed_tests.none?
|
17
17
|
end
|
18
18
|
|
19
|
+
def only
|
20
|
+
options[:only]
|
21
|
+
end
|
22
|
+
|
19
23
|
private
|
20
24
|
|
21
25
|
def all_tests_uncached
|
@@ -33,7 +37,9 @@ module EacRubyGemsUtils
|
|
33
37
|
end
|
34
38
|
|
35
39
|
def decorated_gems_uncached
|
36
|
-
|
40
|
+
r = gems
|
41
|
+
r = r.select { |gem| only.include?(gem.name) } if only.present?
|
42
|
+
r.map { |gem| DecoratedGem.new(gem) }
|
37
43
|
end
|
38
44
|
|
39
45
|
def failed_tests_uncached
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: eac_ruby_gems_utils
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Esquilo Azul Company
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-06-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: eac_ruby_utils
|