ormdev 0.1.8 → 0.2.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 +4 -4
- data/Gemfile.lock +1 -1
- data/lib/ormdev/command/create.rb +5 -7
- data/lib/ormdev/source/core/create_helper.rb +15 -18
- data/lib/ormdev/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7ffb75697c209a6318b768b141d4fba013baddb0612d938ae5de59c576352cf1
|
|
4
|
+
data.tar.gz: 136b0e9dd6c0da6d76eb5be500af261ae29879f406e58b5de69d58fa1a1571ab
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b5d1ea44f5732f6c18594ff74872dcd23e7331a2d1ff6d8a54b84bd0605748658a40aa080c60250edf79afdbf75ae787950d699e76bf4a447296bb5f761d6148
|
|
7
|
+
data.tar.gz: 353c565dffa37dca2efd0706c0c786e6fb756b7b0280f4ffe434a1f2526a956db6d93dd6f5f5090dda196378002ad32d74b5bac14edf513747c620e7a739183b
|
data/Gemfile.lock
CHANGED
|
@@ -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
|
|
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', '
|
|
24
|
-
['--
|
|
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, @
|
|
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
|
-
|
|
12
|
-
|
|
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,
|
|
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 ||
|
|
22
|
+
@template_url = template_url || ORMDEV_ZIP_TEMPLATE_URL
|
|
26
23
|
else
|
|
27
|
-
@template_url = 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
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
else
|
|
39
|
-
|
|
40
|
-
|
|
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
|
data/lib/ormdev/version.rb
CHANGED
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.
|
|
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
|
+
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.
|
|
223
|
+
\ \e[0m\t\t\t\tv0.2.0\n\n"
|
|
224
224
|
rdoc_options: []
|
|
225
225
|
require_paths:
|
|
226
226
|
- lib
|