avocado-docs 3.0.8 → 3.0.9

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- NDc3NTIxZWM2OGUwMzViOTdiNGUzZDhjMzkyNzI3NjAyMjQ4NDVlMw==
4
+ YjYyZDdhYTY4MjlhNDU2YTVhNzAzZjU0YWNlN2QyMGI3ZWYzYjUxNA==
5
5
  data.tar.gz: !binary |-
6
- ZTNkZWQwMTcxZGE0OTRiNDg5ZmNmYjAwMzhhNTUxNDI4Y2U5ZmY2NA==
6
+ NTNkNWFiNTU2NTRhZDJhM2IzZDMzNjAwMDdiYzg5ZGFjYjBiNWNmZg==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NDk5YzFlZmFiZDI0MGQzMmQ0ZDAzN2QxZGEwODZiNTY2NDhkODgwMDlmZjkx
10
- ZDM5NmFlMmU3YWM1OWE2MGEzNmJmNDg5NTlkNzc3MThiODRjYWFkNmNiOTU1
11
- MGRkNTI5M2NmODI4MTNlZmMxZjI4M2NiYzAwM2ZhOWIyOTZlYWM=
9
+ ZjQxNjMyN2JjNzU1YWEwNGQ0YTZjMWQ3NDZkYzZkMmU0YzE0ODk4ZmYwMDQ2
10
+ NTY1NTExNDAzN2JlZGQ2M2I0YmIzNzg0NjQxYTdhYzU3Y2I4MzA2NTEwNGM3
11
+ OWJlZTU5ZDM1NDA5OGQ3YzYwMTJlZjZmYjU4Mzg4ZmRmOTJmNzg=
12
12
  data.tar.gz: !binary |-
13
- ZmI5MGI0NDAyZjllNzg0YzJkZTY2ZjRmMDUzZDhjZDMyNDIxZGExOTdiNDQy
14
- OTEwZDRjMmFjZmE3MzExZjA2YWNkNWQ0YmU5YjFmMTY1M2YwYWUwMDgwMzhj
15
- OTAyMzM2ZGUwZDA1ZjVjNDcxYmIzNjE0ZTgxYmY2YWNlMzllNmQ=
13
+ MmM3ZmY0ZTI5MzExNWExY2RmMzJhNzRlYWNiZDU0ZjdhYzc2ZTcxNzRjYzZi
14
+ OTIwMTA4ZjU1MzY2YTEwZDNkMGMwMDg0ZDUyYzc2NWZmN2FlMWQ4NDIzZmM4
15
+ MGNiZjkwYzdlYTk4NWQ5NjY4Y2ExZGMwYWIxZDZkOTA4NjhkNzg=
@@ -2,7 +2,7 @@ module Avocado
2
2
  class AvocadoController < ActionController::Base
3
3
 
4
4
  def create
5
- File.open(json, 'a+:UTF-8') { |f| f.write params[:file].read }
5
+ File.open(json, 'w+:UTF-8') { |f| f.write params[:file].read }
6
6
  head :ok
7
7
  end
8
8
 
@@ -17,14 +17,10 @@ module Avocado
17
17
  net_request.use_ssl = (uri.scheme == 'https')
18
18
  response = net_request.start { |http| http.request(request) }
19
19
 
20
- case response
21
- when Net::HTTPSuccess then
22
- response
23
- when Net::HTTPRedirection then
24
- location = response['location']
25
- raise "Avocado was redirected to '#{location}', update your initializer!"
26
- else
27
- raise response.value
20
+ if response.is_a?(Net::HTTPRedirection)
21
+ raise "Avocado was redirected to '#{response['location']}', update your initializer!"
22
+ else
23
+ response
28
24
  end
29
25
  end
30
26
  ensure
@@ -1,3 +1,3 @@
1
1
  module Avocado
2
- VERSION = '3.0.8'
2
+ VERSION = '3.0.9'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: avocado-docs
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.8
4
+ version: 3.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Logan Serman
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-08-07 00:00:00.000000000 Z
11
+ date: 2015-08-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails