cased-ruby 0.5.0 → 0.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/rubocop.yml +2 -2
- data/.github/workflows/ruby.yml +14 -3
- data/.rubocop.yml +2 -0
- data/.ruby-version +1 -1
- data/Gemfile.lock +76 -63
- data/README.md +12 -0
- data/cased-ruby.gemspec +20 -19
- data/gemfile-locks/Gemfile-activesupport-7.lock +143 -0
- data/gemfile-locks/Gemfile.lock +145 -0
- data/lib/cased/cli/asciinema/file.rb +2 -12
- data/lib/cased/cli/asciinema/writer.rb +2 -6
- data/lib/cased/cli/authentication.rb +1 -2
- data/lib/cased/cli/log.rb +2 -2
- data/lib/cased/cli/recorder.rb +2 -7
- data/lib/cased/cli/session.rb +1 -1
- data/lib/cased/http/error.rb +1 -2
- data/lib/cased/policy.rb +1 -2
- data/lib/cased/publishers/active_support_publisher.rb +6 -0
- data/lib/cased/publishers/test_publisher.rb +1 -0
- data/lib/cased/response.rb +1 -2
- data/lib/cased/sensitive/processor.rb +1 -2
- data/lib/cased/sensitive/range.rb +1 -1
- data/lib/cased/sensitive/string.rb +1 -2
- data/lib/cased/version.rb +1 -1
- data/lib/cased.rb +1 -1
- data/vendor/cache/activesupport-7.0.2.3.gem +0 -0
- data/vendor/cache/addressable-2.8.0.gem +0 -0
- data/vendor/cache/ast-2.4.2.gem +0 -0
- data/vendor/cache/byebug-11.1.3.gem +0 -0
- data/vendor/cache/concurrent-ruby-1.1.9.gem +0 -0
- data/vendor/cache/connection_pool-2.2.5.gem +0 -0
- data/vendor/cache/crack-0.4.5.gem +0 -0
- data/vendor/cache/docile-1.4.0.gem +0 -0
- data/vendor/cache/faraday-1.7.2.gem +0 -0
- data/vendor/cache/faraday-em_http-1.0.0.gem +0 -0
- data/vendor/cache/faraday-em_synchrony-1.0.0.gem +0 -0
- data/vendor/cache/faraday-httpclient-1.0.1.gem +0 -0
- data/vendor/cache/faraday-net_http_persistent-1.2.0.gem +0 -0
- data/vendor/cache/faraday-patron-1.0.0.gem +0 -0
- data/vendor/cache/faraday-rack-1.0.0.gem +0 -0
- data/vendor/cache/faraday_middleware-1.1.0.gem +0 -0
- data/vendor/cache/i18n-1.10.0.gem +0 -0
- data/vendor/cache/minitest-5.14.4.gem +0 -0
- data/vendor/cache/mocha-1.13.0.gem +0 -0
- data/vendor/cache/net-http-persistent-4.0.1.gem +0 -0
- data/vendor/cache/parallel-1.20.1.gem +0 -0
- data/vendor/cache/parser-3.0.2.0.gem +0 -0
- data/vendor/cache/public_suffix-4.0.6.gem +0 -0
- data/vendor/cache/rack-2.2.3.gem +0 -0
- data/vendor/cache/rack-protection-2.1.0.gem +0 -0
- data/vendor/cache/rake-13.0.6.gem +0 -0
- data/vendor/cache/redis-4.4.0.gem +0 -0
- data/vendor/cache/regexp_parser-2.1.1.gem +0 -0
- data/vendor/cache/rexml-3.2.5.gem +0 -0
- data/vendor/cache/rubocop-1.20.0.gem +0 -0
- data/vendor/cache/rubocop-ast-1.11.0.gem +0 -0
- data/vendor/cache/rubocop-performance-1.11.5.gem +0 -0
- data/vendor/cache/ruby-progressbar-1.11.0.gem +0 -0
- data/vendor/cache/ruby2_keywords-0.0.5.gem +0 -0
- data/vendor/cache/simplecov-html-0.12.3.gem +0 -0
- data/vendor/cache/subprocess-1.5.5.gem +0 -0
- data/vendor/cache/unicode-display_width-2.0.0.gem +0 -0
- data/vendor/cache/webmock-3.14.0.gem +0 -0
- data/vendor/cache/yard-0.9.26.gem +0 -0
- metadata +112 -99
- data/vendor/cache/activesupport-6.1.3.2.gem +0 -0
- data/vendor/cache/addressable-2.7.0.gem +0 -0
- data/vendor/cache/ast-2.4.0.gem +0 -0
- data/vendor/cache/byebug-11.0.1.gem +0 -0
- data/vendor/cache/concurrent-ruby-1.1.8.gem +0 -0
- data/vendor/cache/connection_pool-2.2.2.gem +0 -0
- data/vendor/cache/crack-0.4.3.gem +0 -0
- data/vendor/cache/docile-1.3.2.gem +0 -0
- data/vendor/cache/faraday-1.4.1.gem +0 -0
- data/vendor/cache/faraday-net_http_persistent-1.1.0.gem +0 -0
- data/vendor/cache/faraday_middleware-1.0.0.gem +0 -0
- data/vendor/cache/i18n-1.8.10.gem +0 -0
- data/vendor/cache/jaro_winkler-1.5.4.gem +0 -0
- data/vendor/cache/minitest-5.13.0.gem +0 -0
- data/vendor/cache/mocha-1.11.2.gem +0 -0
- data/vendor/cache/net-http-persistent-3.1.0.gem +0 -0
- data/vendor/cache/parallel-1.19.1.gem +0 -0
- data/vendor/cache/parser-2.7.1.3.gem +0 -0
- data/vendor/cache/public_suffix-4.0.5.gem +0 -0
- data/vendor/cache/rack-2.2.2.gem +0 -0
- data/vendor/cache/rack-protection-2.0.8.1.gem +0 -0
- data/vendor/cache/rake-10.5.0.gem +0 -0
- data/vendor/cache/redis-4.1.4.gem +0 -0
- data/vendor/cache/rubocop-0.78.0.gem +0 -0
- data/vendor/cache/rubocop-performance-1.5.2.gem +0 -0
- data/vendor/cache/ruby-progressbar-1.10.1.gem +0 -0
- data/vendor/cache/ruby2_keywords-0.0.4.gem +0 -0
- data/vendor/cache/safe_yaml-1.0.5.gem +0 -0
- data/vendor/cache/simplecov-html-0.12.2.gem +0 -0
- data/vendor/cache/subprocess-1.5.4.gem +0 -0
- data/vendor/cache/unicode-display_width-1.6.1.gem +0 -0
- data/vendor/cache/webmock-3.8.3.gem +0 -0
- data/vendor/cache/yard-0.9.24.gem +0 -0
- data/vendor/cache/zeitwerk-2.4.2.gem +0 -0
data/lib/cased/cli/log.rb
CHANGED
@@ -14,10 +14,10 @@ module Cased
|
|
14
14
|
def self.log(text)
|
15
15
|
puts string(text)
|
16
16
|
ensure
|
17
|
-
|
17
|
+
$stdout.flush
|
18
18
|
end
|
19
19
|
|
20
|
-
def self.color(text, color, bold = false)
|
20
|
+
def self.color(text, color, bold = false) # rubocop:disable Style/OptionalBooleanParameter
|
21
21
|
color = self.class.const_get(color.upcase) if color.is_a?(Symbol)
|
22
22
|
bold = bold ? BOLD : ''
|
23
23
|
"#{bold}#{color}#{text}#{CLEAR}"
|
data/lib/cased/cli/recorder.rb
CHANGED
@@ -8,12 +8,7 @@ module Cased
|
|
8
8
|
KEY = 'CASED_CLI_RECORDING'
|
9
9
|
TRUE = '1'
|
10
10
|
|
11
|
-
attr_reader :command
|
12
|
-
attr_reader :events
|
13
|
-
attr_reader :started_at
|
14
|
-
attr_reader :width
|
15
|
-
attr_reader :height
|
16
|
-
attr_reader :options
|
11
|
+
attr_reader :command, :events, :started_at, :width, :height, :options
|
17
12
|
attr_accessor :writer
|
18
13
|
|
19
14
|
# @return [Boolean] if CLI session is being recorded.
|
@@ -46,7 +41,7 @@ module Cased
|
|
46
41
|
writer.time do
|
47
42
|
Subprocess.check_call(command, options) do |t|
|
48
43
|
t.communicate do |stdout, _stderr|
|
49
|
-
|
44
|
+
$stdout.write(stdout)
|
50
45
|
|
51
46
|
writer << stdout.gsub("\n", "\r\n")
|
52
47
|
end
|
data/lib/cased/cli/session.rb
CHANGED
data/lib/cased/http/error.rb
CHANGED
data/lib/cased/policy.rb
CHANGED
@@ -5,6 +5,12 @@ require 'concurrent'
|
|
5
5
|
require 'active_support/notifications'
|
6
6
|
require 'cased/publishers/base'
|
7
7
|
|
8
|
+
begin
|
9
|
+
require 'active_support/isolated_execution_state'
|
10
|
+
rescue LoadError
|
11
|
+
# This is required for ActiveSupport 7.0 but not present in 6.1
|
12
|
+
end
|
13
|
+
|
8
14
|
module Cased
|
9
15
|
module Publishers
|
10
16
|
class ActiveSupportPublisher < Base
|
data/lib/cased/response.rb
CHANGED
@@ -20,7 +20,7 @@ module Cased
|
|
20
20
|
# Public: The end offset of the sensitive value in the original value.
|
21
21
|
attr_reader :end_offset
|
22
22
|
|
23
|
-
def initialize(
|
23
|
+
def initialize(key:, begin_offset:, end_offset:, label: nil, identifier: nil)
|
24
24
|
raise ArgumentError, 'missing key' if key.nil?
|
25
25
|
raise ArgumentError, 'missing begin_offset' if begin_offset.nil?
|
26
26
|
raise ArgumentError, 'missing end_offset' if end_offset.nil?
|
data/lib/cased/version.rb
CHANGED
data/lib/cased.rb
CHANGED
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|