swagger-serializer 0.3.0 → 0.4.0

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: f4d846f481e8975a65912ee007fe889f92e86a791151ea43b1e195ab517c97d7
4
- data.tar.gz: c7201cf60934814f35da516dd933885b54b30802b20cdb9230db28c30b28bf6b
3
+ metadata.gz: 9117f21413014f63963039d2bc4b9bd5af69822848e7171ab138db2f577e426f
4
+ data.tar.gz: 9f8b7698fb58f7519642ca076962928ec7fbc6503307432e0f42a97900a20738
5
5
  SHA512:
6
- metadata.gz: 4a94e1e3cf012f87d47e8b183057ab5a6047026ae03e98ccbad9d134a4cdca37ccbdb647354622880f0b1eff6bea87b16c411093e665c6a31c28a9cd2e25cc88
7
- data.tar.gz: 9d02c59d26c0892e2f74dc481c1de55b78137b433504993a78ebbfb9368c28416df1295b62c68fd013b703f6d37a56116deabdc23daad46358a30163c22cff08
6
+ metadata.gz: 8cf2998a61d2755e0ac01ece1cf2d03e63e52013eb82add89a2fdc85d0249754ca8054dfb2edaf54bbb90bb9c5ef07280cabb1d0c946f749551a2e628cc7a330
7
+ data.tar.gz: e46a73c62aa9e9d4217943df68d943b3370dd14da3b6c0db13b4897c7931177bc5379b1d4fed0ee9a653e1a10e51af46cf2cc17b35f579a97ef35bed9d1fcc64
data/README.md CHANGED
@@ -131,7 +131,7 @@ Now you can get `{ "id" => 42, "name" => "me!!!!" }`.
131
131
 
132
132
  This serializer class detection uses the schema's `title` key.
133
133
  If you want to use `Foo::BarSerializer`, set `Foo::Bar` to `title` key.
134
- The key is configurable by `Swagger::Serializer::Store.current[:inject_key] = "my_inject_key"`.
134
+ The key is configurable by `Swagger::Serializer::Store.current.options[:inject_key] = "my_inject_key"`.
135
135
 
136
136
  Sometimes model needs direct serialize.
137
137
 
@@ -7,20 +7,14 @@ module Swagger
7
7
  end
8
8
  end
9
9
 
10
+ attr_reader :options
11
+
10
12
  def initialize(options = nil)
11
13
  @options = options || {}
12
14
  @options[:inject_key] ||= "title"
13
15
  @options[:injectors] ||= Injectors.new(cache: @options[:cache])
14
16
  end
15
17
 
16
- def [](name)
17
- @options[name]
18
- end
19
-
20
- def []=(name, value)
21
- @options[name] = value
22
- end
23
-
24
18
  def serializer_options
25
19
  @options
26
20
  end
@@ -1,5 +1,5 @@
1
1
  module Swagger
2
2
  module Serializer
3
- VERSION = "0.3.0".freeze
3
+ VERSION = "0.4.0".freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: swagger-serializer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Narazaka
@@ -234,7 +234,7 @@ metadata:
234
234
  homepage_uri: https://github.com/Narazaka/swagger-serializer
235
235
  source_code_uri: https://github.com/Narazaka/swagger-serializer.git
236
236
  changelog_uri: https://github.com/Narazaka/swagger-serializer/blob/master/CHANGELOG.md
237
- documentation_uri: https://www.rubydoc.info/gems/swagger-serializer/0.3.0
237
+ documentation_uri: https://www.rubydoc.info/gems/swagger-serializer/0.4.0
238
238
  post_install_message:
239
239
  rdoc_options: []
240
240
  require_paths: