schemable 0.1.0 → 0.1.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: fa2cca4c4cbbd264e1f14d9780c73286bb3bb119fee777a93f2fb9f14e2c5ec5
4
- data.tar.gz: d34b73098370c2d0f6935201d83c8fa0a2053a2c93178934f0dda4fdc8c84b0f
3
+ metadata.gz: ff54bf6e14c37d3fdc76b31bd73073334d753539e3dea0e0deecf63268863633
4
+ data.tar.gz: debcf929b72f6ac7afdcc4906aeb80407a0b5aa9dfdde86f401dfb17099af0b7
5
5
  SHA512:
6
- metadata.gz: 9936f2dc682238f18b3c28f57095413803dfce601e8a79836f25b0453c79c0cd6c44095b4f637b7b12860bb81944c4bf4cfad729f9a2b98d5c3888613c345f39
7
- data.tar.gz: 2885d12f6a87a9aa566286497e9ceab0faed713b623d99f640a0f75499cc17f00bf5f24f6ec21163d454e1521040c4bfb7738c59e2800b8038f9ad69cddb58a9
6
+ metadata.gz: d159f7c5489bf55387f20d8552d6f6c393396a9692798de7f74e34b73a1a9ae645fdffd82fc66f8264a1ab385da0136d4ab663e5952e6e3bc0f89a2b255addcb
7
+ data.tar.gz: c509ac7d2711b2ff22b15fed2430fe4f434ddd3b842fca01c6a42f263e0b9027f950a302b410b348ac369c4bf35549f3e178c2596d687562269fdc86df2dd7cd
@@ -12,15 +12,13 @@ module Schemable
12
12
  end
13
13
 
14
14
  def copy_initializer
15
- target_path = "lib/swagger/definitions/#{@model_name.underscore.downcase.singlurize}.rb"
15
+ target_path = "lib/swagger/definitions/#{@model_name.underscore.downcase.singularize}.rb"
16
16
 
17
17
  if Rails.root.join(target_path).exist?
18
18
  say_status('skipped', 'Model definition already exists')
19
19
  else
20
20
 
21
21
  create_file(target_path, <<-FILE
22
- require './lib/swagger/concerns/schemable'
23
-
24
22
  module Swagger
25
23
  module Definitions
26
24
  class #{@model_name.classify}
@@ -31,7 +29,7 @@ module Swagger
31
29
  attr_accessor :instance
32
30
 
33
31
  def initialize
34
- @instance ||= JSONAPI::Serializable::Renderer.new.render(FactoryBot.create(:#{@model_name.underscore.downcase.singlurize}), class: serializers_map, include: [])
32
+ @instance ||= JSONAPI::Serializable::Renderer.new.render(FactoryBot.create(:#{@model_name.underscore.downcase.singularize}), class: serializers_map, include: [])
35
33
  end
36
34
 
37
35
  def serializer
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Schemable
4
- VERSION = "0.1.0"
4
+ VERSION = "0.1.2"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: schemable
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Muhammad Nawzad