apposs_ldap_adapter 0.1.0

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 (63) hide show
  1. checksums.yaml +7 -0
  2. data/MIT-LICENSE +20 -0
  3. data/README.rdoc +13 -0
  4. data/Rakefile +40 -0
  5. data/app/assets/javascripts/apposs_ldap_adapter/application.js +13 -0
  6. data/app/assets/stylesheets/apposs_ldap_adapter/application.css +13 -0
  7. data/app/controllers/apposs_ldap_adapter/application_controller.rb +4 -0
  8. data/app/controllers/apposs_ldap_adapter/authentications_controller.rb +6 -0
  9. data/app/helpers/apposs_ldap_adapter/application_helper.rb +4 -0
  10. data/app/views/apposs_ldap_adapter/authentications/index.html.erb +1 -0
  11. data/app/views/layouts/apposs_ldap_adapter/application.html.erb +14 -0
  12. data/config/routes.rb +3 -0
  13. data/lib/apposs_ldap_adapter.rb +6 -0
  14. data/lib/apposs_ldap_adapter/app_loader.rb +7 -0
  15. data/lib/apposs_ldap_adapter/auth.rb +30 -0
  16. data/lib/apposs_ldap_adapter/engine.rb +5 -0
  17. data/lib/apposs_ldap_adapter/machine_loader.rb +11 -0
  18. data/lib/apposs_ldap_adapter/version.rb +3 -0
  19. data/lib/tasks/apposs_ldap_adapter_tasks.rake +4 -0
  20. data/test/apposs_simple_adapter_test.rb +7 -0
  21. data/test/dummy/README.rdoc +261 -0
  22. data/test/dummy/Rakefile +7 -0
  23. data/test/dummy/app/assets/javascripts/application.js +16 -0
  24. data/test/dummy/app/assets/javascripts/bootstrap.js.coffee +4 -0
  25. data/test/dummy/app/assets/stylesheets/application.css +13 -0
  26. data/test/dummy/app/assets/stylesheets/bootstrap_and_overrides.css.less +33 -0
  27. data/test/dummy/app/controllers/application_controller.rb +5 -0
  28. data/test/dummy/app/controllers/home_controller.rb +10 -0
  29. data/test/dummy/app/helpers/application_helper.rb +2 -0
  30. data/test/dummy/app/models/user.rb +3 -0
  31. data/test/dummy/app/views/home/index.html.erb +1 -0
  32. data/test/dummy/app/views/home/other.html.erb +1 -0
  33. data/test/dummy/app/views/layouts/application.html.erb +68 -0
  34. data/test/dummy/config.ru +4 -0
  35. data/test/dummy/config/application.rb +59 -0
  36. data/test/dummy/config/boot.rb +10 -0
  37. data/test/dummy/config/database.yml +25 -0
  38. data/test/dummy/config/environment.rb +5 -0
  39. data/test/dummy/config/environments/development.rb +37 -0
  40. data/test/dummy/config/environments/production.rb +67 -0
  41. data/test/dummy/config/environments/test.rb +37 -0
  42. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  43. data/test/dummy/config/initializers/inflections.rb +15 -0
  44. data/test/dummy/config/initializers/mime_types.rb +5 -0
  45. data/test/dummy/config/initializers/omniauth.rb +3 -0
  46. data/test/dummy/config/initializers/secret_token.rb +7 -0
  47. data/test/dummy/config/initializers/session_store.rb +8 -0
  48. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  49. data/test/dummy/config/locales/en.yml +5 -0
  50. data/test/dummy/config/routes.rb +7 -0
  51. data/test/dummy/db/migrate/20120701103457_create_users.rb +9 -0
  52. data/test/dummy/db/schema.rb +22 -0
  53. data/test/dummy/public/404.html +26 -0
  54. data/test/dummy/public/422.html +26 -0
  55. data/test/dummy/public/500.html +25 -0
  56. data/test/dummy/public/favicon.ico +0 -0
  57. data/test/dummy/public/images/favicon.ico +0 -0
  58. data/test/dummy/script/rails +6 -0
  59. data/test/dummy/test/fixtures/users.yml +7 -0
  60. data/test/dummy/test/unit/user_test.rb +7 -0
  61. data/test/integration/navigation_test.rb +10 -0
  62. data/test/test_helper.rb +15 -0
  63. metadata +189 -0
@@ -0,0 +1,15 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Add new inflection rules using the following format
4
+ # (all these examples are active by default):
5
+ # ActiveSupport::Inflector.inflections do |inflect|
6
+ # inflect.plural /^(ox)$/i, '\1en'
7
+ # inflect.singular /^(ox)en/i, '\1'
8
+ # inflect.irregular 'person', 'people'
9
+ # inflect.uncountable %w( fish sheep )
10
+ # end
11
+ #
12
+ # These inflection rules are supported but not enabled by default:
13
+ # ActiveSupport::Inflector.inflections do |inflect|
14
+ # inflect.acronym 'RESTful'
15
+ # end
@@ -0,0 +1,5 @@
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
5
+ # Mime::Type.register_alias "text/html", :iphone
@@ -0,0 +1,3 @@
1
+ Rails.application.config.middleware.use OmniAuth::Builder do
2
+ provider :google_oauth2, '470163475171.apps.googleusercontent.com', '6OrgJbadDqVbYD957bKVlxW3'
3
+ end
@@ -0,0 +1,7 @@
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 = '655a420a8375e3f30585f67ced3017f566799fa3d99c7cd73a8a1ed0f1d704bbcc7ae52a3827a253f6f9f906c8e5dd9551bb18b3b8a632f9362c6854447c9c57'
@@ -0,0 +1,8 @@
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
@@ -0,0 +1,14 @@
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]
9
+ end
10
+
11
+ # Disable root element in JSON by default.
12
+ ActiveSupport.on_load(:active_record) do
13
+ self.include_root_in_json = false
14
+ end
@@ -0,0 +1,5 @@
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"
@@ -0,0 +1,7 @@
1
+ Rails.application.routes.draw do
2
+ root :to => "home#index"
3
+ mount AppossLdapAdapter::Engine => "/adapter", :as => 'adapter'
4
+ match '/home/index' => 'home#index'
5
+ match '/home/other' => 'home#other'
6
+ match '/auth/:provider/callback' => 'home#callback'
7
+ end
@@ -0,0 +1,9 @@
1
+ class CreateUsers < ActiveRecord::Migration
2
+ def change
3
+ create_table :users do |t|
4
+ t.string :email
5
+
6
+ t.timestamps
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,22 @@
1
+ # encoding: UTF-8
2
+ # This file is auto-generated from the current state of the database. Instead
3
+ # of editing this file, please use the migrations feature of Active Record to
4
+ # incrementally modify your database, and then regenerate this schema definition.
5
+ #
6
+ # Note that this schema.rb definition is the authoritative source for your
7
+ # database schema. If you need to create the application database on another
8
+ # system, you should be using db:schema:load, not running all the migrations
9
+ # from scratch. The latter is a flawed and unsustainable approach (the more migrations
10
+ # you'll amass, the slower it'll run and the greater likelihood for issues).
11
+ #
12
+ # It's strongly recommended to check this file into your version control system.
13
+
14
+ ActiveRecord::Schema.define(:version => 20120701103457) do
15
+
16
+ create_table "users", :force => true do |t|
17
+ t.string "email"
18
+ t.datetime "created_at", :null => false
19
+ t.datetime "updated_at", :null => false
20
+ end
21
+
22
+ end
@@ -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,7 @@
1
+ # Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
2
+
3
+ one:
4
+ email: MyString
5
+
6
+ two:
7
+ email: MyString
@@ -0,0 +1,7 @@
1
+ require 'test_helper'
2
+
3
+ class UserTest < ActiveSupport::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,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
metadata ADDED
@@ -0,0 +1,189 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: apposs_ldap_adapter
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - shouxian
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-09-24 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rails
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: 3.2.19
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: 3.2.19
27
+ - !ruby/object:Gem::Dependency
28
+ name: jquery-rails
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: omniauth-ldap
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ description: A LDAP adapter for apposs.
56
+ email:
57
+ - dingl@pv.cc
58
+ executables: []
59
+ extensions: []
60
+ extra_rdoc_files: []
61
+ files:
62
+ - MIT-LICENSE
63
+ - README.rdoc
64
+ - Rakefile
65
+ - app/assets/javascripts/apposs_ldap_adapter/application.js
66
+ - app/assets/stylesheets/apposs_ldap_adapter/application.css
67
+ - app/controllers/apposs_ldap_adapter/application_controller.rb
68
+ - app/controllers/apposs_ldap_adapter/authentications_controller.rb
69
+ - app/helpers/apposs_ldap_adapter/application_helper.rb
70
+ - app/views/apposs_ldap_adapter/authentications/index.html.erb
71
+ - app/views/layouts/apposs_ldap_adapter/application.html.erb
72
+ - config/routes.rb
73
+ - lib/apposs_ldap_adapter.rb
74
+ - lib/apposs_ldap_adapter/app_loader.rb
75
+ - lib/apposs_ldap_adapter/auth.rb
76
+ - lib/apposs_ldap_adapter/engine.rb
77
+ - lib/apposs_ldap_adapter/machine_loader.rb
78
+ - lib/apposs_ldap_adapter/version.rb
79
+ - lib/tasks/apposs_ldap_adapter_tasks.rake
80
+ - test/apposs_simple_adapter_test.rb
81
+ - test/dummy/README.rdoc
82
+ - test/dummy/Rakefile
83
+ - test/dummy/app/assets/javascripts/application.js
84
+ - test/dummy/app/assets/javascripts/bootstrap.js.coffee
85
+ - test/dummy/app/assets/stylesheets/application.css
86
+ - test/dummy/app/assets/stylesheets/bootstrap_and_overrides.css.less
87
+ - test/dummy/app/controllers/application_controller.rb
88
+ - test/dummy/app/controllers/home_controller.rb
89
+ - test/dummy/app/helpers/application_helper.rb
90
+ - test/dummy/app/models/user.rb
91
+ - test/dummy/app/views/home/index.html.erb
92
+ - test/dummy/app/views/home/other.html.erb
93
+ - test/dummy/app/views/layouts/application.html.erb
94
+ - test/dummy/config.ru
95
+ - test/dummy/config/application.rb
96
+ - test/dummy/config/boot.rb
97
+ - test/dummy/config/database.yml
98
+ - test/dummy/config/environment.rb
99
+ - test/dummy/config/environments/development.rb
100
+ - test/dummy/config/environments/production.rb
101
+ - test/dummy/config/environments/test.rb
102
+ - test/dummy/config/initializers/backtrace_silencers.rb
103
+ - test/dummy/config/initializers/inflections.rb
104
+ - test/dummy/config/initializers/mime_types.rb
105
+ - test/dummy/config/initializers/omniauth.rb
106
+ - test/dummy/config/initializers/secret_token.rb
107
+ - test/dummy/config/initializers/session_store.rb
108
+ - test/dummy/config/initializers/wrap_parameters.rb
109
+ - test/dummy/config/locales/en.yml
110
+ - test/dummy/config/routes.rb
111
+ - test/dummy/db/migrate/20120701103457_create_users.rb
112
+ - test/dummy/db/schema.rb
113
+ - test/dummy/public/404.html
114
+ - test/dummy/public/422.html
115
+ - test/dummy/public/500.html
116
+ - test/dummy/public/favicon.ico
117
+ - test/dummy/public/images/favicon.ico
118
+ - test/dummy/script/rails
119
+ - test/dummy/test/fixtures/users.yml
120
+ - test/dummy/test/unit/user_test.rb
121
+ - test/integration/navigation_test.rb
122
+ - test/test_helper.rb
123
+ homepage: http://opifices.com
124
+ licenses: []
125
+ metadata: {}
126
+ post_install_message:
127
+ rdoc_options: []
128
+ require_paths:
129
+ - lib
130
+ required_ruby_version: !ruby/object:Gem::Requirement
131
+ requirements:
132
+ - - ">="
133
+ - !ruby/object:Gem::Version
134
+ version: '0'
135
+ required_rubygems_version: !ruby/object:Gem::Requirement
136
+ requirements:
137
+ - - ">="
138
+ - !ruby/object:Gem::Version
139
+ version: '0'
140
+ requirements: []
141
+ rubyforge_project:
142
+ rubygems_version: 2.2.2
143
+ signing_key:
144
+ specification_version: 4
145
+ summary: AppossLdapAdapter
146
+ test_files:
147
+ - test/integration/navigation_test.rb
148
+ - test/dummy/db/schema.rb
149
+ - test/dummy/db/migrate/20120701103457_create_users.rb
150
+ - test/dummy/test/fixtures/users.yml
151
+ - test/dummy/test/unit/user_test.rb
152
+ - test/dummy/config.ru
153
+ - test/dummy/config/application.rb
154
+ - test/dummy/config/database.yml
155
+ - test/dummy/config/initializers/backtrace_silencers.rb
156
+ - test/dummy/config/initializers/wrap_parameters.rb
157
+ - test/dummy/config/initializers/omniauth.rb
158
+ - test/dummy/config/initializers/secret_token.rb
159
+ - test/dummy/config/initializers/session_store.rb
160
+ - test/dummy/config/initializers/mime_types.rb
161
+ - test/dummy/config/initializers/inflections.rb
162
+ - test/dummy/config/boot.rb
163
+ - test/dummy/config/environments/test.rb
164
+ - test/dummy/config/environments/production.rb
165
+ - test/dummy/config/environments/development.rb
166
+ - test/dummy/config/locales/en.yml
167
+ - test/dummy/config/environment.rb
168
+ - test/dummy/config/routes.rb
169
+ - test/dummy/README.rdoc
170
+ - test/dummy/Rakefile
171
+ - test/dummy/script/rails
172
+ - test/dummy/app/helpers/application_helper.rb
173
+ - test/dummy/app/views/home/index.html.erb
174
+ - test/dummy/app/views/home/other.html.erb
175
+ - test/dummy/app/views/layouts/application.html.erb
176
+ - test/dummy/app/assets/stylesheets/bootstrap_and_overrides.css.less
177
+ - test/dummy/app/assets/stylesheets/application.css
178
+ - test/dummy/app/assets/javascripts/application.js
179
+ - test/dummy/app/assets/javascripts/bootstrap.js.coffee
180
+ - test/dummy/app/models/user.rb
181
+ - test/dummy/app/controllers/home_controller.rb
182
+ - test/dummy/app/controllers/application_controller.rb
183
+ - test/dummy/public/422.html
184
+ - test/dummy/public/404.html
185
+ - test/dummy/public/favicon.ico
186
+ - test/dummy/public/500.html
187
+ - test/dummy/public/images/favicon.ico
188
+ - test/apposs_simple_adapter_test.rb
189
+ - test/test_helper.rb