sinatra-validation 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: 19d3baa6aa52b1f1456f8f3f9062d800e2bef90d
4
- data.tar.gz: a73f583804f69227267c156a84807dee73aecc63
3
+ metadata.gz: 9f97a8559e2ec07afa81d651f62678c47842d09b
4
+ data.tar.gz: b2fe39fbf25d859a68ae006f43f94ccb803ea356
5
5
  SHA512:
6
- metadata.gz: 3b392f0906b84e75661aeede4083f1562d7d36046100c056d9d74b0de6ff50a95c048263341e2ac3088657abe42fd16cf921b24e78d35ed7da9f5965e0e54b59
7
- data.tar.gz: d2ea2847d51c5c5ac9d70398616514b3292b4eaee9c6f2b97904f5172390a9f8deed1d0962f8155621fdedcd9a598440b7b73c61067a8791061b99b032b567ca
6
+ metadata.gz: 5dc1fe1ce6fb7d6d8e00c3da2559b6294326f9b8b7c8287492ef4937218be8705a8a86288332257edc9de74cd8935e439137cfbb2c8eaa68061a5e6addd9cf83
7
+ data.tar.gz: 45eebe75d08e1d74266fca0ce7568ab64038a7658bf0f1ebf998b2c80cbeac6a169609eff1029f6ce0a0e56059fe3bc8a175c02e4254931d3a27a6a003cc3719
@@ -0,0 +1,10 @@
1
+ version: 2
2
+
3
+ jobs:
4
+ build:
5
+ docker:
6
+ - image: circleci/ruby:2.4.4-jessie
7
+ steps:
8
+ - checkout
9
+ - run: bundle install
10
+ - run: bundle exec rake spec
@@ -0,0 +1 @@
1
+ 2.4.4
data/Gemfile CHANGED
@@ -1,4 +1,5 @@
1
1
  source 'https://rubygems.org'
2
+ ruby '2.4.4'
2
3
 
3
4
  # Specify your gem's dependencies in sinatra-validation.gemspec
4
5
  gemspec
data/README.md CHANGED
@@ -1,4 +1,5 @@
1
1
  # Sinatra::Validation
2
+ [![Gem Version](https://badge.fury.io/rb/sinatra-validation.svg)](https://badge.fury.io/rb/sinatra-validation)
2
3
  [![CircleCI](https://circleci.com/gh/IzumiSy/sinatra-validation.svg?style=shield)](https://circleci.com/gh/IzumiSy/sinatra-validation)
3
4
 
4
5
  > Sinatra extension for request parameter validation powered with dry-validation
@@ -3,59 +3,48 @@ PATH
3
3
  specs:
4
4
  sinatra-validation (0.1.0)
5
5
  dry-validation
6
- sinatra
7
- sinatra-contrib
6
+ sinatra (~> 2.0.2)
8
7
 
9
8
  GEM
10
9
  remote: https://rubygems.org/
11
10
  specs:
12
- backports (3.10.3)
13
11
  concurrent-ruby (1.0.5)
14
12
  dry-configurable (0.7.0)
15
13
  concurrent-ruby (~> 1.0)
16
14
  dry-container (0.6.0)
17
15
  concurrent-ruby (~> 1.0)
18
16
  dry-configurable (~> 0.1, >= 0.1.3)
19
- dry-core (0.4.1)
17
+ dry-core (0.4.7)
20
18
  concurrent-ruby (~> 1.0)
21
- dry-equalizer (0.2.0)
19
+ dry-equalizer (0.2.1)
20
+ dry-inflector (0.1.2)
22
21
  dry-logic (0.4.2)
23
22
  dry-container (~> 0.2, >= 0.2.6)
24
23
  dry-core (~> 0.2)
25
24
  dry-equalizer (~> 0.2)
26
- dry-types (0.12.2)
25
+ dry-types (0.13.2)
27
26
  concurrent-ruby (~> 1.0)
28
- dry-configurable (~> 0.1)
29
27
  dry-container (~> 0.3)
30
- dry-core (~> 0.2, >= 0.2.1)
28
+ dry-core (~> 0.4, >= 0.4.4)
31
29
  dry-equalizer (~> 0.2)
30
+ dry-inflector (~> 0.1, >= 0.1.2)
32
31
  dry-logic (~> 0.4, >= 0.4.2)
33
- inflecto (~> 0.0.0, >= 0.0.2)
34
- dry-validation (0.11.1)
32
+ dry-validation (0.12.1)
35
33
  concurrent-ruby (~> 1.0)
36
34
  dry-configurable (~> 0.1, >= 0.1.3)
37
35
  dry-core (~> 0.2, >= 0.2.1)
38
36
  dry-equalizer (~> 0.2)
39
37
  dry-logic (~> 0.4, >= 0.4.0)
40
- dry-types (~> 0.12.0)
41
- inflecto (0.0.2)
42
- multi_json (1.12.2)
43
- mustermann (1.0.1)
44
- rack (2.0.3)
45
- rack-protection (2.0.0)
38
+ dry-types (~> 0.13.1)
39
+ mustermann (1.0.2)
40
+ rack (2.0.5)
41
+ rack-protection (2.0.3)
46
42
  rack
47
- sinatra (2.0.0)
43
+ sinatra (2.0.3)
48
44
  mustermann (~> 1.0)
49
45
  rack (~> 2.0)
50
- rack-protection (= 2.0.0)
46
+ rack-protection (= 2.0.3)
51
47
  tilt (~> 2.0)
52
- sinatra-contrib (2.0.0)
53
- backports (>= 2.0)
54
- multi_json
55
- mustermann (~> 1.0)
56
- rack-protection (= 2.0.0)
57
- sinatra (= 2.0.0)
58
- tilt (>= 1.3, < 3)
59
48
  tilt (2.0.8)
60
49
 
61
50
  PLATFORMS
@@ -66,4 +55,4 @@ DEPENDENCIES
66
55
  sinatra-validation!
67
56
 
68
57
  BUNDLED WITH
69
- 1.14.6
58
+ 1.16.3
@@ -28,10 +28,14 @@ class Application < Sinatra::Base
28
28
  end
29
29
 
30
30
  get '/raise' do
31
- validates raise: true do
32
- required('name').filled(:str?)
31
+ begin
32
+ validates raise: true do
33
+ required('name').filled(:str?)
34
+ end
35
+
36
+ 'ok'
37
+ rescue Sinatra::Validation::InvalidParameterError
38
+ halt 500, 'invalid'
33
39
  end
34
-
35
- 'ok'
36
40
  end
37
41
  end
@@ -1,5 +1,5 @@
1
1
  module Sinatra
2
2
  module Validation
3
- VERSION = "0.1.0"
3
+ VERSION = "0.2.0"
4
4
  end
5
5
  end
@@ -21,8 +21,7 @@ Gem::Specification.new do |spec|
21
21
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
22
22
  spec.require_paths = ["lib"]
23
23
 
24
- spec.add_dependency 'sinatra'
25
- spec.add_dependency 'sinatra-contrib'
24
+ spec.add_dependency 'sinatra', '~> 2.0.2'
26
25
  spec.add_dependency 'dry-validation'
27
26
 
28
27
  spec.add_development_dependency "bundler", "~> 1.14"
metadata CHANGED
@@ -1,43 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sinatra-validation
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
  - IzumiSy
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-12-03 00:00:00.000000000 Z
11
+ date: 2018-08-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sinatra
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
18
- - !ruby/object:Gem::Version
19
- version: '0'
20
- type: :runtime
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - ">="
25
- - !ruby/object:Gem::Version
26
- version: '0'
27
- - !ruby/object:Gem::Dependency
28
- name: sinatra-contrib
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - ">="
17
+ - - "~>"
32
18
  - !ruby/object:Gem::Version
33
- version: '0'
19
+ version: 2.0.2
34
20
  type: :runtime
35
21
  prerelease: false
36
22
  version_requirements: !ruby/object:Gem::Requirement
37
23
  requirements:
38
- - - ">="
24
+ - - "~>"
39
25
  - !ruby/object:Gem::Version
40
- version: '0'
26
+ version: 2.0.2
41
27
  - !ruby/object:Gem::Dependency
42
28
  name: dry-validation
43
29
  requirement: !ruby/object:Gem::Requirement
@@ -115,9 +101,10 @@ executables: []
115
101
  extensions: []
116
102
  extra_rdoc_files: []
117
103
  files:
104
+ - ".circleci/config.yml"
118
105
  - ".gitignore"
119
106
  - ".rspec"
120
- - ".travis.yml"
107
+ - ".ruby-version"
121
108
  - CODE_OF_CONDUCT.md
122
109
  - Gemfile
123
110
  - LICENSE.txt
@@ -152,7 +139,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
152
139
  version: '0'
153
140
  requirements: []
154
141
  rubyforge_project:
155
- rubygems_version: 2.6.10
142
+ rubygems_version: 2.6.14.1
156
143
  signing_key:
157
144
  specification_version: 4
158
145
  summary: '"Sinatra extension for request parameter validation"'
@@ -1,5 +0,0 @@
1
- sudo: false
2
- language: ruby
3
- rvm:
4
- - 2.4.0
5
- before_install: gem install bundler -v 1.14.6