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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f91ca9d50e3f8858e19750ba56fb523e7b8f85848897fa5f36d1f21517348278
4
- data.tar.gz: 31b7aca6b581e0551434e73918ccf9d72874863c1b9de5c16da962cbf1289acb
3
+ metadata.gz: 3d317ba24e8b7b05cece81ae14a56deeb02c71a69dd9afbaa119a3f039e8dc3c
4
+ data.tar.gz: 539cba879dc9e89cdd79218d9fe09a79538a5fd2ed1af12381bbcf1d1be0158d
5
5
  SHA512:
6
- metadata.gz: 45e354ddfe55355285178f7721c7e57a6442b5dc1e8631f4467e99d0ee82d4799da251340e7912c247ccbb781377bb056e892e1406bf7250d4f3d5ff6c29bace
7
- data.tar.gz: 429dc9822d91ba683b8419dbeedae29f1d098f8b710717b9d510d6caf54bbf39732c570f9cf334ed138a341c96fbdecd33ab818ca1403c6378a8705ab28c1bf8
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SublInit
4
- VERSION = '1.5.0'
4
+ VERSION = '1.6.0'
5
5
  end
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.5.0
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-05-19 00:00:00.000000000 Z
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.7
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