action_access 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 (36) hide show
  1. checksums.yaml +13 -5
  2. data/.gitignore +2 -0
  3. data/.travis.yml +31 -4
  4. data/CHANGELOG.md +7 -1
  5. data/README.md +22 -12
  6. data/action_access.gemspec +3 -3
  7. data/lib/action_access/version.rb +1 -1
  8. data/test/controllers/articles_controller_test.rb +13 -13
  9. data/test/controllers/secrets_controller_test.rb +2 -2
  10. data/test/controllers/static_controller_test.rb +2 -2
  11. data/test/dummy/config/environment.rb +39 -2
  12. data/test/dummy/db/migrate/20140926071026_create_users.rb +1 -1
  13. metadata +14 -59
  14. data/Gemfile.lock +0 -108
  15. data/test/dummy/app/assets/images/.keep +0 -0
  16. data/test/dummy/app/assets/javascripts/application.js +0 -13
  17. data/test/dummy/app/assets/stylesheets/application.css +0 -15
  18. data/test/dummy/app/mailers/.keep +0 -0
  19. data/test/dummy/bin/bundle +0 -3
  20. data/test/dummy/bin/rails +0 -4
  21. data/test/dummy/bin/rake +0 -4
  22. data/test/dummy/config/application.rb +0 -23
  23. data/test/dummy/config/boot.rb +0 -5
  24. data/test/dummy/config/environments/development.rb +0 -37
  25. data/test/dummy/config/environments/production.rb +0 -78
  26. data/test/dummy/config/environments/test.rb +0 -42
  27. data/test/dummy/config/initializers/assets.rb +0 -8
  28. data/test/dummy/config/initializers/backtrace_silencers.rb +0 -7
  29. data/test/dummy/config/initializers/cookies_serializer.rb +0 -3
  30. data/test/dummy/config/initializers/filter_parameter_logging.rb +0 -4
  31. data/test/dummy/config/initializers/inflections.rb +0 -16
  32. data/test/dummy/config/initializers/mime_types.rb +0 -4
  33. data/test/dummy/config/initializers/session_store.rb +0 -3
  34. data/test/dummy/config/initializers/wrap_parameters.rb +0 -14
  35. data/test/dummy/config/locales/en.yml +0 -23
  36. data/test/dummy/config/secrets.yml +0 -22
checksums.yaml CHANGED
@@ -1,7 +1,15 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 3018e5d68f21d4a6f66e15a29edc67b654b8f82a
4
- data.tar.gz: 0cf2e285d1f2116733bb9ec8c5e99862de9b300a
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ ZjI1ZGQxNzA1NDEyNDY2YmZiYmRiMzc0N2Q1YTJiZGQyNWE3YWUwNw==
5
+ data.tar.gz: !binary |-
6
+ MzZjZDQ0ZjdhMWUxMDRlNjZjMTE3MzBmODBhNzk3YWRmNzRlMmY4Mw==
5
7
  SHA512:
6
- metadata.gz: daa68edbd6d9f3a91e96d20c4e4e957eb7873b637eac6b0639b20d83069a9d2187152d005a059c34e68512c0be3bded5143f91d8b72919d6e4fd6bec0156f141
7
- data.tar.gz: 4578a0f74cf68ab2b9687a710b36991b950073cddfcaf7b31cdcae37444407cc3f755592c9eb481d38a375b3540f7861d4dbbe91698f73a14a7e4f2db1a965ed
8
+ metadata.gz: !binary |-
9
+ YTA1YmQ2ZmNiODNkNGJlODM4ODIzZGMzNzFmNTVlY2Q5Zjk0OWI0Yzg1NTkz
10
+ OTQyZjRhOWRjZDdiNTk1M2QxZDZjNWFjMzRhOTliNTMxZWVlYjRmNmE5Njc4
11
+ OWU1ZTk1YzkyMTI5OTJiZmI5NTNmYjFkNDU4ZDc5NzQzYjc1MDM=
12
+ data.tar.gz: !binary |-
13
+ ZjcwZWJjNzhjZDU1ZjkxNzZlYTdiZjU2ZGQzNzY3ODU1MmY5ZmRlNDU5NTRl
14
+ ZDQ0MzdmMGUwYWQ4YTJjMGM4M2I4Yjg3OWVmODRjZTM4ZDYyZjRjMTdhOGE0
15
+ ZWU0ZTczMDQ1NWRhOGE5NTYzNWU0ZDNhODNmODJlNDM3NDgzOWU=
data/.gitignore CHANGED
@@ -1,4 +1,5 @@
1
1
  .bundle/
2
+ Gemfile.lock
2
3
  log/*.log
3
4
  pkg/
4
5
  test/dummy/db/*.sqlite3
@@ -7,3 +8,4 @@ test/dummy/log/*.log
7
8
  test/dummy/tmp/
8
9
  test/dummy/.sass-cache
9
10
  notes/
11
+ tags
@@ -1,5 +1,32 @@
1
+ language: ruby
2
+ sudo: false
3
+ cache: bundler
4
+
5
+ deploy:
6
+ provider: rubygems
7
+ api_key:
8
+ secure: CBWxNianEdrWCwROIJIINwTbVLkabVA+RiUo5bzNyLmOQAqNd8yBcAdqcxMpOjrKkrBm2oKgZpEreLuMdsifOWyVIchXid0uiqZGWCcHhoE2xdnUijR0AisvshwwMQN6JZb90YpIDRNj9MfkM9KyvjXrVKDjpqL2V/e43z1vUIw=
9
+ on:
10
+ tags: true
11
+
1
12
  rvm:
2
- - 1.9.3
3
- - 2.0.0
4
- - 2.1.6
5
- - 2.2.2
13
+ - 2.2.5
14
+ - 2.3.1
15
+ - ruby-head
16
+
17
+ matrix:
18
+ allow_failures:
19
+ - rvm: ruby-head
20
+ fast_finish: true
21
+
22
+ before_install:
23
+ - gem install bundler
24
+ - bundler --version
25
+
26
+ before_script:
27
+ - bundle update
28
+
29
+ script: bundle exec rake test
30
+
31
+ notifications:
32
+ email: false
@@ -1,6 +1,12 @@
1
1
  Changelog
2
2
  =========
3
3
 
4
+ 0.1.1
5
+ -----
6
+
7
+ - Support Rails 5.
8
+
9
+
4
10
  0.1.0
5
11
  -----
6
12
 
@@ -19,7 +25,7 @@ Changelog
19
25
  -----
20
26
 
21
27
  - Update dependencies.
22
- - Support Rails 2.2.2.
28
+ - Support Ruby 2.2.2.
23
29
 
24
30
 
25
31
  0.0.2
data/README.md CHANGED
@@ -1,14 +1,25 @@
1
1
  # Action Access
2
- [![Build Status](https://travis-ci.org/matiasgagliano/action_access.svg?branch=v0.0.2)](https://travis-ci.org/matiasgagliano/action_access)
3
- [![Security](https://hakiri.io/github/matiasgagliano/action_access/master.svg)](https://hakiri.io/github/matiasgagliano/action_access/master)
2
+ [![Build Status](https://travis-ci.org/matiasgagliano/action_access.svg?branch=master)](https://travis-ci.org/matiasgagliano/action_access)
4
3
 
5
- Action Access is an access control system for Ruby on Rails. It provides a
6
- modular and easy way to secure applications and handle permissions.
4
+ Action Access is a **modular**, **concise** and really **easy** to use **access
5
+ control system** for Ruby on Rails. It allows to secure applications and handle
6
+ permissions in a breeze.
7
7
 
8
- It works at controller level focusing on what **actions** are accessible for
9
- the current user instead of messing with models and their attributes.
8
+ * Focuses on what **actions** are accessible for the current user instead of
9
+ messing with models and their attributes.
10
10
 
11
- It also provides utilities for thorough control and some useful view helpers.
11
+ * **Declarative** and **succinct** authorization statements right in the
12
+ controller. Everything related to a controller is within the controller
13
+ (self-contained) so that **no stale code** is left behind when
14
+ refactoring, moving or removing controllers.
15
+
16
+ * Totally **independent** from the authentication system and can work without
17
+ user models or predefined roles.
18
+
19
+ * Batteries are included, **utilities** for thorough control and useful
20
+ **view helpers** come out of the box.
21
+
22
+ * No configuration files, rake tasks or migrations needed.
12
23
 
13
24
 
14
25
  ## Installation
@@ -135,7 +146,7 @@ These statements lock the controller and set the following:
135
146
  * _Reviewers_ can list, view and edit articles.
136
147
  * _Anyone else_ can **only** list and view articles.
137
148
 
138
- This case uses the special keyword `:all`, it means everyone if passed as the
149
+ This case uses the special keyword `:all`. It means everyone if passed as the
139
150
  first argument or every action if passed as the last one.
140
151
 
141
152
  Again, any unauthorized request will be rejected and redirected with an alert.
@@ -149,9 +160,8 @@ you both **define** them and **set their permissions**. The only requirement is
149
160
  that the clearance levels from the authorizations match at least one from the
150
161
  list returned by `current_clearance_levels`.
151
162
 
152
- This makes it easier to embrace modular designs, makes controllers
153
- self-contained because everything related to a controller is within the
154
- controller and avoids leaving unnecessary or unused code after refactoring.
163
+ This makes it easier to embrace modular designs, makes controllers to be
164
+ self-contained and avoids leaving unnecessary or unused code after refactoring.
155
165
 
156
166
 
157
167
  ## Advanced configuration
@@ -267,7 +277,7 @@ of the resource and the namespace (optional). In the end it returns a boolean.
267
277
  ```
268
278
 
269
279
  Just like the default `current_clearance_levels` in controllers, `can?`
270
- depends on the `clearance_levels` method in the model too.
280
+ depends on a `clearance_levels` method in the model too.
271
281
 
272
282
  Following up the `User` model from before:
273
283
 
@@ -17,9 +17,9 @@ Gem::Specification.new do |s|
17
17
  s.test_files = `git ls-files -- test/*`.split("\n")
18
18
  s.require_paths = ['lib']
19
19
 
20
- s.add_dependency 'rails', '~> 4.1'
20
+ s.add_dependency 'rails', '>= 4.1'
21
21
 
22
22
  s.add_development_dependency 'sqlite3'
23
- s.add_development_dependency 'bundler', '~> 1.6'
24
- s.add_development_dependency 'rake', '~> 10.0'
23
+ s.add_development_dependency 'bundler', '>= 1.6'
24
+ s.add_development_dependency 'rake', '>= 10.0'
25
25
  end
@@ -1,3 +1,3 @@
1
1
  module ActionAccess
2
- VERSION = '0.1.0'
2
+ VERSION = '0.1.1'
3
3
  end
@@ -12,52 +12,52 @@ class ArticlesControllerTest < ActionController::TestCase
12
12
 
13
13
  test "accesses with undefined clearance level get redirected" do
14
14
  # The role doesn't exist (haven't been defined)
15
- get :new, nil, {roles: :root}
15
+ get :new, session: { roles: :root }
16
16
  assert_redirected_to root_url
17
17
 
18
- post :create, nil, {roles: :root}
18
+ post :create, session: { roles: :root }
19
19
  assert_redirected_to root_url
20
20
  end
21
21
 
22
22
  test "unauthorized accesses get redirected" do
23
23
  # The roles exist but aren't authorized.
24
- post :create, nil, {roles: :editor}
24
+ post :create, session: { roles: :editor }
25
25
  assert_redirected_to root_url
26
26
 
27
- get :edit, {id: 1}, {roles: :user}
27
+ get :edit, params: { id: 1 }, session: { roles: :user }
28
28
  assert_redirected_to root_url
29
29
  end
30
30
 
31
31
  test "authorized accesses aren't redirected" do
32
- get :new, nil, {roles: :admin}
32
+ get :new, session: { roles: :admin }
33
33
  assert_response :success
34
34
 
35
- get :edit, {id: 1}, {roles: :editor}
35
+ get :edit, params: { id: 1 }, session: { roles: :editor }
36
36
  assert_response :success
37
37
  end
38
38
 
39
39
  test "many clearance levels can be defined in one statement" do
40
- get :index, nil, {roles: :editor}
40
+ get :index, session: { roles: :editor }
41
41
  assert_response :success
42
42
 
43
- get :index, nil, {roles: :cleaner}
43
+ get :index, session: { roles: :cleaner }
44
44
  assert_response :success
45
45
 
46
- get :index, nil, {roles: :user}
46
+ get :index, session: { roles: :user }
47
47
  assert_response :success
48
48
  end
49
49
 
50
50
  test "users can have many clearance levels" do
51
- post :create, nil, {roles: [:editor, :cleaner]}
51
+ post :create, session: { roles: [:editor, :cleaner] }
52
52
  assert_redirected_to root_url
53
53
 
54
- get :index, nil, {roles: [:editor, :cleaner]}
54
+ get :index, session: { roles: [:editor, :cleaner] }
55
55
  assert_response :success
56
56
 
57
- get :edit, {id: 1}, {roles: [:editor, :cleaner]}
57
+ get :edit, params: { id: 1 }, session: { roles: [:editor, :cleaner] }
58
58
  assert_response :success
59
59
 
60
- delete :destroy, {id: 1}, {roles: [:editor, :cleaner]}
60
+ delete :destroy, params: { id: 1 }, session: { roles: [:editor, :cleaner] }
61
61
  assert_redirected_to articles_url
62
62
  end
63
63
  end
@@ -4,10 +4,10 @@ class SecretsControllerTest < ActionController::TestCase
4
4
  test "controllers are locked by default" do
5
5
  # Test that the "lock_access" call in ApplicationController works properly.
6
6
  # There are no access rules in SecretsController but it should be locked anyway.
7
- get :index, nil, {roles: :admin}
7
+ get :index, session: { roles: :admin }
8
8
  assert_redirected_to root_url
9
9
 
10
- get :index, nil, {roles: :editor}
10
+ get :index, session: { roles: :editor }
11
11
  assert_redirected_to root_url
12
12
 
13
13
  get :index
@@ -3,10 +3,10 @@ require 'test_helper'
3
3
  class StaticControllerTest < ActionController::TestCase
4
4
  # Test that the :all keyword works properly
5
5
  test "anyone can do anything" do
6
- get :home, nil, {roles: :admin}
6
+ get :home, session: { roles: :admin }
7
7
  assert_response :success
8
8
 
9
- get :home, nil, {roles: :undefined}
9
+ get :home, session: { roles: :undefined }
10
10
  assert_response :success
11
11
 
12
12
  get :home
@@ -1,5 +1,42 @@
1
- # Load the Rails application.
2
- require File.expand_path('../application', __FILE__)
1
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../../../Gemfile', __FILE__)
2
+ require 'bundler/setup'
3
+ require 'rails/all'
4
+
5
+ Bundler.require(*Rails.groups)
6
+ require "action_access"
7
+
8
+ module Dummy
9
+ class Application < Rails::Application
10
+ # Allows sessions to be verified against a known secure key to prevent tampering.
11
+ secrets.secret_key_base = 'thisisasecretkey'
12
+
13
+ # Don't reload code between tests.
14
+ config.cache_classes = true
15
+ config.cache_store = :memory_store
16
+
17
+ # Test order
18
+ config.active_support.test_order = :random
19
+
20
+ # Avoids loading the whole application just for running a single test.
21
+ config.eager_load = false
22
+
23
+ # Show full error reports and disable caching.
24
+ config.consider_all_requests_local = true
25
+ config.action_controller.perform_caching = false
26
+
27
+ # Raise exceptions instead of rendering exception templates.
28
+ config.action_dispatch.show_exceptions = false
29
+
30
+ # Disable request forgery protection in test environment.
31
+ config.action_controller.allow_forgery_protection = false
32
+
33
+ # Tell Action Mailer not to deliver emails to the real world.
34
+ config.action_mailer.delivery_method = :test
35
+
36
+ # Print deprecation notices to the stderr.
37
+ config.active_support.deprecation = :stderr
38
+ end
39
+ end
3
40
 
4
41
  # Initialize the Rails application.
5
42
  Rails.application.initialize!
@@ -1,4 +1,4 @@
1
- class CreateUsers < ActiveRecord::Migration
1
+ class CreateUsers < ActiveRecord::Migration[5.0]
2
2
  def change
3
3
  create_table :users do |t|
4
4
  t.string :username
metadata CHANGED
@@ -1,69 +1,69 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: action_access
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
7
  - Matías A. Gagliano
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-10-06 00:00:00.000000000 Z
11
+ date: 2016-07-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ! '>='
18
18
  - !ruby/object:Gem::Version
19
19
  version: '4.1'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ! '>='
25
25
  - !ruby/object:Gem::Version
26
26
  version: '4.1'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: sqlite3
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ">="
31
+ - - ! '>='
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ">="
38
+ - - ! '>='
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: bundler
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - "~>"
45
+ - - ! '>='
46
46
  - !ruby/object:Gem::Version
47
47
  version: '1.6'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - "~>"
52
+ - - ! '>='
53
53
  - !ruby/object:Gem::Version
54
54
  version: '1.6'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rake
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - "~>"
59
+ - - ! '>='
60
60
  - !ruby/object:Gem::Version
61
61
  version: '10.0'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - "~>"
66
+ - - ! '>='
67
67
  - !ruby/object:Gem::Version
68
68
  version: '10.0'
69
69
  description: Easy and modular way to secure applications and handle permissions.
@@ -73,12 +73,11 @@ executables: []
73
73
  extensions: []
74
74
  extra_rdoc_files: []
75
75
  files:
76
- - ".gitignore"
77
- - ".travis.yml"
76
+ - .gitignore
77
+ - .travis.yml
78
78
  - CHANGELOG.md
79
79
  - CONTRIBUTING.md
80
80
  - Gemfile
81
- - Gemfile.lock
82
81
  - LICENSE.txt
83
82
  - README.md
84
83
  - Rakefile
@@ -96,16 +95,12 @@ files:
96
95
  - test/controllers/static_controller_test.rb
97
96
  - test/dummy/README.rdoc
98
97
  - test/dummy/Rakefile
99
- - test/dummy/app/assets/images/.keep
100
- - test/dummy/app/assets/javascripts/application.js
101
- - test/dummy/app/assets/stylesheets/application.css
102
98
  - test/dummy/app/controllers/application_controller.rb
103
99
  - test/dummy/app/controllers/articles_controller.rb
104
100
  - test/dummy/app/controllers/concerns/.keep
105
101
  - test/dummy/app/controllers/secrets_controller.rb
106
102
  - test/dummy/app/controllers/static_controller.rb
107
103
  - test/dummy/app/helpers/application_helper.rb
108
- - test/dummy/app/mailers/.keep
109
104
  - test/dummy/app/models/.keep
110
105
  - test/dummy/app/models/concerns/.keep
111
106
  - test/dummy/app/models/user.rb
@@ -115,28 +110,10 @@ files:
115
110
  - test/dummy/app/views/articles/show.html.erb
116
111
  - test/dummy/app/views/layouts/application.html.erb
117
112
  - test/dummy/app/views/static/home.html.erb
118
- - test/dummy/bin/bundle
119
- - test/dummy/bin/rails
120
- - test/dummy/bin/rake
121
113
  - test/dummy/config.ru
122
- - test/dummy/config/application.rb
123
- - test/dummy/config/boot.rb
124
114
  - test/dummy/config/database.yml
125
115
  - test/dummy/config/environment.rb
126
- - test/dummy/config/environments/development.rb
127
- - test/dummy/config/environments/production.rb
128
- - test/dummy/config/environments/test.rb
129
- - test/dummy/config/initializers/assets.rb
130
- - test/dummy/config/initializers/backtrace_silencers.rb
131
- - test/dummy/config/initializers/cookies_serializer.rb
132
- - test/dummy/config/initializers/filter_parameter_logging.rb
133
- - test/dummy/config/initializers/inflections.rb
134
- - test/dummy/config/initializers/mime_types.rb
135
- - test/dummy/config/initializers/session_store.rb
136
- - test/dummy/config/initializers/wrap_parameters.rb
137
- - test/dummy/config/locales/en.yml
138
116
  - test/dummy/config/routes.rb
139
- - test/dummy/config/secrets.yml
140
117
  - test/dummy/db/migrate/20140926071026_create_users.rb
141
118
  - test/dummy/db/schema.rb
142
119
  - test/dummy/lib/assets/.keep
@@ -158,12 +135,12 @@ require_paths:
158
135
  - lib
159
136
  required_ruby_version: !ruby/object:Gem::Requirement
160
137
  requirements:
161
- - - ">="
138
+ - - ! '>='
162
139
  - !ruby/object:Gem::Version
163
140
  version: '0'
164
141
  required_rubygems_version: !ruby/object:Gem::Requirement
165
142
  requirements:
166
- - - ">="
143
+ - - ! '>='
167
144
  - !ruby/object:Gem::Version
168
145
  version: '0'
169
146
  requirements: []
@@ -179,16 +156,12 @@ test_files:
179
156
  - test/controllers/static_controller_test.rb
180
157
  - test/dummy/README.rdoc
181
158
  - test/dummy/Rakefile
182
- - test/dummy/app/assets/images/.keep
183
- - test/dummy/app/assets/javascripts/application.js
184
- - test/dummy/app/assets/stylesheets/application.css
185
159
  - test/dummy/app/controllers/application_controller.rb
186
160
  - test/dummy/app/controllers/articles_controller.rb
187
161
  - test/dummy/app/controllers/concerns/.keep
188
162
  - test/dummy/app/controllers/secrets_controller.rb
189
163
  - test/dummy/app/controllers/static_controller.rb
190
164
  - test/dummy/app/helpers/application_helper.rb
191
- - test/dummy/app/mailers/.keep
192
165
  - test/dummy/app/models/.keep
193
166
  - test/dummy/app/models/concerns/.keep
194
167
  - test/dummy/app/models/user.rb
@@ -198,28 +171,10 @@ test_files:
198
171
  - test/dummy/app/views/articles/show.html.erb
199
172
  - test/dummy/app/views/layouts/application.html.erb
200
173
  - test/dummy/app/views/static/home.html.erb
201
- - test/dummy/bin/bundle
202
- - test/dummy/bin/rails
203
- - test/dummy/bin/rake
204
174
  - test/dummy/config.ru
205
- - test/dummy/config/application.rb
206
- - test/dummy/config/boot.rb
207
175
  - test/dummy/config/database.yml
208
176
  - test/dummy/config/environment.rb
209
- - test/dummy/config/environments/development.rb
210
- - test/dummy/config/environments/production.rb
211
- - test/dummy/config/environments/test.rb
212
- - test/dummy/config/initializers/assets.rb
213
- - test/dummy/config/initializers/backtrace_silencers.rb
214
- - test/dummy/config/initializers/cookies_serializer.rb
215
- - test/dummy/config/initializers/filter_parameter_logging.rb
216
- - test/dummy/config/initializers/inflections.rb
217
- - test/dummy/config/initializers/mime_types.rb
218
- - test/dummy/config/initializers/session_store.rb
219
- - test/dummy/config/initializers/wrap_parameters.rb
220
- - test/dummy/config/locales/en.yml
221
177
  - test/dummy/config/routes.rb
222
- - test/dummy/config/secrets.yml
223
178
  - test/dummy/db/migrate/20140926071026_create_users.rb
224
179
  - test/dummy/db/schema.rb
225
180
  - test/dummy/lib/assets/.keep
@@ -1,108 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- action_access (0.1.0)
5
- rails (~> 4.1)
6
-
7
- GEM
8
- remote: https://rubygems.org/
9
- specs:
10
- actionmailer (4.2.4)
11
- actionpack (= 4.2.4)
12
- actionview (= 4.2.4)
13
- activejob (= 4.2.4)
14
- mail (~> 2.5, >= 2.5.4)
15
- rails-dom-testing (~> 1.0, >= 1.0.5)
16
- actionpack (4.2.4)
17
- actionview (= 4.2.4)
18
- activesupport (= 4.2.4)
19
- rack (~> 1.6)
20
- rack-test (~> 0.6.2)
21
- rails-dom-testing (~> 1.0, >= 1.0.5)
22
- rails-html-sanitizer (~> 1.0, >= 1.0.2)
23
- actionview (4.2.4)
24
- activesupport (= 4.2.4)
25
- builder (~> 3.1)
26
- erubis (~> 2.7.0)
27
- rails-dom-testing (~> 1.0, >= 1.0.5)
28
- rails-html-sanitizer (~> 1.0, >= 1.0.2)
29
- activejob (4.2.4)
30
- activesupport (= 4.2.4)
31
- globalid (>= 0.3.0)
32
- activemodel (4.2.4)
33
- activesupport (= 4.2.4)
34
- builder (~> 3.1)
35
- activerecord (4.2.4)
36
- activemodel (= 4.2.4)
37
- activesupport (= 4.2.4)
38
- arel (~> 6.0)
39
- activesupport (4.2.4)
40
- i18n (~> 0.7)
41
- json (~> 1.7, >= 1.7.7)
42
- minitest (~> 5.1)
43
- thread_safe (~> 0.3, >= 0.3.4)
44
- tzinfo (~> 1.1)
45
- arel (6.0.3)
46
- builder (3.2.2)
47
- erubis (2.7.0)
48
- globalid (0.3.6)
49
- activesupport (>= 4.1.0)
50
- i18n (0.7.0)
51
- json (1.8.3)
52
- loofah (2.0.3)
53
- nokogiri (>= 1.5.9)
54
- mail (2.6.3)
55
- mime-types (>= 1.16, < 3)
56
- mime-types (2.6.2)
57
- mini_portile (0.6.2)
58
- minitest (5.8.1)
59
- nokogiri (1.6.6.2)
60
- mini_portile (~> 0.6.0)
61
- rack (1.6.4)
62
- rack-test (0.6.3)
63
- rack (>= 1.0)
64
- rails (4.2.4)
65
- actionmailer (= 4.2.4)
66
- actionpack (= 4.2.4)
67
- actionview (= 4.2.4)
68
- activejob (= 4.2.4)
69
- activemodel (= 4.2.4)
70
- activerecord (= 4.2.4)
71
- activesupport (= 4.2.4)
72
- bundler (>= 1.3.0, < 2.0)
73
- railties (= 4.2.4)
74
- sprockets-rails
75
- rails-deprecated_sanitizer (1.0.3)
76
- activesupport (>= 4.2.0.alpha)
77
- rails-dom-testing (1.0.7)
78
- activesupport (>= 4.2.0.beta, < 5.0)
79
- nokogiri (~> 1.6.0)
80
- rails-deprecated_sanitizer (>= 1.0.1)
81
- rails-html-sanitizer (1.0.2)
82
- loofah (~> 2.0)
83
- railties (4.2.4)
84
- actionpack (= 4.2.4)
85
- activesupport (= 4.2.4)
86
- rake (>= 0.8.7)
87
- thor (>= 0.18.1, < 2.0)
88
- rake (10.4.2)
89
- sprockets (3.4.0)
90
- rack (> 1, < 3)
91
- sprockets-rails (2.3.3)
92
- actionpack (>= 3.0)
93
- activesupport (>= 3.0)
94
- sprockets (>= 2.8, < 4.0)
95
- sqlite3 (1.3.10)
96
- thor (0.19.1)
97
- thread_safe (0.3.5)
98
- tzinfo (1.2.2)
99
- thread_safe (~> 0.1)
100
-
101
- PLATFORMS
102
- ruby
103
-
104
- DEPENDENCIES
105
- action_access!
106
- bundler (~> 1.6)
107
- rake (~> 10.0)
108
- sqlite3
File without changes
@@ -1,13 +0,0 @@
1
- // This is a manifest file that'll be compiled into application.js, which will include all the files
2
- // listed below.
3
- //
4
- // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
5
- // or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
6
- //
7
- // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
8
- // compiled file.
9
- //
10
- // Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details
11
- // about supported directives.
12
- //
13
- //= require_tree .
@@ -1,15 +0,0 @@
1
- /*
2
- * This is a manifest file that'll be compiled into application.css, which will include all the files
3
- * listed below.
4
- *
5
- * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
6
- * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
7
- *
8
- * You're free to add application-wide styles to this file and they'll appear at the bottom of the
9
- * compiled file so the styles you add here take precedence over styles defined in any styles
10
- * defined in the other CSS/SCSS files in this directory. It is generally better to create a new
11
- * file per style scope.
12
- *
13
- *= require_tree .
14
- *= require_self
15
- */
File without changes
@@ -1,3 +0,0 @@
1
- #!/usr/bin/env ruby
2
- ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
3
- load Gem.bin_path('bundler', 'bundle')
@@ -1,4 +0,0 @@
1
- #!/usr/bin/env ruby
2
- APP_PATH = File.expand_path('../../config/application', __FILE__)
3
- require_relative '../config/boot'
4
- require 'rails/commands'
@@ -1,4 +0,0 @@
1
- #!/usr/bin/env ruby
2
- require_relative '../config/boot'
3
- require 'rake'
4
- Rake.application.run
@@ -1,23 +0,0 @@
1
- require File.expand_path('../boot', __FILE__)
2
-
3
- require 'rails/all'
4
-
5
- Bundler.require(*Rails.groups)
6
- require "action_access"
7
-
8
- module Dummy
9
- class Application < Rails::Application
10
- # Settings in config/environments/* take precedence over those specified here.
11
- # Application configuration should go into files in config/initializers
12
- # -- all .rb files in that directory are automatically loaded.
13
-
14
- # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
15
- # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
16
- # config.time_zone = 'Central Time (US & Canada)'
17
-
18
- # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
19
- # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
20
- # config.i18n.default_locale = :de
21
- end
22
- end
23
-
@@ -1,5 +0,0 @@
1
- # Set up gems listed in the Gemfile.
2
- ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../../../Gemfile', __FILE__)
3
-
4
- require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE'])
5
- $LOAD_PATH.unshift File.expand_path('../../../../lib', __FILE__)
@@ -1,37 +0,0 @@
1
- Rails.application.configure do
2
- # Settings specified here will take precedence over those in config/application.rb.
3
-
4
- # In the development environment your application's code is reloaded on
5
- # every request. This slows down response time but is perfect for development
6
- # since you don't have to restart the web server when you make code changes.
7
- config.cache_classes = false
8
-
9
- # Do not eager load code on boot.
10
- config.eager_load = false
11
-
12
- # Show full error reports and disable caching.
13
- config.consider_all_requests_local = true
14
- config.action_controller.perform_caching = false
15
-
16
- # Don't care if the mailer can't send.
17
- config.action_mailer.raise_delivery_errors = false
18
-
19
- # Print deprecation notices to the Rails logger.
20
- config.active_support.deprecation = :log
21
-
22
- # Raise an error on page load if there are pending migrations.
23
- config.active_record.migration_error = :page_load
24
-
25
- # Debug mode disables concatenation and preprocessing of assets.
26
- # This option may cause significant delays in view rendering with a large
27
- # number of complex assets.
28
- config.assets.debug = true
29
-
30
- # Adds additional error checking when serving assets at runtime.
31
- # Checks for improperly declared sprockets dependencies.
32
- # Raises helpful error messages.
33
- config.assets.raise_runtime_errors = true
34
-
35
- # Raises error for missing translations
36
- # config.action_view.raise_on_missing_translations = true
37
- end
@@ -1,78 +0,0 @@
1
- Rails.application.configure do
2
- # Settings specified here will take precedence over those in config/application.rb.
3
-
4
- # Code is not reloaded between requests.
5
- config.cache_classes = true
6
-
7
- # Eager load code on boot. This eager loads most of Rails and
8
- # your application in memory, allowing both threaded web servers
9
- # and those relying on copy on write to perform better.
10
- # Rake tasks automatically ignore this option for performance.
11
- config.eager_load = true
12
-
13
- # Full error reports are disabled and caching is turned on.
14
- config.consider_all_requests_local = false
15
- config.action_controller.perform_caching = true
16
-
17
- # Enable Rack::Cache to put a simple HTTP cache in front of your application
18
- # Add `rack-cache` to your Gemfile before enabling this.
19
- # For large-scale production use, consider using a caching reverse proxy like nginx, varnish or squid.
20
- # config.action_dispatch.rack_cache = true
21
-
22
- # Disable Rails's static asset server (Apache or nginx will already do this).
23
- config.serve_static_files = false
24
-
25
- # Compress JavaScripts and CSS.
26
- config.assets.js_compressor = :uglifier
27
- # config.assets.css_compressor = :sass
28
-
29
- # Do not fallback to assets pipeline if a precompiled asset is missed.
30
- config.assets.compile = false
31
-
32
- # Generate digests for assets URLs.
33
- config.assets.digest = true
34
-
35
- # `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb
36
-
37
- # Specifies the header that your server uses for sending files.
38
- # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
39
- # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
40
-
41
- # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
42
- # config.force_ssl = true
43
-
44
- # Set to :debug to see everything in the log.
45
- config.log_level = :info
46
-
47
- # Prepend all log lines with the following tags.
48
- # config.log_tags = [ :subdomain, :uuid ]
49
-
50
- # Use a different logger for distributed setups.
51
- # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
52
-
53
- # Use a different cache store in production.
54
- # config.cache_store = :mem_cache_store
55
-
56
- # Enable serving of images, stylesheets, and JavaScripts from an asset server.
57
- # config.action_controller.asset_host = "http://assets.example.com"
58
-
59
- # Ignore bad email addresses and do not raise email delivery errors.
60
- # Set this to true and configure the email server for immediate delivery to raise delivery errors.
61
- # config.action_mailer.raise_delivery_errors = false
62
-
63
- # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
64
- # the I18n.default_locale when a translation cannot be found).
65
- config.i18n.fallbacks = true
66
-
67
- # Send deprecation notices to registered listeners.
68
- config.active_support.deprecation = :notify
69
-
70
- # Disable automatic flushing of the log to improve performance.
71
- # config.autoflush_log = false
72
-
73
- # Use default logging formatter so that PID and timestamp are not suppressed.
74
- config.log_formatter = ::Logger::Formatter.new
75
-
76
- # Do not dump schema after migrations.
77
- config.active_record.dump_schema_after_migration = false
78
- end
@@ -1,42 +0,0 @@
1
- Rails.application.configure do
2
- # Settings specified here will take precedence over those in config/application.rb.
3
-
4
- # The test environment is used exclusively to run your application's
5
- # test suite. You never need to work with it otherwise. Remember that
6
- # your test database is "scratch space" for the test suite and is wiped
7
- # and recreated between test runs. Don't rely on the data there!
8
- config.cache_classes = true
9
-
10
- # Test order
11
- config.active_support.test_order = :random
12
-
13
- # Do not eager load code on boot. This avoids loading your whole application
14
- # just for the purpose of running a single test. If you are using a tool that
15
- # preloads Rails for running tests, you may have to set it to true.
16
- config.eager_load = false
17
-
18
- # Configure static asset server for tests with Cache-Control for performance.
19
- config.serve_static_files = false
20
- config.static_cache_control = 'public, max-age=3600'
21
-
22
- # Show full error reports and disable caching.
23
- config.consider_all_requests_local = true
24
- config.action_controller.perform_caching = false
25
-
26
- # Raise exceptions instead of rendering exception templates.
27
- config.action_dispatch.show_exceptions = false
28
-
29
- # Disable request forgery protection in test environment.
30
- config.action_controller.allow_forgery_protection = false
31
-
32
- # Tell Action Mailer not to deliver emails to the real world.
33
- # The :test delivery method accumulates sent emails in the
34
- # ActionMailer::Base.deliveries array.
35
- config.action_mailer.delivery_method = :test
36
-
37
- # Print deprecation notices to the stderr.
38
- config.active_support.deprecation = :stderr
39
-
40
- # Raises error for missing translations
41
- # config.action_view.raise_on_missing_translations = true
42
- end
@@ -1,8 +0,0 @@
1
- # Be sure to restart your server when you modify this file.
2
-
3
- # Version of your assets, change this if you want to expire all your assets.
4
- Rails.application.config.assets.version = '1.0'
5
-
6
- # Precompile additional assets.
7
- # application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
8
- # Rails.application.config.assets.precompile += %w( search.js )
@@ -1,7 +0,0 @@
1
- # Be sure to restart your server when you modify this file.
2
-
3
- # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
4
- # Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
5
-
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!
@@ -1,3 +0,0 @@
1
- # Be sure to restart your server when you modify this file.
2
-
3
- Rails.application.config.action_dispatch.cookies_serializer = :json
@@ -1,4 +0,0 @@
1
- # Be sure to restart your server when you modify this file.
2
-
3
- # Configure sensitive parameters which will be filtered from the log file.
4
- Rails.application.config.filter_parameters += [:password]
@@ -1,16 +0,0 @@
1
- # Be sure to restart your server when you modify this file.
2
-
3
- # Add new inflection rules using the following format. Inflections
4
- # are locale specific, and you may define rules for as many different
5
- # locales as you wish. All of these examples are active by default:
6
- # ActiveSupport::Inflector.inflections(:en) do |inflect|
7
- # inflect.plural /^(ox)$/i, '\1en'
8
- # inflect.singular /^(ox)en/i, '\1'
9
- # inflect.irregular 'person', 'people'
10
- # inflect.uncountable %w( fish sheep )
11
- # end
12
-
13
- # These inflection rules are supported but not enabled by default:
14
- # ActiveSupport::Inflector.inflections(:en) do |inflect|
15
- # inflect.acronym 'RESTful'
16
- # end
@@ -1,4 +0,0 @@
1
- # Be sure to restart your server when you modify this file.
2
-
3
- # Add new mime types for use in respond_to blocks:
4
- # Mime::Type.register "text/richtext", :rtf
@@ -1,3 +0,0 @@
1
- # Be sure to restart your server when you modify this file.
2
-
3
- Rails.application.config.session_store :cookie_store, key: '_dummy_session'
@@ -1,14 +0,0 @@
1
- # Be sure to restart your server when you modify this file.
2
-
3
- # This file contains settings for ActionController::ParamsWrapper which
4
- # is enabled by default.
5
-
6
- # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
7
- ActiveSupport.on_load(:action_controller) do
8
- wrap_parameters format: [:json] if respond_to?(:wrap_parameters)
9
- end
10
-
11
- # To enable root element in JSON for ActiveRecord objects.
12
- # ActiveSupport.on_load(:active_record) do
13
- # self.include_root_in_json = true
14
- # end
@@ -1,23 +0,0 @@
1
- # Files in the config/locales directory are used for internationalization
2
- # and are automatically loaded by Rails. If you want to use locales other
3
- # than English, add the necessary files in this directory.
4
- #
5
- # To use the locales, use `I18n.t`:
6
- #
7
- # I18n.t 'hello'
8
- #
9
- # In views, this is aliased to just `t`:
10
- #
11
- # <%= t('hello') %>
12
- #
13
- # To use a different locale, set it with `I18n.locale`:
14
- #
15
- # I18n.locale = :es
16
- #
17
- # This would use the information in config/locales/es.yml.
18
- #
19
- # To learn more, please read the Rails Internationalization guide
20
- # available at http://guides.rubyonrails.org/i18n.html.
21
-
22
- en:
23
- hello: "Hello world"
@@ -1,22 +0,0 @@
1
- # Be sure to restart your server when you modify this file.
2
-
3
- # Your secret key is used for verifying the integrity of signed cookies.
4
- # If you change this key, all old signed cookies will become invalid!
5
-
6
- # Make sure the secret is at least 30 characters and all random,
7
- # no regular words or you'll be exposed to dictionary attacks.
8
- # You can use `rake secret` to generate a secure secret key.
9
-
10
- # Make sure the secrets in this file are kept private
11
- # if you're sharing your code publicly.
12
-
13
- development:
14
- secret_key_base: a8b9a299200d9b4be59fa1f6056731fcf28f0b7faa7a4406fef080628d5940ce69aa644e11e4a8f1413a6b2630232a195db18e2f17ce5cfd5826c761bc4a8a05
15
-
16
- test:
17
- secret_key_base: 7345b677d0e603133055f04b30aff7e2526c5926a58889f11b5af5c0da2bc4396fdb111113ecf6880748b0ae424c3602e72b8ec9c624de81a21169062016bd09
18
-
19
- # Do not keep production secrets in the repository,
20
- # instead read values from the environment.
21
- production:
22
- secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>