ripper-tags 0.3.3 → 0.3.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c55ab0323f82a519edb3402b387f5781bc2c478f
4
- data.tar.gz: a5b1cd620e2b226cd96d66c3da67f500f9a0da1f
3
+ metadata.gz: 633febda9a64996bfe3f7b67c54c8ba25f401103
4
+ data.tar.gz: 5ec09660f054651c5f53018c6fc4d0e0b8fec03e
5
5
  SHA512:
6
- metadata.gz: 706fce503d2c9f3d212640f91e1afe25927953ba45582a34fd81935460d87eb66c802de1d19bdfc95fe0d8b5d07eb559e6a90b731f7eb4a936f8124ab5480049
7
- data.tar.gz: f250444d60e8ec0c9e5e26e80b7f623fcae5c9e2792768ce480c8bca7ec7c1b0742fb772f1c0cc195a9a2dff8239a3ed1b8a344b1b558244d4e4d86758d716a5
6
+ metadata.gz: 9f7a0f16ccd10afe23df8b7955894a40a329403e66fa7b8b19d92e0aec99063b1df6de7128c5d020888e9dd39f97ee0f8e904793a2a13fe8bcc3b43f3f6914a5
7
+ data.tar.gz: d001643167fe786a6bb9b6525dcc2c26ae1c279953b21ab3b9f0cabb343cdf78aa72020f877b76d9bd404cb252fb2fdf4f763e5c5d0e4a50da65ae972d298e45
data/lib/ripper-tags.rb CHANGED
@@ -9,7 +9,7 @@ require 'ripper-tags/vim_formatter'
9
9
  require 'ripper-tags/json_formatter'
10
10
 
11
11
  module RipperTags
12
- def self.version() "0.3.3" end
12
+ def self.version() "0.3.4" end
13
13
 
14
14
  FatalError = Class.new(RuntimeError)
15
15
 
@@ -17,7 +17,7 @@ module RipperTags
17
17
  OpenStruct.new \
18
18
  :format => nil,
19
19
  :extra_flags => Set.new,
20
- :tag_file_name => "./tags",
20
+ :tag_file_name => nil,
21
21
  :tag_relative => nil,
22
22
  :debug => false,
23
23
  :verbose_debug => false,
@@ -36,7 +36,7 @@ module RipperTags
36
36
 
37
37
  opts.separator ""
38
38
 
39
- opts.on("-f", "--tag-file (FILE|-)", "File to write tags to (default: `#{options.tag_file_name}')",
39
+ opts.on("-f", "--tag-file (FILE|-)", "File to write tags to (default: `./tags')",
40
40
  '"-" outputs to standard output') do |fname|
41
41
  options.tag_file_name = fname
42
42
  end
@@ -118,10 +118,13 @@ module RipperTags
118
118
  def self.process_args(argv, run = method(:run))
119
119
  option_parser(default_options) do |optparse, options|
120
120
  file_list = optparse.parse(argv)
121
- if !file_list.empty? then options.files = file_list
122
- elsif !options.recursive then abort(optparse.banner)
121
+ if !file_list.empty?
122
+ options.files = file_list
123
+ elsif !options.recursive
124
+ raise OptionParser::InvalidOption, "needs either a list of files or `-R' flag"
123
125
  end
124
- options.format ||= File.basename(options.tag_file_name) == "TAGS" ? "emacs" : "vim"
126
+ options.tag_file_name ||= options.format == 'emacs' ? './TAGS' : './tags'
127
+ options.format ||= File.basename(options.tag_file_name) == 'TAGS' ? 'emacs' : 'vim'
125
128
  options.tag_relative = options.format == "emacs" if options.tag_relative.nil?
126
129
  return run.call(options)
127
130
  end
@@ -17,6 +17,7 @@ class Parser < Ripper
17
17
  end
18
18
 
19
19
  def on_stmts_add(first, *rest)
20
+ return if first == :~
20
21
  (first || []) + rest.compact
21
22
  end
22
23
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ripper-tags
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.3
4
+ version: 0.3.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aman Gupta
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-03-26 00:00:00.000000000 Z
11
+ date: 2016-12-14 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: fast, accurate ctags generator for ruby source code using Ripper
14
14
  email: