eac_ruby_utils 0.81.0 → 0.84.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: 117028f86bd05a2b0ac4c20a34e486ce524241a85031992e22ba4afa596ca56c
4
- data.tar.gz: 3a41859f48637bbf64a7846741d50e56d91df95f87906a256ac4332fd3ba9b85
3
+ metadata.gz: fe70166b1c7ab7701947e23296770c81623de9468b35db56dd56cb170c82aaea
4
+ data.tar.gz: e2a691d4f517604d700b18f44ed5068cb226e94bf6ec5b861015de3a44a86c56
5
5
  SHA512:
6
- metadata.gz: 03140e219584a5544f3972cdcdb3050ec179ea7c2dd5dfcf0a1bbcb91b2dd20c077dd1be1c9a24e33c18937fecb0060b5b5126873b37e72efad2068ae217b121
7
- data.tar.gz: 9d4c7245ef22cf5c160d5c56451ce0e25c8faa0f1a230cd6acdcb72ae507a8fc0fdef335fa2fab1268498d975513d966fdab72a2fd5aa046f1d53c9686f47e7f
6
+ metadata.gz: 6aa220366d7d011386ba49d49578aa769bdbe55e727aa391a5de5b2af7c1a564ee38435d2cdd9eb320d580e1cbc320c2bf2c4d7fc4229db0413e4c38d69434d2
7
+ data.tar.gz: 8dc484964808a092679ad9b221d565a5831f591ef4587fa01e3a030ac306d98206ff028d91c0277bb437b2153dd1a327601b91cb4a0de8c84f5faa6841a9ccc7
@@ -2,6 +2,8 @@
2
2
 
3
3
  module EacRubyUtils
4
4
  class Context
5
+ delegate :any?, to: :stack
6
+
5
7
  def current
6
8
  optional_current || raise('No elements in context')
7
9
  end
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_ruby_utils/struct'
4
+
5
+ class Hash
6
+ # Returns an <tt>EacRubyUtils::Struct</tt> out of its receiver.
7
+ def to_struct
8
+ ::EacRubyUtils::Struct.new(self)
9
+ end
10
+ end
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'pathname'
4
+
5
+ class Pathname
6
+ # Execute .mkpath and return +self+.
7
+ # @return [Pathname]
8
+ def mkpath_s
9
+ mkpath
10
+ self
11
+ end
12
+ end
@@ -0,0 +1,39 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_ruby_utils/speaker/receiver'
4
+
5
+ module EacRubyUtils
6
+ module Rspec
7
+ class StubSpeaker
8
+ include ::EacRubyUtils::Speaker::Receiver
9
+
10
+ def error(_string); end
11
+
12
+ def fatal_error(string)
13
+ error(string)
14
+ raise('Fatal error')
15
+ end
16
+
17
+ # @see EacRubyUtils::Speaker::Sender.input
18
+ def input(_question, _options = {})
19
+ raise 'Input requested'
20
+ end
21
+
22
+ def info(_string); end
23
+
24
+ def infom(_string); end
25
+
26
+ def infov(*_args); end
27
+
28
+ def out(_string = ''); end
29
+
30
+ def puts(_string = ''); end
31
+
32
+ def success(_string); end
33
+
34
+ def title(_string); end
35
+
36
+ def warn(_string); end
37
+ end
38
+ end
39
+ end
@@ -5,8 +5,15 @@ require 'eac_ruby_utils/abstract_methods'
5
5
  module EacRubyUtils
6
6
  module Speaker
7
7
  module Receiver
8
+ extend ::ActiveSupport::Concern
8
9
  extend ::EacRubyUtils::AbstractMethods
9
10
 
11
+ module ClassMethods
12
+ def on(*args, &block)
13
+ ::EacRubyUtils::Speaker.context.on(new(*args), &block)
14
+ end
15
+ end
16
+
10
17
  def error(_string)
11
18
  raise_abstract_method(__method__)
12
19
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EacRubyUtils
4
- VERSION = '0.81.0'
4
+ VERSION = '0.84.0'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eac_ruby_utils
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.81.0
4
+ version: 0.84.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: 2021-12-06 00:00:00.000000000 Z
11
+ date: 2022-01-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -16,14 +16,20 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '4.0'
19
+ version: '4'
20
+ - - "<"
21
+ - !ruby/object:Gem::Version
22
+ version: '7'
20
23
  type: :runtime
21
24
  prerelease: false
22
25
  version_requirements: !ruby/object:Gem::Requirement
23
26
  requirements:
24
27
  - - ">="
25
28
  - !ruby/object:Gem::Version
26
- version: '4.0'
29
+ version: '4'
30
+ - - "<"
31
+ - !ruby/object:Gem::Version
32
+ version: '7'
27
33
  - !ruby/object:Gem::Dependency
28
34
  name: addressable
29
35
  requirement: !ruby/object:Gem::Requirement
@@ -172,6 +178,7 @@ files:
172
178
  - lib/eac_ruby_utils/patches/hash.rb
173
179
  - lib/eac_ruby_utils/patches/hash/options_consumer.rb
174
180
  - lib/eac_ruby_utils/patches/hash/sym_keys_hash.rb
181
+ - lib/eac_ruby_utils/patches/hash/to_struct.rb
175
182
  - lib/eac_ruby_utils/patches/kernel.rb
176
183
  - lib/eac_ruby_utils/patches/kernel/nyi.rb
177
184
  - lib/eac_ruby_utils/patches/module.rb
@@ -198,6 +205,7 @@ files:
198
205
  - lib/eac_ruby_utils/patches/object/to_pathname.rb
199
206
  - lib/eac_ruby_utils/patches/pathname.rb
200
207
  - lib/eac_ruby_utils/patches/pathname/basename_sub.rb
208
+ - lib/eac_ruby_utils/patches/pathname/mkpath_s.rb
201
209
  - lib/eac_ruby_utils/patches/pathname/parent_n.rb
202
210
  - lib/eac_ruby_utils/patches/regexp.rb
203
211
  - lib/eac_ruby_utils/patches/regexp/if_match.rb
@@ -215,6 +223,7 @@ files:
215
223
  - lib/eac_ruby_utils/rspec/setup.rb
216
224
  - lib/eac_ruby_utils/rspec/setup/conditionals.rb
217
225
  - lib/eac_ruby_utils/rspec/setup_manager.rb
226
+ - lib/eac_ruby_utils/rspec/stub_speaker.rb
218
227
  - lib/eac_ruby_utils/ruby.rb
219
228
  - lib/eac_ruby_utils/ruby/command.rb
220
229
  - lib/eac_ruby_utils/ruby/on_clean_environment.rb