gem-src 0.5.1 → 0.6.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 +2 -2
- data/gem-src.gemspec +1 -1
- data/lib/rubygems_plugin.rb +11 -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: 536d3cfe29f58697b12874128699be241b6e1fb0
|
4
|
+
data.tar.gz: 730f039a50b289972e07930a35dfc6a1af9e9914
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 140d3298960f4fdd4d080f2b74421fd6ef15aa7bbcd57d1422b9d678f4a60f67904f2c32221243cb65f81707e5cbafef0dec671cb76cb52be4c35a705051aa37
|
7
|
+
data.tar.gz: bd47b68082ce5c03922b84057c4b390fd4db9f4657ee74bafb05e8e881089f71fdd4767a702ad956401c18f75723b015bb4f1db92cc516873e61832e8bfc7468
|
data/README.md
CHANGED
@@ -9,13 +9,13 @@ gem-src is a gem plugin && rbenv plugin that automatically `git clone`s the gem'
|
|
9
9
|
|
10
10
|
gem-src is a gem plugin that can be installed via gem install command:
|
11
11
|
|
12
|
-
|
12
|
+
% gem install gem-src
|
13
13
|
|
14
14
|
### As an rbenv plugin (recommended)
|
15
15
|
|
16
16
|
Alternatively, if you're using rbenv, you can install gem-src as an rbenv plugin:
|
17
17
|
|
18
|
-
|
18
|
+
% git clone https://github.com/amatsuda/gem-src.git ~/.rbenv/plugins/gem-src
|
19
19
|
|
20
20
|
then you get gem-src enabled for all `gem` and `bundle` commands invoked through rbenv.
|
21
21
|
|
data/gem-src.gemspec
CHANGED
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |gem|
|
6
6
|
gem.name = "gem-src"
|
7
|
-
gem.version = '0.
|
7
|
+
gem.version = '0.6.0'
|
8
8
|
gem.authors = ["Akira Matsuda"]
|
9
9
|
gem.email = ["ronnie@dio.jp"]
|
10
10
|
gem.description = 'Gem.post_install { `git clone gem_source src` }'
|
data/lib/rubygems_plugin.rb
CHANGED
@@ -1,9 +1,5 @@
|
|
1
1
|
require 'rubygems'
|
2
|
-
require '
|
3
|
-
require 'rubygems/command_manager'
|
4
|
-
require 'net/http'
|
5
|
-
|
6
|
-
Gem::CommandManager.instance.register_command :ginstall
|
2
|
+
require 'net/https'
|
7
3
|
|
8
4
|
module Gem
|
9
5
|
class Src
|
@@ -74,7 +70,16 @@ module Gem
|
|
74
70
|
return if @tested_repositories.include? repository
|
75
71
|
@tested_repositories << repository
|
76
72
|
return if github?(repository) && !github_page_exists?(repository)
|
77
|
-
|
73
|
+
|
74
|
+
if ghq_available?
|
75
|
+
system 'ghq', 'get', repository
|
76
|
+
else
|
77
|
+
system 'git', 'clone', repository, clone_dir if git?(repository)
|
78
|
+
end
|
79
|
+
end
|
80
|
+
|
81
|
+
def ghq_available?
|
82
|
+
system('which', 'ghq')
|
78
83
|
end
|
79
84
|
|
80
85
|
def git_clone_homepage_or_source_code_uri_or_homepage_uri_or_github_organization_uri
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gem-src
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Akira Matsuda
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-03
|
11
|
+
date: 2014-06-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|