open-remote 0.3 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4b5b4d43a783ba2b60fccc14f04b666697f85516
4
- data.tar.gz: fd08db390459979ff1d6e75d2955b6317a9b81ee
3
+ metadata.gz: 827999e6b514571e28e81233d109248696a40e74
4
+ data.tar.gz: 27e1a09a8ca2457b35a0b755f2b712bf460ea1a6
5
5
  SHA512:
6
- metadata.gz: 4920c5242078683ce8a4410921ccfe08cbf2297e504a4bec8b2a51f587997c11f696287754b781328a465135bd458e9919447d7e355daecd80e9d7d5002376a0
7
- data.tar.gz: 53b03f150e129304ecf8a156c5df1285e400f31df829b8920f9ff2e3113b64b2b09d4e05b601043b103d69fb4016886968ccab317be3ce576a0bd79942388b1a
6
+ metadata.gz: d96df47edb19da4e7d9df9ab214afaf22228be16464cbe073288ef7d8282f6b19138120fe774c99f4615fd66a2864066b945ad80a91d7333879a24824dfdf497
7
+ data.tar.gz: f3d8c47574f266d64cad114f49bf9cd1cd1b8bbd230cf3ff7aed11718e37a354e75b0555363552eaa3137079813a957f1d38ad53855d94823a2d6c0ac70e62bc
@@ -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?
@@ -1,6 +1,6 @@
1
1
  # universal version tracking
2
2
 
3
3
  class OpenRemote
4
- Version = "0.3"
4
+ Version = "0.3.1"
5
5
  end
6
6
 
data/readme.md CHANGED
@@ -4,6 +4,7 @@ open-remote
4
4
 
5
5
  [![Gem Version](https://badge.fury.io/rb/open-remote.svg)](https://badge.fury.io/rb/open-remote)
6
6
  [![Build Status](https://travis-ci.org/jeremywrnr/open-remote.svg?branch=master)](https://travis-ci.org/jeremywrnr/open-remote)
7
+ [![Code Climate](https://codeclimate.com/github/jeremywrnr/open-remote/badges/gpa.svg)](https://codeclimate.com/github/jeremywrnr/open-remote)
7
8
  [![MIT](https://img.shields.io/npm/l/alt.svg?style=flat)](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 git
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: '0.3'
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-01-27 00:00:00.000000000 Z
11
+ date: 2016-02-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: colored