camille 0.5.1 → 0.5.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: 54ba62877d8151101a93641018cc5516967bac05b2c437accc5861bd50f640da
4
- data.tar.gz: 7097f8975cce507a806ba77f022b79e797f6d607734d573fa3607de79ee03162
3
+ metadata.gz: a5d2a7ffaa4c7361b74237e051c928076a5d67b1e05629804c7fa1ab28af76e3
4
+ data.tar.gz: 8b341b964c8a3527f5ab0b11565bb1cbf12b525413f4eec0bba2e4292551528e
5
5
  SHA512:
6
- metadata.gz: c17a00216823baa351ec0cb78f7e959c8c3ab17fd0533ba7f7265660024c08ac17f9086083519220589c9bd56480642b45b146b3b0aa1e4ac069c321d3b9f670
7
- data.tar.gz: f95bce0848370d9934673cd9fb367d43d0851718e3d37871f8e8f0005efb1263cb9c0cd03c9040fbfc928d15b4e996273b75ed9cf5481ad2f6abf5cd546bda3a
6
+ metadata.gz: c2dbd934c66958f439dd803a0ca7bdc43c19089d4b5a303a644644be2e6ef021937be9b2b7c95a7e929d044b33f28fd12be9056578c5151bb9c6694f875b53c6
7
+ data.tar.gz: 5c63fe09fd9080e6995db273891dabb3ca90c417c488f58488ae32d1a5d84ad72e7804ad45fbcbfa77685195ca6e4d54f6d3bb693b10762bccfbc4686e487179
data/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.5.2
4
+
5
+ ### Added
6
+
7
+ * Symbols are now accepted in string types
8
+ * When omitted, the response type of an endpoint will now have the default `{}`
9
+
3
10
  ## 0.5.1
4
11
 
5
12
  ### Fixed
@@ -12,9 +12,7 @@ module Camille
12
12
  end
13
13
 
14
14
  def signature
15
- unless @response_type
16
- raise UnknownResponseError.new("Endpoint lacking a `response` definition.")
17
- end
15
+ @response_type ||= Camille::Types::Object.new({})
18
16
  if @params_type
19
17
  "#{ActiveSupport::Inflector.camelize @name, false}(params: #{@params_type.literal}): Promise<#{@response_type.literal}>"
20
18
  else
@@ -2,7 +2,7 @@ module Camille
2
2
  module Types
3
3
  class String < Camille::BasicType
4
4
  def check value
5
- unless value.is_a? ::String
5
+ unless value.is_a?(::String) || value.is_a?(Symbol)
6
6
  Camille::TypeError.new("Expected string, got #{value.inspect}.")
7
7
  end
8
8
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Camille
4
- VERSION = "0.5.1"
4
+ VERSION = "0.5.2"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: camille
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - 辻彩
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-04-25 00:00:00.000000000 Z
11
+ date: 2023-05-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails