github-backups 0.3.2 → 0.3.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/README.mkd CHANGED
@@ -17,7 +17,6 @@ Usage: github-backup -u [username] -o [dir]
17
17
  e.g
18
18
  github-backup -u hbt -o /tmp
19
19
 
20
- -e, --email EMAIL Optional: GitHub email/username. Required for private repos
21
20
  -p, --password PASSWORD Optional: GitHub password. Required for private repos
22
21
  -u, --username USERNAME *Required: GitHub username
23
22
  -o, --output-dir DIR *Required: Backup directory
@@ -36,3 +35,7 @@ github-backup -u hbt -o /tmp
36
35
  Copyright (c) 2012 hbt. See LICENSE.txt for
37
36
  further details.
38
37
 
38
+
39
+
40
+ [![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/hbt/github-backup/trend.png)](https://bitdeli.com/free "Bitdeli Badge")
41
+
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.2
1
+ 0.3.3
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "github-backups"
8
- s.version = "0.3.2"
8
+ s.version = "0.3.3"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["hbt"]
data/lib/github/repos.rb CHANGED
@@ -11,7 +11,12 @@ module GitHubBackup
11
11
  def backup_repos()
12
12
  # get all repos
13
13
  (1..100).each do |i|
14
- repos = json("/users/#{opts[:username]}/repos?page=#{i}per_page=100")
14
+ if opts[:passwd]
15
+ url ="/user/repos"
16
+ else
17
+ url = "/users/#{opts[:username]}/repos"
18
+ end
19
+ repos = json("#{url}?page=#{i}per_page=100")
15
20
  repos.each do |f|
16
21
  # do we limit to a specific repo?
17
22
  next unless f['name'] == opts[:reponame] if opts[:reponame]
data/lib/utils/options.rb CHANGED
@@ -13,10 +13,6 @@ module GitHubBackup
13
13
  e.g
14
14
  github-backup -u hbt -o /tmp \n\n"
15
15
 
16
- opts.on( '-e', '--email EMAIL', 'Optional: GitHub email/username. Required for private repos') do |f|
17
- self.options[:email] = f
18
- end
19
-
20
16
  opts.on( '-p', '--password PASSWORD', 'Optional: GitHub password. Required for private repos') do |f|
21
17
  self.options[:passwd] = f
22
18
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: github-backups
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.3.2
5
+ version: 0.3.3
6
6
  platform: ruby
7
7
  authors:
8
8
  - hbt