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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 903426087054c63c42e7678acb3d0108317372c1
4
- data.tar.gz: 5f3937fa4782f225f7bd0af3e7ec64439bb000ba
3
+ metadata.gz: 2a9ef497bb3ae8de9133de744a1ad9b5796f22fc
4
+ data.tar.gz: 9445982c9c3ccb0d2cd421e7c2042ad0114c583f
5
5
  SHA512:
6
- metadata.gz: d6c35495a76d36f52cb0556888a9c41b0fd77ea82108b30c56fef926885be73703eafc84225c8d3ce5a6ca92365e3452de995f5f25d89d17625fddec25fbec1f
7
- data.tar.gz: 2015b58bcd5f2f2167c323c3ac5db56d9edd57d08f430c8b7c1ec73e4285002869094c7eff0c428d19d3091229fc5071fea162af23346b4d195e2901d4f7ac71
6
+ metadata.gz: 13f98c534383673ebb5f8a4509b31aeaeaee9dc4c61686558abd32beb1455dd3121c1f0a9e8778ecdfde5bd9a2b0bfef93bd6560e5c15dd28ae492d58fe1c462
7
+ data.tar.gz: 7a7bfc116d6679992274deb08d335704b152ec223c5f084783e684b92132e773b66f89c2bfea1f8b6c76a08b09faa957a5078aae8755e5218c8fd91c51d3fc4d
data/.travis.yml ADDED
@@ -0,0 +1,5 @@
1
+ language: ruby
2
+ rvm:
3
+ - "2.1.3"
4
+ before_script: "bundle install && cd dummy && rake db:create && rake db:migrate"
5
+ script: "bundle exec rake test"
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 'activerecord'
6
- gem "minitest-rails", github: "blowmage/minitest-rails"
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
- Easy to use and read action and content based authorizations.
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
- Make sure you already have a User model setup. Works great with [devise](https://github.com/plataformatec/devise).
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
- Run generator to install it.
39
+ ######Finally you can run the generators
22
40
 
23
41
  rails g petergate:install
24
42
  rake db:migrate
data/Rakefile CHANGED
@@ -1,2 +1,9 @@
1
1
  require "bundler/gem_tasks"
2
+ require 'rake/testtask'
2
3
 
4
+ Rake::TestTask.new(:test) do |t|
5
+ t.pattern = 'dummy/test/**/*_test.rb'
6
+ t.verbose = false
7
+ end
8
+
9
+ task default: :test
@@ -1,3 +1,3 @@
1
1
  module Petergate
2
- VERSION = "0.2.4"
2
+ VERSION = "1.0.0"
3
3
  end
data/petergate.gemspec CHANGED
@@ -19,4 +19,5 @@ Gem::Specification.new do |spec|
19
19
 
20
20
  spec.add_development_dependency "bundler", "~> 1.7"
21
21
  spec.add_development_dependency "rake", "~> 10.0"
22
+ spec.add_dependency 'activerecord', "~> 4.1.7"
22
23
  end
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.2.4
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-15 00:00:00.000000000 Z
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