gh_backup 0.0.2 → 0.0.3
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.
- data/Gemfile.lock +1 -1
- data/lib/gh_backup/version.rb +1 -1
- data/lib/gh_backup.rb +4 -2
- metadata +4 -4
data/Gemfile.lock
CHANGED
data/lib/gh_backup/version.rb
CHANGED
data/lib/gh_backup.rb
CHANGED
@@ -6,6 +6,8 @@ require "thor"
|
|
6
6
|
module GhBackup
|
7
7
|
|
8
8
|
class Base
|
9
|
+
|
10
|
+
REPO_LIMIT = 100
|
9
11
|
|
10
12
|
def initialize(color=true)
|
11
13
|
@color = color
|
@@ -74,7 +76,7 @@ module GhBackup
|
|
74
76
|
end
|
75
77
|
|
76
78
|
# Returns an array of all the repos for an organization
|
77
|
-
def list_org_repos(org, user, password, limit=
|
79
|
+
def list_org_repos(org, user, password, limit=REPO_LIMIT)
|
78
80
|
auth = "#{user}:#{password}"
|
79
81
|
path = "https://api.github.com/orgs/#{org}/repos?per_page=#{limit}"
|
80
82
|
repos = `curl -u #{auth} #{path}`
|
@@ -84,7 +86,7 @@ module GhBackup
|
|
84
86
|
end
|
85
87
|
|
86
88
|
# You can download the repos directly without having to save to YAML
|
87
|
-
def clone_org_repos(org, user, password, limit=
|
89
|
+
def clone_org_repos(org, user, password, limit=REPO_LIMIT)
|
88
90
|
all_repos = list_org_repos(org, user, password, limit)
|
89
91
|
repo_count = all_repos.length
|
90
92
|
all_repos.each_with_index.map do |repo, i|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gh_backup
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-02-
|
12
|
+
date: 2013-02-11 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: thor
|
@@ -76,7 +76,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
76
76
|
version: '0'
|
77
77
|
segments:
|
78
78
|
- 0
|
79
|
-
hash:
|
79
|
+
hash: 3037816851057678351
|
80
80
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
81
81
|
none: false
|
82
82
|
requirements:
|
@@ -85,7 +85,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
85
85
|
version: '0'
|
86
86
|
segments:
|
87
87
|
- 0
|
88
|
-
hash:
|
88
|
+
hash: 3037816851057678351
|
89
89
|
requirements: []
|
90
90
|
rubyforge_project:
|
91
91
|
rubygems_version: 1.8.23
|