cocoapods-module 0.0.2
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 +7 -0
- data/LICENSE.txt +22 -0
- data/README.md +11 -0
- data/lib/cocoapods-module/command/module/create.rb +41 -0
- data/lib/cocoapods-module/command/module/publish.rb +54 -0
- data/lib/cocoapods-module/command/module/push.rb +56 -0
- data/lib/cocoapods-module/command/module.rb +37 -0
- data/lib/cocoapods-module/command.rb +1 -0
- data/lib/cocoapods-module/gem_version.rb +3 -0
- data/lib/cocoapods-module.rb +1 -0
- data/lib/cocoapods_plugin.rb +1 -0
- metadata +81 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: e6094bdb484ce20c6eb52b0477e1af7b4fd3f4ec7bcfd8e8a1a05661e174d79c
|
4
|
+
data.tar.gz: 92ddfee1066c49fb32fa494fd78dce92080f6a1e20a9ea3999bd1b5e626c4bb6
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 03ba180225d324a896fd044350227bdf1e096d69f66e9a445b0e95a0ffbed1da3342973a2272fddc774b8e8bb5a0f270b01d1ff5d7f3df2d99c3ceda016bd016
|
7
|
+
data.tar.gz: 6e4b2b71b3990f6a77fad4c3a2c53507764e31b39150e150d0b89963682176bad76277efe3114533c443861419b8deb05c32030dc56b094532b017b98c23e913
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2022 yangpeng <peng.yang@ximalaya.com>
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,41 @@
|
|
1
|
+
module Pod
|
2
|
+
class Command
|
3
|
+
class Module
|
4
|
+
class Create < Module
|
5
|
+
include ProjectDirectory
|
6
|
+
|
7
|
+
self.summary = 'Create a Pod & Sync files to Server.'
|
8
|
+
self.description = <<-DESC
|
9
|
+
Create pod library by command, Then sync files to git server, Then download the dependency library and open the project
|
10
|
+
DESC
|
11
|
+
self.arguments = [
|
12
|
+
CLAide::Argument.new('PROJECT_NAME', true),
|
13
|
+
CLAide::Argument.new('XCODE_PROJECT', false)
|
14
|
+
]
|
15
|
+
|
16
|
+
def initialize(argv)
|
17
|
+
@project_name = argv.shift_argument
|
18
|
+
path = argv.shift_argument
|
19
|
+
@project_path = Pathname.new(path) if path
|
20
|
+
super
|
21
|
+
end
|
22
|
+
|
23
|
+
def validate!
|
24
|
+
super
|
25
|
+
unless @project_name
|
26
|
+
help! 'Specify the project name.'
|
27
|
+
end
|
28
|
+
|
29
|
+
unless @project_path
|
30
|
+
@project_path = Pathname.getwd + @project_name
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
def run
|
35
|
+
UI.puts "Start execute pod module create command..."
|
36
|
+
exec("pod lib create #{@project_name} --template-url='https://gitee.com/giraffex/pod-template.git'")
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
@@ -0,0 +1,54 @@
|
|
1
|
+
module Pod
|
2
|
+
class Command
|
3
|
+
class Module
|
4
|
+
class Publish < Module
|
5
|
+
include ProjectDirectory
|
6
|
+
|
7
|
+
self.summary = 'Push pod lib to remote repo.'
|
8
|
+
self.description = <<-DESC
|
9
|
+
Push pod lib to remote repo, you can integrate pod to you project. and add tag version, eg 0.1.0.
|
10
|
+
DESC
|
11
|
+
|
12
|
+
self.arguments = [
|
13
|
+
CLAide::Argument.new('PROJECT_NAME', true),
|
14
|
+
CLAide::Argument.new('TAG_VERSION', true)
|
15
|
+
]
|
16
|
+
|
17
|
+
def initialize(argv)
|
18
|
+
@project_name = argv.shift_argument
|
19
|
+
@tag_version = argv.shift_argument
|
20
|
+
super
|
21
|
+
end
|
22
|
+
|
23
|
+
def validate!
|
24
|
+
super
|
25
|
+
|
26
|
+
# 判断是否存在.podspec文件
|
27
|
+
podspecs = Pathname.glob('*.podspec')
|
28
|
+
@podspec_path = podspecs.first if podspecs.size == 1
|
29
|
+
help! "you should cd to pod path. check #{Pathname.getwd}" unless @podspec_path
|
30
|
+
|
31
|
+
# 判断是否存在.git文件
|
32
|
+
@gits_path = Pathname.getwd + ".git"
|
33
|
+
help! ".git dir is requred. check #{Pathname.getwd}" unless @gits_path.exist?
|
34
|
+
|
35
|
+
unless @project_name
|
36
|
+
help! 'project name is required.'
|
37
|
+
end
|
38
|
+
|
39
|
+
# 判断是否存填写版本号
|
40
|
+
unless @tag_version
|
41
|
+
help! 'commit infomation is required.'
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
def run
|
46
|
+
UI.puts "Start execute pod module publish command..."
|
47
|
+
git! ['tag', '-a', @tag_version, '-m', "#{@tag_version}"]
|
48
|
+
git! ['push', '--tags']
|
49
|
+
exec("pod repo push gitee-giraffex-dcspecs #{@project_name}.podspec --verbose --allow-warnings --use-libraries")
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
@@ -0,0 +1,56 @@
|
|
1
|
+
module Pod
|
2
|
+
class Command
|
3
|
+
class Module
|
4
|
+
class Push < Module
|
5
|
+
include ProjectDirectory
|
6
|
+
include Executable
|
7
|
+
|
8
|
+
self.summary = 'Push modify files to git server.'
|
9
|
+
self.description = <<-DESC
|
10
|
+
Push modify files to git server & push tag to git server.
|
11
|
+
DESC
|
12
|
+
|
13
|
+
self.arguments = [
|
14
|
+
CLAide::Argument.new('PROJECT_NAME', true),
|
15
|
+
CLAide::Argument.new('COMMIT_INFO', true)
|
16
|
+
]
|
17
|
+
|
18
|
+
def initialize(argv)
|
19
|
+
@project_name = argv.shift_argument
|
20
|
+
@commit_info = argv.shift_argument
|
21
|
+
super
|
22
|
+
end
|
23
|
+
|
24
|
+
def validate!
|
25
|
+
super
|
26
|
+
|
27
|
+
# 判断是否存在.podspec文件
|
28
|
+
podspecs = Pathname.glob('*.podspec')
|
29
|
+
@podspec_path = podspecs.first if podspecs.size == 1
|
30
|
+
help! "you should cd to pod path. check #{Pathname.getwd}" unless @podspec_path
|
31
|
+
|
32
|
+
# 判断是否存在.git文件
|
33
|
+
@gits_path = Pathname.getwd + ".git"
|
34
|
+
help! ".git dir is requred. check #{Pathname.getwd}" unless @gits_path.exist?
|
35
|
+
|
36
|
+
unless @project_name
|
37
|
+
help! 'project name is required.'
|
38
|
+
end
|
39
|
+
|
40
|
+
# 判断是否存填写提交信息
|
41
|
+
unless @commit_info
|
42
|
+
help! 'commit infomation is required.'
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
def run
|
47
|
+
UI.puts "Start execute pod module push command..."
|
48
|
+
git! ['add', '.']
|
49
|
+
git! ['commit', '-m', @commit_info]
|
50
|
+
git! ['remote', 'add', 'origin', "git@gitee.com:giraffex/#{@project_name}.git"]
|
51
|
+
git! ['push', '-u', 'origin', 'master']
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
module Pod
|
2
|
+
class Command
|
3
|
+
# This is an example of a cocoapods plugin adding a top-level subcommand
|
4
|
+
# to the 'pod' command.
|
5
|
+
#
|
6
|
+
# You can also create subcommands of existing or new commands. Say you
|
7
|
+
# wanted to add a subcommand to `list` to show newly deprecated pods,
|
8
|
+
# (e.g. `pod list deprecated`), there are a few things that would need
|
9
|
+
# to change.
|
10
|
+
#
|
11
|
+
# - move this file to `lib/pod/command/list/deprecated.rb` and update
|
12
|
+
# the class to exist in the the Pod::Command::List namespace
|
13
|
+
# - change this class to extend from `List` instead of `Command`. This
|
14
|
+
# tells the plugin system that it is a subcommand of `list`.
|
15
|
+
# - edit `lib/cocoapods_plugins.rb` to require this file
|
16
|
+
#
|
17
|
+
# @todo Create a PR to add your plugin to CocoaPods/cocoapods.org
|
18
|
+
# in the `plugins.json` file, once your plugin is released.
|
19
|
+
#
|
20
|
+
class Module < Command
|
21
|
+
self.abstract_command = true # pod module 会显示帮助信息
|
22
|
+
self.summary = 'Quickly create and publish private repositories.'
|
23
|
+
|
24
|
+
self.description = <<-DESC
|
25
|
+
Quickly create and publish private repositories..
|
26
|
+
DESC
|
27
|
+
|
28
|
+
require 'cocoapods-module/command/module/create'
|
29
|
+
require 'cocoapods-module/command/module/push'
|
30
|
+
require 'cocoapods-module/command/module/publish'
|
31
|
+
|
32
|
+
extend Executable
|
33
|
+
executable :git
|
34
|
+
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
require 'cocoapods-module/command/module'
|
@@ -0,0 +1 @@
|
|
1
|
+
require 'cocoapods-module/gem_version'
|
@@ -0,0 +1 @@
|
|
1
|
+
require 'cocoapods-module/command'
|
metadata
ADDED
@@ -0,0 +1,81 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: cocoapods-module
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.2
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- yangpeng
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2022-04-27 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '2.2'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '2.2'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
description: A short description of cocoapods-module.
|
42
|
+
email:
|
43
|
+
- peng.yang@ximalaya.com
|
44
|
+
executables: []
|
45
|
+
extensions: []
|
46
|
+
extra_rdoc_files: []
|
47
|
+
files:
|
48
|
+
- LICENSE.txt
|
49
|
+
- README.md
|
50
|
+
- lib/cocoapods-module.rb
|
51
|
+
- lib/cocoapods-module/command.rb
|
52
|
+
- lib/cocoapods-module/command/module.rb
|
53
|
+
- lib/cocoapods-module/command/module/create.rb
|
54
|
+
- lib/cocoapods-module/command/module/publish.rb
|
55
|
+
- lib/cocoapods-module/command/module/push.rb
|
56
|
+
- lib/cocoapods-module/gem_version.rb
|
57
|
+
- lib/cocoapods_plugin.rb
|
58
|
+
homepage: https://github.com/EXAMPLE/cocoapods-module
|
59
|
+
licenses:
|
60
|
+
- MIT
|
61
|
+
metadata: {}
|
62
|
+
post_install_message:
|
63
|
+
rdoc_options: []
|
64
|
+
require_paths:
|
65
|
+
- lib
|
66
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
67
|
+
requirements:
|
68
|
+
- - ">="
|
69
|
+
- !ruby/object:Gem::Version
|
70
|
+
version: '0'
|
71
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
requirements: []
|
77
|
+
rubygems_version: 3.1.4
|
78
|
+
signing_key:
|
79
|
+
specification_version: 4
|
80
|
+
summary: A longer description of cocoapods-module.
|
81
|
+
test_files: []
|