sublime_text_kit 12.3.1 → 13.0.1

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: dbe2bdb0dedefddc7a66ef8571fc8bf18727d2751b15d323a4362e4d1a77acec
4
- data.tar.gz: 56cf1df0db3d9aba93a9be2cab0191a62e3d41518e2039529f3cdfd072f0e749
3
+ metadata.gz: 680ddc69b6a9c219927c3cf79ee8b23b696a1edfe334c6f65e63289fd3339a55
4
+ data.tar.gz: e03a2ec21309d395d0cf63200cf5a073ac512b846c2ac820af4846c94b07b33d
5
5
  SHA512:
6
- metadata.gz: c0cfbc221321820bd246a4afd6e2174a3f37aef07d6ba3830a428ad8c17ca0a80affadbf860790fe4e16754ce3cdda42bc2302b2da4bda757b121ef63df4de35
7
- data.tar.gz: c2ba0d8a3c74a206d15fac26d2a1cbc5027659c9d03598182e7eef5108a31e9e99d617eece5d67b978363447e1606c8df44a19e7c628985b9172d8ea0699cdb0
6
+ metadata.gz: 5527011b52cb7107e6552e760b019eceee30a0de6ad3a1da6bb809a00d707c67e096e78650480581bdd817a040886a7b3e4b29c3b15d0157cbacc4f746979efc
7
+ data.tar.gz: 80d4878ba870dc9a8a2ea2c46f723f8e9b6931790c48481e0dadecfa06c017161ecd181fd71245e776a02e693251377ff67a9801fb98924f4ae8c306e880537b
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
 
@@ -67,9 +71,9 @@ module SublimeTextKit
67
71
  "--snippets [FORMAT]",
68
72
  %i[markdown ascii_doc],
69
73
  "View snippets. Formats: markdown or ascii_doc. " \
70
- "Default: #{configuration.snippets_format}."
74
+ "Default: #{snippets_format}."
71
75
  ) do |kind|
72
- configuration.merge! action_snippets: true, snippets_format: kind
76
+ configuration.merge! action_snippets: true, snippets_format: kind || snippets_format
73
77
  end
74
78
  end
75
79
 
@@ -95,7 +99,7 @@ module SublimeTextKit
95
99
  end
96
100
  end
97
101
 
98
- def specification = container[__method__]
102
+ def snippets_format = configuration.snippets_format
99
103
  end
100
104
  end
101
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.1"
5
+ spec.version = "13.0.1"
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"
@@ -22,8 +22,9 @@ Gem::Specification.new do |spec|
22
22
  spec.cert_chain = [Gem.default_cert_path]
23
23
 
24
24
  spec.required_ruby_version = "~> 3.1"
25
- spec.add_dependency "dry-container", "~> 0.8"
26
- spec.add_dependency "pastel", "~> 0.8"
25
+ spec.add_dependency "auto_injector", "~> 0.4"
26
+ spec.add_dependency "cogger", "~> 0.0"
27
+ spec.add_dependency "dry-container", "~> 0.9"
27
28
  spec.add_dependency "refinements", "~> 9.2"
28
29
  spec.add_dependency "runcom", "~> 8.2"
29
30
  spec.add_dependency "spek", "~> 0.2"
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: 12.3.1
4
+ version: 13.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brooke Kuhlmann
@@ -10,9 +10,9 @@ bindir: exe
10
10
  cert_chain:
11
11
  - |
12
12
  -----BEGIN CERTIFICATE-----
13
- MIIC/jCCAeagAwIBAgIBBDANBgkqhkiG9w0BAQsFADAlMSMwIQYDVQQDDBpicm9v
14
- a2UvREM9YWxjaGVtaXN0cy9EQz1pbzAeFw0yMTAzMTkxMjQ4MDZaFw0yMjAzMTkx
15
- MjQ4MDZaMCUxIzAhBgNVBAMMGmJyb29rZS9EQz1hbGNoZW1pc3RzL0RDPWlvMIIB
13
+ MIIC/jCCAeagAwIBAgIBBTANBgkqhkiG9w0BAQsFADAlMSMwIQYDVQQDDBpicm9v
14
+ a2UvREM9YWxjaGVtaXN0cy9EQz1pbzAeFw0yMjAzMTkxNzI0MzJaFw0yMzAzMTkx
15
+ NzI0MzJaMCUxIzAhBgNVBAMMGmJyb29rZS9EQz1hbGNoZW1pc3RzL0RDPWlvMIIB
16
16
  IjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA6l1qpXTiomH1RfMRloyw7MiE
17
17
  xyVx/x8Yc3EupdH7uhNaTXQGyORN6aOY//1QXXMHIZ9tW74nZLhesWMSUMYy0XhB
18
18
  brs+KkurHnc9FnEJAbG7ebGvl/ncqZt72nQvaxpDxvuCBHgJAz+8i5wl6FhLw+oT
@@ -20,44 +20,58 @@ cert_chain:
20
20
  D5vkU0YlAm1r98BymuJlcQ1qdkVEI1d48ph4kcS0S0nv1RiuyVb6TCAR3Nu3VaVq
21
21
  3fPzZKJLZBx67UvXdbdicWPiUR75elI4PXpLIic3xytaF52ZJYyKZCNZJhNwfQID
22
22
  AQABozkwNzAJBgNVHRMEAjAAMAsGA1UdDwQEAwIEsDAdBgNVHQ4EFgQU0nzow9vc
23
- 2CdikiiE3fJhP/gY4ggwDQYJKoZIhvcNAQELBQADggEBAEjpaOXHHp8s/7GL2qCb
24
- YAs7urOLv9VHSPfQWAwaTMVnSsIf3Sw4xzISOP/mmfEPBPXtz61K5esrE/uTFtgb
25
- FyjxQk2H0sEWgrRXGGNHBWQRhhEs7LP/TByoC15A0br++xLxRz4r7HBLGAWQQDpg
26
- 66BJ2TBVjxS6K64tKbq7+ACyrOZGgTfNHACh4M076y0x0oRf/rwBrU39/KRfuhbb
27
- cm+nNCEtO35gTmZ2bVDHLGvWazi3gJt6+huQjfXTCUUG2YYBxwhu+GPdAGQPxpf9
28
- lkHilIrX69jq8wMPpBhlaw2mRmeSL50Wv5u6xVBvOHhXFSP1crXM95vfLhLyRYod
29
- W2A=
23
+ 2CdikiiE3fJhP/gY4ggwDQYJKoZIhvcNAQELBQADggEBAJbbNyWzFjqUNVPPCUCo
24
+ IMrhDa9xf1xkORXNYYbmXgoxRy/KyNbUr+jgEEoWJAm9GXlcqxxWAUI6pK/i4/Qi
25
+ X6rPFEFmeObDOHNvuqy8Hd6AYsu+kP94U/KJhe9wnWGMmGoNKJNU3EkW3jM/osSl
26
+ +JRxiH5t4WtnDiVyoYl5nYC02rYdjJkG6VMxDymXTqn7u6HhYgZkGujq1UPar8x2
27
+ hNIWJblDKKSu7hA2d6+kUthuYo13o1sg1Da/AEDg0hoZSUvhqDEF5Hy232qb3pDt
28
+ CxDe2+VuChj4I1nvIHdu+E6XoEVlanUPKmSg6nddhkKn2gC45Kyzh6FZqnzH/CRp
29
+ RFE=
30
30
  -----END CERTIFICATE-----
31
- date: 2022-03-04 00:00:00.000000000 Z
31
+ date: 2022-04-23 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.8'
39
+ version: '0.4'
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.8'
46
+ version: '0.4'
47
47
  - !ruby/object:Gem::Dependency
48
- name: pastel
48
+ name: cogger
49
+ requirement: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - "~>"
52
+ - !ruby/object:Gem::Version
53
+ version: '0.0'
54
+ type: :runtime
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ requirements:
58
+ - - "~>"
59
+ - !ruby/object:Gem::Version
60
+ version: '0.0'
61
+ - !ruby/object:Gem::Dependency
62
+ name: dry-container
49
63
  requirement: !ruby/object:Gem::Requirement
50
64
  requirements:
51
65
  - - "~>"
52
66
  - !ruby/object:Gem::Version
53
- version: '0.8'
67
+ version: '0.9'
54
68
  type: :runtime
55
69
  prerelease: false
56
70
  version_requirements: !ruby/object:Gem::Requirement
57
71
  requirements:
58
72
  - - "~>"
59
73
  - !ruby/object:Gem::Version
60
- version: '0.8'
74
+ version: '0.9'
61
75
  - !ruby/object:Gem::Dependency
62
76
  name: refinements
63
77
  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
@@ -176,7 +192,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
176
192
  - !ruby/object:Gem::Version
177
193
  version: '0'
178
194
  requirements: []
179
- rubygems_version: 3.3.8
195
+ rubygems_version: 3.3.12
180
196
  signing_key:
181
197
  specification_version: 4
182
198
  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