rrse 0.6.1 → 0.7

Sign up to get free protection for your applications and to get access to all the features.
metadata CHANGED
@@ -1,29 +1,43 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rrse
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.1
4
+ version: '0.7'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ippei Obayashi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-06-23 00:00:00.000000000 Z
11
+ date: 2017-09-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bitclust-core
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '>='
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '0'
19
+ version: '0.9'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - '>='
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '0'
26
+ version: '0.9'
27
+ - !ruby/object:Gem::Dependency
28
+ name: msgpack
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '1.1'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '1.1'
27
41
  description: |
28
42
  RRSE shows signatures of pointed ruby methods in the minibuffer
29
43
  of emacs.
@@ -31,28 +45,29 @@ description: |
31
45
  You need to install rrse.el after installing this gem.
32
46
  email: ohai@kmc.gr.jp
33
47
  executables:
34
- - rrse-table
35
- - rrse-merge-tables
36
- - rrse-bitclust-listdescs
37
- - rrse-rd-listdescs
48
+ - rrse
38
49
  extensions: []
39
50
  extra_rdoc_files: []
40
51
  files:
41
- - bin/rrse-bitclust-listdescs
42
- - bin/rrse-make-table
43
- - bin/rrse-merge-tables
44
- - bin/rrse-rd-listdescs
45
- - bin/rrse-ri-listdescs
46
- - bin/rrse-table
47
- - elisp/rrse.el
48
- - README.ja
49
- - NEWS.ja
50
52
  - GPL
53
+ - NEWS.ja
54
+ - README.ja.md
55
+ - bin/rrse
56
+ - elisp/rrse.el
57
+ - lib/rrse.rb
58
+ - lib/rrse/database.rb
59
+ - lib/rrse/install-default-db-command.rb
60
+ - lib/rrse/main.rb
61
+ - lib/rrse/pipe-query-command.rb
62
+ - lib/rrse/query-command.rb
63
+ - lib/rrse/setup-command.rb
64
+ - lib/rrse/standalone-query-command.rb
65
+ - lib/rrse/update-db-command.rb
66
+ - misc/index_table
51
67
  - misc/table
52
- - misc/rev-table
53
68
  homepage: http://www.kmc.gr.jp/~ohai/rrse.html
54
69
  licenses:
55
- - GPL 2
70
+ - GPL-2.0
56
71
  metadata: {}
57
72
  post_install_message:
58
73
  rdoc_options: []
@@ -60,19 +75,18 @@ require_paths:
60
75
  - lib
61
76
  required_ruby_version: !ruby/object:Gem::Requirement
62
77
  requirements:
63
- - - '>='
78
+ - - ">="
64
79
  - !ruby/object:Gem::Version
65
80
  version: '0'
66
81
  required_rubygems_version: !ruby/object:Gem::Requirement
67
82
  requirements:
68
- - - '>='
83
+ - - ">="
69
84
  - !ruby/object:Gem::Version
70
85
  version: '0'
71
86
  requirements: []
72
87
  rubyforge_project:
73
- rubygems_version: 2.0.2
88
+ rubygems_version: 2.6.13
74
89
  signing_key:
75
90
  specification_version: 4
76
91
  summary: Ruby Reference Seeker for Emacsen
77
92
  test_files: []
78
- has_rdoc:
data/README.ja DELETED
@@ -1,102 +0,0 @@
1
- Ruby Reference/Refe Seeker for Emacsen 0.6
2
-
3
- 1. ����ϲ�����
4
- ���Υġ���ϡ�bitclust�ξ���ˤ�ȤŤ���Emacs�Υߥ˥Хåե���
5
- Ruby�Υ᥽�åɤδ�ñ�ʥإ�פ�ɽ������ġ���Ǥ���
6
-
7
- 2. bitclust�Ȥϲ�����
8
- bitclust �� Ruby��ե���󥹥ޥ˥奢������ײ� (�̾Τ���) ��
9
- �ޥ˥奢����갷������Υץ������Ǥ���
10
- �ܤ����� https://bugs.ruby-lang.org/projects/rurema/wiki �򻲾Ȥ��Ƥ���������
11
-
12
- 3. ư��Ķ�
13
- Emacs��Ruby 1.9.x/2.0.x ��ɬ�פǤ���
14
- Emacs�ˤ� ruby-mode �򥤥󥹥ȡ��뤹��ɬ�פ�����ޤ���
15
-
16
- �ޤ�����°�Υǡ�����Ȥ��ΤǤʤ����
17
- bitclust��ɬ�פǤ���
18
-
19
- Debian GNU/Linux wheezy ��� Emacs 23.2.1�� Ruby 2.0.0-p195,
20
- bitclust-core 0.7.0 �Ǥ�ư����ǧ���Ƥ��ޤ���
21
-
22
-
23
- 4. ���󥹥ȡ���
24
- �ޤ�
25
- gem install rrse
26
- �� gem �򥤥󥹥ȡ��뤷�ޤ���gem �Υѥå������� elisp/rrse.el �Ȥ���
27
- �ե����뤬�ޤޤ�Ƥ��ޤ��Τǡ����� rrse.el ��
28
- Emacs �� load-path ���̤ä���˥��ԡ����Ƥ���������
29
- gem contents rrse | grep rrse.el
30
- �Ǥɤ��˥ե����뤬�֤���Ƥ��뤫�狼��ޤ���
31
-
32
- 5. �ǡ����١���
33
- ź�դΥǡ����١�����Ȥ��ˤ�
34
- rrse-table setup-default-db
35
- ��OK�Ǥ���
36
-
37
- bitclust ��Ȥ����ϡ��ޤ� bitclust ��
38
- bitclust setup
39
- �ǥ��åȥ��åפ��Ƥ���
40
- rrse-table setup
41
- rrse-table update
42
- �Ȥ��ޤ���
43
-
44
- �ɤ���ξ��Ǥ� $HOME/.rrse/ �ʲ�������ե������ rrse �ѥǡ����١�����
45
- ����ޤ���
46
-
47
- ��ڤ˻Ȥ���������ź�դΤۤ���ȤäƤ���������
48
- bitclust ��Ȥ��Ⱥǿ��ǤΤ��ޤΥǡ������Ȥ��ޤ���
49
-
50
-
51
- 6. Emacs
52
- ���� .emacs ��
53
- (load "rrse")
54
- (rrse-setup)
55
- �Ƚ񤤤Ƥ���������
56
- (add-hook 'ruby-mode-hook
57
- '(lambda ()
58
- (define-key ruby-mode-map [f1] 'rrse-help)))
59
- �� rrse-help ��Ŭ���ʥ����˳�꿶�äƤ����Ȥ���������Ǥ��礦��
60
-
61
- ��ե���󥹤�����Τ� refe �ʳ��Υ��ޥ�ɤ����Ѥ��������ˤϡ�
62
- (setq rrse-refe-program-name "ri1.8")
63
- (setq rrse-refe-program-args '("-T"))
64
- �䡢
65
- (setq rrse-refe-program-name "ruby")
66
- (setq rrse-refe-program-args '("-Ke" "-I/home/you/src/bitclust/lib"
67
- "/home/you/src/bitclust/bin/refe.rb"
68
- "-d" "/home/you/src/bitclust/db-1.9.1"))
69
- �ʤɤ����ꤹ��Ȥ����Ǥ��礦��
70
- �ʾ�ǽ����ϴ�λ�Ǥ���
71
-
72
- ������ ruby-mode ��ư����
73
- �᥽�å�̾�ξ�˥����������äƤ����Ȥ��Υ᥽�åɤ�
74
- ���� "���饹#�᥽�å�̾(����)" �Ȥ������ǥߥ˥Хåե���ɽ������ޤ���
75
-
76
- Ʊ��̾���Υ᥽�åɤ�ʣ��������Ϥ��줬����ɽ������ޤ���
77
-
78
- �ޤ������ξ��֤� M-x rrse-help �Ȥ���ȡ�ɽ������Ƥ���᥽�å�
79
- �Υ�ե���󥹤� ReFe �ǰ������Ȥ��Ǥ��ޤ���
80
-
81
- M-x rrse-toggle-show �ǥߥ˥Хåե���ɽ����ͭ����������̵����������
82
- �Ǥ��ޤ���
83
-
84
- 7. �饤����
85
- GNU GPL 2 or later
86
-
87
- ������ misc/ �ʲ��Ϥ��ޤΥǡ����Ǥ��뤿�ᡢ������������
88
- �饤���� (CC BY 3.0) ��Ŭ�Ѥ���ޤ���
89
-
90
- 8. �ռ��ʤ�
91
- ��������β��ξ����ɽ������Ȥ��������ǥ��� haskell-mode ����
92
- �Ҽڤ��ޤ�����
93
- �ޤ����͡��ʥҥ�Ȥ���ӥѥå��򲼤��ä�rubikitch���󤪤��
94
- �Х���ݡ��Ȥ򲼤��ä� dfft����˴��դ��ޤ���
95
-
96
- 9. �Х��ʤ�
97
- �Х�����˾�ʤɤϺ�Ԥ˥᡼��򤷤Ƥ���������
98
-
99
- 10. ��ԤˤĤ���
100
- ���Ӱ�ʿ
101
- ohai@kmc.gr.jp
102
- http://www.kmc.gr.jp/~ohai/
@@ -1,84 +0,0 @@
1
- #!/usr/bin/env ruby
2
- require "optparse"
3
- require "bitclust"
4
- require "pathname"
5
-
6
- def dbpath_from_config_file(path, version)
7
- path ||= ENV['HOME'] + "/.bitclust/config"
8
- if File.exist?(path)
9
- config = YAML.load_file(path)
10
- version ||= config[:default_version]
11
- "#{config[:database_prefix]}-#{version}"
12
- else
13
- nil
14
- end
15
- end
16
-
17
- reverse = false
18
- db_path = nil
19
- config_path = nil
20
- version = nil
21
-
22
- opt = OptionParser.new
23
- opt.on("-r") { reverse = true }
24
- opt.on("-c CONFIG-FILE"){|path| config_path = path }
25
- opt.on("-d PATH") {|path| db_path = path}
26
- opt.on("--version VERSION"){|ver| version = ver }
27
-
28
- opt.parse!(ARGV)
29
-
30
- db_path ||= dbpath_from_config_file(config_path, version)
31
-
32
- if db_path.nil?
33
- print opt.help
34
- exit
35
- end
36
-
37
- db = BitClust::MethodDatabase.new(db_path)
38
-
39
- def normalize_typemark(typemark)
40
- (typemark == ".#") ? "." : typemark
41
- end
42
-
43
- if reverse
44
- rev_table = Hash.new{|h,k| h[k] = Array.new}
45
- db.classes.each do |c|
46
- c.entries.each do |m|
47
- typemark = normalize_typemark(m.typemark)
48
- next unless typemark == "." || typemark == "#"
49
- m.names.each do |name|
50
- rev_table[name] << "#{c.name}#{typemark}#{name}"
51
- end
52
- end
53
- end
54
- rev_table.sort_by{|key,val| key}.each{|key, val| puts(key + "\t" + val.join("\t"))}
55
- else
56
- all_entries = []
57
- db.classes.sort_by{|c| c.name}.each do |c|
58
- c.entries.sort_by{|m| m.name}.each do |m|
59
- typemark = m.typemark
60
- typemark = "." if typemark == ".#"
61
- next unless typemark == "." || typemark == "#"
62
- m.names.each do |name|
63
- spec = "#{c.name}#{typemark}#{name}"
64
- params = []
65
- m.source.each_line do |line|
66
- if /\A--- #{Regexp.quote(name)}[^a-zA-Z_\[\]=]/ =~ line
67
- line.chomp!
68
- line.gsub!(/\A--- #{Regexp.quote(name)}/, "")
69
- line.gsub!(/\t/, "")
70
- line.gsub!(/ +/, "")
71
- line.gsub!(/->nil\Z/, "")
72
- line.gsub!(/->\(\)\Z/, "")
73
- params << line
74
- end
75
- end
76
-
77
- table_entry = spec + "\t" + params.join("\t")
78
- all_entries << table_entry
79
- end
80
- end
81
- end
82
-
83
- puts all_entries.sort_by{|ent| ent.split(/\t/)[0]}
84
- end
@@ -1,79 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- def usage
4
- puts "USAGE: #{$0} [--ri] [--refe [-d DIR]] [--rdoc [-d DIR]] [--rd FILE] [--bitclust -d DIR] ..."
5
- exit
6
- end
7
-
8
- rrsedir = "#{ENV["HOME"]}/.rrse"
9
- if ARGV.size == 0
10
- usage
11
- end
12
-
13
- if ARGV.first == "-h"
14
- usage
15
- end
16
-
17
- if ARGV.first == "-v"
18
- puts "rrse version 0.4"
19
- exit
20
- end
21
-
22
- if !FileTest.directory?(rrsedir)
23
- puts "mkdir #{rrsedir}"
24
- Dir.mkdir(rrsedir)
25
- end
26
-
27
- n = 0
28
- loop do
29
- case ARGV.shift
30
- when nil
31
- break
32
- when "--ri"
33
- system("rrse-ri-listdescs > #{rrsedir}/table.#{n}")
34
- system("rrse-ri-listdescs -r > #{rrsedir}/rev-table.#{n}")
35
- when "--rdoc"
36
- if ARGV.first == "-d"
37
- opt = "#{ENV["RI"]} -d #{ARGV[1]}"
38
- 2.times{ ARGV.shift }
39
- else
40
- opt = "#{ENV["RI"]} -d #{ENV["HOME"]}/.rdoc"
41
- end
42
- system("RI=\"#{opt}\" rrse-ri-listdescs > #{rrsedir}/table.#{n}")
43
- system("RI=\"#{opt}\" rrse-ri-listdescs -r > #{rrsedir}/rev-table.#{n}")
44
- when "--refe"
45
- if ARGV.first == "-d"
46
- opt = "-d #{ARGV[1]}"
47
- 2.times{ ARGV.shift }
48
- else
49
- opt = ""
50
- end
51
- system("rrse-refe-listdescs #{opt} > #{rrsedir}/table.#{n}")
52
- system("rrse-refe-listdescs -r #{opt} > #{rrsedir}/rev-table.#{n}")
53
- when "--rd"
54
- file = ARGV.shift
55
- system("rrse-rd-listdescs #{file} > #{rrsedir}/table.#{n}")
56
- system("rrse-rd-listdescs -r #{file} > #{rrsedir}/rev-table.#{n}")
57
- when "--bitclust"
58
- if ARGV.first == "-d"
59
- opt = "-d #{ARGV[1]}"
60
- 2.times{ ARGV.shift }
61
- else
62
- opt = ""
63
- end
64
- system("rrse-bitclust-listdescs #{opt} > #{rrsedir}/table.#{n}")
65
- system("rrse-bitclust-listdescs -r #{opt} > #{rrsedir}/rev-table.#{n}")
66
- else
67
- usage
68
- end
69
-
70
- n += 1
71
- end
72
-
73
- tables = (0..n-1).map{|k| "#{rrsedir}/table.#{k}"}.join(" ")
74
- rev_tables = (0..n-1).map{|k| "#{rrsedir}/rev-table.#{k}"}.join(" ")
75
- system("rrse-merge-tables #{tables} > #{rrsedir}/table")
76
- system("rrse-merge-tables #{rev_tables} > #{rrsedir}/rev-table")
77
-
78
- system("rm #{tables}")
79
- system("rm #{rev_tables}")
@@ -1,17 +0,0 @@
1
- #!/usr/bin/env ruby
2
- if ARGV.first == "-c"
3
- ARGV.shift; compact = true
4
- else
5
- compact = false
6
- end
7
-
8
- dict = Hash.new{|h,k| h[k] = Array.new}
9
-
10
- ARGF.each do |line|
11
- key, *contents = *line.chomp.split(/\t/)
12
- dict[key].concat(contents)
13
- end
14
-
15
- dict.each{|k, contents| contents.sort!; contents.uniq!} if compact
16
-
17
- dict.sort.each{|k, contents| print k, "\t", contents.join("\t"), "\n"}
@@ -1,56 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require 'optparse'
4
-
5
- class RDInfo
6
- def initialize(input)
7
- @descs = input.grep(/\A---\s+/).map{|line|
8
- if /\A\s*---\s+((\w|:)*)(#|\.)((\w|\[|\]|=|\?|\!)+)\s*((\(.*\))?)/ =~ line
9
- Description.new($1+$3+$4, $4, $6)
10
- end
11
- }.compact
12
- end
13
-
14
- def display_info(reverse)
15
- if reverse
16
- @descs.
17
- inject(Hash.new{|h,k| h[k]=[]}){|h, desc| h[desc.method] << desc.spec; h}.
18
- sort_by{|method, *| method}.
19
- each{|method, specs| puts "#{method}\t#{specs.join("\t")}"}
20
- else
21
- @descs.sort_by{|desc| desc.spec}.each{|desc| puts desc.show }
22
- end
23
- end
24
-
25
- class Description
26
- attr_reader :spec, :method, :descs
27
- def initialize(spec, method, descs)
28
- @spec = spec
29
- @method = method
30
- @descs = descs
31
- end
32
-
33
- def show
34
- "#{@spec}\t#{@descs}"
35
- end
36
- end
37
- end
38
-
39
- opt = OptionParser.new
40
- reverse = false
41
- opt.on('-r', 'Print reverse data'){ reverse = true }
42
- opt.parse!(ARGV)
43
-
44
-
45
-
46
- begin
47
- RDInfo.new(ARGF).display_info(reverse)
48
- rescue RuntimeError
49
- raise
50
- rescue StandardError => err
51
- raise if $DEBUG
52
- $stderr.puts err.message
53
- exit 1
54
- end
55
-
56
-