gem-src 0.6.0 → 0.6.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: 536d3cfe29f58697b12874128699be241b6e1fb0
4
- data.tar.gz: 730f039a50b289972e07930a35dfc6a1af9e9914
3
+ metadata.gz: 49616d662bfc4d63838e221b220a0159b0d28c59
4
+ data.tar.gz: 39f4410194d7b0bc0e3e42e6ae41351a63afc6a8
5
5
  SHA512:
6
- metadata.gz: 140d3298960f4fdd4d080f2b74421fd6ef15aa7bbcd57d1422b9d678f4a60f67904f2c32221243cb65f81707e5cbafef0dec671cb76cb52be4c35a705051aa37
7
- data.tar.gz: bd47b68082ce5c03922b84057c4b390fd4db9f4657ee74bafb05e8e881089f71fdd4767a702ad956401c18f75723b015bb4f1db92cc516873e61832e8bfc7468
6
+ metadata.gz: a0a8e311d525ebf2ef63b19595f05a03b5f668a2ea5734b870c509aaf83f7f57b691582139445ee5fbc4ce15fcf521e6ab1a36d043c3d267410307dfe0469c50
7
+ data.tar.gz: 6866e89026ee3890f115d2b6e9831aba2fc306051e32c2b49dd034ad9a3dbd93a690a17d6658142fec4ac565d9aca2c646257361ea3faf9615fc86cdefce0eab
data/README.md CHANGED
@@ -46,7 +46,7 @@ So, the whole directory structure will be like this.
46
46
  Note that you might be cloning the same repository again and again as the gem is updated, or the gem install directory changes.
47
47
  For example, if you're using RVM, each of `~/.rvm/gems/*/gems/*` will have it's Git repo inside "src" directory.
48
48
 
49
- ### specifying gemsrc_clone_root (strongly recommended)
49
+ ### Specifying gemsrc_clone_root (strongly recommended)
50
50
 
51
51
  Instead of cloning the repo under installed gem directory for each `gem install`, you can specify one single directory to keep all the cloned source repositories.
52
52
 
@@ -72,6 +72,24 @@ Now, the whole directory structure will look like this.
72
72
  │ ├── i18n_generators
73
73
  ...
74
74
 
75
+ ### Using ghq command (also recommended)
76
+
77
+ You can tell gem-src to rely on `ghq` command instead of `git clone`.
78
+ This requires ghq (https://github.com/motemen/ghq) to be installed, and either of the following two configurations should be made.
79
+
80
+ 1) `GEMSRC_USE_GHQ` environment variable
81
+ 2) add `gemsrc_use_ghq` configuration in your .gemrc
82
+
83
+ The directory structure should be like below in this mode.
84
+
85
+ ghq.root (~/.ghq by default)
86
+ ├── github.com
87
+ │ ├── amatsuda
88
+ │ │ ├── database_rewinder
89
+ │ │ └── rfd
90
+ │ ├── jimweirich
91
+ │ │ └── rake
92
+ ...
75
93
 
76
94
  ## Pristine
77
95
 
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.6.0'
7
+ gem.version = '0.6.1'
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` }'
@@ -71,15 +71,15 @@ module Gem
71
71
  @tested_repositories << repository
72
72
  return if github?(repository) && !github_page_exists?(repository)
73
73
 
74
- if ghq_available?
74
+ if use_ghq?
75
75
  system 'ghq', 'get', repository
76
76
  else
77
77
  system 'git', 'clone', repository, clone_dir if git?(repository)
78
78
  end
79
79
  end
80
80
 
81
- def ghq_available?
82
- system('which', 'ghq')
81
+ def use_ghq?
82
+ ENV['GEMSRC_USE_GHQ'] || Gem.configuration[:gemsrc_use_ghq]
83
83
  end
84
84
 
85
85
  def git_clone_homepage_or_source_code_uri_or_homepage_uri_or_github_organization_uri
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gem-src
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Akira Matsuda