cocoapods-backup 0.0.1 → 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3c8e8a2520d726075bedfd23e9059a1e204b99136beb907e73d66a452ca11410
4
- data.tar.gz: b75a8de0364f881e6112c1473f0e482cfd4b456824edcf953b172b314dc84c00
3
+ metadata.gz: e40ee550d5e3b54a32979395f793a0e195a5261971b937ffa0d69c763b6fd2b4
4
+ data.tar.gz: 184d4cb4c44df76af2b6f30ff9302b742505586cd402ea00eb1f03b820be3cf3
5
5
  SHA512:
6
- metadata.gz: e9e6ad51d5f888bffa9820a144ed99ad96a197404a53c01de5a7d64cbd8a8037473849eb19f119fe740d4ba5055fb89f2202eb6a907720c318fdb236f122271b
7
- data.tar.gz: 7d43f29d112a47860a21bd27392e444314cdcb8ab06ee9f8c9a2ae18b7278b1864e83ccf27665d3f2d7a766dba24cf15fd845138a6cc375709c6daeb05e25502
6
+ metadata.gz: a611f08b9538105dede08eee66a6aa947217f241856d7e09c1757934b0625905a4e0733281b4813eac11e98c7ee1b42d7aafd0c261743e2b63d181013f59a3bf
7
+ data.tar.gz: c4c419b1d447b9c49e07508766f3876f1b24cc00d74bd9c79a96d0c77124146dc09560b19e026e6107841e908fe10b436d1d78f6e809e085fba4215fde2d0de1
@@ -0,0 +1,10 @@
1
+ [bumpversion]
2
+ current_version = 0.0.2
3
+ commit = True
4
+ tag = True
5
+ tag_name = {new_version}
6
+
7
+ [bumpversion:file:cocoapods-backup.gemspec]
8
+
9
+ [bumpversion:file:lib/cocoapods-backup/gem_version.rb]
10
+
data/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # cocoapods-backup
2
2
 
3
+ [中文版 README](README_CN.md)
4
+
3
5
  A description of cocoapods-backup.
4
6
 
5
7
  ## Installation
@@ -0,0 +1,32 @@
1
+ # cocoapods-backup
2
+
3
+ [README in English](README.md)
4
+
5
+ [cocoapods-backup](https://rubygems.org/gems/cocoapods-backup) 是一个帮助你简单「备份」Pod 以运行的 CocoaPods 插件。
6
+
7
+ ## 用途
8
+
9
+ 当我们在 `Podfile` 中声明一个 `pod 'SomePod'` 时,表示我们需要引入该 Pod 并集成至相应的 Targe;当执行 `pod install` 时,CocoaPods 将执行解析依赖关系、下载依赖、校验 Target、生成 Pods 工程等步骤。这时如果无法连接到网络(或者远程库在不便于连接的内网),那么使用该插件即可将原本联网获取的 Pod 库通过**本地路径**依赖。
10
+
11
+ ## 安装
12
+
13
+ 您可以直接安装该插件:
14
+
15
+ ```shell
16
+ $ gem install cocoapods-backup
17
+ ```
18
+
19
+ 亦可将其声明在您所在项目的 `Gemfile` 中:
20
+
21
+ ```ruby
22
+ gem 'cocoapods-backup'
23
+ ```
24
+
25
+ ## 使用
26
+
27
+ ```ruby
28
+ pod 'AFNetworking',
29
+ :git => 'git@github.com:AFNetworking/AFNetworking.git',
30
+ :tag => '2.6.3',
31
+ :backup => true # 标志该 Pod 优先以本地备份源码为主
32
+ ```
@@ -5,7 +5,7 @@ require 'cocoapods-backup/gem_version.rb'
5
5
 
6
6
  Gem::Specification.new do |spec|
7
7
  spec.name = 'cocoapods-backup'
8
- spec.version = '0.0.1'
8
+ spec.version = '0.0.2'
9
9
  spec.authors = ['kingcos']
10
10
  spec.email = ['2821836721v@gmail.com']
11
11
  spec.description = %q{Using current sources for your pods.}
@@ -17,17 +17,20 @@ module Pod
17
17
  sandbox = Config.instance.sandbox
18
18
 
19
19
  if should_backup
20
+ # 0. Fixed when subspec (eg. pod 'OHHTTPStubs/Swift', only OHHTTPStubs.podspec.json exists)
21
+ pod_name = name.split("/")[0]
22
+
20
23
  # 1. Finding MyPod.podspec.json
21
- podspec_json_filename = "#{name}.podspec.json"
24
+ podspec_json_filename = "#{pod_name}.podspec.json"
22
25
  # /Users/kingcos/Project/Pods/Local Podspecs/MyPod.podspec.json
23
26
  podspec_json_org_path = sandbox.specifications_root + podspec_json_filename
24
27
  # /Users/kingcos/Project/Pods/MyPod
25
- pod_source_path = sandbox.sources_root + name
28
+ pod_source_path = sandbox.sources_root + pod_name
26
29
  # /Users/kingcos/Project/Pods/MyPod/MyPod.podspec.json
27
30
  podspec_json_dest_path = pod_source_path + podspec_json_filename
28
31
 
29
32
  if !podspec_json_org_path.exist?
30
- Pod::UI.warn "[Skipped] Cannot finding #{name}.podspec.json in #{sandbox.specifications_root}"
33
+ Pod::UI.warn "[Skipped] Cannot finding #{pod_name}.podspec.json in #{sandbox.specifications_root}"
31
34
 
32
35
  pod_method.bind(self).(name, *args)
33
36
  return
@@ -1,3 +1,3 @@
1
1
  module CocoapodsBackup
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cocoapods-backup
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - kingcos
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-02-26 00:00:00.000000000 Z
11
+ date: 2020-03-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -45,10 +45,12 @@ executables: []
45
45
  extensions: []
46
46
  extra_rdoc_files: []
47
47
  files:
48
+ - ".bumpversion.cfg"
48
49
  - ".gitignore"
49
50
  - Gemfile
50
51
  - LICENSE.txt
51
52
  - README.md
53
+ - README_CN.md
52
54
  - Rakefile
53
55
  - cocoapods-backup.gemspec
54
56
  - lib/cocoapods-backup.rb