method_source 0.7.0 → 0.7.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.travis.yml +3 -2
- data/Rakefile +6 -0
- data/lib/method_source/source_location.rb +2 -2
- data/lib/method_source/version.rb +1 -1
- metadata +60 -33
data/.travis.yml
CHANGED
data/Rakefile
CHANGED
@@ -32,6 +32,12 @@ task :test do
|
|
32
32
|
sh "bacon -q #{direc}/test/test.rb"
|
33
33
|
end
|
34
34
|
|
35
|
+
desc "reinstall gem"
|
36
|
+
task :reinstall => :gems do
|
37
|
+
sh "gem uninstall method_source" rescue nil
|
38
|
+
sh "gem install #{direc}/pkg/method_source-#{MethodSource::VERSION}.gem"
|
39
|
+
end
|
40
|
+
|
35
41
|
desc "Set up and run tests"
|
36
42
|
task :default => [:test]
|
37
43
|
|
@@ -122,14 +122,14 @@ module MethodSource
|
|
122
122
|
end
|
123
123
|
|
124
124
|
begin
|
125
|
-
klass.allocate.
|
125
|
+
Object.instance_method(:method).bind(klass.allocate).call(name).source_location
|
126
126
|
rescue TypeError
|
127
127
|
|
128
128
|
# Assume we are dealing with a Singleton Class:
|
129
129
|
# 1. Get the instance object
|
130
130
|
# 2. Forward the source_location lookup to the instance
|
131
131
|
instance ||= ObjectSpace.each_object(owner).first
|
132
|
-
|
132
|
+
Object.instance_method(:method).bind(instance).call(name).source_location
|
133
133
|
end
|
134
134
|
end
|
135
135
|
end
|
metadata
CHANGED
@@ -1,44 +1,62 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: method_source
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 4452373466457572121
|
5
5
|
prerelease:
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 7
|
9
|
+
- 1
|
10
|
+
version: 0.7.1
|
6
11
|
platform: ruby
|
7
|
-
authors:
|
12
|
+
authors:
|
8
13
|
- John Mair (banisterfiend)
|
9
14
|
autorequire:
|
10
15
|
bindir: bin
|
11
16
|
cert_chain: []
|
12
|
-
|
13
|
-
|
14
|
-
|
17
|
+
|
18
|
+
date: 2012-02-29 00:00:00 Z
|
19
|
+
dependencies:
|
20
|
+
- !ruby/object:Gem::Dependency
|
15
21
|
name: bacon
|
16
|
-
|
22
|
+
prerelease: false
|
23
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
17
24
|
none: false
|
18
|
-
requirements:
|
25
|
+
requirements:
|
19
26
|
- - ~>
|
20
|
-
- !ruby/object:Gem::Version
|
27
|
+
- !ruby/object:Gem::Version
|
28
|
+
hash: 3461773182973075480
|
29
|
+
segments:
|
30
|
+
- 1
|
31
|
+
- 1
|
32
|
+
- 0
|
21
33
|
version: 1.1.0
|
22
34
|
type: :development
|
23
|
-
|
24
|
-
|
25
|
-
- !ruby/object:Gem::Dependency
|
35
|
+
version_requirements: *id001
|
36
|
+
- !ruby/object:Gem::Dependency
|
26
37
|
name: rake
|
27
|
-
|
38
|
+
prerelease: false
|
39
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
28
40
|
none: false
|
29
|
-
requirements:
|
41
|
+
requirements:
|
30
42
|
- - ~>
|
31
|
-
- !ruby/object:Gem::Version
|
32
|
-
|
43
|
+
- !ruby/object:Gem::Version
|
44
|
+
hash: 2854635824043747355
|
45
|
+
segments:
|
46
|
+
- 0
|
47
|
+
- 9
|
48
|
+
version: "0.9"
|
33
49
|
type: :development
|
34
|
-
|
35
|
-
version_requirements: *70179976063220
|
50
|
+
version_requirements: *id002
|
36
51
|
description: retrieve the sourcecode for a method
|
37
52
|
email: jrmair@gmail.com
|
38
53
|
executables: []
|
54
|
+
|
39
55
|
extensions: []
|
56
|
+
|
40
57
|
extra_rdoc_files: []
|
41
|
-
|
58
|
+
|
59
|
+
files:
|
42
60
|
- .gemtest
|
43
61
|
- .travis.yml
|
44
62
|
- .yardopts
|
@@ -54,28 +72,37 @@ files:
|
|
54
72
|
- test/test_helper.rb
|
55
73
|
homepage: http://banisterfiend.wordpress.com
|
56
74
|
licenses: []
|
75
|
+
|
57
76
|
post_install_message:
|
58
77
|
rdoc_options: []
|
59
|
-
|
78
|
+
|
79
|
+
require_paths:
|
60
80
|
- lib
|
61
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
81
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
62
82
|
none: false
|
63
|
-
requirements:
|
64
|
-
- -
|
65
|
-
- !ruby/object:Gem::Version
|
66
|
-
|
67
|
-
|
83
|
+
requirements:
|
84
|
+
- - ">="
|
85
|
+
- !ruby/object:Gem::Version
|
86
|
+
hash: 2002549777813010636
|
87
|
+
segments:
|
88
|
+
- 0
|
89
|
+
version: "0"
|
90
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
68
91
|
none: false
|
69
|
-
requirements:
|
70
|
-
- -
|
71
|
-
- !ruby/object:Gem::Version
|
72
|
-
|
92
|
+
requirements:
|
93
|
+
- - ">="
|
94
|
+
- !ruby/object:Gem::Version
|
95
|
+
hash: 2002549777813010636
|
96
|
+
segments:
|
97
|
+
- 0
|
98
|
+
version: "0"
|
73
99
|
requirements: []
|
100
|
+
|
74
101
|
rubyforge_project:
|
75
|
-
rubygems_version: 1.8.
|
102
|
+
rubygems_version: 1.8.12
|
76
103
|
signing_key:
|
77
104
|
specification_version: 3
|
78
105
|
summary: retrieve the sourcecode for a method
|
79
|
-
test_files:
|
106
|
+
test_files:
|
80
107
|
- test/test.rb
|
81
108
|
- test/test_helper.rb
|