dry-swagger 0.6.1 → 0.7.0

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
  SHA256:
3
- metadata.gz: ed8f56ae8c51d9c43a963361c5d50a59c50be461223c4d0488644a3c6721f116
4
- data.tar.gz: 3190f18d3e6b34a30855900cd4c708c830bae42ce2799fef5fc9d173e44318dd
3
+ metadata.gz: b6fef3fca461d0c5cfd951ae54bf8dff0051728aa97a4ab5918372f7821c4b38
4
+ data.tar.gz: 0e04e6c2f9701b801d1d53aa99d97b605cff32e4c491bdacc81fcf2a9f4ecfd7
5
5
  SHA512:
6
- metadata.gz: ca5ef42e0a128ec1bf9c4665b898004567eb6508ab87eda793608361b4fd1e0969f8ac867e33f08074c9202c6c14e444f0f4dd95f84986e53c75d86781822227
7
- data.tar.gz: ee6338737bafbbd83bacd46bc84df58897c4963456d882784097dd928338ea118600263856921986c10142b7cf396c0812d8d1df346bfab773e4e5b1c8154cee
6
+ metadata.gz: eecb6dd9fff1e8c5fee20ea8a7d81f4090ea6617eb887eeb16b84757a9d41d9bfaee3c6584a149c34f30bf76e954337cac508a4fc698e1aaf1cfd8435edc1c6e
7
+ data.tar.gz: 826aa9737d2ae9ba26419662589d6f368d50f70198cadc34c0f8f037d3837298c541b07f3c9f4690d8c1d2fa9005d526b2d9d01b8f1120b8bff32666e3c0b24a
data/.gitignore CHANGED
@@ -10,4 +10,5 @@
10
10
  # rspec failure tracking
11
11
  .rspec_status
12
12
  .idea/
13
- config/
13
+ config/
14
+ rakelib/
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- dry-swagger (0.6.1)
4
+ dry-swagger (0.7.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -312,7 +312,7 @@ You can also modify the fields by passing a block after the .call() method.
312
312
 
313
313
  end.to_swagger()
314
314
 
315
- ##Custom Configuration For Your Project
315
+ ## Custom Configuration For Your Project
316
316
  You can override default configurations by changing the values in the `config/initializers/dry-swagger.rb` file generated from the rake command in the Installation section.
317
317
 
318
318
  To modify the descriptions for the Contracts, modify the values in `config/locale/dry-swagger.yml`.
data/lib/dry/swagger.rb CHANGED
@@ -8,6 +8,7 @@ require 'dry/swagger/config/configuration'
8
8
  require 'dry/swagger/config/contract_configuration'
9
9
  require 'dry/swagger/config/struct_configuration'
10
10
  require 'i18n'
11
+ require 'dry/swagger/railtie' if defined?(Rails)
11
12
 
12
13
  module Dry
13
14
  module Swagger
@@ -0,0 +1,15 @@
1
+ require 'dry/swagger'
2
+ require 'rails'
3
+
4
+ module Dry
5
+ module Swagger
6
+ class Railtie < Rails::Railtie
7
+ railtie_name :"dry-swagger"
8
+
9
+ rake_tasks do
10
+ path = File.expand_path(__dir__)
11
+ Dir.glob("#{path}/tasks/**/*.rake").each { |f| load f }
12
+ end
13
+ end
14
+ end
15
+ end
@@ -4,6 +4,7 @@ namespace 'dry-swagger' do
4
4
  desc 'Create a configuration file for Struct and Contract'
5
5
  task :create_configuration_file do
6
6
  FileUtils.mkdir_p "#{ Dir.pwd }/config/initializers/"
7
+ puts "Created #{ Dir.pwd }/config/initializers/dry-swagger.rb"
7
8
  File.open("#{ Dir.pwd }/config/initializers/dry-swagger.rb", "w") { |file|
8
9
  file.puts 'Dry::Swagger::Config::StructConfiguration.configuration do |config|
9
10
  config.enable_required_validation = true
@@ -26,6 +27,7 @@ end'
26
27
  desc 'Create a YAML file for Contract swagger field descriptions'
27
28
  task :create_contract_descriptions_yaml do
28
29
  FileUtils.mkdir_p "#{ Dir.pwd }/config/locales/"
30
+ puts "Created #{ Dir.pwd }/config/locales/dry-swagger.yml"
29
31
  File.open("#{ Dir.pwd }/config/locales/dry-swagger.yml", "w") { |file|
30
32
  file.puts 'en:
31
33
  contract:
@@ -1,5 +1,5 @@
1
1
  module Dry
2
2
  module Swagger
3
- VERSION = "0.6.1"
3
+ VERSION = "0.7.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dry-swagger
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.1
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jane-Terziev
@@ -39,10 +39,11 @@ files:
39
39
  - lib/dry/swagger/documentation_generator.rb
40
40
  - lib/dry/swagger/errors/missing_hash_schema_error.rb
41
41
  - lib/dry/swagger/errors/missing_type_error.rb
42
+ - lib/dry/swagger/railtie.rb
42
43
  - lib/dry/swagger/struct_parser.rb
44
+ - lib/dry/swagger/tasks/configuration_generator.rake
43
45
  - lib/dry/swagger/types.rb
44
46
  - lib/dry/swagger/version.rb
45
- - lib/tasks/configuration_generator.rake
46
47
  homepage: https://github.com/Jane-Terziev/dry-swagger
47
48
  licenses:
48
49
  - MIT