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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d39cef4e432c04749c35a31c97e0a52735c29e2fabfd0eef944c2216222968cc
4
- data.tar.gz: 9d16dbff5b9c2907b581fb493e66808e160d18fad304433f4926342d9353729f
3
+ metadata.gz: 426bb0cdbed624a74a7ff55c0a8c4e9a0bc5abd3388e23b39ca6d154e75cb840
4
+ data.tar.gz: a61ec489dcfdd0dabbefe2347463af29c37d64acf2eb60019af2d6af12410957
5
5
  SHA512:
6
- metadata.gz: ece58bc10621741583c5b472b678e62c1c9706cccc0e930bf516018642d8f369f34dfe7ab4ff80e773ca424cb4dbd3e8ceaf8119304c80430d1a2db9273022c7
7
- data.tar.gz: 4c1ef274083ede61c257576032184dcb6684ad282393c88274d409e9d7d8291a6d9dadc6f2617be1914e920853ea0b5d8ef83ea011b3d6e92c5dc1013a35259e
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
- def initialize
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
- @path = path
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(path)
22
- .then { |session_path| Success content.merge!(session_path:) }
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 :path
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
- def initialize path = "Library/Application Support/Sublime Text/Packages/User"
13
- @path = path
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(path)
20
- .then { |user_dir| Success content.merge!(user_dir:) }
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 :path
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(:defaults_path) { Pathname(__dir__).join("configuration/defaults.yml") }
28
- register(:xdg_config) { Runcom::Config.new "sublime_text_kit/configuration.yml" }
29
- register(:specification) { Spek::Loader.call "#{__dir__}/../../sublime_text_kit.gemspec" }
30
- register(:kernel) { Kernel }
31
- register(:logger) { Cogger.new formatter: :emoji }
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
@@ -2,12 +2,14 @@
2
2
 
3
3
  require "zeitwerk"
4
4
 
5
- Zeitwerk::Loader.for_gem
6
- .then do |loader|
7
- loader.inflector.inflect "ascii_doc" => "ASCIIDoc", "cli" => "CLI"
8
- loader.setup
9
- end
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
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |spec|
4
4
  spec.name = "sublime_text_kit"
5
- spec.version = "15.0.3"
5
+ spec.version = "15.1.0"
6
6
  spec.authors = ["Brooke Kuhlmann"]
7
7
  spec.email = ["brooke@alchemists.io"]
8
8
  spec.homepage = "https://alchemists.io/projects/sublime_text_kit"
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.3
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-07-01 00:00:00.000000000 Z
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.15
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
- {�y�M�J�o]�>����[l`���B��.�F]d�O((e����O�� Ȣ�Ĩ��l��TS���I*�v�@
2
- p9�����Ǫ� Vi�+�IVT�(��~�]k4��R��P�3�/Y�%+
3
- �MS�l%W|��'[3�u�\�`O�՜#?�5� )��j�%Ѿ9�5�-B�|R��b��De�+J��d��8��$�oD'$�wK
4
- dI��(�:�
1
+ [���� 1�r��Aa��G�\ �٧�����k.�\��&����A1�e���&��m���M���ݺ$�'5L��" ��������C�̣M3��l���̩����U
2
+ ��sD�|Z��� w�~�+�= G�#�|��N8xg��l����<�="�&�ȹ!� a���d���aݽlʎ^�j�Oi���#6Rj@�d ZpS��)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��vla