apipie-rails 0.3.6 → 0.3.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5d6fc12663b63923153a8f238fac0c7556257aeb
4
- data.tar.gz: 2271e183d1319d0d42df3d909285d7ded70970aa
3
+ metadata.gz: 17995f18251d02f81382e0d01c72f257f708849c
4
+ data.tar.gz: 5c7c04c928e4ec7639d589e4fb878e5ae60b8522
5
5
  SHA512:
6
- metadata.gz: 7864fe236a067ce5a0a3068a51d01a53b641ade349f6f5dc8b2d9ebc242e8c078de8601d82e62c4560770e9c537bfe98771e1f24c4b693fb31cb5fc32148d91d
7
- data.tar.gz: fb902c9fc943fb6f3067576af5db940b015009810d908ccb02d684e9364e9cb293dc257d73848c7fee42cf356ad9756189734e0e5811e8f3ee07083535f483c2
6
+ metadata.gz: f3f894d9d39a183ae146c9f9b8be3d9d402b8631cb7243294d01acbc0b5f84e1b2e7f39fd5170d1e7c989daa7493a2e9ded3653907ea4cd69e4285b7211e5bc2
7
+ data.tar.gz: ce051627c13ca9435698f1e3d553d3aa22d30f77408b007ff127b1f6d64c495f90d30fa042bef3b25c527afa6f89d45baae6bc812931229daa3d5b6393cc5268
@@ -2,6 +2,12 @@
2
2
  Changelog
3
3
  ===========
4
4
 
5
+ v0.3.7
6
+ ------
7
+
8
+ - Handle blank data when parsing a example's response [\#453](https://github.com/Apipie/apipie-rails/pull/453) ([stbenjam](https://github.com/stbenjam))
9
+ - Allow layouts to be overridable. Fixes a regression introduced in \#425. [\#447](https://github.com/Apipie/apipie-rails/pull/447) ([nilseriksson](https://github.com/nilseriksson))
10
+
5
11
  v0.3.6
6
12
  ------
7
13
 
@@ -3,3 +3,4 @@ source "https://rubygems.org"
3
3
  gemspec
4
4
 
5
5
  gem 'rails', '~> 4.0.0'
6
+ gem 'mime-types', '~> 2.99.3'
@@ -3,3 +3,4 @@ source "https://rubygems.org"
3
3
  gemspec
4
4
 
5
5
  gem 'rails', '~> 4.1.0'
6
+ gem 'mime-types', '~> 2.99.3'
@@ -2,4 +2,5 @@ source "https://rubygems.org"
2
2
 
3
3
  gemspec
4
4
 
5
- gem 'rails', '~> 4.2.5.1'
5
+ gem 'rails', '~> 4.2.5'
6
+ gem 'mime-types', '~> 2.99.3'
@@ -93,7 +93,7 @@ module Apipie
93
93
  end
94
94
 
95
95
  def authorized_doc
96
-
96
+ return if @doc.nil?
97
97
  return @doc unless Apipie.configuration.authorize
98
98
 
99
99
  new_doc = { :docs => @doc[:docs].clone }
@@ -48,9 +48,9 @@ module Apipie
48
48
  end
49
49
 
50
50
  def parse_data(data)
51
- return nil if data.to_s =~ /^\s*$/
51
+ return nil if data.strip.blank?
52
52
  JSON.parse(data)
53
- rescue StandardError => e
53
+ rescue StandardError
54
54
  data
55
55
  end
56
56
 
@@ -1,3 +1,3 @@
1
1
  module Apipie
2
- VERSION = '0.3.6'
2
+ VERSION = '0.3.7'
3
3
  end
@@ -105,7 +105,11 @@ namespace :apipie do
105
105
  else
106
106
  File.expand_path("../../../app/views/apipie/apipies", __FILE__)
107
107
  end
108
- layouts_path = File.expand_path("../../../app/views/layouts", __FILE__)
108
+ layouts_path = if File.directory?("#{Rails.root}/app/views/layouts/apipie")
109
+ "#{Rails.root}/app/views/layouts"
110
+ else
111
+ File.expand_path("../../../app/views/layouts", __FILE__)
112
+ end
109
113
  @apipie_renderer = ActionView::Base.new([base_path, layouts_path])
110
114
  @apipie_renderer.singleton_class.send(:include, ApipieHelper)
111
115
  return @apipie_renderer
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: apipie-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.6
4
+ version: 0.3.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pavel Pokorny
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-02-18 00:00:00.000000000 Z
12
+ date: 2016-10-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -311,7 +311,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
311
311
  version: '0'
312
312
  requirements: []
313
313
  rubyforge_project:
314
- rubygems_version: 2.2.0
314
+ rubygems_version: 2.4.5
315
315
  signing_key:
316
316
  specification_version: 4
317
317
  summary: Rails REST API documentation tool