backup_on_the_go 0.1.3 → 0.1.4
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.
- checksums.yaml +8 -8
- data/lib/backup_on_the_go.rb +5 -4
- data/lib/backup_on_the_go/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
YWY0Y2U5YzU0ZDQyODVjZTBhZWYxMmEwMzU2ZDIyOTkzN2RkN2Q4OA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZThhYTRkZDRkMzIzNzc2YTYzMzQ1MmI2ODc3MDJmNWExMDU1ODg3NA==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZTU0ZDk3NmEzYmZiYWUxMmYwN2ZlMWI5ZGJlYmEzMTRlNDZjYTEyMmQzYzk4
|
10
|
+
ZDI4MmQzMmM0NmZkMDlmNzhkMzllNjAzOTc3MGZiZTgyYjhkMDAyMTY3Mjcz
|
11
|
+
YzYwMjBhY2NlOTMzZjRhNTExMWRhMzU1YzBkNzE2MjA5OTBiZDk=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ZTJiZDg3YzU0NzY4MmFhNjM0YmRkNjlmNzc1YzM2MWJmOGM0ZDA2MjM3ZjUz
|
14
|
+
MzhiMDcwOGExOGM3MGI4NTc4ZjJlMzFhNGFjNmM2ZTg3ZGYyZjk1MjQ3ZTFl
|
15
|
+
MDgyODZhZjRjMTlhNjVhYTAxMjk3NGM4ZTg1NjI3MzQzNmZkODc=
|
data/lib/backup_on_the_go.rb
CHANGED
@@ -13,7 +13,7 @@ module BackupOnTheGo #:nodoc:#
|
|
13
13
|
:backup_fork => false,
|
14
14
|
:git_cmd => 'git',
|
15
15
|
:is_private => true,
|
16
|
-
:
|
16
|
+
:no_public_forks => true,
|
17
17
|
:repo_prefix => 'backup-on-the-go-',
|
18
18
|
:verbose => true
|
19
19
|
}.freeze
|
@@ -29,7 +29,7 @@ module BackupOnTheGo #:nodoc:#
|
|
29
29
|
# * <tt>:github_repos_owner</tt> - Optional string - The owner of the repositories that need to be backed up. The owner could be an organization. If not specified, <tt>:github_user</tt> will be used.
|
30
30
|
# * <tt>:github_user</tt> - *Required* string if <tt>:user</tt> is not specified - The user name on GitHub. If not specified, <tt>:user</tt> will be used.
|
31
31
|
# * <tt>:is_private</tt> - Optional boolean - <tt>true</tt> to make the backup repositories private, <tt>false</tt> to make them public. Default is <tt>true</tt>.
|
32
|
-
# * <tt>:
|
32
|
+
# * <tt>:no_public_forks</tt> - Optional boolean - <tt>true</tt> to forbid public fork for the backup repositories, <tt>false</tt> to allow public fork. Default is <tt>true</tt>.
|
33
33
|
# * <tt>:repo_prefix</tt> - Optional string - The prefix you wanna prepend to the backup repository names. In this way, if you have a repository with the same name on BitBucket, it won't get flushed. Default is <tt>"backup-on-the-go-"</tt>.
|
34
34
|
# * <tt>:user</tt> - *Required* string if <tt>:github_user</tt> and <tt>:bitbucket_user</tt> are not both specified - The user name of GitHub and BitBucket (if they are same for you). If you want to use different user names on GitHub and BitBucket, please specify <tt>:github_user</tt> and <tt>:bitbucket_user</tt> instead.
|
35
35
|
# * <tt>:verbose</tt> - Optional boolean - <tt>true</tt> to print additional information and <tt>false</tt> to suppress them. Default is <tt>true</tt>.
|
@@ -105,7 +105,7 @@ module BackupOnTheGo #:nodoc:#
|
|
105
105
|
puts "Creating new repository #{config[:bitbucket_repos_owner]}/#{backup_repo_name}..." if config[:verbose]
|
106
106
|
begin
|
107
107
|
bb.repos.create :name => backup_repo_name, :owner => config[:bitbucket_repos_owner],
|
108
|
-
:scm => 'git', :is_private => config[:is_private], :
|
108
|
+
:scm => 'git', :is_private => config[:is_private], :no_public_forks => config[:no_public_forks]
|
109
109
|
rescue
|
110
110
|
puts_warning "Creation of repository #{config[:bitbucket_repos_owner]}/#{backup_repo_name} failed."
|
111
111
|
end
|
@@ -117,7 +117,8 @@ module BackupOnTheGo #:nodoc:#
|
|
117
117
|
bb.repos.edit config[:bitbucket_repos_owner], backup_repo_name,
|
118
118
|
:website => repo.homepage,
|
119
119
|
:description => repo.description,
|
120
|
-
:is_private => config[:is_private]
|
120
|
+
:is_private => config[:is_private],
|
121
|
+
:no_public_forks => config[:no_public_forks]
|
121
122
|
rescue
|
122
123
|
puts_warning "Failed to update information for #{config[:bitbucket_repos_owner]}/#{backup_repo_name}"
|
123
124
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: backup_on_the_go
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Hong Xu
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-04-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: github_api
|