jmpod 0.3.7 → 0.4.1

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: 27592d9ab4c339dc8f8d4e8b774f33efe8b5f121d76679ac72ced4b927401cec
4
- data.tar.gz: ddea369c625a340b4da8816f43809a7add1c868f510b461e4acad86e371ba012
3
+ metadata.gz: b9b00a9fcc5c1a6b3dc3a1b9c758e90604540381ac6e39f892bdbf5d6428682a
4
+ data.tar.gz: cc3545459916e8ca917142c082f9845faf396d4b4827fe21b75e137e68a05666
5
5
  SHA512:
6
- metadata.gz: e7f0d305e6b05d1a31213406f2b6e873f3e505c67b0fdba54de38cc6dc075bea18a059a2b88f155344d4f572efe12a62e95e8e8741a16a45dd82321199c31afd
7
- data.tar.gz: f795f2802f7d780a50f81224e93341c837faf74a44e10b75a4283a31750675ee795b72bfa8c044d457e69283376948fd0b7be0a75890f6c64c58ed2e26d308c1
6
+ metadata.gz: 88784cd2e98f10f66c4bc8aec84b6bda2293290ac36dbee2bf789b06d5805850d34c4b1e34502dab7b34e72db5dec0043c2f8873017648e02fd2808f34ab0787
7
+ data.tar.gz: 7ab1865a3ea0ad00555f087df34ab1bea6ba3a46f0e04a4bc7936121cedfa851b0d433a18566475f58a6ca47c44a05ff83f18b854dade9a0ae26f935be71745e
data/.gitignore CHANGED
@@ -6,3 +6,4 @@
6
6
  /pkg/
7
7
  /spec/reports/
8
8
  /tmp/
9
+ /*.gem
data/Gemfile CHANGED
@@ -1,5 +1,5 @@
1
1
  # gem 国内源
2
- source "https://ruby-china.org"
2
+ source "https://gems.ruby-china.com/"
3
3
 
4
4
  # 依赖项 --> 引用spec文件里的依赖
5
5
  gemspec
data/bin/jmpod CHANGED
@@ -1,8 +1,11 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
- require "bundler/setup"
3
+ if $PROGRAM_NAME == __FILE__
4
+ ENV['BUNDLE_GEMFILE'] = File.expand_path('../../Gemfile', __FILE__)
5
+ require 'bundler/setup'
6
+ end
7
+
4
8
  require "jmpod"
5
- require "cocoapods"
6
9
 
7
10
  # You can add fixtures and/or initialization code here to make experimenting
8
11
  # with your gem easier. You can also use a different console, if you like.
data/jmpod.gemspec CHANGED
@@ -37,13 +37,11 @@ Gem::Specification.new do |spec|
37
37
  # spec.add_dependency
38
38
 
39
39
  # 开发依赖
40
- spec.add_development_dependency "bundler", "~> 1.17"
40
+ spec.add_development_dependency "bundler", "~> 1.3"
41
41
  spec.add_development_dependency "rake", "~> 10.0"
42
42
 
43
43
  # 运行时依赖
44
44
  spec.add_runtime_dependency "claide", ">= 1.0.2", "< 2.0"
45
45
  spec.add_runtime_dependency "molinillo", "~> 0.6.6"
46
46
  spec.add_runtime_dependency "colored2", "~> 3.1"
47
- spec.add_runtime_dependency "cocoapods", ">= 1.8.4"
48
-
49
47
  end
@@ -1,4 +1,3 @@
1
- require 'cocoapods'
2
1
  require 'pathname'
3
2
  require 'tmpdir'
4
3
 
@@ -24,6 +23,7 @@ module Jmpod
24
23
  end
25
24
 
26
25
  def run
26
+ system "pod dep"
27
27
  end
28
28
  end
29
29
  end
@@ -27,7 +27,7 @@ module Jmpod
27
27
  end
28
28
 
29
29
  def run
30
- system "pod lib create #{@name} objc --template-url=#{Constant.GitURL}pod-template.git"
30
+ system "pod lib create #{@name} objc --template-url=https://gi-dev.ccrgt.com/ios-thirdpart/pod-template.git"
31
31
  # TODO 将podspec上传到私有specs上
32
32
  puts "一个新的oc pod创建成功!".green
33
33
  end
@@ -10,12 +10,19 @@ module Jmpod
10
10
 
11
11
  self.arguments = [
12
12
  CLAide::Argument.new('URL', true),
13
+ CLAide::Argument.new('BRANCH', false),
13
14
  ]
14
15
 
16
+ def self.options
17
+ [
18
+ ['--silent', 'Show nothing'],
19
+ ].concat(super)
20
+ end
21
+
15
22
  def initialize(argv)
16
23
  @url = argv.shift_argument
24
+ @branch = argv.shift_argument
17
25
  super
18
- @additional_args = argv.remainder!
19
26
  end
20
27
 
21
28
  def validate!
@@ -24,16 +31,40 @@ module Jmpod
24
31
  end
25
32
 
26
33
  def run
27
- # fork 第三方仓库流程
28
- `git clone #{@url}`
29
- dir = @url.match(/[a-z|\-]+(?=\.git)/)
30
- `cd dir`
31
- `git remote set-url origin #{Constant.GitURL}#{dir}.git`
32
- `git push origin master`
33
- `git push --tags`
34
- # TODO 将podspec上传到私有specs上
34
+ if @url.include? '.git'
35
+ fork_third_pod_to_gitlab
36
+ else
37
+ puts "该链接不是一个Git仓库".red
38
+ end
39
+
40
+ end
35
41
 
36
- puts "fork 第三方库成功!".green
42
+ def fork_third_pod_to_gitlab
43
+ reg = /[a-zA-Z|\-|_|0-9]+(?=\.git)/
44
+ dir = reg.match(@url)
45
+ path = "#{Dir.pwd}/#{dir}"
46
+ if File::exist?(path)
47
+ puts "#{dir}文件夹已存在!".red
48
+ else
49
+ branch = @branch.to_s.empty? ? '' : "-b #{@branch}"
50
+ push_branch = @branch.to_s.empty? ? "master" : "#{@branch}"
51
+ `git clone #{branch} #{@url}`
52
+ puts "git命令为:<-- git clone #{branch} #{@url} -->".green
53
+ Dir.chdir(path) do
54
+ git_url = "#{Constant.GitURL}#{dir}"
55
+ `git init`
56
+ `git remote set-url origin #{git_url}.git`
57
+ `git add .`
58
+ `git commit -m "First commit"`
59
+ `git push origin #{push_branch}`
60
+ `git push --tags`
61
+ # TODO 将podspec上传到私有specs上
62
+
63
+ puts "fork 第三方库成功!".green
64
+ puts "git 地址为:#{git_url}".green
65
+ system "open #{git_url}"
66
+ end
67
+ end
37
68
  end
38
69
  end
39
70
  end
@@ -24,8 +24,16 @@ module Jmpod
24
24
  end
25
25
 
26
26
  def openGems
27
- puts 'gem路径为:/Library/Ruby/Gems/'.green
28
- system 'open /Library/Ruby/Gems/'
27
+ last_version_file = "0"
28
+ Dir.foreach('/Library/Ruby/Gems/') do |file|
29
+ if file.to_s > last_version_file
30
+ last_version_file = file.to_s
31
+ end
32
+ end
33
+ version = last_version_file
34
+ path = "/Library/Ruby/Gems/#{version}/gems"
35
+ puts "gem路径为:#{path}".green
36
+ system "open #{path}"
29
37
  end
30
38
  end
31
39
  end
data/lib/jmpod/version.rb CHANGED
@@ -2,5 +2,5 @@ module Jmpod
2
2
  # freeze 冻结对象,将对象变成一个常量
3
3
  # unless 右边的代码块成立,才会运行左边的代码块
4
4
  # defined? 是用来判断本地变量是否存在,也可用来判断是否存在方法
5
- VERSION = "0.3.7".freeze unless defined? Jmpod::VERSION
5
+ VERSION = "0.4.1".freeze unless defined? Jmpod::VERSION
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jmpod
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.7
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - jieming
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-04-29 00:00:00.000000000 Z
11
+ date: 2020-05-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '1.17'
19
+ version: '1.3'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '1.17'
26
+ version: '1.3'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -86,20 +86,6 @@ dependencies:
86
86
  - - "~>"
87
87
  - !ruby/object:Gem::Version
88
88
  version: '3.1'
89
- - !ruby/object:Gem::Dependency
90
- name: cocoapods
91
- requirement: !ruby/object:Gem::Requirement
92
- requirements:
93
- - - ">="
94
- - !ruby/object:Gem::Version
95
- version: 1.8.4
96
- type: :runtime
97
- prerelease: false
98
- version_requirements: !ruby/object:Gem::Requirement
99
- requirements:
100
- - - ">="
101
- - !ruby/object:Gem::Version
102
- version: 1.8.4
103
89
  description: '"test"'
104
90
  email:
105
91
  - 307113345@qq.com
@@ -111,19 +97,10 @@ files:
111
97
  - ".gitignore"
112
98
  - CODE_OF_CONDUCT.md
113
99
  - Gemfile
114
- - Gemfile.lock
115
100
  - README.md
116
101
  - Rakefile
117
102
  - bin/jmpod
118
103
  - bin/setup
119
- - jmpod-0.2.7.gem
120
- - jmpod-0.2.8.gem
121
- - jmpod-0.2.9.gem
122
- - jmpod-0.3.0.gem
123
- - jmpod-0.3.1.gem
124
- - jmpod-0.3.2.gem
125
- - jmpod-0.3.3.gem
126
- - jmpod-0.3.4.gem
127
104
  - jmpod.gemspec
128
105
  - lib/jmpod.rb
129
106
  - lib/jmpod/command.rb
data/Gemfile.lock DELETED
@@ -1,95 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- jmpod (0.2.6)
5
- claide (>= 1.0.2, < 2.0)
6
- cocoapods (>= 1.8.4)
7
- colored2 (~> 3.1)
8
- molinillo (~> 0.6.6)
9
-
10
- GEM
11
- remote: https://ruby-china.org/
12
- specs:
13
- CFPropertyList (3.0.2)
14
- activesupport (4.2.11.1)
15
- i18n (~> 0.7)
16
- minitest (~> 5.1)
17
- thread_safe (~> 0.3, >= 0.3.4)
18
- tzinfo (~> 1.1)
19
- algoliasearch (1.27.1)
20
- httpclient (~> 2.8, >= 2.8.3)
21
- json (>= 1.5.1)
22
- atomos (0.1.3)
23
- claide (1.0.2)
24
- cocoapods (1.8.4)
25
- activesupport (>= 4.0.2, < 5)
26
- claide (>= 1.0.2, < 2.0)
27
- cocoapods-core (= 1.8.4)
28
- cocoapods-deintegrate (>= 1.0.3, < 2.0)
29
- cocoapods-downloader (>= 1.2.2, < 2.0)
30
- cocoapods-plugins (>= 1.0.0, < 2.0)
31
- cocoapods-search (>= 1.0.0, < 2.0)
32
- cocoapods-stats (>= 1.0.0, < 2.0)
33
- cocoapods-trunk (>= 1.4.0, < 2.0)
34
- cocoapods-try (>= 1.1.0, < 2.0)
35
- colored2 (~> 3.1)
36
- escape (~> 0.0.4)
37
- fourflusher (>= 2.3.0, < 3.0)
38
- gh_inspector (~> 1.0)
39
- molinillo (~> 0.6.6)
40
- nap (~> 1.0)
41
- ruby-macho (~> 1.4)
42
- xcodeproj (>= 1.11.1, < 2.0)
43
- cocoapods-core (1.8.4)
44
- activesupport (>= 4.0.2, < 6)
45
- algoliasearch (~> 1.0)
46
- concurrent-ruby (~> 1.1)
47
- fuzzy_match (~> 2.0.4)
48
- nap (~> 1.0)
49
- cocoapods-deintegrate (1.0.4)
50
- cocoapods-downloader (1.2.2)
51
- cocoapods-plugins (1.0.0)
52
- nap
53
- cocoapods-search (1.0.0)
54
- cocoapods-stats (1.1.0)
55
- cocoapods-trunk (1.4.1)
56
- nap (>= 0.8, < 2.0)
57
- netrc (~> 0.11)
58
- cocoapods-try (1.1.0)
59
- colored2 (3.1.2)
60
- concurrent-ruby (1.1.6)
61
- escape (0.0.4)
62
- fourflusher (2.3.1)
63
- fuzzy_match (2.0.4)
64
- gh_inspector (1.1.3)
65
- httpclient (2.8.3)
66
- i18n (0.9.5)
67
- concurrent-ruby (~> 1.0)
68
- json (2.1.0)
69
- minitest (5.12.0)
70
- molinillo (0.6.6)
71
- nanaimo (0.2.6)
72
- nap (1.1.0)
73
- netrc (0.11.0)
74
- rake (10.5.0)
75
- ruby-macho (1.4.0)
76
- thread_safe (0.3.6)
77
- tzinfo (1.2.6)
78
- thread_safe (~> 0.1)
79
- xcodeproj (1.13.0)
80
- CFPropertyList (>= 2.3.3, < 4.0)
81
- atomos (~> 0.1.3)
82
- claide (>= 1.0.2, < 2.0)
83
- colored2 (~> 3.1)
84
- nanaimo (~> 0.2.6)
85
-
86
- PLATFORMS
87
- ruby
88
-
89
- DEPENDENCIES
90
- bundler (~> 1.17)
91
- jmpod!
92
- rake (~> 10.0)
93
-
94
- BUNDLED WITH
95
- 1.17.2
data/jmpod-0.2.7.gem DELETED
Binary file
data/jmpod-0.2.8.gem DELETED
Binary file
data/jmpod-0.2.9.gem DELETED
Binary file
data/jmpod-0.3.0.gem DELETED
Binary file
data/jmpod-0.3.1.gem DELETED
Binary file
data/jmpod-0.3.2.gem DELETED
Binary file
data/jmpod-0.3.3.gem DELETED
Binary file
data/jmpod-0.3.4.gem DELETED
Binary file