clone_git_file 0.1.3 → 0.1.4

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: 95c74c1023714ef32bdc362c57011d97498e95ff
4
- data.tar.gz: 4af34d94b85e870351f425425fc3595d1d58c837
3
+ metadata.gz: 32fb5dd7523cde6334e4ec6f5373555f8423ecd0
4
+ data.tar.gz: 51fd364c11b7bd60c9ade03fc98d07421428bebd
5
5
  SHA512:
6
- metadata.gz: a7303928a44fdb6b3f26d1b661653b6d5a5eab22b0aeda238108bcc8966236c605c6c7a714f7bd56377e0f0c687acfeba31387e9c6851be568288a5f01698f78
7
- data.tar.gz: 9ffb96778c9f9857510948f58436be39a6cd305d7cc4406c0a99dfcc80b670444fe245eaf4a0d364869d3512b7162c70e76a6b6000f805b3412de7f3e4c346d7
6
+ metadata.gz: 7be4d9be3dba8d5a90617b70c5dbb1cb0c86d85b7b7dcb92ff530a153ded7d9413a2e5aa7cf80b9205330fa1ad856e4b0437853f5e31ec78273bd2a559c3dba8
7
+ data.tar.gz: 4c665b58515d5de912aee26fb0899c841541e9ec15410a8cd8d474d84fade71f3e2dfeb31e860ab1e7febe1db122f3088248bd8417d2467421291c3c08719369
data/README.md CHANGED
@@ -6,6 +6,22 @@ gem install clone_git_file
6
6
 
7
7
  # Description
8
8
 
9
+ #### ;tldr
10
+
11
+ This gem allows you to replace these commands:
12
+
13
+ 1. `mkdir -p ~/dev/author`
14
+ 2. `cd ~/dev/author`
15
+ 3. `git clone https://github.com/author/repo`
16
+ 4. `cd repo`
17
+ 5. `myeditor file.rb`
18
+
19
+ with:
20
+
21
+ `cgf https://github.com/author/repo/file.rb` (assuming you setup the alias below)
22
+
23
+ #### Long version
24
+
9
25
  This gem will clone the repository containing a file, then open that file in
10
26
  your chosen editor. If the repository already exists in the specified directory,
11
27
  any uncommitted changes will be lost (`git reset HEAD --hard` will be run). The
@@ -55,7 +55,7 @@ module CloneGitFile
55
55
  end
56
56
 
57
57
  def is_branch?
58
- @file.match(%r{#{Regexp.escape(parse_repo_url)}/blob/[^/]+/.+})
58
+ @file.match(%r{#{Regexp.escape(parse_repo_url)}/(blob|tree)/[^/]+/.+})
59
59
  end
60
60
 
61
61
  def is_tree?
@@ -1,3 +1,3 @@
1
1
  module CloneGitFile
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: clone_git_file
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brandon Conway
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-12-13 00:00:00.000000000 Z
11
+ date: 2015-12-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler