bpluser 0.0.26 → 0.1.12

Sign up to get free protection for your applications and to get access to all the features.
Files changed (119) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +70 -0
  3. data/Gemfile +19 -0
  4. data/Rakefile +6 -7
  5. data/app/controllers/bpluser/api_controller.rb +2 -3
  6. data/app/controllers/bpluser/users/omniauth_callbacks_controller.rb +1 -5
  7. data/app/controllers/bpluser/users/registrations_controller.rb +3 -3
  8. data/app/models/bpluser/ability.rb +2 -2
  9. data/app/models/bpluser/application_record.rb +5 -0
  10. data/app/models/bpluser/concerns/users.rb +190 -0
  11. data/app/models/bpluser/concerns/validatable.rb +47 -0
  12. data/app/models/bpluser/folder.rb +4 -6
  13. data/app/models/bpluser/folder_item.rb +3 -3
  14. data/app/models/bpluser/user_institution.rb +3 -3
  15. data/bin/rails +13 -0
  16. data/bin/rspec +29 -0
  17. data/bpluser.gemspec +38 -0
  18. data/lib/bpluser/engine.rb +1 -0
  19. data/lib/bpluser/version.rb +1 -1
  20. data/lib/bpluser.rb +12 -2
  21. data/lib/generators/bpluser/templates/models/user.rb +2 -6
  22. data/lib/tasks/bpluser_tasks.rake +1 -1
  23. data/spec/dummy/.ruby-version +1 -0
  24. data/{test → spec}/dummy/Rakefile +2 -3
  25. data/spec/dummy/app/assets/config/manifest.js +4 -0
  26. data/{app/controllers/bpluser/registrations_controller.rb → spec/dummy/app/assets/images/.keep} +0 -0
  27. data/spec/dummy/app/assets/javascripts/application.js +15 -0
  28. data/spec/dummy/app/assets/javascripts/cable.js +13 -0
  29. data/{test/dummy/public/favicon.ico → spec/dummy/app/assets/javascripts/channels/.keep} +0 -0
  30. data/spec/dummy/app/assets/stylesheets/application.css +15 -0
  31. data/spec/dummy/app/channels/application_cable/channel.rb +4 -0
  32. data/spec/dummy/app/channels/application_cable/connection.rb +4 -0
  33. data/{test → spec}/dummy/app/controllers/application_controller.rb +0 -1
  34. data/spec/dummy/app/controllers/concerns/.keep +0 -0
  35. data/{test → spec}/dummy/app/helpers/application_helper.rb +0 -0
  36. data/spec/dummy/app/jobs/application_job.rb +2 -0
  37. data/spec/dummy/app/mailers/application_mailer.rb +4 -0
  38. data/spec/dummy/app/models/application_record.rb +3 -0
  39. data/spec/dummy/app/models/concerns/.keep +0 -0
  40. data/spec/dummy/app/models/user.rb +3 -0
  41. data/spec/dummy/app/views/layouts/application.html.erb +15 -0
  42. data/spec/dummy/app/views/layouts/mailer.html.erb +13 -0
  43. data/spec/dummy/app/views/layouts/mailer.text.erb +1 -0
  44. data/spec/dummy/bin/bundle +3 -0
  45. data/spec/dummy/bin/rails +4 -0
  46. data/spec/dummy/bin/rake +4 -0
  47. data/spec/dummy/bin/setup +36 -0
  48. data/spec/dummy/bin/update +31 -0
  49. data/spec/dummy/bin/yarn +11 -0
  50. data/spec/dummy/config/application.rb +29 -0
  51. data/spec/dummy/config/boot.rb +5 -0
  52. data/spec/dummy/config/cable.yml +10 -0
  53. data/spec/dummy/config/environment.rb +5 -0
  54. data/spec/dummy/config/environments/development.rb +61 -0
  55. data/spec/dummy/config/environments/production.rb +94 -0
  56. data/spec/dummy/config/environments/test.rb +46 -0
  57. data/spec/dummy/config/initializers/application_controller_renderer.rb +8 -0
  58. data/spec/dummy/config/initializers/assets.rb +14 -0
  59. data/{test → spec}/dummy/config/initializers/backtrace_silencers.rb +0 -0
  60. data/spec/dummy/config/initializers/content_security_policy.rb +25 -0
  61. data/spec/dummy/config/initializers/cookies_serializer.rb +5 -0
  62. data/spec/dummy/config/initializers/devise.rb +290 -0
  63. data/spec/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  64. data/{test → spec}/dummy/config/initializers/inflections.rb +6 -5
  65. data/{test → spec}/dummy/config/initializers/mime_types.rb +0 -1
  66. data/{test → spec}/dummy/config/initializers/wrap_parameters.rb +5 -5
  67. data/spec/dummy/config/locales/devise.en.yml +64 -0
  68. data/spec/dummy/config/locales/en.yml +33 -0
  69. data/spec/dummy/config/puma.rb +34 -0
  70. data/{test → spec}/dummy/config/routes.rb +0 -1
  71. data/spec/dummy/config/spring.rb +6 -0
  72. data/spec/dummy/config/storage.yml +34 -0
  73. data/spec/dummy/config.ru +5 -0
  74. data/spec/dummy/db/migrate/20181231191301_create_users.rb +41 -0
  75. data/spec/dummy/db/schema.rb +39 -0
  76. data/spec/dummy/lib/assets/.keep +0 -0
  77. data/spec/dummy/log/.keep +0 -0
  78. data/spec/dummy/package.json +5 -0
  79. data/spec/dummy/public/404.html +67 -0
  80. data/spec/dummy/public/422.html +67 -0
  81. data/spec/dummy/public/500.html +66 -0
  82. data/spec/dummy/public/apple-touch-icon-precomposed.png +0 -0
  83. data/spec/dummy/public/apple-touch-icon.png +0 -0
  84. data/spec/dummy/public/favicon.ico +0 -0
  85. data/spec/dummy/spec/models/user_spec.rb +5 -0
  86. data/spec/dummy/storage/.keep +0 -0
  87. data/spec/dummy/tmp/.keep +0 -0
  88. data/spec/dummy/tmp/storage/.keep +0 -0
  89. data/spec/rails_helper.rb +61 -0
  90. data/spec/spec_helper.rb +96 -0
  91. metadata +290 -95
  92. data/app/assets/javascripts/bpluser/application.js +0 -15
  93. data/app/assets/stylesheets/bpluser/application.css +0 -13
  94. data/app/controllers/bpluser/application_controller.rb +0 -4
  95. data/app/helpers/bpluser/application_helper.rb +0 -4
  96. data/app/models/bpluser/user.rb +0 -213
  97. data/app/models/bpluser/validatable.rb +0 -63
  98. data/app/views/layouts/bpluser/application.html.erb +0 -14
  99. data/test/bpluser_test.rb +0 -7
  100. data/test/dummy/README.rdoc +0 -261
  101. data/test/dummy/app/assets/javascripts/application.js +0 -15
  102. data/test/dummy/app/assets/stylesheets/application.css +0 -13
  103. data/test/dummy/app/views/layouts/application.html.erb +0 -14
  104. data/test/dummy/config/application.rb +0 -59
  105. data/test/dummy/config/boot.rb +0 -10
  106. data/test/dummy/config/environment.rb +0 -5
  107. data/test/dummy/config/environments/development.rb +0 -37
  108. data/test/dummy/config/environments/production.rb +0 -67
  109. data/test/dummy/config/environments/test.rb +0 -37
  110. data/test/dummy/config/initializers/secret_token.rb +0 -7
  111. data/test/dummy/config/initializers/session_store.rb +0 -8
  112. data/test/dummy/config/locales/en.yml +0 -5
  113. data/test/dummy/config.ru +0 -4
  114. data/test/dummy/public/404.html +0 -26
  115. data/test/dummy/public/422.html +0 -26
  116. data/test/dummy/public/500.html +0 -25
  117. data/test/dummy/script/rails +0 -6
  118. data/test/integration/navigation_test.rb +0 -10
  119. data/test/test_helper.rb +0 -15
@@ -1,37 +0,0 @@
1
- Dummy::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
- # Log error messages when you accidentally call methods on nil.
10
- config.whiny_nils = true
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
- # Only use best-standards-support built into browsers
23
- config.action_dispatch.best_standards_support = :builtin
24
-
25
- # Raise exception on mass assignment protection for Active Record models
26
- config.active_record.mass_assignment_sanitizer = :strict
27
-
28
- # Log the query plan for queries taking more than this (works
29
- # with SQLite, MySQL, and PostgreSQL)
30
- config.active_record.auto_explain_threshold_in_seconds = 0.5
31
-
32
- # Do not compress assets
33
- config.assets.compress = false
34
-
35
- # Expands the lines which load the assets
36
- config.assets.debug = true
37
- end
@@ -1,67 +0,0 @@
1
- Dummy::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
- # Full error reports are disabled and caching is turned on
8
- config.consider_all_requests_local = false
9
- config.action_controller.perform_caching = true
10
-
11
- # Disable Rails's static asset server (Apache or nginx will already do this)
12
- config.serve_static_assets = false
13
-
14
- # Compress JavaScripts and CSS
15
- config.assets.compress = true
16
-
17
- # Don't fallback to assets pipeline if a precompiled asset is missed
18
- config.assets.compile = false
19
-
20
- # Generate digests for assets URLs
21
- config.assets.digest = true
22
-
23
- # Defaults to nil and saved in location specified by config.assets.prefix
24
- # config.assets.manifest = YOUR_PATH
25
-
26
- # Specifies the header that your server uses for sending files
27
- # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
28
- # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
29
-
30
- # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
31
- # config.force_ssl = true
32
-
33
- # See everything in the log (default is :info)
34
- # config.log_level = :debug
35
-
36
- # Prepend all log lines with the following tags
37
- # config.log_tags = [ :subdomain, :uuid ]
38
-
39
- # Use a different logger for distributed setups
40
- # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
41
-
42
- # Use a different cache store in production
43
- # config.cache_store = :mem_cache_store
44
-
45
- # Enable serving of images, stylesheets, and JavaScripts from an asset server
46
- # config.action_controller.asset_host = "http://assets.example.com"
47
-
48
- # Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added)
49
- # config.assets.precompile += %w( search.js )
50
-
51
- # Disable delivery errors, bad email addresses will be ignored
52
- # config.action_mailer.raise_delivery_errors = false
53
-
54
- # Enable threaded mode
55
- # config.threadsafe!
56
-
57
- # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
58
- # the I18n.default_locale when a translation can not be found)
59
- config.i18n.fallbacks = true
60
-
61
- # Send deprecation notices to registered listeners
62
- config.active_support.deprecation = :notify
63
-
64
- # Log the query plan for queries taking more than this (works
65
- # with SQLite, MySQL, and PostgreSQL)
66
- # config.active_record.auto_explain_threshold_in_seconds = 0.5
67
- end
@@ -1,37 +0,0 @@
1
- Dummy::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
- # Configure static asset server for tests with Cache-Control for performance
11
- config.serve_static_assets = true
12
- config.static_cache_control = "public, max-age=3600"
13
-
14
- # Log error messages when you accidentally call methods on nil
15
- config.whiny_nils = true
16
-
17
- # Show full error reports and disable caching
18
- config.consider_all_requests_local = true
19
- config.action_controller.perform_caching = false
20
-
21
- # Raise exceptions instead of rendering exception templates
22
- config.action_dispatch.show_exceptions = false
23
-
24
- # Disable request forgery protection in test environment
25
- config.action_controller.allow_forgery_protection = false
26
-
27
- # Tell Action Mailer not to deliver emails to the real world.
28
- # The :test delivery method accumulates sent emails in the
29
- # ActionMailer::Base.deliveries array.
30
- config.action_mailer.delivery_method = :test
31
-
32
- # Raise exception on mass assignment protection for Active Record models
33
- config.active_record.mass_assignment_sanitizer = :strict
34
-
35
- # Print deprecation notices to the stderr
36
- config.active_support.deprecation = :stderr
37
- end
@@ -1,7 +0,0 @@
1
- # Be sure to restart your server when you modify this file.
2
-
3
- # Your secret key for verifying the integrity of signed cookies.
4
- # If you change this key, all old signed cookies will become invalid!
5
- # Make sure the secret is at least 30 characters and all random,
6
- # no regular words or you'll be exposed to dictionary attacks.
7
- Dummy::Application.config.secret_token = '89abebde949ef66ecd892c4fe93a942369b4b969f2053b14d11487a24da20fa5cc5b48ff53a0302fc44a99b2f933ad885ef7f3ac0fd04202a5ce65b1d25abef1'
@@ -1,8 +0,0 @@
1
- # Be sure to restart your server when you modify this file.
2
-
3
- Dummy::Application.config.session_store :cookie_store, key: '_dummy_session'
4
-
5
- # Use the database for sessions instead of the cookie-based default,
6
- # which shouldn't be used to store highly confidential information
7
- # (create the session table with "rails generate session_migration")
8
- # Dummy::Application.config.session_store :active_record_store
@@ -1,5 +0,0 @@
1
- # Sample localization file for English. Add more files in this directory for other locales.
2
- # See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
3
-
4
- en:
5
- hello: "Hello world"
data/test/dummy/config.ru DELETED
@@ -1,4 +0,0 @@
1
- # This file is used by Rack-based servers to start the application.
2
-
3
- require ::File.expand_path('../config/environment', __FILE__)
4
- run Dummy::Application
@@ -1,26 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <title>The page you were looking for doesn't exist (404)</title>
5
- <style type="text/css">
6
- body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
7
- div.dialog {
8
- width: 25em;
9
- padding: 0 4em;
10
- margin: 4em auto 0 auto;
11
- border: 1px solid #ccc;
12
- border-right-color: #999;
13
- border-bottom-color: #999;
14
- }
15
- h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
16
- </style>
17
- </head>
18
-
19
- <body>
20
- <!-- This file lives in public/404.html -->
21
- <div class="dialog">
22
- <h1>The page you were looking for doesn't exist.</h1>
23
- <p>You may have mistyped the address or the page may have moved.</p>
24
- </div>
25
- </body>
26
- </html>
@@ -1,26 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <title>The change you wanted was rejected (422)</title>
5
- <style type="text/css">
6
- body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
7
- div.dialog {
8
- width: 25em;
9
- padding: 0 4em;
10
- margin: 4em auto 0 auto;
11
- border: 1px solid #ccc;
12
- border-right-color: #999;
13
- border-bottom-color: #999;
14
- }
15
- h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
16
- </style>
17
- </head>
18
-
19
- <body>
20
- <!-- This file lives in public/422.html -->
21
- <div class="dialog">
22
- <h1>The change you wanted was rejected.</h1>
23
- <p>Maybe you tried to change something you didn't have access to.</p>
24
- </div>
25
- </body>
26
- </html>
@@ -1,25 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <title>We're sorry, but something went wrong (500)</title>
5
- <style type="text/css">
6
- body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
7
- div.dialog {
8
- width: 25em;
9
- padding: 0 4em;
10
- margin: 4em auto 0 auto;
11
- border: 1px solid #ccc;
12
- border-right-color: #999;
13
- border-bottom-color: #999;
14
- }
15
- h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
16
- </style>
17
- </head>
18
-
19
- <body>
20
- <!-- This file lives in public/500.html -->
21
- <div class="dialog">
22
- <h1>We're sorry, but something went wrong.</h1>
23
- </div>
24
- </body>
25
- </html>
@@ -1,6 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
3
-
4
- APP_PATH = File.expand_path('../../config/application', __FILE__)
5
- require File.expand_path('../../config/boot', __FILE__)
6
- require 'rails/commands'
@@ -1,10 +0,0 @@
1
- require 'test_helper'
2
-
3
- class NavigationTest < ActionDispatch::IntegrationTest
4
- fixtures :all
5
-
6
- # test "the truth" do
7
- # assert true
8
- # end
9
- end
10
-
data/test/test_helper.rb DELETED
@@ -1,15 +0,0 @@
1
- # Configure Rails Environment
2
- ENV["RAILS_ENV"] = "test"
3
-
4
- require File.expand_path("../dummy/config/environment.rb", __FILE__)
5
- require "rails/test_help"
6
-
7
- Rails.backtrace_cleaner.remove_silencers!
8
-
9
- # Load support files
10
- Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
11
-
12
- # Load fixtures from the engine
13
- if ActiveSupport::TestCase.method_defined?(:fixture_path=)
14
- ActiveSupport::TestCase.fixture_path = File.expand_path("../fixtures", __FILE__)
15
- end