eac_ruby_base0 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 48042393058f1ed14fb727e9689e820afd91bbbea1316a3dfc470bbd1c27276f
4
+ data.tar.gz: '009483ad302a73c9de908708a5983faa4e2c351be9a1efc200c545ce4fe89fad'
5
+ SHA512:
6
+ metadata.gz: fec3a21aea1fd9702724e46f0ff0e5d25b53a39f13dcbc2000a91583ff12cb39c4bcd15bba2eb286cc633f53a49064ee140f42fd9909e7b6380613a5610c5d18
7
+ data.tar.gz: f23aac7253a3615099c47d5a211fb49c898db5bfbd803d80fd28845a450190c14c22aab1a483b041eaed470e512bdb2fcabdb5e0e0d870121a289a7ca30532f5
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_ruby_utils/core_ext'
4
+
5
+ module EacRubyBase0
6
+ require_sub __FILE__
7
+ end
@@ -0,0 +1,37 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_ruby_utils/core_ext'
4
+
5
+ module EacRubyBase0
6
+ class Application
7
+ enable_simple_cache
8
+ common_constructor :gemspec_dir do
9
+ self.gemspec_dir = gemspec_dir.to_pathname
10
+ end
11
+
12
+ delegate :version, to: :self_gem
13
+
14
+ def all_gems
15
+ vendor_gems + [self_gem]
16
+ end
17
+
18
+ def vendor_dir
19
+ gemspec_dir.join('vendor')
20
+ end
21
+
22
+ private
23
+
24
+ def self_gem_uncached
25
+ ::EacRubyGemsUtils::Gem.new(gemspec_dir)
26
+ end
27
+
28
+ def vendor_gems_uncached
29
+ r = []
30
+ vendor_dir.children.each do |c|
31
+ vgem = ::EacRubyGemsUtils::Gem.new(c)
32
+ r << vgem if vgem.gemfile_path.exist?
33
+ end
34
+ r
35
+ end
36
+ end
37
+ end
@@ -0,0 +1,35 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_cli/default_runner'
4
+ require 'eac_ruby_utils/core_ext'
5
+
6
+ module EacRubyBase0
7
+ module Runner
8
+ require_sub __FILE__
9
+ common_concern do
10
+ include ::EacCli::DefaultRunner
11
+ runner_definition do
12
+ bool_opt '-q', '--quiet', 'Quiet mode.'
13
+ subcommands
14
+ alt do
15
+ bool_opt '-V', '--version', 'Show version.'
16
+ end
17
+ end
18
+ end
19
+
20
+ def run
21
+ on_speaker_node do |node|
22
+ node.stderr = ::StringIO.new if options.fetch('--quiet')
23
+ if options.fetch('--version')
24
+ show_version
25
+ else
26
+ run_with_subcommand
27
+ end
28
+ end
29
+ end
30
+
31
+ def show_version
32
+ out(context(:application).version + "\n")
33
+ end
34
+ end
35
+ end
@@ -0,0 +1,27 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_cli/default_runner'
4
+ require 'eac_ruby_utils/console/docopt_runner'
5
+ require 'eac_ruby_utils/core_ext'
6
+ require 'eac_ruby_gems_utils/tests/multiple'
7
+
8
+ module EacRubyBase0
9
+ module Runner
10
+ class TestAll < ::EacRubyUtils::Console::DocoptRunner
11
+ require_sub __FILE__
12
+ include ::EacCli::DefaultRunner
13
+
14
+ runner_definition do
15
+ desc 'Test core and local gems.'
16
+ end
17
+
18
+ def run
19
+ fatal_error 'Some test did not pass' unless tests.ok?
20
+ end
21
+
22
+ def tests_uncached
23
+ ::EacRubyGemsUtils::Tests::Multiple.new(context(:application).all_gems)
24
+ end
25
+ end
26
+ end
27
+ end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module EacRubyBase0
4
+ VERSION = '0.1.0'
5
+ end
metadata ADDED
@@ -0,0 +1,109 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: eac_ruby_base0
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Put here the authors
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2020-07-09 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: eac_cli
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '0.3'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '0.3'
27
+ - !ruby/object:Gem::Dependency
28
+ name: eac_ruby_gems_utils
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '0.6'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '0.6'
41
+ - !ruby/object:Gem::Dependency
42
+ name: eac_ruby_utils
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '0.39'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '0.39'
55
+ - !ruby/object:Gem::Dependency
56
+ name: eac_ruby_gem_support
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '0.1'
62
+ - - ">="
63
+ - !ruby/object:Gem::Version
64
+ version: 0.1.2
65
+ type: :development
66
+ prerelease: false
67
+ version_requirements: !ruby/object:Gem::Requirement
68
+ requirements:
69
+ - - "~>"
70
+ - !ruby/object:Gem::Version
71
+ version: '0.1'
72
+ - - ">="
73
+ - !ruby/object:Gem::Version
74
+ version: 0.1.2
75
+ description:
76
+ email:
77
+ executables: []
78
+ extensions: []
79
+ extra_rdoc_files: []
80
+ files:
81
+ - lib/eac_ruby_base0.rb
82
+ - lib/eac_ruby_base0/application.rb
83
+ - lib/eac_ruby_base0/runner.rb
84
+ - lib/eac_ruby_base0/runner/test_all.rb
85
+ - lib/eac_ruby_base0/version.rb
86
+ homepage:
87
+ licenses: []
88
+ metadata: {}
89
+ post_install_message:
90
+ rdoc_options: []
91
+ require_paths:
92
+ - lib
93
+ required_ruby_version: !ruby/object:Gem::Requirement
94
+ requirements:
95
+ - - ">="
96
+ - !ruby/object:Gem::Version
97
+ version: '0'
98
+ required_rubygems_version: !ruby/object:Gem::Requirement
99
+ requirements:
100
+ - - ">="
101
+ - !ruby/object:Gem::Version
102
+ version: '0'
103
+ requirements: []
104
+ rubyforge_project:
105
+ rubygems_version: 2.7.7
106
+ signing_key:
107
+ specification_version: 4
108
+ summary: Put here de description.
109
+ test_files: []