banken 0.1.1 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5fa23a2a65fb5297370655ef973516a3615be3d4
4
- data.tar.gz: 5965509ce31efeb8243a1796191b4da0c416e429
3
+ metadata.gz: 5878f8be6231fae633ffe474550ff8fe55e85546
4
+ data.tar.gz: 3e2b88e1420e403fbd15dd5e9f08485bd6cc52d3
5
5
  SHA512:
6
- metadata.gz: 763ee80874810e27d2d9edfa8dca6298e8f6694fa097ac558ac9857c23848b57d638b000410126e1bb427e183afb17ce4c37690a07d4c4701f4c3b9a50295d71
7
- data.tar.gz: d8ea1e7142b0b3badd6bf538dc6a1498b921a858683e53d6b735bd5cd73bd6a02b848727d5f6fae4867fe7d69d894fa89f6458f8d2d634fa6a6c94e5083522cb
6
+ metadata.gz: b9ad62b42e69aeda744c738e160a3efa53f0618dcff622c831b50b1fc491c9427a43b00b78176f15a79f25bc49b77bf1d7ca8dc5b512fa5735584e57bda18226
7
+ data.tar.gz: 18fd6181aa574dee61c5afadb72ee51bc0a68de03abd1c2df30abf0176ec8514fb5c428e012c76fc964533874d187662dfb091ffd1c3cbf5faeae94f91612248
data/README.md CHANGED
@@ -1,13 +1,23 @@
1
- # Banken
1
+ <img width="350"src="https://raw.github.com/wiki/kyuden/banken/images/banken.png">
2
2
 
3
3
  [![Build Status](https://img.shields.io/travis/kyuden/banken/master.svg)](https://travis-ci.org/kyuden/banken)
4
4
  [![Code Climate](https://codeclimate.com/github/kyuden/banken/badges/gpa.svg)](https://codeclimate.com/github/kyuden/banken)
5
5
  [![Gem Version](https://badge.fury.io/rb/banken.svg)](https://badge.fury.io/rb/banken)
6
6
 
7
- Banken provides a set of helpers which guide you in leveraging regular Ruby
8
- classes and object oriented design patterns to build a simple, robust and
9
- scaleable authorization system.
7
+ Simple and lightweight authorization library for Rails inspired by Pundit.
8
+ Banken provides a set of helpers which restricts what resources
9
+ a given user is allowed to access.
10
10
 
11
+ In first, Look this tutorial:
12
+ - [Tutorial](https://github.com/kyuden/banken/wiki/Tutorial)
13
+ - [Tutorial (Japanese)](https://github.com/kyuden/banken/wiki/Tutorial-(japanese))
14
+
15
+ ========
16
+ ## What's the difference between Banken and Pundit?
17
+ - [The difference between Banken and Pundit](https://github.com/kyuden/banken/wiki/The-difference-between-Banken-and-Pundit)
18
+ - [The difference between Banken and Pundit (Japanese)](https://github.com/kyuden/banken/wiki/The-difference-between-Banken-and-Pundit-(Japanese))
19
+
20
+
11
21
  ## Installation
12
22
 
13
23
  ``` ruby
@@ -34,7 +44,7 @@ rails g banken:install
34
44
  After generating your application loyalty, restart the Rails server so that Rails
35
45
  can pick up any classes in the new `app/loyalties/` directory.
36
46
 
37
- ## Policies
47
+ ## Loyalties
38
48
 
39
49
  Banken is focused around the notion of loyalty classes. We suggest that you put
40
50
  these classes in `app/loyalties`. This is a simple example that allows updating
@@ -173,7 +183,7 @@ class PostsController < ApplicationController
173
183
  def show
174
184
  record = Record.find_by(attribute: "value")
175
185
  if record.present?
176
- authorize record
186
+ authorize! record
177
187
  else
178
188
  skip_authorization
179
189
  end
@@ -9,8 +9,8 @@ Gem::Specification.new do |spec|
9
9
  spec.authors = ["kyuden"]
10
10
  spec.email = ["msmsms.um@gmail.com"]
11
11
 
12
- spec.summary = %q{OO authorization for Rails.}
13
- spec.description = %q{Object oriented authorization like pundit for Rails applications.}
12
+ spec.summary = %q{Simple and lightweight authorization solution for Rails.}
13
+ spec.description = %q{Banken provides a set of helpers which restricts what resources a given user is allowed to access.}
14
14
  spec.homepage = "https://github.com/kyuden/banken"
15
15
  spec.license = "MIT"
16
16
 
@@ -23,7 +23,7 @@ Gem::Specification.new do |spec|
23
23
  spec.add_development_dependency "activemodel", ">= 3.0.0"
24
24
  spec.add_development_dependency "actionpack", ">= 3.0.0"
25
25
  spec.add_development_dependency "bundler", "~> 1.3"
26
- spec.add_development_dependency "rspec", ">=2.0.0"
26
+ spec.add_development_dependency "rspec", "~> 3.0"
27
27
  spec.add_development_dependency "pry"
28
28
  spec.add_development_dependency "rake"
29
29
  spec.add_development_dependency "yard"
@@ -1,3 +1,3 @@
1
1
  module Banken
2
- VERSION = "0.1.1"
2
+ VERSION = "1.0.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: banken
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - kyuden
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-11-01 00:00:00.000000000 Z
11
+ date: 2015-12-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -70,16 +70,16 @@ dependencies:
70
70
  name: rspec
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - ">="
73
+ - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: 2.0.0
75
+ version: '3.0'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - ">="
80
+ - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: 2.0.0
82
+ version: '3.0'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: pry
85
85
  requirement: !ruby/object:Gem::Requirement
@@ -122,7 +122,8 @@ dependencies:
122
122
  - - ">="
123
123
  - !ruby/object:Gem::Version
124
124
  version: '0'
125
- description: Object oriented authorization like pundit for Rails applications.
125
+ description: Banken provides a set of helpers which restricts what resources a given
126
+ user is allowed to access.
126
127
  email:
127
128
  - msmsms.um@gmail.com
128
129
  executables: []
@@ -171,6 +172,6 @@ rubyforge_project:
171
172
  rubygems_version: 2.4.8
172
173
  signing_key:
173
174
  specification_version: 4
174
- summary: OO authorization for Rails.
175
+ summary: Simple and lightweight authorization solution for Rails.
175
176
  test_files: []
176
177
  has_rdoc: