sublime_text_kit 15.0.3 → 15.2.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: f7495ead139a0d42616c12f6e5bf429a34d0fa81b270625c9c46d4d2bf5d2d18
4
+ data.tar.gz: e1aaafbcf4f9fbb552abbeef69138965643992b8f84c420eff4d452869d849b1
5
5
  SHA512:
6
- metadata.gz: ece58bc10621741583c5b472b678e62c1c9706cccc0e930bf516018642d8f369f34dfe7ab4ff80e773ca424cb4dbd3e8ceaf8119304c80430d1a2db9273022c7
7
- data.tar.gz: 4c1ef274083ede61c257576032184dcb6684ad282393c88274d409e9d7d8291a6d9dadc6f2617be1914e920853ea0b5d8ef83ea011b3d6e92c5dc1013a35259e
6
+ metadata.gz: 926ede804085e1bbbdcec9a29115de6b0bf47954cd8b12e66bb405507cce391771543e20860d1747759a55534142d7b19d44dd7a6329dc33eb2e5818d876b7e9
7
+ data.tar.gz: 7845caf0ce2f5d9510e7a658687d6f15947d290e9a9feb7e550364caf1c8c7fde5bd0351978de62d21d3b770d328c025a239e0e3652f1eb28f0ed4aafbc85f7b
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 id: :sublime_text_kit }
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.2.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"
@@ -23,12 +23,12 @@ Gem::Specification.new do |spec|
23
23
  spec.cert_chain = [Gem.default_cert_path]
24
24
 
25
25
  spec.required_ruby_version = "~> 3.2"
26
- spec.add_dependency "cogger", "~> 0.10"
26
+ spec.add_dependency "cogger", "~> 0.12"
27
27
  spec.add_dependency "dry-container", "~> 0.11"
28
28
  spec.add_dependency "dry-monads", "~> 1.6"
29
29
  spec.add_dependency "dry-schema", "~> 1.13"
30
30
  spec.add_dependency "etcher", "~> 0.2"
31
- spec.add_dependency "infusible", "~> 2.0"
31
+ spec.add_dependency "infusible", "~> 2.2"
32
32
  spec.add_dependency "refinements", "~> 11.0"
33
33
  spec.add_dependency "runcom", "~> 10.0"
34
34
  spec.add_dependency "sod", "~> 0.0"
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.2.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-15 00:00:00.000000000 Z
39
39
  dependencies:
40
40
  - !ruby/object:Gem::Dependency
41
41
  name: cogger
@@ -43,14 +43,14 @@ dependencies:
43
43
  requirements:
44
44
  - - "~>"
45
45
  - !ruby/object:Gem::Version
46
- version: '0.10'
46
+ version: '0.12'
47
47
  type: :runtime
48
48
  prerelease: false
49
49
  version_requirements: !ruby/object:Gem::Requirement
50
50
  requirements:
51
51
  - - "~>"
52
52
  - !ruby/object:Gem::Version
53
- version: '0.10'
53
+ version: '0.12'
54
54
  - !ruby/object:Gem::Dependency
55
55
  name: dry-container
56
56
  requirement: !ruby/object:Gem::Requirement
@@ -113,14 +113,14 @@ dependencies:
113
113
  requirements:
114
114
  - - "~>"
115
115
  - !ruby/object:Gem::Version
116
- version: '2.0'
116
+ version: '2.2'
117
117
  type: :runtime
118
118
  prerelease: false
119
119
  version_requirements: !ruby/object:Gem::Requirement
120
120
  requirements:
121
121
  - - "~>"
122
122
  - !ruby/object:Gem::Version
123
- version: '2.0'
123
+ version: '2.2'
124
124
  - !ruby/object:Gem::Dependency
125
125
  name: refinements
126
126
  requirement: !ruby/object:Gem::Requirement
@@ -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
Binary file