makers_toolbelt 0.0.4 → 0.0.5
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 +4 -4
- data/lib/makers_toolbelt/fetch_pull_requests.rb +5 -2
- data/lib/makers_toolbelt.rb +4 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5db714852529340c296b3e477d60997bdb0eaae2
|
4
|
+
data.tar.gz: 6eeb92d2416e707edfc7403b9efc7d6a7d3a9479
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9065f2fae4f856f20f7d2c7b163c3eaa8e195552fca263eb5bb20d06e212d1bf4e25f32a95a492bee0287b6a1589225ce575a1bfa9298708406cbac1679006f6
|
7
|
+
data.tar.gz: d2d5de3a8a6826a778f739abff5d73a0fdc4941b0d1a76243f046d6bd9259659a3b2de4ee006c0cb9a218373afd73dc6948f213172330e06972a2cd44d98c3a1
|
@@ -5,6 +5,8 @@ module MakersToolbelt
|
|
5
5
|
OPEN_SWITCHES = ['-a', '--all', '-o', '--open']
|
6
6
|
CLOSED_SWITCHES = ['-a', '--all', '-c', '--closed']
|
7
7
|
|
8
|
+
GITHUB_REMOTE_REGEX = /github\.com(?::|\/)?(.+\/[\w\-]+)(?:\.git|\/)?\n/
|
9
|
+
|
8
10
|
attr_reader :options, :filter
|
9
11
|
|
10
12
|
def initialize(options = {})
|
@@ -19,7 +21,6 @@ module MakersToolbelt
|
|
19
21
|
|
20
22
|
pulls.flatten!.select! {|p| p.head.repo }
|
21
23
|
|
22
|
-
puts pulls
|
23
24
|
pulls.map { |p| [p.head.repo.owner.login, p.head.repo.html_url] }.each do |name, url|
|
24
25
|
puts "adding #{name}"
|
25
26
|
`git remote add #{name} #{url}`
|
@@ -33,8 +34,10 @@ module MakersToolbelt
|
|
33
34
|
end
|
34
35
|
|
35
36
|
def repo_from_remote_path(path)
|
36
|
-
@regex ||=
|
37
|
+
@regex ||= GITHUB_REMOTE_REGEX
|
37
38
|
@regex.match(path).captures.first
|
39
|
+
rescue
|
40
|
+
fail NotFoundError.new('Could not find remote origin')
|
38
41
|
end
|
39
42
|
|
40
43
|
def include_open?
|
data/lib/makers_toolbelt.rb
CHANGED