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 +2 -2
- data/lib/gitbak/services.rb +4 -4
- data/lib/gitbak/version.rb +2 -2
- metadata +4 -4
data/README.md
CHANGED
data/lib/gitbak/services.rb
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
#
|
3
3
|
# File : gitbak/services.rb
|
4
4
|
# Maintainer : Felix C. Stegerman <flx@obfusk.net>
|
5
|
-
# Date : 2013-
|
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)
|
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|
|
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,
|
data/lib/gitbak/version.rb
CHANGED
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.
|
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-
|
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: &
|
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: *
|
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.
|