ormdev 0.1.8 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0d2bdbfdfcd5e054ba3331fabb1aec411d9c2b7eee6622473026cab8a975a0ad
4
- data.tar.gz: 558371dd86d508d209426f1dab8e507b2cfaa42690d51cda8754fa2302092096
3
+ metadata.gz: 7ffb75697c209a6318b768b141d4fba013baddb0612d938ae5de59c576352cf1
4
+ data.tar.gz: 136b0e9dd6c0da6d76eb5be500af261ae29879f406e58b5de69d58fa1a1571ab
5
5
  SHA512:
6
- metadata.gz: ed6668d63d1188e392bd2b0860622a155299cd3327be02b21e41d15b16d0ac36351d29395bde452adf2f85b2830dc8e4759f99d6f20ff5d433133380161a2e7d
7
- data.tar.gz: 26da2af8226a9abe7d892eaa3188fe69178f1181115d1e3d1bfaedb70e15f294c8778e0ba17d33e5bbf09ab612ec4ec0469ff1a27b814fbbb8ca08632bb563e4
6
+ metadata.gz: b5d1ea44f5732f6c18594ff74872dcd23e7331a2d1ff6d8a54b84bd0605748658a40aa080c60250edf79afdbf75ae787950d699e76bf4a447296bb5f761d6148
7
+ data.tar.gz: 353c565dffa37dca2efd0706c0c786e6fb756b7b0280f4ffe434a1f2526a956db6d93dd6f5f5090dda196378002ad32d74b5bac14edf513747c620e7a739183b
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ormdev (0.1.8)
4
+ ormdev (0.2.0)
5
5
  claide (~> 1.0, >= 1.0.2)
6
6
  cocoapods (~> 1.5, >= 1.5.3)
7
7
  cocoapods-packager (~> 1.5)
@@ -10,7 +10,7 @@ module OrmDev
10
10
 
11
11
  zip插件模板创建:
12
12
 
13
- 'ormdev create --template-url=http://112.65.142.83:7788/ceshi/tmpl/pod-fast-template.zip --fast CIPXxx'
13
+ 'ormdev create --template-url=http://112.65.142.83:7788/ceshi/tmpl/pod-fast-template.zip --fast Xxx'
14
14
  DESC
15
15
 
16
16
  self.arguments = [
@@ -20,16 +20,14 @@ module OrmDev
20
20
  def self.options
21
21
  [
22
22
  ['--template-url=URL', 'Orm插件模板git地址,或者zip地址'],
23
- ['--fast', '快速创建Orm插件模板工程(带测试用例)'],
24
- ['--prefix=XXX', 'Orm插件模板工程前缀(fast有效)'],
25
- ['--skip', '跳过打开Orm插件模板工程(fast有效)'],
23
+ ['--fast', '通过Orm插件模板工程zip地址快速创建'],
24
+ ['--skip', '跳过打开Orm插件模板工程'],
26
25
  ].concat(super)
27
26
  end
28
27
 
29
28
  def initialize(argv)
30
29
  @name = argv.shift_argument
31
30
  @template_url = argv.option('template-url')
32
- @prefix = argv.option('prefix', '')
33
31
  @fast = argv.flag?('fast', false)
34
32
  @skip = argv.flag?('skip', false)
35
33
  super
@@ -41,13 +39,13 @@ module OrmDev
41
39
  help! 'The Pod name cannot contain spaces.' if @name =~ /\s/
42
40
  help! 'The Pod name cannot contain plusses.' if @name =~ /\+/
43
41
  help! "The Pod name cannot begin with a '.'" if @name[0, 1] == '.'
44
- unless @template_url then
42
+ unless @template_url.nil? then
45
43
  help! '模板地址只能是以[git|zip]结尾的地址.' if !(@template_url.downcase.end_with?('.git') || @template_url.downcase.end_with?('.zip'))
46
44
  end
47
45
  end
48
46
 
49
47
  def run
50
- create = OrmDev::CreateHelper.new(@name, @fast, @prefix, @template_url)
48
+ create = OrmDev::CreateHelper.new(@name, @fast, @template_url)
51
49
  create.setup(@skip)
52
50
  OrmDev::LogUtil.info '【创建插件工程】Success!!!,编写插件逻辑代码,添加版本控制'
53
51
  OrmDev::LogUtil.info " cd #{@name}".magenta
@@ -7,38 +7,35 @@ require_relative '../util/download_util'
7
7
  module OrmDev
8
8
  class CreateHelper
9
9
 
10
- ORMDEV_TEMPLATE_URL = 'https://gitee.com/mvn/pod-template.git'.freeze
11
- ORMDEV_FAST_TEMPLATE_URL = 'https://gitee.com/mvn/pod-fast-template.git'.freeze
12
- # ORMDEV_PLUGIN_TEMPLATE_URL = 'https://gitee.com/mvn/pod-plugin-template.git'.freeze
13
- # ORMDEV_PLUGIN_FAST_TEMPLATE_URL = 'https://gitee.com/mvn/pod-plugin-fast-template.git'.freeze
10
+ # ORMDEV_TEMPLATE_URL = 'https://gitee.com/mvn/pod-template.git'.freeze
11
+ ORMDEV_GIT_TEMPLATE_URL = 'https://gitee.com/mvn/pod-fast-template.git'.freeze
12
+ ORMDEV_ZIP_TEMPLATE_URL = 'http://112.65.142.83:7788/ceshi/tmpl/pod-fast-template.zip'.freeze
14
13
 
15
14
  attr_reader :fast_build
16
15
  attr_reader :project_name
17
- attr_reader :class_prefix
18
16
  attr_reader :template_url
19
17
 
20
- def initialize(name, fast = false, prefix = '', template_url = nil)
18
+ def initialize(name, fast = false, template_url = nil)
21
19
  @project_name = name
22
- @class_prefix = prefix
23
20
  @fast_build = fast
24
21
  if @fast_build then
25
- @template_url = template_url || ORMDEV_FAST_TEMPLATE_URL
22
+ @template_url = template_url || ORMDEV_ZIP_TEMPLATE_URL
26
23
  else
27
- @template_url = template_url || ORMDEV_TEMPLATE_URL
24
+ @template_url = template_url || ORMDEV_GIT_TEMPLATE_URL
28
25
  end
29
26
  end
30
27
 
31
- def setup(skip= false)
28
+ def setup(skip = false)
32
29
  OrmDev::SHUtil.run_command('pod repo update orm','更验证Pod',false)
33
30
  abort('插件名已存在'.red) if system("pod search #{@project_name} --no-pager --ios")
34
- if @fast_build then
35
- clone_template
36
- configure_template(skip)
37
- print_info
38
- else
39
- create_command = "pod lib create #{@project_name} --template-url=#{@template_url}"
40
- OrmDev::SHUtil.run_command(create_command,'创建ORM插件工程')
41
- end
31
+ # if @fast_build then
32
+ clone_template
33
+ configure_template(skip)
34
+ print_info
35
+ # else
36
+ # create_command = "pod lib create #{@project_name} --template-url=#{@template_url}"
37
+ # OrmDev::SHUtil.run_command(create_command,'创建ORM插件工程')
38
+ # end
42
39
  end
43
40
 
44
41
  private
@@ -1,3 +1,3 @@
1
1
  module OrmDev
2
- VERSION = '0.1.8'
2
+ VERSION = '0.2.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ormdev
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - devorm
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-12-11 00:00:00.000000000 Z
11
+ date: 2018-12-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: claide
@@ -220,7 +220,7 @@ post_install_message: "\e[32m\n _____ __ __ ________\n
220
220
  ___ \\ / / / / / _ _ /\n / / / // /_/ / / // // /\n / / / //
221
221
  ____/ / // // /\n / /__/ // / / // // /\n \\_____//_/ /_//_//_/
222
222
  \ Dev\n\n\n -- 欢迎使用OrmDev for iOS --\n ---- 技术支持:devorm@163.com ----\n\n
223
- \ \e[0m\t\t\t\tv0.1.8\n\n"
223
+ \ \e[0m\t\t\t\tv0.2.0\n\n"
224
224
  rdoc_options: []
225
225
  require_paths:
226
226
  - lib