ormdev 0.0.8 → 0.0.9
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 +4 -1
- data/lib/ormdev/command/lint.rb +2 -4
- data/lib/ormdev/command/run.rb +3 -1
- data/lib/ormdev/command/setup.rb +4 -0
- data/lib/ormdev/command/update.rb +58 -0
- data/lib/ormdev/command.rb +1 -0
- data/lib/ormdev/source/core/create_helper.rb +0 -4
- data/lib/ormdev/source/core/run_helper.rb +1 -1
- data/lib/ormdev/source/util/sh_util.rb +1 -1
- data/lib/ormdev/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4ebdf458157d9c9353a1813aa19bbed80a43d6ca23c9d7cfdaa346673f58435d
|
4
|
+
data.tar.gz: 0a10dc14518449bf3d2a8a0b0b7f22fd95334aa58aa53cd85c87c94ff8fcc536
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b52ed72e436679b0382fc505f0933a8bd266b7be9faa41f044582785f0b223ec39a731a5ebf6d91e3394e8909b4269ad14702508ac3252a95a1fbf3bb6bf70b5
|
7
|
+
data.tar.gz: 3c2ca44e352be1f4f1c1bae39d42a6c1388c64e778e4ca9c307b86a7917d91cb231375f15ee3ffb5dad217d61c1697bc2b9da9a6fe5d06ab50096763dc9a972e
|
data/Gemfile.lock
CHANGED
@@ -42,7 +42,10 @@ module OrmDev
|
|
42
42
|
def run
|
43
43
|
create = OrmDev::CreateHelper.new(@name, @fast, @prefix, @template_url)
|
44
44
|
create.setup(@skip)
|
45
|
-
OrmDev::LogUtil.info "
|
45
|
+
OrmDev::LogUtil.info ", `cd #{@name}` \n `ormdev run ` "
|
46
|
+
OrmDev::LogUtil.info '【创建插件工程】Success!!!,编写插件逻辑代码,添加版本控制'
|
47
|
+
OrmDev::LogUtil.info " `cd #{@name}`".magenta
|
48
|
+
OrmDev::LogUtil.info " `ormdev run`".magenta
|
46
49
|
end
|
47
50
|
end
|
48
51
|
end
|
data/lib/ormdev/command/lint.rb
CHANGED
@@ -17,14 +17,12 @@ module OrmDev
|
|
17
17
|
|
18
18
|
def self.options
|
19
19
|
[
|
20
|
-
['--source', '依赖库源码更新'],
|
21
20
|
].concat(super)
|
22
21
|
end
|
23
22
|
|
24
23
|
def initialize(argv)
|
25
24
|
@podspec_file = argv.shift_argument
|
26
25
|
@podspec_files = Pathname.pwd.children.select { |pn| pn.extname == '.podspec' }
|
27
|
-
@source = argv.flag?('source', false)
|
28
26
|
super
|
29
27
|
end
|
30
28
|
|
@@ -44,9 +42,9 @@ module OrmDev
|
|
44
42
|
super
|
45
43
|
OrmDev::LogUtil.info '[插件管理] 验证Pod'.green
|
46
44
|
@spec = Pod::Specification.from_file(@podspec_path)
|
47
|
-
|
45
|
+
OrmDev::SHUtil.run_command("pod cache clean #{@spec.name} --all",'清除Pod缓存',false)
|
48
46
|
pod_lint_command = ''
|
49
|
-
pod_lint_command << "#{@spec.name}
|
47
|
+
pod_lint_command << "#{@spec.name}_SOURCE=1"
|
50
48
|
pod_lint_command << ' pod lib lint --sources=orm,master --allow-warnings --use-libraries --verbose'
|
51
49
|
OrmDev::SHUtil.run_command(pod_lint_command,'更验证Pod',false)
|
52
50
|
end
|
data/lib/ormdev/command/run.rb
CHANGED
@@ -52,7 +52,9 @@ module OrmDev
|
|
52
52
|
OrmDev::LogUtil.info '[插件发布] '.green
|
53
53
|
installer = OrmDev::RunHelper.new(@podspec_path)
|
54
54
|
framework_zip = installer.setup(@no_version_control)
|
55
|
-
|
55
|
+
framework_zip_path= File.expand_path('./', framework_zip)
|
56
|
+
OrmDev::LogUtil.info "Success!!! 静态库编译完成:#{framework_zip_path}"
|
57
|
+
OrmDev::LogUtil.info " `ormdev publish #{@podspec_path} --zip=#{framework_zip_path} --push-type=0`".magenta
|
56
58
|
end
|
57
59
|
end
|
58
60
|
end
|
data/lib/ormdev/command/setup.rb
CHANGED
@@ -31,6 +31,10 @@ module OrmDev
|
|
31
31
|
OrmDev::LogUtil.info '[插件开发] 初始化pod仓库'.green
|
32
32
|
OrmDev::SHUtil.run_command('pod repo add orm https://gitee.com/mvn/ios.git','更验证Pod',false)
|
33
33
|
OrmDev::SHUtil.run_command('pod repo update','更验证Pod',false)
|
34
|
+
OrmDev::LogUtil.info '创建插件工程:'
|
35
|
+
OrmDev::LogUtil.info ' `ormdev create CIPXxx`'.magenta
|
36
|
+
OrmDev::LogUtil.info '或者使用快速创建插件工程:'
|
37
|
+
OrmDev::LogUtil.info ' `ormdev create CIPXxx --fast`'.magenta
|
34
38
|
end
|
35
39
|
end
|
36
40
|
end
|
@@ -0,0 +1,58 @@
|
|
1
|
+
require 'cocoapods'
|
2
|
+
|
3
|
+
require_relative '../source/util/sh_util'
|
4
|
+
|
5
|
+
module OrmDev
|
6
|
+
class Command
|
7
|
+
class Update < Command
|
8
|
+
self.summary = '更新本地插件pod仓库。'
|
9
|
+
self.description = <<-DESC
|
10
|
+
插件管理.
|
11
|
+
更新本地插件pod仓库。
|
12
|
+
DESC
|
13
|
+
|
14
|
+
self.arguments = [
|
15
|
+
CLAide::Argument.new('PATH', false)
|
16
|
+
]
|
17
|
+
|
18
|
+
def self.options
|
19
|
+
[
|
20
|
+
['--no-repo-update', 'Skip running `pod repo update` before install'],
|
21
|
+
].concat(super)
|
22
|
+
end
|
23
|
+
|
24
|
+
def initialize(argv)
|
25
|
+
@podspec_file = argv.shift_argument
|
26
|
+
@podspec_files = Pathname.pwd.children.select { |pn| pn.extname == '.podspec' }
|
27
|
+
@repo_update = argv.flag?('repo-update')
|
28
|
+
super
|
29
|
+
end
|
30
|
+
|
31
|
+
def validate!
|
32
|
+
super
|
33
|
+
if @podspec_file
|
34
|
+
help! "podspec file at #{@podspec_file} does not exist" unless File.exist? @podspec_file
|
35
|
+
@podspec_path = @podspec_file
|
36
|
+
else
|
37
|
+
raise Pod::Informative, 'No podspec file found, please specify one' unless @podspec_files.length > 0
|
38
|
+
raise Pod::Informative, 'Multiple podspec file found, please specify one' unless @podspec_files.length == 1
|
39
|
+
@podspec_path = @podspec_files.first
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
def run
|
44
|
+
super
|
45
|
+
OrmDev::LogUtil.info '[插件管理] 更新Pod依赖库'.green
|
46
|
+
@spec = Pod::Specification.from_file(@podspec_path)
|
47
|
+
OrmDev::SHUtil.run_command("pod cache clean #{@spec.name} --all",'清除Pod缓存',false)
|
48
|
+
Dir.chdir('Example') do
|
49
|
+
pod_update_command = ''
|
50
|
+
pod_update_command << "#{@spec.name}_SOURCE=1"
|
51
|
+
pod_update_command << ' pod update'
|
52
|
+
pod_update_command << ' --no-repo-update' unless @repo_update
|
53
|
+
OrmDev::SHUtil.run_command(pod_update_command,'更新Pod依赖库',false)
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
data/lib/ormdev/command.rb
CHANGED
@@ -93,7 +93,7 @@ module OrmDev
|
|
93
93
|
|
94
94
|
# 静态化
|
95
95
|
def pod_package_framwork
|
96
|
-
pod_package_command = "pod package #{@spec.name}.podspec --exclude-deps --no-mangle --force --spec-sources=git@gitee.com:mvn/ios.git,https://github.com/CocoaPods/Specs.git --verbose"
|
96
|
+
pod_package_command = "#{@spec.name}_SOURCE=1 pod package #{@spec.name}.podspec --exclude-deps --no-mangle --force --spec-sources=git@gitee.com:mvn/ios.git,https://github.com/CocoaPods/Specs.git --verbose"
|
97
97
|
OrmDev::SHUtil.run_command(pod_package_command,'静态化插件')
|
98
98
|
destination_path = "#{@spec.name}/lib"
|
99
99
|
source_path = "#{@spec.name}-#{@spec.version}"
|
@@ -7,7 +7,7 @@ module OrmDev
|
|
7
7
|
result = system(command) if command.is_a?(String)
|
8
8
|
OrmDev::LogUtil.print_command message
|
9
9
|
unless result then
|
10
|
-
OrmDev::LogUtil.print_error "操作内容:#{message}\n
|
10
|
+
OrmDev::LogUtil.print_error "操作内容:#{message}\n操作命令:" + "#{command}".magenta
|
11
11
|
abort(message) if abort
|
12
12
|
end
|
13
13
|
result
|
data/lib/ormdev/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ormdev
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- devorm
|
@@ -139,6 +139,7 @@ files:
|
|
139
139
|
- lib/ormdev/command/publish.rb
|
140
140
|
- lib/ormdev/command/run.rb
|
141
141
|
- lib/ormdev/command/setup.rb
|
142
|
+
- lib/ormdev/command/update.rb
|
142
143
|
- lib/ormdev/source/core/create_helper.rb
|
143
144
|
- lib/ormdev/source/core/run_helper.rb
|
144
145
|
- lib/ormdev/source/util/http_util.rb
|