sublinit 1.5.0 → 1.6.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
- data/lib/sublinit/thor/plain.rb +36 -0
- data/lib/sublinit/thor.rb +2 -0
- data/lib/sublinit/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3d317ba24e8b7b05cece81ae14a56deeb02c71a69dd9afbaa119a3f039e8dc3c
|
4
|
+
data.tar.gz: 539cba879dc9e89cdd79218d9fe09a79538a5fd2ed1af12381bbcf1d1be0158d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f7ddc87c1cb6e92258e8317f1f88ec373aa33f906e55103d14619096aa62d20c36f050d9b26e0eaf6e7f5588f259c72650455fe6d51323b647c30d57937b73a8
|
7
|
+
data.tar.gz: e99d029635f8f5e8ac6918b3a7f47b7685716ae90efdd1141c53649f7dfca654cbc89388dcf5359079fa3f0cfb9e60a4a961c195425a03c0d2eba6968f141f98
|
@@ -0,0 +1,36 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module SublInit
|
4
|
+
module Thor
|
5
|
+
module Plain
|
6
|
+
extend SublInit::Thor::Support
|
7
|
+
|
8
|
+
commands do
|
9
|
+
option :new, type: :boolean, default: false
|
10
|
+
option :name, aliases: '-n', required: true
|
11
|
+
option :open, aliases: '-o', type: :boolean, default: true
|
12
|
+
option :origin, aliases: '-or'
|
13
|
+
desc 'plain [NEW] [OPEN] [ORIGIN]', 'Initialize a new Plain Sublime Text project'
|
14
|
+
def plain
|
15
|
+
project_name = options[:name]
|
16
|
+
|
17
|
+
within project_name, if: options[:new] do
|
18
|
+
# 1. Create Sublime Text project file
|
19
|
+
sublime_project = operation "Creating #{project_name}.sublime-project" do
|
20
|
+
SublInit::Project::Files::SublimeProject.create!(
|
21
|
+
project_name: project_name
|
22
|
+
)
|
23
|
+
end
|
24
|
+
|
25
|
+
# 2. Open Sublime Text Project
|
26
|
+
operation "Opening #{sublime_project} in Sublime Text", if: (sublime_project && options[:open]) do
|
27
|
+
SublInit::CLI::Sublime::Text.open(sublime_project)
|
28
|
+
end
|
29
|
+
|
30
|
+
say("Done! Your project path is #{Dir.pwd}", color: :green)
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
data/lib/sublinit/thor.rb
CHANGED
@@ -4,6 +4,7 @@ require 'thor'
|
|
4
4
|
|
5
5
|
require_relative 'thor/support'
|
6
6
|
require_relative 'thor/ruby'
|
7
|
+
require_relative 'thor/plain'
|
7
8
|
|
8
9
|
module SublInit
|
9
10
|
module Thor
|
@@ -13,6 +14,7 @@ module SublInit
|
|
13
14
|
|
14
15
|
# Supported projects languages
|
15
16
|
include SublInit::Thor::Ruby
|
17
|
+
include SublInit::Thor::Plain
|
16
18
|
|
17
19
|
def initialize(args = [], local_options = {}, config = {})
|
18
20
|
super
|
data/lib/sublinit/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sublinit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Egor Iskrenkov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-12-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -53,6 +53,7 @@ files:
|
|
53
53
|
- lib/sublinit/project/rvm/gemset.rb
|
54
54
|
- lib/sublinit/templates/ruby/versions_conf
|
55
55
|
- lib/sublinit/thor.rb
|
56
|
+
- lib/sublinit/thor/plain.rb
|
56
57
|
- lib/sublinit/thor/ruby.rb
|
57
58
|
- lib/sublinit/thor/support.rb
|
58
59
|
- lib/sublinit/version.rb
|
@@ -75,7 +76,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
75
76
|
- !ruby/object:Gem::Version
|
76
77
|
version: '0'
|
77
78
|
requirements: []
|
78
|
-
rubygems_version: 3.3.
|
79
|
+
rubygems_version: 3.3.26
|
79
80
|
signing_key:
|
80
81
|
specification_version: 4
|
81
82
|
summary: Sublime Text CLI for new projects initialization
|