user_mgmt 0.0.512 → 0.0.513
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.gitignore +8 -17
- data/Gemfile +12 -2
- data/Gemfile.lock +113 -0
- data/{LICENSE.txt → MIT-LICENSE} +1 -3
- data/Rakefile +35 -0
- data/app/assets/images/user_mgmt/.keep +0 -0
- data/app/assets/javascripts/user_mgmt/application.js +13 -0
- data/app/assets/stylesheets/user_mgmt/application.css +13 -0
- data/app/controllers/user_mgmt/application_controller.rb +4 -0
- data/app/helpers/user_mgmt/application_helper.rb +4 -0
- data/app/views/layouts/user_mgmt/application.html.erb +14 -0
- data/bin/rails +8 -0
- data/config/routes.rb +2 -0
- data/lib/tasks/user_mgmt_tasks.rake +4 -0
- data/lib/user_mgmt/engine.rb +5 -5
- data/lib/user_mgmt/version.rb +1 -1
- data/lib/user_mgmt.rb +11 -11
- data/spec/spec_helper.rb +1 -0
- data/test/dummy/README.rdoc +28 -0
- data/test/dummy/Rakefile +6 -0
- data/test/dummy/app/assets/images/.keep +0 -0
- data/test/dummy/app/assets/javascripts/application.js +13 -0
- data/test/dummy/app/assets/stylesheets/application.css +13 -0
- data/test/dummy/app/controllers/application_controller.rb +5 -0
- data/test/dummy/app/controllers/concerns/.keep +0 -0
- data/test/dummy/app/helpers/application_helper.rb +2 -0
- data/test/dummy/app/mailers/.keep +0 -0
- data/test/dummy/app/models/.keep +0 -0
- data/test/dummy/app/models/concerns/.keep +0 -0
- data/test/dummy/app/views/layouts/application.html.erb +14 -0
- data/test/dummy/bin/bundle +3 -0
- data/test/dummy/bin/rails +4 -0
- data/test/dummy/bin/rake +4 -0
- data/test/dummy/config/application.rb +23 -0
- data/test/dummy/config/boot.rb +5 -0
- data/test/dummy/config/database.yml +25 -0
- data/test/dummy/config/environment.rb +5 -0
- data/test/dummy/config/environments/development.rb +29 -0
- data/test/dummy/config/environments/production.rb +80 -0
- data/test/dummy/config/environments/test.rb +36 -0
- data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
- data/test/dummy/config/initializers/inflections.rb +16 -0
- data/test/dummy/config/initializers/mime_types.rb +5 -0
- data/test/dummy/config/initializers/secret_token.rb +12 -0
- data/test/dummy/config/initializers/session_store.rb +3 -0
- data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/test/dummy/config/locales/en.yml +23 -0
- data/test/dummy/config/routes.rb +4 -0
- data/test/dummy/config.ru +4 -0
- data/test/dummy/lib/assets/.keep +0 -0
- data/test/dummy/log/.keep +0 -0
- data/test/dummy/public/404.html +58 -0
- data/test/dummy/public/422.html +58 -0
- data/test/dummy/public/500.html +57 -0
- data/test/dummy/public/favicon.ico +0 -0
- data/test/integration/navigation_test.rb +10 -0
- data/test/test_helper.rb +15 -0
- data/test/user_mgmt_test.rb +7 -0
- data/user_mgmt.gemspec +31 -24
- metadata +111 -13
- data/app/controllers/user_mgmt/registrations_controller.rb +0 -13
- data/app/controllers/user_mgmt_controller.rb +0 -4
- data/app/views/user_mgmt/registrations/_user_form.html.haml +0 -18
- data/app/views/user_mgmt/registrations/new.html.haml +0 -7
- data/lib/user_mgmt/configurator.rb +0 -8
- data/lib/user_mgmt/controllers/url_helpers.rb +0 -67
@@ -1,67 +0,0 @@
|
|
1
|
-
module UserMgmt
|
2
|
-
module Controllers
|
3
|
-
# Create url helpers to be used with resource/scope configuration. Acts as
|
4
|
-
# proxies to the generated routes created by devise.
|
5
|
-
# Resource param can be a string or symbol, a class, or an instance object.
|
6
|
-
# Example using a :user resource:
|
7
|
-
#
|
8
|
-
# new_session_path(:user) => new_user_session_path
|
9
|
-
# session_path(:user) => user_session_path
|
10
|
-
# destroy_session_path(:user) => destroy_user_session_path
|
11
|
-
#
|
12
|
-
# new_password_path(:user) => new_user_password_path
|
13
|
-
# password_path(:user) => user_password_path
|
14
|
-
# edit_password_path(:user) => edit_user_password_path
|
15
|
-
#
|
16
|
-
# new_confirmation_path(:user) => new_user_confirmation_path
|
17
|
-
# confirmation_path(:user) => user_confirmation_path
|
18
|
-
#
|
19
|
-
# Those helpers are included by default to ActionController::Base.
|
20
|
-
#
|
21
|
-
# In case you want to add such helpers to another class, you can do
|
22
|
-
# that as long as this new class includes both url_helpers and
|
23
|
-
# mounted_helpers. Example:
|
24
|
-
#
|
25
|
-
# include Rails.application.routes.url_helpers
|
26
|
-
# include Rails.application.routes.mounted_helpers
|
27
|
-
#
|
28
|
-
# module UrlHelpers
|
29
|
-
# def self.remove_helpers!
|
30
|
-
# self.instance_methods.map(&:to_s).grep(/_(url|path)$/).each do |method|
|
31
|
-
# remove_method method
|
32
|
-
# end
|
33
|
-
# end
|
34
|
-
|
35
|
-
# def self.generate_helpers!(routes=nil)
|
36
|
-
# routes ||= begin
|
37
|
-
# mappings = Devise.mappings.values.map(&:used_helpers).flatten.uniq
|
38
|
-
# Devise::URL_HELPERS.slice(*mappings)
|
39
|
-
# end
|
40
|
-
|
41
|
-
# routes.each do |module_name, actions|
|
42
|
-
# [:path, :url].each do |path_or_url|
|
43
|
-
# actions.each do |action|
|
44
|
-
# action = action ? "#{action}_" : ""
|
45
|
-
# method = "#{action}#{module_name}_#{path_or_url}"
|
46
|
-
|
47
|
-
# class_eval <<-URL_HELPERS, __FILE__, __LINE__ + 1
|
48
|
-
# def #{method}(resource_or_scope, *args)
|
49
|
-
# scope = Devise::Mapping.find_scope!(resource_or_scope)
|
50
|
-
# _devise_route_context.send("#{action}\#{scope}_#{module_name}_#{path_or_url}", *args)
|
51
|
-
# end
|
52
|
-
# URL_HELPERS
|
53
|
-
# end
|
54
|
-
# end
|
55
|
-
# end
|
56
|
-
# end
|
57
|
-
|
58
|
-
# generate_helpers!(Devise::URL_HELPERS)
|
59
|
-
|
60
|
-
# private
|
61
|
-
|
62
|
-
# def _devise_route_context
|
63
|
-
# @_devise_route_context ||= send(Devise.available_router_name)
|
64
|
-
# end
|
65
|
-
# end
|
66
|
-
end
|
67
|
-
end
|