rdoc_osx_dictionary 1.1.0 → 1.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/History.txt CHANGED
@@ -1,3 +1,13 @@
1
+ === 1.1.1 / 2010-02-02
2
+
3
+ * 1 minor enhancement:
4
+
5
+ * Extra munging to remove more (all?) warnings from the dictionary compiler
6
+
7
+ * 1 bug fix:
8
+
9
+ * Only run the hooks once per gem invocation, not once per install/uninstall
10
+
1
11
  === 1.1.0 / 2010-02-01
2
12
 
3
13
  * 2 minor enhancements:
@@ -8,7 +8,7 @@ ENV['LANG'] = ""
8
8
  ENV['LC_ALL'] = "C"
9
9
 
10
10
  class RDoc::OSXDictionary
11
- VERSION = '1.1.0'
11
+ VERSION = '1.1.1'
12
12
 
13
13
  exclude = %w[ StringScanner#pre_match
14
14
  StringScanner#post_match
@@ -77,10 +77,12 @@ class RDoc::OSXDictionary
77
77
 
78
78
  result = []
79
79
 
80
+ shortname = "<d:index d:value="#{name.munge}"/>" if name != fullname
81
+
80
82
  result << <<-"EOD".gsub(/^ /, '')
81
83
  <d:entry id="#{id}" d:title="#{fullname}">
82
84
  <d:index d:value="#{fullname.munge}"/>
83
- <d:index d:value="#{name.munge}"/>
85
+ #{shortname}
84
86
  <h1>#{title.munge}</h1>
85
87
 
86
88
  #{comment}
@@ -268,10 +270,10 @@ class RDoc::OSXDictionary
268
270
  abort "command failed" unless system(*cmd)
269
271
  end
270
272
 
271
- @hooked = false
273
+ @hooked = {}
272
274
 
273
275
  def self.install_gem_hooks
274
- return if @hooked
276
+ return if @hooked[:hook]
275
277
 
276
278
  cmd = File.expand_path File.join(__FILE__, "../../bin/rdoc_osx_dictionary")
277
279
 
@@ -279,6 +281,8 @@ class RDoc::OSXDictionary
279
281
  # force via at_exit :(
280
282
  Gem.post_install do |i|
281
283
  at_exit do
284
+ return if @hooked[:install]
285
+ @hooked[:install] = true
282
286
  warn "updating OSX ruby + gem dictionary, if necessary"
283
287
  system cmd
284
288
  end
@@ -286,6 +290,8 @@ class RDoc::OSXDictionary
286
290
 
287
291
  Gem.post_uninstall do |i|
288
292
  at_exit do
293
+ return if @hooked[:uninstall]
294
+ @hooked[:uninstall] = true
289
295
  require 'fileutils'
290
296
  warn "nuking old ri cache to force rebuild"
291
297
  FileUtils.rm_r File.expand_path("~/.ri")
@@ -293,13 +299,13 @@ class RDoc::OSXDictionary
293
299
  end
294
300
  end
295
301
 
296
- @hooked = true
302
+ @hooked[:hook] = true
297
303
  end
298
304
  end
299
305
 
300
306
  class String
301
307
  def munge
302
- self.gsub(/&/, '&amp;').gsub(/>/, '&gt;').gsub(/</, '&lt;')
308
+ self.gsub(/&/, '&amp;').gsub(/>/, '&gt;').gsub(/</, '&lt;').gsub(/-/, 'minus')
303
309
  end
304
310
  end
305
311
 
metadata CHANGED
@@ -1,36 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rdoc_osx_dictionary
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Davis
8
8
  autorequire:
9
9
  bindir: bin
10
- cert_chain:
11
- - |
12
- -----BEGIN CERTIFICATE-----
13
- MIIDPjCCAiagAwIBAgIBADANBgkqhkiG9w0BAQUFADBFMRMwEQYDVQQDDApyeWFu
14
- ZC1ydWJ5MRkwFwYKCZImiZPyLGQBGRYJemVuc3BpZGVyMRMwEQYKCZImiZPyLGQB
15
- GRYDY29tMB4XDTA5MDMwNjE4NTMxNVoXDTEwMDMwNjE4NTMxNVowRTETMBEGA1UE
16
- AwwKcnlhbmQtcnVieTEZMBcGCgmSJomT8ixkARkWCXplbnNwaWRlcjETMBEGCgmS
17
- JomT8ixkARkWA2NvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALda
18
- b9DCgK+627gPJkB6XfjZ1itoOQvpqH1EXScSaba9/S2VF22VYQbXU1xQXL/WzCkx
19
- taCPaLmfYIaFcHHCSY4hYDJijRQkLxPeB3xbOfzfLoBDbjvx5JxgJxUjmGa7xhcT
20
- oOvjtt5P8+GSK9zLzxQP0gVLS/D0FmoE44XuDr3iQkVS2ujU5zZL84mMNqNB1znh
21
- GiadM9GHRaDiaxuX0cIUBj19T01mVE2iymf9I6bEsiayK/n6QujtyCbTWsAS9Rqt
22
- qhtV7HJxNKuPj/JFH0D2cswvzznE/a5FOYO68g+YCuFi5L8wZuuM8zzdwjrWHqSV
23
- gBEfoTEGr7Zii72cx+sCAwEAAaM5MDcwCQYDVR0TBAIwADALBgNVHQ8EBAMCBLAw
24
- HQYDVR0OBBYEFEfFe9md/r/tj/Wmwpy+MI8d9k/hMA0GCSqGSIb3DQEBBQUAA4IB
25
- AQAY59gYvDxqSqgC92nAP9P8dnGgfZgLxP237xS6XxFGJSghdz/nI6pusfCWKM8m
26
- vzjjH2wUMSSf3tNudQ3rCGLf2epkcU13/rguI88wO6MrE0wi4ZqLQX+eZQFskJb/
27
- w6x9W1ur8eR01s397LSMexySDBrJOh34cm2AlfKr/jokKCTwcM0OvVZnAutaovC0
28
- l1SVZ0ecg88bsWHA0Yhh7NFxK1utWoIhtB6AFC/+trM0FQEB/jZkIS8SaNzn96Rl
29
- n0sZEf77FLf5peR8TP/PtmIg7Cyqz23sLM4mCOoTGIy5OcZ8TdyiyINUHtb5ej/T
30
- FBHgymkyj/AOSqKRIpXPhjC6
31
- -----END CERTIFICATE-----
10
+ cert_chain: []
32
11
 
33
- date: 2010-02-01 00:00:00 -08:00
12
+ date: 2010-02-02 00:00:00 -08:00
34
13
  default_executable:
35
14
  dependencies:
36
15
  - !ruby/object:Gem::Dependency
data.tar.gz.sig DELETED
Binary file
metadata.gz.sig DELETED
Binary file