apicraft-rails 1.0.0 → 1.0.1

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: 7692b6e9a2cd444c2f5db48a932c78d64e4a23172575cafb76ed307c527c1ed3
4
- data.tar.gz: 120c7cf23160c70761a168a815704bbcafc2e1c87901d5b2c58c037c840c4151
3
+ metadata.gz: 985bb9a26327f539fba9cfde3fecaab346e445100d32549bab4e393d6656d8b6
4
+ data.tar.gz: 9df0525f057680a45d18dd5ce899f0151e09366d62ab3b190e895c473e79f4d8
5
5
  SHA512:
6
- metadata.gz: dfe9dc9efc333d44b43825b5f0b5a3377ffdb1e3016a725c131b923ac15be131b5e8bc5e1ad6dc06cfd58ccc7ae493cf18b0c54846507491828550c884657e0b
7
- data.tar.gz: a9bb65b6c85b07e5a17c52b99bcf59435cff0810191358b214fdd45bbea8cb5e181f5d7e1332431b74c9473f6a6a531e063e9391500eef78fad67b2b2d197231
6
+ metadata.gz: '078e7d785cdeb7f95b36984e57dbf8616e2f12832d0b272e589d28f2e1a20ab8dee73f8775ae270ac0293f8b8d974a726d58934adf5bd4308b616fcfbbb69e96'
7
+ data.tar.gz: 571165414ba898067e3b1d28c9daa0aacb20d8ddb350ac425ea6ac9198066bfe90844a25df3bd2fe47f077c0df1b0a1fa087b2e56f4db62602f5bc225eee8e84
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # APICraft Rails
2
2
  [![Build](https://github.com/apicraft-dev/apicraft-rails/actions/workflows/build.yml/badge.svg)](https://github.com/apicraft-dev/apicraft-rails/actions/workflows/build.yml)
3
- [![Gem Version](https://badge.fury.io/rb/apicraft-rails.svg?v=1.0.0)](https://badge.fury.io/rb/apicraft-rails)
3
+ [![Gem Version](https://d25lcipzij17d.cloudfront.net/badge.png?id=rb&r=r&ts=1683906897&type=3e&v=1.0.1&x2=0)](https://badge.fury.io/rb/apicraft-rails)
4
4
 
5
5
  🚀 Accelerates your development by 2-3x with an API Design First approach. Seamlessly integrates with your Rails application server — no fancy tooling or expenses required.
6
6
 
@@ -74,7 +74,7 @@ By adopting an API Design First approach with APICraft Rails, you can accelerate
74
74
  Add this line to your application's Gemfile:
75
75
 
76
76
  ```ruby
77
- gem 'apicraft-rails', '~> 1.0.0'
77
+ gem 'apicraft-rails', '~> 1.0.1'
78
78
  ```
79
79
 
80
80
  And then execute:
@@ -25,7 +25,7 @@ module Apicraft
25
25
 
26
26
  [
27
27
  200,
28
- { 'Content-Type': "application/json" },
28
+ { "Content-Type" => "application/json" },
29
29
  [schema.to_json]
30
30
  ]
31
31
  end
@@ -30,7 +30,7 @@ module Apicraft
30
30
  [
31
31
  code.to_i,
32
32
  {
33
- 'Content-Type': content_type
33
+ "Content-Type" => content_type
34
34
  },
35
35
  [
36
36
  content&.send(convertor(content_type))
@@ -31,7 +31,7 @@ module Apicraft
31
31
  rescue OpenAPIParser::OpenAPIError => e
32
32
  [
33
33
  config.request_validation_http_code,
34
- { 'Content-Type': content_type },
34
+ { "Content-Type" => content_type },
35
35
  [
36
36
  response_body(e)&.send(convertor(content_type))
37
37
  ].compact
@@ -2,5 +2,5 @@
2
2
 
3
3
  # Current version of Apicraft.
4
4
  module Apicraft
5
- VERSION = "1.0.0"
5
+ VERSION = "1.0.1"
6
6
  end
@@ -23,19 +23,19 @@ module Apicraft
23
23
 
24
24
  [
25
25
  200,
26
- { 'Content-Type': content_type },
26
+ { "Content-Type" => content_type },
27
27
  [content]
28
28
  ]
29
29
  rescue Errors::RouteNotFound
30
30
  [
31
31
  404,
32
- { 'Content-Type': "text/plain" },
32
+ { "Content-Type" => "text/plain" },
33
33
  ["Error: not found"]
34
34
  ]
35
35
  rescue StandardError => e
36
36
  [
37
37
  500,
38
- { 'Content-Type': "text/plain" },
38
+ { "Content-Type" => "text/plain" },
39
39
  ["Error: #{e.message}"]
40
40
  ]
41
41
  end
@@ -54,8 +54,8 @@ module Apicraft
54
54
  [
55
55
  401,
56
56
  {
57
- "Content-Type": "text/plain",
58
- "WWW-Authenticate": "Basic realm=\"Restricted Area\""
57
+ "Content-Type" => "text/plain",
58
+ "WWW-Authenticate" => "Basic realm=\"Restricted Area\""
59
59
  },
60
60
  ["Unauthorized"]
61
61
  ]
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: apicraft-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Abhishek Sarkar
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-10-02 00:00:00.000000000 Z
11
+ date: 2024-12-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport