camille 1.0.0 → 1.1.0

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: a1ea493a56729858449f5d04a2242a0920a1aff7e345fde52d7fed3061b9cb3e
4
- data.tar.gz: 624ef2a41e1c413e8e288de97f6b464f02ce51d9f2cda9eeed9b7ba4a818aaad
3
+ metadata.gz: 9cce4fa44ca836262ebc8da14ad045ee0b5ea2ce832fd6852e863280c04b6658
4
+ data.tar.gz: cfc0c1797ce19035efd81de11b1176154f50575b3d4a90834ef6de517ef1ea4b
5
5
  SHA512:
6
- metadata.gz: 3bf2d9199a22c3a1a6f0c81538d93e87f4aacf073c52866fed0d07156f44af98d059c6559071554e275dc754bfd5413284acebf841e59f11659acfa9527827bc
7
- data.tar.gz: 8b249d54deee18c77faebe8da95eda1ff6bae624daf67f9db1e54225951fca9259c5ef58f0c22393806ec5225c007f6962cdb377eff572a2bc20c97bb5c48859
6
+ metadata.gz: f502c8340be0ecb804982d811a35072188e7cb1fdc6602cc2c986cea94228caaae2d650d4379c3ba413299186bd8753befc51f6e6943d720384a841b876425f5
7
+ data.tar.gz: cf6fc100a3e11ade528d88d5fbe89451c37866a218b7ddb2c0b0fc18645b7ceb40dd393b813af80ac22908d545017fa6bfe74927010a67ce1fb4c35b7ff8928d
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.1.0
4
+
5
+ ### Added
6
+
7
+ * Added support for HTTP verbs `put`, `patch` and `delete`.
8
+
3
9
  ## 1.0.0
4
10
 
5
11
  ### Changed
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- camille (0.6.4)
4
+ camille (1.0.0)
5
5
  rails (>= 6.1, < 8.1)
6
6
 
7
7
  GEM
@@ -108,6 +108,7 @@ GEM
108
108
  net-smtp
109
109
  marcel (1.0.4)
110
110
  mini_mime (1.1.5)
111
+ mini_portile2 (2.8.9)
111
112
  minitest (5.25.4)
112
113
  net-imap (0.5.6)
113
114
  date
@@ -119,6 +120,9 @@ GEM
119
120
  net-smtp (0.5.1)
120
121
  net-protocol
121
122
  nio4r (2.7.4)
123
+ nokogiri (1.17.2)
124
+ mini_portile2 (~> 2.8.2)
125
+ racc (~> 1.4)
122
126
  nokogiri (1.17.2-x86_64-linux)
123
127
  racc (~> 1.4)
124
128
  psych (5.2.1)
@@ -210,4 +214,4 @@ DEPENDENCIES
210
214
  rspec-rails
211
215
 
212
216
  BUNDLED WITH
213
- 2.2.33
217
+ 2.7.2
data/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # Camille
2
2
 
3
+ ![Gem Version](https://img.shields.io/gem/v/camille)
4
+
3
5
  ## Why?
4
6
 
5
7
  Traditionally, the JSON response from a Rails API server isn't typed. So even if we have TypeScript at the front-end, we still have little guarantee that our back-end would return the correct type and structure of data.
@@ -90,7 +92,7 @@ The `params` type for an endpoint is required to be an object type, or a hash in
90
92
 
91
93
  Camille will automatically add a Rails route for each endpoint. You don't need to do anything other than having the schema file in place.
92
94
 
93
- When defining an endpoint, you can also use `post` instead of `get` for non-idempotent requests. However, no other HTTP verbs are supported, because verbs in RESTful like `patch` and `delete` indicate what we do on resources, but in RPC-style design each request is merely a function call that does not concern RESTful resources.
95
+ When defining an endpoint, you can use any of `get`, `post`, `put`, `patch`, or `delete`.
94
96
 
95
97
  ### Custom types
96
98
 
@@ -46,5 +46,17 @@ module Camille
46
46
  def self.post name, &block
47
47
  define_endpoint :post, name, &block
48
48
  end
49
+
50
+ def self.put name, &block
51
+ define_endpoint :put, name, &block
52
+ end
53
+
54
+ def self.patch name, &block
55
+ define_endpoint :patch, name, &block
56
+ end
57
+
58
+ def self.delete name, &block
59
+ define_endpoint :delete, name, &block
60
+ end
49
61
  end
50
- end
62
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Camille
4
- VERSION = "1.0.0"
4
+ VERSION = "1.1.0"
5
5
  end
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: camille
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - merely
8
- autorequire:
9
8
  bindir: exe
10
9
  cert_chain: []
11
- date: 2025-04-19 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: rails
@@ -107,7 +106,6 @@ licenses:
107
106
  metadata:
108
107
  homepage_uri: https://github.com/onyxblade/camille
109
108
  source_code_uri: https://github.com/onyxblade/camille
110
- post_install_message:
111
109
  rdoc_options: []
112
110
  require_paths:
113
111
  - lib
@@ -122,8 +120,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
122
120
  - !ruby/object:Gem::Version
123
121
  version: '0'
124
122
  requirements: []
125
- rubygems_version: 3.5.16
126
- signing_key:
123
+ rubygems_version: 3.6.9
127
124
  specification_version: 4
128
125
  summary: Typed API schema for Rails with TypeScript codegen
129
126
  test_files: []