linecache-tf 1.2 → 1.3.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (7) hide show
  1. checksums.yaml +15 -0
  2. data/NEWS +5 -0
  3. data/README.md +29 -0
  4. data/Rakefile +2 -2
  5. data/lib/linecache.rb +1 -1
  6. metadata +19 -23
  7. data/README +0 -48
@@ -0,0 +1,15 @@
1
+ ---
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ NDgyZGFiMzM4NTM3MDlkMzA0MjQwMWRiNmQ2OGEzMmY0MTExZDU1NA==
5
+ data.tar.gz: !binary |-
6
+ NTZlMzI1ZWJlZDU5MDIzZGIwYjdkYWMzYzhkZmM2NmEyMzJiZmMzNg==
7
+ SHA512:
8
+ metadata.gz: !binary |-
9
+ NjhjMGExNjVmZTYwZWI2MTcxNThiY2U0NWNlNDk1NzY4NzhhNjgyMmQ4NDEy
10
+ YjI4NDk5YWY5MDMxYTY4ZGEwZjVmYjQ0OGFiZTcyMGE0NjYwYjFmNDUxNWI2
11
+ MDhlM2UwNTEzZWE4NzJiYjkzMDdlMmY2MWU3YjFlNmFiYThiNzY=
12
+ data.tar.gz: !binary |-
13
+ NDUzYjdhYmE4ZTk0ZGU0YTdiOTZlMTkzOTBkNjdhNzNhNDg0ODM5NWY3ZGMz
14
+ MTg1Y2UzOGU2OTYxMjUyYjk2NTZmMWU0Y2EyNGE0MDFkNDA1YWI5ZTNlZjEx
15
+ NDE2ZTYzNTVjY2EzY2VhZWIyYWExMGQ5MDM3ZTIwZWFmYzQ3M2Q=
data/NEWS CHANGED
@@ -1,3 +1,8 @@
1
+ 1.3.1
2
+ 15-09-19
3
+
4
+ - JRuby fix, sync with master and ruby-1.9
5
+
1
6
  tf-1.2
2
7
  Nov 20, 2014
3
8
  - Handle UTF-8, update rake task for this year's way to do the same thing
@@ -0,0 +1,29 @@
1
+ The LineCache module allows one to get any line from any file, caching
2
+ the lines and file information on first access to the file. Although
3
+ the file may be any file, the common use is when the file is a Ruby
4
+ script since parsing of the file is done to figure out where the
5
+ statement boundaries are, and we also cache syntax formatting.
6
+
7
+ The routines here may be is useful when a small random sets of lines
8
+ are read from a single file, in particular in a debugger to show
9
+ source lines.
10
+
11
+ *Example*:
12
+
13
+ ```ruby
14
+ require 'linecache'
15
+ lines = LineCache::getlines('/tmp/myruby.rb')
16
+ # The following lines have same effect as the above.
17
+ $: << '/tmp'
18
+ Dir.chdir('/tmp') {lines = LineCache::getlines('myruby.rb')
19
+
20
+ line = LineCache::getline('/tmp/myruby.rb', 6)
21
+ # Note lines[6] == line (if /tmp/myruby.rb has 6 lines)
22
+
23
+ LineCache::clear_file_cache
24
+ LineCache::clear_file_cache('/tmp/myruby.rb')
25
+ LineCache::update_cache # Check for modifications of all cached files.
26
+ ```
27
+
28
+ Git branches *ruby-1.9* and *ruby-2.1* for code for those respective
29
+ Ruby versions. A patched version of Ruby is needed for this to work. The patches sources are [here](https://code.google.com/p/ruby-19-debugger/).
data/Rakefile CHANGED
@@ -71,9 +71,9 @@ Rake::RDocTask.new("rdoc") do |rdoc|
71
71
  rdoc.options += %w(--inline-source --line-numbers)
72
72
 
73
73
  # Make the README file the start page for the generated html
74
- rdoc.options += %w(--main README)
74
+ rdoc.options += %w(--main README.md)
75
75
 
76
- rdoc.rdoc_files.include('lib/*.rb', 'README', 'COPYING')
76
+ rdoc.rdoc_files.include('lib/*.rb', 'README.md', 'COPYING')
77
77
  end
78
78
  desc "Same as rdoc"
79
79
  task :doc => :rdoc
@@ -70,7 +70,7 @@ require_relative 'tracelines'
70
70
  # = module LineCache
71
71
  # A module to read and cache lines of a Ruby program.
72
72
  module LineCache
73
- VERSION = '1.2'
73
+ VERSION = '1.3.1'
74
74
  LineCacheInfo = Struct.new(:stat, :line_numbers, :lines, :path, :sha1) unless
75
75
  defined?(LineCacheInfo)
76
76
 
metadata CHANGED
@@ -1,20 +1,18 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: linecache-tf
3
3
  version: !ruby/object:Gem::Version
4
- version: '1.2'
5
- prerelease:
4
+ version: 1.3.1
6
5
  platform: ruby
7
6
  authors:
8
7
  - R. Bernstein
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2014-11-20 00:00:00.000000000 Z
11
+ date: 2015-09-19 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: rb-threadframe
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: :runtime
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
@@ -40,7 +37,7 @@ email: rockyb@rubyforge.net
40
37
  executables: []
41
38
  extensions: []
42
39
  extra_rdoc_files:
43
- - README
40
+ - README.md
44
41
  - lib/linecache.rb
45
42
  - lib/tracelines.rb
46
43
  files:
@@ -48,20 +45,10 @@ files:
48
45
  - COPYING
49
46
  - ChangeLog
50
47
  - NEWS
51
- - README
48
+ - README.md
52
49
  - Rakefile
53
50
  - lib/linecache.rb
54
51
  - lib/tracelines.rb
55
- - test/lnum-diag.rb
56
- - test/parse-show.rb
57
- - test/rcov-bug.rb
58
- - test/test-linecache.rb
59
- - test/test-lnum.rb
60
- - test/test-tracelines.rb
61
- - test/data/end.rb
62
- - test/data/each1.rb
63
- - test/data/not-lit.rb
64
- - test/data/match.rb
65
52
  - test/data/begin1.rb
66
53
  - test/data/begin2.rb
67
54
  - test/data/begin3.rb
@@ -75,6 +62,8 @@ files:
75
62
  - test/data/class1.rb
76
63
  - test/data/comments1.rb
77
64
  - test/data/def1.rb
65
+ - test/data/each1.rb
66
+ - test/data/end.rb
78
67
  - test/data/for1.rb
79
68
  - test/data/if1.rb
80
69
  - test/data/if2.rb
@@ -83,36 +72,43 @@ files:
83
72
  - test/data/if5.rb
84
73
  - test/data/if6.rb
85
74
  - test/data/if7.rb
75
+ - test/data/match.rb
86
76
  - test/data/match3.rb
87
77
  - test/data/match3a.rb
78
+ - test/data/not-lit.rb
79
+ - test/lnum-diag.rb
80
+ - test/parse-show.rb
81
+ - test/rcov-bug.rb
88
82
  - test/short-file
83
+ - test/test-linecache.rb
84
+ - test/test-lnum.rb
85
+ - test/test-tracelines.rb
89
86
  homepage: http://rubyforge.org/projects/rocky-hacks/linecache
90
87
  licenses:
91
88
  - GPL2
89
+ metadata: {}
92
90
  post_install_message:
93
91
  rdoc_options:
94
92
  - --main
95
- - README
93
+ - README.md
96
94
  - --title
97
- - LineCache 1.2 Documentation
95
+ - LineCache 1.3.1 Documentation
98
96
  require_paths:
99
97
  - lib
100
98
  required_ruby_version: !ruby/object:Gem::Requirement
101
- none: false
102
99
  requirements:
103
100
  - - ! '>='
104
101
  - !ruby/object:Gem::Version
105
102
  version: 1.9.2
106
103
  required_rubygems_version: !ruby/object:Gem::Requirement
107
- none: false
108
104
  requirements:
109
105
  - - ! '>='
110
106
  - !ruby/object:Gem::Version
111
107
  version: '0'
112
108
  requirements: []
113
109
  rubyforge_project: rocky-hacks
114
- rubygems_version: 1.8.23
110
+ rubygems_version: 2.4.8
115
111
  signing_key:
116
- specification_version: 3
112
+ specification_version: 4
117
113
  summary: Module to read and cache Ruby program files and file information
118
114
  test_files: []
data/README DELETED
@@ -1,48 +0,0 @@
1
- = LineCache - a module to read and cache Ruby program files and file information
2
-
3
- == SYNOPSIS
4
-
5
- The LineCache module allows one to get any line from any file, caching
6
- the lines and file information on first access to the file. Although
7
- the file may be any file, the common use is when the file is a Ruby
8
- script since parsing of the file is done to figure out where the
9
- statement boundaries are.
10
-
11
- The routines here may be is useful when a small random sets of lines
12
- are read from a single file, in particular in a debugger to show
13
- source lines.
14
-
15
- == Summary
16
-
17
- require 'linecache'
18
- lines = LineCache::getlines('/tmp/myruby.rb')
19
- # The following lines have same effect as the above.
20
- $: << '/tmp'
21
- Dir.chdir('/tmp') {lines = LineCache::getlines('myruby.rb')
22
-
23
- line = LineCache::getline('/tmp/myruby.rb', 6)
24
- # Note lines[6] == line (if /tmp/myruby.rb has 6 lines)
25
-
26
- LineCache::clear_file_cache
27
- LineCache::clear_file_cache('/tmp/myruby.rb')
28
- LineCache::update_cache # Check for modifications of all cached files.
29
-
30
- == Credits
31
-
32
- This is a port of the module of the same name from the Python distribution.
33
-
34
- The idea for how TraceLineNumbers works, and some code was taken
35
- from ParseTree by Ryan Davis.
36
-
37
- == Other stuff
38
-
39
- Author:: Rocky Bernstein <rockyb@rubyforge.net>
40
- License:: Copyright (c) 2007, 2008, 2009 Rocky Bernstein
41
- Released under the GNU GPL 2 license
42
-
43
- == Warranty
44
-
45
- This program is distributed in the hope that it will be useful,
46
- but WITHOUT ANY WARRANTY; without even the implied warranty of
47
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
48
- GNU General Public License for more details.