gitbak 0.4.2 → 0.4.3

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -2,10 +2,10 @@
2
2
 
3
3
  File : README
4
4
  Maintainer : Felix C. Stegerman <flx@obfusk.net>
5
- Date : 2013-03-20
5
+ Date : 2013-04-21
6
6
 
7
7
  Copyright : Copyright (C) 2013 Felix C. Stegerman
8
- Version : v0.4.2
8
+ Version : v0.4.3
9
9
 
10
10
  <!-- }}}1 -->
11
11
 
@@ -2,7 +2,7 @@
2
2
  #
3
3
  # File : gitbak/services.rb
4
4
  # Maintainer : Felix C. Stegerman <flx@obfusk.net>
5
- # Date : 2013-03-20
5
+ # Date : 2013-04-21
6
6
  #
7
7
  # Copyright : Copyright (C) 2013 Felix C. Stegerman
8
8
  # Licence : GPLv2
@@ -77,7 +77,7 @@ module GitBak
77
77
 
78
78
  # get data from API
79
79
  # @raise AuthError on 401
80
- def self.api_get_ (url, auth) # {{{1
80
+ def self.api_get_ (url, auth, service, user) # {{{1
81
81
  opts = auth ? { AUTH => [auth[:user], auth[:pass]] } : {}
82
82
 
83
83
  begin
@@ -105,10 +105,10 @@ module GitBak
105
105
  # @return [String]
106
106
  # @return [<String>] if paginated
107
107
  def self.api_get (service, user, auth)
108
+ get = ->(u) { api_get_ u, auth, service, user }
108
109
  url = "https://#{APIS[service][user]}"
109
110
  pag = PAGES[service]
110
- pag ? paginate(pag, url) { |u| api_get_ u, auth }
111
- : api_get_(url, auth)
111
+ pag ? paginate(pag, url) { |u| get[u] } : get[url]
112
112
  end
113
113
 
114
114
  # get repositories from service; uses api_get if service in APIS,
@@ -1,7 +1,7 @@
1
1
  module GitBak
2
2
  # version and ...
3
- VERSION = '0.4.2'
3
+ VERSION = '0.4.3'
4
4
 
5
5
  # ... date (for gemspec) ;-)
6
- DATE = '2013-03-20'
6
+ DATE = '2013-04-21'
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gitbak
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.2
4
+ version: 0.4.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-03-20 00:00:00.000000000 Z
12
+ date: 2013-04-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: json
16
- requirement: &16348360 !ruby/object:Gem::Requirement
16
+ requirement: &17607720 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,7 +21,7 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *16348360
24
+ version_requirements: *17607720
25
25
  description: ! 'GitBak mirrors Bitbucket/GitHub/Gist repositories; paths, users,
26
26
 
27
27
  and authentication are specified in ~/.gitbak.