jmpod 0.1.7 → 0.1.8
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/jmpod/command/config/get.rb +35 -0
- data/lib/jmpod/command/config/set.rb +35 -0
- data/lib/jmpod/command/config.rb +18 -0
- data/lib/jmpod/command/create/oc.rb +1 -1
- data/lib/jmpod/command.rb +1 -0
- data/lib/jmpod/version.rb +1 -1
- metadata +4 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b21b104512146995c758c98538c08cf2a10f18211d81903269a56b70511011bd
|
4
|
+
data.tar.gz: 0cff414226d2c724064d0af3644bc4e1bef015b0c19d27fba8338997cb722ab8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 514d77a67bbd0e46ea174941f14fbe48b0d418af6beec257d16cc62e1e2bb837dbc27378e5f5785049c9a7e84c77b882849237e09ed507475956a3074b4c9001
|
7
|
+
data.tar.gz: 92366c378929f3cea977965070e33defa6ee1d0d9580742bac2f0b2e5ed58c1f79b636f579a95fc80e22944cc7427bbfc103b8cadf8e79f255e998c0edef8789
|
@@ -0,0 +1,35 @@
|
|
1
|
+
module Jmpod
|
2
|
+
class Command
|
3
|
+
class Config < Command
|
4
|
+
class Get < Config
|
5
|
+
|
6
|
+
self.summary = '获取jmpod配置'
|
7
|
+
self.description = <<-DESC
|
8
|
+
获取jmpod全局配置.
|
9
|
+
DESC
|
10
|
+
|
11
|
+
self.arguments = [
|
12
|
+
CLAide::Argument.new('NAME', true),
|
13
|
+
]
|
14
|
+
|
15
|
+
def initialize(argv)
|
16
|
+
@name = argv.shift_argument
|
17
|
+
super
|
18
|
+
@additional_args = argv.remainder!
|
19
|
+
end
|
20
|
+
|
21
|
+
def validate!
|
22
|
+
super
|
23
|
+
help! 'A name for the Pod is required.' unless @name
|
24
|
+
help! 'The Pod name cannot contain spaces.' if @name =~ /\s/
|
25
|
+
help! 'The Pod name cannot contain plusses.' if @name =~ /\+/
|
26
|
+
help! "The Pod name cannot begin with a '.'" if @name[0, 1] == '.'
|
27
|
+
end
|
28
|
+
|
29
|
+
def run
|
30
|
+
puts "获取全局配置成功".green
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
module Jmpod
|
2
|
+
class Command
|
3
|
+
class Config < Command
|
4
|
+
class Set < Config
|
5
|
+
|
6
|
+
self.summary = '设置全局配置'
|
7
|
+
self.description = <<-DESC
|
8
|
+
设置jmpod全局配置.
|
9
|
+
DESC
|
10
|
+
|
11
|
+
self.arguments = [
|
12
|
+
CLAide::Argument.new('NAME', true),
|
13
|
+
]
|
14
|
+
|
15
|
+
def initialize(argv)
|
16
|
+
@name = argv.shift_argument
|
17
|
+
super
|
18
|
+
@additional_args = argv.remainder!
|
19
|
+
end
|
20
|
+
|
21
|
+
def validate!
|
22
|
+
super
|
23
|
+
help! 'A name for the Pod is required.' unless @name
|
24
|
+
help! 'The Pod name cannot contain spaces.' if @name =~ /\s/
|
25
|
+
help! 'The Pod name cannot contain plusses.' if @name =~ /\+/
|
26
|
+
help! "The Pod name cannot begin with a '.'" if @name[0, 1] == '.'
|
27
|
+
end
|
28
|
+
|
29
|
+
def run
|
30
|
+
puts "设置全局配置成功".green
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
require 'jmpod/command/config/set'
|
2
|
+
require 'jmpod/command/config/get'
|
3
|
+
|
4
|
+
module Jmpod
|
5
|
+
class Command
|
6
|
+
class Config < Command
|
7
|
+
self.abstract_command = true
|
8
|
+
self.summary = 'jmpod 配置'
|
9
|
+
self.description = <<-DESC
|
10
|
+
配置全局链接等
|
11
|
+
DESC
|
12
|
+
|
13
|
+
# def config_dir
|
14
|
+
# @home_dir ||= Pathname.new(ENV['CP_HOME_DIR'] || '~/.jmpodconfig').expand_path
|
15
|
+
# end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
data/lib/jmpod/command.rb
CHANGED
data/lib/jmpod/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jmpod
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- jieming
|
@@ -119,6 +119,9 @@ files:
|
|
119
119
|
- jmpod.gemspec
|
120
120
|
- lib/jmpod.rb
|
121
121
|
- lib/jmpod/command.rb
|
122
|
+
- lib/jmpod/command/config.rb
|
123
|
+
- lib/jmpod/command/config/get.rb
|
124
|
+
- lib/jmpod/command/config/set.rb
|
122
125
|
- lib/jmpod/command/create.rb
|
123
126
|
- lib/jmpod/command/create/oc.rb
|
124
127
|
- lib/jmpod/command/create/swift.rb
|