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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 300f11f0256ae3ffa8a87ee5cee06210e9b6d979bb3d86ffaee9087038477a10
4
- data.tar.gz: d452bab37bc8ea8673ea3361fa30f0eaf60619180e06d4bf1478e29cf0f2c7ef
3
+ metadata.gz: b21b104512146995c758c98538c08cf2a10f18211d81903269a56b70511011bd
4
+ data.tar.gz: 0cff414226d2c724064d0af3644bc4e1bef015b0c19d27fba8338997cb722ab8
5
5
  SHA512:
6
- metadata.gz: f19cc0796823418300aab3a493c68b56298cd6866111e6295b009dba61a77f1770047a36c1d06b21effe2c1719e16519ac6238626c975d842c29cbd653874adc
7
- data.tar.gz: aedc0cbf408bf021b9fd69870e8ebc51c205f083c7ebc9677ee1149324a065f169e64eadb40ac3ead460bd76b48b335c11da249c80720beeda133c20fbc7a54d
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
@@ -29,7 +29,7 @@ module Jmpod
29
29
  def run
30
30
  system "pod lib create #{@name} objc --template-url=#{Constant.GitURL}pod-template.git"
31
31
  # TODO 将podspec上传到私有specs上
32
- puts "一个新的oc pod创建成!".green
32
+ puts "一个新的oc pod创建成功!".green
33
33
  end
34
34
  end
35
35
  end
data/lib/jmpod/command.rb CHANGED
@@ -16,6 +16,7 @@ module Jmpod
16
16
  class Command < CLAide::Command
17
17
  require 'jmpod/command/create'
18
18
  require 'jmpod/command/init'
19
+ require 'jmpod/command/config'
19
20
 
20
21
  self.abstract_command = true
21
22
  self.command = 'jmpod'
data/lib/jmpod/version.rb CHANGED
@@ -2,5 +2,5 @@ module Jmpod
2
2
  # freeze 冻结对象,将对象变成一个常量
3
3
  # unless 右边的代码块成立,才会运行左边的代码块
4
4
  # defined? 是用来判断本地变量是否存在,也可用来判断是否存在方法
5
- VERSION = "0.1.7".freeze unless defined? Jmpod::VERSION
5
+ VERSION = "0.1.8".freeze unless defined? Jmpod::VERSION
6
6
  end
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.7
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