sunflower 0.5.9 → 0.5.10

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/README +1 -1
  2. data/lib/sunflower/core.rb +6 -1
  3. metadata +2 -2
data/README CHANGED
@@ -1,4 +1,4 @@
1
- Version: 0.5.9 alpha
1
+ Version: 0.5.10 alpha
2
2
 
3
3
  >>> English:
4
4
 
@@ -40,7 +40,7 @@ end
40
40
  #
41
41
  # You can use multiple Sunflowers at once, to work on multiple wikis.
42
42
  class Sunflower
43
- VERSION = '0.5.9'
43
+ VERSION = '0.5.10'
44
44
 
45
45
  INVALID_CHARS = %w(# < > [ ] | { })
46
46
  INVALID_CHARS_REGEX = Regexp.union *INVALID_CHARS
@@ -167,6 +167,11 @@ class Sunflower
167
167
  @api_endpoint = opts[:api_endpoint] || 'http://'+@wikiURL+'/w/api.php'
168
168
  end
169
169
 
170
+ # handle protocol-relative URLs
171
+ u = URI.parse(@api_endpoint)
172
+ u.scheme ||= URI.parse(@wikiURL).scheme || 'http'
173
+ @api_endpoint = u.to_s
174
+
170
175
  @warnings = true
171
176
  @log = false
172
177
 
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.5.9
4
+ version: 0.5.10
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: 2013-02-18 00:00:00.000000000 Z
12
+ date: 2013-02-24 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: json