sand 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.ruby-version +1 -0
- data/.travis.yml +1 -0
- data/README.md +14 -1
- data/lib/sand/middleware.rb +1 -1
- data/lib/sand/version.rb +1 -1
- data/sand.gemspec +1 -1
- metadata +6 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 523619603e1b71cf742f43ad0bd260198a774803
|
4
|
+
data.tar.gz: bfc7a879a937a37a8af61afa37a7e3d3b2b44c5d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9aa7265fa2e6945ae7db1d5d5be3a02391958f3f59fa09a1440ca310ef8a0c9f78d03f57a5a9adb15ca97a51a3abf40b4238d30f73c714daeacef16123b138f9
|
7
|
+
data.tar.gz: c56f52dfc583c474305af46d183c6dd0d6d4cdc660f5959438e8da9dcaea7578d84eb6895acb60b4aeb4a88b0b7dde4891ea66b95c0d5dac783632fff885757e
|
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
2.3.0
|
data/.travis.yml
CHANGED
data/README.md
CHANGED
@@ -1,8 +1,21 @@
|
|
1
|
-
sand [![Build Status](https://travis-ci.org/NickTomlin/ruby-sand.svg?branch=master)](https://travis-ci.org/NickTomlin/ruby-sand)
|
1
|
+
sand [![Build Status](https://travis-ci.org/NickTomlin/ruby-sand.svg?branch=master)](https://travis-ci.org/NickTomlin/ruby-sand) [![Gem Version](https://badge.fury.io/rb/sand.svg)](https://badge.fury.io/rb/sand)
|
2
2
|
===
|
3
3
|
|
4
4
|
A ruby gem for authorization in rack/sinatra applications. Code mostly stolen from [Pundit](https://github.com/elabs/pundit).
|
5
5
|
|
6
|
+
Installation
|
7
|
+
---
|
8
|
+
|
9
|
+
`gem install sand`
|
10
|
+
|
11
|
+
Or in your Gemfile
|
12
|
+
|
13
|
+
```
|
14
|
+
source "https://rubygems.org"
|
15
|
+
|
16
|
+
gem "sand"
|
17
|
+
```
|
18
|
+
|
6
19
|
Usage
|
7
20
|
---
|
8
21
|
|
data/lib/sand/middleware.rb
CHANGED
@@ -22,7 +22,7 @@ module Sand
|
|
22
22
|
end
|
23
23
|
|
24
24
|
def passed?
|
25
|
-
return true if options[:pass].any? { |r| r =~ env['
|
25
|
+
return true if options[:pass].any? { |r| r =~ env['PATH_INFO'] }
|
26
26
|
return true if env['sand.pass'] == true || env['sand.scoped'] || env['sand.authorized'] == true # rubocop:disable Metrics/LineLength
|
27
27
|
false
|
28
28
|
end
|
data/lib/sand/version.rb
CHANGED
data/sand.gemspec
CHANGED
@@ -8,7 +8,7 @@ Gem::Specification.new do |gem|
|
|
8
8
|
gem.name = 'sand'
|
9
9
|
gem.version = Sand::VERSION
|
10
10
|
gem.summary = 'Authorization for rack-based applications'
|
11
|
-
gem.description = 'A ruby gem for authorization for use in sinatra/rack applications.
|
11
|
+
gem.description = 'A ruby gem for authorization for use in sinatra/rack applications. Code mostly stolen from Pundit' # rubocop:disable Metrics/LineLength
|
12
12
|
gem.license = 'MIT'
|
13
13
|
gem.authors = ['Nick Tomlin']
|
14
14
|
gem.email = 'nick.tomlin@gmail.com'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sand
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nick Tomlin
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-07-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -164,8 +164,8 @@ dependencies:
|
|
164
164
|
- - ">="
|
165
165
|
- !ruby/object:Gem::Version
|
166
166
|
version: '0'
|
167
|
-
description: A ruby gem for authorization for use in sinatra/rack applications.
|
168
|
-
|
167
|
+
description: A ruby gem for authorization for use in sinatra/rack applications. Code
|
168
|
+
mostly stolen from Pundit
|
169
169
|
email: nick.tomlin@gmail.com
|
170
170
|
executables: []
|
171
171
|
extensions: []
|
@@ -176,6 +176,7 @@ files:
|
|
176
176
|
- ".rdoc_options"
|
177
177
|
- ".rspec"
|
178
178
|
- ".rubocop.yml"
|
179
|
+
- ".ruby-version"
|
179
180
|
- ".travis.yml"
|
180
181
|
- ChangeLog.md
|
181
182
|
- Gemfile
|
@@ -218,7 +219,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
218
219
|
version: '0'
|
219
220
|
requirements: []
|
220
221
|
rubyforge_project:
|
221
|
-
rubygems_version: 2.
|
222
|
+
rubygems_version: 2.5.1
|
222
223
|
signing_key:
|
223
224
|
specification_version: 4
|
224
225
|
summary: Authorization for rack-based applications
|