open-remote 0.3 → 0.3.1
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/open-remote.rb +10 -0
- data/lib/or-version.rb +1 -1
- data/readme.md +5 -6
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 827999e6b514571e28e81233d109248696a40e74
|
|
4
|
+
data.tar.gz: 27e1a09a8ca2457b35a0b755f2b712bf460ea1a6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d96df47edb19da4e7d9df9ab214afaf22228be16464cbe073288ef7d8282f6b19138120fe774c99f4615fd66a2864066b945ad80a91d7333879a24824dfdf497
|
|
7
|
+
data.tar.gz: f3d8c47574f266d64cad114f49bf9cd1cd1b8bbd230cf3ff7aed11718e37a354e75b0555363552eaa3137079813a957f1d38ad53855d94823a2d6c0ac70e62bc
|
data/lib/open-remote.rb
CHANGED
|
@@ -31,7 +31,17 @@ class OpenRemote
|
|
|
31
31
|
end
|
|
32
32
|
end
|
|
33
33
|
|
|
34
|
+
def no_repo?
|
|
35
|
+
`git status 2>&1`.split("\n").first ==
|
|
36
|
+
"fatal: Not a git repository (or any of the parent directories): .git"
|
|
37
|
+
end
|
|
38
|
+
|
|
34
39
|
def remote(search = /.*/)
|
|
40
|
+
if no_repo?
|
|
41
|
+
puts "Not currently in a git repository.".red
|
|
42
|
+
exit 1
|
|
43
|
+
end
|
|
44
|
+
|
|
35
45
|
remote = remotes.find { |remote| remote.match search }
|
|
36
46
|
|
|
37
47
|
if remote.nil?
|
data/lib/or-version.rb
CHANGED
data/readme.md
CHANGED
|
@@ -4,6 +4,7 @@ open-remote
|
|
|
4
4
|
|
|
5
5
|
[](https://badge.fury.io/rb/open-remote)
|
|
6
6
|
[](https://travis-ci.org/jeremywrnr/open-remote)
|
|
7
|
+
[](https://codeclimate.com/github/jeremywrnr/open-remote)
|
|
7
8
|
[](http://jeremywrnr.com/mit-license)
|
|
8
9
|
|
|
9
10
|
|
|
@@ -14,8 +15,6 @@ tested and works well for:
|
|
|
14
15
|
- github
|
|
15
16
|
- bitbucket
|
|
16
17
|
- heroku
|
|
17
|
-
- TODO: gems (from checking gemspec)
|
|
18
|
-
- TODO: travis (from checking .travis.yml)
|
|
19
18
|
|
|
20
19
|
if there are other git hosting websites that you would like to use this with,
|
|
21
20
|
either let me know or make a pull request with the augmentation for that host.
|
|
@@ -55,8 +54,8 @@ provided me with a simple git alias that would do the same, but it only worked
|
|
|
55
54
|
for repos that were https and was not platform independent. I was also inspired
|
|
56
55
|
by the [git-up][gup] ruby gem in how seamlessly it integrated with git. Here is
|
|
57
56
|
the original git alias (made to work on osx), which charlie wrote (plop it in
|
|
58
|
-
your .gitconfig, if you don't want to install a ruby gem to open your
|
|
59
|
-
remotes):
|
|
57
|
+
your .gitconfig, if you don't want to install a ruby gem to open most of your
|
|
58
|
+
git remotes):
|
|
60
59
|
|
|
61
60
|
```
|
|
62
61
|
[alias]
|
|
@@ -69,6 +68,6 @@ remotes):
|
|
|
69
68
|
|
|
70
69
|
## testing
|
|
71
70
|
|
|
72
|
-
bundle || gem install bundler
|
|
73
|
-
rake
|
|
71
|
+
bundle || gem install bundler && bundle
|
|
72
|
+
rake # running open-remote's tests
|
|
74
73
|
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: open-remote
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version:
|
|
4
|
+
version: 0.3.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Jeremy Warner
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2016-
|
|
11
|
+
date: 2016-02-03 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: colored
|