bindex 0.4.0 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ee2e50960f0fc636073a2d4a2597d169fae84bf2
4
- data.tar.gz: d456453d22c61a8f19a6c8e1a73c149c7930a386
3
+ metadata.gz: 857f52564dd66e79ec532373cbd5d3a7bec278c8
4
+ data.tar.gz: ecc30849fa0053f3a5c81a5804e3c981472d672a
5
5
  SHA512:
6
- metadata.gz: 28100af5bd5b378da0a983d381c10f235ccfb98db38ad6513fa9ac5b793042f07c5755912fe8b1723c8b36438929a4b96aed02b64810fe5b6c6b4e2dda1ddd37
7
- data.tar.gz: da0c772ab6d28e3d1edfe1b2284c86fbf2d7a3cbca0a2a3d782807268b97ef2c95bcdd0d0b4e9a208458b0e1be8a181db76aa9af2a66df88915d943ee00eea2e
6
+ metadata.gz: 35cd0bb9a2e907f31ba7874b64b6169d6d1d6bee61e8c50cd5feb79a71f3ef2240448ff2993a800f9d9a9a8cd0ef3e1761a27d8d83a36d8afe6b849c4c6da085
7
+ data.tar.gz: 3c8bf3456eb32d37503a78fe0a6a01c80ec20f1ae2ff17139496508f0d8fc645f67451973723d0041325b818bd5629db878811c2ceefbbf5b1ca566e76acdb6d
data/.gitignore CHANGED
@@ -13,4 +13,3 @@
13
13
  *.a
14
14
  .ycm_extra_conf.py*
15
15
  mkmf.log
16
- ext/bindex/com/gsamokovarov/bindex/BindingBuilder.java
@@ -10,7 +10,6 @@ rvm:
10
10
  - ruby-head
11
11
 
12
12
  - jruby-9.1.8.0
13
- - jruby-1.7.26
14
13
  - jruby-head
15
14
 
16
15
  allow_failures:
@@ -19,7 +18,7 @@ allow_failures:
19
18
 
20
19
  env:
21
20
  global:
22
- - JRUBY_OPTS=-J-Djruby.compile.mode=OFF
21
+ - JRUBY_OPTS=--dev
23
22
 
24
23
  before_install: gem install bundler
25
24
 
@@ -1,4 +1,4 @@
1
- Copyright (c) 2014 Genadi Samokovarov
1
+ Copyright (c) 2014-2017 Genadi Samokovarov
2
2
 
3
3
  MIT License
4
4
 
data/README.md CHANGED
@@ -1,9 +1,9 @@
1
1
  # Bindex [![Build Status](https://travis-ci.org/gsamokovarov/bindex.svg?branch=master)](https://travis-ci.org/gsamokovarov/bindex)
2
2
 
3
- When Ruby raises an exception, it leaves you backtraces to help you figure out
3
+ When Ruby raises an exception, it leaves you a backtrace to help you figure out
4
4
  where did the exception originated in. Bindex gives you the bindings as well.
5
- This can help you introspect the state of the Ruby program when the exception
6
- happened.
5
+ This can help you introspect the state of the Ruby program when at the point
6
+ the exception occurred.
7
7
 
8
8
  ## Usage
9
9
 
@@ -20,7 +20,7 @@ Returns all the bindings up to the one in which the exception originated in.
20
20
 
21
21
  #### Bindex.current_bindings
22
22
 
23
- Returns all of the current Ruby execution state bindings. The first on is the
23
+ Returns all of the current Ruby execution state bindings. The first one is the
24
24
  current one, the second is the caller one, the third is the caller of the
25
25
  caller one and so on.
26
26
 
@@ -28,19 +28,18 @@ caller one and so on.
28
28
 
29
29
  ### CRuby
30
30
 
31
- CRuby 1.9.2 and below is **not** supported.
31
+ CRuby 2.0.0 and above is supported.
32
32
 
33
33
  ### JRuby
34
34
 
35
35
  To get the best support, run JRuby in interpreted mode.
36
36
 
37
37
  ```bash
38
- export JRUBY_OPTS=-J-Djruby.compile.mode=OFF
39
-
40
- # If you run JRuby 1.7.12 and above, you can use:
41
38
  export JRUBY_OPTS=--dev
42
39
  ```
43
40
 
41
+ Only JRuby 9k is supported.
42
+
44
43
  ### Rubinius
45
44
 
46
45
  Internal errors like `ZeroDevisionError` aren't caught.
data/Rakefile CHANGED
@@ -1,21 +1,6 @@
1
- require 'erb'
2
1
  require 'bundler/gem_tasks'
3
2
  require 'rake/testtask'
4
3
 
5
- def jruby_9k?
6
- JRUBY_VERSION.start_with?('9')
7
- end
8
-
9
- def root
10
- Pathname.new File.expand_path('..', __FILE__)
11
- end
12
-
13
- def render_template(template_path, target = nil)
14
- target ||= root.join(template_path).to_s.chomp('.erb')
15
- template = ERB.new File.read(root.join(template_path))
16
- File.write target, template.result(binding)
17
- end
18
-
19
4
  Rake::TestTask.new do |t|
20
5
  t.libs << 'test'
21
6
  t.test_files = FileList['test/*_test.rb']
@@ -36,12 +21,10 @@ when 'jruby'
36
21
  require 'rake/javaextensiontask'
37
22
 
38
23
  Rake::JavaExtensionTask.new('bindex') do |ext|
39
- ext.name = jruby_9k? ? 'jruby_internals_9k' : 'jruby_internals'
24
+ ext.name = 'jruby_internals'
40
25
  ext.lib_dir = 'lib/bindex'
41
26
  end
42
27
 
43
- render_template 'ext/bindex/com/gsamokovarov/bindex/BindingBuilder.java.erb'
44
-
45
28
  task default: [:clean, :compile, :test]
46
29
  else
47
30
  task default: [:test]
@@ -8,10 +8,6 @@ import org.jruby.runtime.backtrace.BacktraceElement;
8
8
 
9
9
  class BindingBuilder {
10
10
  public static Binding build(Frame frame, DynamicScope scope, BacktraceElement element) {
11
- <% if jruby_9k? %>
12
- return new Binding(frame, scope, element.clone());
13
- <% else %>
14
- return new Binding(frame, scope.getStaticScope().getModule(), scope, element.clone());
15
- <% end %>
11
+ return new Binding(frame, scope, element.method, element.filename, element.line);
16
12
  }
17
13
  }
@@ -1,8 +1,4 @@
1
- if JRUBY_VERSION.start_with?('9')
2
- require 'bindex/jruby_internals_9k'
3
- else
4
- require 'bindex/jruby_internals'
5
- end
1
+ require 'bindex/jruby_internals'
6
2
 
7
3
  java_import com.gsamokovarov.bindex.JRubyIntegration
8
4
 
@@ -1,3 +1,3 @@
1
1
  module Bindex
2
- VERSION = "0.4.0"
2
+ VERSION = "0.5.0"
3
3
  end
metadata CHANGED
@@ -1,72 +1,72 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bindex
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Genadi Samokovarov
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-03-19 00:00:00.000000000 Z
11
+ date: 2017-03-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: minitest
15
14
  requirement: !ruby/object:Gem::Requirement
16
15
  requirements:
17
16
  - - "~>"
18
17
  - !ruby/object:Gem::Version
19
18
  version: '5.4'
20
- type: :development
19
+ name: minitest
21
20
  prerelease: false
21
+ type: :development
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '5.4'
27
27
  - !ruby/object:Gem::Dependency
28
- name: bundler
29
28
  requirement: !ruby/object:Gem::Requirement
30
29
  requirements:
31
30
  - - ">="
32
31
  - !ruby/object:Gem::Version
33
32
  version: '0'
34
- type: :development
33
+ name: bundler
35
34
  prerelease: false
35
+ type: :development
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
- name: rake
43
42
  requirement: !ruby/object:Gem::Requirement
44
43
  requirements:
45
44
  - - ">="
46
45
  - !ruby/object:Gem::Version
47
46
  version: '0'
48
- type: :development
47
+ name: rake
49
48
  prerelease: false
49
+ type: :development
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
- name: rake-compiler
57
56
  requirement: !ruby/object:Gem::Requirement
58
57
  requirements:
59
58
  - - ">="
60
59
  - !ruby/object:Gem::Version
61
60
  version: '0'
62
- type: :development
61
+ name: rake-compiler
63
62
  prerelease: false
63
+ type: :development
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - ">="
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
- description:
69
+ description:
70
70
  email:
71
71
  - gsamokovarov@gmail.com
72
72
  executables: []
@@ -82,7 +82,7 @@ files:
82
82
  - README.md
83
83
  - Rakefile
84
84
  - bindex.gemspec
85
- - ext/bindex/com/gsamokovarov/bindex/BindingBuilder.java.erb
85
+ - ext/bindex/com/gsamokovarov/bindex/BindingBuilder.java
86
86
  - ext/bindex/com/gsamokovarov/bindex/CurrentBindingsIterator.java
87
87
  - ext/bindex/com/gsamokovarov/bindex/JRubyIntegration.java
88
88
  - ext/bindex/com/gsamokovarov/bindex/RubyBindingsCollector.java
@@ -94,7 +94,6 @@ files:
94
94
  - lib/bindex.rb
95
95
  - lib/bindex/jruby.rb
96
96
  - lib/bindex/jruby_internals.jar
97
- - lib/bindex/jruby_internals_9k.jar
98
97
  - lib/bindex/rubinius.rb
99
98
  - lib/bindex/version.rb
100
99
  - test/current_bindings_test.rb
@@ -109,7 +108,7 @@ homepage: https://github.com/gsamokovarov/bindex
109
108
  licenses:
110
109
  - MIT
111
110
  metadata: {}
112
- post_install_message:
111
+ post_install_message:
113
112
  rdoc_options: []
114
113
  require_paths:
115
114
  - lib
@@ -124,9 +123,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
124
123
  - !ruby/object:Gem::Version
125
124
  version: '0'
126
125
  requirements: []
127
- rubyforge_project:
126
+ rubyforge_project:
128
127
  rubygems_version: 2.6.8
129
- signing_key:
128
+ signing_key:
130
129
  specification_version: 4
131
130
  summary: Bindings for your Ruby exceptions
132
131
  test_files: