pliny 1.0.0 → 1.1.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: 7540ec6b13927224d570bbd316b6210eb0dc1fb9da3ab936e173bd40366f9a19
4
- data.tar.gz: 648deaae8ef0a417055fb9ca2916d8961ce49b4c5736c297642bd3650e15acfa
3
+ metadata.gz: 0737c4e1c61ecef9881625ff6bb0d2afeacc63977f239b7e2562d4aec3c3609a
4
+ data.tar.gz: f8db4293037c673ff3e33e025c75e86664f19cd207f3e36a2934e47eb981e942
5
5
  SHA512:
6
- metadata.gz: 69869d88363b3f05fe2505a5ae9f9fd6cb60d0ec71ecf5a4037badd49d98637450e6fbc82f594286ff44df773686d0518e565e55f389c6aec7850b7e984d1a1c
7
- data.tar.gz: 04d54a2823bcb82ad88aa6188c56167c7dde9abfa64e8b317a96d04047bfa30426fa936bc66cafe342eb38edea084df132c202a3a207fea161ee5ea02308b2ae
6
+ metadata.gz: bad71b767121811048ca67857644d74d6b7e565461e96cc6f52fa3b8207a41cb6f5fa8b4d32d14fc49894709a7959c55ddd7a6c8972f1555f6d5b6108c160978
7
+ data.tar.gz: d0e2adac5319670b3c12344f6b4d40a989e74770f4ffdbffdbf7082941ed7f2590802babf478966a63c475638f4736961855a449cf9629779baf696f98f2eb28
data/lib/pliny/errors.rb CHANGED
@@ -4,7 +4,7 @@ module Pliny
4
4
  attr_accessor :id
5
5
 
6
6
  def self.render(error)
7
- headers = { "Content-Type" => "application/json; charset=utf-8" }
7
+ headers = { "content-type" => "application/json; charset=utf-8" }
8
8
  data = { id: error.id, message: error.message }
9
9
  [error.status, headers, [MultiJson.encode(data)]]
10
10
  end
@@ -44,12 +44,12 @@ module Pliny::Middleware
44
44
 
45
45
  def cors_headers(env)
46
46
  {
47
- 'Access-Control-Allow-Origin' => env["HTTP_ORIGIN"],
48
- 'Access-Control-Allow-Methods' => ALLOW_METHODS.join(', '),
49
- 'Access-Control-Allow-Headers' => allow_headers.join(', '),
50
- 'Access-Control-Allow-Credentials' => "true",
51
- 'Access-Control-Max-Age' => "1728000",
52
- 'Access-Control-Expose-Headers' => EXPOSE_HEADERS.join(', ')
47
+ 'access-control-allow-origin' => env["HTTP_ORIGIN"],
48
+ 'access-control-allow-methods' => ALLOW_METHODS.join(', '),
49
+ 'access-control-allow-headers' => allow_headers.join(', '),
50
+ 'access-control-allow-credentials' => "true",
51
+ 'access-control-max-age' => "1728000",
52
+ 'access-control-expose-headers' => EXPOSE_HEADERS.join(', ')
53
53
  }
54
54
  end
55
55
  end
@@ -26,7 +26,7 @@ module Pliny::Middleware
26
26
  error = { id: :bad_version, message: <<-eos }
27
27
  Please specify a version along with the MIME type. For example, `Accept: application/vnd.#{@app_name}+json; version=1`.
28
28
  eos
29
- return [400, { "Content-Type" => "application/json; charset=utf-8" },
29
+ return [400, { "content-type" => "application/json; charset=utf-8" },
30
30
  [MultiJson.encode(error)]]
31
31
  end
32
32
 
data/lib/pliny/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Pliny
2
- VERSION = "1.0.0"
2
+ VERSION = "1.1.0"
3
3
  end
data/lib/template/Gemfile CHANGED
@@ -4,7 +4,7 @@ ruby "2.4.0"
4
4
  gem "multi_json"
5
5
  gem "oj"
6
6
  gem "pg"
7
- gem "pliny", "~> 1.0"
7
+ gem "pliny", "~> 0.32"
8
8
  gem "pry"
9
9
  gem "puma", "~> 6"
10
10
  gem "rack-ssl"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pliny
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
  - Brandur Leach
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2023-10-09 00:00:00.000000000 Z
12
+ date: 2024-02-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport
@@ -80,7 +80,7 @@ dependencies:
80
80
  version: '2.0'
81
81
  - - "<"
82
82
  - !ruby/object:Gem::Version
83
- version: '4.0'
83
+ version: '5.0'
84
84
  type: :runtime
85
85
  prerelease: false
86
86
  version_requirements: !ruby/object:Gem::Requirement
@@ -90,7 +90,7 @@ dependencies:
90
90
  version: '2.0'
91
91
  - - "<"
92
92
  - !ruby/object:Gem::Version
93
- version: '4.0'
93
+ version: '5.0'
94
94
  - !ruby/object:Gem::Dependency
95
95
  name: http_accept
96
96
  requirement: !ruby/object:Gem::Requirement
@@ -171,14 +171,14 @@ dependencies:
171
171
  requirements:
172
172
  - - "~>"
173
173
  - !ruby/object:Gem::Version
174
- version: 1.1.0
174
+ version: '2'
175
175
  type: :development
176
176
  prerelease: false
177
177
  version_requirements: !ruby/object:Gem::Requirement
178
178
  requirements:
179
179
  - - "~>"
180
180
  - !ruby/object:Gem::Version
181
- version: 1.1.0
181
+ version: '2'
182
182
  - !ruby/object:Gem::Dependency
183
183
  name: rspec
184
184
  requirement: !ruby/object:Gem::Requirement
@@ -208,7 +208,7 @@ dependencies:
208
208
  version: '2.0'
209
209
  - - "<"
210
210
  - !ruby/object:Gem::Version
211
- version: '4.0'
211
+ version: '5.0'
212
212
  type: :development
213
213
  prerelease: false
214
214
  version_requirements: !ruby/object:Gem::Requirement
@@ -218,7 +218,7 @@ dependencies:
218
218
  version: '2.0'
219
219
  - - "<"
220
220
  - !ruby/object:Gem::Version
221
- version: '4.0'
221
+ version: '5.0'
222
222
  - !ruby/object:Gem::Dependency
223
223
  name: timecop
224
224
  requirement: !ruby/object:Gem::Requirement
@@ -512,7 +512,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
512
512
  - !ruby/object:Gem::Version
513
513
  version: '0'
514
514
  requirements: []
515
- rubygems_version: 3.4.19
515
+ rubygems_version: 3.5.3
516
516
  signing_key:
517
517
  specification_version: 4
518
518
  summary: Basic tooling to support API apps in Sinatra