starscope 1.5.1 → 1.5.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -1
- data/lib/starscope/langs/{go.rb → golang.rb} +1 -1
- data/lib/starscope/version.rb +1 -1
- data/starscope.gemspec +2 -2
- data/test/fixtures/db_old_extractor.json +2 -2
- data/test/fixtures/db_old_subextractor.json +2 -2
- data/test/fixtures/db_out_of_date.json +2 -2
- data/test/fixtures/db_up_to_date.json +2 -2
- data/test/unit/db_test.rb +5 -5
- data/test/unit/langs/golang_test.rb +11 -11
- metadata +8 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 969b72b51c36bc5fb5af62efb738bd2ed0d57c05
|
4
|
+
data.tar.gz: b05bd74d881bb79826405fbd3634dcf05e3f1b6b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c9ec1c3d339a5ad78088bfae6ae8c3296358b4fbe1b01c6e1edbda52c9fb16891b33648b55aa90f896dbaa3124a7d92f4792536c4bb9942fb5f321ad7a9ded29
|
7
|
+
data.tar.gz: 308ad3a1c065f3bdc97ee92602830c12c517c215914f348f6abb3339e8417cb73dbeb7614051566220cd52a1d7d38b201cd91b2f153e52e8c82d2eedcc17072e
|
data/CHANGELOG.md
CHANGED
@@ -1,7 +1,16 @@
|
|
1
1
|
Changelog
|
2
2
|
=========
|
3
3
|
|
4
|
-
v1.5.
|
4
|
+
v1.5.2 (trunk)
|
5
|
+
--------------------
|
6
|
+
|
7
|
+
Misc:
|
8
|
+
* Relax some dependencies to handle e.g. the upcoming parser release for Ruby
|
9
|
+
2.3 (#149).
|
10
|
+
* Rename the `Go` extractor to `Golang` so that it is named consistently
|
11
|
+
everywhere (#143).
|
12
|
+
|
13
|
+
v1.5.1 (2015-10-14)
|
5
14
|
--------------------
|
6
15
|
|
7
16
|
Improvements:
|
data/lib/starscope/version.rb
CHANGED
data/starscope.gemspec
CHANGED
@@ -20,7 +20,7 @@ Gem::Specification.new do |gem|
|
|
20
20
|
gem.required_ruby_version = '>= 1.9.3'
|
21
21
|
|
22
22
|
gem.add_dependency 'oj', '~> 2.9'
|
23
|
-
gem.add_dependency 'parser', '
|
23
|
+
gem.add_dependency 'parser', '>= 2.2.2'
|
24
24
|
gem.add_dependency 'ruby-progressbar', '~> 1.5'
|
25
25
|
gem.add_dependency 'rkelly-remix', '~> 0.0.7'
|
26
26
|
gem.add_dependency 'babel-transpiler', '~> 0.7'
|
@@ -31,5 +31,5 @@ Gem::Specification.new do |gem|
|
|
31
31
|
gem.add_development_dependency 'pry', '~> 0.10.1'
|
32
32
|
gem.add_development_dependency 'minitest', '~> 5.8'
|
33
33
|
gem.add_development_dependency 'mocha', '~> 1.1'
|
34
|
-
gem.add_development_dependency 'rubocop', '~> 0.
|
34
|
+
gem.add_development_dependency 'rubocop', '~> 0.35'
|
35
35
|
end
|
@@ -3,13 +3,13 @@
|
|
3
3
|
":paths": [],
|
4
4
|
":excludes": [],
|
5
5
|
":langs": {
|
6
|
-
":
|
6
|
+
":Golang": 1234,
|
7
7
|
":Ruby": 0
|
8
8
|
},
|
9
9
|
":files": {
|
10
10
|
"test/fixtures/sample_golang.go": {
|
11
11
|
":last_updated": 10000000000,
|
12
|
-
":lang": ":
|
12
|
+
":lang": ":Golang",
|
13
13
|
":sublangs": [":Ruby"]
|
14
14
|
}
|
15
15
|
}
|
data/test/unit/db_test.rb
CHANGED
@@ -45,7 +45,7 @@ describe Starscope::DB do
|
|
45
45
|
|
46
46
|
it "must update stale existing files when extractor hasn't changed" do
|
47
47
|
@db.load("#{FIXTURES}/db_out_of_date.json")
|
48
|
-
@db.metadata(:langs)[:
|
48
|
+
@db.metadata(:langs)[:Golang].must_be :>=, LANGS[:Golang]
|
49
49
|
|
50
50
|
cur_mtime = @db.metadata(:files)[GOLANG_SAMPLE][:last_updated]
|
51
51
|
File.expects(:mtime).twice.returns(cur_mtime + 1)
|
@@ -53,7 +53,7 @@ describe Starscope::DB do
|
|
53
53
|
|
54
54
|
file = @db.metadata(:files)[GOLANG_SAMPLE]
|
55
55
|
file[:last_updated].must_equal cur_mtime + 1
|
56
|
-
file[:lang].must_equal :
|
56
|
+
file[:lang].must_equal :Golang
|
57
57
|
file[:lines].wont_be_empty
|
58
58
|
@db.records(:defs).wont_be_empty
|
59
59
|
@db.records(:calls).wont_be_empty
|
@@ -68,7 +68,7 @@ describe Starscope::DB do
|
|
68
68
|
|
69
69
|
file = @db.metadata(:files)[GOLANG_SAMPLE]
|
70
70
|
file[:last_updated].must_equal cur_mtime
|
71
|
-
file[:lang].must_equal :
|
71
|
+
file[:lang].must_equal :Golang
|
72
72
|
file[:lines].wont_be_empty
|
73
73
|
@db.records(:defs).wont_be_empty
|
74
74
|
@db.records(:calls).wont_be_empty
|
@@ -83,7 +83,7 @@ describe Starscope::DB do
|
|
83
83
|
|
84
84
|
file = @db.metadata(:files)[GOLANG_SAMPLE]
|
85
85
|
file[:last_updated].must_equal cur_mtime
|
86
|
-
file[:lang].must_equal :
|
86
|
+
file[:lang].must_equal :Golang
|
87
87
|
file[:sublangs].must_be_empty
|
88
88
|
file[:lines].wont_be_empty
|
89
89
|
@db.records(:defs).wont_be_empty
|
@@ -99,7 +99,7 @@ describe Starscope::DB do
|
|
99
99
|
|
100
100
|
file = @db.metadata(:files)[GOLANG_SAMPLE]
|
101
101
|
file[:last_updated].must_equal cur_mtime
|
102
|
-
file[:lang].must_equal :
|
102
|
+
file[:lang].must_equal :Golang
|
103
103
|
file[:lines].wont_be_empty
|
104
104
|
@db.records(:defs).wont_be_empty
|
105
105
|
@db.records(:calls).wont_be_empty
|
@@ -1,21 +1,21 @@
|
|
1
1
|
require_relative '../../test_helper'
|
2
2
|
|
3
|
-
describe Starscope::Lang::
|
3
|
+
describe Starscope::Lang::Golang do
|
4
4
|
before do
|
5
5
|
@db = {}
|
6
|
-
Starscope::Lang::
|
6
|
+
Starscope::Lang::Golang.extract(GOLANG_SAMPLE, File.read(GOLANG_SAMPLE)) do |tbl, name, args|
|
7
7
|
@db[tbl] ||= []
|
8
8
|
@db[tbl] << Starscope::DB.normalize_record(GOLANG_SAMPLE, name, args)
|
9
9
|
end
|
10
10
|
end
|
11
11
|
|
12
12
|
it 'must match golang files' do
|
13
|
-
Starscope::Lang::
|
13
|
+
Starscope::Lang::Golang.match_file(GOLANG_SAMPLE).must_equal true
|
14
14
|
end
|
15
15
|
|
16
16
|
it 'must not match non-golang files' do
|
17
|
-
Starscope::Lang::
|
18
|
-
Starscope::Lang::
|
17
|
+
Starscope::Lang::Golang.match_file(RUBY_SAMPLE).must_equal false
|
18
|
+
Starscope::Lang::Golang.match_file(EMPTY_FILE).must_equal false
|
19
19
|
end
|
20
20
|
|
21
21
|
it 'must identify definitions' do
|
@@ -88,11 +88,11 @@ describe Starscope::Lang::Go do
|
|
88
88
|
end
|
89
89
|
|
90
90
|
it 'must correctly find the end of string constants' do
|
91
|
-
Starscope::Lang::
|
92
|
-
Starscope::Lang::
|
93
|
-
Starscope::Lang::
|
94
|
-
Starscope::Lang::
|
95
|
-
Starscope::Lang::
|
96
|
-
Starscope::Lang::
|
91
|
+
Starscope::Lang::Golang.find_end_of_string('"123"foo', 0).must_equal 4
|
92
|
+
Starscope::Lang::Golang.find_end_of_string('a"123"foo', 0).must_equal 1
|
93
|
+
Starscope::Lang::Golang.find_end_of_string('a"123"foo', 1).must_equal 5
|
94
|
+
Starscope::Lang::Golang.find_end_of_string('"1\""foo', 0).must_equal 4
|
95
|
+
Starscope::Lang::Golang.find_end_of_string('"1\\""foo', 0).must_equal 4
|
96
|
+
Starscope::Lang::Golang.find_end_of_string('"1\\\\\"foo', 0).must_equal 9
|
97
97
|
end
|
98
98
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: starscope
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.5.
|
4
|
+
version: 1.5.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Evan Huus
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-01-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: oj
|
@@ -28,14 +28,14 @@ dependencies:
|
|
28
28
|
name: parser
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: 2.2.2
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: 2.2.2
|
41
41
|
- !ruby/object:Gem::Dependency
|
@@ -170,14 +170,14 @@ dependencies:
|
|
170
170
|
requirements:
|
171
171
|
- - "~>"
|
172
172
|
- !ruby/object:Gem::Version
|
173
|
-
version: 0.
|
173
|
+
version: '0.35'
|
174
174
|
type: :development
|
175
175
|
prerelease: false
|
176
176
|
version_requirements: !ruby/object:Gem::Requirement
|
177
177
|
requirements:
|
178
178
|
- - "~>"
|
179
179
|
- !ruby/object:Gem::Version
|
180
|
-
version: 0.
|
180
|
+
version: '0.35'
|
181
181
|
description: |2
|
182
182
|
Starscope is a code indexer, search and navigation tool for Ruby, Golang, and JavaScript.
|
183
183
|
Inspired by the extremely popular Ctags and Cscope utilities, Starscope can
|
@@ -205,7 +205,7 @@ files:
|
|
205
205
|
- lib/starscope/exportable.rb
|
206
206
|
- lib/starscope/fragment_extractor.rb
|
207
207
|
- lib/starscope/langs/erb.rb
|
208
|
-
- lib/starscope/langs/
|
208
|
+
- lib/starscope/langs/golang.rb
|
209
209
|
- lib/starscope/langs/javascript.rb
|
210
210
|
- lib/starscope/langs/ruby.rb
|
211
211
|
- lib/starscope/matcher.rb
|
@@ -257,7 +257,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
257
257
|
version: '0'
|
258
258
|
requirements: []
|
259
259
|
rubyforge_project:
|
260
|
-
rubygems_version: 2.4.
|
260
|
+
rubygems_version: 2.4.5.1
|
261
261
|
signing_key:
|
262
262
|
specification_version: 4
|
263
263
|
summary: Smart code search and indexing
|