sublime_text_kit 8.5.2 → 9.4.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 +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/{LICENSE.md → LICENSE.adoc} +29 -30
- data/README.adoc +202 -0
- data/bin/sublime_text_kit +1 -1
- data/lib/sublime_text_kit.rb +2 -0
- data/lib/sublime_text_kit/cli.rb +20 -9
- data/lib/sublime_text_kit/identity.rb +4 -15
- data/lib/sublime_text_kit/metadata/project_metadata.rb +0 -4
- data/lib/sublime_text_kit/metadata/workspace_metadata.rb +0 -4
- data/lib/sublime_text_kit/snippets/collector.rb +36 -0
- data/lib/sublime_text_kit/snippets/printers/ascii_doc.rb +25 -0
- data/lib/sublime_text_kit/snippets/printers/markdown.rb +4 -23
- metadata +51 -104
- metadata.gz.sig +0 -0
- data/README.md +0 -184
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 488c837f0e38c3766ab3d144e29323663c0d411e931b4aa33f80997f9f135991
|
|
4
|
+
data.tar.gz: 0ccc6c0b620e8fc1301c29df41ee1e44046ef6f50e29faa86eab8322d5afa36f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: df61dd1029b8298dc68622236324617f8864278fb1e3f34a9d0053378e80bb01d572b9c0a4c6da41822f8840232e4829cfdab978d4a09f7ca92fd3efe889118e
|
|
7
|
+
data.tar.gz: d981fdfad66e41efef166f3bee91bd1c934914bcec5a5f54b898b6e22a13cdfb8b6779533f66af335da04b59df6a926fafec296fc7931f00991044424498febd
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
data.tar.gz.sig
CHANGED
|
Binary file
|
data/{LICENSE.md → LICENSE.adoc}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
= Apache License
|
|
2
2
|
|
|
3
3
|
Version 2.0, January 2004
|
|
4
4
|
|
|
@@ -6,7 +6,7 @@ http://www.apache.org/licenses
|
|
|
6
6
|
|
|
7
7
|
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
== 1. Definitions
|
|
10
10
|
|
|
11
11
|
"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by
|
|
12
12
|
Sections 1 through 9 of this document.
|
|
@@ -54,14 +54,14 @@ Contribution."
|
|
|
54
54
|
"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a
|
|
55
55
|
Contribution has been received by Licensor and subsequently incorporated within the Work.
|
|
56
56
|
|
|
57
|
-
|
|
57
|
+
== 2. Grant of Copyright License
|
|
58
58
|
|
|
59
59
|
Subject to the terms and conditions of this License, each Contributor hereby grants to You a
|
|
60
60
|
perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to
|
|
61
61
|
reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and
|
|
62
62
|
distribute the Work and such Derivative Works in Source or Object form.
|
|
63
63
|
|
|
64
|
-
|
|
64
|
+
== 3. Grant of Patent License
|
|
65
65
|
|
|
66
66
|
Subject to the terms and conditions of this License, each Contributor hereby grants to You a
|
|
67
67
|
perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this
|
|
@@ -74,39 +74,38 @@ a Contribution incorporated within the Work constitutes direct or contributory p
|
|
|
74
74
|
then any patent licenses granted to You under this License for that Work shall terminate as of the
|
|
75
75
|
date such litigation is filed.
|
|
76
76
|
|
|
77
|
-
|
|
77
|
+
== 4. Redistribution
|
|
78
78
|
|
|
79
79
|
You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with
|
|
80
80
|
or without modifications, and in Source or Object form, provided that You meet the following
|
|
81
81
|
conditions:
|
|
82
82
|
|
|
83
|
-
|
|
83
|
+
. You must give any other recipients of the Work or Derivative Works a copy of this License; and
|
|
84
84
|
|
|
85
|
-
|
|
86
|
-
|
|
85
|
+
. You must cause any modified files to carry prominent notices stating that You changed the files;
|
|
86
|
+
and
|
|
87
87
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
88
|
+
. You must retain, in the Source form of any Derivative Works that You distribute, all copyright,
|
|
89
|
+
patent, trademark, and attribution notices from the Source form of the Work, excluding those
|
|
90
|
+
notices that do not pertain to any part of the Derivative Works; and
|
|
91
91
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
construed as modifying the License.
|
|
92
|
+
. If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works
|
|
93
|
+
that You distribute must include a readable copy of the attribution notices contained within such
|
|
94
|
+
NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in
|
|
95
|
+
at least one of the following places: within a NOTICE text file distributed as part of the
|
|
96
|
+
Derivative Works; within the Source form or documentation, if provided along with the Derivative
|
|
97
|
+
Works; or, within a display generated by the Derivative Works, if and wherever such third-party
|
|
98
|
+
notices normally appear. The contents of the NOTICE file are for informational purposes only and
|
|
99
|
+
do not modify the License. You may add Your own attribution notices within Derivative Works that
|
|
100
|
+
You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such
|
|
101
|
+
additional attribution notices cannot be construed as modifying the License.
|
|
103
102
|
|
|
104
103
|
You may add Your own copyright statement to Your modifications and may provide additional or
|
|
105
104
|
different license terms and conditions for use, reproduction, or distribution of Your modifications,
|
|
106
105
|
or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of
|
|
107
106
|
the Work otherwise complies with the conditions stated in this License.
|
|
108
107
|
|
|
109
|
-
|
|
108
|
+
== 5. Submission of Contributions
|
|
110
109
|
|
|
111
110
|
Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the
|
|
112
111
|
Work by You to the Licensor shall be under the terms and conditions of this License, without any
|
|
@@ -114,13 +113,13 @@ additional terms or conditions. Notwithstanding the above, nothing herein shall
|
|
|
114
113
|
the terms of any separate license agreement you may have executed with Licensor regarding such
|
|
115
114
|
Contributions.
|
|
116
115
|
|
|
117
|
-
|
|
116
|
+
== 6. Trademarks
|
|
118
117
|
|
|
119
118
|
This License does not grant permission to use the trade names, trademarks, service marks, or product
|
|
120
119
|
names of the Licensor, except as required for reasonable and customary use in describing the origin
|
|
121
120
|
of the Work and reproducing the content of the NOTICE file.
|
|
122
121
|
|
|
123
|
-
|
|
122
|
+
== 7. Disclaimer of Warranty
|
|
124
123
|
|
|
125
124
|
Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each
|
|
126
125
|
Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
@@ -129,7 +128,7 @@ TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. Y
|
|
|
129
128
|
responsible for determining the appropriateness of using or redistributing the Work and assume any
|
|
130
129
|
risks associated with Your exercise of permissions under this License.
|
|
131
130
|
|
|
132
|
-
|
|
131
|
+
== 8. Limitation of Liability
|
|
133
132
|
|
|
134
133
|
In no event and under no legal theory, whether in tort (including negligence), contract, or
|
|
135
134
|
otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or
|
|
@@ -139,7 +138,7 @@ License or out of the use or inability to use the Work (including but not limite
|
|
|
139
138
|
loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial
|
|
140
139
|
damages or losses), even if such Contributor has been advised of the possibility of such damages.
|
|
141
140
|
|
|
142
|
-
|
|
141
|
+
== 9. Accepting Warranty or Additional Liability
|
|
143
142
|
|
|
144
143
|
While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee
|
|
145
144
|
for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights
|
|
@@ -151,11 +150,11 @@ additional liability.
|
|
|
151
150
|
|
|
152
151
|
END OF TERMS AND CONDITIONS
|
|
153
152
|
|
|
154
|
-
Copyright
|
|
153
|
+
Copyright link:https://www.alchemists.io[Alchemists].
|
|
155
154
|
|
|
156
155
|
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
|
|
157
|
-
compliance with the License. You may obtain a
|
|
158
|
-
the License.
|
|
156
|
+
compliance with the License. You may obtain a link:https://www.apache.org/licenses/LICENSE-2.0[copy]
|
|
157
|
+
of the License.
|
|
159
158
|
|
|
160
159
|
Unless required by applicable law or agreed to in writing, software distributed under the License is
|
|
161
160
|
distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
data/README.adoc
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
:toc: macro
|
|
2
|
+
:toclevels: 5
|
|
3
|
+
:figure-caption!:
|
|
4
|
+
|
|
5
|
+
= Sublime Text Kit
|
|
6
|
+
|
|
7
|
+
[link=http://badge.fury.io/rb/sublime_text_kit]
|
|
8
|
+
image::https://badge.fury.io/rb/sublime_text_kit.svg[Gem Version]
|
|
9
|
+
[link=https://circleci.com/gh/bkuhlmann/sublime_text_kit]
|
|
10
|
+
image::https://circleci.com/gh/bkuhlmann/sublime_text_kit.svg?style=svg[Circle CI Status]
|
|
11
|
+
|
|
12
|
+
A command line interface for managing Sublime Text metadata.
|
|
13
|
+
|
|
14
|
+
toc::[]
|
|
15
|
+
|
|
16
|
+
== Features
|
|
17
|
+
|
|
18
|
+
* Provides project metadata (i.e. `.sublime-project` and `.sublime-workspace` files) management for
|
|
19
|
+
project switching via the `CONTROL+COMMAND+P` shortcut.
|
|
20
|
+
* Rebuilds project history (Project -> Recent Projects) from existing project files (assumes project
|
|
21
|
+
metadata is in a directory) so one can easily toggle between up-to-date project information via
|
|
22
|
+
the `CONTROL+COMMAND+P` shortcut.
|
|
23
|
+
|
|
24
|
+
== Screencasts
|
|
25
|
+
|
|
26
|
+
[link=https://www.alchemists.io/screencasts/sublime_text_kit]
|
|
27
|
+
image::https://www.alchemists.io/images/screencasts/sublime_text_kit/cover.svg[Screencast,600,240,role=focal_point]
|
|
28
|
+
|
|
29
|
+
== Requirements
|
|
30
|
+
|
|
31
|
+
. link:https://www.ruby-lang.org[Ruby]
|
|
32
|
+
. link:https://www.sublimetext.com[Sublime Text]
|
|
33
|
+
|
|
34
|
+
== Setup
|
|
35
|
+
|
|
36
|
+
=== Production
|
|
37
|
+
|
|
38
|
+
To install, run:
|
|
39
|
+
|
|
40
|
+
[source,bash]
|
|
41
|
+
----
|
|
42
|
+
gem install sublime_text_kit
|
|
43
|
+
----
|
|
44
|
+
|
|
45
|
+
=== Development
|
|
46
|
+
|
|
47
|
+
To contribute, run:
|
|
48
|
+
|
|
49
|
+
[source,bash]
|
|
50
|
+
----
|
|
51
|
+
git clone https://github.com/bkuhlmann/sublime_text_kit.git
|
|
52
|
+
cd sublime_text_kit
|
|
53
|
+
bin/setup
|
|
54
|
+
----
|
|
55
|
+
|
|
56
|
+
You can also use the IRB console for direct access to all objects:
|
|
57
|
+
|
|
58
|
+
[source,bash]
|
|
59
|
+
----
|
|
60
|
+
bin/console
|
|
61
|
+
----
|
|
62
|
+
|
|
63
|
+
== Usage
|
|
64
|
+
|
|
65
|
+
=== Command Line Interface (CLI)
|
|
66
|
+
|
|
67
|
+
From the command line, type: `sublime_text_kit`
|
|
68
|
+
|
|
69
|
+
....
|
|
70
|
+
sublime_text_kit -c, [--config] # Manage gem configuration.
|
|
71
|
+
sublime_text_kit -h, [--help=COMMAND] # Show this message or get help for a command.
|
|
72
|
+
sublime_text_kit -m, [--metadata] # Manage project/workspace metadata.
|
|
73
|
+
sublime_text_kit -p, [--snippets] # Print user defined snippets.
|
|
74
|
+
sublime_text_kit -s, [--session] # Manage session metadata.
|
|
75
|
+
sublime_text_kit -u, [--update] # Update Sublime Text with current settings.
|
|
76
|
+
sublime_text_kit -v, [--version] # Show gem version.
|
|
77
|
+
....
|
|
78
|
+
|
|
79
|
+
For configuration options, type: `sublime_text_kit --help --config`
|
|
80
|
+
|
|
81
|
+
....
|
|
82
|
+
-e, [--edit], [--no-edit] # Edit gem configuration.
|
|
83
|
+
-i, [--info], [--no-info] # Print gem configuration.
|
|
84
|
+
....
|
|
85
|
+
|
|
86
|
+
For metadata options, type: `sublime_text_kit --help --metadata`
|
|
87
|
+
|
|
88
|
+
....
|
|
89
|
+
-c, [--create], [--no-create] # Create metadata.
|
|
90
|
+
-D, [--destroy], [--no-destroy] # Destroy metadata.
|
|
91
|
+
-R, [--rebuild], [--no-rebuild] # Rebuild metadata.
|
|
92
|
+
....
|
|
93
|
+
|
|
94
|
+
For session options, type: `sublime_text_kit --help --session`
|
|
95
|
+
|
|
96
|
+
....
|
|
97
|
+
-R, [--rebuild], [--no-rebuild] # Rebuild session metadata.
|
|
98
|
+
....
|
|
99
|
+
|
|
100
|
+
For snippet options, type: `sublime_text_kit --help --snippets`
|
|
101
|
+
|
|
102
|
+
....
|
|
103
|
+
-a, [--ascii-doc], [--no-ascii-doc] # Print snippets in ASCII Doc format.
|
|
104
|
+
-m, [--markdown], [--no-markdown] # Print snippets in Markdown format.
|
|
105
|
+
....
|
|
106
|
+
|
|
107
|
+
=== Customization
|
|
108
|
+
|
|
109
|
+
This gem can be configured via a global configuration:
|
|
110
|
+
`~/.config/sublime_text_kit/configuration.yml`. It can also be configured via
|
|
111
|
+
link:https://www.alchemists.io/projects/xdg[XDG] environment variables.
|
|
112
|
+
|
|
113
|
+
An example configuration could be:
|
|
114
|
+
|
|
115
|
+
[source,yaml]
|
|
116
|
+
----
|
|
117
|
+
:project_roots:
|
|
118
|
+
- "~/Dropbox/Development/Misc"
|
|
119
|
+
- "~/Dropbox/Development/OSS"
|
|
120
|
+
- "~/Dropbox/Development/Work"
|
|
121
|
+
:metadata_dir: "~/Dropbox/Cache/Sublime"
|
|
122
|
+
----
|
|
123
|
+
|
|
124
|
+
Feel free to take this configuration, modify, and save as your own custom `+configuration.yml+`.
|
|
125
|
+
|
|
126
|
+
The project roots define the root level directories where project folders are located. When project
|
|
127
|
+
metadata (i.e. `.sublime-project`, `.sublime-workspace`) is generated, the name of the metadata file
|
|
128
|
+
will be the same name as that of the project folder. All project metadata, regardless of root
|
|
129
|
+
location, is written to the same metadata directory. If using the example settings shown above and
|
|
130
|
+
assuming the following directory structure exists…
|
|
131
|
+
|
|
132
|
+
....
|
|
133
|
+
~/Dropbox/Development/Misc/example
|
|
134
|
+
~/Dropbox/Development/OSS/sublime_text_kit
|
|
135
|
+
....
|
|
136
|
+
|
|
137
|
+
…the project metadata will be created in the workspace directory as follows:
|
|
138
|
+
|
|
139
|
+
....
|
|
140
|
+
~/Dropbox/Cache/Sublime/example.sublime-project
|
|
141
|
+
~/Dropbox/Cache/Sublime/example.sublime-workspace
|
|
142
|
+
~/Dropbox/Cache/Sublime/sublime_text_kit.sublime-project
|
|
143
|
+
~/Dropbox/Cache/Sublime/sublime_text_kit.sublime-workspace
|
|
144
|
+
....
|
|
145
|
+
|
|
146
|
+
=== Workflow
|
|
147
|
+
|
|
148
|
+
The following demonstrates a default Sublime Text setup:
|
|
149
|
+
|
|
150
|
+
. Run: `sublime_text_kit --config --edit` (define Sublime Text Kit settings for project roots and
|
|
151
|
+
metadata directory).
|
|
152
|
+
. Shutdown Sublime Text (i.e. `CONTROL+Q`).
|
|
153
|
+
. Run: `sublime_text_kit --metadata --create` (creates project metadata and rebuilds the session
|
|
154
|
+
metadata so Sublime Text has a complete project history from which to jump through via the
|
|
155
|
+
`CONTROL+COMMMAND+P` shortcut).
|
|
156
|
+
. Launch Sublime Text and use the `CONTROL+COMMAND+P` keyboard shortcut to toggle between
|
|
157
|
+
projects. Notice that you can (fuzzy type) project names to jump between them.
|
|
158
|
+
. Breeze through your project workload with ease. 😉
|
|
159
|
+
|
|
160
|
+
=== Troubleshooting
|
|
161
|
+
|
|
162
|
+
* When rebuilding workspaces, ensure Sublime Text is shutdown or changes won’t be applied.
|
|
163
|
+
* When rebuilding workspaces, ensure workspace_dir (as defined via settings.yml) points to a
|
|
164
|
+
directory containing `.sublime-project` and `.sublime-workspace` files.
|
|
165
|
+
|
|
166
|
+
== Tests
|
|
167
|
+
|
|
168
|
+
To test, run:
|
|
169
|
+
|
|
170
|
+
[source,bash]
|
|
171
|
+
----
|
|
172
|
+
bundle exec rake
|
|
173
|
+
----
|
|
174
|
+
|
|
175
|
+
== Versioning
|
|
176
|
+
|
|
177
|
+
Read link:https://semver.org[Semantic Versioning] for details. Briefly, it means:
|
|
178
|
+
|
|
179
|
+
* Major (X.y.z) - Incremented for any backwards incompatible public API changes.
|
|
180
|
+
* Minor (x.Y.z) - Incremented for new, backwards compatible, public API enhancements/fixes.
|
|
181
|
+
* Patch (x.y.Z) - Incremented for small, backwards compatible, bug fixes.
|
|
182
|
+
|
|
183
|
+
== Code of Conduct
|
|
184
|
+
|
|
185
|
+
Please note that this project is released with a link:CODE_OF_CONDUCT.adoc[CODE OF CONDUCT]. By
|
|
186
|
+
participating in this project you agree to abide by its terms.
|
|
187
|
+
|
|
188
|
+
== Contributions
|
|
189
|
+
|
|
190
|
+
Read link:CONTRIBUTING.adoc[CONTRIBUTING] for details.
|
|
191
|
+
|
|
192
|
+
== License
|
|
193
|
+
|
|
194
|
+
Read link:LICENSE.adoc[LICENSE] for details.
|
|
195
|
+
|
|
196
|
+
== History
|
|
197
|
+
|
|
198
|
+
Read link:CHANGES.adoc[CHANGES] for details.
|
|
199
|
+
|
|
200
|
+
== Credits
|
|
201
|
+
|
|
202
|
+
Engineered by link:https://www.alchemists.io/team/brooke_kuhlmann[Brooke Kuhlmann].
|
data/bin/sublime_text_kit
CHANGED
data/lib/sublime_text_kit.rb
CHANGED
|
@@ -5,6 +5,8 @@ require "sublime_text_kit/metadata/base"
|
|
|
5
5
|
require "sublime_text_kit/metadata/project_metadata"
|
|
6
6
|
require "sublime_text_kit/metadata/workspace_metadata"
|
|
7
7
|
require "sublime_text_kit/snippets/snippet"
|
|
8
|
+
require "sublime_text_kit/snippets/collector"
|
|
9
|
+
require "sublime_text_kit/snippets/printers/ascii_doc"
|
|
8
10
|
require "sublime_text_kit/snippets/printers/markdown"
|
|
9
11
|
require "sublime_text_kit/session"
|
|
10
12
|
require "sublime_text_kit/cli"
|
data/lib/sublime_text_kit/cli.rb
CHANGED
|
@@ -9,16 +9,17 @@ module SublimeTextKit
|
|
|
9
9
|
class CLI < Thor
|
|
10
10
|
include Thor::Actions
|
|
11
11
|
|
|
12
|
-
package_name Identity
|
|
12
|
+
package_name Identity::VERSION_LABEL
|
|
13
13
|
|
|
14
14
|
def self.configuration
|
|
15
|
-
Runcom::Config.new Identity.
|
|
15
|
+
Runcom::Config.new "#{Identity::NAME}/configuration.yml"
|
|
16
16
|
end
|
|
17
17
|
|
|
18
18
|
# Initialize.
|
|
19
19
|
def initialize args = [], options = {}, config = {}
|
|
20
20
|
super args, options, config
|
|
21
21
|
@markdown_printer = Snippets::Printers::Markdown.new
|
|
22
|
+
@ascii_doc_printer = Snippets::Printers::ASCIIDoc.new
|
|
22
23
|
end
|
|
23
24
|
|
|
24
25
|
desc "-u, [--update]", "Update Sublime Text with current settings."
|
|
@@ -44,6 +45,11 @@ module SublimeTextKit
|
|
|
44
45
|
|
|
45
46
|
desc "-p, [--snippets]", "Print user defined snippets."
|
|
46
47
|
map %w[-p --snippets] => :snippets
|
|
48
|
+
method_option :ascii_doc,
|
|
49
|
+
aliases: "-a",
|
|
50
|
+
desc: "Print snippets in ASCII Doc format.",
|
|
51
|
+
type: :boolean,
|
|
52
|
+
default: false
|
|
47
53
|
method_option :markdown,
|
|
48
54
|
aliases: "-m",
|
|
49
55
|
desc: "Print snippets in Markdown format.",
|
|
@@ -51,7 +57,12 @@ module SublimeTextKit
|
|
|
51
57
|
default: false
|
|
52
58
|
def snippets
|
|
53
59
|
say
|
|
54
|
-
|
|
60
|
+
|
|
61
|
+
if options.ascii_doc? then ascii_doc_printer.call
|
|
62
|
+
elsif options.markdown? then markdown_printer.call
|
|
63
|
+
else help "--snippets"
|
|
64
|
+
end
|
|
65
|
+
|
|
55
66
|
say
|
|
56
67
|
end
|
|
57
68
|
|
|
@@ -63,9 +74,9 @@ module SublimeTextKit
|
|
|
63
74
|
def metadata
|
|
64
75
|
say
|
|
65
76
|
|
|
66
|
-
if options
|
|
67
|
-
elsif options
|
|
68
|
-
elsif options
|
|
77
|
+
if options.create? then create_metadata
|
|
78
|
+
elsif options.destroy? then destroy_metadata
|
|
79
|
+
elsif options.rebuild? then rebuild_metadata
|
|
69
80
|
else help "--metadata"
|
|
70
81
|
end
|
|
71
82
|
|
|
@@ -85,7 +96,7 @@ module SublimeTextKit
|
|
|
85
96
|
type: :boolean,
|
|
86
97
|
default: false
|
|
87
98
|
def config
|
|
88
|
-
path = self.class.configuration.
|
|
99
|
+
path = self.class.configuration.current
|
|
89
100
|
|
|
90
101
|
if options.edit? then `#{ENV["EDITOR"]} #{path}`
|
|
91
102
|
elsif options.info?
|
|
@@ -97,7 +108,7 @@ module SublimeTextKit
|
|
|
97
108
|
desc "-v, [--version]", "Show gem version."
|
|
98
109
|
map %w[-v --version] => :version
|
|
99
110
|
def version
|
|
100
|
-
say Identity
|
|
111
|
+
say Identity::VERSION_LABEL
|
|
101
112
|
end
|
|
102
113
|
|
|
103
114
|
desc "-h, [--help=COMMAND]", "Show this message or get help for a command."
|
|
@@ -108,7 +119,7 @@ module SublimeTextKit
|
|
|
108
119
|
|
|
109
120
|
private
|
|
110
121
|
|
|
111
|
-
attr_reader :markdown_printer
|
|
122
|
+
attr_reader :ascii_doc_printer, :markdown_printer
|
|
112
123
|
|
|
113
124
|
def project_roots
|
|
114
125
|
@project_roots ||= self.class.configuration.to_h.fetch :project_roots, []
|
|
@@ -3,20 +3,9 @@
|
|
|
3
3
|
module SublimeTextKit
|
|
4
4
|
# Gem identity information.
|
|
5
5
|
module Identity
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
def self.label
|
|
11
|
-
"Sublime Text Kit"
|
|
12
|
-
end
|
|
13
|
-
|
|
14
|
-
def self.version
|
|
15
|
-
"8.5.2"
|
|
16
|
-
end
|
|
17
|
-
|
|
18
|
-
def self.version_label
|
|
19
|
-
"#{label} #{version}"
|
|
20
|
-
end
|
|
6
|
+
NAME = "sublime_text_kit"
|
|
7
|
+
LABEL = "Sublime Text Kit"
|
|
8
|
+
VERSION = "9.4.0"
|
|
9
|
+
VERSION_LABEL = "#{LABEL} #{VERSION}"
|
|
21
10
|
end
|
|
22
11
|
end
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require "pathname"
|
|
4
|
+
require "rexml/document"
|
|
5
|
+
|
|
6
|
+
module SublimeTextKit
|
|
7
|
+
module Snippets
|
|
8
|
+
class Collector
|
|
9
|
+
DEFAULT_USER_PATH = "Library/Application Support/Sublime Text 3/Packages/User"
|
|
10
|
+
|
|
11
|
+
def initialize model: Snippet, user_path: DEFAULT_USER_PATH, environment: ENV
|
|
12
|
+
@model = model
|
|
13
|
+
@user_path = user_path
|
|
14
|
+
@environment = environment
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
def home_path
|
|
18
|
+
Pathname environment.fetch("HOME")
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def root_path
|
|
22
|
+
home_path.join user_path
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
def call
|
|
26
|
+
root_path.glob("*.sublime-snippet")
|
|
27
|
+
.map { |path| model.new REXML::Document.new(path.read) }
|
|
28
|
+
.sort_by(&:description)
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
private
|
|
32
|
+
|
|
33
|
+
attr_reader :model, :user_path, :environment
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require "rexml/document"
|
|
4
|
+
|
|
5
|
+
module SublimeTextKit
|
|
6
|
+
module Snippets
|
|
7
|
+
module Printers
|
|
8
|
+
class ASCIIDoc
|
|
9
|
+
def initialize collector: Collector.new
|
|
10
|
+
@collector = collector
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
def call
|
|
14
|
+
collector.call.each do |snippet|
|
|
15
|
+
puts "* #{snippet.description} - `#{snippet.trigger}`\n"
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
private
|
|
20
|
+
|
|
21
|
+
attr_reader :collector
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
@@ -1,41 +1,22 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
require "rexml/document"
|
|
4
|
-
|
|
5
3
|
module SublimeTextKit
|
|
6
4
|
module Snippets
|
|
7
5
|
module Printers
|
|
8
6
|
class Markdown
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
def initialize user_path = DEFAULT_USER_PATH, environment: ENV
|
|
12
|
-
@user_path = user_path
|
|
13
|
-
@environment = environment
|
|
14
|
-
end
|
|
15
|
-
|
|
16
|
-
def home_path
|
|
17
|
-
Pathname environment.fetch("HOME")
|
|
18
|
-
end
|
|
19
|
-
|
|
20
|
-
def root_path
|
|
21
|
-
home_path.join user_path
|
|
7
|
+
def initialize collector: Collector.new
|
|
8
|
+
@collector = collector
|
|
22
9
|
end
|
|
23
10
|
|
|
24
11
|
def call
|
|
25
|
-
|
|
12
|
+
collector.call.each do |snippet|
|
|
26
13
|
puts "- #{snippet.description} - `#{snippet.trigger}`\n"
|
|
27
14
|
end
|
|
28
15
|
end
|
|
29
16
|
|
|
30
17
|
private
|
|
31
18
|
|
|
32
|
-
attr_reader :
|
|
33
|
-
|
|
34
|
-
def snippets
|
|
35
|
-
root_path.glob("*.sublime-snippet").map do |path|
|
|
36
|
-
Snippet.new REXML::Document.new(File.open(path))
|
|
37
|
-
end
|
|
38
|
-
end
|
|
19
|
+
attr_reader :collector
|
|
39
20
|
end
|
|
40
21
|
end
|
|
41
22
|
end
|
metadata
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: sublime_text_kit
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version:
|
|
4
|
+
version: 9.4.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Brooke Kuhlmann
|
|
8
|
-
autorequire:
|
|
8
|
+
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain:
|
|
11
11
|
- |
|
|
12
12
|
-----BEGIN CERTIFICATE-----
|
|
13
|
-
MIIC/
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
MIIC/jCCAeagAwIBAgIBAzANBgkqhkiG9w0BAQsFADAlMSMwIQYDVQQDDBpicm9v
|
|
14
|
+
a2UvREM9YWxjaGVtaXN0cy9EQz1pbzAeFw0yMDAzMTUxNDQ1MzJaFw0yMTAzMTUx
|
|
15
|
+
NDQ1MzJaMCUxIzAhBgNVBAMMGmJyb29rZS9EQz1hbGNoZW1pc3RzL0RDPWlvMIIB
|
|
16
16
|
IjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA6l1qpXTiomH1RfMRloyw7MiE
|
|
17
17
|
xyVx/x8Yc3EupdH7uhNaTXQGyORN6aOY//1QXXMHIZ9tW74nZLhesWMSUMYy0XhB
|
|
18
18
|
brs+KkurHnc9FnEJAbG7ebGvl/ncqZt72nQvaxpDxvuCBHgJAz+8i5wl6FhLw+oT
|
|
@@ -20,15 +20,15 @@ cert_chain:
|
|
|
20
20
|
D5vkU0YlAm1r98BymuJlcQ1qdkVEI1d48ph4kcS0S0nv1RiuyVb6TCAR3Nu3VaVq
|
|
21
21
|
3fPzZKJLZBx67UvXdbdicWPiUR75elI4PXpLIic3xytaF52ZJYyKZCNZJhNwfQID
|
|
22
22
|
AQABozkwNzAJBgNVHRMEAjAAMAsGA1UdDwQEAwIEsDAdBgNVHQ4EFgQU0nzow9vc
|
|
23
|
-
2CdikiiE3fJhP/
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
23
|
+
2CdikiiE3fJhP/gY4ggwDQYJKoZIhvcNAQELBQADggEBAIHhAlD3po4sTYqacXaQ
|
|
24
|
+
XI9jIhrfMy//2PgbHWcETtlJPBeNUbbSNBABcllUHKqYsVDlSvSmss034KSWNR8F
|
|
25
|
+
bF1GcloicyvcCC4y6IoW4it0COAcdeaaxkxiBSgKdQFpff9REnDlIKK4uQ9lLxIo
|
|
26
|
+
Y2G5xubiziKZkyfWFuSr67PIjW3Bu673D1JVBArhA1qbgQmYQcy1CkGOjo+iO8Nf
|
|
27
|
+
7u/QSfBHb+r/bXhKscDgPpnKwbUmvgO2+94zJG9KsrmIydlzYfsD09aXKx0t6Xy4
|
|
28
|
+
2XV8FRa7/JimI07sPLC13eLY3xd/aYTi85Z782KIA4j0G8XEEWAX0ouBhlXPocZv
|
|
29
|
+
QWc=
|
|
30
30
|
-----END CERTIFICATE-----
|
|
31
|
-
date:
|
|
31
|
+
date: 2020-10-13 00:00:00.000000000 Z
|
|
32
32
|
dependencies:
|
|
33
33
|
- !ruby/object:Gem::Dependency
|
|
34
34
|
name: runcom
|
|
@@ -36,14 +36,14 @@ dependencies:
|
|
|
36
36
|
requirements:
|
|
37
37
|
- - "~>"
|
|
38
38
|
- !ruby/object:Gem::Version
|
|
39
|
-
version: '
|
|
39
|
+
version: '6.0'
|
|
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: '
|
|
46
|
+
version: '6.0'
|
|
47
47
|
- !ruby/object:Gem::Dependency
|
|
48
48
|
name: thor
|
|
49
49
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -58,34 +58,6 @@ dependencies:
|
|
|
58
58
|
- - "~>"
|
|
59
59
|
- !ruby/object:Gem::Version
|
|
60
60
|
version: '0.20'
|
|
61
|
-
- !ruby/object:Gem::Dependency
|
|
62
|
-
name: awesome_print
|
|
63
|
-
requirement: !ruby/object:Gem::Requirement
|
|
64
|
-
requirements:
|
|
65
|
-
- - "~>"
|
|
66
|
-
- !ruby/object:Gem::Version
|
|
67
|
-
version: '1.8'
|
|
68
|
-
type: :development
|
|
69
|
-
prerelease: false
|
|
70
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
71
|
-
requirements:
|
|
72
|
-
- - "~>"
|
|
73
|
-
- !ruby/object:Gem::Version
|
|
74
|
-
version: '1.8'
|
|
75
|
-
- !ruby/object:Gem::Dependency
|
|
76
|
-
name: bond
|
|
77
|
-
requirement: !ruby/object:Gem::Requirement
|
|
78
|
-
requirements:
|
|
79
|
-
- - "~>"
|
|
80
|
-
- !ruby/object:Gem::Version
|
|
81
|
-
version: '0.5'
|
|
82
|
-
type: :development
|
|
83
|
-
prerelease: false
|
|
84
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
85
|
-
requirements:
|
|
86
|
-
- - "~>"
|
|
87
|
-
- !ruby/object:Gem::Version
|
|
88
|
-
version: '0.5'
|
|
89
61
|
- !ruby/object:Gem::Dependency
|
|
90
62
|
name: bundler-audit
|
|
91
63
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -106,28 +78,28 @@ dependencies:
|
|
|
106
78
|
requirements:
|
|
107
79
|
- - "~>"
|
|
108
80
|
- !ruby/object:Gem::Version
|
|
109
|
-
version: '
|
|
81
|
+
version: '14.2'
|
|
110
82
|
type: :development
|
|
111
83
|
prerelease: false
|
|
112
84
|
version_requirements: !ruby/object:Gem::Requirement
|
|
113
85
|
requirements:
|
|
114
86
|
- - "~>"
|
|
115
87
|
- !ruby/object:Gem::Version
|
|
116
|
-
version: '
|
|
88
|
+
version: '14.2'
|
|
117
89
|
- !ruby/object:Gem::Dependency
|
|
118
|
-
name: git-
|
|
90
|
+
name: git-lint
|
|
119
91
|
requirement: !ruby/object:Gem::Requirement
|
|
120
92
|
requirements:
|
|
121
93
|
- - "~>"
|
|
122
94
|
- !ruby/object:Gem::Version
|
|
123
|
-
version: '
|
|
95
|
+
version: '1.0'
|
|
124
96
|
type: :development
|
|
125
97
|
prerelease: false
|
|
126
98
|
version_requirements: !ruby/object:Gem::Requirement
|
|
127
99
|
requirements:
|
|
128
100
|
- - "~>"
|
|
129
101
|
- !ruby/object:Gem::Version
|
|
130
|
-
version: '
|
|
102
|
+
version: '1.0'
|
|
131
103
|
- !ruby/object:Gem::Dependency
|
|
132
104
|
name: guard-rspec
|
|
133
105
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -142,48 +114,34 @@ dependencies:
|
|
|
142
114
|
- - "~>"
|
|
143
115
|
- !ruby/object:Gem::Version
|
|
144
116
|
version: '4.7'
|
|
145
|
-
- !ruby/object:Gem::Dependency
|
|
146
|
-
name: hirb
|
|
147
|
-
requirement: !ruby/object:Gem::Requirement
|
|
148
|
-
requirements:
|
|
149
|
-
- - "~>"
|
|
150
|
-
- !ruby/object:Gem::Version
|
|
151
|
-
version: '0.7'
|
|
152
|
-
type: :development
|
|
153
|
-
prerelease: false
|
|
154
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
155
|
-
requirements:
|
|
156
|
-
- - "~>"
|
|
157
|
-
- !ruby/object:Gem::Version
|
|
158
|
-
version: '0.7'
|
|
159
117
|
- !ruby/object:Gem::Dependency
|
|
160
118
|
name: pry
|
|
161
119
|
requirement: !ruby/object:Gem::Requirement
|
|
162
120
|
requirements:
|
|
163
121
|
- - "~>"
|
|
164
122
|
- !ruby/object:Gem::Version
|
|
165
|
-
version: '0.
|
|
123
|
+
version: '0.13'
|
|
166
124
|
type: :development
|
|
167
125
|
prerelease: false
|
|
168
126
|
version_requirements: !ruby/object:Gem::Requirement
|
|
169
127
|
requirements:
|
|
170
128
|
- - "~>"
|
|
171
129
|
- !ruby/object:Gem::Version
|
|
172
|
-
version: '0.
|
|
130
|
+
version: '0.13'
|
|
173
131
|
- !ruby/object:Gem::Dependency
|
|
174
132
|
name: pry-byebug
|
|
175
133
|
requirement: !ruby/object:Gem::Requirement
|
|
176
134
|
requirements:
|
|
177
135
|
- - "~>"
|
|
178
136
|
- !ruby/object:Gem::Version
|
|
179
|
-
version: '3.
|
|
137
|
+
version: '3.9'
|
|
180
138
|
type: :development
|
|
181
139
|
prerelease: false
|
|
182
140
|
version_requirements: !ruby/object:Gem::Requirement
|
|
183
141
|
requirements:
|
|
184
142
|
- - "~>"
|
|
185
143
|
- !ruby/object:Gem::Version
|
|
186
|
-
version: '3.
|
|
144
|
+
version: '3.9'
|
|
187
145
|
- !ruby/object:Gem::Dependency
|
|
188
146
|
name: rake
|
|
189
147
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -204,14 +162,14 @@ dependencies:
|
|
|
204
162
|
requirements:
|
|
205
163
|
- - "~>"
|
|
206
164
|
- !ruby/object:Gem::Version
|
|
207
|
-
version: '
|
|
165
|
+
version: '6.0'
|
|
208
166
|
type: :development
|
|
209
167
|
prerelease: false
|
|
210
168
|
version_requirements: !ruby/object:Gem::Requirement
|
|
211
169
|
requirements:
|
|
212
170
|
- - "~>"
|
|
213
171
|
- !ruby/object:Gem::Version
|
|
214
|
-
version: '
|
|
172
|
+
version: '6.0'
|
|
215
173
|
- !ruby/object:Gem::Dependency
|
|
216
174
|
name: rspec
|
|
217
175
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -232,96 +190,82 @@ dependencies:
|
|
|
232
190
|
requirements:
|
|
233
191
|
- - "~>"
|
|
234
192
|
- !ruby/object:Gem::Version
|
|
235
|
-
version: '0.
|
|
193
|
+
version: '0.89'
|
|
236
194
|
type: :development
|
|
237
195
|
prerelease: false
|
|
238
196
|
version_requirements: !ruby/object:Gem::Requirement
|
|
239
197
|
requirements:
|
|
240
198
|
- - "~>"
|
|
241
199
|
- !ruby/object:Gem::Version
|
|
242
|
-
version: '0.
|
|
200
|
+
version: '0.89'
|
|
243
201
|
- !ruby/object:Gem::Dependency
|
|
244
202
|
name: rubocop-performance
|
|
245
203
|
requirement: !ruby/object:Gem::Requirement
|
|
246
204
|
requirements:
|
|
247
205
|
- - "~>"
|
|
248
206
|
- !ruby/object:Gem::Version
|
|
249
|
-
version: '1.
|
|
207
|
+
version: '1.5'
|
|
250
208
|
type: :development
|
|
251
209
|
prerelease: false
|
|
252
210
|
version_requirements: !ruby/object:Gem::Requirement
|
|
253
211
|
requirements:
|
|
254
212
|
- - "~>"
|
|
255
213
|
- !ruby/object:Gem::Version
|
|
256
|
-
version: '1.
|
|
214
|
+
version: '1.5'
|
|
257
215
|
- !ruby/object:Gem::Dependency
|
|
258
216
|
name: rubocop-rake
|
|
259
217
|
requirement: !ruby/object:Gem::Requirement
|
|
260
218
|
requirements:
|
|
261
219
|
- - "~>"
|
|
262
220
|
- !ruby/object:Gem::Version
|
|
263
|
-
version: '0.
|
|
221
|
+
version: '0.5'
|
|
264
222
|
type: :development
|
|
265
223
|
prerelease: false
|
|
266
224
|
version_requirements: !ruby/object:Gem::Requirement
|
|
267
225
|
requirements:
|
|
268
226
|
- - "~>"
|
|
269
227
|
- !ruby/object:Gem::Version
|
|
270
|
-
version: '0.
|
|
228
|
+
version: '0.5'
|
|
271
229
|
- !ruby/object:Gem::Dependency
|
|
272
230
|
name: rubocop-rspec
|
|
273
231
|
requirement: !ruby/object:Gem::Requirement
|
|
274
232
|
requirements:
|
|
275
233
|
- - "~>"
|
|
276
234
|
- !ruby/object:Gem::Version
|
|
277
|
-
version: '1.
|
|
235
|
+
version: '1.39'
|
|
278
236
|
type: :development
|
|
279
237
|
prerelease: false
|
|
280
238
|
version_requirements: !ruby/object:Gem::Requirement
|
|
281
239
|
requirements:
|
|
282
240
|
- - "~>"
|
|
283
241
|
- !ruby/object:Gem::Version
|
|
284
|
-
version: '1.
|
|
242
|
+
version: '1.39'
|
|
285
243
|
- !ruby/object:Gem::Dependency
|
|
286
244
|
name: simplecov
|
|
287
245
|
requirement: !ruby/object:Gem::Requirement
|
|
288
246
|
requirements:
|
|
289
247
|
- - "~>"
|
|
290
248
|
- !ruby/object:Gem::Version
|
|
291
|
-
version: '0.
|
|
292
|
-
type: :development
|
|
293
|
-
prerelease: false
|
|
294
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
295
|
-
requirements:
|
|
296
|
-
- - "~>"
|
|
297
|
-
- !ruby/object:Gem::Version
|
|
298
|
-
version: '0.13'
|
|
299
|
-
- !ruby/object:Gem::Dependency
|
|
300
|
-
name: wirb
|
|
301
|
-
requirement: !ruby/object:Gem::Requirement
|
|
302
|
-
requirements:
|
|
303
|
-
- - "~>"
|
|
304
|
-
- !ruby/object:Gem::Version
|
|
305
|
-
version: '2.1'
|
|
249
|
+
version: '0.19'
|
|
306
250
|
type: :development
|
|
307
251
|
prerelease: false
|
|
308
252
|
version_requirements: !ruby/object:Gem::Requirement
|
|
309
253
|
requirements:
|
|
310
254
|
- - "~>"
|
|
311
255
|
- !ruby/object:Gem::Version
|
|
312
|
-
version: '
|
|
313
|
-
description:
|
|
256
|
+
version: '0.19'
|
|
257
|
+
description:
|
|
314
258
|
email:
|
|
315
259
|
- brooke@alchemists.io
|
|
316
260
|
executables:
|
|
317
261
|
- sublime_text_kit
|
|
318
262
|
extensions: []
|
|
319
263
|
extra_rdoc_files:
|
|
320
|
-
- README.
|
|
321
|
-
- LICENSE.
|
|
264
|
+
- README.adoc
|
|
265
|
+
- LICENSE.adoc
|
|
322
266
|
files:
|
|
323
|
-
- LICENSE.
|
|
324
|
-
- README.
|
|
267
|
+
- LICENSE.adoc
|
|
268
|
+
- README.adoc
|
|
325
269
|
- bin/sublime_text_kit
|
|
326
270
|
- lib/sublime_text_kit.rb
|
|
327
271
|
- lib/sublime_text_kit/cli.rb
|
|
@@ -330,16 +274,19 @@ files:
|
|
|
330
274
|
- lib/sublime_text_kit/metadata/project_metadata.rb
|
|
331
275
|
- lib/sublime_text_kit/metadata/workspace_metadata.rb
|
|
332
276
|
- lib/sublime_text_kit/session.rb
|
|
277
|
+
- lib/sublime_text_kit/snippets/collector.rb
|
|
278
|
+
- lib/sublime_text_kit/snippets/printers/ascii_doc.rb
|
|
333
279
|
- lib/sublime_text_kit/snippets/printers/markdown.rb
|
|
334
280
|
- lib/sublime_text_kit/snippets/snippet.rb
|
|
335
|
-
homepage: https://
|
|
281
|
+
homepage: https://www.alchemists.io/projects/sublime_text_kit
|
|
336
282
|
licenses:
|
|
337
283
|
- Apache-2.0
|
|
338
284
|
metadata:
|
|
339
|
-
source_code_uri: https://github.com/bkuhlmann/sublime_text_kit
|
|
340
|
-
changelog_uri: https://github.com/bkuhlmann/sublime_text_kit/blob/master/CHANGES.md
|
|
341
285
|
bug_tracker_uri: https://github.com/bkuhlmann/sublime_text_kit/issues
|
|
342
|
-
|
|
286
|
+
changelog_uri: https://www.alchemists.io/projects/sublime_text_kit/changes.html
|
|
287
|
+
documentation_uri: https://www.alchemists.io/projects/sublime_text_kit
|
|
288
|
+
source_code_uri: https://github.com/bkuhlmann/sublime_text_kit
|
|
289
|
+
post_install_message:
|
|
343
290
|
rdoc_options: []
|
|
344
291
|
require_paths:
|
|
345
292
|
- lib
|
|
@@ -347,15 +294,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
347
294
|
requirements:
|
|
348
295
|
- - "~>"
|
|
349
296
|
- !ruby/object:Gem::Version
|
|
350
|
-
version: '2.
|
|
297
|
+
version: '2.7'
|
|
351
298
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
352
299
|
requirements:
|
|
353
300
|
- - ">="
|
|
354
301
|
- !ruby/object:Gem::Version
|
|
355
302
|
version: '0'
|
|
356
303
|
requirements: []
|
|
357
|
-
rubygems_version: 3.
|
|
358
|
-
signing_key:
|
|
304
|
+
rubygems_version: 3.1.4
|
|
305
|
+
signing_key:
|
|
359
306
|
specification_version: 4
|
|
360
307
|
summary: A command line interface for managing Sublime Text metadata.
|
|
361
308
|
test_files: []
|
metadata.gz.sig
CHANGED
|
Binary file
|
data/README.md
DELETED
|
@@ -1,184 +0,0 @@
|
|
|
1
|
-
<p align="center">
|
|
2
|
-
<img src="sublime_text_kit.png" alt="Sublime Text Kit Icon"/>
|
|
3
|
-
</p>
|
|
4
|
-
|
|
5
|
-
# Sublime Text Kit
|
|
6
|
-
|
|
7
|
-
[](http://badge.fury.io/rb/sublime_text_kit)
|
|
8
|
-
[](https://codeclimate.com/github/bkuhlmann/sublime_text_kit/maintainability)
|
|
9
|
-
[](https://codeclimate.com/github/bkuhlmann/sublime_text_kit/test_coverage)
|
|
10
|
-
[](https://circleci.com/gh/bkuhlmann/sublime_text_kit)
|
|
11
|
-
|
|
12
|
-
A command line interface for managing Sublime Text metadata.
|
|
13
|
-
|
|
14
|
-
<!-- Tocer[start]: Auto-generated, don't remove. -->
|
|
15
|
-
|
|
16
|
-
## Table of Contents
|
|
17
|
-
|
|
18
|
-
- [Features](#features)
|
|
19
|
-
- [Screencasts](#screencasts)
|
|
20
|
-
- [Requirements](#requirements)
|
|
21
|
-
- [Setup](#setup)
|
|
22
|
-
- [Usage](#usage)
|
|
23
|
-
- [Command Line Interface (CLI)](#command-line-interface-cli)
|
|
24
|
-
- [Customization](#customization)
|
|
25
|
-
- [Workflow](#workflow)
|
|
26
|
-
- [Troubleshooting](#troubleshooting)
|
|
27
|
-
- [Tests](#tests)
|
|
28
|
-
- [Versioning](#versioning)
|
|
29
|
-
- [Code of Conduct](#code-of-conduct)
|
|
30
|
-
- [Contributions](#contributions)
|
|
31
|
-
- [License](#license)
|
|
32
|
-
- [History](#history)
|
|
33
|
-
- [Credits](#credits)
|
|
34
|
-
|
|
35
|
-
<!-- Tocer[finish]: Auto-generated, don't remove. -->
|
|
36
|
-
|
|
37
|
-
## Features
|
|
38
|
-
|
|
39
|
-
- Provides project metadata (i.e. *.sublime-project and *.sublime-workspace files) management for
|
|
40
|
-
project switching via the `CONTROL+COMMAND+P` shortcut.
|
|
41
|
-
- Rebuilds project history (Project -> Recent Projects) from existing project files (assumes project
|
|
42
|
-
metadata is in a directory) so one can easily toggle between up-to-date project information via
|
|
43
|
-
the `CONTROL+COMMAND+P` shortcut.
|
|
44
|
-
|
|
45
|
-
## Screencasts
|
|
46
|
-
|
|
47
|
-
[](https://asciinema.org/a/263061)
|
|
48
|
-
|
|
49
|
-
## Requirements
|
|
50
|
-
|
|
51
|
-
1. [Ruby 2.6.x](https://www.ruby-lang.org).
|
|
52
|
-
1. [Sublime Text 3](https://www.sublimetext.com).
|
|
53
|
-
|
|
54
|
-
## Setup
|
|
55
|
-
|
|
56
|
-
Type the following to install:
|
|
57
|
-
|
|
58
|
-
gem install sublime_text_kit
|
|
59
|
-
|
|
60
|
-
## Usage
|
|
61
|
-
|
|
62
|
-
### Command Line Interface (CLI)
|
|
63
|
-
|
|
64
|
-
From the command line, type: `sublime_text_kit`
|
|
65
|
-
|
|
66
|
-
sublime_text_kit -c, [--config] # Manage gem configuration.
|
|
67
|
-
sublime_text_kit -h, [--help=COMMAND] # Show this message or get help for a command.
|
|
68
|
-
sublime_text_kit -m, [--metadata] # Manage project/workspace metadata.
|
|
69
|
-
sublime_text_kit -p, [--snippets] # Print user defined snippets.
|
|
70
|
-
sublime_text_kit -s, [--session] # Manage session metadata.
|
|
71
|
-
sublime_text_kit -u, [--update] # Update Sublime Text with current settings.
|
|
72
|
-
sublime_text_kit -v, [--version] # Show gem version.
|
|
73
|
-
|
|
74
|
-
For configuration options, type: `sublime_text_kit --help --config`
|
|
75
|
-
|
|
76
|
-
-e, [--edit], [--no-edit] # Edit gem configuration.
|
|
77
|
-
-i, [--info], [--no-info] # Print gem configuration.
|
|
78
|
-
|
|
79
|
-
For metadata options, type: `sublime_text_kit --help --metadata`
|
|
80
|
-
|
|
81
|
-
-c, [--create], [--no-create] # Create metadata.
|
|
82
|
-
-D, [--destroy], [--no-destroy] # Destroy metadata.
|
|
83
|
-
-R, [--rebuild], [--no-rebuild] # Rebuild metadata.
|
|
84
|
-
|
|
85
|
-
For session options, type: `sublime_text_kit --help --session`
|
|
86
|
-
|
|
87
|
-
-R, [--rebuild], [--no-rebuild] # Rebuild session metadata.
|
|
88
|
-
|
|
89
|
-
For snippet options, type: `sublime_text_kit --help --snippets`
|
|
90
|
-
|
|
91
|
-
-m, [--markdown], [--no-markdown] # Print snippets in Markdown format.
|
|
92
|
-
|
|
93
|
-
### Customization
|
|
94
|
-
|
|
95
|
-
This gem can be configured via a global configuration:
|
|
96
|
-
|
|
97
|
-
~/.config/sublime_text_kit/configuration.yml
|
|
98
|
-
|
|
99
|
-
It can also be configured via [XDG](https://github.com/bkuhlmann/xdg) environment variables.
|
|
100
|
-
|
|
101
|
-
An example configuration could be:
|
|
102
|
-
|
|
103
|
-
:project_roots:
|
|
104
|
-
- "~/Dropbox/Development/Misc"
|
|
105
|
-
- "~/Dropbox/Development/OSS"
|
|
106
|
-
- "~/Dropbox/Development/Work"
|
|
107
|
-
:metadata_dir: "~/Dropbox/Cache/Sublime"
|
|
108
|
-
|
|
109
|
-
Feel free to take this configuration, modify, and save as your own custom `configuration.yml`.
|
|
110
|
-
|
|
111
|
-
The project roots define the root level directories where project folders are located. When project
|
|
112
|
-
metadata (i.e. `*.sublime-project`, `*.sublime-workspace`) is generated, the name of the metadata
|
|
113
|
-
file will be the same name as that of the project folder. All project metadata, regardless of root
|
|
114
|
-
location, is written to the same metadata directory. If using the example settings shown above and
|
|
115
|
-
assuming the following directory structure exists...
|
|
116
|
-
|
|
117
|
-
~/Dropbox/Development/Misc/example
|
|
118
|
-
~/Dropbox/Development/OSS/sublime_text_kit
|
|
119
|
-
|
|
120
|
-
...the project metadata will be created in the workspace directory as follows:
|
|
121
|
-
|
|
122
|
-
~/Dropbox/Cache/Sublime/example.sublime-project
|
|
123
|
-
~/Dropbox/Cache/Sublime/example.sublime-workspace
|
|
124
|
-
~/Dropbox/Cache/Sublime/sublime_text_kit.sublime-project
|
|
125
|
-
~/Dropbox/Cache/Sublime/sublime_text_kit.sublime-workspace
|
|
126
|
-
|
|
127
|
-
### Workflow
|
|
128
|
-
|
|
129
|
-
The following demonstrates a default Sublime Text setup:
|
|
130
|
-
|
|
131
|
-
1. Run: `sublime_text_kit --config --edit` (define Sublime Text Kit settings for project roots and
|
|
132
|
-
metadata directory).
|
|
133
|
-
1. Shutdown Sublime Text (i.e. `CONTROL+Q`).
|
|
134
|
-
1. Run: `sublime_text_kit --metadata --create` (creates project metadata and rebuilds the session
|
|
135
|
-
metadata so Sublime Text has a complete project history from which to jump through via the
|
|
136
|
-
`CONTROL+COMMMAND+P` shortcut).
|
|
137
|
-
1. Launch Sublime Text and use the `CONTROL+COMMAND+P` keyboard shortcut to toggle between projects.
|
|
138
|
-
Notice that you can (fuzzy type) project names to jump between them.
|
|
139
|
-
1. Breeze through your project workload with ease. :)
|
|
140
|
-
|
|
141
|
-
### Troubleshooting
|
|
142
|
-
|
|
143
|
-
- When rebuilding workspaces, ensure Sublime Text is shutdown or changes won't be applied.
|
|
144
|
-
- When rebuilding workspaces, ensure workspace_dir (as defined via settings.yml) points to a
|
|
145
|
-
directory containing `*.sublime-project` and `*.sublime-workspace` files.
|
|
146
|
-
|
|
147
|
-
## Tests
|
|
148
|
-
|
|
149
|
-
To test, run:
|
|
150
|
-
|
|
151
|
-
bundle exec rake
|
|
152
|
-
|
|
153
|
-
## Versioning
|
|
154
|
-
|
|
155
|
-
Read [Semantic Versioning](https://semver.org) for details. Briefly, it means:
|
|
156
|
-
|
|
157
|
-
- Major (X.y.z) - Incremented for any backwards incompatible public API changes.
|
|
158
|
-
- Minor (x.Y.z) - Incremented for new, backwards compatible, public API enhancements/fixes.
|
|
159
|
-
- Patch (x.y.Z) - Incremented for small, backwards compatible, bug fixes.
|
|
160
|
-
|
|
161
|
-
## Code of Conduct
|
|
162
|
-
|
|
163
|
-
Please note that this project is released with a [CODE OF CONDUCT](CODE_OF_CONDUCT.md). By
|
|
164
|
-
participating in this project you agree to abide by its terms.
|
|
165
|
-
|
|
166
|
-
## Contributions
|
|
167
|
-
|
|
168
|
-
Read [CONTRIBUTING](CONTRIBUTING.md) for details.
|
|
169
|
-
|
|
170
|
-
## License
|
|
171
|
-
|
|
172
|
-
Copyright 2014 [Alchemists](https://www.alchemists.io).
|
|
173
|
-
Read [LICENSE](LICENSE.md) for details.
|
|
174
|
-
|
|
175
|
-
## History
|
|
176
|
-
|
|
177
|
-
Read [CHANGES](CHANGES.md) for details.
|
|
178
|
-
Built with [Gemsmith](https://github.com/bkuhlmann/gemsmith).
|
|
179
|
-
|
|
180
|
-
## Credits
|
|
181
|
-
|
|
182
|
-
Developed by [Brooke Kuhlmann](https://www.alchemists.io) at
|
|
183
|
-
[Alchemists](https://www.alchemists.io).
|
|
184
|
-
|