binding_of_caller 0.6.4 → 0.6.5
Sign up to get free protection for your applications and to get access to all the features.
- data/.travis.yml +9 -0
- data/Rakefile +137 -119
- data/binding_of_caller.gemspec +9 -9
- data/lib/binding_of_caller.rb +1 -1
- data/lib/binding_of_caller/version.rb +1 -1
- metadata +10 -14
- data/lib/binding_of_caller.bundle +0 -0
- data/lib/tester.rb +0 -15
data/.travis.yml
CHANGED
data/Rakefile
CHANGED
@@ -1,119 +1,137 @@
|
|
1
|
-
dlext = RbConfig::CONFIG['DLEXT']
|
2
|
-
direc = File.dirname(__FILE__)
|
3
|
-
|
4
|
-
$:.unshift 'lib'
|
5
|
-
|
6
|
-
PROJECT_NAME = "binding_of_caller"
|
7
|
-
|
8
|
-
require 'rake/clean'
|
9
|
-
require 'rubygems/package_task'
|
10
|
-
|
11
|
-
require "#{PROJECT_NAME}/version"
|
12
|
-
|
13
|
-
CLOBBER.include("**/*.#{dlext}", "**/*~", "**/*#*", "**/*.log", "**/*.o")
|
14
|
-
CLEAN.include("ext/**/*.#{dlext}", "ext/**/*.log", "ext/**/*.o",
|
15
|
-
"ext/**/*~", "ext/**/*#*", "ext/**/*.obj", "**/*#*", "**/*#*.*",
|
16
|
-
"ext/**/*.def", "ext/**/*.pdb", "**/*_flymake*.*", "**/*_flymake", "**/*.rbc")
|
17
|
-
|
18
|
-
def apply_spec_defaults(s)
|
19
|
-
s.name = PROJECT_NAME
|
20
|
-
s.summary = "Retrieve the binding of a method's caller. Can also retrieve bindings even further up the stack."
|
21
|
-
s.version = BindingOfCaller::VERSION
|
22
|
-
s.date = Time.now.strftime '%Y-%m-%d'
|
23
|
-
s.author = "John Mair (banisterfiend)"
|
24
|
-
s.email = 'jrmair@gmail.com'
|
25
|
-
s.description = s.summary
|
26
|
-
s.require_path = 'lib'
|
27
|
-
s.add_development_dependency(
|
28
|
-
s.add_development_dependency('rake'
|
29
|
-
s.homepage = "http://github.com/banister/binding_of_caller"
|
30
|
-
s.has_rdoc = 'yard'
|
31
|
-
s.files = `git ls-files`.split("\n")
|
32
|
-
s.test_files = `git ls-files -- test/*`.split("\n")
|
33
|
-
end
|
34
|
-
|
35
|
-
desc "Show version"
|
36
|
-
task :version do
|
37
|
-
puts "BindingOfCaller version: #{BindingOfCaller::VERSION}"
|
38
|
-
end
|
39
|
-
|
40
|
-
desc "run tests"
|
41
|
-
task :default => :test
|
42
|
-
|
43
|
-
desc "Run tests"
|
44
|
-
task :test do
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
puts
|
50
|
-
sh "
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
#
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
#
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
end
|
97
|
-
|
98
|
-
desc "
|
99
|
-
task :
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
1
|
+
dlext = RbConfig::CONFIG['DLEXT']
|
2
|
+
direc = File.dirname(__FILE__)
|
3
|
+
|
4
|
+
$:.unshift 'lib'
|
5
|
+
|
6
|
+
PROJECT_NAME = "binding_of_caller"
|
7
|
+
|
8
|
+
require 'rake/clean'
|
9
|
+
require 'rubygems/package_task'
|
10
|
+
|
11
|
+
require "#{PROJECT_NAME}/version"
|
12
|
+
|
13
|
+
CLOBBER.include("**/*.#{dlext}", "**/*~", "**/*#*", "**/*.log", "**/*.o")
|
14
|
+
CLEAN.include("ext/**/*.#{dlext}", "ext/**/*.log", "ext/**/*.o",
|
15
|
+
"ext/**/*~", "ext/**/*#*", "ext/**/*.obj", "**/*#*", "**/*#*.*",
|
16
|
+
"ext/**/*.def", "ext/**/*.pdb", "**/*_flymake*.*", "**/*_flymake", "**/*.rbc")
|
17
|
+
|
18
|
+
def apply_spec_defaults(s)
|
19
|
+
s.name = PROJECT_NAME
|
20
|
+
s.summary = "Retrieve the binding of a method's caller. Can also retrieve bindings even further up the stack."
|
21
|
+
s.version = BindingOfCaller::VERSION
|
22
|
+
s.date = Time.now.strftime '%Y-%m-%d'
|
23
|
+
s.author = "John Mair (banisterfiend)"
|
24
|
+
s.email = 'jrmair@gmail.com'
|
25
|
+
s.description = s.summary
|
26
|
+
s.require_path = 'lib'
|
27
|
+
s.add_development_dependency('bacon')
|
28
|
+
s.add_development_dependency('rake')
|
29
|
+
s.homepage = "http://github.com/banister/binding_of_caller"
|
30
|
+
s.has_rdoc = 'yard'
|
31
|
+
s.files = `git ls-files`.split("\n")
|
32
|
+
s.test_files = `git ls-files -- test/*`.split("\n")
|
33
|
+
end
|
34
|
+
|
35
|
+
desc "Show version"
|
36
|
+
task :version do
|
37
|
+
puts "BindingOfCaller version: #{BindingOfCaller::VERSION}"
|
38
|
+
end
|
39
|
+
|
40
|
+
desc "run tests"
|
41
|
+
task :default => [:test]
|
42
|
+
|
43
|
+
desc "Run tests"
|
44
|
+
task :test do
|
45
|
+
unless defined?(Rubinius)
|
46
|
+
Rake::Task['compile'].execute
|
47
|
+
end
|
48
|
+
|
49
|
+
$stdout.puts("\033[33m")
|
50
|
+
sh "bacon -Itest -rubygems -a -q"
|
51
|
+
$stdout.puts("\033[0m")
|
52
|
+
|
53
|
+
unless defined?(Rubinius)
|
54
|
+
Rake::Task['cleanup'].execute
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
task :pry do
|
59
|
+
puts "loading binding_of_caller into pry"
|
60
|
+
sh "pry -r ./lib/binding_of_caller"
|
61
|
+
end
|
62
|
+
|
63
|
+
desc "generate gemspec"
|
64
|
+
task :gemspec => "ruby:gemspec"
|
65
|
+
|
66
|
+
namespace :ruby do
|
67
|
+
spec = Gem::Specification.new do |s|
|
68
|
+
apply_spec_defaults(s)
|
69
|
+
s.platform = Gem::Platform::RUBY
|
70
|
+
s.extensions = ["ext/#{PROJECT_NAME}/extconf.rb"]
|
71
|
+
end
|
72
|
+
|
73
|
+
Gem::PackageTask.new(spec) do |pkg|
|
74
|
+
pkg.need_zip = false
|
75
|
+
pkg.need_tar = false
|
76
|
+
end
|
77
|
+
|
78
|
+
desc "Generate gemspec file"
|
79
|
+
task :gemspec do
|
80
|
+
File.open("#{spec.name}.gemspec", "w") do |f|
|
81
|
+
f << spec.to_ruby
|
82
|
+
end
|
83
|
+
end
|
84
|
+
end
|
85
|
+
|
86
|
+
# namespace :rbx do
|
87
|
+
# spec = Gem::Specification.new do |s|
|
88
|
+
# apply_spec_defaults(s)
|
89
|
+
# s.platform = Gem::Platform::RUBY #.new(["universal", "rubinius"])
|
90
|
+
# end
|
91
|
+
|
92
|
+
# Gem::PackageTask.new(spec) do |pkg|
|
93
|
+
# pkg.need_zip = false
|
94
|
+
# pkg.need_tar = false
|
95
|
+
# end
|
96
|
+
# end
|
97
|
+
|
98
|
+
desc "build the binaries"
|
99
|
+
task :compile do
|
100
|
+
chdir "./ext/#{PROJECT_NAME}/" do
|
101
|
+
sh "ruby extconf.rb"
|
102
|
+
sh "make clean"
|
103
|
+
sh "make"
|
104
|
+
sh "cp *.#{dlext} ../../lib/"
|
105
|
+
end
|
106
|
+
end
|
107
|
+
|
108
|
+
desc 'cleanup the extensions'
|
109
|
+
task :cleanup do
|
110
|
+
sh 'rm -rf lib/binding_of_caller.so'
|
111
|
+
chdir "./ext/#{PROJECT_NAME}/" do
|
112
|
+
sh 'make clean'
|
113
|
+
end
|
114
|
+
end
|
115
|
+
|
116
|
+
desc "reinstall gem"
|
117
|
+
task :reinstall => :gems do
|
118
|
+
sh "gem uninstall binding_of_caller" rescue nil
|
119
|
+
sh "gem install #{direc}/pkg/#{PROJECT_NAME}-#{BindingOfCaller::VERSION}.gem"
|
120
|
+
end
|
121
|
+
|
122
|
+
desc "build all platform gems at once"
|
123
|
+
task :gems => [:clean, :rmgems, "ruby:gem"]
|
124
|
+
|
125
|
+
task :gem => [:gems]
|
126
|
+
|
127
|
+
desc "remove all platform gems"
|
128
|
+
task :rmgems => ["ruby:clobber_package"]
|
129
|
+
|
130
|
+
desc "build and push latest gems"
|
131
|
+
task :pushgems => :gems do
|
132
|
+
chdir("./pkg") do
|
133
|
+
Dir["*.gem"].each do |gemfile|
|
134
|
+
sh "gem push #{gemfile}"
|
135
|
+
end
|
136
|
+
end
|
137
|
+
end
|
data/binding_of_caller.gemspec
CHANGED
@@ -2,15 +2,15 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = "binding_of_caller"
|
5
|
-
s.version = "0.6.
|
5
|
+
s.version = "0.6.5"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = ["John Mair (banisterfiend)"]
|
9
|
-
s.date = "2012-
|
9
|
+
s.date = "2012-03-01"
|
10
10
|
s.description = "Retrieve the binding of a method's caller. Can also retrieve bindings even further up the stack."
|
11
11
|
s.email = "jrmair@gmail.com"
|
12
12
|
s.extensions = ["ext/binding_of_caller/extconf.rb"]
|
13
|
-
s.files = [".gemtest", ".gitignore", ".travis.yml", ".yardopts", "Gemfile", "HISTORY", "LICENSE", "README.md", "Rakefile", "binding_of_caller.gemspec", "examples/example.rb", "ext/binding_of_caller/binding_of_caller.c", "ext/binding_of_caller/extconf.rb", "ext/binding_of_caller/ruby_headers/192/debug.h", "ext/binding_of_caller/ruby_headers/192/dln.h", "ext/binding_of_caller/ruby_headers/192/eval_intern.h", "ext/binding_of_caller/ruby_headers/192/gc.h", "ext/binding_of_caller/ruby_headers/192/id.h", "ext/binding_of_caller/ruby_headers/192/iseq.h", "ext/binding_of_caller/ruby_headers/192/method.h", "ext/binding_of_caller/ruby_headers/192/node.h", "ext/binding_of_caller/ruby_headers/192/regenc.h", "ext/binding_of_caller/ruby_headers/192/regint.h", "ext/binding_of_caller/ruby_headers/192/regparse.h", "ext/binding_of_caller/ruby_headers/192/thread_pthread.h", "ext/binding_of_caller/ruby_headers/192/thread_win32.h", "ext/binding_of_caller/ruby_headers/192/timev.h", "ext/binding_of_caller/ruby_headers/192/transcode_data.h", "ext/binding_of_caller/ruby_headers/192/version.h", "ext/binding_of_caller/ruby_headers/192/vm_core.h", "ext/binding_of_caller/ruby_headers/192/vm_exec.h", "ext/binding_of_caller/ruby_headers/192/vm_insnhelper.h", "ext/binding_of_caller/ruby_headers/192/vm_opts.h", "ext/binding_of_caller/ruby_headers/193/addr2line.h", "ext/binding_of_caller/ruby_headers/193/atomic.h", "ext/binding_of_caller/ruby_headers/193/constant.h", "ext/binding_of_caller/ruby_headers/193/debug.h", "ext/binding_of_caller/ruby_headers/193/dln.h", "ext/binding_of_caller/ruby_headers/193/encdb.h", "ext/binding_of_caller/ruby_headers/193/eval_intern.h", "ext/binding_of_caller/ruby_headers/193/gc.h", "ext/binding_of_caller/ruby_headers/193/id.h", "ext/binding_of_caller/ruby_headers/193/internal.h", "ext/binding_of_caller/ruby_headers/193/iseq.h", "ext/binding_of_caller/ruby_headers/193/method.h", "ext/binding_of_caller/ruby_headers/193/node.h", "ext/binding_of_caller/ruby_headers/193/parse.h", "ext/binding_of_caller/ruby_headers/193/regenc.h", "ext/binding_of_caller/ruby_headers/193/regint.h", "ext/binding_of_caller/ruby_headers/193/regparse.h", "ext/binding_of_caller/ruby_headers/193/revision.h", "ext/binding_of_caller/ruby_headers/193/thread_pthread.h", "ext/binding_of_caller/ruby_headers/193/thread_win32.h", "ext/binding_of_caller/ruby_headers/193/timev.h", "ext/binding_of_caller/ruby_headers/193/transcode_data.h", "ext/binding_of_caller/ruby_headers/193/transdb.h", "ext/binding_of_caller/ruby_headers/193/version.h", "ext/binding_of_caller/ruby_headers/193/vm_core.h", "ext/binding_of_caller/ruby_headers/193/vm_exec.h", "ext/binding_of_caller/ruby_headers/193/vm_insnhelper.h", "ext/binding_of_caller/ruby_headers/193/vm_opts.h", "lib/binding_of_caller.
|
13
|
+
s.files = [".gemtest", ".gitignore", ".travis.yml", ".yardopts", "Gemfile", "HISTORY", "LICENSE", "README.md", "Rakefile", "binding_of_caller.gemspec", "examples/example.rb", "ext/binding_of_caller/binding_of_caller.c", "ext/binding_of_caller/extconf.rb", "ext/binding_of_caller/ruby_headers/192/debug.h", "ext/binding_of_caller/ruby_headers/192/dln.h", "ext/binding_of_caller/ruby_headers/192/eval_intern.h", "ext/binding_of_caller/ruby_headers/192/gc.h", "ext/binding_of_caller/ruby_headers/192/id.h", "ext/binding_of_caller/ruby_headers/192/iseq.h", "ext/binding_of_caller/ruby_headers/192/method.h", "ext/binding_of_caller/ruby_headers/192/node.h", "ext/binding_of_caller/ruby_headers/192/regenc.h", "ext/binding_of_caller/ruby_headers/192/regint.h", "ext/binding_of_caller/ruby_headers/192/regparse.h", "ext/binding_of_caller/ruby_headers/192/thread_pthread.h", "ext/binding_of_caller/ruby_headers/192/thread_win32.h", "ext/binding_of_caller/ruby_headers/192/timev.h", "ext/binding_of_caller/ruby_headers/192/transcode_data.h", "ext/binding_of_caller/ruby_headers/192/version.h", "ext/binding_of_caller/ruby_headers/192/vm_core.h", "ext/binding_of_caller/ruby_headers/192/vm_exec.h", "ext/binding_of_caller/ruby_headers/192/vm_insnhelper.h", "ext/binding_of_caller/ruby_headers/192/vm_opts.h", "ext/binding_of_caller/ruby_headers/193/addr2line.h", "ext/binding_of_caller/ruby_headers/193/atomic.h", "ext/binding_of_caller/ruby_headers/193/constant.h", "ext/binding_of_caller/ruby_headers/193/debug.h", "ext/binding_of_caller/ruby_headers/193/dln.h", "ext/binding_of_caller/ruby_headers/193/encdb.h", "ext/binding_of_caller/ruby_headers/193/eval_intern.h", "ext/binding_of_caller/ruby_headers/193/gc.h", "ext/binding_of_caller/ruby_headers/193/id.h", "ext/binding_of_caller/ruby_headers/193/internal.h", "ext/binding_of_caller/ruby_headers/193/iseq.h", "ext/binding_of_caller/ruby_headers/193/method.h", "ext/binding_of_caller/ruby_headers/193/node.h", "ext/binding_of_caller/ruby_headers/193/parse.h", "ext/binding_of_caller/ruby_headers/193/regenc.h", "ext/binding_of_caller/ruby_headers/193/regint.h", "ext/binding_of_caller/ruby_headers/193/regparse.h", "ext/binding_of_caller/ruby_headers/193/revision.h", "ext/binding_of_caller/ruby_headers/193/thread_pthread.h", "ext/binding_of_caller/ruby_headers/193/thread_win32.h", "ext/binding_of_caller/ruby_headers/193/timev.h", "ext/binding_of_caller/ruby_headers/193/transcode_data.h", "ext/binding_of_caller/ruby_headers/193/transdb.h", "ext/binding_of_caller/ruby_headers/193/version.h", "ext/binding_of_caller/ruby_headers/193/vm_core.h", "ext/binding_of_caller/ruby_headers/193/vm_exec.h", "ext/binding_of_caller/ruby_headers/193/vm_insnhelper.h", "ext/binding_of_caller/ruby_headers/193/vm_opts.h", "lib/binding_of_caller.rb", "lib/binding_of_caller/version.rb", "test/test_binding_of_caller.rb"]
|
14
14
|
s.homepage = "http://github.com/banister/binding_of_caller"
|
15
15
|
s.require_paths = ["lib"]
|
16
16
|
s.rubygems_version = "1.8.12"
|
@@ -21,14 +21,14 @@ Gem::Specification.new do |s|
|
|
21
21
|
s.specification_version = 3
|
22
22
|
|
23
23
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
24
|
-
s.add_development_dependency(%q<bacon>, ["
|
25
|
-
s.add_development_dependency(%q<rake>, ["
|
24
|
+
s.add_development_dependency(%q<bacon>, [">= 0"])
|
25
|
+
s.add_development_dependency(%q<rake>, [">= 0"])
|
26
26
|
else
|
27
|
-
s.add_dependency(%q<bacon>, ["
|
28
|
-
s.add_dependency(%q<rake>, ["
|
27
|
+
s.add_dependency(%q<bacon>, [">= 0"])
|
28
|
+
s.add_dependency(%q<rake>, [">= 0"])
|
29
29
|
end
|
30
30
|
else
|
31
|
-
s.add_dependency(%q<bacon>, ["
|
32
|
-
s.add_dependency(%q<rake>, ["
|
31
|
+
s.add_dependency(%q<bacon>, [">= 0"])
|
32
|
+
s.add_dependency(%q<rake>, [">= 0"])
|
33
33
|
end
|
34
34
|
end
|
data/lib/binding_of_caller.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: binding_of_caller
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 867174472507041046
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 6
|
9
|
-
-
|
10
|
-
version: 0.6.
|
9
|
+
- 5
|
10
|
+
version: 0.6.5
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- John Mair (banisterfiend)
|
@@ -23,13 +23,12 @@ dependencies:
|
|
23
23
|
requirement: &id001 !ruby/object:Gem::Requirement
|
24
24
|
none: false
|
25
25
|
requirements:
|
26
|
-
- -
|
26
|
+
- - ">="
|
27
27
|
- !ruby/object:Gem::Version
|
28
|
-
hash:
|
28
|
+
hash: 2002549777813010636
|
29
29
|
segments:
|
30
|
-
-
|
31
|
-
|
32
|
-
version: "1.1"
|
30
|
+
- 0
|
31
|
+
version: "0"
|
33
32
|
type: :development
|
34
33
|
version_requirements: *id001
|
35
34
|
- !ruby/object:Gem::Dependency
|
@@ -38,13 +37,12 @@ dependencies:
|
|
38
37
|
requirement: &id002 !ruby/object:Gem::Requirement
|
39
38
|
none: false
|
40
39
|
requirements:
|
41
|
-
- -
|
40
|
+
- - ">="
|
42
41
|
- !ruby/object:Gem::Version
|
43
|
-
hash:
|
42
|
+
hash: 2002549777813010636
|
44
43
|
segments:
|
45
44
|
- 0
|
46
|
-
|
47
|
-
version: "0.9"
|
45
|
+
version: "0"
|
48
46
|
type: :development
|
49
47
|
version_requirements: *id002
|
50
48
|
description: Retrieve the binding of a method's caller. Can also retrieve bindings even further up the stack.
|
@@ -117,10 +115,8 @@ files:
|
|
117
115
|
- ext/binding_of_caller/ruby_headers/193/vm_exec.h
|
118
116
|
- ext/binding_of_caller/ruby_headers/193/vm_insnhelper.h
|
119
117
|
- ext/binding_of_caller/ruby_headers/193/vm_opts.h
|
120
|
-
- lib/binding_of_caller.bundle
|
121
118
|
- lib/binding_of_caller.rb
|
122
119
|
- lib/binding_of_caller/version.rb
|
123
|
-
- lib/tester.rb
|
124
120
|
- test/test_binding_of_caller.rb
|
125
121
|
homepage: http://github.com/banister/binding_of_caller
|
126
122
|
licenses: []
|
Binary file
|