cocoapods-downloader 0.1.2 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of cocoapods-downloader might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/README.markdown +1 -0
- data/lib/cocoapods-downloader.rb +2 -0
- data/lib/cocoapods-downloader/bazaar.rb +52 -0
- data/lib/cocoapods-downloader/gem_version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9f4fdbbb29154dc5260ad4fc96259ae2dcb2a653
|
4
|
+
data.tar.gz: 7c556a0405504fecd5f92f3678632ac6a221a4e1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 31968f600258ee45c47e21f34d2e5f7322c9eb98ac10d5a7c1f3539a473b194a7d74b8ba6cac74dda7ebf8f1d7d41a3e8629e57fb1619af9494f45d0e5d7ca0f
|
7
|
+
data.tar.gz: 3bd15c606b2ef46488d4bc01e1d228de1582835f592d87b76b9eefef2e53e77835ad24cb2f9f4e2c522e018aff13a3ac3826d1b6c27d36c669e29b27d8c588d5
|
data/README.markdown
CHANGED
data/lib/cocoapods-downloader.rb
CHANGED
@@ -16,12 +16,14 @@ module Pod
|
|
16
16
|
require 'cocoapods-downloader/mercurial'
|
17
17
|
require 'cocoapods-downloader/subversion'
|
18
18
|
require 'cocoapods-downloader/http'
|
19
|
+
require 'cocoapods-downloader/bazaar'
|
19
20
|
|
20
21
|
{
|
21
22
|
:git => Git,
|
22
23
|
:hg => Mercurial,
|
23
24
|
:svn => Subversion,
|
24
25
|
:http => Http,
|
26
|
+
:bzr => Bazaar,
|
25
27
|
}
|
26
28
|
end
|
27
29
|
|
@@ -0,0 +1,52 @@
|
|
1
|
+
module Pod
|
2
|
+
module Downloader
|
3
|
+
class Bazaar < Base
|
4
|
+
|
5
|
+
def self.options
|
6
|
+
[:revision, :tag]
|
7
|
+
end
|
8
|
+
|
9
|
+
def options_specific?
|
10
|
+
!options[:revision].nil?
|
11
|
+
end
|
12
|
+
|
13
|
+
def checkout_options
|
14
|
+
Dir.chdir(target_path) do
|
15
|
+
options = {}
|
16
|
+
options[:bzr] = url
|
17
|
+
options[:revision] = `bzr revno`.chomp
|
18
|
+
options
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
private
|
23
|
+
|
24
|
+
executable :bzr
|
25
|
+
|
26
|
+
def download!
|
27
|
+
if options[:tag]
|
28
|
+
download_revision!(options[:tag])
|
29
|
+
elsif options[:revision]
|
30
|
+
download_revision!(options[:revision])
|
31
|
+
else
|
32
|
+
download_head!
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
def download_head!
|
37
|
+
bzr! %|branch "#{url}" #{dir_opts} "#{target_path}"|
|
38
|
+
end
|
39
|
+
|
40
|
+
def download_revision!(rev)
|
41
|
+
bzr! %|branch "#{url}" #{dir_opts} -r '#{rev}' "#{target_path}"|
|
42
|
+
end
|
43
|
+
|
44
|
+
def dir_opts
|
45
|
+
return '--use-existing-dir' if @target_path.exist?
|
46
|
+
''
|
47
|
+
end
|
48
|
+
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
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: 0.
|
4
|
+
version: 0.2.0
|
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: 2013-
|
12
|
+
date: 2013-09-04 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description:
|
15
15
|
email:
|
@@ -22,6 +22,7 @@ files:
|
|
22
22
|
- lib/cocoapods-downloader/api.rb
|
23
23
|
- lib/cocoapods-downloader/api_exposable.rb
|
24
24
|
- lib/cocoapods-downloader/base.rb
|
25
|
+
- lib/cocoapods-downloader/bazaar.rb
|
25
26
|
- lib/cocoapods-downloader/gem_version.rb
|
26
27
|
- lib/cocoapods-downloader/git.rb
|
27
28
|
- lib/cocoapods-downloader/http.rb
|