git-ready 0.8.15 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +33 -5
- data/VERSION +1 -1
- data/bin/git-ready +2 -2
- data/git-ready.gemspec +4 -4
- data/lib/git-ready/github.rb +3 -3
- data/lib/git-ready/interactive_setup/github_access_token.rb +3 -3
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 33a08835cf117c04cd6732fd5f3aaeb4be0d546c
|
4
|
+
data.tar.gz: e893faf2d83b3da4302aa2e7aa323c0cf54340db
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f094f1bc7a6c04da0692cec9e1ae69007b707cb12b34b624ca004dd3dd07460ce381559f88ddf0b8e025a417df69e9877058dd4666808cd8922b1687e9b90217
|
7
|
+
data.tar.gz: 8d905e2547104e576ad0c7446faea51747c63cb9452cc6b6914adaef4cb0089781f8597accc5779e7c142acc6d71bc3facf94502b3ad29c4fab21951695c86ca
|
data/README.md
CHANGED
@@ -2,15 +2,36 @@
|
|
2
2
|
|
3
3
|
git-ready is a tool for quickly joining an organization on GitHub.
|
4
4
|
|
5
|
-
|
6
|
-
|
5
|
+
Description
|
6
|
+
-----------
|
7
7
|
|
8
|
-
|
8
|
+
git-ready does three things.
|
9
|
+
1. Forks all repositories of the organization to your account.
|
10
|
+
2. Clones the forked repositories locally.
|
11
|
+
3. Configures an `upstream` remote for each repository, for convenient fetching.
|
9
12
|
|
10
|
-
|
13
|
+
It can be run again without concern. It will only fork and clone missing repositories.
|
14
|
+
|
15
|
+
Why would you want this?
|
11
16
|
------------------------
|
12
17
|
|
13
|
-
|
18
|
+
For a team that uses a Fork + Pull Request workflow, and has a large number of repositories, `git-ready` is a simple way to onboard new team members.
|
19
|
+
|
20
|
+
Example Workflow
|
21
|
+
----------------
|
22
|
+
|
23
|
+
1. Fork repository.
|
24
|
+
2. Make changes.
|
25
|
+
3. Test changes.
|
26
|
+
4. Push changes to `origin`
|
27
|
+
5. Submit Pull Request to `upstream`
|
28
|
+
6. Code Review
|
29
|
+
7. Merge
|
30
|
+
|
31
|
+
Installation
|
32
|
+
------------
|
33
|
+
|
34
|
+
`gem install git-ready`
|
14
35
|
|
15
36
|
Usage
|
16
37
|
-----
|
@@ -33,6 +54,13 @@ If your GitHub account uses 2-Factor Authentication, git-ready will prompt you f
|
|
33
54
|
|
34
55
|
If you would prefer to set up an auth token manually, that is supported too.
|
35
56
|
|
57
|
+
OSX Installation Issues?
|
58
|
+
------------------------
|
59
|
+
|
60
|
+
One of the gems used by git-ready ([Rugged](https://github.com/libgit2/rugged)), requires `cmake` and `libgit2` to build. On OSX, this isn't installed by default, but can easily be resolved with `brew install cmake`, `brew install libgit2 --with-libssh2` .
|
61
|
+
|
62
|
+
Also, private key has to be registered in keychain in order to repo cloning works.
|
63
|
+
|
36
64
|
License
|
37
65
|
-------
|
38
66
|
[MIT](https://tldrlegal.com/license/mit-license)
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.9.0
|
data/bin/git-ready
CHANGED
@@ -8,11 +8,11 @@ if ARGV.empty? || %w(-h --help help).include?(ARGV.first)
|
|
8
8
|
abort
|
9
9
|
end
|
10
10
|
|
11
|
-
organization = ARGV.first
|
11
|
+
organization, filter = ARGV.first(2)
|
12
12
|
username = GitHub.api.user[:login]
|
13
13
|
|
14
14
|
Announce.info "Forking all #{organization} repositories to #{username}"
|
15
|
-
repositories = GitHub.fork_all organization
|
15
|
+
repositories = GitHub.fork_all organization, filter
|
16
16
|
|
17
17
|
Announce.info "Cloning all forked repositories into #{Settings.workspace}"
|
18
18
|
Workspace.setup repositories
|
data/git-ready.gemspec
CHANGED
@@ -2,16 +2,16 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: git-ready 0.
|
5
|
+
# stub: git-ready 0.9.0 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "git-ready"
|
9
|
-
s.version = "0.
|
9
|
+
s.version = "0.9.0"
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
12
12
|
s.require_paths = ["lib"]
|
13
13
|
s.authors = ["Chris Olstrom"]
|
14
|
-
s.date = "
|
14
|
+
s.date = "2016-02-11"
|
15
15
|
s.description = "git-ready gets you ready to work with an established team that already uses GitHub."
|
16
16
|
s.email = "chris@olstrom.com"
|
17
17
|
s.executables = ["git-ready"]
|
@@ -43,7 +43,7 @@ Gem::Specification.new do |s|
|
|
43
43
|
]
|
44
44
|
s.homepage = "http://github.com/colstrom/git-ready"
|
45
45
|
s.licenses = ["MIT"]
|
46
|
-
s.rubygems_version = "2.
|
46
|
+
s.rubygems_version = "2.5.1"
|
47
47
|
s.summary = "git-ready gets you ready to work with an established team that already uses GitHub."
|
48
48
|
s.test_files = ["spec/git-ready_spec.rb", "spec/spec_helper.rb"]
|
49
49
|
|
data/lib/git-ready/github.rb
CHANGED
@@ -6,9 +6,9 @@ require_relative 'settings'
|
|
6
6
|
module GitHub
|
7
7
|
include Contracts
|
8
8
|
|
9
|
-
Contract String => ArrayOf[({ upstream: Sawyer::Resource, origin: Sawyer::Resource })]
|
10
|
-
def self.fork_all(organization)
|
11
|
-
repositories = api.org_repos
|
9
|
+
Contract String, String => ArrayOf[({ upstream: Sawyer::Resource, origin: Sawyer::Resource })]
|
10
|
+
def self.fork_all(organization, filter=nil)
|
11
|
+
repositories = api.org_repos(organization).select { |repository| repository.name.include? filter }
|
12
12
|
progress = ProgressBar.new repositories.length
|
13
13
|
repositories.flat_map do |repository|
|
14
14
|
progress.increment!
|
@@ -35,12 +35,12 @@ module InteractiveSetup
|
|
35
35
|
|
36
36
|
Contract None => String
|
37
37
|
def self.ask_password
|
38
|
-
password = ask('Enter your GitHub password:') { |
|
38
|
+
password = ask('Enter your GitHub password:') { |input| input.echo = '*' }
|
39
39
|
password.empty? ? ask_password : password
|
40
40
|
end
|
41
41
|
|
42
42
|
Contract String, String, Hash, Bool => Hash
|
43
|
-
def self.generate(login, password, headers = {}, first_attempt
|
43
|
+
def self.generate(login, password, headers = {}, first_attempt: true)
|
44
44
|
github = Octokit::Client.new login: login, password: password
|
45
45
|
github.create_authorization(note: 'git-ready',
|
46
46
|
scopes: ['repo'],
|
@@ -51,7 +51,7 @@ module InteractiveSetup
|
|
51
51
|
if first_attempt
|
52
52
|
Announce.warning 'Found an old token. Replacing it.'
|
53
53
|
delete_existing_authorization github, headers
|
54
|
-
generate login, password, headers, false
|
54
|
+
generate login, password, headers, first_attempt: false
|
55
55
|
else
|
56
56
|
Announce.failure "It looked like you had already issued a token, but deleting it didn't help. You're on your own at this point. You should should use the link at the start to generate a token manually."
|
57
57
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: git-ready
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Olstrom
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-02-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: contracts
|
@@ -270,7 +270,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
270
270
|
version: '0'
|
271
271
|
requirements: []
|
272
272
|
rubyforge_project:
|
273
|
-
rubygems_version: 2.
|
273
|
+
rubygems_version: 2.5.1
|
274
274
|
signing_key:
|
275
275
|
specification_version: 4
|
276
276
|
summary: git-ready gets you ready to work with an established team that already uses
|
@@ -278,3 +278,4 @@ summary: git-ready gets you ready to work with an established team that already
|
|
278
278
|
test_files:
|
279
279
|
- spec/git-ready_spec.rb
|
280
280
|
- spec/spec_helper.rb
|
281
|
+
has_rdoc:
|