swagger_yard-rails 0.3.3 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +6 -2
- data/CHANGELOG.md +6 -0
- data/Gemfile +10 -0
- data/app/controllers/swagger_yard/rails/swagger_controller.rb +4 -0
- data/bin/console +1 -2
- data/config/routes.rb +1 -0
- data/lib/swagger_yard/rails/route_inspector.rb +2 -1
- data/lib/swagger_yard/rails/tasks.rake +8 -0
- data/lib/swagger_yard/rails/version.rb +1 -1
- data/swagger_yard-rails.gemspec +1 -1
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 13516255456149e613e10bd2f7c28b59f1b85f73
|
4
|
+
data.tar.gz: bdf748d685a604b9e5757e8ab0ab2fede35d847e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0eb473661774dde968477c926bdff169b657efb48bfcb8b86f5a65888a80f695f1bf4d3ba77ffc2425b082b7558c3bc153a4050171b47ddef4ecbdf23823a60f
|
7
|
+
data.tar.gz: dd72f714272a6e1e84234e80d736a39135a87b705cda25bf2cc48ef375cd23352e8700ca7e9ab01f620a1e26fb6a93a7c79c18902ed4dc976ee4491983c3c87e
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,11 @@
|
|
1
1
|
# SwaggerYard-Rails Changelog
|
2
2
|
|
3
|
+
## 1.0.0 28-06-2018 ##
|
4
|
+
|
5
|
+
* Add OpenAPI stuff -- `/swagger/openapi.json` route and `openapi:json` task
|
6
|
+
* Bump dependency on swagger_yard to >= 1.0.0
|
7
|
+
* Test on Rails 4.2, Rails 5.0, and latest Rails release
|
8
|
+
|
3
9
|
## 0.3.3 25-07-2016 ##
|
4
10
|
|
5
11
|
* Descend into engine routes when searching for matches. This allows documented
|
data/Gemfile
CHANGED
@@ -2,3 +2,13 @@ source 'https://rubygems.org'
|
|
2
2
|
|
3
3
|
# Specify your gem's dependencies in swagger_yard-rails.gemspec
|
4
4
|
gemspec
|
5
|
+
|
6
|
+
if ENV['RAILS_VERSION']
|
7
|
+
gem 'rails', ENV['RAILS_VERSION']
|
8
|
+
elsif File.exist?('Gemfile.lock')
|
9
|
+
# use whatever version is currently installed
|
10
|
+
version = File.read('Gemfile.lock').scan(/DEPENDENCIES.*/m).first[/rails \((.*?)\)/m, 1]
|
11
|
+
gem 'rails', version
|
12
|
+
else
|
13
|
+
gem 'rails', '~> 4.2'
|
14
|
+
end
|
data/bin/console
CHANGED
@@ -1,7 +1,6 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
|
-
require
|
4
|
-
require "swagger_yard/rails"
|
3
|
+
require File.expand_path('../../spec/spec_helper', __FILE__)
|
5
4
|
|
6
5
|
# You can add fixtures and/or initialization code here to make experimenting
|
7
6
|
# with your gem easier. You can also use a different console, if you like.
|
data/config/routes.rb
CHANGED
@@ -19,7 +19,8 @@ module SwaggerYard
|
|
19
19
|
info = yard_info(yard_obj)
|
20
20
|
route_arr = find_route(info)
|
21
21
|
route = route_arr.last
|
22
|
-
method = route.verb
|
22
|
+
method = route.verb
|
23
|
+
method = method.source.gsub(/[$^]/, '') if method.respond_to?(:source)
|
23
24
|
|
24
25
|
raise Error, "no http method: #{info.inspect}" if method.empty?
|
25
26
|
|
@@ -5,3 +5,11 @@ namespace :swagger do
|
|
5
5
|
end
|
6
6
|
end
|
7
7
|
end
|
8
|
+
|
9
|
+
namespace :openapi do
|
10
|
+
task :json, [:filename] => :environment do |t, args|
|
11
|
+
File.open(args[:filename] || "openapi.json", "w") do |f|
|
12
|
+
f.puts JSON.pretty_generate(SwaggerYard::OpenAPI.new.to_h)
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
data/swagger_yard-rails.gemspec
CHANGED
@@ -28,7 +28,7 @@ Gem::Specification.new do |spec|
|
|
28
28
|
spec.require_paths = ["lib"]
|
29
29
|
|
30
30
|
spec.add_dependency "rails", ">= 3.2.8"
|
31
|
-
spec.add_dependency "swagger_yard", "
|
31
|
+
spec.add_dependency "swagger_yard", ">= 1.0.0"
|
32
32
|
|
33
33
|
spec.add_development_dependency "bundler", "~> 1.10"
|
34
34
|
spec.add_development_dependency "rake", "~> 10.0"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: swagger_yard-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tony Pitale
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-06-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -28,16 +28,16 @@ dependencies:
|
|
28
28
|
name: swagger_yard
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
33
|
+
version: 1.0.0
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
40
|
+
version: 1.0.0
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: bundler
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -185,7 +185,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
185
185
|
version: '0'
|
186
186
|
requirements: []
|
187
187
|
rubyforge_project:
|
188
|
-
rubygems_version: 2.4.
|
188
|
+
rubygems_version: 2.4.5.1
|
189
189
|
signing_key:
|
190
190
|
specification_version: 4
|
191
191
|
summary: Rails engine to parse and render json for Swagger UI
|