mcms_authentication 0.0.2

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.
Files changed (106) hide show
  1. data/MIT-LICENSE +20 -0
  2. data/README.rdoc +17 -0
  3. data/Rakefile +40 -0
  4. data/app/assets/images/background/page_bg.png +0 -0
  5. data/app/assets/images/background/text_field_background.png +0 -0
  6. data/app/assets/images/icons/accept.png +0 -0
  7. data/app/assets/images/icons/add.png +0 -0
  8. data/app/assets/images/icons/application_edit.png +0 -0
  9. data/app/assets/images/icons/cancel.png +0 -0
  10. data/app/assets/images/icons/delete.png +0 -0
  11. data/app/assets/images/icons/email_go.png +0 -0
  12. data/app/assets/images/rails.png +0 -0
  13. data/app/assets/javascripts/application.js +42 -0
  14. data/app/assets/javascripts/authentication_global.js +17 -0
  15. data/app/assets/stylesheets/application.css +33 -0
  16. data/app/assets/stylesheets/authentication_global.css +424 -0
  17. data/app/controllers/application_controller.rb +36 -0
  18. data/app/controllers/home_controller.rb +44 -0
  19. data/app/controllers/roles_controller.rb +375 -0
  20. data/app/controllers/users_controller.rb +202 -0
  21. data/app/models/ability.rb +82 -0
  22. data/app/models/existing_model.rb +24 -0
  23. data/app/models/plugin.rb +30 -0
  24. data/app/models/role.rb +70 -0
  25. data/app/models/roles_user.rb +33 -0
  26. data/app/models/user.rb +90 -0
  27. data/app/views/home/index.html.erb +18 -0
  28. data/app/views/layouts/users/_javascript.html.erb +3 -0
  29. data/app/views/layouts/users/_stylesheet.html.erb +3 -0
  30. data/app/views/layouts/users/devise.html.erb +40 -0
  31. data/app/views/layouts/users/home.html.erb +99 -0
  32. data/app/views/roles/_form.html.erb +240 -0
  33. data/app/views/roles/_form.js.erb +113 -0
  34. data/app/views/roles/edit.html.erb +26 -0
  35. data/app/views/roles/index.html.erb +73 -0
  36. data/app/views/roles/new.html.erb +25 -0
  37. data/app/views/users/_role.js.erb +47 -0
  38. data/app/views/users/confirmations/new.html.erb +29 -0
  39. data/app/views/users/edit.html.erb +131 -0
  40. data/app/views/users/index.html.erb +81 -0
  41. data/app/views/users/mailer/confirmation_instructions.html.erb +22 -0
  42. data/app/views/users/mailer/reset_password_instructions.html.erb +26 -0
  43. data/app/views/users/mailer/unlock_instructions.html.erb +24 -0
  44. data/app/views/users/new.html.erb +113 -0
  45. data/app/views/users/passwords/edit.html.erb +38 -0
  46. data/app/views/users/passwords/new.html.erb +32 -0
  47. data/app/views/users/sessions/new.html.erb +84 -0
  48. data/app/views/users/shared/_links.erb +39 -0
  49. data/app/views/users/unlocks/new.html.erb +25 -0
  50. data/config/initializers/constants.rb +30 -0
  51. data/config/initializers/devise.rb +217 -0
  52. data/config/locales/devise.en.yml +57 -0
  53. data/config/locales/en.yml +10 -0
  54. data/config/routes.rb +24 -0
  55. data/db/migrate/20120605112804_devise_create_users.rb +68 -0
  56. data/db/migrate/20120608104637_create_roles.rb +30 -0
  57. data/db/migrate/20120608140424_create_roles_users.rb +25 -0
  58. data/db/migrate/20120612050932_create_plugins.rb +14 -0
  59. data/db/migrate/20120625114340_create_existing_models.rb +9 -0
  60. data/db/migrate/20120711064709_add_username_to_users.rb +9 -0
  61. data/db/seeds.rb +29 -0
  62. data/lib/generators/mcms_authentication/USAGE +8 -0
  63. data/lib/generators/mcms_authentication/mcms_authentication_generator.rb +110 -0
  64. data/lib/generators/mcms_authentication/templates/asset_manager.rb +117 -0
  65. data/lib/generators/mcms_authentication/templates/models.rb +189 -0
  66. data/lib/mcms_authentication.rb +4 -0
  67. data/lib/mcms_authentication/engine.rb +20 -0
  68. data/lib/mcms_authentication/seeds.rb +14 -0
  69. data/lib/mcms_authentication/version.rb +3 -0
  70. data/lib/tasks/mcms_authentication_tasks.rake +4 -0
  71. data/test/dummy/README.rdoc +261 -0
  72. data/test/dummy/Rakefile +7 -0
  73. data/test/dummy/app/assets/javascripts/application.js +15 -0
  74. data/test/dummy/app/assets/stylesheets/application.css +13 -0
  75. data/test/dummy/app/controllers/application_controller.rb +3 -0
  76. data/test/dummy/app/helpers/application_helper.rb +2 -0
  77. data/test/dummy/app/views/layouts/application.html.erb +14 -0
  78. data/test/dummy/config.ru +4 -0
  79. data/test/dummy/config/application.rb +59 -0
  80. data/test/dummy/config/boot.rb +10 -0
  81. data/test/dummy/config/database.yml +25 -0
  82. data/test/dummy/config/environment.rb +5 -0
  83. data/test/dummy/config/environments/development.rb +37 -0
  84. data/test/dummy/config/environments/production.rb +67 -0
  85. data/test/dummy/config/environments/test.rb +37 -0
  86. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  87. data/test/dummy/config/initializers/inflections.rb +15 -0
  88. data/test/dummy/config/initializers/mime_types.rb +5 -0
  89. data/test/dummy/config/initializers/secret_token.rb +7 -0
  90. data/test/dummy/config/initializers/session_store.rb +8 -0
  91. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  92. data/test/dummy/config/locales/en.yml +5 -0
  93. data/test/dummy/config/routes.rb +58 -0
  94. data/test/dummy/public/404.html +26 -0
  95. data/test/dummy/public/422.html +26 -0
  96. data/test/dummy/public/500.html +25 -0
  97. data/test/dummy/public/favicon.ico +0 -0
  98. data/test/dummy/script/rails +6 -0
  99. data/test/fixtures/existing_models.yml +11 -0
  100. data/test/functional/home_controller_test.rb +7 -0
  101. data/test/integration/navigation_test.rb +10 -0
  102. data/test/mcms_authentication_test.rb +7 -0
  103. data/test/test_helper.rb +15 -0
  104. data/test/unit/existing_model_test.rb +7 -0
  105. data/test/unit/helpers/home_helper_test.rb +4 -0
  106. metadata +234 -0
@@ -0,0 +1,26 @@
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>
@@ -0,0 +1,26 @@
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>
@@ -0,0 +1,25 @@
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>
File without changes
@@ -0,0 +1,6 @@
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'
@@ -0,0 +1,11 @@
1
+ # Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
2
+
3
+ # This model initially had no columns defined. If you add columns to the
4
+ # model remove the '{}' from the fixture names and add the columns immediately
5
+ # below each fixture, per the syntax in the comments below
6
+ #
7
+ one: {}
8
+ # column: value
9
+ #
10
+ two: {}
11
+ # column: value
@@ -0,0 +1,7 @@
1
+ require 'test_helper'
2
+
3
+ class HomeControllerTest < ActionController::TestCase
4
+ # test "the truth" do
5
+ # assert true
6
+ # end
7
+ end
@@ -0,0 +1,10 @@
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
+
@@ -0,0 +1,7 @@
1
+ require 'test_helper'
2
+
3
+ class McmsAuthenticationTest < ActiveSupport::TestCase
4
+ test "truth" do
5
+ assert_kind_of Module, McmsAuthentication
6
+ end
7
+ end
@@ -0,0 +1,15 @@
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
@@ -0,0 +1,7 @@
1
+ require 'test_helper'
2
+
3
+ class ExistingModelTest < ActiveSupport::TestCase
4
+ # test "the truth" do
5
+ # assert true
6
+ # end
7
+ end
@@ -0,0 +1,4 @@
1
+ require 'test_helper'
2
+
3
+ class HomeHelperTest < ActionView::TestCase
4
+ end
metadata ADDED
@@ -0,0 +1,234 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: mcms_authentication
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.2
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - INDRANIL MUKHERJEE
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2012-07-11 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: rails
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: '0'
30
+ - !ruby/object:Gem::Dependency
31
+ name: devise
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - ! '>='
36
+ - !ruby/object:Gem::Version
37
+ version: '0'
38
+ type: :runtime
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: '0'
46
+ - !ruby/object:Gem::Dependency
47
+ name: cancan
48
+ requirement: !ruby/object:Gem::Requirement
49
+ none: false
50
+ requirements:
51
+ - - ! '>='
52
+ - !ruby/object:Gem::Version
53
+ version: '0'
54
+ type: :runtime
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ description: It's a combination of devise and CanCan gem and flexible to identify
63
+ your modules
64
+ email:
65
+ - indranil.since87@gmail.com
66
+ executables: []
67
+ extensions: []
68
+ extra_rdoc_files: []
69
+ files:
70
+ - app/views/home/index.html.erb
71
+ - app/views/layouts/users/_javascript.html.erb
72
+ - app/views/layouts/users/home.html.erb
73
+ - app/views/layouts/users/_stylesheet.html.erb
74
+ - app/views/layouts/users/devise.html.erb
75
+ - app/views/roles/new.html.erb
76
+ - app/views/roles/_form.js.erb
77
+ - app/views/roles/edit.html.erb
78
+ - app/views/roles/_form.html.erb
79
+ - app/views/roles/index.html.erb
80
+ - app/views/users/sessions/new.html.erb
81
+ - app/views/users/mailer/confirmation_instructions.html.erb
82
+ - app/views/users/mailer/unlock_instructions.html.erb
83
+ - app/views/users/mailer/reset_password_instructions.html.erb
84
+ - app/views/users/new.html.erb
85
+ - app/views/users/shared/_links.erb
86
+ - app/views/users/unlocks/new.html.erb
87
+ - app/views/users/edit.html.erb
88
+ - app/views/users/passwords/new.html.erb
89
+ - app/views/users/passwords/edit.html.erb
90
+ - app/views/users/index.html.erb
91
+ - app/views/users/_role.js.erb
92
+ - app/views/users/confirmations/new.html.erb
93
+ - app/assets/images/rails.png
94
+ - app/assets/images/background/page_bg.png
95
+ - app/assets/images/background/text_field_background.png
96
+ - app/assets/images/icons/delete.png
97
+ - app/assets/images/icons/cancel.png
98
+ - app/assets/images/icons/accept.png
99
+ - app/assets/images/icons/application_edit.png
100
+ - app/assets/images/icons/email_go.png
101
+ - app/assets/images/icons/add.png
102
+ - app/assets/javascripts/application.js
103
+ - app/assets/javascripts/authentication_global.js
104
+ - app/assets/stylesheets/application.css
105
+ - app/assets/stylesheets/authentication_global.css
106
+ - app/models/ability.rb
107
+ - app/models/existing_model.rb
108
+ - app/models/roles_user.rb
109
+ - app/models/plugin.rb
110
+ - app/models/user.rb
111
+ - app/models/role.rb
112
+ - app/controllers/home_controller.rb
113
+ - app/controllers/users_controller.rb
114
+ - app/controllers/roles_controller.rb
115
+ - app/controllers/application_controller.rb
116
+ - config/routes.rb
117
+ - config/locales/en.yml
118
+ - config/locales/devise.en.yml
119
+ - config/initializers/devise.rb
120
+ - config/initializers/constants.rb
121
+ - db/migrate/20120711064709_add_username_to_users.rb
122
+ - db/migrate/20120605112804_devise_create_users.rb
123
+ - db/migrate/20120625114340_create_existing_models.rb
124
+ - db/migrate/20120612050932_create_plugins.rb
125
+ - db/migrate/20120608104637_create_roles.rb
126
+ - db/migrate/20120608140424_create_roles_users.rb
127
+ - db/seeds.rb
128
+ - lib/mcms_authentication/engine.rb
129
+ - lib/mcms_authentication/version.rb
130
+ - lib/mcms_authentication/seeds.rb
131
+ - lib/tasks/mcms_authentication_tasks.rake
132
+ - lib/mcms_authentication.rb
133
+ - lib/generators/mcms_authentication/templates/models.rb
134
+ - lib/generators/mcms_authentication/templates/asset_manager.rb
135
+ - lib/generators/mcms_authentication/mcms_authentication_generator.rb
136
+ - lib/generators/mcms_authentication/USAGE
137
+ - MIT-LICENSE
138
+ - Rakefile
139
+ - README.rdoc
140
+ - test/integration/navigation_test.rb
141
+ - test/mcms_authentication_test.rb
142
+ - test/fixtures/existing_models.yml
143
+ - test/functional/home_controller_test.rb
144
+ - test/dummy/Rakefile
145
+ - test/dummy/script/rails
146
+ - test/dummy/app/views/layouts/application.html.erb
147
+ - test/dummy/app/assets/javascripts/application.js
148
+ - test/dummy/app/assets/stylesheets/application.css
149
+ - test/dummy/app/controllers/application_controller.rb
150
+ - test/dummy/app/helpers/application_helper.rb
151
+ - test/dummy/public/404.html
152
+ - test/dummy/public/422.html
153
+ - test/dummy/public/500.html
154
+ - test/dummy/public/favicon.ico
155
+ - test/dummy/config/environment.rb
156
+ - test/dummy/config/routes.rb
157
+ - test/dummy/config/database.yml
158
+ - test/dummy/config/application.rb
159
+ - test/dummy/config/environments/development.rb
160
+ - test/dummy/config/environments/test.rb
161
+ - test/dummy/config/environments/production.rb
162
+ - test/dummy/config/locales/en.yml
163
+ - test/dummy/config/initializers/session_store.rb
164
+ - test/dummy/config/initializers/secret_token.rb
165
+ - test/dummy/config/initializers/wrap_parameters.rb
166
+ - test/dummy/config/initializers/inflections.rb
167
+ - test/dummy/config/initializers/mime_types.rb
168
+ - test/dummy/config/initializers/backtrace_silencers.rb
169
+ - test/dummy/config/boot.rb
170
+ - test/dummy/README.rdoc
171
+ - test/dummy/config.ru
172
+ - test/unit/helpers/home_helper_test.rb
173
+ - test/unit/existing_model_test.rb
174
+ - test/test_helper.rb
175
+ homepage: https://192.168.10.251/svn/SVNHOME/mcms/trunk/mcms_authentication
176
+ licenses: []
177
+ post_install_message:
178
+ rdoc_options: []
179
+ require_paths:
180
+ - lib
181
+ required_ruby_version: !ruby/object:Gem::Requirement
182
+ none: false
183
+ requirements:
184
+ - - ! '>='
185
+ - !ruby/object:Gem::Version
186
+ version: '0'
187
+ required_rubygems_version: !ruby/object:Gem::Requirement
188
+ none: false
189
+ requirements:
190
+ - - ! '>='
191
+ - !ruby/object:Gem::Version
192
+ version: '0'
193
+ requirements: []
194
+ rubyforge_project:
195
+ rubygems_version: 1.8.24
196
+ signing_key:
197
+ specification_version: 3
198
+ summary: Most flexible authentication and authorization solution
199
+ test_files:
200
+ - test/integration/navigation_test.rb
201
+ - test/mcms_authentication_test.rb
202
+ - test/fixtures/existing_models.yml
203
+ - test/functional/home_controller_test.rb
204
+ - test/dummy/Rakefile
205
+ - test/dummy/script/rails
206
+ - test/dummy/app/views/layouts/application.html.erb
207
+ - test/dummy/app/assets/javascripts/application.js
208
+ - test/dummy/app/assets/stylesheets/application.css
209
+ - test/dummy/app/controllers/application_controller.rb
210
+ - test/dummy/app/helpers/application_helper.rb
211
+ - test/dummy/public/404.html
212
+ - test/dummy/public/422.html
213
+ - test/dummy/public/500.html
214
+ - test/dummy/public/favicon.ico
215
+ - test/dummy/config/environment.rb
216
+ - test/dummy/config/routes.rb
217
+ - test/dummy/config/database.yml
218
+ - test/dummy/config/application.rb
219
+ - test/dummy/config/environments/development.rb
220
+ - test/dummy/config/environments/test.rb
221
+ - test/dummy/config/environments/production.rb
222
+ - test/dummy/config/locales/en.yml
223
+ - test/dummy/config/initializers/session_store.rb
224
+ - test/dummy/config/initializers/secret_token.rb
225
+ - test/dummy/config/initializers/wrap_parameters.rb
226
+ - test/dummy/config/initializers/inflections.rb
227
+ - test/dummy/config/initializers/mime_types.rb
228
+ - test/dummy/config/initializers/backtrace_silencers.rb
229
+ - test/dummy/config/boot.rb
230
+ - test/dummy/README.rdoc
231
+ - test/dummy/config.ru
232
+ - test/unit/helpers/home_helper_test.rb
233
+ - test/unit/existing_model_test.rb
234
+ - test/test_helper.rb