ppdbiu 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +50 -0
- data/Gemfile +6 -0
- data/Gemfile.lock +83 -0
- data/LICENSE +21 -0
- data/LICENSE.txt +21 -0
- data/README.md +55 -0
- data/Rakefile +10 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/lib/ppdbiu/version.rb +3 -0
- data/lib/ppdbiu.rb +61 -0
- data/ppdbiu.gemspec +28 -0
- metadata +104 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: c80161ca66fe69619434c2414e8c34d4dad19f00
|
4
|
+
data.tar.gz: 004c7ddc56b6c4b905497794874ed3928f8379d0
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 85e338593bec647d60c846b515d8c19b5ed673ac659e527f67f9078e5c31e98d4c3eb3991699cc8fe36e528cc671d1bf991d4452785db43159e150e6ff2accf2
|
7
|
+
data.tar.gz: 90733f03a6275850a0a1280198601a60bacc8082f91514420fb4a043e4f2181258f467c01828bcbb0bca8c4e28962713730d405a5dce45dbd2501dc755b7fd37
|
data/.gitignore
ADDED
@@ -0,0 +1,50 @@
|
|
1
|
+
*.gem
|
2
|
+
*.rbc
|
3
|
+
/.config
|
4
|
+
/coverage/
|
5
|
+
/InstalledFiles
|
6
|
+
/pkg/
|
7
|
+
/spec/reports/
|
8
|
+
/spec/examples.txt
|
9
|
+
/test/tmp/
|
10
|
+
/test/version_tmp/
|
11
|
+
/tmp/
|
12
|
+
|
13
|
+
# Used by dotenv library to load environment variables.
|
14
|
+
# .env
|
15
|
+
|
16
|
+
## Specific to RubyMotion:
|
17
|
+
.dat*
|
18
|
+
.repl_history
|
19
|
+
build/
|
20
|
+
*.bridgesupport
|
21
|
+
build-iPhoneOS/
|
22
|
+
build-iPhoneSimulator/
|
23
|
+
|
24
|
+
## Specific to RubyMotion (use of CocoaPods):
|
25
|
+
#
|
26
|
+
# We recommend against adding the Pods directory to your .gitignore. However
|
27
|
+
# you should judge for yourself, the pros and cons are mentioned at:
|
28
|
+
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
|
29
|
+
#
|
30
|
+
# vendor/Pods/
|
31
|
+
|
32
|
+
## Documentation cache and generated files:
|
33
|
+
/.yardoc/
|
34
|
+
/_yardoc/
|
35
|
+
/doc/
|
36
|
+
/rdoc/
|
37
|
+
|
38
|
+
## Environment normalization:
|
39
|
+
/.bundle/
|
40
|
+
/vendor/bundle
|
41
|
+
/lib/bundler/man/
|
42
|
+
|
43
|
+
# for a library or gem, you might want to ignore these files since the code is
|
44
|
+
# intended to run in multiple environments; otherwise, check them in:
|
45
|
+
# Gemfile.lock
|
46
|
+
# .ruby-version
|
47
|
+
# .ruby-gemset
|
48
|
+
|
49
|
+
# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
|
50
|
+
.rvmrc
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,83 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
ppdbiu (0.1.0)
|
5
|
+
cocoapods (>= 1.1.1, < 2.0)
|
6
|
+
|
7
|
+
GEM
|
8
|
+
remote: https://rubygems.org/
|
9
|
+
specs:
|
10
|
+
CFPropertyList (2.3.6)
|
11
|
+
activesupport (4.2.10)
|
12
|
+
i18n (~> 0.7)
|
13
|
+
minitest (~> 5.1)
|
14
|
+
thread_safe (~> 0.3, >= 0.3.4)
|
15
|
+
tzinfo (~> 1.1)
|
16
|
+
claide (1.0.2)
|
17
|
+
cocoapods (1.3.1)
|
18
|
+
activesupport (>= 4.0.2, < 5)
|
19
|
+
claide (>= 1.0.2, < 2.0)
|
20
|
+
cocoapods-core (= 1.3.1)
|
21
|
+
cocoapods-deintegrate (>= 1.0.1, < 2.0)
|
22
|
+
cocoapods-downloader (>= 1.1.3, < 2.0)
|
23
|
+
cocoapods-plugins (>= 1.0.0, < 2.0)
|
24
|
+
cocoapods-search (>= 1.0.0, < 2.0)
|
25
|
+
cocoapods-stats (>= 1.0.0, < 2.0)
|
26
|
+
cocoapods-trunk (>= 1.2.0, < 2.0)
|
27
|
+
cocoapods-try (>= 1.1.0, < 2.0)
|
28
|
+
colored2 (~> 3.1)
|
29
|
+
escape (~> 0.0.4)
|
30
|
+
fourflusher (~> 2.0.1)
|
31
|
+
gh_inspector (~> 1.0)
|
32
|
+
molinillo (~> 0.5.7)
|
33
|
+
nap (~> 1.0)
|
34
|
+
ruby-macho (~> 1.1)
|
35
|
+
xcodeproj (>= 1.5.1, < 2.0)
|
36
|
+
cocoapods-core (1.3.1)
|
37
|
+
activesupport (>= 4.0.2, < 6)
|
38
|
+
fuzzy_match (~> 2.0.4)
|
39
|
+
nap (~> 1.0)
|
40
|
+
cocoapods-deintegrate (1.0.1)
|
41
|
+
cocoapods-downloader (1.1.3)
|
42
|
+
cocoapods-plugins (1.0.0)
|
43
|
+
nap
|
44
|
+
cocoapods-search (1.0.0)
|
45
|
+
cocoapods-stats (1.0.0)
|
46
|
+
cocoapods-trunk (1.3.0)
|
47
|
+
nap (>= 0.8, < 2.0)
|
48
|
+
netrc (~> 0.11)
|
49
|
+
cocoapods-try (1.1.0)
|
50
|
+
colored2 (3.1.2)
|
51
|
+
concurrent-ruby (1.0.5)
|
52
|
+
escape (0.0.4)
|
53
|
+
fourflusher (2.0.1)
|
54
|
+
fuzzy_match (2.0.4)
|
55
|
+
gh_inspector (1.0.3)
|
56
|
+
i18n (0.9.1)
|
57
|
+
concurrent-ruby (~> 1.0)
|
58
|
+
minitest (5.10.3)
|
59
|
+
molinillo (0.5.7)
|
60
|
+
nanaimo (0.2.3)
|
61
|
+
nap (1.1.0)
|
62
|
+
netrc (0.11.0)
|
63
|
+
rake (10.4.2)
|
64
|
+
ruby-macho (1.1.0)
|
65
|
+
thread_safe (0.3.6)
|
66
|
+
tzinfo (1.2.4)
|
67
|
+
thread_safe (~> 0.1)
|
68
|
+
xcodeproj (1.5.4)
|
69
|
+
CFPropertyList (~> 2.3.3)
|
70
|
+
claide (>= 1.0.2, < 2.0)
|
71
|
+
colored2 (~> 3.1)
|
72
|
+
nanaimo (~> 0.2.3)
|
73
|
+
|
74
|
+
PLATFORMS
|
75
|
+
ruby
|
76
|
+
|
77
|
+
DEPENDENCIES
|
78
|
+
bundler (~> 1.15)
|
79
|
+
ppdbiu!
|
80
|
+
rake (~> 10.0)
|
81
|
+
|
82
|
+
BUNDLED WITH
|
83
|
+
1.15.3
|
data/LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
MIT License
|
2
|
+
|
3
|
+
Copyright (c) 2017 坤坤同学
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2017 wanyakun
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,55 @@
|
|
1
|
+
# Ppdbiu
|
2
|
+
|
3
|
+
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/ppdbiu`. To experiment with that code, run `bin/console` for an interactive prompt.
|
4
|
+
|
5
|
+
TODO: Delete this and the text above, and describe your gem
|
6
|
+
|
7
|
+
## Installation
|
8
|
+
|
9
|
+
Add this line to your application's Gemfile:
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
gem 'ppdbiu'
|
13
|
+
```
|
14
|
+
|
15
|
+
And then execute:
|
16
|
+
|
17
|
+
$ bundle
|
18
|
+
|
19
|
+
Or install it yourself as:
|
20
|
+
|
21
|
+
$ gem install ppdbiu
|
22
|
+
|
23
|
+
## Usage
|
24
|
+
|
25
|
+
- 在Podfile中引入依赖 `require 'ppdbiu'`
|
26
|
+
|
27
|
+
- 删除所有的pod 'xxxxx'
|
28
|
+
|
29
|
+
- 添加`makeup_pods(url)`, 其中url为获取json依赖内容的地址,通过url接口请求得到Podfile中的依赖,来安装依赖内容。
|
30
|
+
|
31
|
+
- json内容格式如下:
|
32
|
+
|
33
|
+
```json
|
34
|
+
{
|
35
|
+
"PPDBLUtils":{"version":"~> 1.2.0"},
|
36
|
+
"PPDBLRouter":{"version":"~> 1.1.0"},
|
37
|
+
"PPDBLOpenSSL":{"git":"http://git.xxxx.com/wireless/PPDBLOpenSSL.git"},
|
38
|
+
"PPDBLCore":{"git":"http://git.xxxx.com/wireless/PPDBLCore.git", "branch":"master"},
|
39
|
+
"PPDBLWebViewJSBridge":{"git":"http://git.xxxx.com/wireless/PPDBLWebViewJSBridge.git", "tag":"1.1.0"}
|
40
|
+
}
|
41
|
+
```
|
42
|
+
|
43
|
+
## Development
|
44
|
+
|
45
|
+
After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
46
|
+
|
47
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
48
|
+
|
49
|
+
## Contributing
|
50
|
+
|
51
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/wanyakun/ppdbiu.
|
52
|
+
|
53
|
+
## License
|
54
|
+
|
55
|
+
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "ppdbiu"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require "irb"
|
14
|
+
IRB.start(__FILE__)
|
data/bin/setup
ADDED
data/lib/ppdbiu.rb
ADDED
@@ -0,0 +1,61 @@
|
|
1
|
+
require "ppdbiu/version"
|
2
|
+
|
3
|
+
module Pod
|
4
|
+
class Podfile
|
5
|
+
def makeup_pods(url)
|
6
|
+
UI.title "makeup pods dependency from #{url}"
|
7
|
+
file = "dependency.json"
|
8
|
+
dependencies = peform_request(url)
|
9
|
+
if dependencies
|
10
|
+
#1.保存json
|
11
|
+
File.delete(file) if File.exist?(file)
|
12
|
+
File.open(file, "w") { |io| io.syswrite(JSON.generate(dependencies))}
|
13
|
+
#2.安装依赖
|
14
|
+
ppd_pod(dependencies)
|
15
|
+
else
|
16
|
+
#1.读取本地保存的json
|
17
|
+
json = File.read(file) if File.exist?(file)
|
18
|
+
dependencies = JSON.parse(json)
|
19
|
+
#2.安装依赖
|
20
|
+
ppd_pod(dependencies) if dependencies
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
def ppd_pod(dependencies)
|
25
|
+
UI.puts dependencies
|
26
|
+
dependencies.each { |key, value|
|
27
|
+
version = value.fetch("version", nil)
|
28
|
+
if version
|
29
|
+
pod(key, version)
|
30
|
+
else
|
31
|
+
hash = {}
|
32
|
+
value.each{ |rKey, rValue|
|
33
|
+
hash[:git] = rValue if rKey == "git"
|
34
|
+
hash[:branch] = rValue if rKey == "branch"
|
35
|
+
hash[:tag] = rValue if rKey == "tag"
|
36
|
+
hash[:commit] = rValue if rKey == "commit"
|
37
|
+
hash[:configuration] = rValue if rKey == "configuration"
|
38
|
+
hash[:path] = rValue if rKey == "path"
|
39
|
+
hash[:podspec] = rValue if rKey == "podspec"
|
40
|
+
hash[:subspecs] = rValue if rKey == "subspecs"
|
41
|
+
}
|
42
|
+
pod(key, hash)
|
43
|
+
end
|
44
|
+
}
|
45
|
+
end
|
46
|
+
|
47
|
+
def peform_request(url)
|
48
|
+
require 'rest'
|
49
|
+
require 'json'
|
50
|
+
headers = { 'Content-Type' => 'application/json' }
|
51
|
+
response = REST.get(url, headers)
|
52
|
+
if response.ok?
|
53
|
+
body = JSON.parse(response.body)
|
54
|
+
body
|
55
|
+
else
|
56
|
+
CoreUI.warn "Request to #{url} failed - #{response.status_code}"
|
57
|
+
nil
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
data/ppdbiu.gemspec
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path("../lib", __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require "ppdbiu/version"
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "ppdbiu"
|
8
|
+
spec.version = Ppdbiu::VERSION
|
9
|
+
spec.authors = ["wanyakun"]
|
10
|
+
spec.email = ["wanyakun@vip.qq.com"]
|
11
|
+
|
12
|
+
spec.summary = %q{iOS应用依赖管理gem.}
|
13
|
+
spec.description = %q{用来处理iOS应用的CocoaPods依赖关系,根据远程依赖配置数据自动安装配置.}
|
14
|
+
spec.homepage = "http://github.com/wanyakun/ppdbiu."
|
15
|
+
spec.license = "MIT"
|
16
|
+
|
17
|
+
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
18
|
+
f.match(%r{^(test|spec|features)/})
|
19
|
+
end
|
20
|
+
spec.bindir = "exe"
|
21
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
22
|
+
spec.require_paths = ["lib"]
|
23
|
+
|
24
|
+
spec.add_dependency "cocoapods", '>= 1.1.1', '< 2.0'
|
25
|
+
|
26
|
+
spec.add_development_dependency "bundler", "~> 1.15"
|
27
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
28
|
+
end
|
metadata
ADDED
@@ -0,0 +1,104 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: ppdbiu
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- wanyakun
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2017-12-28 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: cocoapods
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 1.1.1
|
20
|
+
- - "<"
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: '2.0'
|
23
|
+
type: :runtime
|
24
|
+
prerelease: false
|
25
|
+
version_requirements: !ruby/object:Gem::Requirement
|
26
|
+
requirements:
|
27
|
+
- - ">="
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: 1.1.1
|
30
|
+
- - "<"
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '2.0'
|
33
|
+
- !ruby/object:Gem::Dependency
|
34
|
+
name: bundler
|
35
|
+
requirement: !ruby/object:Gem::Requirement
|
36
|
+
requirements:
|
37
|
+
- - "~>"
|
38
|
+
- !ruby/object:Gem::Version
|
39
|
+
version: '1.15'
|
40
|
+
type: :development
|
41
|
+
prerelease: false
|
42
|
+
version_requirements: !ruby/object:Gem::Requirement
|
43
|
+
requirements:
|
44
|
+
- - "~>"
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: '1.15'
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
name: rake
|
49
|
+
requirement: !ruby/object:Gem::Requirement
|
50
|
+
requirements:
|
51
|
+
- - "~>"
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '10.0'
|
54
|
+
type: :development
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
requirements:
|
58
|
+
- - "~>"
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: '10.0'
|
61
|
+
description: 用来处理iOS应用的CocoaPods依赖关系,根据远程依赖配置数据自动安装配置.
|
62
|
+
email:
|
63
|
+
- wanyakun@vip.qq.com
|
64
|
+
executables: []
|
65
|
+
extensions: []
|
66
|
+
extra_rdoc_files: []
|
67
|
+
files:
|
68
|
+
- ".gitignore"
|
69
|
+
- Gemfile
|
70
|
+
- Gemfile.lock
|
71
|
+
- LICENSE
|
72
|
+
- LICENSE.txt
|
73
|
+
- README.md
|
74
|
+
- Rakefile
|
75
|
+
- bin/console
|
76
|
+
- bin/setup
|
77
|
+
- lib/ppdbiu.rb
|
78
|
+
- lib/ppdbiu/version.rb
|
79
|
+
- ppdbiu.gemspec
|
80
|
+
homepage: http://github.com/wanyakun/ppdbiu.
|
81
|
+
licenses:
|
82
|
+
- MIT
|
83
|
+
metadata: {}
|
84
|
+
post_install_message:
|
85
|
+
rdoc_options: []
|
86
|
+
require_paths:
|
87
|
+
- lib
|
88
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
89
|
+
requirements:
|
90
|
+
- - ">="
|
91
|
+
- !ruby/object:Gem::Version
|
92
|
+
version: '0'
|
93
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
94
|
+
requirements:
|
95
|
+
- - ">="
|
96
|
+
- !ruby/object:Gem::Version
|
97
|
+
version: '0'
|
98
|
+
requirements: []
|
99
|
+
rubyforge_project:
|
100
|
+
rubygems_version: 2.5.1
|
101
|
+
signing_key:
|
102
|
+
specification_version: 4
|
103
|
+
summary: iOS应用依赖管理gem.
|
104
|
+
test_files: []
|