sunflower 0.4.4 → 0.4.5

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.
Files changed (3) hide show
  1. data/README +1 -1
  2. data/lib/sunflower/core.rb +8 -4
  3. metadata +2 -2
data/README CHANGED
@@ -1,4 +1,4 @@
1
- Version: 0.4.4 alpha
1
+ Version: 0.4.5 alpha
2
2
 
3
3
  >>> English:
4
4
 
@@ -19,7 +19,7 @@ class SunflowerError < StandardError; end
19
19
  #
20
20
  # You can use multiple Sunflowers at once, to work on multiple wikis.
21
21
  class Sunflower
22
- VERSION = '0.4.4'
22
+ VERSION = '0.4.5'
23
23
 
24
24
  INVALID_CHARS = %w(# < > [ ] | { })
25
25
  INVALID_CHARS_REGEX = Regexp.union *INVALID_CHARS
@@ -282,15 +282,19 @@ class Page
282
282
  @modulesExecd=[] #used by sunflower-commontasks.rb
283
283
  @summaryAppend=[] #used by sunflower-commontasks.rb
284
284
 
285
+ wiki = wiki+'.wikipedia.org' if wiki.index('.')==nil && wiki!=''
286
+
285
287
  if wiki==''
286
288
  count=ObjectSpace.each_object(Sunflower){|o| @sunflower=o}
287
- raise SunflowerError, 'you must pass wiki name if using multiple Sunflowers at once!' if count>1
289
+ raise SunflowerError, 'no Sunflowers present' if count==0
290
+ raise SunflowerError, 'you must pass wiki name if using multiple Sunflowers at once' if count>1
288
291
  else
289
292
  ObjectSpace.each_object(Sunflower){|o| @sunflower=o if o.wikiURL==wiki}
290
293
  end
291
294
 
292
- @title = self.sunflower.cleanup_title title
293
- wiki = wiki+'.wikipedia.org' if wiki.index('.')==nil && wiki!=''
295
+ raise SunflowerError, "no Sunflower for #{wiki}" if !@sunflower
296
+
297
+ @title = @sunflower.cleanup_title title
294
298
 
295
299
  if title==''
296
300
  @text=''
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sunflower
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.4
4
+ version: 0.4.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-08-03 00:00:00.000000000 Z
12
+ date: 2012-08-05 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: json