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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2bb6603dfac244bd22a6fbeb5bd5739b1a037e61
4
- data.tar.gz: 8bbcdc339f6ce129704084b6350cd097d4104bcd
3
+ metadata.gz: 9f4fdbbb29154dc5260ad4fc96259ae2dcb2a653
4
+ data.tar.gz: 7c556a0405504fecd5f92f3678632ac6a221a4e1
5
5
  SHA512:
6
- metadata.gz: 3991548c90380f032b1ba9629a8c2c0225bfc535f9a6ce335ea4e834c7605852db84584f5d55b46207b75a51ce1741e109f29a14e59f2eba7cc68fb997be308c
7
- data.tar.gz: 8bff26624317c5c2acba439424b1fdb577146fc423bc83546d166daafd7eb6cb1412d351384942fa1510e214102ea464717a7238102ddf60024426c1c0be697e
6
+ metadata.gz: 31968f600258ee45c47e21f34d2e5f7322c9eb98ac10d5a7c1f3539a473b194a7d74b8ba6cac74dda7ebf8f1d7d41a3e8629e57fb1619af9494f45d0e5d7ca0f
7
+ data.tar.gz: 3bd15c606b2ef46488d4bc01e1d228de1582835f592d87b76b9eefef2e53e77835ad24cb2f9f4e2c522e018aff13a3ac3826d1b6c27d36c669e29b27d8c588d5
@@ -29,6 +29,7 @@ The downloader class supports the following option keys:
29
29
 
30
30
  - git: commit, tag, branch, submodules
31
31
  - hg: revision
32
+ - bzr: revision, tag
32
33
  - svn: revision, tag, folder
33
34
  - http: type
34
35
 
@@ -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
+
@@ -4,7 +4,7 @@ module Pod
4
4
  # @return [String] Downloader’s version, following
5
5
  # [semver](http://semver.org).
6
6
  #
7
- VERSION = '0.1.2'
7
+ VERSION = '0.2.0'
8
8
 
9
9
  end
10
10
  end
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.1.2
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-08-02 00:00:00.000000000 Z
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