sublime_text_kit 11.0.0 → 11.0.1

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: 1edd436349eaa5af3d9a56ba765ba547e42d2a50f512e0e2e58b27fe0727a652
4
- data.tar.gz: 76c23a4bfc6aa007d0a2f09c7c2ce374d9080ca6c714799a624d22a2aebffbf0
3
+ metadata.gz: f09a97c9c7bd65b2e03cbcd38b5d7eea709ee4a253e6be57ac3101d948f7a3df
4
+ data.tar.gz: 4eb97c05c9d833826fcab6ddb812fa33ca94a9b595d991066247250dcfc0682c
5
5
  SHA512:
6
- metadata.gz: 2b72e4c50adce16c70a3d08f2004afe3bca0e2e617127277829990fd666a506c5b89436a46bc64cc697cf4fae9d72502565a04102f9cbbc7787d0c9b790e1fcd
7
- data.tar.gz: 5d2e45a08e168f6d2377b70496e0b1c64b2cc2472524d793263699a5842a18c8cace41a58ef2f523020240810925ad2df316539e40f7599be4729373ed163052
6
+ metadata.gz: e7035860e908e521ec4445ceaa7bb8d3dcfa10974aa6885dba538c214e8a8c531550c596556c9e3d9d13bd181116c8ec2a4a4c9f075e5c8dea8125daccdf5289
7
+ data.tar.gz: '0385887b44d98e5742e5b8a1a277a518886d119700ba76b2d143349dfc4db8a7973ea94f7e76e23918e6c1c45ab0d920861fce3000645997d21a4382e0582729'
checksums.yaml.gz.sig CHANGED
Binary file
data/README.adoc CHANGED
@@ -12,18 +12,19 @@ image::https://img.shields.io/badge/code_style-alchemists-brightgreen.svg[Alchem
12
12
  image::https://circleci.com/gh/bkuhlmann/sublime_text_kit.svg?style=svg[Circle CI Status]
13
13
 
14
14
  Sublime Text Kit is a command line interface for managing Sublime Text metadata for multiple
15
- projects, sessions, etc. It's also great for generating the metadata you need, while avoiding manual
16
- labor, from existing projects.
15
+ projects, sessions, snippets, etc. This allows you to avoiding manual maintenance of your workspace
16
+ so you can stay focused on your own work.
17
17
 
18
18
  toc::[]
19
19
 
20
20
  == Features
21
21
 
22
- * Provides project metadata (i.e. `.sublime-project` and `.sublime-workspace` files) management for
23
- project switching via the `CONTROL+COMMAND+P` shortcut.
24
- * Rebuilds project history (Project -> Recent Projects) from existing project files (assumes project
25
- metadata is in a directory) so one can easily toggle between up-to-date project information via
26
- the `CONTROL+COMMAND+P` shortcut.
22
+ * Manages project metadata (`.sublime-project` and `.sublime-workspace` files).
23
+ * Manages session metadata so you can quickly toggle between projects via the `CONTROL+COMMAND+p`
24
+ shortcut.
25
+ * Prints all of your custom snippets in either
26
+ link:https://daringfireball.net/projects/markdown[Markdown] or
27
+ link:https://asciidoctor.org[ASCII Doc] format.
27
28
 
28
29
  == Requirements
29
30
 
@@ -49,10 +50,10 @@ From the command line, type: `sublime_text_kit`
49
50
  USAGE:
50
51
  -c, --config ACTION Manage gem configuration. Actions: edit or view.
51
52
  -h, --help Show this message.
52
- -m, --metadata ACTION Manage metadata. Actions: create, delete, or recreate.
53
- -S, --session Rebuild session.
54
- -s, --snippets [FORMAT] View snippets. Default: markdown. Formats: markdown or ascii_doc.
55
- -u, --update Update metadata and session based on current settings.
53
+ -m, --metadata ACTION Manage project metadata. Actions: create, delete, or recreate.
54
+ -S, --session Rebuild session metadata.
55
+ -s, --snippets [FORMAT] View snippets. Default: ascii_doc. Formats: markdown or ascii_doc.
56
+ -u, --update Update project and session metadata based on current settings.
56
57
  -v, --version Show gem version.
57
58
  ....
58
59
 
@@ -67,26 +68,26 @@ An example configuration could be:
67
68
  [source,yaml]
68
69
  ----
69
70
  :project_roots:
70
- - "~/Engineering/Contributions"
71
+ - "~/Engineering/Organizations"
71
72
  - "~/Engineering/OSS"
72
73
  :metadata_dir: "~/Dropbox/Cache/Sublime"
73
74
  :snippets_format: :ascii_doc
74
75
  ----
75
76
 
76
- Feel free to take this configuration, modify, and save as your own custom `+configuration.yml+`.
77
+ Feel free to take this configuration, modify, and save as your own.
77
78
 
78
- The project roots define the root level directories where project folders are located. When project
79
- metadata (i.e. `.sublime-project`, `.sublime-workspace`) is generated, the name of the metadata file
80
- will be the same name as that of the project folder. All project metadata, regardless of root
81
- location, is written to the same metadata directory. If using the example settings shown above and
82
- assuming the following directory structure exists…
79
+ The `project_roots` key defines the root level directories where your project folders are located.
80
+ When project metadata (i.e. `.sublime-project`, `.sublime-workspace`) is generated, the name of the
81
+ metadata file will be the same name as the project folder. All project metadata, regardless of root
82
+ location, is written to the same metadata directory as defined by the `metadata_dir` key. If using
83
+ the example settings shown above and assuming the following directory structure exists…
83
84
 
84
85
  ....
85
86
  ~/Engineering/OSS/example
86
87
  ~/Engineering/OSS/sublime_text_kit
87
88
  ....
88
89
 
89
- …the project metadata will be created in the workspace directory as follows:
90
+ ...project metadata will be created in the `metadata_dir` as follows:
90
91
 
91
92
  ....
92
93
  ~/Dropbox/Cache/Sublime/example.sublime-project
@@ -95,25 +96,33 @@ assuming the following directory structure exists…
95
96
  ~/Dropbox/Cache/Sublime/sublime_text_kit.sublime-workspace
96
97
  ....
97
98
 
99
+ The `snippets_format` key allows you define what format to print your snippets as. The default
100
+ format is Markdown but you can switch to ASCII Doc too. You can always override your default
101
+ configuration by specifying the format from the command line: `sublime_text_kit -s ascii_doc`. For
102
+ example, this is how link:https://www.alchemists.io/projects/sublime_text_setup/#_snippets[snippets
103
+ documentation] is genereted for the
104
+ link:https://www.alchemists.io/projects/sublime_text_setup[Sublime Text Setup] project.
105
+
98
106
  === Workflow
99
107
 
100
108
  The following demonstrates a default Sublime Text setup:
101
109
 
102
- . Run: `sublime_text_kit --config --edit` (define Sublime Text Kit settings for project roots and
103
- metadata directory).
104
- . Shutdown Sublime Text (i.e. `CONTROL+Q`).
105
- . Run: `sublime_text_kit --metadata create` (creates project metadata and rebuilds the session
106
- metadata so Sublime Text has a complete project history from which to jump through via the
107
- `CONTROL+COMMMAND+P` shortcut).
108
- . Launch Sublime Text and use the `CONTROL+COMMAND+P` keyboard shortcut to toggle between
109
- projects. Notice that you can (fuzzy type) project names to jump between them.
110
- . Breeze through your project workload with ease. 🎉
110
+ 1. Start by defining your configuration: `sublime_text_kit --config edit`.
111
+ 1. Shutdown Sublime Text (i.e. `COMMAND+q`).
112
+ 1. Run `sublime_text_kit --update` which will create project metadata and rebuild session metadata
113
+ so Sublime Text has a complete project history from which to switch between via the
114
+ `CONTROL+COMMMAND+p` shortcut.
115
+ 1. Launch Sublime Text and use the `CONTROL+COMMAND+p` keyboard shortcut to toggle between projects.
116
+ Notice that you can (fuzzy type) project names to jump between them.
117
+ 1. Navigate through your project workload with ease. 🎉
111
118
 
112
119
  === Troubleshooting
113
120
 
114
- * When rebuilding workspaces, ensure Sublime Text is shutdown or changes won’t be applied.
115
- * When rebuilding workspaces, ensure workspace_dir (as defined via settings.yml) points to a
116
- directory containing `.sublime-project` and `.sublime-workspace` files.
121
+ * When rebuilding your session, ensure Sublime Text is shut down or changes might not be applied
122
+ properly.
123
+ * When rebuilding project metadata, ensure the `metadata_dir` -- as defined via your configuration
124
+ -- points to an existing directory which can contain `.sublime-project` and `.sublime-workspace`
125
+ files.
117
126
 
118
127
  == Development
119
128
 
@@ -19,13 +19,15 @@ module SublimeTextKit
19
19
  kind = configuration.snippets_format
20
20
  printers.fetch(kind).call
21
21
  rescue KeyError
22
- logger.error { "Invalid snippet format: #{kind}." }
22
+ logger.error { "Invalid snippet format (must be a symbol): #{kind}. Use: #{formats}." }
23
23
  end
24
24
 
25
25
  private
26
26
 
27
27
  attr_reader :printers, :container
28
28
 
29
+ def formats = printers.keys.map(&:inspect).join(" or ")
30
+
29
31
  def configuration = container[__method__]
30
32
 
31
33
  def logger = container[__method__]
@@ -44,14 +44,14 @@ module SublimeTextKit
44
44
  "-m",
45
45
  "--metadata ACTION",
46
46
  %i[create delete recreate],
47
- "Manage metadata. Actions: create, delete, or recreate."
47
+ "Manage project metadata. Actions: create, delete, or recreate."
48
48
  ) do |action|
49
49
  configuration.action_metadata = action
50
50
  end
51
51
  end
52
52
 
53
53
  def add_session
54
- client.on "-S", "--session", "Rebuild session." do
54
+ client.on "-S", "--session", "Rebuild session metadata." do
55
55
  configuration.action_session = true
56
56
  end
57
57
  end
@@ -70,7 +70,11 @@ module SublimeTextKit
70
70
  end
71
71
 
72
72
  def add_update
73
- client.on "-u", "--update", "Update metadata and session based on current settings." do
73
+ client.on(
74
+ "-u",
75
+ "--update",
76
+ "Update project and session metadata based on current settings."
77
+ ) do
74
78
  configuration.action_update = true
75
79
  end
76
80
  end
@@ -5,7 +5,7 @@ module SublimeTextKit
5
5
  module Identity
6
6
  NAME = "sublime_text_kit"
7
7
  LABEL = "Sublime Text Kit"
8
- VERSION = "11.0.0"
8
+ VERSION = "11.0.1"
9
9
  VERSION_LABEL = "#{LABEL} #{VERSION}".freeze
10
10
  SUMMARY = "A command line interface for managing Sublime Text metadata."
11
11
  end
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: 11.0.0
4
+ version: 11.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brooke Kuhlmann
@@ -28,7 +28,7 @@ cert_chain:
28
28
  lkHilIrX69jq8wMPpBhlaw2mRmeSL50Wv5u6xVBvOHhXFSP1crXM95vfLhLyRYod
29
29
  W2A=
30
30
  -----END CERTIFICATE-----
31
- date: 2021-10-06 00:00:00.000000000 Z
31
+ date: 2021-10-09 00:00:00.000000000 Z
32
32
  dependencies:
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: dry-container
metadata.gz.sig CHANGED
Binary file