cocoapods-downloader 1.2.1 → 1.2.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.
Potentially problematic release.
This version of cocoapods-downloader might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/lib/cocoapods-downloader/gem_version.rb +1 -1
- data/lib/cocoapods-downloader/remote_file.rb +14 -17
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cf1fa4c5fb3da8df7c444f32589cb2df38e60c2eebe18f8e7ebcff0ee50bcbb7
|
4
|
+
data.tar.gz: 24d3fe5d0ddbf3e5638c5781cfd09490864f4d4e673c2140de67560e819afb10
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bddb10ca07f8081a4f0cef416bf150b623472d81b9dbb096d854ec5a810dd30709b63a6d4c2b487b9e617a80cc34fe20191bc0193bc37aa496a36b003baa8e93
|
7
|
+
data.tar.gz: 6488ab1e8081b6b24f98fb519d259e6da8d709158d645abfaf7f732749ab942c994ba4f8e93d3337e024d27854bcf9149b01271da55fe77ecc3474b050780f46
|
@@ -1,6 +1,6 @@
|
|
1
|
-
require 'zlib'
|
2
1
|
require 'fileutils'
|
3
2
|
require 'uri'
|
3
|
+
require 'zlib'
|
4
4
|
|
5
5
|
module Pod
|
6
6
|
module Downloader
|
@@ -21,7 +21,7 @@ module Pod
|
|
21
21
|
|
22
22
|
def download!
|
23
23
|
@filename = filename_with_type(type)
|
24
|
-
@download_path =
|
24
|
+
@download_path = target_path + @filename
|
25
25
|
download_file(@download_path)
|
26
26
|
verify_checksum(@download_path)
|
27
27
|
extract_with_type(@download_path, type)
|
@@ -44,7 +44,7 @@ module Pod
|
|
44
44
|
#
|
45
45
|
def should_flatten?
|
46
46
|
if options.key?(:flatten)
|
47
|
-
|
47
|
+
options[:flatten]
|
48
48
|
elsif [:tgz, :tar, :tbz, :txz].include?(type)
|
49
49
|
true # those archives flatten by default
|
50
50
|
else
|
@@ -71,18 +71,8 @@ module Pod
|
|
71
71
|
|
72
72
|
def filename_with_type(type = :zip)
|
73
73
|
case type
|
74
|
-
when :zip
|
75
|
-
|
76
|
-
when :tgz
|
77
|
-
'file.tgz'
|
78
|
-
when :tar
|
79
|
-
'file.tar'
|
80
|
-
when :tbz
|
81
|
-
'file.tbz'
|
82
|
-
when :txz
|
83
|
-
'file.txz'
|
84
|
-
when :dmg
|
85
|
-
'file.dmg'
|
74
|
+
when :zip, :tgz, :tar, :tbz, :txz, :dmg
|
75
|
+
"file.#{type}"
|
86
76
|
else
|
87
77
|
raise UnsupportedFileTypeError, "Unsupported file type: #{type}"
|
88
78
|
end
|
@@ -95,6 +85,7 @@ module Pod
|
|
95
85
|
def extract_with_type(full_filename, type = :zip)
|
96
86
|
unpack_from = full_filename
|
97
87
|
unpack_to = @target_path
|
88
|
+
|
98
89
|
case type
|
99
90
|
when :zip
|
100
91
|
unzip! unpack_from, '-d', unpack_to
|
@@ -116,11 +107,17 @@ module Pod
|
|
116
107
|
# contents to the target (#727)
|
117
108
|
#
|
118
109
|
if should_flatten?
|
119
|
-
contents =
|
110
|
+
contents = target_path.children
|
120
111
|
contents.delete(target_path + @filename)
|
121
112
|
entry = contents.first
|
122
113
|
if contents.count == 1 && entry.directory?
|
123
|
-
|
114
|
+
tmp_entry = entry.sub_ext("#{entry.extname}.tmp")
|
115
|
+
begin
|
116
|
+
FileUtils.move(entry, tmp_entry)
|
117
|
+
FileUtils.move(tmp_entry.children, target_path)
|
118
|
+
ensure
|
119
|
+
FileUtils.remove_entry(tmp_entry)
|
120
|
+
end
|
124
121
|
end
|
125
122
|
end
|
126
123
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cocoapods-downloader
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eloy Duran
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2018-
|
12
|
+
date: 2018-10-16 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description:
|
15
15
|
email:
|
@@ -33,7 +33,7 @@ files:
|
|
33
33
|
- lib/cocoapods-downloader/remote_file.rb
|
34
34
|
- lib/cocoapods-downloader/scp.rb
|
35
35
|
- lib/cocoapods-downloader/subversion.rb
|
36
|
-
homepage: https://github.com/CocoaPods/
|
36
|
+
homepage: https://github.com/CocoaPods/cocoapods-downloader
|
37
37
|
licenses:
|
38
38
|
- MIT
|
39
39
|
metadata: {}
|
@@ -53,7 +53,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
53
53
|
version: '0'
|
54
54
|
requirements: []
|
55
55
|
rubyforge_project:
|
56
|
-
rubygems_version: 2.7.
|
56
|
+
rubygems_version: 2.7.7
|
57
57
|
signing_key:
|
58
58
|
specification_version: 3
|
59
59
|
summary: A small library for downloading files from remotes in a folder.
|