sublime_text_kit 15.0.3 → 15.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/README.adoc +1 -19
- data/lib/sublime_text_kit/configuration/transformers/session_path.rb +7 -6
- data/lib/sublime_text_kit/configuration/transformers/user_dir.rb +8 -5
- data/lib/sublime_text_kit/container.rb +10 -7
- data/lib/sublime_text_kit.rb +7 -5
- data/sublime_text_kit.gemspec +1 -1
- data.tar.gz.sig +0 -0
- metadata +3 -3
- metadata.gz.sig +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 426bb0cdbed624a74a7ff55c0a8c4e9a0bc5abd3388e23b39ca6d154e75cb840
|
4
|
+
data.tar.gz: a61ec489dcfdd0dabbefe2347463af29c37d64acf2eb60019af2d6af12410957
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 89453df047772967f865f828785ebd7104ad59656552296b49a96e443086a5e5672d44fe05d27642b0240d00830a8b6c9a3228ed521027e18c16481219303e78
|
7
|
+
data.tar.gz: 92f0eb14e8aba757f34781bb570291e647ef01d4bc0489b04febf9337b595f9a0eb8a9f401f2bf046578f69cdc20b48ddfa9123916e02a7d525c9a867b52c5c7
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/README.adoc
CHANGED
@@ -47,25 +47,7 @@ gem install sublime_text_kit
|
|
47
47
|
|
48
48
|
From the command line, type: `sublime_text_kit`
|
49
49
|
|
50
|
-
|
51
|
-
USAGE
|
52
|
-
sublime_text_kit [OPTIONS]
|
53
|
-
sublime_text_kit COMMAND [OPTIONS]
|
54
|
-
|
55
|
-
OPTIONS
|
56
|
-
-S, --session Rebuild session metadata.
|
57
|
-
-s, --snippets [FORMAT] View snippets.
|
58
|
-
Use: markdown or ascii_doc.
|
59
|
-
Default: ascii_doc.
|
60
|
-
-u, --update Update project and session metadata based on current settings.
|
61
|
-
-v, --version Show version.
|
62
|
-
-h, --help [COMMAND] Show this message.
|
63
|
-
|
64
|
-
COMMANDS
|
65
|
-
config Manage configuration.
|
66
|
-
Path is dynamic per current directory.
|
67
|
-
metadata Manage project metadata.
|
68
|
-
....
|
50
|
+
image:https://alchemists.io/images/projects/sublime_text_kit/screenshots/usage.png[Usage,width=773,height=413,role=focal_point]
|
69
51
|
|
70
52
|
=== Customization
|
71
53
|
|
@@ -9,22 +9,23 @@ module SublimeTextKit
|
|
9
9
|
class SessionPath
|
10
10
|
include Dry::Monads[:result]
|
11
11
|
|
12
|
-
|
13
|
-
path = "Library/Application Support/Sublime Text/Local/Session.sublime_session"
|
12
|
+
DEFAULT = "Library/Application Support/Sublime Text/Local/Session.sublime_session"
|
14
13
|
|
15
|
-
|
14
|
+
def initialize key = :session_path, default: DEFAULT
|
15
|
+
@key = key
|
16
|
+
@default = default
|
16
17
|
end
|
17
18
|
|
18
19
|
def call content
|
19
20
|
return Success content unless content.key? :home
|
20
21
|
|
21
|
-
Pathname(content[:home]).join(
|
22
|
-
.then { |
|
22
|
+
Pathname(content[:home]).join(default)
|
23
|
+
.then { |value| Success content.merge!(key => value) }
|
23
24
|
end
|
24
25
|
|
25
26
|
private
|
26
27
|
|
27
|
-
attr_reader :
|
28
|
+
attr_reader :key, :default
|
28
29
|
end
|
29
30
|
end
|
30
31
|
end
|
@@ -9,20 +9,23 @@ module SublimeTextKit
|
|
9
9
|
class UserDir
|
10
10
|
include Dry::Monads[:result]
|
11
11
|
|
12
|
-
|
13
|
-
|
12
|
+
DEFAULT = "Library/Application Support/Sublime Text/Packages/User"
|
13
|
+
|
14
|
+
def initialize key = :user_dir, default: DEFAULT
|
15
|
+
@key = key
|
16
|
+
@default = default
|
14
17
|
end
|
15
18
|
|
16
19
|
def call content
|
17
20
|
return Success content unless content.key? :home
|
18
21
|
|
19
|
-
Pathname(content[:home]).join(
|
20
|
-
.then { |
|
22
|
+
Pathname(content[:home]).join(default)
|
23
|
+
.then { |value| Success content.merge!(key => value) }
|
21
24
|
end
|
22
25
|
|
23
26
|
private
|
24
27
|
|
25
|
-
attr_reader :
|
28
|
+
attr_reader :key, :default
|
26
29
|
end
|
27
30
|
end
|
28
31
|
end
|
@@ -11,7 +11,7 @@ module SublimeTextKit
|
|
11
11
|
module Container
|
12
12
|
extend Dry::Container::Mixin
|
13
13
|
|
14
|
-
register :configuration do
|
14
|
+
register :configuration, memoize: true do
|
15
15
|
self[:defaults].add_loader(Etcher::Loaders::Environment.new(%w[HOME]))
|
16
16
|
.add_loader(Etcher::Loaders::YAML.new(self[:xdg_config].active))
|
17
17
|
.add_transformer(Configuration::Transformers::SessionPath.new)
|
@@ -19,15 +19,18 @@ module SublimeTextKit
|
|
19
19
|
.then { |registry| Etcher.call registry }
|
20
20
|
end
|
21
21
|
|
22
|
-
register :defaults do
|
22
|
+
register :defaults, memoize: true do
|
23
23
|
Etcher::Registry.new(contract: Configuration::Contract, model: Configuration::Model)
|
24
24
|
.add_loader(Etcher::Loaders::YAML.new(self[:defaults_path]))
|
25
25
|
end
|
26
26
|
|
27
|
-
register
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
register(:
|
27
|
+
register :specification, memoize: true do
|
28
|
+
Spek::Loader.call "#{__dir__}/../../sublime_text_kit.gemspec"
|
29
|
+
end
|
30
|
+
|
31
|
+
register(:defaults_path, memoize: true) { Pathname(__dir__).join("configuration/defaults.yml") }
|
32
|
+
register(:xdg_config, memoize: true) { Runcom::Config.new "sublime_text_kit/configuration.yml" }
|
33
|
+
register(:logger, memoize: true) { Cogger.new formatter: :emoji }
|
34
|
+
register :kernel, Kernel
|
32
35
|
end
|
33
36
|
end
|
data/lib/sublime_text_kit.rb
CHANGED
@@ -2,12 +2,14 @@
|
|
2
2
|
|
3
3
|
require "zeitwerk"
|
4
4
|
|
5
|
-
Zeitwerk::Loader.
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
5
|
+
Zeitwerk::Loader.new.then do |loader|
|
6
|
+
loader.inflector.inflect "ascii_doc" => "ASCIIDoc", "cli" => "CLI"
|
7
|
+
loader.tag = File.basename __FILE__, ".rb"
|
8
|
+
loader.push_dir __dir__
|
9
|
+
loader.setup
|
10
|
+
end
|
10
11
|
|
11
12
|
# Main namespace.
|
12
13
|
module SublimeTextKit
|
14
|
+
def self.loader(registry = Zeitwerk::Registry) = registry.loader_for __FILE__
|
13
15
|
end
|
data/sublime_text_kit.gemspec
CHANGED
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sublime_text_kit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 15.0
|
4
|
+
version: 15.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brooke Kuhlmann
|
@@ -35,7 +35,7 @@ cert_chain:
|
|
35
35
|
3n5C8/6Zh9DYTkpcwPSuIfAga6wf4nXc9m6JAw8AuMLaiWN/r/2s4zJsUHYERJEu
|
36
36
|
gZGm4JqtuSg8pYjPeIJxS960owq+SfuC+jxqmRA54BisFCv/0VOJi7tiJVY=
|
37
37
|
-----END CERTIFICATE-----
|
38
|
-
date: 2023-
|
38
|
+
date: 2023-10-01 00:00:00.000000000 Z
|
39
39
|
dependencies:
|
40
40
|
- !ruby/object:Gem::Dependency
|
41
41
|
name: cogger
|
@@ -255,7 +255,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
255
255
|
- !ruby/object:Gem::Version
|
256
256
|
version: '0'
|
257
257
|
requirements: []
|
258
|
-
rubygems_version: 3.4.
|
258
|
+
rubygems_version: 3.4.20
|
259
259
|
signing_key:
|
260
260
|
specification_version: 4
|
261
261
|
summary: A command line interface for managing Sublime Text metadata.
|
metadata.gz.sig
CHANGED
@@ -1,4 +1,3 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
dI��(�:�
|
1
|
+
[���� 1�r��A�a��G�\ �٧�����k.�\��&����A1�e���&��m���M���ݺ$�'5�L��" ��������C�̣M3��l���̩����U
|
2
|
+
��sD�|Z��� w�~�+�= �G�#�|��N�8xg��l����<�="�&�ȹ!�a���d���aݽlʎ^�j�Oi���#6Rj@�dZpS��)m���1���!��{B�8Y��sv�v�h=;��I�r��b�D"�m�s}?~Q�U��������~I���T�ԑz�ۻ��6����HGd���,�Lk�ިp��[��/aZ��A�Gih X�Ձ��Rv{��0��>=��\�3#���+
|
3
|
+
|ke��vl�a
|