sublime_sunippetter 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +1 -0
- data/bin/suni +26 -1
- data/lib/sublime_sunippetter.rb +0 -14
- data/lib/sublime_sunippetter/version.rb +1 -1
- data/sublime_sunippetter.gemspec +2 -0
- metadata +19 -8
data/Gemfile
CHANGED
data/bin/suni
CHANGED
@@ -1,4 +1,29 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
3
|
require 'sublime_sunippetter'
|
4
|
-
|
4
|
+
require "thor"
|
5
|
+
|
6
|
+
module SublimeSunippetter
|
7
|
+
#= SublimeSunippetter CLI
|
8
|
+
class CLI < Thor
|
9
|
+
class_option :help, :type => :boolean, :aliases => '-h', :desc => 'help message.'
|
10
|
+
class_option :version, :type => :boolean, :desc => 'version'
|
11
|
+
default_task :execute
|
12
|
+
|
13
|
+
desc "execute", "generate Sublime Text2 snippet"
|
14
|
+
def execute
|
15
|
+
SublimeSunippetter::Core.new.generate_sunippets
|
16
|
+
end
|
17
|
+
|
18
|
+
desc "init", "generate Sunippetdefine"
|
19
|
+
def init
|
20
|
+
SublimeSunippetter::Core.new.init
|
21
|
+
end
|
22
|
+
|
23
|
+
desc "version", "version"
|
24
|
+
def version
|
25
|
+
p SublimeSunippetter::VERSION
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
SublimeSunippetter::CLI.start
|
data/lib/sublime_sunippetter.rb
CHANGED
@@ -51,20 +51,6 @@ module SublimeSunippetter
|
|
51
51
|
end
|
52
52
|
end
|
53
53
|
|
54
|
-
#== for command prompt.
|
55
|
-
# if you execute suni(no-option), generate sublime text2 sunippet.
|
56
|
-
#
|
57
|
-
# if you execute suni init, generate Sunippetdefine.
|
58
|
-
def execute
|
59
|
-
sunippet = SublimeSunippetter::Core.new
|
60
|
-
|
61
|
-
if $*[0] == "init"
|
62
|
-
sunippet.init
|
63
|
-
else
|
64
|
-
sunippet.generate_sunippets
|
65
|
-
end
|
66
|
-
end
|
67
|
-
|
68
54
|
private
|
69
55
|
def read_sunippetdefine
|
70
56
|
unless File.exists? "./#{DEFINE_FILE}"
|
data/sublime_sunippetter.gemspec
CHANGED
@@ -18,6 +18,8 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
19
|
spec.require_paths = ["lib"]
|
20
20
|
|
21
|
+
spec.add_runtime_dependency "thor", "~> 0.18.1"
|
22
|
+
|
21
23
|
spec.add_development_dependency "bundler", "~> 1.3"
|
22
24
|
spec.add_development_dependency "rake"
|
23
25
|
spec.add_development_dependency "rspec", "~> 2.14.1"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sublime_sunippetter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,22 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-11-
|
12
|
+
date: 2013-11-25 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: thor
|
16
|
+
requirement: &22951308 !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ~>
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: 0.18.1
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: *22951308
|
14
25
|
- !ruby/object:Gem::Dependency
|
15
26
|
name: bundler
|
16
|
-
requirement: &
|
27
|
+
requirement: &28942056 !ruby/object:Gem::Requirement
|
17
28
|
none: false
|
18
29
|
requirements:
|
19
30
|
- - ~>
|
@@ -21,10 +32,10 @@ dependencies:
|
|
21
32
|
version: '1.3'
|
22
33
|
type: :development
|
23
34
|
prerelease: false
|
24
|
-
version_requirements: *
|
35
|
+
version_requirements: *28942056
|
25
36
|
- !ruby/object:Gem::Dependency
|
26
37
|
name: rake
|
27
|
-
requirement: &
|
38
|
+
requirement: &28908420 !ruby/object:Gem::Requirement
|
28
39
|
none: false
|
29
40
|
requirements:
|
30
41
|
- - ! '>='
|
@@ -32,10 +43,10 @@ dependencies:
|
|
32
43
|
version: '0'
|
33
44
|
type: :development
|
34
45
|
prerelease: false
|
35
|
-
version_requirements: *
|
46
|
+
version_requirements: *28908420
|
36
47
|
- !ruby/object:Gem::Dependency
|
37
48
|
name: rspec
|
38
|
-
requirement: &
|
49
|
+
requirement: &23167164 !ruby/object:Gem::Requirement
|
39
50
|
none: false
|
40
51
|
requirements:
|
41
52
|
- - ~>
|
@@ -43,7 +54,7 @@ dependencies:
|
|
43
54
|
version: 2.14.1
|
44
55
|
type: :development
|
45
56
|
prerelease: false
|
46
|
-
version_requirements: *
|
57
|
+
version_requirements: *23167164
|
47
58
|
description: SublimeSunippetter is generate Sublime Text2 simple sunippet from Sunippetfile
|
48
59
|
DSL.
|
49
60
|
email:
|