sublime_text_kit 12.3.2 → 13.1.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: aaea22a9a42626c43cb59c48cdf80f875336e9ae116ef8e17d50d09f4faafd23
4
- data.tar.gz: 25aea598137ddabe35c16f69649fa75353a8db9e9956afae4a3c0d312a5da891
3
+ metadata.gz: ffab926748158875e081f36ca14dfb94f7c364f70b44c10fbd937ec4487b65b5
4
+ data.tar.gz: ba0b430b45c7109e5da4ba8e11712fe89208b6ee95dd8fb6e8145c6a4d150105
5
5
  SHA512:
6
- metadata.gz: 87dc53110bd71150c03e01a1685c6ba4e28968adee492e1875d386a4f57f32667ba269ce39177c38895298f25687fcc42a2cdb4193656cf47a3fd5f4c0070c9e
7
- data.tar.gz: f8cdd7955e7c611866003c507a734d7ce3c36993950b1607ebea64c5bbf4cfff014c2b19aeb7a215a9f343ee75be727b7db4c4c0c09f873a51d359d0243fdf57
6
+ metadata.gz: a6551a539ffaa22676104174f19def4d4fe26a13868f58623d71f6d41f149b40214ed518f422fbb7f792790ed8469590f3a68d89ec427fc256ec87f88df48fe0
7
+ data.tar.gz: 78fec62fb933715d7e232dc882b31ef9f2e29f6957f3d25c9cf2d1d06e9441eecba1ba9438d4c455665aaa044ccb7d84ec08628d556369b3b4382f02a02886be
checksums.yaml.gz.sig CHANGED
Binary file
@@ -5,9 +5,11 @@ module SublimeTextKit
5
5
  module Actions
6
6
  # Handles gem configuration action.
7
7
  class Config
8
- def initialize configuration: Configuration::Loader::CLIENT, container: Container
8
+ include SublimeTextKit::Import[:kernel, :logger]
9
+
10
+ def initialize configuration: Configuration::Loader::CLIENT, **dependencies
11
+ super(**dependencies)
9
12
  @configuration = configuration
10
- @container = container
11
13
  end
12
14
 
13
15
  def call action
@@ -20,15 +22,11 @@ module SublimeTextKit
20
22
 
21
23
  private
22
24
 
23
- attr_reader :configuration, :container
25
+ attr_reader :configuration
24
26
 
25
27
  def edit = kernel.system("$EDITOR #{configuration.current}")
26
28
 
27
29
  def view = kernel.system("cat #{configuration.current}")
28
-
29
- def kernel = container[__method__]
30
-
31
- def logger = container[__method__]
32
30
  end
33
31
  end
34
32
  end
@@ -0,0 +1,24 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "dry/container"
4
+
5
+ module SublimeTextKit
6
+ module CLI
7
+ module Actions
8
+ # Provides a single container with application and action specific dependencies.
9
+ module Container
10
+ extend Dry::Container::Mixin
11
+
12
+ config.registry = ->(container, key, value, _options) { container[key.to_s] = value }
13
+
14
+ merge SublimeTextKit::Container
15
+
16
+ register(:config) { Actions::Config.new }
17
+ register(:metadata) { Actions::Metadata.new }
18
+ register(:session) { Actions::Session.new }
19
+ register(:snippets) { Actions::Snippets.new }
20
+ register(:update) { Actions::Update.new }
21
+ end
22
+ end
23
+ end
24
+ end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "auto_injector"
4
+
5
+ module SublimeTextKit
6
+ module CLI
7
+ module Actions
8
+ Import = AutoInjector[Container]
9
+ end
10
+ end
11
+ end
@@ -7,11 +7,14 @@ module SublimeTextKit
7
7
  module Actions
8
8
  # Handles metadata action.
9
9
  class Metadata
10
+ include SublimeTextKit::Import[:configuration, :logger]
11
+
10
12
  using Refinements::Pathnames
11
13
 
12
- def initialize handler: SublimeTextKit::Metadata::Handler, container: Container
14
+ def initialize handler: SublimeTextKit::Metadata::Handler, **dependencies
15
+ super(**dependencies)
16
+
13
17
  @handler = handler
14
- @container = container
15
18
  end
16
19
 
17
20
  def call kind
@@ -25,7 +28,7 @@ module SublimeTextKit
25
28
 
26
29
  private
27
30
 
28
- attr_reader :handler, :container
31
+ attr_reader :handler
29
32
 
30
33
  def create
31
34
  logger.info "Creating metadata in #{metadata_dir}..."
@@ -53,10 +56,6 @@ module SublimeTextKit
53
56
  end
54
57
 
55
58
  def metadata_dir = Pathname(configuration.metadata_dir).expand_path
56
-
57
- def configuration = container[__method__]
58
-
59
- def logger = container[__method__]
60
59
  end
61
60
  end
62
61
  end
@@ -5,9 +5,12 @@ module SublimeTextKit
5
5
  module Actions
6
6
  # Handles session action.
7
7
  class Session
8
- def initialize rebuilder: Sessions::Rebuilder.new, container: Container
8
+ include SublimeTextKit::Import[:logger]
9
+
10
+ def initialize rebuilder: Sessions::Rebuilder.new, **dependencies
11
+ super(**dependencies)
12
+
9
13
  @rebuilder = rebuilder
10
- @container = container
11
14
  end
12
15
 
13
16
  def call
@@ -17,9 +20,7 @@ module SublimeTextKit
17
20
 
18
21
  private
19
22
 
20
- attr_reader :rebuilder, :container
21
-
22
- def logger = container[__method__]
23
+ attr_reader :rebuilder
23
24
  end
24
25
  end
25
26
  end
@@ -5,31 +5,24 @@ module SublimeTextKit
5
5
  module Actions
6
6
  # Handles snippets action.
7
7
  class Snippets
8
- PRINTERS = {
9
- ascii_doc: SublimeTextKit::Snippets::Printers::ASCIIDoc.new,
10
- markdown: SublimeTextKit::Snippets::Printers::Markdown.new
11
- }.freeze
8
+ include SublimeTextKit::Import[:configuration, :logger]
12
9
 
13
- def initialize printers: PRINTERS, container: Container
14
- @printers = printers
15
- @container = container
10
+ def initialize printer: SublimeTextKit::Snippets::Printer.new, **dependencies
11
+ super(**dependencies)
12
+ @printer = printer
16
13
  end
17
14
 
18
15
  def call kind
19
- printers.fetch(kind).call
20
- rescue KeyError
21
- logger.error { "Invalid snippet format: #{kind}. Use #{formats}." }
16
+ case kind
17
+ when :ascii_doc then printer.call "*"
18
+ when :markdown then printer.call "-"
19
+ else logger.error { "Invalid snippet format: #{kind}. Use ascii_doc or markdown." }
20
+ end
22
21
  end
23
22
 
24
23
  private
25
24
 
26
- attr_reader :printers, :container
27
-
28
- def formats = printers.keys.join(" or ")
29
-
30
- def configuration = container[__method__]
31
-
32
- def logger = container[__method__]
25
+ attr_reader :printer
33
26
  end
34
27
  end
35
28
  end
@@ -5,12 +5,16 @@ module SublimeTextKit
5
5
  module Actions
6
6
  # Handles update action.
7
7
  class Update
8
+ include SublimeTextKit::Import[:configuration, :logger]
9
+
8
10
  def initialize metadata: SublimeTextKit::Metadata::Handler,
9
11
  session: Sessions::Rebuilder.new,
10
- container: Container
12
+ **dependencies
13
+
14
+ super(**dependencies)
15
+
11
16
  @metadata = metadata
12
17
  @session = session
13
- @container = container
14
18
  end
15
19
 
16
20
  def call
@@ -22,7 +26,7 @@ module SublimeTextKit
22
26
 
23
27
  private
24
28
 
25
- attr_reader :metadata, :session, :container
29
+ attr_reader :metadata, :session
26
30
 
27
31
  def create_metadata
28
32
  configuration.project_dirs.each do |directory|
@@ -32,10 +36,6 @@ module SublimeTextKit
32
36
  end
33
37
 
34
38
  def metadata_dir = Pathname(configuration.metadata_dir).expand_path
35
-
36
- def configuration = container[__method__]
37
-
38
- def logger = container[__method__]
39
39
  end
40
40
  end
41
41
  end
@@ -6,27 +6,30 @@ module SublimeTextKit
6
6
  module CLI
7
7
  # Assembles and parses all Command Line Interface (CLI) options.
8
8
  class Parser
9
+ include Import[:configuration]
10
+
9
11
  CLIENT = OptionParser.new nil, 40, " "
10
12
 
11
- def initialize configuration = Container[:configuration],
12
- section: Parsers::Core,
13
- client: CLIENT
14
- @configuration = configuration.dup
13
+ def initialize section: Parsers::Core,
14
+ client: CLIENT,
15
+ **dependencies
16
+ super(**dependencies)
15
17
  @section = section
16
18
  @client = client
19
+ @configuration_duplicate = configuration.dup
17
20
  end
18
21
 
19
22
  def call arguments = []
20
- section.call configuration, client: client
23
+ section.call configuration_duplicate, client: client
21
24
  client.parse arguments
22
- configuration.freeze
25
+ configuration_duplicate.freeze
23
26
  end
24
27
 
25
28
  def to_s = client.to_s
26
29
 
27
30
  private
28
31
 
29
- attr_reader :configuration, :section, :client
32
+ attr_reader :section, :client, :configuration_duplicate
30
33
  end
31
34
  end
32
35
  end
@@ -7,16 +7,20 @@ module SublimeTextKit
7
7
  module Parsers
8
8
  # Handles parsing of Command Line Interface (CLI) core options.
9
9
  class Core
10
+ include Import[:specification]
11
+
10
12
  using Refinements::Structs
11
13
 
12
14
  def self.call(...) = new(...).call
13
15
 
14
16
  def initialize configuration = Container[:configuration],
15
17
  client: Parser::CLIENT,
16
- container: Container
18
+ **dependencies
19
+
20
+ super(**dependencies)
21
+
17
22
  @configuration = configuration
18
23
  @client = client
19
- @container = container
20
24
  end
21
25
 
22
26
  def call arguments = []
@@ -29,7 +33,7 @@ module SublimeTextKit
29
33
 
30
34
  private
31
35
 
32
- attr_reader :configuration, :client, :container
36
+ attr_reader :configuration, :client
33
37
 
34
38
  def collate = private_methods.sort.grep(/add_/).each { |method| __send__ method }
35
39
 
@@ -96,8 +100,6 @@ module SublimeTextKit
96
100
  end
97
101
 
98
102
  def snippets_format = configuration.snippets_format
99
-
100
- def specification = container[__method__]
101
103
  end
102
104
  end
103
105
  end
@@ -4,18 +4,19 @@ module SublimeTextKit
4
4
  module CLI
5
5
  # The main Command Line Interface (CLI) object.
6
6
  class Shell
7
- ACTIONS = {
8
- config: Actions::Config.new,
9
- metadata: Actions::Metadata.new,
10
- session: Actions::Session.new,
11
- snippets: Actions::Snippets.new,
12
- update: Actions::Update.new
13
- }.freeze
14
-
15
- def initialize parser: Parser.new, actions: ACTIONS, container: Container
7
+ include Actions::Import[
8
+ :specification,
9
+ :logger,
10
+ :config,
11
+ :metadata,
12
+ :session,
13
+ :snippets,
14
+ :update
15
+ ]
16
+
17
+ def initialize parser: Parser.new, **dependencies
18
+ super(**dependencies)
16
19
  @parser = parser
17
- @actions = actions
18
- @container = container
19
20
  end
20
21
 
21
22
  def call arguments = []
@@ -26,35 +27,21 @@ module SublimeTextKit
26
27
 
27
28
  private
28
29
 
29
- attr_reader :parser, :actions, :container
30
+ attr_reader :parser
30
31
 
31
32
  def perform configuration
32
33
  case configuration
33
- in action_config: Symbol => action then config action
34
- in action_metadata: Symbol => kind then metadata kind
35
- in action_session: true then session
36
- in action_snippets: true then snippets configuration
37
- in action_update: true then update
34
+ in action_config: Symbol => action then config.call action
35
+ in action_metadata: Symbol => kind then metadata.call kind
36
+ in action_session: true then session.call
37
+ in action_snippets: true then snippets.call configuration.snippets_format
38
+ in action_update: true then update.call
38
39
  in action_version: true then logger.info { specification.labeled_version }
39
40
  else usage
40
41
  end
41
42
  end
42
43
 
43
- def config(action) = actions.fetch(__method__).call(action)
44
-
45
- def metadata(kind) = actions.fetch(__method__).call(kind)
46
-
47
- def session = actions.fetch(__method__).call
48
-
49
- def snippets(configuration) = actions.fetch(__method__).call(configuration.snippets_format)
50
-
51
- def update = actions.fetch(__method__).call
52
-
53
- def usage = logger.unknown { parser.to_s }
54
-
55
- def specification = container[__method__]
56
-
57
- def logger = container[__method__]
44
+ def usage = logger.any { parser.to_s }
58
45
  end
59
46
  end
60
47
  end
@@ -25,7 +25,7 @@ module SublimeTextKit
25
25
  def initialize *arguments
26
26
  super
27
27
 
28
- home = Pathname ENV["HOME"]
28
+ home = Pathname ENV.fetch("HOME", "")
29
29
 
30
30
  self[:session_path] ||= home.join(
31
31
  "Library/Application Support/Sublime Text/Local/Session.sublime_session"
@@ -1,8 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "dry-container"
4
- require "logger"
5
- require "pastel"
3
+ require "cogger"
4
+ require "dry/container"
6
5
  require "spek"
7
6
 
8
7
  module SublimeTextKit
@@ -12,28 +11,7 @@ module SublimeTextKit
12
11
 
13
12
  register(:configuration) { Configuration::Loader.call }
14
13
  register(:specification) { Spek::Loader.call "#{__dir__}/../../sublime_text_kit.gemspec" }
15
- register(:colorizer) { Pastel.new enabled: $stdout.tty? }
16
14
  register(:kernel) { Kernel }
17
-
18
- register :log_colors do
19
- {
20
- "DEBUG" => self[:colorizer].white.detach,
21
- "INFO" => self[:colorizer].green.detach,
22
- "WARN" => self[:colorizer].yellow.detach,
23
- "ERROR" => self[:colorizer].red.detach,
24
- "FATAL" => self[:colorizer].white.bold.on_red.detach,
25
- "ANY" => self[:colorizer].white.bold.detach
26
- }
27
- end
28
-
29
- register :logger do
30
- Logger.new $stdout,
31
- level: Logger.const_get(ENV.fetch("LOG_LEVEL", "INFO")),
32
- formatter: (
33
- lambda do |severity, _at, _name, message|
34
- self[:log_colors][severity].call "#{message}\n"
35
- end
36
- )
37
- end
15
+ register(:logger) { Cogger::Client.new }
38
16
  end
39
17
  end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module SublimeTextKit
4
+ Import = AutoInjector[Container]
5
+ end
@@ -7,11 +7,9 @@ module SublimeTextKit
7
7
  module Sessions
8
8
  # Manages the rebuilding of session information.
9
9
  class Rebuilder
10
- using Refinements::Pathnames
10
+ include Import[:configuration]
11
11
 
12
- def initialize container: Container
13
- @container = container
14
- end
12
+ using Refinements::Pathnames
15
13
 
16
14
  def call
17
15
  session = read
@@ -28,8 +26,6 @@ module SublimeTextKit
28
26
 
29
27
  private
30
28
 
31
- attr_reader :container
32
-
33
29
  def read = source_path.exist? ? JSON(source_path.read) : {}
34
30
 
35
31
  def write(json) = JSON.dump(json).then { |content| source_path.write content }
@@ -37,8 +33,6 @@ module SublimeTextKit
37
33
  def metadata_dir = configuration.metadata_dir
38
34
 
39
35
  def source_path = configuration.session_path
40
-
41
- def configuration = container[__method__]
42
36
  end
43
37
  end
44
38
  end
@@ -6,11 +6,13 @@ module SublimeTextKit
6
6
  module Snippets
7
7
  # Collects and loads all snippets into memory for further processing.
8
8
  class Collector
9
+ include Import[:configuration]
10
+
9
11
  using Refinements::Pathnames
10
12
 
11
- def initialize reader: Reader.new, container: Container
13
+ def initialize reader: Reader.new, **dependencies
14
+ super(**dependencies)
12
15
  @reader = reader
13
- @container = container
14
16
  end
15
17
 
16
18
  def call
@@ -22,9 +24,7 @@ module SublimeTextKit
22
24
 
23
25
  private
24
26
 
25
- def configuration = container[__method__]
26
-
27
- attr_reader :reader, :container
27
+ attr_reader :reader
28
28
  end
29
29
  end
30
30
  end
@@ -0,0 +1,25 @@
1
+ # frozen_string_literal: true
2
+
3
+ module SublimeTextKit
4
+ module Snippets
5
+ # Prints snippets as a list.
6
+ class Printer
7
+ include Import[:logger]
8
+
9
+ def initialize collector: Collector.new, **dependencies
10
+ super(**dependencies)
11
+ @collector = collector
12
+ end
13
+
14
+ def call bullet
15
+ collector.call.each do |snippet|
16
+ logger.info "#{bullet} #{snippet.description} - `#{snippet.trigger}`"
17
+ end
18
+ end
19
+
20
+ private
21
+
22
+ attr_reader :collector
23
+ end
24
+ end
25
+ end
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |spec|
4
4
  spec.name = "sublime_text_kit"
5
- spec.version = "12.3.2"
5
+ spec.version = "13.1.0"
6
6
  spec.authors = ["Brooke Kuhlmann"]
7
7
  spec.email = ["brooke@alchemists.io"]
8
8
  spec.homepage = "https://www.alchemists.io/projects/sublime_text_kit"
@@ -13,6 +13,7 @@ Gem::Specification.new do |spec|
13
13
  "bug_tracker_uri" => "https://github.com/bkuhlmann/sublime_text_kit/issues",
14
14
  "changelog_uri" => "https://www.alchemists.io/projects/sublime_text_kit/versions",
15
15
  "documentation_uri" => "https://www.alchemists.io/projects/sublime_text_kit",
16
+ "funding_uri" => "https://github.com/sponsors/bkuhlmann",
16
17
  "label" => "Sublime Text Kit",
17
18
  "rubygems_mfa_required" => "true",
18
19
  "source_code_uri" => "https://github.com/bkuhlmann/sublime_text_kit"
@@ -22,11 +23,12 @@ Gem::Specification.new do |spec|
22
23
  spec.cert_chain = [Gem.default_cert_path]
23
24
 
24
25
  spec.required_ruby_version = "~> 3.1"
26
+ spec.add_dependency "auto_injector", "~> 0.5"
27
+ spec.add_dependency "cogger", "~> 0.1"
25
28
  spec.add_dependency "dry-container", "~> 0.9"
26
- spec.add_dependency "pastel", "~> 0.8"
27
- spec.add_dependency "refinements", "~> 9.2"
28
- spec.add_dependency "runcom", "~> 8.2"
29
- spec.add_dependency "spek", "~> 0.2"
29
+ spec.add_dependency "refinements", "~> 9.4"
30
+ spec.add_dependency "runcom", "~> 8.4"
31
+ spec.add_dependency "spek", "~> 0.3"
30
32
  spec.add_dependency "zeitwerk", "~> 2.5"
31
33
 
32
34
  spec.bindir = "exe"
data.tar.gz.sig CHANGED
@@ -1 +1,2 @@
1
- �h�?9^���|��IĈ�*��O�t��}�� :bf����V��;6F�^�D֭�K��|lJr�r8�3]�E�5ZҞ�V3J�I�\HPK��*��4l��܀���i���1��-�x�w�@{��z����zY��B�������Lx�:�dZ-�m����ϸ��A,k��")�.�,F�m�y��`.U��=g{�]
1
+ T��b��sQ�{7KhTjw�q�.����������[k:
2
+ ��'��PrV_@�<y��Fp��X�G'��(fb���r�<6ë�r\^�z�����6�� 9E$�C�\��&w�)�Y�d_��X�%�)t m� ���Sq|~��
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: 12.3.2
4
+ version: 13.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brooke Kuhlmann
@@ -28,78 +28,92 @@ cert_chain:
28
28
  CxDe2+VuChj4I1nvIHdu+E6XoEVlanUPKmSg6nddhkKn2gC45Kyzh6FZqnzH/CRp
29
29
  RFE=
30
30
  -----END CERTIFICATE-----
31
- date: 2022-03-20 00:00:00.000000000 Z
31
+ date: 2022-05-07 00:00:00.000000000 Z
32
32
  dependencies:
33
33
  - !ruby/object:Gem::Dependency
34
- name: dry-container
34
+ name: auto_injector
35
35
  requirement: !ruby/object:Gem::Requirement
36
36
  requirements:
37
37
  - - "~>"
38
38
  - !ruby/object:Gem::Version
39
- version: '0.9'
39
+ version: '0.5'
40
40
  type: :runtime
41
41
  prerelease: false
42
42
  version_requirements: !ruby/object:Gem::Requirement
43
43
  requirements:
44
44
  - - "~>"
45
45
  - !ruby/object:Gem::Version
46
- version: '0.9'
46
+ version: '0.5'
47
47
  - !ruby/object:Gem::Dependency
48
- name: pastel
48
+ name: cogger
49
49
  requirement: !ruby/object:Gem::Requirement
50
50
  requirements:
51
51
  - - "~>"
52
52
  - !ruby/object:Gem::Version
53
- version: '0.8'
53
+ version: '0.1'
54
54
  type: :runtime
55
55
  prerelease: false
56
56
  version_requirements: !ruby/object:Gem::Requirement
57
57
  requirements:
58
58
  - - "~>"
59
59
  - !ruby/object:Gem::Version
60
- version: '0.8'
60
+ version: '0.1'
61
+ - !ruby/object:Gem::Dependency
62
+ name: dry-container
63
+ requirement: !ruby/object:Gem::Requirement
64
+ requirements:
65
+ - - "~>"
66
+ - !ruby/object:Gem::Version
67
+ version: '0.9'
68
+ type: :runtime
69
+ prerelease: false
70
+ version_requirements: !ruby/object:Gem::Requirement
71
+ requirements:
72
+ - - "~>"
73
+ - !ruby/object:Gem::Version
74
+ version: '0.9'
61
75
  - !ruby/object:Gem::Dependency
62
76
  name: refinements
63
77
  requirement: !ruby/object:Gem::Requirement
64
78
  requirements:
65
79
  - - "~>"
66
80
  - !ruby/object:Gem::Version
67
- version: '9.2'
81
+ version: '9.4'
68
82
  type: :runtime
69
83
  prerelease: false
70
84
  version_requirements: !ruby/object:Gem::Requirement
71
85
  requirements:
72
86
  - - "~>"
73
87
  - !ruby/object:Gem::Version
74
- version: '9.2'
88
+ version: '9.4'
75
89
  - !ruby/object:Gem::Dependency
76
90
  name: runcom
77
91
  requirement: !ruby/object:Gem::Requirement
78
92
  requirements:
79
93
  - - "~>"
80
94
  - !ruby/object:Gem::Version
81
- version: '8.2'
95
+ version: '8.4'
82
96
  type: :runtime
83
97
  prerelease: false
84
98
  version_requirements: !ruby/object:Gem::Requirement
85
99
  requirements:
86
100
  - - "~>"
87
101
  - !ruby/object:Gem::Version
88
- version: '8.2'
102
+ version: '8.4'
89
103
  - !ruby/object:Gem::Dependency
90
104
  name: spek
91
105
  requirement: !ruby/object:Gem::Requirement
92
106
  requirements:
93
107
  - - "~>"
94
108
  - !ruby/object:Gem::Version
95
- version: '0.2'
109
+ version: '0.3'
96
110
  type: :runtime
97
111
  prerelease: false
98
112
  version_requirements: !ruby/object:Gem::Requirement
99
113
  requirements:
100
114
  - - "~>"
101
115
  - !ruby/object:Gem::Version
102
- version: '0.2'
116
+ version: '0.3'
103
117
  - !ruby/object:Gem::Dependency
104
118
  name: zeitwerk
105
119
  requirement: !ruby/object:Gem::Requirement
@@ -129,6 +143,8 @@ files:
129
143
  - exe/sublime_text_kit
130
144
  - lib/sublime_text_kit.rb
131
145
  - lib/sublime_text_kit/cli/actions/config.rb
146
+ - lib/sublime_text_kit/cli/actions/container.rb
147
+ - lib/sublime_text_kit/cli/actions/import.rb
132
148
  - lib/sublime_text_kit/cli/actions/metadata.rb
133
149
  - lib/sublime_text_kit/cli/actions/session.rb
134
150
  - lib/sublime_text_kit/cli/actions/snippets.rb
@@ -140,6 +156,7 @@ files:
140
156
  - lib/sublime_text_kit/configuration/defaults.yml
141
157
  - lib/sublime_text_kit/configuration/loader.rb
142
158
  - lib/sublime_text_kit/container.rb
159
+ - lib/sublime_text_kit/import.rb
143
160
  - lib/sublime_text_kit/metadata/handler.rb
144
161
  - lib/sublime_text_kit/metadata/pathway.rb
145
162
  - lib/sublime_text_kit/metadata/serializers/project.rb
@@ -147,8 +164,7 @@ files:
147
164
  - lib/sublime_text_kit/sessions/rebuilder.rb
148
165
  - lib/sublime_text_kit/snippets/collector.rb
149
166
  - lib/sublime_text_kit/snippets/model.rb
150
- - lib/sublime_text_kit/snippets/printers/ascii_doc.rb
151
- - lib/sublime_text_kit/snippets/printers/markdown.rb
167
+ - lib/sublime_text_kit/snippets/printer.rb
152
168
  - lib/sublime_text_kit/snippets/reader.rb
153
169
  - sublime_text_kit.gemspec
154
170
  homepage: https://www.alchemists.io/projects/sublime_text_kit
@@ -158,6 +174,7 @@ metadata:
158
174
  bug_tracker_uri: https://github.com/bkuhlmann/sublime_text_kit/issues
159
175
  changelog_uri: https://www.alchemists.io/projects/sublime_text_kit/versions
160
176
  documentation_uri: https://www.alchemists.io/projects/sublime_text_kit
177
+ funding_uri: https://github.com/sponsors/bkuhlmann
161
178
  label: Sublime Text Kit
162
179
  rubygems_mfa_required: 'true'
163
180
  source_code_uri: https://github.com/bkuhlmann/sublime_text_kit
@@ -176,7 +193,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
176
193
  - !ruby/object:Gem::Version
177
194
  version: '0'
178
195
  requirements: []
179
- rubygems_version: 3.3.9
196
+ rubygems_version: 3.3.13
180
197
  signing_key:
181
198
  specification_version: 4
182
199
  summary: A command line interface for managing Sublime Text metadata.
metadata.gz.sig CHANGED
Binary file
@@ -1,27 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module SublimeTextKit
4
- module Snippets
5
- module Printers
6
- # Prints snippets in ASCII Doc format.
7
- class ASCIIDoc
8
- def initialize collector: Collector.new, container: Container
9
- @collector = collector
10
- @container = container
11
- end
12
-
13
- def call
14
- collector.call.each do |snippet|
15
- logger.info "* #{snippet.description} - `#{snippet.trigger}`"
16
- end
17
- end
18
-
19
- private
20
-
21
- attr_reader :collector, :container
22
-
23
- def logger = container[__method__]
24
- end
25
- end
26
- end
27
- end
@@ -1,27 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module SublimeTextKit
4
- module Snippets
5
- module Printers
6
- # Prints snippets in Markdown format.
7
- class Markdown
8
- def initialize collector: Collector.new, container: Container
9
- @collector = collector
10
- @container = container
11
- end
12
-
13
- def call
14
- collector.call.each do |snippet|
15
- logger.info "- #{snippet.description} - `#{snippet.trigger}`"
16
- end
17
- end
18
-
19
- private
20
-
21
- attr_reader :collector, :container
22
-
23
- def logger = container[__method__]
24
- end
25
- end
26
- end
27
- end