dry-swagger 0.6.2 → 0.7.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
  SHA256:
3
- metadata.gz: 9b26879187416eeb9a9bafee3cb7f7cfc11cf507b7c9684fc8415f12ed246bfd
4
- data.tar.gz: dea3839fce17641081fc569c29f32d758eccb5bfe2b3e9139e35b9495104be47
3
+ metadata.gz: fa87b1d33788b1997620a6a870fc9eed7945b9b828529717c6b86cd3463c5c19
4
+ data.tar.gz: d73d504f0776d71126c6c0e8e6a5f2aba8058d70b55c3c40d94fb5c5e4a1c484
5
5
  SHA512:
6
- metadata.gz: c1526dbb96d90dfa3631d92289e861d66af20bd7709a4e79d214275699e611f22739e660ea1ec4a3a7c93eb19bf92141d8dd2e5fce4f177567db50a07a6b3d37
7
- data.tar.gz: 0a51759965cd85fd48a5177ddb68b8999a3b2b63eb6d8108e4b6d39ae07696b9b46cc095ff01f470fb413b956196c94a9d7655eb7cc1d64419dfcb6268d9ea84
6
+ metadata.gz: d80cb668bd7831d30db0efeded5a281bd52be2a9e4a1dd83fb6ebf8637cae40b559f17b358a21cd6cec7b9926f370005d1d676481c59ca1417e3e5f0d6fe9ba9
7
+ data.tar.gz: 9d996c1da25bab6051e94bb6d5246f70c830ddfdd4f60bda706f5288ba3bd14907f78c8de25423dc468ed73f84b2b6c2cb0822f4adf67fa446d49df8fc1fbe40
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.2)
4
+ dry-swagger (0.7.1)
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,10 +8,10 @@ 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
14
15
  ::I18n.load_path << Dir[File.expand_path("config/locales") + "/*.yml"]
15
- require 'my_gem/railtie' if 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 :my_gem
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.2"
3
+ VERSION = "0.7.1"
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.2
4
+ version: 0.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jane-Terziev