gem-src 0.4.1 → 0.4.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: e7bdbdaa6e01ab1155713781bc4b8790b21873ee
4
+ data.tar.gz: b2b2f64ebb5815991146b3658cdc68acc9ea4c86
5
+ SHA512:
6
+ metadata.gz: 320ce85e5a4fcf917c093587027c9b25e3c57354bfe882f58db194d8c0e2de2188883a36e0354651e067926f3147adf362d565d66321e9ea9e4f369540ba82e3
7
+ data.tar.gz: 3754ba1cbc6e7065cbf716e72f177741a92748020d1219bf32a24e30c48eb75daaefa992eb8a3b3d21327876ff53ef7081e5ec02c3619751a372f9c6065ffbdd
data/README.md CHANGED
@@ -8,7 +8,7 @@ A gem plugin that automatically `git clone`s the gem's source right after every
8
8
  $ gem install gem-src
9
9
 
10
10
 
11
- ## Usage (Configuration)
11
+ ## Configuration
12
12
 
13
13
  ### By default
14
14
 
@@ -61,6 +61,14 @@ Now, the whole directory structure will look like this.
61
61
  ...
62
62
 
63
63
 
64
+ ## Usage
65
+
66
+ When you firstly installed this gem, you might want to type in this command right after the installation.
67
+
68
+ % gem pristine --all
69
+ This will reinstall all the already installed gems, and so will `git clone` all the repos.
70
+
71
+
64
72
  ## Todo
65
73
 
66
74
  * Bundler
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.4.1'
7
+ gem.version = '0.4.2'
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` }'
@@ -1,4 +1,8 @@
1
1
  require 'rubygems'
2
+ require 'rubygems/installer'
3
+ require 'rubygems/command_manager'
4
+
5
+ Gem::CommandManager.instance.register_command :ginstall
2
6
 
3
7
  module Gem
4
8
  class Src
@@ -40,6 +44,8 @@ module Gem
40
44
  def api
41
45
  require 'open-uri'
42
46
  @api ||= open("http://rubygems.org/api/v1/gems/#{installer.spec.name}.yaml", &:read)
47
+ rescue OpenURI::HTTPError
48
+ ""
43
49
  end
44
50
 
45
51
  def source_code_uri
@@ -55,7 +61,7 @@ module Gem
55
61
  end
56
62
 
57
63
  def git_clone_homepage_or_source_code_uri_or_homepage_uri
58
- return false if File.exists? clone_dir
64
+ return false if File.exist? clone_dir
59
65
  git_clone(installer.spec.homepage) ||
60
66
  git_clone(github_url(installer.spec.homepage)) ||
61
67
  git_clone(source_code_uri) ||
metadata CHANGED
@@ -1,30 +1,27 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gem-src
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
5
- prerelease:
4
+ version: 0.4.2
6
5
  platform: ruby
7
6
  authors:
8
7
  - Akira Matsuda
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2012-10-31 00:00:00.000000000 Z
11
+ date: 2014-02-15 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: rspec
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ! '>='
17
+ - - ">="
20
18
  - !ruby/object:Gem::Version
21
19
  version: '0'
22
20
  type: :development
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
- - - ! '>='
24
+ - - ">="
28
25
  - !ruby/object:Gem::Version
29
26
  version: '0'
30
27
  description: Gem.post_install { `git clone gem_source src` }
@@ -34,7 +31,7 @@ executables: []
34
31
  extensions: []
35
32
  extra_rdoc_files: []
36
33
  files:
37
- - .gitignore
34
+ - ".gitignore"
38
35
  - Gemfile
39
36
  - LICENSE.txt
40
37
  - README.md
@@ -43,26 +40,25 @@ files:
43
40
  - lib/rubygems_plugin.rb
44
41
  homepage: https://github.com/amatsuda/gem-src
45
42
  licenses: []
43
+ metadata: {}
46
44
  post_install_message:
47
45
  rdoc_options: []
48
46
  require_paths:
49
47
  - lib
50
48
  required_ruby_version: !ruby/object:Gem::Requirement
51
- none: false
52
49
  requirements:
53
- - - ! '>='
50
+ - - ">="
54
51
  - !ruby/object:Gem::Version
55
52
  version: '0'
56
53
  required_rubygems_version: !ruby/object:Gem::Requirement
57
- none: false
58
54
  requirements:
59
- - - ! '>='
55
+ - - ">="
60
56
  - !ruby/object:Gem::Version
61
57
  version: '0'
62
58
  requirements: []
63
59
  rubyforge_project:
64
- rubygems_version: 1.8.24
60
+ rubygems_version: 2.2.0
65
61
  signing_key:
66
- specification_version: 3
62
+ specification_version: 4
67
63
  summary: Gem.post_install { `git clone gem_source src` }
68
64
  test_files: []