petergate 0.2.4 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +5 -0
- data/Gemfile +39 -2
- data/README.md +24 -6
- data/Rakefile +7 -0
- data/lib/petergate/version.rb +1 -1
- data/petergate.gemspec +1 -0
- metadata +17 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2a9ef497bb3ae8de9133de744a1ad9b5796f22fc
|
4
|
+
data.tar.gz: 9445982c9c3ccb0d2cd421e7c2042ad0114c583f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 13f98c534383673ebb5f8a4509b31aeaeaee9dc4c61686558abd32beb1455dd3121c1f0a9e8778ecdfde5bd9a2b0bfef93bd6560e5c15dd28ae492d58fe1c462
|
7
|
+
data.tar.gz: 7a7bfc116d6679992274deb08d335704b152ec223c5f084783e684b92132e773b66f89c2bfea1f8b6c76a08b09faa957a5078aae8755e5218c8fd91c51d3fc4d
|
data/.travis.yml
ADDED
data/Gemfile
CHANGED
@@ -2,6 +2,43 @@ source 'https://rubygems.org'
|
|
2
2
|
|
3
3
|
# Specify your gem's dependencies in petergate.gemspec
|
4
4
|
gemspec
|
5
|
-
# gem '
|
6
|
-
gem
|
5
|
+
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
|
6
|
+
gem 'rails', '4.1.9'
|
7
|
+
# Use sqlite3 as the database for Active Record
|
8
|
+
gem 'sqlite3'
|
9
|
+
# Use SCSS for stylesheets
|
10
|
+
gem 'sass-rails', '~> 4.0.3'
|
11
|
+
# Use Uglifier as compressor for JavaScript assets
|
12
|
+
gem 'uglifier', '>= 1.3.0'
|
13
|
+
# Use CoffeeScript for .js.coffee assets and views
|
14
|
+
gem 'coffee-rails', '~> 4.0.0'
|
15
|
+
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
|
16
|
+
# gem 'therubyracer', platforms: :ruby
|
17
|
+
|
18
|
+
# Use jquery as the JavaScript library
|
19
|
+
gem 'jquery-rails'
|
20
|
+
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
|
21
|
+
gem 'turbolinks'
|
22
|
+
gem "minitest-rails"
|
7
23
|
gem "minitest-reporters"
|
24
|
+
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
|
25
|
+
gem 'jbuilder', '~> 2.0'
|
26
|
+
# bundle exec rake doc:rails generates the API under doc/api.
|
27
|
+
gem 'sdoc', '~> 0.4.0', group: :doc
|
28
|
+
|
29
|
+
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
|
30
|
+
gem 'spring', group: :development
|
31
|
+
gem 'devise'
|
32
|
+
|
33
|
+
# Use ActiveModel has_secure_password
|
34
|
+
# gem 'bcrypt', '~> 3.1.7'
|
35
|
+
|
36
|
+
# Use unicorn as the app server
|
37
|
+
# gem 'unicorn'
|
38
|
+
|
39
|
+
# Use Capistrano for deployment
|
40
|
+
# gem 'capistrano-rails', group: :development
|
41
|
+
|
42
|
+
# Use debugger
|
43
|
+
# gem 'debugger', group: [:development, :test]
|
44
|
+
|
data/README.md
CHANGED
@@ -1,24 +1,42 @@
|
|
1
1
|
# Petergate
|
2
2
|
|
3
|
-
|
3
|
+
[![Build Status](https://travis-ci.org/isaacsloan/petergate.svg)](https://travis-ci.org/isaacsloan/petergate)
|
4
|
+
[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/isaacsloan/petergate?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
5
|
+
[![Gem Version](https://badge.fury.io/rb/petergate.svg)](http://badge.fury.io/rb/petergate)
|
6
|
+
|
7
|
+
|
8
|
+
> "If you like the straight forward and effective nature of [Strong Parameters](https://github.com/rails/strong_parameters) and suspect that [cancan](https://github.com/ryanb/cancan) might be overkill for your project then you'll love [Petergate's](https://github.com/isaacsloan/petergate) easy to use and read action and content based authorizations."
|
9
|
+
>
|
10
|
+
> -- <cite>I proclaim optimistically</cite>
|
4
11
|
|
5
12
|
Installation
|
6
13
|
------
|
7
14
|
|
8
|
-
Add this line to your application's Gemfile:
|
15
|
+
######Add this line to your application's Gemfile:
|
9
16
|
|
10
17
|
gem 'petergate'
|
11
18
|
|
12
|
-
And then execute:
|
19
|
+
######And then execute:
|
13
20
|
|
14
21
|
bundle
|
15
22
|
|
16
|
-
Or install it yourself as:
|
23
|
+
######Or install it yourself as:
|
17
24
|
|
18
25
|
gem install petergate
|
19
|
-
|
26
|
+
######Setup Authentication
|
27
|
+
|
28
|
+
Make sure your user model is defined in
|
29
|
+
app/models/user.rb
|
30
|
+
and called User.
|
31
|
+
|
32
|
+
If you're using [devise](https://github.com/plataformatec/devise) you're in luck, otherwise you'll have to add following methods to your project:
|
33
|
+
|
34
|
+
user_signed_in?
|
35
|
+
current_user
|
36
|
+
after_sign_in_path_for(current_user)
|
37
|
+
authenticate_user!
|
20
38
|
|
21
|
-
|
39
|
+
######Finally you can run the generators
|
22
40
|
|
23
41
|
rails g petergate:install
|
24
42
|
rake db:migrate
|
data/Rakefile
CHANGED
data/lib/petergate/version.rb
CHANGED
data/petergate.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: petergate
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Isaac Sloan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-01-
|
11
|
+
date: 2015-01-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -38,6 +38,20 @@ dependencies:
|
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '10.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: activerecord
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 4.1.7
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 4.1.7
|
41
55
|
description: Authorization system.
|
42
56
|
email:
|
43
57
|
- isaac@isaacsloan.com
|
@@ -46,6 +60,7 @@ extensions: []
|
|
46
60
|
extra_rdoc_files: []
|
47
61
|
files:
|
48
62
|
- ".gitignore"
|
63
|
+
- ".travis.yml"
|
49
64
|
- Gemfile
|
50
65
|
- LICENSE.txt
|
51
66
|
- README.md
|