view_source 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,4 @@
1
+ *.gem
2
+ .bundle
3
+ Gemfile.lock
4
+ pkg/*
data/Gemfile ADDED
@@ -0,0 +1,6 @@
1
+ source "http://rubygems.org"
2
+
3
+ gem 'irb_plugin'
4
+
5
+ # Specify your gem's dependencies in view_source.gemspec
6
+ gemspec
@@ -0,0 +1,4 @@
1
+ Convenient way to load the source for a Ruby method into TextMate
2
+ programmatically using object.source_for_method(method).
3
+
4
+ This only works for Ruby 1.9!
@@ -0,0 +1 @@
1
+ require 'bundler/gem_tasks'
@@ -0,0 +1,5 @@
1
+ require "view_source/version"
2
+ require "view_source/irb_plugin"
3
+
4
+ module ViewSource
5
+ end
@@ -0,0 +1,7 @@
1
+ class Object
2
+ def source_for_method(method)
3
+ location = self.method(method).source_location
4
+ `mate #{location[0]} -l #{location[1]}` if location
5
+ location
6
+ end
7
+ end
@@ -0,0 +1,3 @@
1
+ module ViewSource
2
+ VERSION = "0.0.1"
3
+ end
@@ -0,0 +1,22 @@
1
+ # -*- encoding: utf-8 -*-
2
+ $:.push File.expand_path("../lib", __FILE__)
3
+ require "view_source/version"
4
+
5
+ Gem::Specification.new do |s|
6
+ s.name = "view_source"
7
+ s.version = ViewSource::VERSION
8
+ s.authors = ["Mike Clark"]
9
+ s.email = ["mike@clarkware.com"]
10
+ s.homepage = ""
11
+ s.summary = %q{View the source of any Ruby 1.9 method in TextMate}
12
+ s.description = %q{View the source of any Ruby 1.9 method in TextMate}
13
+
14
+ s.rubyforge_project = "view_source"
15
+
16
+ s.files = `git ls-files`.split("\n")
17
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
18
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
19
+ s.require_paths = ["lib"]
20
+
21
+ s.add_dependency 'irb_plugin'
22
+ end
metadata ADDED
@@ -0,0 +1,66 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: view_source
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Mike Clark
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2011-06-26 00:00:00.000000000 -06:00
13
+ default_executable:
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: irb_plugin
17
+ requirement: &2161133680 !ruby/object:Gem::Requirement
18
+ none: false
19
+ requirements:
20
+ - - ! '>='
21
+ - !ruby/object:Gem::Version
22
+ version: '0'
23
+ type: :runtime
24
+ prerelease: false
25
+ version_requirements: *2161133680
26
+ description: View the source of any Ruby 1.9 method in TextMate
27
+ email:
28
+ - mike@clarkware.com
29
+ executables: []
30
+ extensions: []
31
+ extra_rdoc_files: []
32
+ files:
33
+ - .gitignore
34
+ - Gemfile
35
+ - README.md
36
+ - Rakefile
37
+ - lib/view_source.rb
38
+ - lib/view_source/irb_plugin.rb
39
+ - lib/view_source/version.rb
40
+ - view_source.gemspec
41
+ has_rdoc: true
42
+ homepage: ''
43
+ licenses: []
44
+ post_install_message:
45
+ rdoc_options: []
46
+ require_paths:
47
+ - lib
48
+ required_ruby_version: !ruby/object:Gem::Requirement
49
+ none: false
50
+ requirements:
51
+ - - ! '>='
52
+ - !ruby/object:Gem::Version
53
+ version: '0'
54
+ required_rubygems_version: !ruby/object:Gem::Requirement
55
+ none: false
56
+ requirements:
57
+ - - ! '>='
58
+ - !ruby/object:Gem::Version
59
+ version: '0'
60
+ requirements: []
61
+ rubyforge_project: view_source
62
+ rubygems_version: 1.6.2
63
+ signing_key:
64
+ specification_version: 3
65
+ summary: View the source of any Ruby 1.9 method in TextMate
66
+ test_files: []