linecache 0.46 → 1.3.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,11 @@
1
+ # Provides stub alternative to lnums_for_str C implementation.
2
+
3
+ module TraceLineNumbers
4
+
5
+ # Trivial implementation allowing to stop on every line.
6
+ def lnums_for_str(code)
7
+ (1..code.lines.count).to_a
8
+ end
9
+ module_function :lnums_for_str
10
+
11
+ end
@@ -1,15 +1,14 @@
1
1
  #!/usr/bin/env ruby
2
- # $Id: tracelines.rb 143 2008-06-12 00:04:43Z rockyb $
2
+ # $Id$
3
3
  begin require 'rubygems' rescue LoadError end
4
4
  # require 'ruby-debug' ; Debugger.start(:post-mortem => true)
5
5
 
6
6
  module TraceLineNumbers
7
- @@SRC_DIR = File.expand_path(File.dirname(__FILE__))
8
7
  begin
9
- require File.join(@@SRC_DIR, '..', 'ext', 'trace_nums')
8
+ require 'linecache/trace_nums.so'
10
9
  rescue LoadError
11
- # MSWindows seems to put this in lib rather than ext.
12
- require File.join(@@SRC_DIR, '..', 'lib', 'trace_nums')
10
+ # Require stub implementation if native extensions are not available.
11
+ require 'linecache/trace_nums.rb'
13
12
  end
14
13
 
15
14
  # Return an array of lines numbers that could be
@@ -1,3 +1,3 @@
1
1
  module LineCache
2
- VERSION = '0.46'
2
+ VERSION = '1.3.1'
3
3
  end
@@ -9,7 +9,7 @@ require 'test/unit'
9
9
  class TestLineNumbers2 < Test::Unit::TestCase
10
10
  @@TEST_DIR = File.expand_path(File.dirname(__FILE__))
11
11
  @@TOP_SRC_DIR = File.join(@@TEST_DIR, '..')
12
- require File.join(@@TOP_SRC_DIR, 'lib', 'tracelines.rb')
12
+ require File.join(@@TOP_SRC_DIR, 'lib', 'linecache', 'tracelines.rb')
13
13
 
14
14
  def test_all_lnum_data
15
15
  test_dir = File.join(@@TEST_DIR, 'data')
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
- # $Id: test-tracelines.rb 51 2008-01-26 10:18:26Z rockyb $
2
+ # $Id$
3
3
  require 'test/unit'
4
4
  require 'fileutils'
5
5
  require 'tempfile'
@@ -13,7 +13,7 @@ class TestLineNumbers1 < Test::Unit::TestCase
13
13
 
14
14
  @@TEST_DIR = File.expand_path(File.dirname(__FILE__))
15
15
  @@TOP_SRC_DIR = File.join(@@TEST_DIR, '..', 'lib')
16
- require File.join(@@TOP_SRC_DIR, 'tracelines.rb')
16
+ require File.join(@@TOP_SRC_DIR, 'linecache', 'tracelines.rb')
17
17
 
18
18
  @@rcov_file = File.join(@@TEST_DIR, 'rcov-bug.rb')
19
19
  File.open(@@rcov_file, 'r') {|fp|
metadata CHANGED
@@ -1,12 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: linecache
3
3
  version: !ruby/object:Gem::Version
4
- hash: 87
5
- prerelease:
6
- segments:
7
- - 0
8
- - 46
9
- version: "0.46"
4
+ version: 1.3.1
10
5
  platform: ruby
11
6
  authors:
12
7
  - R. Bernstein
@@ -14,24 +9,9 @@ autorequire:
14
9
  bindir: bin
15
10
  cert_chain: []
16
11
 
17
- date: 2011-06-19 00:00:00 Z
18
- dependencies:
19
- - !ruby/object:Gem::Dependency
20
- name: rbx-require-relative
21
- prerelease: false
22
- requirement: &id001 !ruby/object:Gem::Requirement
23
- none: false
24
- requirements:
25
- - - ">"
26
- - !ruby/object:Gem::Version
27
- hash: 23
28
- segments:
29
- - 0
30
- - 0
31
- - 4
32
- version: 0.0.4
33
- type: :runtime
34
- version_requirements: *id001
12
+ date: 2015-09-19 00:00:00 Z
13
+ dependencies: []
14
+
35
15
  description: |
36
16
  LineCache is a module for reading and caching lines. This may be useful for
37
17
  example in a debugger where the same lines are shown many times.
@@ -40,11 +20,11 @@ email: rockyb@rubyforge.net
40
20
  executables: []
41
21
 
42
22
  extensions:
43
- - ext/extconf.rb
23
+ - ext/linecache/extconf.rb
44
24
  extra_rdoc_files:
45
25
  - README
46
26
  - lib/linecache.rb
47
- - lib/tracelines.rb
27
+ - lib/linecache/tracelines.rb
48
28
  files:
49
29
  - AUTHORS
50
30
  - COPYING
@@ -52,48 +32,51 @@ files:
52
32
  - NEWS
53
33
  - README
54
34
  - Rakefile
55
- - ext/trace_nums.c
56
- - ext/trace_nums.h
57
- - ext/extconf.rb
58
- - lib/version.rb
59
- - lib/tracelines.rb
35
+ - ext/linecache/trace_nums.c
36
+ - ext/linecache/trace_nums.h
37
+ - ext/linecache/extconf.rb
60
38
  - lib/linecache.rb
61
- - test/parse-show.rb
39
+ - lib/linecache/trace_nums.rb
40
+ - lib/linecache/tracelines.rb
41
+ - lib/linecache/version.rb
62
42
  - test/lnum-diag.rb
43
+ - test/parse-show.rb
63
44
  - test/rcov-bug.rb
64
- - test/test-lnum.rb
65
45
  - test/test-linecache.rb
46
+ - test/test-lnum.rb
66
47
  - test/test-tracelines.rb
67
- - test/data/if1.rb
68
- - test/data/comments1.rb
69
- - test/data/not-lit.rb
48
+ - test/data/begin1.rb
70
49
  - test/data/begin2.rb
50
+ - test/data/begin3.rb
51
+ - test/data/block1.rb
71
52
  - test/data/block2.rb
72
- - test/data/if6.rb
73
- - test/data/end.rb
53
+ - test/data/case1.rb
54
+ - test/data/case2.rb
55
+ - test/data/case3.rb
74
56
  - test/data/case4.rb
75
- - test/data/begin1.rb
76
- - test/data/for1.rb
77
- - test/data/match.rb
78
- - test/data/match3a.rb
57
+ - test/data/case5.rb
79
58
  - test/data/class1.rb
80
- - test/data/if3.rb
81
- - test/data/if5.rb
82
- - test/data/case1.rb
59
+ - test/data/comments1.rb
83
60
  - test/data/def1.rb
84
- - test/data/if7.rb
85
- - test/data/block1.rb
86
- - test/data/begin3.rb
87
- - test/data/case3.rb
88
- - test/data/case2.rb
89
61
  - test/data/each1.rb
62
+ - test/data/end.rb
63
+ - test/data/for1.rb
64
+ - test/data/if1.rb
90
65
  - test/data/if2.rb
91
- - test/data/match3.rb
66
+ - test/data/if3.rb
92
67
  - test/data/if4.rb
93
- - test/data/case5.rb
68
+ - test/data/if5.rb
69
+ - test/data/if6.rb
70
+ - test/data/if7.rb
71
+ - test/data/match.rb
72
+ - test/data/match3.rb
73
+ - test/data/match3a.rb
74
+ - test/data/not-lit.rb
94
75
  - test/short-file
95
76
  homepage: http://rubyforge.org/projects/rocky-hacks/linecache
96
- licenses: []
77
+ licenses:
78
+ - GPL2
79
+ metadata: {}
97
80
 
98
81
  post_install_message:
99
82
  rdoc_options: []
@@ -101,36 +84,26 @@ rdoc_options: []
101
84
  require_paths:
102
85
  - lib
103
86
  required_ruby_version: !ruby/object:Gem::Requirement
104
- none: false
105
87
  requirements:
106
88
  - - ">="
107
89
  - !ruby/object:Gem::Version
108
- hash: 57
109
- segments:
110
- - 1
111
- - 8
112
- - 7
113
90
  version: 1.8.7
114
91
  required_rubygems_version: !ruby/object:Gem::Requirement
115
- none: false
116
92
  requirements:
117
93
  - - ">="
118
94
  - !ruby/object:Gem::Version
119
- hash: 3
120
- segments:
121
- - 0
122
95
  version: "0"
123
96
  requirements: []
124
97
 
125
- rubyforge_project: rocky-hacks
126
- rubygems_version: 1.8.5
98
+ rubyforge_project:
99
+ rubygems_version: 2.0.17
127
100
  signing_key:
128
- specification_version: 3
101
+ specification_version: 4
129
102
  summary: Read file with caching
130
103
  test_files:
131
- - test/parse-show.rb
132
104
  - test/lnum-diag.rb
105
+ - test/parse-show.rb
133
106
  - test/rcov-bug.rb
134
- - test/test-lnum.rb
135
107
  - test/test-linecache.rb
108
+ - test/test-lnum.rb
136
109
  - test/test-tracelines.rb