irbtools-more 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.document +5 -0
- data/.gitignore +21 -0
- data/LICENSE +20 -0
- data/README.rdoc +50 -0
- data/Rakefile +30 -0
- data/VERSION +1 -0
- data/irbtools-more.gemspec +55 -0
- data/lib/bond/completions/irbtools.rb +18 -0
- data/lib/irbtools/more.rb +31 -0
- metadata +119 -0
data/.document
ADDED
data/.gitignore
ADDED
data/LICENSE
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright (c) 2010 Jan Lelis
|
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,50 @@
|
|
1
|
+
= irbtools-more
|
2
|
+
|
3
|
+
irbtools[http://github.com/janlelis/irbtools] is a meta gem which installs some useful irb gems and configures your irb.
|
4
|
+
|
5
|
+
<tt>irbtools-more</tt> adds some more irb gems which may not build out-of-the-box. Currently included: better auto completion and an object inspector.
|
6
|
+
|
7
|
+
== Setup
|
8
|
+
|
9
|
+
gem install irbtools-more
|
10
|
+
gem install irb_rocket --source http://merbi.st
|
11
|
+
|
12
|
+
* On Linux, you also need the +xclip+ program (apt-get install xclip).
|
13
|
+
* On MacOS, you need growl, if you want to use the +g+ gem.
|
14
|
+
* You need +tk+ for DrX (maybe try <tt>tk_as_gem</tt>)
|
15
|
+
|
16
|
+
== Usage
|
17
|
+
|
18
|
+
To use it, put the following in your <tt>~/.irbrc</tt> file (this file is loaded everytime you start an irb):
|
19
|
+
|
20
|
+
require 'rubygems' # only needed in 1.8
|
21
|
+
require 'irbtools-more'
|
22
|
+
|
23
|
+
If it does not exist, just create a new one.
|
24
|
+
|
25
|
+
It's possible to modify, which libraries get loaded:
|
26
|
+
|
27
|
+
require 'irbtools/configure'
|
28
|
+
Irbtools.add_package :more # adds this extension package
|
29
|
+
# here you can edit which libraries get loaded. See the irbtools README for details.
|
30
|
+
Irbtools.start
|
31
|
+
|
32
|
+
You could also just use the base +irbtools+ and add the additional gems yourself.
|
33
|
+
|
34
|
+
== Features
|
35
|
+
|
36
|
+
=== Included gems and libraries
|
37
|
+
|
38
|
+
For the libraries included in +irbtools+, see its README page or http://rbjl.net/40-irbtools-release-the-power-of-irb
|
39
|
+
* DrX[http://drx.rubyforge.org/] A tk object inspector, defines <tt>Object#see</tt>
|
40
|
+
* bond[http://tagaholic.me/bond/] Better auto completion
|
41
|
+
|
42
|
+
== Extension packages
|
43
|
+
|
44
|
+
Feel free to build your own extension package gem (see this gem's source) and upload it to rubygems.org.
|
45
|
+
|
46
|
+
== Copyright
|
47
|
+
|
48
|
+
Copyright (c) 2010 Jan Lelis, http://rbjl.net. See LICENSE for details.
|
49
|
+
|
50
|
+
J-_-L
|
data/Rakefile
ADDED
@@ -0,0 +1,30 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'rake'
|
3
|
+
|
4
|
+
begin
|
5
|
+
require 'jeweler'
|
6
|
+
Jeweler::Tasks.new do |gem|
|
7
|
+
gem.name = "irbtools-more"
|
8
|
+
gem.summary = %Q{irbtools is a meta gem which installs some useful irb gems and configures your irb. irbtools-more adds some gems which may not build out-of-the-box.}
|
9
|
+
gem.description = %Q{irbtools is a meta gem which installs some useful irb gems and configures your irb. irbtools-more adds some gems which may not build out-of-the-box. Simply put a require 'irbtools-more' in the .irbrc file in your home directory}
|
10
|
+
gem.email = "mail@janlelis.de"
|
11
|
+
gem.homepage = "http://github.com/janlelis/irbtools-more"
|
12
|
+
gem.authors = ["Jan Lelis"]
|
13
|
+
gem.add_dependency 'irbtools', '>= 0.8.0'
|
14
|
+
gem.add_dependency 'drx'
|
15
|
+
gem.add_dependency 'bond'
|
16
|
+
end
|
17
|
+
Jeweler::GemcutterTasks.new
|
18
|
+
rescue LoadError
|
19
|
+
puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
|
20
|
+
end
|
21
|
+
|
22
|
+
require 'rake/rdoctask'
|
23
|
+
Rake::RDocTask.new do |rdoc|
|
24
|
+
version = File.exist?('VERSION') ? File.read('VERSION').chomp : ""
|
25
|
+
|
26
|
+
rdoc.rdoc_dir = 'doc'
|
27
|
+
rdoc.title = "irbtools-more #{version}"
|
28
|
+
rdoc.rdoc_files.include('README*')
|
29
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
30
|
+
end
|
data/VERSION
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
0.3.0
|
@@ -0,0 +1,55 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = %q{irbtools-more}
|
8
|
+
s.version = "0.3.0"
|
9
|
+
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
+
s.authors = ["Jan Lelis"]
|
12
|
+
s.date = %q{2010-10-12}
|
13
|
+
s.description = %q{irbtools is a meta gem which installs some useful irb gems and configures your irb. irbtools-more adds some gems which may not build out-of-the-box. Simply put a require 'irbtools-more' in the .irbrc file in your home directory}
|
14
|
+
s.email = %q{mail@janlelis.de}
|
15
|
+
s.extra_rdoc_files = [
|
16
|
+
"LICENSE",
|
17
|
+
"README.rdoc"
|
18
|
+
]
|
19
|
+
s.files = [
|
20
|
+
".document",
|
21
|
+
".gitignore",
|
22
|
+
"LICENSE",
|
23
|
+
"README.rdoc",
|
24
|
+
"Rakefile",
|
25
|
+
"VERSION",
|
26
|
+
"irbtools-more.gemspec",
|
27
|
+
"lib/bond/completions/irbtools.rb",
|
28
|
+
"lib/irbtools/more.rb"
|
29
|
+
]
|
30
|
+
s.homepage = %q{http://github.com/janlelis/irbtools-more}
|
31
|
+
s.rdoc_options = ["--charset=UTF-8"]
|
32
|
+
s.require_paths = ["lib"]
|
33
|
+
s.rubygems_version = %q{1.3.7}
|
34
|
+
s.summary = %q{irbtools is a meta gem which installs some useful irb gems and configures your irb. irbtools-more adds some gems which may not build out-of-the-box.}
|
35
|
+
|
36
|
+
if s.respond_to? :specification_version then
|
37
|
+
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
38
|
+
s.specification_version = 3
|
39
|
+
|
40
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
41
|
+
s.add_runtime_dependency(%q<irbtools>, [">= 0.8.0"])
|
42
|
+
s.add_runtime_dependency(%q<drx>, [">= 0"])
|
43
|
+
s.add_runtime_dependency(%q<bond>, [">= 0"])
|
44
|
+
else
|
45
|
+
s.add_dependency(%q<irbtools>, [">= 0.8.0"])
|
46
|
+
s.add_dependency(%q<drx>, [">= 0"])
|
47
|
+
s.add_dependency(%q<bond>, [">= 0"])
|
48
|
+
end
|
49
|
+
else
|
50
|
+
s.add_dependency(%q<irbtools>, [">= 0.8.0"])
|
51
|
+
s.add_dependency(%q<drx>, [">= 0"])
|
52
|
+
s.add_dependency(%q<bond>, [">= 0"])
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
# TODO more ;)
|
4
|
+
|
5
|
+
def send_methods(obj)
|
6
|
+
(obj.methods + obj.private_methods(false)).map {|e| e.to_s } - Mission::OPERATORS
|
7
|
+
end
|
8
|
+
|
9
|
+
complete(:method=>"Object#ri") {|e|
|
10
|
+
if e.arguments.empty?
|
11
|
+
[':']
|
12
|
+
else
|
13
|
+
# from bond send
|
14
|
+
(e.object.methods + e.object.private_methods(false)).map {|e| e.to_s } - Mission::OPERATORS
|
15
|
+
end
|
16
|
+
}
|
17
|
+
|
18
|
+
# J-_-L
|
@@ -0,0 +1,31 @@
|
|
1
|
+
# check if loaded_directly to decide if Irbtools.init should be called
|
2
|
+
standalone = !(defined? Irbtools)
|
3
|
+
|
4
|
+
# define version
|
5
|
+
module Irbtools
|
6
|
+
module More
|
7
|
+
PACKAGE_VERSION = ( File.read File.expand_path( '../../VERSION', File.dirname(__FILE__)) ).chomp
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
11
|
+
# require base package
|
12
|
+
if standalone
|
13
|
+
begin
|
14
|
+
require 'irbtools/configure'
|
15
|
+
rescue LoadError
|
16
|
+
raise "Sorry, the irbtools-more package couldn't load, because the irbtools gem is not available"
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
# irbtools-more libraries
|
21
|
+
Irbtools.add_library :drx
|
22
|
+
Irbtools.add_library :bond do
|
23
|
+
Bond.start :gems => %w[irbtools]
|
24
|
+
end
|
25
|
+
|
26
|
+
# load now
|
27
|
+
if standalone
|
28
|
+
Irbtools.init
|
29
|
+
end
|
30
|
+
|
31
|
+
# J-_-L
|
metadata
ADDED
@@ -0,0 +1,119 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: irbtools-more
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 19
|
5
|
+
prerelease: false
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 3
|
9
|
+
- 0
|
10
|
+
version: 0.3.0
|
11
|
+
platform: ruby
|
12
|
+
authors:
|
13
|
+
- Jan Lelis
|
14
|
+
autorequire:
|
15
|
+
bindir: bin
|
16
|
+
cert_chain: []
|
17
|
+
|
18
|
+
date: 2010-10-12 00:00:00 +02:00
|
19
|
+
default_executable:
|
20
|
+
dependencies:
|
21
|
+
- !ruby/object:Gem::Dependency
|
22
|
+
name: irbtools
|
23
|
+
prerelease: false
|
24
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ">="
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
hash: 63
|
30
|
+
segments:
|
31
|
+
- 0
|
32
|
+
- 8
|
33
|
+
- 0
|
34
|
+
version: 0.8.0
|
35
|
+
type: :runtime
|
36
|
+
version_requirements: *id001
|
37
|
+
- !ruby/object:Gem::Dependency
|
38
|
+
name: drx
|
39
|
+
prerelease: false
|
40
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ">="
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
hash: 3
|
46
|
+
segments:
|
47
|
+
- 0
|
48
|
+
version: "0"
|
49
|
+
type: :runtime
|
50
|
+
version_requirements: *id002
|
51
|
+
- !ruby/object:Gem::Dependency
|
52
|
+
name: bond
|
53
|
+
prerelease: false
|
54
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
55
|
+
none: false
|
56
|
+
requirements:
|
57
|
+
- - ">="
|
58
|
+
- !ruby/object:Gem::Version
|
59
|
+
hash: 3
|
60
|
+
segments:
|
61
|
+
- 0
|
62
|
+
version: "0"
|
63
|
+
type: :runtime
|
64
|
+
version_requirements: *id003
|
65
|
+
description: irbtools is a meta gem which installs some useful irb gems and configures your irb. irbtools-more adds some gems which may not build out-of-the-box. Simply put a require 'irbtools-more' in the .irbrc file in your home directory
|
66
|
+
email: mail@janlelis.de
|
67
|
+
executables: []
|
68
|
+
|
69
|
+
extensions: []
|
70
|
+
|
71
|
+
extra_rdoc_files:
|
72
|
+
- LICENSE
|
73
|
+
- README.rdoc
|
74
|
+
files:
|
75
|
+
- .document
|
76
|
+
- .gitignore
|
77
|
+
- LICENSE
|
78
|
+
- README.rdoc
|
79
|
+
- Rakefile
|
80
|
+
- VERSION
|
81
|
+
- irbtools-more.gemspec
|
82
|
+
- lib/bond/completions/irbtools.rb
|
83
|
+
- lib/irbtools/more.rb
|
84
|
+
has_rdoc: true
|
85
|
+
homepage: http://github.com/janlelis/irbtools-more
|
86
|
+
licenses: []
|
87
|
+
|
88
|
+
post_install_message:
|
89
|
+
rdoc_options:
|
90
|
+
- --charset=UTF-8
|
91
|
+
require_paths:
|
92
|
+
- lib
|
93
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
94
|
+
none: false
|
95
|
+
requirements:
|
96
|
+
- - ">="
|
97
|
+
- !ruby/object:Gem::Version
|
98
|
+
hash: 3
|
99
|
+
segments:
|
100
|
+
- 0
|
101
|
+
version: "0"
|
102
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
103
|
+
none: false
|
104
|
+
requirements:
|
105
|
+
- - ">="
|
106
|
+
- !ruby/object:Gem::Version
|
107
|
+
hash: 3
|
108
|
+
segments:
|
109
|
+
- 0
|
110
|
+
version: "0"
|
111
|
+
requirements: []
|
112
|
+
|
113
|
+
rubyforge_project:
|
114
|
+
rubygems_version: 1.3.7
|
115
|
+
signing_key:
|
116
|
+
specification_version: 3
|
117
|
+
summary: irbtools is a meta gem which installs some useful irb gems and configures your irb. irbtools-more adds some gems which may not build out-of-the-box.
|
118
|
+
test_files: []
|
119
|
+
|