rdoc_osx_dictionary 2.0.0 → 2.0.1

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.
data.tar.gz.sig CHANGED
Binary file
@@ -1,3 +1,11 @@
1
+ === 2.0.1 / 2012-01-11
2
+
3
+ * 3 bug fixes:
4
+
5
+ * Changed the way entries were indexed to remove errant duplicate entries.
6
+ * Fixed a bunch of 1.9.3 warnings.
7
+ * Fixed problems on case insensitive file systems. :(
8
+
1
9
  === 2.0.0 / 2011-12-15
2
10
 
3
11
  * 1 major enhancement:
data/README.txt CHANGED
@@ -1,6 +1,7 @@
1
1
  = rdoc_osx_dictionary
2
2
 
3
- * http://rubyforge.org/projects/seattlerb
3
+ home :: https://github.com/seattlerb/rdoc_osx_dictionary
4
+ rdoc :: http://docs.seattlerb.org/rdoc_osx_dictionary
4
5
 
5
6
  == DESCRIPTION:
6
7
 
@@ -14,7 +14,7 @@ ENV['LANG'] = ""
14
14
  ENV['LC_ALL'] = "C"
15
15
 
16
16
  class RDoc::OSXDictionary
17
- VERSION = '2.0.0'
17
+ VERSION = '2.0.1'
18
18
 
19
19
  EXCLUDE = {
20
20
  }
@@ -71,10 +71,8 @@ class RDoc::OSXDictionary
71
71
  m_seen = {} # HACK: known issue: on a case insensitive FS we're losing files
72
72
 
73
73
  File.open(path, "w") do |f|
74
- c_result, m_result = [], []
75
-
74
+ m_result = []
76
75
  m_seen.clear
77
- seen_system = false
78
76
 
79
77
  fullname = klass
80
78
 
@@ -116,10 +114,16 @@ class RDoc::OSXDictionary
116
114
  f.puts class_details(name, fullname, cdesc, level)
117
115
 
118
116
  cdesc.method_list.each do |method|
119
- next if m_seen[method.full_name.downcase]
120
- method = store.load_method klass, method.full_name
121
- m_result << display_method_info(method, from)
122
- m_seen[method.full_name.downcase] = true
117
+ fullname = method.full_name
118
+ key = id from, fullname
119
+
120
+ next if m_seen[key]
121
+
122
+ method = store.load_method klass, fullname
123
+
124
+ # HACK: after load_method, parent_name is not full name, pass down key
125
+ m_result << display_method_info(method, from, key)
126
+ m_seen[key] = true
123
127
  end
124
128
  end # stores.each
125
129
 
@@ -162,15 +166,11 @@ class RDoc::OSXDictionary
162
166
  result
163
167
  end
164
168
 
165
- def display_method_info definition, from
166
- klass = definition.parent_name
167
-
169
+ def display_method_info definition, from, key
168
170
  fullname = definition.full_name
169
171
  name = definition.name
170
- singleton = definition.singleton
171
172
  params = definition.arglists
172
173
  comment = to_html.convert definition.comment
173
- type = singleton ? "defs" : "def"
174
174
 
175
175
  return if name =~ /_reduce_\d+/
176
176
 
@@ -181,8 +181,8 @@ class RDoc::OSXDictionary
181
181
  comment = comment.gsub(/<span[^>]+>/, '').gsub(/<\/span>/, '')
182
182
  comment = comment.gsub(/(<pre[^>]*>)\s*\n/, '\1')
183
183
 
184
- result = <<-"EOD".gsub(/^ {6}/, '')
185
- <d:entry id="#{id type, klass, name}" d:title="#{fullname.munge}">
184
+ return <<-"EOD".gsub(/^ {6}/, '')
185
+ <d:entry id="#{key}" d:title="#{fullname.munge}">
186
186
  <d:index d:value="#{fullname.munge}"/>
187
187
  <d:index d:value="#{name.munge}"/>
188
188
  <h1>#{fullname.munge}</h1>
@@ -205,14 +205,14 @@ class RDoc::OSXDictionary
205
205
  end
206
206
 
207
207
  def d_header
208
- result = <<-"EOD".gsub(/^ {6}/, '')
208
+ return <<-"EOD".gsub(/^ {6}/, '')
209
209
  <?xml version="1.0" encoding="UTF-8"?>
210
210
  <d:dictionary xmlns="http://www.w3.org/1999/xhtml" xmlns:d="http://www.apple.com/DTDs/DictionaryService-1.0.rng">
211
211
  EOD
212
212
  end
213
213
 
214
214
  def d_footer classes, sources
215
- result = <<-"EOD".gsub(/^ {6}/, '')
215
+ return <<-"EOD".gsub(/^ {6}/, '')
216
216
  <d:entry id="front_back_matter" d:title="Front/Back Matter">
217
217
  <h1><b>RubyGems Dictionary</b></h1>
218
218
 
@@ -247,7 +247,7 @@ class RDoc::OSXDictionary
247
247
  l_seen = {}
248
248
 
249
249
  dict.sort.each do |klass, stores|
250
- path = "#{base}/dict/#{klass}.xml"
250
+ path = "#{base}/dict/#{klass.downcase}.xml"
251
251
 
252
252
  next if $q and klass !~ /^(String|Array|Bignum)/
253
253
 
@@ -270,8 +270,6 @@ class RDoc::OSXDictionary
270
270
 
271
271
  return unless dirty unless force
272
272
 
273
- dict_src_path = "#{base}/RubyGemsDictionary.xml"
274
-
275
273
  seen = {}
276
274
 
277
275
  classes = {}
@@ -284,16 +282,19 @@ class RDoc::OSXDictionary
284
282
  end
285
283
  end
286
284
 
285
+ dict_src_path = "#{base}/RubyGemsDictionary.xml"
286
+
287
287
  File.open(dict_src_path, "w") do |xml|
288
288
  xml.puts d_header
289
289
 
290
290
  dict.sort.each do |klass, stores|
291
291
  next if $q and klass !~ /^(String|Array|Bignum)/
292
292
 
293
- next if seen[klass]
294
- seen[klass] = true
293
+ next if seen[klass.downcase]
294
+ seen[klass.downcase] = true
295
+
296
+ path = "#{base}/dict/#{klass.downcase}.xml"
295
297
 
296
- path = "#{base}/dict/#{klass}.xml"
297
298
  body = File.read path rescue nil
298
299
  if body then
299
300
  xml.puts body
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rdoc_osx_dictionary
3
3
  version: !ruby/object:Gem::Version
4
- hash: 15
4
+ hash: 13
5
5
  prerelease:
6
6
  segments:
7
7
  - 2
8
8
  - 0
9
- - 0
10
- version: 2.0.0
9
+ - 1
10
+ version: 2.0.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Ryan Davis
@@ -36,7 +36,7 @@ cert_chain:
36
36
  FBHgymkyj/AOSqKRIpXPhjC6
37
37
  -----END CERTIFICATE-----
38
38
 
39
- date: 2011-12-15 00:00:00 Z
39
+ date: 2012-01-12 00:00:00 Z
40
40
  dependencies:
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rdoc
@@ -61,11 +61,11 @@ dependencies:
61
61
  requirements:
62
62
  - - ~>
63
63
  - !ruby/object:Gem::Version
64
- hash: 19
64
+ hash: 17
65
65
  segments:
66
66
  - 2
67
- - 8
68
- version: "2.8"
67
+ - 9
68
+ version: "2.9"
69
69
  type: :development
70
70
  version_requirements: *id002
71
71
  - !ruby/object:Gem::Dependency
@@ -83,21 +83,6 @@ dependencies:
83
83
  version: "2.12"
84
84
  type: :development
85
85
  version_requirements: *id003
86
- - !ruby/object:Gem::Dependency
87
- name: rdoc
88
- prerelease: false
89
- requirement: &id004 !ruby/object:Gem::Requirement
90
- none: false
91
- requirements:
92
- - - ~>
93
- - !ruby/object:Gem::Version
94
- hash: 19
95
- segments:
96
- - 3
97
- - 10
98
- version: "3.10"
99
- type: :development
100
- version_requirements: *id004
101
86
  description: |-
102
87
  rdoc via Apple's Dictionary.app. Automatically builds and installs an
103
88
  Apple Dictionary with all rdoc nicely formatted.
@@ -123,8 +108,7 @@ files:
123
108
  - data/RubyGemsInfo.plist
124
109
  - lib/rdoc_osx_dictionary.rb
125
110
  - lib/rubygems_plugin.rb
126
- - .gemtest
127
- homepage: http://rubyforge.org/projects/seattlerb
111
+ homepage: https://github.com/seattlerb/rdoc_osx_dictionary
128
112
  licenses: []
129
113
 
130
114
  post_install_message:
@@ -154,7 +138,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
154
138
  requirements: []
155
139
 
156
140
  rubyforge_project: seattlerb
157
- rubygems_version: 1.8.10
141
+ rubygems_version: 1.8.12
158
142
  signing_key:
159
143
  specification_version: 3
160
144
  summary: rdoc via Apple's Dictionary.app
metadata.gz.sig CHANGED
Binary file
data/.gemtest DELETED
File without changes