rswag3-specs 0.0.0 → 0.0.1

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: af82d2aa55de6fed3509c7dbba1a8ab7a02dae69
4
- data.tar.gz: 27c9e640df0e6ed47c3b7c84028a5e39dae6967f
3
+ metadata.gz: 8f8a1a674a65813bc603e6490a83b83d31b85aa3
4
+ data.tar.gz: 08f3a982c20c10846673be8620f625ee744f122d
5
5
  SHA512:
6
- metadata.gz: b71e0a5918578b3e3fe61f1b8c3a318b8100958d273624082bbc80e0af40b2eb542354df82a9645241ed2bafc7ad061ac0563a21771374f8194cb1206c1ba31f
7
- data.tar.gz: f9e97ca393d2679d6d1c83c8d65bb515665e2eff8c0e29e17300d1676934319204da359bd797224bbffbd8a53c0376d6729fd8b1dd36ba097ec94aaa36ec8ab5
6
+ metadata.gz: 66d86efda7ca3eff28ba55e09dcd771aec646a15b4848d08297ecb60d5f76e0ff66338b8716bd34134c44a4a19d093ca12e8b140f8672d0f83d84eede33fd93f
7
+ data.tar.gz: e8f6166375c4c19a3589434decaa7b0e639e0a2d67181d26b6304d80e2c6008ce5b362b0f63b87ee1eb08561828acc87e2e8789934422c0ec86c1ddfcad2f5b0
data/MIT-LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright 2015 domaindrivendev
1
+ Copyright 2019 Je33
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
data/Rakefile CHANGED
@@ -14,7 +14,7 @@ end
14
14
 
15
15
  RDoc::Task.new(:rdoc) do |rdoc|
16
16
  rdoc.rdoc_dir = 'rdoc'
17
- rdoc.title = 'rswag-specs'
17
+ rdoc.title = 'rswag3-specs'
18
18
  rdoc.options << '--line-numbers'
19
19
  rdoc.rdoc_files.include('README.rdoc')
20
20
  rdoc.rdoc_files.include('lib/**/*.rb')
@@ -2,7 +2,7 @@ Description:
2
2
  Adds swagger_helper to enable Swagger DSL in integration specs
3
3
 
4
4
  Example:
5
- rails generate rswag:specs:install
5
+ rails generate rswag3:specs:install
6
6
 
7
7
  This will create:
8
8
  spec/swagger_helper.rb
@@ -1,6 +1,6 @@
1
1
  require 'rails/generators'
2
2
 
3
- module Rswag
3
+ module Rswag3
4
4
  module Specs
5
5
 
6
6
  class InstallGenerator < Rails::Generators::Base
@@ -14,7 +14,7 @@ RSpec.configure do |config|
14
14
  # the root example_group in your specs, e.g. describe '...', swagger_doc: 'v2/swagger.json'
15
15
  config.swagger_docs = {
16
16
  'v1/swagger.json' => {
17
- swagger: '2.0',
17
+ openapi: '3.0.0',
18
18
  info: {
19
19
  title: 'API V1',
20
20
  version: 'v1'
@@ -1,4 +1,4 @@
1
- module Rswag
1
+ module Rswag3
2
2
  module Specs
3
3
 
4
4
  class Configuration
@@ -1,4 +1,4 @@
1
- module Rswag
1
+ module Rswag3
2
2
  module Specs
3
3
  module ExampleGroupHelpers
4
4
 
@@ -1,7 +1,7 @@
1
- require 'rswag/specs/request_factory'
2
- require 'rswag/specs/response_validator'
1
+ require 'rswag3/specs/request_factory'
2
+ require 'rswag3/specs/response_validator'
3
3
 
4
- module Rswag
4
+ module Rswag3
5
5
  module Specs
6
6
  module ExampleHelpers
7
7
 
@@ -1,6 +1,6 @@
1
1
  require 'json-schema'
2
2
 
3
- module Rswag
3
+ module Rswag3
4
4
  module Specs
5
5
  class ExtendedSchema < JSON::Schema::Draft4
6
6
 
@@ -1,9 +1,9 @@
1
- module Rswag
1
+ module Rswag3
2
2
  module Specs
3
3
  class Railtie < ::Rails::Railtie
4
4
 
5
5
  rake_tasks do
6
- load File.expand_path('../../../tasks/rswag-specs_tasks.rake', __FILE__)
6
+ load File.expand_path('../../../tasks/rswag3-specs_tasks.rake', __FILE__)
7
7
  end
8
8
  end
9
9
  end
@@ -2,11 +2,11 @@ require 'active_support/core_ext/hash/slice'
2
2
  require 'active_support/core_ext/hash/conversions'
3
3
  require 'json'
4
4
 
5
- module Rswag
5
+ module Rswag3
6
6
  module Specs
7
7
  class RequestFactory
8
8
 
9
- def initialize(config = ::Rswag::Specs.config)
9
+ def initialize(config = ::Rswag3::Specs.config)
10
10
  @config = config
11
11
  end
12
12
 
@@ -1,13 +1,13 @@
1
1
  require 'active_support/core_ext/hash/slice'
2
2
  require 'json-schema'
3
3
  require 'json'
4
- require 'rswag/specs/extended_schema'
4
+ require 'rswag3/specs/extended_schema'
5
5
 
6
- module Rswag
6
+ module Rswag3
7
7
  module Specs
8
8
  class ResponseValidator
9
9
 
10
- def initialize(config = ::Rswag::Specs.config)
10
+ def initialize(config = ::Rswag3::Specs.config)
11
11
  @config = config
12
12
  end
13
13
 
@@ -1,7 +1,7 @@
1
1
  require 'active_support/core_ext/hash/deep_merge'
2
2
  require 'swagger_helper'
3
3
 
4
- module Rswag
4
+ module Rswag3
5
5
  module Specs
6
6
  class SwaggerFormatter
7
7
 
@@ -10,7 +10,7 @@ module Rswag
10
10
  ::RSpec::Core::Formatters.register self, :example_group_finished, :stop
11
11
  end
12
12
 
13
- def initialize(output, config = Rswag::Specs.config)
13
+ def initialize(output, config = Rswag3::Specs.config)
14
14
  @output = output
15
15
  @config = config
16
16
 
@@ -1,10 +1,10 @@
1
1
  require 'rspec/core'
2
- require 'rswag/specs/example_group_helpers'
3
- require 'rswag/specs/example_helpers'
4
- require 'rswag/specs/configuration'
5
- require 'rswag/specs/railtie' if defined?(Rails::Railtie)
2
+ require 'rswag3/specs/example_group_helpers'
3
+ require 'rswag3/specs/example_helpers'
4
+ require 'rswag3/specs/configuration'
5
+ require 'rswag3/specs/railtie' if defined?(Rails::Railtie)
6
6
 
7
- module Rswag
7
+ module Rswag3
8
8
  module Specs
9
9
 
10
10
  # Extend RSpec with a swagger-based DSL
@@ -1,6 +1,6 @@
1
1
  require 'rspec/core/rake_task'
2
2
 
3
- namespace :rswag do
3
+ namespace :rswag3 do
4
4
  namespace :specs do
5
5
 
6
6
  desc 'Generate Swagger JSON files from integration specs'
@@ -8,10 +8,10 @@ namespace :rswag do
8
8
  t.pattern = 'spec/requests/**/*_spec.rb, spec/api/**/*_spec.rb, spec/integration/**/*_spec.rb'
9
9
 
10
10
  # NOTE: rspec 2.x support
11
- if Rswag::Specs::RSPEC_VERSION > 2 && Rswag::Specs.config.swagger_dry_run
12
- t.rspec_opts = [ '--format Rswag::Specs::SwaggerFormatter', '--dry-run', '--order defined' ]
11
+ if Rswag3::Specs::RSPEC_VERSION > 2 && Rswag3::Specs.config.swagger_dry_run
12
+ t.rspec_opts = [ '--format Rswag3::Specs::SwaggerFormatter', '--dry-run', '--order defined' ]
13
13
  else
14
- t.rspec_opts = [ '--format Rswag::Specs::SwaggerFormatter', '--order defined' ]
14
+ t.rspec_opts = [ '--format Rswag3::Specs::SwaggerFormatter', '--order defined' ]
15
15
  end
16
16
  end
17
17
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rswag3-specs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.0
4
+ version: 0.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Evgeniy Koltsov
@@ -74,19 +74,19 @@ extra_rdoc_files: []
74
74
  files:
75
75
  - MIT-LICENSE
76
76
  - Rakefile
77
- - lib/generators/rswag/specs/install/USAGE
78
- - lib/generators/rswag/specs/install/install_generator.rb
79
- - lib/generators/rswag/specs/install/templates/swagger_helper.rb
80
- - lib/rswag/specs.rb
81
- - lib/rswag/specs/configuration.rb
82
- - lib/rswag/specs/example_group_helpers.rb
83
- - lib/rswag/specs/example_helpers.rb
84
- - lib/rswag/specs/extended_schema.rb
85
- - lib/rswag/specs/railtie.rb
86
- - lib/rswag/specs/request_factory.rb
87
- - lib/rswag/specs/response_validator.rb
88
- - lib/rswag/specs/swagger_formatter.rb
89
- - lib/tasks/rswag-specs_tasks.rake
77
+ - lib/generators/rswag3/specs/install/USAGE
78
+ - lib/generators/rswag3/specs/install/install_generator.rb
79
+ - lib/generators/rswag3/specs/install/templates/swagger_helper.rb
80
+ - lib/rswag3/specs.rb
81
+ - lib/rswag3/specs/configuration.rb
82
+ - lib/rswag3/specs/example_group_helpers.rb
83
+ - lib/rswag3/specs/example_helpers.rb
84
+ - lib/rswag3/specs/extended_schema.rb
85
+ - lib/rswag3/specs/railtie.rb
86
+ - lib/rswag3/specs/request_factory.rb
87
+ - lib/rswag3/specs/response_validator.rb
88
+ - lib/rswag3/specs/swagger_formatter.rb
89
+ - lib/tasks/rswag3-specs_tasks.rake
90
90
  homepage: https://github.com/Je33/rswag
91
91
  licenses:
92
92
  - MIT