dry-swagger 0.6.3 → 0.7.2

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
  SHA256:
3
- metadata.gz: 671f584af63701f2aee322347676d95b70be797f981db65abf2cf9ef0a134862
4
- data.tar.gz: 0d6cbb7a421e4f64fa84b4f0b32338ebd494b8bed6ebc34622a09c40c6f857cb
3
+ metadata.gz: adbe04dff5b7ae5c94a9ba23ed3121d347c7c2f1c5281c072e6f87db6b61cabb
4
+ data.tar.gz: d63a26c6c630a180df171227d3e33689d13bdcdfacb21472dd0a7858dd3e262c
5
5
  SHA512:
6
- metadata.gz: c6b77d681c0ad29787daf4079fe5d6a93d837210a7efdcfe4ad5cc743d23bf7abea67f78e9813f61ba8fae75939bbcac8eab9fca9f34f1c42cb6ab9335f5e64a
7
- data.tar.gz: 503cc7e5d913a858e37bce3b3cc5f04ac4dc73b574188c8d11fcb7facefbcd500d40bf6579360df87b344cf4bad9c9526ab1f9e0865083109ecf89ce9fc8dca6
6
+ metadata.gz: d32e5435aa3d0b6f43953af069ed8451af40771ed634246290cc065c7aa1d21251e17553f165627f8f4d3784373433a7df600396e3fc818bc8eed653cb75542b
7
+ data.tar.gz: d9739bfbdd72a98fab3022cde18c4a81b875702247feb85590a56ac6e39b3bd2f1c0b12cc7111a96bc51f7e1d0b15257a6552cc2a11f0302e97438444c9b9042
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.3)
4
+ dry-swagger (0.7.2)
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
@@ -12,6 +12,6 @@ require 'dry/swagger/railtie' if defined?(Rails)
12
12
 
13
13
  module Dry
14
14
  module Swagger
15
- ::I18n.load_path << Dir[File.expand_path("config/locales") + "/*.yml"]
15
+ ::I18n.load_path << Dir[File.expand_path("config/locales") + "/*.yml"] unless defined?(Rails)
16
16
  end
17
17
  end
@@ -4,11 +4,10 @@ require 'rails'
4
4
  module Dry
5
5
  module Swagger
6
6
  class Railtie < Rails::Railtie
7
- railtie_name :dry-swagger
7
+ railtie_name :"dry-swagger"
8
8
 
9
9
  rake_tasks do
10
- path = File.expand_path(__dir__)
11
- Dir.glob("#{path}/tasks/**/*.rake").each { |f| load f }
10
+ load "dry/swagger/tasks/configuration_generator.rake"
12
11
  end
13
12
  end
14
13
  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.3"
3
+ VERSION = "0.7.2"
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.3
4
+ version: 0.7.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jane-Terziev