problem_details-rails 0.1.0 → 0.2.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
  SHA1:
3
- metadata.gz: 28c3dbae235a1977ebf1b0020708b00eeda28fe6
4
- data.tar.gz: 54405d35d097d1da2cc1bea4f5f4259dff67df0b
3
+ metadata.gz: 5052a61775afa2e6ee167a1fa5b1288024e30b94
4
+ data.tar.gz: 9b2d47eeb01911c339d1b77fbfeb7bfd604fbc5c
5
5
  SHA512:
6
- metadata.gz: 4b975fa68bf2a498d167e74a2a1d0cf529699f3d6e68140d29519dd1dc38430771111b300ae47517298435c745a2e0f15a068883f99528e4f6bdd095fc58439e
7
- data.tar.gz: 441cb4d5c915e25043e741f6f47686fa5d07ade7fe79dfcbcdad66bb4304d18b5f83cea12fb3b6b303e3c4ba6be3a9b8091647bff892db7d81599cf8ec128aa8
6
+ metadata.gz: a63b0a97839a12abcb953210e298efbae491f45a72d4d7d990d3b3bd9902abd495f9207b0fa4720a7ae802ff10d2be4f1f615cdf112b8bd2868b4a78e45d2b71
7
+ data.tar.gz: 67f04f52f12e9caf2a039231728385b91c079835b302ec19ffed58abe1ebb176e1009a83a5d1d3fcfa4905025baa65027dbede24f9dd91f5b8eb3ae62ba008d3
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2018 Nobuhiro Nikushi
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,5 @@
1
+ # ProblemDetails::Rails [![Build Status](https://travis-ci.org/nikushi/problem_details.svg?branch=master)](https://travis-ci.org/nikushi/problem_details) [![Gem Version](https://badge.fury.io/rb/problem_details.svg)](https://badge.fury.io/rb/problem_details)
2
+
3
+ This gem helps Rails systems to render "problem detail" json form described in [RFC7807 Problem Details for HTTP APIs](https://tools.ietf.org/html/rfc7807).
4
+
5
+ See the detail at [nikushi/problem_details](https://github.com/nikushi/problem_details).
data/Rakefile ADDED
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "bundler/gem_tasks"
4
+ require "rspec/core/rake_task"
5
+
6
+ RSpec::Core::RakeTask.new(:spec)
7
+
8
+ task default: :spec
@@ -5,5 +5,6 @@ module ProblemDetails
5
5
  require 'problem_details'
6
6
  require_relative 'rails/config'
7
7
  require_relative 'rails/railtie' if defined?(::Rails)
8
+ require_relative 'rails/version'
8
9
  end
9
10
  end
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ module ProblemDetails
4
+ module Rails
5
+ VERSION = '0.2.0'
6
+ end
7
+ end
@@ -1,12 +1,13 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ version = File.read(File.expand_path('../VERSION', __dir__)).strip
4
+
3
5
  lib = File.expand_path('lib', __dir__)
4
6
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
- require 'problem_details/version'
6
7
 
7
8
  Gem::Specification.new do |spec|
8
9
  spec.name = 'problem_details-rails'
9
- spec.version = ProblemDetails::VERSION
10
+ spec.version = version
10
11
  spec.authors = ['Nobuhiro Nikushi']
11
12
  spec.email = ['deneb.ge@gmail.com']
12
13
 
@@ -15,12 +16,15 @@ Gem::Specification.new do |spec|
15
16
  spec.homepage = 'https://github.com/nikushi/problem_details'
16
17
  spec.license = 'MIT'
17
18
 
18
- spec.files = `git ls-files|grep rails`.split($OUTPUT_RECORD_SEPARATOR).reject do |f|
19
- f.match(%r{^(test|spec|features)/})
20
- end
19
+ spec.files = Dir['lib/**/*.rb'] + %w[
20
+ LICENSE.txt
21
+ README.md
22
+ Rakefile
23
+ problem_details-rails.gemspec
24
+ ]
21
25
  spec.require_paths = ['lib']
22
26
 
23
- spec.add_runtime_dependency 'problem_details', ProblemDetails::VERSION
27
+ spec.add_runtime_dependency 'problem_details', version
24
28
  spec.add_dependency 'actionpack', '>= 4.0'
25
29
  spec.add_dependency 'activesupport', '>= 4.0'
26
30
  spec.add_development_dependency 'bundler', '~> 1.16'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: problem_details-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nobuhiro Nikushi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-03-26 00:00:00.000000000 Z
11
+ date: 2018-03-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: problem_details
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 0.1.0
19
+ version: 0.2.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 0.1.0
26
+ version: 0.2.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: actionpack
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -101,11 +101,15 @@ executables: []
101
101
  extensions: []
102
102
  extra_rdoc_files: []
103
103
  files:
104
+ - LICENSE.txt
105
+ - README.md
106
+ - Rakefile
104
107
  - lib/problem_details-rails.rb
105
108
  - lib/problem_details/rails.rb
106
109
  - lib/problem_details/rails/config.rb
107
110
  - lib/problem_details/rails/railtie.rb
108
111
  - lib/problem_details/rails/render_option_builder.rb
112
+ - lib/problem_details/rails/version.rb
109
113
  - problem_details-rails.gemspec
110
114
  homepage: https://github.com/nikushi/problem_details
111
115
  licenses: