rake-gem-ghost 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
data/LICENSE.txt ADDED
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2010 Boba Fat
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.rdoc ADDED
@@ -0,0 +1,14 @@
1
+ = rake-gem-ghost
2
+
3
+ Help gem developers to test created gems — creates symlink from installed gem to current folder.
4
+
5
+ == Example
6
+
7
+ require 'rake/gem_ghost_task'
8
+
9
+ Rake::GemGhostTask.new('hello_world')
10
+
11
+ == Copyright
12
+
13
+ Copyright (c) 2010 Boba Fat. See LICENSE.txt for
14
+ further details.
data/Rakefile ADDED
@@ -0,0 +1,16 @@
1
+ require 'rubygems'
2
+ require 'jeweler'
3
+ Jeweler::Tasks.new do |gem|
4
+ gem.name = "rake-gem-ghost"
5
+ gem.summary = %Q{Help gem developers to test created gems}
6
+ gem.description = %Q{Help gem developers to test created gems — creates symlink from installed gem to current folder.}
7
+ gem.homepage = "http://github.com/toy/rake-gem-ghost"
8
+ gem.license = "MIT"
9
+ gem.authors = ["Boba Fat"]
10
+ gem.add_development_dependency "jeweler", "~> 1.5.1"
11
+ end
12
+ Jeweler::RubygemsDotOrgTasks.new
13
+
14
+ $: << File.join(File.dirname(__FILE__), 'lib')
15
+ require 'rake/gem_ghost_task'
16
+ Rake::GemGhostTask.new
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 0.0.1
@@ -0,0 +1,26 @@
1
+ module Rake
2
+ class GemGhostTask < TaskLib
3
+ attr_reader :name
4
+ def initialize(name = nil)
5
+ @name = name || Pathname.getwd.basename.to_s
6
+ define
7
+ end
8
+
9
+ private
10
+
11
+ def define
12
+ desc "Replace system gem with symlink to this folder"
13
+ task 'ghost' do
14
+ if spec = Gem.source_index.find_name(name).sort_by(&:version).last
15
+ gem_path = Pathname(spec.full_gem_path)
16
+ current_path = Pathname.getwd.expand_path
17
+ abort "#{gem_path.dirname} is not writable!" unless gem_path.dirname.writable?
18
+ sh 'rm', '-r', gem_path
19
+ sh 'ln', '-s', current_path, gem_path
20
+ else
21
+ abort 'Gem is not installed, install first'
22
+ end
23
+ end
24
+ end
25
+ end
26
+ end
metadata ADDED
@@ -0,0 +1,87 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: rake-gem-ghost
3
+ version: !ruby/object:Gem::Version
4
+ hash: 29
5
+ prerelease: false
6
+ segments:
7
+ - 0
8
+ - 0
9
+ - 1
10
+ version: 0.0.1
11
+ platform: ruby
12
+ authors:
13
+ - Boba Fat
14
+ autorequire:
15
+ bindir: bin
16
+ cert_chain: []
17
+
18
+ date: 2010-12-05 00:00:00 +03:00
19
+ default_executable:
20
+ dependencies:
21
+ - !ruby/object:Gem::Dependency
22
+ name: jeweler
23
+ prerelease: false
24
+ requirement: &id001 !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ~>
28
+ - !ruby/object:Gem::Version
29
+ hash: 1
30
+ segments:
31
+ - 1
32
+ - 5
33
+ - 1
34
+ version: 1.5.1
35
+ type: :development
36
+ version_requirements: *id001
37
+ description: "Help gem developers to test created gems \xE2\x80\x94 creates symlink from installed gem to current folder."
38
+ email:
39
+ executables: []
40
+
41
+ extensions: []
42
+
43
+ extra_rdoc_files:
44
+ - LICENSE.txt
45
+ - README.rdoc
46
+ files:
47
+ - LICENSE.txt
48
+ - README.rdoc
49
+ - Rakefile
50
+ - VERSION
51
+ - lib/rake/gem_ghost_task.rb
52
+ has_rdoc: true
53
+ homepage: http://github.com/toy/rake-gem-ghost
54
+ licenses:
55
+ - MIT
56
+ post_install_message:
57
+ rdoc_options: []
58
+
59
+ require_paths:
60
+ - lib
61
+ required_ruby_version: !ruby/object:Gem::Requirement
62
+ none: false
63
+ requirements:
64
+ - - ">="
65
+ - !ruby/object:Gem::Version
66
+ hash: 3
67
+ segments:
68
+ - 0
69
+ version: "0"
70
+ required_rubygems_version: !ruby/object:Gem::Requirement
71
+ none: false
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ hash: 3
76
+ segments:
77
+ - 0
78
+ version: "0"
79
+ requirements: []
80
+
81
+ rubyforge_project:
82
+ rubygems_version: 1.3.7
83
+ signing_key:
84
+ specification_version: 3
85
+ summary: Help gem developers to test created gems
86
+ test_files: []
87
+