ruby_slime 0.0.4 → 0.0.6
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 +4 -4
- data/lib/ruby_slime/command.rb +4 -4
- data/lib/ruby_slime/dry/stripped_string.rb +7 -0
- data/lib/ruby_slime/dry.rb +8 -0
- data/lib/ruby_slime/jwt_kit/api_verifier.rb +29 -48
- data/lib/ruby_slime/jwt_kit/encrypted_verifier.rb +79 -0
- data/lib/ruby_slime/jwt_kit/generic_verifier.rb +66 -0
- data/lib/ruby_slime/jwt_kit/handling_helper.rb +0 -17
- data/lib/ruby_slime/jwt_kit/schema_violation.rb +8 -0
- data/lib/ruby_slime/jwt_kit.rb +1 -0
- data/lib/ruby_slime/mongoid/query_sharding.rb +44 -0
- data/lib/ruby_slime/mongoid/state.rb +15 -3
- data/lib/ruby_slime/mongoid.rb +1 -0
- data/lib/ruby_slime/object_sharing.rb +15 -9
- data/lib/ruby_slime/process_helper.rb +11 -1
- data/lib/ruby_slime/rake/development_sync.rb +58 -36
- data/lib/ruby_slime/transitory_event.rb +7 -0
- data/lib/ruby_slime/version.rb +1 -1
- data/lib/ruby_slime.rb +1 -1
- metadata +26 -6
- data/lib/ruby_slime/jwt_kit/token_error.rb +0 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c387c47639713c2dbb2d38397219dd596509fddb83bd2fa57f994a402d66b1ed
|
4
|
+
data.tar.gz: a1cacebbd7bba6821dd3f3ec963ce285182c6adf4f9085811f37cc1e8c50cee8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 65a5347e85d356d49fc23df497e9d9c9cef4396da91ea2794fef473a3a3daab14e03605a9f96d9d9f42ec1602cc1a9b2ef3997dd8abc6fe3510cd103df94eaf8
|
7
|
+
data.tar.gz: 1d98558ae355d928b129867e40d73bcc932dd07ff9eb9533031f9d8d43d4e12dfe536eb9e8403025d5af2340d408473a2d6de138130a4676c0e1e03cb22c099e
|
data/lib/ruby_slime/command.rb
CHANGED
@@ -17,9 +17,9 @@ module RubySlime
|
|
17
17
|
end
|
18
18
|
end
|
19
19
|
|
20
|
-
def
|
21
|
-
@
|
22
|
-
normalized =
|
20
|
+
def validated_attributes
|
21
|
+
@validated_attributes__immutable_cache ||= begin
|
22
|
+
normalized = attributes.compact
|
23
23
|
schema = self.class._applied_schema
|
24
24
|
return normalized unless schema
|
25
25
|
result = schema.call(normalized)
|
@@ -28,6 +28,6 @@ module RubySlime
|
|
28
28
|
end
|
29
29
|
end
|
30
30
|
|
31
|
-
def_delegators :
|
31
|
+
def_delegators :validated_attributes, :[], :values_at
|
32
32
|
end
|
33
33
|
end
|
@@ -2,63 +2,44 @@
|
|
2
2
|
|
3
3
|
module RubySlime
|
4
4
|
module JWTKit
|
5
|
-
class APIVerifier
|
6
|
-
include ObjectSharing
|
7
|
-
|
5
|
+
class APIVerifier < GenericVerifier
|
8
6
|
def initialize(
|
9
7
|
fetch_secret:,
|
10
8
|
handle_result:
|
11
9
|
)
|
12
|
-
|
13
|
-
|
10
|
+
super(
|
11
|
+
fetch_secret: fetch_secret,
|
12
|
+
handle_result: handle_result,
|
13
|
+
**P_APIVariation.instance.then do |holder|
|
14
|
+
{
|
15
|
+
required_claims: holder.required_claims,
|
16
|
+
payload_schema: holder.payload_schema,
|
17
|
+
}
|
18
|
+
end,
|
19
|
+
)
|
14
20
|
end
|
15
21
|
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
::JWT.decode(token_result[:token], nil, true, {
|
23
|
-
algorithm: 'HS256',
|
24
|
-
required_claims: %w[aud iat sub],
|
25
|
-
}) do |header_section|
|
26
|
-
validated_cache[:header] ||= check_jwt_section(header_section, :header_schema)
|
27
|
-
@fetch_secret.call(validated_cache[:header])
|
28
|
-
end.then do |sections|
|
29
|
-
payload_section, header_section = sections
|
30
|
-
validated_cache[:header] ||= check_jwt_section(header_section, :header_schema)
|
31
|
-
validated_cache[:payload] ||= check_jwt_section(payload_section, :payload_schema)
|
32
|
-
validated_cache.values_at(:payload, :header)
|
33
|
-
end.then do |sections|
|
34
|
-
@handle_result.call(*sections)
|
35
|
-
end
|
36
|
-
end
|
22
|
+
class P_APIVariation
|
23
|
+
include ::Singleton
|
24
|
+
attr_reader(*%i[
|
25
|
+
required_claims
|
26
|
+
payload_schema
|
27
|
+
])
|
37
28
|
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
29
|
+
def initialize
|
30
|
+
@required_claims = %w[aud iat sub]
|
31
|
+
@payload_schema = ::Dry::Schema.Params do
|
32
|
+
required(:aud).filled(:string)
|
33
|
+
required(:iat).value(:integer, gt?: 0)
|
34
|
+
required(:sub).filled(:string)
|
35
|
+
optional(:data).hash
|
36
|
+
end
|
37
|
+
super
|
38
|
+
freeze
|
39
|
+
end
|
44
40
|
end
|
45
41
|
|
46
|
-
|
47
|
-
token_schema: ::Dry::Schema.Params do
|
48
|
-
required(:token).filled(:string)
|
49
|
-
end,
|
50
|
-
header_schema: ::Dry::Schema.Params do
|
51
|
-
optional(:typ).filled(:string).value(eql?: 'JWT')
|
52
|
-
required(:alg).filled(:string).value(eql?: 'HS256')
|
53
|
-
required(:kid).filled(:string)
|
54
|
-
end,
|
55
|
-
payload_schema: ::Dry::Schema.Params do
|
56
|
-
required(:aud).filled(:string)
|
57
|
-
required(:iat).value(:integer, gt?: 0)
|
58
|
-
required(:sub).filled(:string)
|
59
|
-
optional(:data).hash
|
60
|
-
end,
|
61
|
-
})
|
42
|
+
private_constant :P_APIVariation
|
62
43
|
end
|
63
44
|
end
|
64
45
|
end
|
@@ -0,0 +1,79 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module RubySlime
|
4
|
+
module JWTKit
|
5
|
+
class EncryptedVerifier
|
6
|
+
def initialize(
|
7
|
+
fetch_secret:,
|
8
|
+
handle_result:,
|
9
|
+
payload_schema:
|
10
|
+
)
|
11
|
+
@fetch_secret = fetch_secret
|
12
|
+
@handle_result = handle_result
|
13
|
+
@payload_schema = payload_schema
|
14
|
+
end
|
15
|
+
|
16
|
+
def call(token)
|
17
|
+
raise ::JWT::DecodeError, 'Invalid token format!' unless token.is_a?(::String)
|
18
|
+
header = P_GenericCache.instance.header_extract.match(token)
|
19
|
+
raise ::JWT::DecodeError, 'Invalid token format!' unless header
|
20
|
+
header = header[1].then do |encoded|
|
21
|
+
::Base64.urlsafe_decode64(encoded)
|
22
|
+
rescue ::ArgumentError
|
23
|
+
raise ::JWT::DecodeError, 'Invalid token format!'
|
24
|
+
end.then do |json_string|
|
25
|
+
::JSON.parse(json_string, symbolize_names: true)
|
26
|
+
rescue ::TypeError, ::JSON::JSONError
|
27
|
+
raise ::JWT::DecodeError, 'Invalid token format!'
|
28
|
+
end
|
29
|
+
checked_header = check_jwt_section(header, P_GenericCache.instance.header_schema)
|
30
|
+
secret = @fetch_secret.call(checked_header)
|
31
|
+
begin
|
32
|
+
::JWE.decrypt(token, secret)
|
33
|
+
rescue ::ArgumentError
|
34
|
+
# (invalid base64: jwe (0.4.0) lib/jwe/base64.rb:14:in `jwe_decode')
|
35
|
+
raise ::JWT::DecodeError, 'Invalid token format!'
|
36
|
+
end.then do |encoded|
|
37
|
+
::JSON.parse(encoded, symbolize_names: true)
|
38
|
+
rescue ::TypeError, ::JSON::JSONError
|
39
|
+
raise ::JWT::DecodeError, 'Invalid payload format!'
|
40
|
+
end.then do |payload|
|
41
|
+
check_jwt_section(payload, @payload_schema)
|
42
|
+
end.then do |payload|
|
43
|
+
@handle_result.call(payload, header)
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
private
|
48
|
+
|
49
|
+
def check_jwt_section(section, schema)
|
50
|
+
section_result = schema.call(section)
|
51
|
+
raise SchemaViolation.new(section_result.errors) unless section_result.success?
|
52
|
+
section_result.to_h
|
53
|
+
end
|
54
|
+
|
55
|
+
class P_GenericCache
|
56
|
+
include ::Singleton
|
57
|
+
attr_reader(*%i[
|
58
|
+
header_extract
|
59
|
+
header_schema
|
60
|
+
])
|
61
|
+
|
62
|
+
def initialize
|
63
|
+
@header_extract = /\A([-_0-9A-Za-z]+)\./
|
64
|
+
@header_schema = ::Dry::Schema.Params do
|
65
|
+
optional(:typ).filled(:string).value(eql?: 'JWT')
|
66
|
+
optional(:zip).filled(:string)
|
67
|
+
required(:alg).filled(:string)
|
68
|
+
required(:enc).filled(:string)
|
69
|
+
required(:kid).filled(:string)
|
70
|
+
end
|
71
|
+
super
|
72
|
+
freeze
|
73
|
+
end
|
74
|
+
end
|
75
|
+
|
76
|
+
private_constant :P_GenericCache
|
77
|
+
end
|
78
|
+
end
|
79
|
+
end
|
@@ -0,0 +1,66 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module RubySlime
|
4
|
+
module JWTKit
|
5
|
+
class GenericVerifier
|
6
|
+
def initialize(
|
7
|
+
fetch_secret:,
|
8
|
+
handle_result:,
|
9
|
+
required_claims:,
|
10
|
+
payload_schema:
|
11
|
+
)
|
12
|
+
@fetch_secret = fetch_secret
|
13
|
+
@handle_result = handle_result
|
14
|
+
@required_claims = required_claims
|
15
|
+
@payload_schema = payload_schema
|
16
|
+
end
|
17
|
+
|
18
|
+
def call(token)
|
19
|
+
validated_cache = {}
|
20
|
+
::JWT.decode(token, nil, true, {
|
21
|
+
algorithm: 'HS256',
|
22
|
+
required_claims: @required_claims,
|
23
|
+
}) do |header_section|
|
24
|
+
@fetch_secret.call(
|
25
|
+
validated_cache[:header] ||= check_jwt_section(header_section, P_GenericCache.instance.header_schema),
|
26
|
+
)
|
27
|
+
end.then do |sections|
|
28
|
+
payload_section, header_section = sections
|
29
|
+
[
|
30
|
+
validated_cache[:header] ||= check_jwt_section(header_section, P_GenericCache.instance.header_schema),
|
31
|
+
validated_cache[:payload] ||= check_jwt_section(payload_section, @payload_schema),
|
32
|
+
].reverse
|
33
|
+
end.then do |sections|
|
34
|
+
@handle_result.call(*sections)
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
private
|
39
|
+
|
40
|
+
def check_jwt_section(section, schema)
|
41
|
+
section_result = schema.call(section)
|
42
|
+
raise SchemaViolation.new(section_result.errors) unless section_result.success?
|
43
|
+
section_result.to_h
|
44
|
+
end
|
45
|
+
|
46
|
+
class P_GenericCache
|
47
|
+
include ::Singleton
|
48
|
+
attr_reader(*%i[
|
49
|
+
header_schema
|
50
|
+
])
|
51
|
+
|
52
|
+
def initialize
|
53
|
+
@header_schema = ::Dry::Schema.Params do
|
54
|
+
optional(:typ).filled(:string).value(eql?: 'JWT')
|
55
|
+
required(:alg).filled(:string).value(eql?: 'HS256')
|
56
|
+
required(:kid).filled(:string)
|
57
|
+
end
|
58
|
+
super
|
59
|
+
freeze
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
63
|
+
private_constant :P_GenericCache
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
@@ -3,25 +3,8 @@
|
|
3
3
|
module RubySlime
|
4
4
|
module JWTKit
|
5
5
|
module HandlingHelper
|
6
|
-
extend ::Forwardable
|
7
|
-
|
8
6
|
private
|
9
7
|
|
10
|
-
def_delegators :@controller,
|
11
|
-
:params,
|
12
|
-
:redirect_to,
|
13
|
-
:render
|
14
|
-
|
15
|
-
def initialize_helper(controller, payload, header = nil)
|
16
|
-
@controller = controller
|
17
|
-
@payload = payload
|
18
|
-
@header = header
|
19
|
-
end
|
20
|
-
|
21
|
-
def jwt_params(*permit)
|
22
|
-
@payload.fetch(:data, {}).slice(*permit)
|
23
|
-
end
|
24
|
-
|
25
8
|
def render_data(data_hash)
|
26
9
|
render json: {
|
27
10
|
data: data_hash,
|
data/lib/ruby_slime/jwt_kit.rb
CHANGED
@@ -0,0 +1,44 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module RubySlime
|
4
|
+
module Mongoid
|
5
|
+
module QuerySharding
|
6
|
+
class InvalidShard < ::ArgumentError
|
7
|
+
end
|
8
|
+
|
9
|
+
extend ::ActiveSupport::Concern
|
10
|
+
|
11
|
+
included do
|
12
|
+
lambda do |hex_string|
|
13
|
+
Integer(hex_string, 16) & 0x7fffffff
|
14
|
+
end.then do |apply_mask|
|
15
|
+
proc do
|
16
|
+
::SecureRandom.hex(4).then(&apply_mask)
|
17
|
+
end
|
18
|
+
end.tap do |value_proc|
|
19
|
+
field :_qsk, as: :query_shard_key, type: :integer, default: value_proc
|
20
|
+
end
|
21
|
+
|
22
|
+
proc do |shard_count, shard_number|
|
23
|
+
raise InvalidShard unless shard_count.respond_to?(:<=)
|
24
|
+
raise InvalidShard unless shard_number.respond_to?(:<)
|
25
|
+
begin
|
26
|
+
raise InvalidShard unless 0 < shard_count
|
27
|
+
raise InvalidShard unless shard_count <= 1024
|
28
|
+
raise InvalidShard unless 0 <= shard_number
|
29
|
+
raise InvalidShard unless shard_number < shard_count
|
30
|
+
rescue ::ArgumentError
|
31
|
+
raise InvalidShard
|
32
|
+
end
|
33
|
+
where({
|
34
|
+
query_shard_key: {
|
35
|
+
'$mod': [shard_count, shard_number],
|
36
|
+
},
|
37
|
+
})
|
38
|
+
end.tap do |scope_proc|
|
39
|
+
scope :query_shard, scope_proc
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
@@ -4,11 +4,23 @@ module RubySlime
|
|
4
4
|
module Mongoid
|
5
5
|
class State
|
6
6
|
include ::Mongoid::Document
|
7
|
+
include QuerySharding
|
7
8
|
store_in collection: 'process_states'
|
8
9
|
|
9
|
-
field :state, type:
|
10
|
-
field :next_position, type:
|
11
|
-
field :lock_version, type:
|
10
|
+
field :_s, as: :state, type: :hash, default: {}
|
11
|
+
field :_np, as: :next_position, type: :integer, default: 1
|
12
|
+
field :_lv, as: :lock_version, type: :integer, default: 0
|
13
|
+
proc do
|
14
|
+
::BSON::ObjectId.new
|
15
|
+
end.tap do |value_proc|
|
16
|
+
field :_c, as: :creation_id, type: :object_id, default: value_proc
|
17
|
+
end
|
18
|
+
|
19
|
+
index({
|
20
|
+
creation_id: 1,
|
21
|
+
}, {
|
22
|
+
name: 'index_46d82576f9',
|
23
|
+
})
|
12
24
|
end
|
13
25
|
end
|
14
26
|
end
|
data/lib/ruby_slime/mongoid.rb
CHANGED
@@ -5,16 +5,22 @@ module RubySlime
|
|
5
5
|
extend ::ActiveSupport::Concern
|
6
6
|
|
7
7
|
class_methods do
|
8
|
-
attr_reader :_object_sharing_cache
|
9
|
-
|
10
8
|
private def share_objects(objects_hash)
|
11
|
-
(@
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
9
|
+
_carrier = (@_object_sharing_carrier ||= {}).tap do |base|
|
10
|
+
base.merge!(objects_hash)
|
11
|
+
end
|
12
|
+
if !method_defined?(:shared_objects)
|
13
|
+
define_method(:shared_objects) do
|
14
|
+
_carrier
|
15
|
+
end
|
16
|
+
else
|
17
|
+
define_method(:shared_objects) do
|
18
|
+
@_shared_objects ||= {
|
19
|
+
**super,
|
20
|
+
**_carrier,
|
21
|
+
}
|
22
|
+
end
|
23
|
+
end
|
18
24
|
end
|
19
25
|
end
|
20
26
|
end
|
@@ -27,11 +27,21 @@ module RubySlime
|
|
27
27
|
|
28
28
|
private def apply(*events)
|
29
29
|
handlers = self.class._event_handlers || {}
|
30
|
-
events.
|
30
|
+
events.flat_map do |event|
|
31
|
+
# allow array expansions of events, hence the flatmap
|
32
|
+
# Array() is idempotent
|
33
|
+
Array(event)
|
34
|
+
end.each do |event|
|
31
35
|
handler = handlers[event.class]
|
32
36
|
instance_exec(event, &handler) if handler
|
33
37
|
pending_events << event
|
34
38
|
end
|
35
39
|
end
|
40
|
+
|
41
|
+
private def merge_state(default, recorded)
|
42
|
+
default.with_indifferent_access.merge(
|
43
|
+
recorded.presence || {},
|
44
|
+
)
|
45
|
+
end
|
36
46
|
end
|
37
47
|
end
|
@@ -10,7 +10,9 @@ module RubySlime
|
|
10
10
|
path_prefix: '',
|
11
11
|
path_namespace:,
|
12
12
|
rclone_conf: 'sync.rclone.conf',
|
13
|
-
rclone_remote: 'sync'
|
13
|
+
rclone_remote: 'sync',
|
14
|
+
process_paths: lambda(&:itself),
|
15
|
+
chdir: nil
|
14
16
|
)
|
15
17
|
initialize_context(rake_context)
|
16
18
|
@rclone_conf = rclone_conf
|
@@ -19,13 +21,23 @@ module RubySlime
|
|
19
21
|
::File.join(*path_sections)
|
20
22
|
end
|
21
23
|
@check_rclone_conf = lambda do
|
22
|
-
|
24
|
+
::File.expand_path(@rclone_conf).tap do |full_path|
|
25
|
+
raise "\"#{@rclone_conf}\" not found!" unless ::File.file?(full_path)
|
26
|
+
end
|
23
27
|
end
|
28
|
+
@process_paths = process_paths
|
29
|
+
@chdir = chdir
|
24
30
|
end
|
25
31
|
|
26
32
|
def declare
|
27
33
|
desc('rclone sync up')
|
28
|
-
task('sync-up'
|
34
|
+
task('sync-up') { sync_up('copy') }
|
35
|
+
|
36
|
+
desc('rclone sync up preview')
|
37
|
+
task('sync-up-preview') { sync_up('copy', echo: true) }
|
38
|
+
|
39
|
+
desc('rclone sync up but also delete files on remote to match local')
|
40
|
+
task('sync-up-unsafe') { sync_up('sync') }
|
29
41
|
|
30
42
|
desc('rclone sync down')
|
31
43
|
task('sync-down', &method(:sync_down))
|
@@ -33,43 +45,53 @@ module RubySlime
|
|
33
45
|
|
34
46
|
private
|
35
47
|
|
36
|
-
def sync_up(
|
37
|
-
include_options =
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
48
|
+
def sync_up(rclone_command, echo: false)
|
49
|
+
include_options = ensure_chdir do
|
50
|
+
`git ls-files -io --exclude-per-directory=.gitignore`
|
51
|
+
.each_line
|
52
|
+
.map(&:strip)
|
53
|
+
.select(&:present?)
|
54
|
+
.then(&@process_paths)
|
55
|
+
.select(&::File.method(:file?))
|
56
|
+
.map { |file_path| "--include=#{file_path}" }
|
57
|
+
end
|
58
|
+
raise 'nothing to sync' unless include_options.present?
|
59
|
+
config_path = @check_rclone_conf.call
|
60
|
+
ensure_chdir do
|
61
|
+
sh(
|
62
|
+
*if echo
|
63
|
+
%w[echo rclone]
|
64
|
+
else
|
65
|
+
%w[rclone]
|
66
|
+
end,
|
67
|
+
rclone_command,
|
68
|
+
"--config=#{config_path}",
|
69
|
+
*include_options,
|
70
|
+
'.',
|
71
|
+
"#{@rclone_remote}:#{@path_namespace}/",
|
72
|
+
)
|
52
73
|
end
|
53
|
-
@check_rclone_conf.call
|
54
|
-
sh(
|
55
|
-
'rclone',
|
56
|
-
'copy',
|
57
|
-
"--config=#{@rclone_conf}",
|
58
|
-
*include_options,
|
59
|
-
'.',
|
60
|
-
"#{@rclone_remote}:#{@path_namespace}/",
|
61
|
-
)
|
62
74
|
end
|
63
75
|
|
64
76
|
def sync_down(*_args, **_kwargs)
|
65
|
-
@check_rclone_conf.call
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
77
|
+
config_path = @check_rclone_conf.call
|
78
|
+
ensure_chdir do
|
79
|
+
sh(
|
80
|
+
'rclone',
|
81
|
+
'copy',
|
82
|
+
"--config=#{config_path}",
|
83
|
+
"#{@rclone_remote}:#{@path_namespace}/",
|
84
|
+
'.',
|
85
|
+
)
|
86
|
+
end
|
87
|
+
end
|
88
|
+
|
89
|
+
def ensure_chdir(&shell)
|
90
|
+
if @chdir.present?
|
91
|
+
::Dir.chdir(@chdir, &shell)
|
92
|
+
else
|
93
|
+
shell.call
|
94
|
+
end
|
73
95
|
end
|
74
96
|
end
|
75
97
|
end
|
data/lib/ruby_slime/version.rb
CHANGED
data/lib/ruby_slime.rb
CHANGED
@@ -13,7 +13,7 @@ loader.inflector.inflect(
|
|
13
13
|
'api_verifier' => 'APIVerifier',
|
14
14
|
'jwt_kit' => 'JWTKit',
|
15
15
|
)
|
16
|
-
::File.join(__dir__, 'ruby_slime').then do |base_path|
|
16
|
+
::File.join(*[__dir__, 'ruby_slime'].compact).then do |base_path|
|
17
17
|
%w[jwt_kit mongoid rake].flat_map do |autoload_module|
|
18
18
|
[
|
19
19
|
::File.join(base_path, "#{autoload_module}.rb"),
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby_slime
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sarun Rattanasiri
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-06-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activemodel
|
@@ -52,6 +52,20 @@ dependencies:
|
|
52
52
|
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: jwe
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
55
69
|
- !ruby/object:Gem::Dependency
|
56
70
|
name: jwt
|
57
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -72,14 +86,14 @@ dependencies:
|
|
72
86
|
requirements:
|
73
87
|
- - ">="
|
74
88
|
- !ruby/object:Gem::Version
|
75
|
-
version:
|
89
|
+
version: 8.1.2
|
76
90
|
type: :runtime
|
77
91
|
prerelease: false
|
78
92
|
version_requirements: !ruby/object:Gem::Requirement
|
79
93
|
requirements:
|
80
94
|
- - ">="
|
81
95
|
- !ruby/object:Gem::Version
|
82
|
-
version:
|
96
|
+
version: 8.1.2
|
83
97
|
- !ruby/object:Gem::Dependency
|
84
98
|
name: zeitwerk
|
85
99
|
requirement: !ruby/object:Gem::Requirement
|
@@ -105,6 +119,8 @@ files:
|
|
105
119
|
- lib/ruby_slime.rb
|
106
120
|
- lib/ruby_slime/command.rb
|
107
121
|
- lib/ruby_slime/concurrent_write_detected.rb
|
122
|
+
- lib/ruby_slime/dry.rb
|
123
|
+
- lib/ruby_slime/dry/stripped_string.rb
|
108
124
|
- lib/ruby_slime/event.rb
|
109
125
|
- lib/ruby_slime/event_dispatcher.rb
|
110
126
|
- lib/ruby_slime/event_queue.rb
|
@@ -113,10 +129,13 @@ files:
|
|
113
129
|
- lib/ruby_slime/internals/event_metadata_handler.rb
|
114
130
|
- lib/ruby_slime/jwt_kit.rb
|
115
131
|
- lib/ruby_slime/jwt_kit/api_verifier.rb
|
132
|
+
- lib/ruby_slime/jwt_kit/encrypted_verifier.rb
|
133
|
+
- lib/ruby_slime/jwt_kit/generic_verifier.rb
|
116
134
|
- lib/ruby_slime/jwt_kit/handling_helper.rb
|
117
|
-
- lib/ruby_slime/jwt_kit/
|
135
|
+
- lib/ruby_slime/jwt_kit/schema_violation.rb
|
118
136
|
- lib/ruby_slime/mongoid.rb
|
119
137
|
- lib/ruby_slime/mongoid/interactor.rb
|
138
|
+
- lib/ruby_slime/mongoid/query_sharding.rb
|
120
139
|
- lib/ruby_slime/mongoid/stale_record.rb
|
121
140
|
- lib/ruby_slime/mongoid/state.rb
|
122
141
|
- lib/ruby_slime/object_sharing.rb
|
@@ -125,6 +144,7 @@ files:
|
|
125
144
|
- lib/ruby_slime/rake/context.rb
|
126
145
|
- lib/ruby_slime/rake/development_sync.rb
|
127
146
|
- lib/ruby_slime/schema_violation.rb
|
147
|
+
- lib/ruby_slime/transitory_event.rb
|
128
148
|
- lib/ruby_slime/unknown_command.rb
|
129
149
|
- lib/ruby_slime/version.rb
|
130
150
|
homepage: https://slime.systems/
|
@@ -148,7 +168,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
148
168
|
- !ruby/object:Gem::Version
|
149
169
|
version: '0'
|
150
170
|
requirements: []
|
151
|
-
rubygems_version: 3.4.
|
171
|
+
rubygems_version: 3.4.22
|
152
172
|
signing_key:
|
153
173
|
specification_version: 4
|
154
174
|
summary: The ruby-type slime made by Slime Systems.
|