starscope 1.0.4 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +0 -1
- data/CHANGELOG.md +24 -1
- data/Gemfile.lock +6 -6
- data/README.md +8 -0
- data/Rakefile +1 -2
- data/bin/starscope +42 -24
- data/doc/DB_FORMAT.md +42 -0
- data/doc/LANGUAGE_SUPPORT.md +80 -0
- data/doc/USER_GUIDE.md +135 -0
- data/lib/starscope/db.rb +135 -83
- data/lib/starscope/langs/coffeescript.rb +1 -1
- data/lib/starscope/langs/go.rb +3 -0
- data/lib/starscope/langs/ruby.rb +11 -11
- data/lib/starscope/output.rb +16 -9
- data/lib/starscope/version.rb +1 -1
- data/test/fixtures/db_old.json.gz +0 -0
- data/test/{files → fixtures}/empty +0 -0
- data/test/{files → fixtures}/sample_golang.go +4 -0
- data/test/{files → fixtures}/sample_ruby.rb +0 -0
- data/test/functional/test_starscope.rb +35 -0
- data/test/test_helper.rb +5 -3
- data/test/{lib → unit}/test_db.rb +25 -18
- data/test/{lib → unit}/test_golang.rb +2 -0
- data/test/{lib → unit}/test_matcher.rb +0 -0
- data/test/{lib → unit}/test_record.rb +2 -2
- data/test/{lib → unit}/test_ruby.rb +0 -0
- metadata +36 -52
- data/test/files/db_old.json.gz +0 -0
- data/test/lib/test_starscope.rb +0 -33
data/test/lib/test_starscope.rb
DELETED
@@ -1,33 +0,0 @@
|
|
1
|
-
require File.expand_path('../../test_helper', __FILE__)
|
2
|
-
|
3
|
-
class TestStarScope < Minitest::Test
|
4
|
-
|
5
|
-
EXEC = 'bundle exec bin/starscope --no-read --no-write --no-progress ./test/files/'
|
6
|
-
|
7
|
-
def test_help
|
8
|
-
`#{EXEC} -h`.each_line do |line|
|
9
|
-
assert line.length <= 80
|
10
|
-
end
|
11
|
-
end
|
12
|
-
|
13
|
-
def test_version
|
14
|
-
assert `#{EXEC} -v`.chomp == StarScope::VERSION
|
15
|
-
end
|
16
|
-
|
17
|
-
def test_summary
|
18
|
-
lines = `#{EXEC} -s`.lines
|
19
|
-
end
|
20
|
-
|
21
|
-
def test_dump
|
22
|
-
lines = `#{EXEC} -d requires`.lines.to_a
|
23
|
-
assert lines[1].split.first == 'date'
|
24
|
-
assert lines[2].split.first == 'zlib'
|
25
|
-
end
|
26
|
-
|
27
|
-
def test_query
|
28
|
-
`#{EXEC} -q calls,add_file`.each_line do |line|
|
29
|
-
assert line.split[0..2] == ["StarScope", "DB", "add_file"]
|
30
|
-
end
|
31
|
-
end
|
32
|
-
|
33
|
-
end
|