rubydeps 0.9.5 → 0.9.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 9af60af6341fee1a1fa4d83e3ffd65f5d7adf996
4
+ data.tar.gz: 2399eb1833cfcd47a5dd7629171982e165f75188
5
+ SHA512:
6
+ metadata.gz: 889102fde3107ff8407a4788a24536e2346ad4f922b7dc375c7c15aac4cb30529f050b2133aac0e569b7cd8758e3125694a62ffcb8df72bcd816e19871232fa0
7
+ data.tar.gz: 64f4f8e23f0e36f94f4711f86a50bbfc33e9e2f4f0769f993add7a8f65febd8eb65245e35c8a35a11658a349102ad37be5dc871b83cc23efbea969c292898ece
@@ -3,5 +3,6 @@ before_install:
3
3
  - sudo apt-get update
4
4
  - sudo apt-get install graphviz
5
5
  rvm:
6
- - 1.9.3
7
6
  - 1.9.2
7
+ - 1.9.3
8
+ - 2.0.0
data/Gemfile CHANGED
@@ -1,8 +1,8 @@
1
1
  source "http://rubygems.org"
2
2
 
3
3
  gem 'rake-compiler', "~> 0.8"
4
- gem 'rspec', "~> 2.8"
4
+ gem 'rspec', "~> 2.13"
5
5
  gem 'file_test_helper', "~> 1.0"
6
- gem 'ruby_core_source', "~> 0.1"
6
+ gem 'debugger-ruby_core_source', "~> 1.2.2"
7
7
  gem 'ruby-graphviz', "~> 1.0"
8
- gem 'thor', "~> 0.14"
8
+ gem 'thor', "~> 0.18"
data/README.md CHANGED
@@ -9,7 +9,6 @@ A tool to create class dependency graphs from test suites.
9
9
 
10
10
  I think this is more useful than static analysis of the code base because of the high dynamic aspects of the language.
11
11
 
12
-
13
12
  Sample output
14
13
  -------------
15
14
 
@@ -88,7 +87,7 @@ Installation
88
87
  gem install rubydeps
89
88
  ```
90
89
 
91
- Rubydeps now only supports ruby 1.9.x. If you need 1.8.x support then:
90
+ Rubydeps now only supports ruby >= 1.9.2. If you need 1.8.x support then:
92
91
 
93
92
  ```bash
94
93
  gem install rubydeps -v0.2.0
@@ -119,4 +118,4 @@ Copyright
119
118
 
120
119
  Copyright (c) 2012 Daniel Cadenas. See LICENSE for details.
121
120
 
122
- Development sponsored by [Cubox](http://www.cuboxlabs.com)
121
+ Development sponsored by [Neo](http://neo.com)
data/Rakefile CHANGED
@@ -12,11 +12,11 @@ spec = Gem::Specification.new do |s|
12
12
  s.executables = ["rubydeps"]
13
13
 
14
14
  s.add_development_dependency(%q<rake-compiler>, ["~> 0.8"])
15
- s.add_development_dependency(%q<rspec>, ["~> 2.8"])
15
+ s.add_development_dependency(%q<rspec>, ["~> 2.13"])
16
16
  s.add_development_dependency(%q<file_test_helper>, ["~> 1.0"])
17
- s.add_dependency(%q<ruby_core_source>, ["~> 0.1"])
17
+ s.add_dependency(%q<debugger-ruby_core_source>, ["~> 1.2"])
18
18
  s.add_dependency(%q<ruby-graphviz>, ["~> 1.0"])
19
- s.add_dependency(%q<thor>, ["~> 0.14"])
19
+ s.add_dependency(%q<thor>, ["~> 0.18"])
20
20
 
21
21
  s.version = File.read("VERSION")
22
22
  s.files = `git ls-files`.split
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.9.5
1
+ 0.9.6
@@ -2,9 +2,16 @@
2
2
  #include <vm_core.h>
3
3
  #include <iseq.h>
4
4
 
5
- // Fix compile error in ruby 1.9.3
6
- #ifdef RTYPEDDATA_DATA
7
- #define ruby_current_thread ((rb_thread_t *)RTYPEDDATA_DATA(rb_thread_current()))
5
+ #if GET_THREAD
6
+ #define ruby_current_thread ((rb_thread_t *)RTYPEDDATA_DATA(rb_thread_current()))
7
+ #define GET_THREAD2 GET_THREAD
8
+ #else
9
+ rb_thread_t *ruby_current_thread;
10
+ rb_thread_t *GET_THREAD2(void)
11
+ {
12
+ ruby_current_thread = ((rb_thread_t *)RTYPEDDATA_DATA(rb_thread_current()));
13
+ return GET_THREAD();
14
+ }
8
15
  #endif
9
16
 
10
17
  inline static rb_control_frame_t*
@@ -87,10 +94,22 @@ add_dependency(VALUE calling_class, VALUE called_class, VALUE called_class_file_
87
94
  //NOTE: this function should be as optimized as possible as it's being called on each ruby method call
88
95
  static void
89
96
  event_hook(rb_event_flag_t event, VALUE data, VALUE self, ID mid, VALUE klass){
90
- rb_control_frame_t* cfp = GET_THREAD()->cfp;
97
+ rb_control_frame_t* cfp = GET_THREAD2()->cfp;
91
98
  VALUE class_of_called_object = class_of_obj_or_class(self);
92
99
  VALUE called_class = get_real_class(cfp->iseq->klass);
93
- VALUE called_class_file_path = cfp->iseq->filepath;
100
+ VALUE called_class_file_path;
101
+
102
+ #ifdef HAVE_TYPE_RB_ISEQ_LOCATION_T
103
+ if (RTEST(cfp->iseq->location.absolute_path))
104
+ called_class_file_path = cfp->iseq->location.absolute_path;
105
+ else
106
+ called_class_file_path = cfp->iseq->location.path;
107
+ #else
108
+ if (RTEST(cfp->iseq->filepath))
109
+ called_class_file_path = cfp->iseq->filepath;
110
+ else
111
+ called_class_file_path = cfp->iseq->filename;
112
+ #endif
94
113
 
95
114
  rb_control_frame_t* previous_cfp = callsite_cfp(cfp);
96
115
  if(previous_cfp != NULL){
@@ -1,11 +1,15 @@
1
1
  require 'mkmf'
2
- require "ruby_core_source"
2
+ require "debugger/ruby_core_source"
3
3
 
4
4
  #comment this line if not debugging
5
- $CFLAGS='-ggdb -Wall -O0 -pipe'
5
+ #$CFLAGS='-ggdb -Wall -O0 -pipe'
6
6
 
7
- hdrs = proc { have_header("vm_core.h") and have_header("iseq.h") }
7
+ hdrs = proc {
8
+ have_type("rb_iseq_location_t", "vm_core.h")
8
9
 
9
- if !Ruby_core_source::create_makefile_with_core(hdrs, "call_site_analyzer")
10
+ have_header("vm_core.h") and have_header("iseq.h")
11
+ }
12
+
13
+ if !Debugger::RubyCoreSource::create_makefile_with_core(hdrs, "call_site_analyzer")
10
14
  STDERR.print("Makefile creation failed\n")
11
15
  end
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = %q{rubydeps}
3
- s.version = "0.9.5"
3
+ s.version = "0.9.6"
4
4
 
5
5
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
6
6
  s.authors = ["Daniel Cadenas"]
@@ -35,23 +35,26 @@ Gem::Specification.new do |s|
35
35
 
36
36
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
37
37
  s.add_development_dependency(%q<rake-compiler>, ["~> 0.8"])
38
- s.add_development_dependency(%q<rspec>, ["~> 2.8"])
38
+ s.add_development_dependency(%q<rspec>, ["~> 2.13"])
39
39
  s.add_development_dependency(%q<file_test_helper>, ["~> 1.0"])
40
40
  s.add_dependency(%q<ruby-graphviz>, ["~> 1.0"])
41
- s.add_dependency(%q<thor>, ["~> 0.14"])
41
+ s.add_dependency(%q<thor>, ["~> 0.18"])
42
+ s.add_dependency(%q<debugger-ruby_core_source>, ["~> 1.2"])
42
43
  else
43
44
  s.add_dependency(%q<rake-compiler>, ["~> 0.8"])
44
- s.add_dependency(%q<rspec>, [">= 2.8"])
45
+ s.add_dependency(%q<rspec>, [">= 2.13"])
45
46
  s.add_dependency(%q<file_test_helper>, ["~> 1.0"])
46
47
  s.add_dependency(%q<ruby-graphviz>, ["~> 1.0"])
47
- s.add_dependency(%q<thor>, ["~> 0.14"])
48
+ s.add_dependency(%q<thor>, ["~> 0.18"])
49
+ s.add_dependency(%q<debugger-ruby_core_source>, ["~> 1.2"])
48
50
  end
49
51
  else
50
52
  s.add_dependency(%q<rake-compiler>, ["~> 0.8"])
51
- s.add_dependency(%q<rspec>, [">= 2.8"])
53
+ s.add_dependency(%q<rspec>, [">= 2.13"])
52
54
  s.add_dependency(%q<file_test_helper>, ["~> 1.0"])
53
55
  s.add_dependency(%q<ruby-graphviz>, ["~> 1.0"])
54
- s.add_dependency(%q<thor>, ["~> 0.14"])
56
+ s.add_dependency(%q<thor>, ["~> 0.18"])
57
+ s.add_dependency(%q<debugger-ruby_core_source>, ["~> 1.2"])
55
58
  end
56
59
  end
57
60
 
metadata CHANGED
@@ -1,20 +1,18 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubydeps
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.5
5
- prerelease:
4
+ version: 0.9.6
6
5
  platform: ruby
7
6
  authors:
8
7
  - Daniel Cadenas
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2012-12-14 00:00:00.000000000 Z
11
+ date: 2013-07-03 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: rake-compiler
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
17
  - - ~>
20
18
  - !ruby/object:Gem::Version
@@ -22,7 +20,6 @@ dependencies:
22
20
  type: :development
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
24
  - - ~>
28
25
  - !ruby/object:Gem::Version
@@ -30,23 +27,20 @@ dependencies:
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: rspec
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
31
  - - ~>
36
32
  - !ruby/object:Gem::Version
37
- version: '2.8'
33
+ version: '2.13'
38
34
  type: :development
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
38
  - - ~>
44
39
  - !ruby/object:Gem::Version
45
- version: '2.8'
40
+ version: '2.13'
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: file_test_helper
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
45
  - - ~>
52
46
  - !ruby/object:Gem::Version
@@ -54,31 +48,27 @@ dependencies:
54
48
  type: :development
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
51
  requirements:
59
52
  - - ~>
60
53
  - !ruby/object:Gem::Version
61
54
  version: '1.0'
62
55
  - !ruby/object:Gem::Dependency
63
- name: ruby_core_source
56
+ name: debugger-ruby_core_source
64
57
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
58
  requirements:
67
59
  - - ~>
68
60
  - !ruby/object:Gem::Version
69
- version: '0.1'
61
+ version: '1.2'
70
62
  type: :runtime
71
63
  prerelease: false
72
64
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
65
  requirements:
75
66
  - - ~>
76
67
  - !ruby/object:Gem::Version
77
- version: '0.1'
68
+ version: '1.2'
78
69
  - !ruby/object:Gem::Dependency
79
70
  name: ruby-graphviz
80
71
  requirement: !ruby/object:Gem::Requirement
81
- none: false
82
72
  requirements:
83
73
  - - ~>
84
74
  - !ruby/object:Gem::Version
@@ -86,7 +76,6 @@ dependencies:
86
76
  type: :runtime
87
77
  prerelease: false
88
78
  version_requirements: !ruby/object:Gem::Requirement
89
- none: false
90
79
  requirements:
91
80
  - - ~>
92
81
  - !ruby/object:Gem::Version
@@ -94,19 +83,17 @@ dependencies:
94
83
  - !ruby/object:Gem::Dependency
95
84
  name: thor
96
85
  requirement: !ruby/object:Gem::Requirement
97
- none: false
98
86
  requirements:
99
87
  - - ~>
100
88
  - !ruby/object:Gem::Version
101
- version: '0.14'
89
+ version: '0.18'
102
90
  type: :runtime
103
91
  prerelease: false
104
92
  version_requirements: !ruby/object:Gem::Requirement
105
- none: false
106
93
  requirements:
107
94
  - - ~>
108
95
  - !ruby/object:Gem::Version
109
- version: '0.14'
96
+ version: '0.18'
110
97
  description: A tool to create class dependency graphs from test suites
111
98
  email: dcadenas@gmail.com
112
99
  executables:
@@ -134,26 +121,25 @@ files:
134
121
  - spec/spec_helper.rb
135
122
  homepage: http://github.com/dcadenas/rubydeps
136
123
  licenses: []
124
+ metadata: {}
137
125
  post_install_message:
138
126
  rdoc_options: []
139
127
  require_paths:
140
128
  - lib
141
129
  required_ruby_version: !ruby/object:Gem::Requirement
142
- none: false
143
130
  requirements:
144
- - - ! '>='
131
+ - - '>='
145
132
  - !ruby/object:Gem::Version
146
133
  version: '0'
147
134
  required_rubygems_version: !ruby/object:Gem::Requirement
148
- none: false
149
135
  requirements:
150
- - - ! '>='
136
+ - - '>='
151
137
  - !ruby/object:Gem::Version
152
138
  version: '0'
153
139
  requirements: []
154
140
  rubyforge_project:
155
- rubygems_version: 1.8.24
141
+ rubygems_version: 2.0.3
156
142
  signing_key:
157
- specification_version: 3
143
+ specification_version: 4
158
144
  summary: A tool to create class dependency graphs from test suites
159
145
  test_files: []