binding_of_caller 0.7.1 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (70) hide show
  1. checksums.yaml +5 -5
  2. data/.gemtest +0 -0
  3. data/.github/workflows/test.yml +103 -0
  4. data/.gitignore +13 -7
  5. data/.yardopts +0 -0
  6. data/Gemfile +6 -1
  7. data/HISTORY +35 -0
  8. data/LICENSE +0 -0
  9. data/README.md +19 -7
  10. data/Rakefile +4 -132
  11. data/binding_of_caller.gemspec +33 -35
  12. data/lib/binding_of_caller.rb +9 -10
  13. data/lib/binding_of_caller/jruby_interpreted.rb +123 -0
  14. data/lib/binding_of_caller/{mri2.rb → mri.rb} +9 -15
  15. data/lib/binding_of_caller/rubinius.rb +26 -36
  16. data/lib/binding_of_caller/version.rb +1 -1
  17. metadata +34 -109
  18. data/.travis.yml +0 -22
  19. data/examples/example.rb +0 -41
  20. data/ext/binding_of_caller/binding_of_caller.c +0 -225
  21. data/ext/binding_of_caller/extconf.rb +0 -33
  22. data/ext/binding_of_caller/ruby_headers/192/debug.h +0 -36
  23. data/ext/binding_of_caller/ruby_headers/192/dln.h +0 -41
  24. data/ext/binding_of_caller/ruby_headers/192/eval_intern.h +0 -232
  25. data/ext/binding_of_caller/ruby_headers/192/gc.h +0 -77
  26. data/ext/binding_of_caller/ruby_headers/192/id.h +0 -173
  27. data/ext/binding_of_caller/ruby_headers/192/iseq.h +0 -104
  28. data/ext/binding_of_caller/ruby_headers/192/method.h +0 -103
  29. data/ext/binding_of_caller/ruby_headers/192/node.h +0 -483
  30. data/ext/binding_of_caller/ruby_headers/192/regenc.h +0 -211
  31. data/ext/binding_of_caller/ruby_headers/192/regint.h +0 -841
  32. data/ext/binding_of_caller/ruby_headers/192/regparse.h +0 -354
  33. data/ext/binding_of_caller/ruby_headers/192/thread_pthread.h +0 -27
  34. data/ext/binding_of_caller/ruby_headers/192/thread_win32.h +0 -33
  35. data/ext/binding_of_caller/ruby_headers/192/timev.h +0 -21
  36. data/ext/binding_of_caller/ruby_headers/192/transcode_data.h +0 -109
  37. data/ext/binding_of_caller/ruby_headers/192/version.h +0 -63
  38. data/ext/binding_of_caller/ruby_headers/192/vm_core.h +0 -703
  39. data/ext/binding_of_caller/ruby_headers/192/vm_exec.h +0 -184
  40. data/ext/binding_of_caller/ruby_headers/192/vm_insnhelper.h +0 -208
  41. data/ext/binding_of_caller/ruby_headers/192/vm_opts.h +0 -51
  42. data/ext/binding_of_caller/ruby_headers/193/addr2line.h +0 -21
  43. data/ext/binding_of_caller/ruby_headers/193/atomic.h +0 -56
  44. data/ext/binding_of_caller/ruby_headers/193/constant.h +0 -34
  45. data/ext/binding_of_caller/ruby_headers/193/debug.h +0 -41
  46. data/ext/binding_of_caller/ruby_headers/193/dln.h +0 -50
  47. data/ext/binding_of_caller/ruby_headers/193/encdb.h +0 -167
  48. data/ext/binding_of_caller/ruby_headers/193/eval_intern.h +0 -234
  49. data/ext/binding_of_caller/ruby_headers/193/gc.h +0 -98
  50. data/ext/binding_of_caller/ruby_headers/193/id.h +0 -175
  51. data/ext/binding_of_caller/ruby_headers/193/internal.h +0 -227
  52. data/ext/binding_of_caller/ruby_headers/193/iseq.h +0 -125
  53. data/ext/binding_of_caller/ruby_headers/193/method.h +0 -105
  54. data/ext/binding_of_caller/ruby_headers/193/node.h +0 -503
  55. data/ext/binding_of_caller/ruby_headers/193/parse.h +0 -186
  56. data/ext/binding_of_caller/ruby_headers/193/regenc.h +0 -219
  57. data/ext/binding_of_caller/ruby_headers/193/regint.h +0 -851
  58. data/ext/binding_of_caller/ruby_headers/193/regparse.h +0 -362
  59. data/ext/binding_of_caller/ruby_headers/193/revision.h +0 -1
  60. data/ext/binding_of_caller/ruby_headers/193/thread_pthread.h +0 -51
  61. data/ext/binding_of_caller/ruby_headers/193/thread_win32.h +0 -40
  62. data/ext/binding_of_caller/ruby_headers/193/timev.h +0 -21
  63. data/ext/binding_of_caller/ruby_headers/193/transcode_data.h +0 -117
  64. data/ext/binding_of_caller/ruby_headers/193/transdb.h +0 -189
  65. data/ext/binding_of_caller/ruby_headers/193/version.h +0 -52
  66. data/ext/binding_of_caller/ruby_headers/193/vm_core.h +0 -755
  67. data/ext/binding_of_caller/ruby_headers/193/vm_exec.h +0 -184
  68. data/ext/binding_of_caller/ruby_headers/193/vm_insnhelper.h +0 -220
  69. data/ext/binding_of_caller/ruby_headers/193/vm_opts.h +0 -51
  70. data/test/test_binding_of_caller.rb +0 -149
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: eb405aa7190a04a128baff727db90ef40ae1468c
4
- data.tar.gz: 43cc746def25b335c279df78b070d926bdb43ebc
2
+ SHA256:
3
+ metadata.gz: 25a588cad50a78180a488286806d6b5c8d0f2864426d4b496046fdbe6af8a102
4
+ data.tar.gz: dc2c3f0ca27db62f5ea170ee471c4a1342f955b7f3e0f7fdfdaef2492c984031
5
5
  SHA512:
6
- metadata.gz: 2352e3c209510a9bed92399403425165c3b18bdaa559803d6a042ff5b98b52e70fb9b299236dad9d9895e06b533bcee7a3f1952bd8e7fea972d944b244e8e345
7
- data.tar.gz: 7e47b06c1867cec238f1a772a8659acc738b328fd4425601b7a0bb7ce55925be0ebbbee43709bc453efef4ba41e989eed560d6ed7232fc030b83b2c17185910a
6
+ metadata.gz: 5dc8dfc7d1b014e12f0fde271d9822da537d3a3e230bba5569e3cce5af7cc89841bd798a6e03ca6b3d8063d2113621892079a0bdc1f31a2d8cc80fcf5dcaa522
7
+ data.tar.gz: 89d5fc7e71b1138db085625d671b164234832b5942ad5c16e9ead8c20abc2b13caf1fa0ccab64e082e3ddc76af312db4fa778c8c26a52edcad6c91f9359ba45c
data/.gemtest CHANGED
File without changes
@@ -0,0 +1,103 @@
1
+ name: Test
2
+
3
+ on:
4
+ push:
5
+ branches: [ master ]
6
+ schedule:
7
+ - cron: '0 0 11,25 * *' # roughly every two weeks to run on new Ruby versions
8
+ pull_request:
9
+ branches: [ master ]
10
+ workflow_dispatch:
11
+
12
+ jobs:
13
+ test:
14
+ name: "Unit"
15
+ runs-on: ubuntu-latest
16
+ strategy:
17
+ fail-fast: false
18
+ matrix:
19
+ ruby:
20
+ - "2.1"
21
+ - "2.2"
22
+ - "2.3"
23
+ - "2.4"
24
+ - "2.5"
25
+ - "2.6"
26
+ - "2.7"
27
+ - "3.0"
28
+
29
+ steps:
30
+
31
+ - uses: actions/checkout@v2
32
+
33
+ - name: Set up Ruby
34
+ uses: ruby/setup-ruby@v1
35
+ with:
36
+ ruby-version: ${{ matrix.ruby }}
37
+ bundler-cache: true
38
+
39
+ - name: Test
40
+ run: bundle exec rspec -f doc
41
+
42
+ system:
43
+ name: "System"
44
+ runs-on: ${{ matrix.os }}
45
+ strategy:
46
+ fail-fast: false
47
+ matrix:
48
+ os:
49
+ - macos-latest
50
+ - ubuntu-latest
51
+ - windows-latest
52
+ ruby:
53
+ - "2"
54
+ - "3.0"
55
+ - "jruby"
56
+ - "truffleruby"
57
+ exclude:
58
+ # Windows releases of jruby and truffleruby have issues. Skip them for now.
59
+ - { ruby: "jruby", os: "windows-latest" }
60
+ - { ruby: "truffleruby", os: "windows-latest" }
61
+
62
+ steps:
63
+
64
+ - uses: actions/checkout@v2
65
+
66
+ - name: Determine ruby version name
67
+ id: ruby_version
68
+ run: |
69
+ if [[ $OS == 'windows-latest' && $RUBY == '3.0' ]]; then
70
+ # Windows doesn't have 3.0, so run head there but nowhere else.
71
+ echo "::set-output name=release::head"
72
+ else
73
+ echo "::set-output name=release::$RUBY"
74
+ fi
75
+ shell: bash
76
+ env:
77
+ OS: ${{ matrix.os }}
78
+ RUBY: ${{ matrix.ruby }}
79
+
80
+ - name: Set up Ruby
81
+ uses: ruby/setup-ruby@v1
82
+ with:
83
+ ruby-version: ${{ steps.ruby_version.outputs.release }}
84
+ bundler-cache: true
85
+
86
+ - name: Install gem
87
+ run: bundle exec rake install
88
+
89
+ - name: Create directory for gem test
90
+ run: mkdir -p tmp/gem-test
91
+
92
+ - name: Create test Gemfile
93
+ run: echo "gem 'binding_of_caller'" > Gemfile
94
+ working-directory: ./tmp/gem-test
95
+
96
+ - name: Test gem load
97
+ run: bundle exec ruby -e "require 'binding_of_caller'"
98
+
99
+ - name: Test gem functionality
100
+ if: ${{ matrix.ruby != 'jruby' && matrix.ruby != 'truffleruby' }}
101
+ run: bundle exec ruby -e "require 'binding_of_caller'; binding.of_caller(0).eval('var = :hello')"
102
+ env:
103
+ JRUBY_OPTS: "--dev" # This will support JRuby once the gem is updated to support JRuby 9.x
data/.gitignore CHANGED
@@ -1,7 +1,13 @@
1
- Makefile
2
- *.so
3
- *.o
4
- *.def
5
- doc/
6
- pkg/
7
- .yardoc/
1
+ Gemfile.lock
2
+
3
+ /.bundle/
4
+ /.yardoc
5
+ /_yardoc/
6
+ /coverage/
7
+ /doc/
8
+ /pkg/
9
+ /spec/reports/
10
+ /tmp/
11
+
12
+ # rspec failure tracking
13
+ .rspec_status
data/.yardopts CHANGED
File without changes
data/Gemfile CHANGED
@@ -1,2 +1,7 @@
1
- source :rubygems
1
+ source "https://rubygems.org"
2
+
3
+ # Specify your gem's dependencies in binding_of_caller.gemspec
2
4
  gemspec
5
+
6
+ gem "rake"
7
+ gem "rspec"
data/HISTORY CHANGED
@@ -0,0 +1,35 @@
1
+ ## 0.7.3.pre1 / 2014-08-20
2
+
3
+ This release includes compatibility fixes for different ruby versions
4
+ and some minor enhancements.
5
+
6
+ * C Extensions are only compiled on MRI 1.9.x.
7
+
8
+ For MRI >= 2 the native API is used, so this should speedup
9
+ installation.
10
+
11
+ For JRuby this will avoid crashes on gem installation.
12
+
13
+ This was alredy being checked for Rubinius.
14
+
15
+ *Amadeus Folego*
16
+
17
+ * Added experimental JRuby support for 1.7.x series.
18
+
19
+ Only the main API is implemented and `Binding#eval` is
20
+ monkey-patched as it is private on JRuby.
21
+
22
+ This requires the compiler to be run on interpreted mode,
23
+ otherwise an exception will be thrown when `of_caller` is called.
24
+
25
+ *Charles Nutter*
26
+
27
+ * Remove executability from non-executable files.
28
+
29
+ *David Celis*
30
+
31
+ * Test and notice MRI 2.1 as a working Ruby implementation.
32
+
33
+ *Lennart Fridén*
34
+
35
+ ## 0.7.2 / 2013-06-07
data/LICENSE CHANGED
File without changes
data/README.md CHANGED
@@ -1,11 +1,12 @@
1
- [![Build Status](https://secure.travis-ci.org/banister/binding_of_caller.png)](http://travis-ci.org/banister/binding_of_caller)
1
+ [![Build Status](https://github.com/banister/binding_of_caller/workflows/Test/badge.svg?branch=master&event=push)](https://github.com/banister/binding_of_caller/actions?query=branch%3Amaster)
2
+ [![Gem Version](https://img.shields.io/gem/v/binding_of_caller.svg)](https://rubygems.org/gems/binding_of_caller)
2
3
 
3
4
  binding_of_caller
4
- ===========
5
+ =================
5
6
 
6
- (C) John Mair (banisterfiend) 2011
7
+ (C) John Mair (banisterfiend) 2012
7
8
 
8
- _Retrieve the binding of a method's caller in MRI 1.9.2+, and RBX (Rubinius)_
9
+ _Retrieve the binding of a method's caller in MRI (>= 2.0.0) and RBX (Rubinius)_
9
10
 
10
11
  The `binding_of_caller` gem provides the `Binding#of_caller` method.
11
12
 
@@ -15,7 +16,7 @@ call stack, not limited to just the immediate caller.
15
16
 
16
17
  **Recommended for use only in debugging situations. Do not use this in production apps.**
17
18
 
18
- **Only works in MRI Ruby 1.9.2, 1.9.3 and RBX (Rubinius)**
19
+ **Works in MRI Ruby (>= 2.0) and RBX (Rubinius)**
19
20
 
20
21
  * Install the [gem](https://rubygems.org/gems/binding_of_caller): `gem install binding_of_caller`
21
22
  * See the [source code](http://github.com/banister/binding_of_caller)
@@ -52,8 +53,19 @@ This project is a spinoff from the [Pry REPL project.](http://pry.github.com)
52
53
  Features and limitations
53
54
  -------------------------
54
55
 
55
- * Only works with MRI 1.9.2, 1.9.3 and RBX (Rubinius)
56
+ * Works in MRI (>= 2.0.0) and RBX (Rubinius)
57
+ * For MRI 1.9.x, use version "~> 0.8" of the gem, which included support for MRI before 2.0.
56
58
  * Does not work in 1.8.7, but there is a well known (continuation-based) hack to get a `Binding#of_caller` there.
59
+ * There is experimental support for jruby 1.7.x, but it only works in interpreted
60
+ mode (i.e. use the option `-Djruby.compile.mode=OFF` or append
61
+ `compile.mode=OFF` to your `.jrubyrc`)
62
+
63
+ Development
64
+ -----------
65
+
66
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
67
+
68
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
57
69
 
58
70
  Contact
59
71
  -------
@@ -66,7 +78,7 @@ License
66
78
 
67
79
  (The MIT License)
68
80
 
69
- Copyright (c) 2011 (John Mair)
81
+ Copyright (c) 2012 (John Mair)
70
82
 
71
83
  Permission is hereby granted, free of charge, to any person obtaining
72
84
  a copy of this software and associated documentation files (the
data/Rakefile CHANGED
@@ -1,134 +1,6 @@
1
- dlext = RbConfig::CONFIG['DLEXT']
2
- direc = File.dirname(__FILE__)
1
+ require "bundler/gem_tasks"
2
+ require "rspec/core/rake_task"
3
3
 
4
- $:.unshift 'lib'
4
+ RSpec::Core::RakeTask.new(:spec)
5
5
 
6
- require 'rake/clean'
7
- require 'rubygems/package_task'
8
-
9
- require "binding_of_caller/version"
10
-
11
- CLOBBER.include("**/*.#{dlext}", "**/*~", "**/*#*", "**/*.log", "**/*.o")
12
- CLEAN.include("ext/**/*.#{dlext}", "ext/**/*.log", "ext/**/*.o",
13
- "ext/**/*~", "ext/**/*#*", "ext/**/*.obj", "**/*#*", "**/*#*.*",
14
- "ext/**/*.def", "ext/**/*.pdb", "**/*_flymake*.*", "**/*_flymake", "**/*.rbc")
15
-
16
- def mri_2?
17
- defined?(RUBY_ENGINE) && RUBY_ENGINE == "ruby" &&
18
- RUBY_VERSION =~ /^2/
19
- end
20
-
21
- def apply_spec_defaults(s)
22
- s.name = "binding_of_caller"
23
- s.summary = "Retrieve the binding of a method's caller. Can also retrieve bindings even further up the stack."
24
- s.version = BindingOfCaller::VERSION
25
- s.date = Time.now.strftime '%Y-%m-%d'
26
- s.author = "John Mair (banisterfiend)"
27
- s.email = 'jrmair@gmail.com'
28
- s.description = s.summary
29
- s.require_path = 'lib'
30
- s.add_dependency 'debug_inspector', '>= 0.0.1'
31
- s.add_development_dependency 'bacon'
32
- s.add_development_dependency 'rake'
33
- s.homepage = "http://github.com/banister/binding_of_caller"
34
- s.has_rdoc = 'yard'
35
- s.files = `git ls-files`.split("\n")
36
- s.test_files = `git ls-files -- test/*`.split("\n")
37
- end
38
-
39
- desc "Show version"
40
- task :version do
41
- puts "BindingOfCaller version: #{BindingOfCaller::VERSION}"
42
- end
43
-
44
- desc "run tests"
45
- task :default => [:test]
46
-
47
- desc "Run tests"
48
- task :test do
49
- unless defined?(Rubinius)
50
- Rake::Task['compile'].execute
51
- end
52
-
53
- $stdout.puts("\033[33m")
54
- sh "bacon -Itest -rubygems -a -q"
55
- $stdout.puts("\033[0m")
56
-
57
- unless defined?(Rubinius)
58
- Rake::Task['cleanup'].execute
59
- end
60
- end
61
-
62
- task :pry do
63
- puts "loading binding_of_caller into pry"
64
- sh "pry -r ./lib/binding_of_caller"
65
- end
66
-
67
- desc "generate gemspec"
68
- task :gemspec => "ruby:gemspec"
69
-
70
- namespace :ruby do
71
- spec = Gem::Specification.new do |s|
72
- apply_spec_defaults(s)
73
- s.platform = Gem::Platform::RUBY
74
- s.extensions = ["ext/binding_of_caller/extconf.rb"]
75
- end
76
-
77
- Gem::PackageTask.new(spec) do |pkg|
78
- pkg.need_zip = false
79
- pkg.need_tar = false
80
- end
81
-
82
- desc "Generate gemspec file"
83
- task :gemspec do
84
- File.open("#{spec.name}.gemspec", "w") do |f|
85
- f << spec.to_ruby
86
- end
87
- end
88
- end
89
-
90
- desc "build the binaries"
91
- task :compile => :cleanup do
92
- if !mri_2?
93
- chdir "./ext/binding_of_caller/" do
94
- sh "ruby extconf.rb"
95
- sh "make"
96
- sh "cp *.#{dlext} ../../lib/"
97
- end
98
- end
99
- end
100
-
101
- desc 'cleanup the extensions'
102
- task :cleanup do
103
- if !mri_2?
104
- sh 'rm -rf lib/binding_of_caller.so'
105
- chdir "./ext/binding_of_caller/" do
106
- sh 'make clean'
107
- end
108
- end
109
- end
110
-
111
- desc "reinstall gem"
112
- task :reinstall => :gems do
113
- sh "gem uninstall binding_of_caller" rescue nil
114
- sh "gem install #{direc}/pkg/binding_of_caller-#{BindingOfCaller::VERSION}.gem"
115
- end
116
-
117
- task :install => :reinstall
118
-
119
- desc "build all platform gems at once"
120
- task :gems => [:clean, :rmgems, "ruby:gem"]
121
-
122
- task :gem => [:gems]
123
-
124
- desc "remove all platform gems"
125
- task :rmgems => ["ruby:clobber_package"]
126
-
127
- desc "build and push latest gems"
128
- task :pushgems => :gems do
129
- chdir("./pkg") do
130
- Dir["*.gem"].each do |gemfile|
131
- sh "gem push #{gemfile}"
132
- end
133
- end
134
- end
6
+ task :default => :spec
@@ -1,37 +1,35 @@
1
- # -*- encoding: utf-8 -*-
2
-
3
- Gem::Specification.new do |s|
4
- s.name = "binding_of_caller"
5
- s.version = "0.6.9"
6
-
7
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
- s.authors = ["John Mair (banisterfiend)"]
9
- s.date = "2013-02-14"
10
- s.description = "Retrieve the binding of a method's caller. Can also retrieve bindings even further up the stack."
11
- s.email = "jrmair@gmail.com"
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.rb", "lib/binding_of_caller/mri2.rb", "lib/binding_of_caller/rubinius.rb", "lib/binding_of_caller/version.rb", "test/test_binding_of_caller.rb"]
14
- s.homepage = "http://github.com/banister/binding_of_caller"
15
- s.require_paths = ["lib"]
16
- s.rubygems_version = "2.0.0.rc.2"
17
- s.summary = "Retrieve the binding of a method's caller. Can also retrieve bindings even further up the stack."
18
- s.test_files = ["test/test_binding_of_caller.rb"]
19
-
20
- if s.respond_to? :specification_version then
21
- s.specification_version = 4
22
-
23
- if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
24
- s.add_runtime_dependency(%q<debug_inspector>, [">= 0.0.1"])
25
- s.add_development_dependency(%q<bacon>, [">= 0"])
26
- s.add_development_dependency(%q<rake>, [">= 0"])
27
- else
28
- s.add_dependency(%q<debug_inspector>, [">= 0.0.1"])
29
- s.add_dependency(%q<bacon>, [">= 0"])
30
- s.add_dependency(%q<rake>, [">= 0"])
31
- end
32
- else
33
- s.add_dependency(%q<debug_inspector>, [">= 0.0.1"])
34
- s.add_dependency(%q<bacon>, [">= 0"])
35
- s.add_dependency(%q<rake>, [">= 0"])
1
+ require_relative 'lib/binding_of_caller/version'
2
+
3
+ Gem::Specification.new do |spec|
4
+ spec.name = "binding_of_caller"
5
+ spec.version = BindingOfCaller::VERSION
6
+ spec.authors = ["John Mair (banisterfiend)"]
7
+ spec.email = ["jrmair@gmail.com"]
8
+
9
+ spec.summary = %q{Retrieve the binding of a method's caller, or further up the stack.}
10
+ spec.description = <<-TXT
11
+ Provides the Binding#of_caller method.
12
+
13
+ Using binding_of_caller we can grab bindings from higher up the call stack and evaluate code in that context.
14
+ Allows access to bindings arbitrarily far up the call stack, not limited to just the immediate caller.
15
+
16
+ Recommended for use only in debugging situations. Do not use this in production apps.
17
+ TXT
18
+ spec.homepage = "https://github.com/banister/binding_of_caller"
19
+ spec.license = "MIT"
20
+ spec.required_ruby_version = Gem::Requirement.new(">= 2.0.0")
21
+
22
+ spec.metadata = {
23
+ "changelog_uri" => "https://github.com/banister/binding_of_caller/releases",
24
+ }
25
+
26
+ # Specify which files should be added to the gem when it is released.
27
+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
28
+ spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
29
+ `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|examples|bin)/}) }
36
30
  end
31
+
32
+ spec.require_paths = ["lib"]
33
+
34
+ spec.add_dependency "debug_inspector", ">= 0.0.1"
37
35
  end