abilities 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (62) hide show
  1. checksums.yaml +4 -4
  2. data/MIT-LICENSE +2 -2
  3. data/README.md +5 -3
  4. data/Rakefile +1 -1
  5. data/lib/abilities.rb +1 -1
  6. data/lib/abilities/action_controller/base.rb +1 -1
  7. data/lib/abilities/action_view/base.rb +1 -1
  8. data/lib/abilities/concern.rb +1 -1
  9. data/lib/abilities/definitions.rb +1 -1
  10. data/lib/abilities/exceptions.rb +1 -1
  11. data/lib/abilities/proxy.rb +1 -1
  12. data/lib/abilities/railtie.rb +1 -1
  13. data/lib/abilities/version.rb +2 -2
  14. data/lib/generators/abilities/install_generator.rb +1 -1
  15. data/lib/generators/abilities/templates/abilities.rb +1 -1
  16. data/test/changes_test.rb +1 -1
  17. data/test/checking_test.rb +1 -1
  18. data/test/controller_test.rb +1 -1
  19. data/test/dummy/README.rdoc +1 -1
  20. data/test/dummy/Rakefile +1 -1
  21. data/test/dummy/app/assets/javascripts/application.js +1 -1
  22. data/test/dummy/app/assets/stylesheets/application.css +1 -1
  23. data/test/dummy/app/controllers/application_controller.rb +1 -1
  24. data/test/dummy/app/helpers/application_helper.rb +1 -1
  25. data/test/dummy/app/models/post.rb +1 -1
  26. data/test/dummy/app/models/user.rb +1 -1
  27. data/test/dummy/app/views/layouts/application.html.erb +1 -1
  28. data/test/dummy/bin/bundle +1 -1
  29. data/test/dummy/bin/rails +1 -1
  30. data/test/dummy/bin/rake +1 -1
  31. data/test/dummy/config.ru +1 -1
  32. data/test/dummy/config/abilities.rb +1 -1
  33. data/test/dummy/config/application.rb +1 -2
  34. data/test/dummy/config/boot.rb +1 -1
  35. data/test/dummy/config/database.yml +1 -1
  36. data/test/dummy/config/environment.rb +1 -1
  37. data/test/dummy/config/environments/development.rb +1 -1
  38. data/test/dummy/config/environments/production.rb +1 -1
  39. data/test/dummy/config/environments/test.rb +1 -1
  40. data/test/dummy/config/initializers/backtrace_silencers.rb +1 -1
  41. data/test/dummy/config/initializers/cookies_serializer.rb +1 -1
  42. data/test/dummy/config/initializers/filter_parameter_logging.rb +1 -1
  43. data/test/dummy/config/initializers/inflections.rb +1 -1
  44. data/test/dummy/config/initializers/mime_types.rb +1 -1
  45. data/test/dummy/config/initializers/secret_token.rb +1 -1
  46. data/test/dummy/config/initializers/session_store.rb +1 -1
  47. data/test/dummy/config/initializers/wrap_parameters.rb +1 -1
  48. data/test/dummy/config/locales/en.yml +1 -1
  49. data/test/dummy/config/routes.rb +1 -1
  50. data/test/dummy/config/secrets.yml +1 -1
  51. data/test/dummy/db/migrate/20140629203344_create_users.rb +1 -1
  52. data/test/dummy/db/migrate/20140629203412_create_posts.rb +1 -1
  53. data/test/dummy/db/schema.rb +1 -1
  54. data/test/dummy/public/404.html +1 -1
  55. data/test/dummy/public/422.html +1 -1
  56. data/test/dummy/public/500.html +1 -1
  57. data/test/generator_test.rb +1 -1
  58. data/test/test_helper.rb +1 -1
  59. data/test/view_test.rb +1 -1
  60. metadata +5 -9
  61. data/test/dummy/log/development.log +0 -80
  62. data/test/dummy/log/test.log +0 -6312
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fe9e553d23103cb3b405dc40ca88f59187781c11
4
- data.tar.gz: 2d71a5d72d583a154f64b9f1fa20ac57c809ba43
3
+ metadata.gz: daa4a9202f1a34ee77f510412c6ef2eb54e6fe17
4
+ data.tar.gz: 3f0a7f5fcf0e7db439d8ac0bd8a86e17213ab36f
5
5
  SHA512:
6
- metadata.gz: 28e1e714c9c6aad351496c5080fea4eba6ca34e8c8e38bd337c4d2d06148fddee00d46c98361578111318b1b31be3a60055521320042d57fb508c971effddcbf
7
- data.tar.gz: 293bdd74407f05a8ad2cbb69b72fd622d86747fa43dfd5e24ddb8b4fc0d9fae8113a25c7f1050c10ecac026a681ee78f7c01c8d1b30d00ea21f6b4895aef92d4
6
+ metadata.gz: 30519f7fc35372ec2970a98242ec90b9bff51e393992185e09770acc90509d749e255dab8abc43166f8038bb64fba7d21bd66ad4f6ed0865de56bc70e0f83e96
7
+ data.tar.gz: 64bc4bf03f9ce9ce296a8ca70acc1377202a6022000ba0dd2a0a813cbffd17dd9905e83f87a384a503b32037199db9b2d719a75dc12b4143fa63bafa030a65e7
data/MIT-LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright 2015 Museways
1
+ Copyright 2015 Mathías Montossi
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
@@ -17,4 +17,4 @@ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
17
  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
18
  LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
19
  OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md CHANGED
@@ -1,4 +1,6 @@
1
- [![Gem Version](https://badge.fury.io/rb/abilities.svg)](http://badge.fury.io/rb/abilities) [![Code Climate](https://codeclimate.com/github/museways/abilities/badges/gpa.svg)](https://codeclimate.com/github/museways/abilities) [![Build Status](https://travis-ci.org/museways/abilities.svg?branch=master)](https://travis-ci.org/museways/abilities) [![Dependency Status](https://gemnasium.com/museways/abilities.svg)](https://gemnasium.com/museways/abilities)
1
+ [![Gem Version](https://badge.fury.io/rb/abilities.svg)](http://badge.fury.io/rb/abilities)
2
+ [![Code Climate](https://codeclimate.com/github/mmontossi/abilities/badges/gpa.svg)](https://codeclimate.com/github/mmontossi/abilities) [![Build Status](https://travis-ci.org/mmontossi/abilities.svg)](https://travis-ci.org/mmontossi/abilities)
3
+ [![Dependency Status](https://gemnasium.com/mmontossi/abilities.svg)](https://gemnasium.com/mmontossi/abilities)
2
4
 
3
5
  # Abilities
4
6
 
@@ -107,8 +109,8 @@ The helpers can? and cannot? are available here too:
107
109
 
108
110
  ## Credits
109
111
 
110
- This gem is maintained and funded by [museways](http://museways.com).
112
+ This gem is maintained and funded by [mmontossi](https://github.com/mmontossi).
111
113
 
112
114
  ## License
113
115
 
114
- It is free software, and may be redistributed under the terms specified in the MIT-LICENSE file.
116
+ It is free software, and may be redistributed under the terms specified in the MIT-LICENSE file.
data/Rakefile CHANGED
@@ -29,4 +29,4 @@ Rake::TestTask.new(:test) do |t|
29
29
  end
30
30
 
31
31
 
32
- task default: :test
32
+ task default: :test
data/lib/abilities.rb CHANGED
@@ -22,4 +22,4 @@ module Abilities
22
22
  end
23
23
 
24
24
  end
25
- end
25
+ end
@@ -17,4 +17,4 @@ module Abilities
17
17
 
18
18
  end
19
19
  end
20
- end
20
+ end
@@ -11,4 +11,4 @@ module Abilities
11
11
 
12
12
  end
13
13
  end
14
- end
14
+ end
@@ -9,4 +9,4 @@ module Abilities
9
9
  end
10
10
 
11
11
  end
12
- end
12
+ end
@@ -56,4 +56,4 @@ module Abilities
56
56
  end
57
57
 
58
58
  end
59
- end
59
+ end
@@ -1,3 +1,3 @@
1
1
  module Abilities
2
2
  class AccessDenied < StandardError; end
3
- end
3
+ end
@@ -20,4 +20,4 @@ module Abilities
20
20
  end
21
21
 
22
22
  end
23
- end
23
+ end
@@ -11,4 +11,4 @@ module Abilities
11
11
  end
12
12
 
13
13
  end
14
- end
14
+ end
@@ -1,5 +1,5 @@
1
1
  module Abilities
2
2
 
3
- VERSION = '0.1.0'
3
+ VERSION = '0.1.1'
4
4
 
5
- end
5
+ end
@@ -10,4 +10,4 @@ module Abilities
10
10
  end
11
11
 
12
12
  end
13
- end
13
+ end
@@ -1,2 +1,2 @@
1
1
  Abilities.define do
2
- end
2
+ end
data/test/changes_test.rb CHANGED
@@ -9,4 +9,4 @@ class ChangesTest < ActiveSupport::TestCase
9
9
  assert user.can?(:destroy, Post)
10
10
  end
11
11
 
12
- end
12
+ end
@@ -61,4 +61,4 @@ class CheckingTest < ActiveSupport::TestCase
61
61
  @admin_user ||= User.new(admin: true)
62
62
  end
63
63
 
64
- end
64
+ end
@@ -35,4 +35,4 @@ class ControllerTest < ActiveSupport::TestCase
35
35
  @post ||= Post.new
36
36
  end
37
37
 
38
- end
38
+ end
@@ -25,4 +25,4 @@ Things you may want to cover:
25
25
 
26
26
 
27
27
  Please feel free to use a different markup language if you do not plan to run
28
- <tt>rake doc:app</tt>.
28
+ <tt>rake doc:app</tt>.
data/test/dummy/Rakefile CHANGED
@@ -3,4 +3,4 @@
3
3
 
4
4
  require File.expand_path('../config/application', __FILE__)
5
5
 
6
- Rails.application.load_tasks
6
+ Rails.application.load_tasks
@@ -10,4 +10,4 @@
10
10
  // Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details
11
11
  // about supported directives.
12
12
  //
13
- //= require_tree .
13
+ //= require_tree .
@@ -12,4 +12,4 @@
12
12
  *
13
13
  *= require_tree .
14
14
  *= require_self
15
- */
15
+ */
@@ -2,4 +2,4 @@ class ApplicationController < ActionController::Base
2
2
  # Prevent CSRF attacks by raising an exception.
3
3
  # For APIs, you may want to use :null_session instead.
4
4
  protect_from_forgery with: :exception
5
- end
5
+ end
@@ -1,2 +1,2 @@
1
1
  module ApplicationHelper
2
- end
2
+ end
@@ -1,3 +1,3 @@
1
1
  class Post < ActiveRecord::Base
2
2
  belongs_to :user
3
- end
3
+ end
@@ -1,3 +1,3 @@
1
1
  class User < ActiveRecord::Base
2
2
  include Abilities::Concern
3
- end
3
+ end
@@ -11,4 +11,4 @@
11
11
  <%= yield %>
12
12
 
13
13
  </body>
14
- </html>
14
+ </html>
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env ruby
2
2
  ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
3
- load Gem.bin_path('bundler', 'bundle')
3
+ load Gem.bin_path('bundler', 'bundle')
data/test/dummy/bin/rails CHANGED
@@ -1,4 +1,4 @@
1
1
  #!/usr/bin/env ruby
2
2
  APP_PATH = File.expand_path('../../config/application', __FILE__)
3
3
  require_relative '../config/boot'
4
- require 'rails/commands'
4
+ require 'rails/commands'
data/test/dummy/bin/rake CHANGED
@@ -1,4 +1,4 @@
1
1
  #!/usr/bin/env ruby
2
2
  require_relative '../config/boot'
3
3
  require 'rake'
4
- Rake.application.run
4
+ Rake.application.run
data/test/dummy/config.ru CHANGED
@@ -1,4 +1,4 @@
1
1
  # This file is used by Rack-based servers to start the application.
2
2
 
3
3
  require ::File.expand_path('../config/environment', __FILE__)
4
- run Rails.application
4
+ run Rails.application
@@ -7,4 +7,4 @@ Abilities.define do
7
7
  end
8
8
  can :manage, User
9
9
  can :touch, :all
10
- end
10
+ end
@@ -19,5 +19,4 @@ module Dummy
19
19
  # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
20
20
  # config.i18n.default_locale = :de
21
21
  end
22
- end
23
-
22
+ end
@@ -2,4 +2,4 @@
2
2
  ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../../../Gemfile', __FILE__)
3
3
 
4
4
  require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE'])
5
- $LOAD_PATH.unshift File.expand_path('../../../../lib', __FILE__)
5
+ $LOAD_PATH.unshift File.expand_path('../../../../lib', __FILE__)
@@ -22,4 +22,4 @@ test:
22
22
 
23
23
  production:
24
24
  <<: *default
25
- database: db/production.sqlite3
25
+ database: db/production.sqlite3
@@ -2,4 +2,4 @@
2
2
  require File.expand_path('../application', __FILE__)
3
3
 
4
4
  # Initialize the Rails application.
5
- Rails.application.initialize!
5
+ Rails.application.initialize!
@@ -34,4 +34,4 @@ Dummy::Application.configure do
34
34
 
35
35
  # Raises error for missing translations
36
36
  # config.action_view.raise_on_missing_translations = true
37
- end
37
+ end
@@ -84,4 +84,4 @@ Dummy::Application.configure do
84
84
 
85
85
  # Do not dump schema after migrations.
86
86
  config.active_record.dump_schema_after_migration = false
87
- end
87
+ end
@@ -44,4 +44,4 @@ Dummy::Application.configure do
44
44
  if Rails::VERSION::MAJOR == 4 && Rails::VERSION::MINOR >= 2
45
45
  config.active_support.test_order = :random
46
46
  end
47
- end
47
+ end
@@ -4,4 +4,4 @@
4
4
  # Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
5
5
 
6
6
  # You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
7
- # Rails.backtrace_cleaner.remove_silencers!
7
+ # Rails.backtrace_cleaner.remove_silencers!
@@ -1,3 +1,3 @@
1
1
  # Be sure to restart your server when you modify this file.
2
2
 
3
- Rails.application.config.action_dispatch.cookies_serializer = :json
3
+ Rails.application.config.action_dispatch.cookies_serializer = :json
@@ -1,4 +1,4 @@
1
1
  # Be sure to restart your server when you modify this file.
2
2
 
3
3
  # Configure sensitive parameters which will be filtered from the log file.
4
- Rails.application.config.filter_parameters += [:password]
4
+ Rails.application.config.filter_parameters += [:password]
@@ -13,4 +13,4 @@
13
13
  # These inflection rules are supported but not enabled by default:
14
14
  # ActiveSupport::Inflector.inflections(:en) do |inflect|
15
15
  # inflect.acronym 'RESTful'
16
- # end
16
+ # end
@@ -1,4 +1,4 @@
1
1
  # Be sure to restart your server when you modify this file.
2
2
 
3
3
  # Add new mime types for use in respond_to blocks:
4
- # Mime::Type.register "text/richtext", :rtf
4
+ # Mime::Type.register "text/richtext", :rtf
@@ -1 +1 @@
1
- Dummy::Application.config.secret_key_base = '2a5f2475b72242d6835656e2091073d9adcbf05f117ec0a952849e79bf364060ec77979a2d147e4c0a91ae2d6f306412aae345b2d9b30d2337496695fb8b8167'
1
+ Dummy::Application.config.secret_key_base = '2a5f2475b72242d6835656e2091073d9adcbf05f117ec0a952849e79bf364060ec77979a2d147e4c0a91ae2d6f306412aae345b2d9b30d2337496695fb8b8167'
@@ -1,3 +1,3 @@
1
1
  # Be sure to restart your server when you modify this file.
2
2
 
3
- Rails.application.config.session_store :cookie_store, key: '_dummy_session'
3
+ Rails.application.config.session_store :cookie_store, key: '_dummy_session'
@@ -11,4 +11,4 @@ end
11
11
  # To enable root element in JSON for ActiveRecord objects.
12
12
  # ActiveSupport.on_load(:active_record) do
13
13
  # self.include_root_in_json = true
14
- # end
14
+ # end
@@ -20,4 +20,4 @@
20
20
  # available at http://guides.rubyonrails.org/i18n.html.
21
21
 
22
22
  en:
23
- hello: "Hello world"
23
+ hello: "Hello world"
@@ -53,4 +53,4 @@ Rails.application.routes.draw do
53
53
  # # (app/controllers/admin/products_controller.rb)
54
54
  # resources :products
55
55
  # end
56
- end
56
+ end
@@ -19,4 +19,4 @@ test:
19
19
  # Do not keep production secrets in the repository,
20
20
  # instead read values from the environment.
21
21
  production:
22
- secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>
22
+ secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>
@@ -8,4 +8,4 @@ class CreateUsers < ActiveRecord::Migration
8
8
  t.timestamps
9
9
  end
10
10
  end
11
- end
11
+ end
@@ -7,4 +7,4 @@ class CreatePosts < ActiveRecord::Migration
7
7
  t.timestamps
8
8
  end
9
9
  end
10
- end
10
+ end
@@ -28,4 +28,4 @@ ActiveRecord::Schema.define(version: 20140629203412) do
28
28
  t.datetime "updated_at"
29
29
  end
30
30
 
31
- end
31
+ end
@@ -64,4 +64,4 @@
64
64
  <p>If you are the application owner check the logs for more information.</p>
65
65
  </div>
66
66
  </body>
67
- </html>
67
+ </html>
@@ -64,4 +64,4 @@
64
64
  <p>If you are the application owner check the logs for more information.</p>
65
65
  </div>
66
66
  </body>
67
- </html>
67
+ </html>
@@ -63,4 +63,4 @@
63
63
  <p>If you are the application owner check the logs for more information.</p>
64
64
  </div>
65
65
  </body>
66
- </html>
66
+ </html>
@@ -15,4 +15,4 @@ class GeneratorsTest < Rails::Generators::TestCase
15
15
  assert_file 'config/abilities.rb'
16
16
  end
17
17
 
18
- end
18
+ end
data/test/test_helper.rb CHANGED
@@ -21,4 +21,4 @@ ActiveRecord::Base.establish_connection(config['test'])
21
21
  load(File.expand_path('../dummy/db/schema.rb', __FILE__))
22
22
 
23
23
  # Include helpers
24
- ActionView::TestCase.send :include, Abilities::ActionView::Base
24
+ ActionView::TestCase.send :include, Abilities::ActionView::Base
data/test/view_test.rb CHANGED
@@ -20,4 +20,4 @@ class ViewTest < ActionView::TestCase
20
20
  @user ||= User.new
21
21
  end
22
22
 
23
- end
23
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: abilities
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
- - Museways
7
+ - mmontossi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-08-01 00:00:00.000000000 Z
11
+ date: 2016-01-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -46,7 +46,7 @@ dependencies:
46
46
  version: '1.3'
47
47
  description: Minimalistic authorization inspired in cancan for rails.
48
48
  email:
49
- - hello@museways.com
49
+ - mmontossi@buyin.io
50
50
  executables: []
51
51
  extensions: []
52
52
  extra_rdoc_files: []
@@ -103,8 +103,6 @@ files:
103
103
  - test/dummy/db/migrate/20140629203344_create_users.rb
104
104
  - test/dummy/db/migrate/20140629203412_create_posts.rb
105
105
  - test/dummy/db/schema.rb
106
- - test/dummy/log/development.log
107
- - test/dummy/log/test.log
108
106
  - test/dummy/public/404.html
109
107
  - test/dummy/public/422.html
110
108
  - test/dummy/public/500.html
@@ -112,7 +110,7 @@ files:
112
110
  - test/generator_test.rb
113
111
  - test/test_helper.rb
114
112
  - test/view_test.rb
115
- homepage: https://github.com/museways/abilities
113
+ homepage: https://github.com/mmontossi/abilities
116
114
  licenses:
117
115
  - MIT
118
116
  metadata: {}
@@ -173,8 +171,6 @@ test_files:
173
171
  - test/dummy/db/migrate/20140629203344_create_users.rb
174
172
  - test/dummy/db/migrate/20140629203412_create_posts.rb
175
173
  - test/dummy/db/schema.rb
176
- - test/dummy/log/development.log
177
- - test/dummy/log/test.log
178
174
  - test/dummy/public/404.html
179
175
  - test/dummy/public/422.html
180
176
  - test/dummy/public/500.html