user_mgmt 0.0.1

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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 12154bcda0543d98ce78dfa787e965dd42b67261
4
+ data.tar.gz: c9ca8b4889ead31c91074fc42124f0593450385e
5
+ SHA512:
6
+ metadata.gz: 22c5c43346e42c6a6d6fd7ceab81285646499bec68644221ff08a79e335b0d4fa40a673a4550bb4cd8ced37dbe685892ab393025b771802f594f73f6e5ed19be
7
+ data.tar.gz: 97c956924ad929c29b35fbd9db730c8757d240a274427141a1ed766984112864686095dbcc245e9946587760241588a9be70c859f5b752314b20685cb85fde0e
data/.gitignore ADDED
@@ -0,0 +1,17 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
12
+ pkg
13
+ rdoc
14
+ spec/reports
15
+ test/tmp
16
+ test/version_tmp
17
+ tmp
data/.rspec ADDED
@@ -0,0 +1 @@
1
+ --color
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in user_mgmt.gemspec
4
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2013 Danilo Faria
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,29 @@
1
+ # UserMgmt
2
+
3
+ TODO: Write a gem description
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ gem 'user_mgmt'
10
+
11
+ And then execute:
12
+
13
+ $ bundle
14
+
15
+ Or install it yourself as:
16
+
17
+ $ gem install user_mgmt
18
+
19
+ ## Usage
20
+
21
+ TODO: Write usage instructions here
22
+
23
+ ## Contributing
24
+
25
+ 1. Fork it
26
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
27
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
28
+ 4. Push to the branch (`git push origin my-new-feature`)
29
+ 5. Create new Pull Request
data/Rakefile ADDED
@@ -0,0 +1,5 @@
1
+ #explained at http://railscasts.com/episodes/301-extracting-a-ruby-gem?view=asciicast
2
+ require "bundler/gem_tasks"
3
+ require 'rspec/core/rake_task'
4
+ RSpec::Core::RakeTask.new(:spec)
5
+ task default: :spec
@@ -0,0 +1,4 @@
1
+ # All controllers are inherited from here.
2
+ class UserMgmtController < UserMgmt.parent_controller.constantize
3
+
4
+ end
@@ -0,0 +1,18 @@
1
+ / - unless .errors.empty?
2
+ / #warning
3
+ / Errors prevented this user from being #{controller.action_name}d:
4
+ / %ul
5
+ / - .errors.full_messages.each do |error|
6
+ / %li= error
7
+
8
+ %div
9
+ = label :user, :email, 'Email'
10
+ = text_field :user, 'Email'
11
+
12
+ %div
13
+ = label :user, :password, 'Password'
14
+ = text_field :user, 'Password'
15
+
16
+ %div
17
+ = label :user, :password_confirmation, 'Password Confirmation'
18
+ = text_field :user, 'Password Confirmation'
@@ -0,0 +1,6 @@
1
+ %h2 Sign up
2
+ = form_tag @@external_database_URI, :method => :post do
3
+ = render :partial => 'user_form'
4
+ = submit_tag 'submit'
5
+
6
+ /a{}
@@ -0,0 +1,9 @@
1
+ # Use this hook to configure user_mgmt external database URI, and so forth.
2
+ # Many of these configuration options can be set straight in your model.
3
+ UserMgmt.setup do |config|
4
+
5
+ # Ensure you defined default external database URI, otherwise
6
+ # authentication won't be possible to happen
7
+ config.external_database_URI = "yourexternaldatabaseuri.com"
8
+
9
+ end
@@ -0,0 +1,8 @@
1
+ # module UserMgmt
2
+
3
+
4
+ # class Configurator
5
+
6
+ # def
7
+
8
+ # end
@@ -0,0 +1,3 @@
1
+ module UserMgmt
2
+ VERSION = "0.0.1"
3
+ end
data/lib/user_mgmt.rb ADDED
@@ -0,0 +1,23 @@
1
+ require "user_mgmt/version"
2
+ require "rails"
3
+
4
+ module UserMgmt
5
+
6
+ # URI of the external database where authentication happens and gets its data stored at
7
+ mattr_accessor :external_database_URI
8
+ @@external_database_URI = nil
9
+
10
+ # The parent controller all UserMgmt controllers inherits from.
11
+ # Defaults to ApplicationController. This should be set early
12
+ # in the initialization process and should be set to a string.
13
+ mattr_accessor :parent_controller
14
+ @@parent_controller = "ApplicationController"
15
+
16
+
17
+ # Default way to setup UserMgmt. Run rails generate user_mgmt:install to create
18
+ # a fresh initializer with all configuration values.
19
+ def self.setup
20
+ yield self
21
+ end
22
+
23
+ end
@@ -0,0 +1,4 @@
1
+ require 'user_mgmt'
2
+
3
+ #explained here http://stackoverflow.com/questions/3015261/rails-custom-plugin-gem-with-partials
4
+ ActionController::Base.prepend_view_path File.dirname(__FILE__) + "/../app/views"
data/user_mgmt.gemspec ADDED
@@ -0,0 +1,27 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'user_mgmt/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "user_mgmt"
8
+ spec.version = UserMgmt::VERSION
9
+ spec.authors = ["Danilo Faria, Fernando Gorodscy, Josh Leslie"]
10
+ spec.email = ["su_critic@hotmail.com"]
11
+ spec.description = %q{Includes functionality to sign up and login with devise, and third-party authentication strategies such as Facebook, Twitter, Yahoo, Windows Live, Gmail and Linkedin with support for external database authentication.}
12
+ spec.summary = %q{Various authentication options in an outside database.}
13
+ spec.homepage = "https://github.com/Methos2013/user_mgmt_gem"
14
+ spec.license = "MIT"
15
+
16
+ spec.files = `git ls-files`.split($/)
17
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
+ spec.require_paths = ["lib"]
20
+
21
+ spec.add_development_dependency "rspec"
22
+ spec.add_development_dependency "warden"
23
+ spec.add_development_dependency "haml"
24
+
25
+ spec.add_development_dependency "bundler", "~> 1.3"
26
+ spec.add_development_dependency "rake"
27
+ end
metadata ADDED
@@ -0,0 +1,132 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: user_mgmt
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Danilo Faria, Fernando Gorodscy, Josh Leslie
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2013-07-08 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rspec
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - '>='
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - '>='
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: warden
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - '>='
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
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: haml
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - '>='
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: bundler
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ~>
60
+ - !ruby/object:Gem::Version
61
+ version: '1.3'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ~>
67
+ - !ruby/object:Gem::Version
68
+ version: '1.3'
69
+ - !ruby/object:Gem::Dependency
70
+ name: rake
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - '>='
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - '>='
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ description: Includes functionality to sign up and login with devise, and third-party
84
+ authentication strategies such as Facebook, Twitter, Yahoo, Windows Live, Gmail
85
+ and Linkedin with support for external database authentication.
86
+ email:
87
+ - su_critic@hotmail.com
88
+ executables: []
89
+ extensions: []
90
+ extra_rdoc_files: []
91
+ files:
92
+ - .gitignore
93
+ - .rspec
94
+ - Gemfile
95
+ - LICENSE.txt
96
+ - README.md
97
+ - Rakefile
98
+ - app/controllers/user_mgmt_controller.rb
99
+ - app/views/user_mgmt/registrations/_user_form.html.haml
100
+ - app/views/user_mgmt/registrations/new.html.haml
101
+ - lib/generators/templates/user_mgmt.rb
102
+ - lib/user_mgmt.rb
103
+ - lib/user_mgmt/configurator.rb
104
+ - lib/user_mgmt/version.rb
105
+ - spec/spec_helper.rb
106
+ - user_mgmt.gemspec
107
+ homepage: https://github.com/Methos2013/user_mgmt_gem
108
+ licenses:
109
+ - MIT
110
+ metadata: {}
111
+ post_install_message:
112
+ rdoc_options: []
113
+ require_paths:
114
+ - lib
115
+ required_ruby_version: !ruby/object:Gem::Requirement
116
+ requirements:
117
+ - - '>='
118
+ - !ruby/object:Gem::Version
119
+ version: '0'
120
+ required_rubygems_version: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - '>='
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
125
+ requirements: []
126
+ rubyforge_project:
127
+ rubygems_version: 2.0.3
128
+ signing_key:
129
+ specification_version: 4
130
+ summary: Various authentication options in an outside database.
131
+ test_files:
132
+ - spec/spec_helper.rb