noodall-devise 0.1.8 → 0.2.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.
- data/Gemfile +12 -17
- data/app/models/user.rb +10 -8
- data/features/step_definitions/web_steps.rb +1 -1
- data/features/support/env.rb +6 -11
- data/lib/noodall/devise/version.rb +1 -1
- data/noodall-devise.gemspec +4 -4
- data/spec/dummy/config/application.rb +1 -1
- data/spec/dummy/config/boot.rb +2 -1
- data/spec/dummy/config/initializers/devise.rb +6 -6
- metadata +37 -24
- data/spec/integration/navigation_spec.rb +0 -9
data/Gemfile
CHANGED
@@ -2,21 +2,16 @@ source :rubygems
|
|
2
2
|
|
3
3
|
gemspec
|
4
4
|
|
5
|
-
|
6
|
-
gem
|
7
|
-
gem
|
8
|
-
gem
|
9
|
-
gem
|
10
|
-
gem 'cucumber-rails'
|
11
|
-
gem 'launchy' # So you can do Then show me the page
|
12
|
-
gem '
|
13
|
-
gem
|
14
|
-
gem
|
15
|
-
gem "
|
16
|
-
gem "
|
17
|
-
|
18
|
-
|
19
|
-
if RUBY_VERSION < '1.9'
|
20
|
-
gem "ruby-debug", ">= 0.10.3"
|
5
|
+
group :development, :test do
|
6
|
+
gem "rails", "> 3.0.1"
|
7
|
+
gem 'noodall-ui'
|
8
|
+
gem 'noodall-core'
|
9
|
+
gem "rspec-rails"
|
10
|
+
gem 'cucumber-rails'
|
11
|
+
gem 'launchy' # So you can do Then show me the page
|
12
|
+
gem 'factory_girl'
|
13
|
+
gem "faker"
|
14
|
+
gem "bson_ext"
|
15
|
+
gem "dragonfly"
|
16
|
+
gem "database_cleaner"
|
21
17
|
end
|
22
|
-
|
data/app/models/user.rb
CHANGED
@@ -1,10 +1,5 @@
|
|
1
1
|
class User
|
2
2
|
include MongoMapper::Document
|
3
|
-
# Include default devise modules. Others available are:
|
4
|
-
# :token_authenticatable, :confirmable, :lockable and :timeoutable
|
5
|
-
devise :database_authenticatable,
|
6
|
-
:recoverable, :rememberable, :trackable, :validatable
|
7
|
-
|
8
3
|
include Canable::Cans
|
9
4
|
plugin Noodall::Tagging
|
10
5
|
|
@@ -13,8 +8,15 @@ class User
|
|
13
8
|
key :bio, String
|
14
9
|
timestamps!
|
15
10
|
|
16
|
-
|
17
|
-
|
11
|
+
alias_method :groups=, :tags=
|
12
|
+
alias_method :groups, :tags
|
13
|
+
alias_method :group_list=, :tag_list=
|
14
|
+
alias_method :group_list, :tag_list
|
15
|
+
|
16
|
+
# Include default devise modules. Others available are:
|
17
|
+
# :token_authenticatable, :confirmable, :lockable and :timeoutable
|
18
|
+
devise :database_authenticatable,
|
19
|
+
:recoverable, :rememberable, :trackable, :validatable
|
18
20
|
|
19
21
|
|
20
22
|
#-- Dragonfly -----------
|
@@ -49,7 +51,7 @@ class User
|
|
49
51
|
def self.find_for_authentication(conditions)
|
50
52
|
filter_auth_params(conditions)
|
51
53
|
# Search using case sensitive stripped email
|
52
|
-
|
54
|
+
first(conditions.merge(:email => /^#{Regexp.escape(conditions[:email].strip)}$/i))
|
53
55
|
end
|
54
56
|
|
55
57
|
def web_image_extension
|
@@ -100,7 +100,7 @@ end
|
|
100
100
|
Then /^(?:|I )should see JSON:$/ do |expected_json|
|
101
101
|
require 'json'
|
102
102
|
expected = JSON.pretty_generate(JSON.parse(expected_json))
|
103
|
-
actual = JSON.pretty_generate(JSON.parse(page.
|
103
|
+
actual = JSON.pretty_generate(JSON.parse(page.source))
|
104
104
|
expected.should == actual
|
105
105
|
end
|
106
106
|
|
data/features/support/env.rb
CHANGED
@@ -1,21 +1,16 @@
|
|
1
|
-
# IMPORTANT: This file is generated by cucumber-rails - edit at your own peril.
|
2
|
-
# It is recommended to regenerate this file in the future when you upgrade to a
|
3
|
-
# newer version of cucumber-rails. Consider adding your own code to a new file
|
4
|
-
# instead of editing this one. Cucumber will automatically load all features/**/*.rb
|
5
|
-
# files.
|
6
|
-
|
7
1
|
ENV["RAILS_ENV"] ||= "test"
|
8
2
|
require File.expand_path("../../../spec/dummy/config/environment.rb", __FILE__)
|
9
3
|
|
10
|
-
require 'cucumber/
|
11
|
-
require '
|
4
|
+
require 'cucumber/rails/action_controller'
|
5
|
+
require 'action_dispatch/testing/test_process'
|
6
|
+
require 'action_dispatch/testing/integration'
|
12
7
|
require 'cucumber/rails/world'
|
8
|
+
require 'cucumber/rails/hooks'
|
9
|
+
require 'cucumber/rails/capybara'
|
10
|
+
|
13
11
|
require 'cucumber/web/tableish'
|
14
12
|
require 'cucumber/rspec/doubles'
|
15
13
|
|
16
|
-
require 'capybara/rails'
|
17
|
-
require 'capybara/cucumber'
|
18
|
-
require 'capybara/session'
|
19
14
|
# Capybara defaults to XPath selectors rather than Webrat's default of CSS3. In
|
20
15
|
# order to ease the transition to Capybara we set the default here. If you'd
|
21
16
|
# prefer to use XPath just remove this line and adjust any selectors in your
|
data/noodall-devise.gemspec
CHANGED
@@ -5,16 +5,16 @@ Gem::Specification.new do |s|
|
|
5
5
|
s.name = "noodall-devise"
|
6
6
|
s.version = Noodall::Devise::VERSION
|
7
7
|
s.platform = Gem::Platform::RUBY
|
8
|
-
s.authors = []
|
8
|
+
s.authors = ["Steve England"]
|
9
9
|
s.email = []
|
10
10
|
s.homepage = "http://rubygems.org/gems/noodall-components-gallery"
|
11
11
|
s.summary = "Noodall Devise: User sign in and managent with devise"
|
12
12
|
s.description = "User sign in and managent with devise. Provides administration of users in the admin area"
|
13
13
|
|
14
14
|
s.required_rubygems_version = ">= 1.3.6"
|
15
|
-
|
16
|
-
s.add_dependency 'devise', '~> 1.
|
17
|
-
s.add_dependency '
|
15
|
+
s.add_dependency 'devise', '~> 1.4.0'
|
16
|
+
s.add_dependency 'mm-devise', '~> 1.3'
|
17
|
+
s.add_dependency 'noodall-ui', ">= 0.4.1"
|
18
18
|
|
19
19
|
s.add_development_dependency "bundler", ">= 1.0.0"
|
20
20
|
|
data/spec/dummy/config/boot.rb
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
require 'rubygems'
|
2
2
|
gemfile = File.expand_path('../../../../Gemfile', __FILE__)
|
3
|
+
puts gemfile
|
3
4
|
|
4
5
|
if File.exist?(gemfile)
|
5
6
|
ENV['BUNDLE_GEMFILE'] = gemfile
|
@@ -7,4 +8,4 @@ if File.exist?(gemfile)
|
|
7
8
|
Bundler.setup
|
8
9
|
end
|
9
10
|
|
10
|
-
$:.unshift File.expand_path('../../../../lib', __FILE__)
|
11
|
+
$:.unshift File.expand_path('../../../../lib', __FILE__)
|
@@ -43,7 +43,7 @@ Devise.setup do |config|
|
|
43
43
|
# from others authentication tools as :clearance_sha1, :authlogic_sha512 (then
|
44
44
|
# you should set stretches above to 20 for default behavior) and :restful_authentication_sha1
|
45
45
|
# (then you should set stretches to 10, and copy REST_AUTH_SITE_KEY to pepper)
|
46
|
-
config.encryptor = :bcrypt
|
46
|
+
#config.encryptor = :bcrypt
|
47
47
|
|
48
48
|
# Setup a pepper to generate the encrypted password.
|
49
49
|
config.pepper = "ff451bfc0dcc9987ebe7ec1c2bea150ec1d17c44be03521c61ba54c00b23b91f0f64d21b64802ab6817fdbb75b0423ef1482e36187230c532c6b5f50edcb4108"
|
@@ -51,10 +51,10 @@ Devise.setup do |config|
|
|
51
51
|
# ==> Configuration for :confirmable
|
52
52
|
# The time you want to give your user to confirm his account. During this time
|
53
53
|
# he will be able to access your application without confirming. Default is nil.
|
54
|
-
# When confirm_within is zero, the user won't be able to sign in without confirming.
|
55
|
-
# You can use this to let your user access some features of your application
|
56
|
-
# without confirming the account, but blocking it after a certain period
|
57
|
-
# (ie 2 days).
|
54
|
+
# When confirm_within is zero, the user won't be able to sign in without confirming.
|
55
|
+
# You can use this to let your user access some features of your application
|
56
|
+
# without confirming the account, but blocking it after a certain period
|
57
|
+
# (ie 2 days).
|
58
58
|
# config.confirm_within = 2.days
|
59
59
|
|
60
60
|
# ==> Configuration for :rememberable
|
@@ -113,7 +113,7 @@ Devise.setup do |config|
|
|
113
113
|
# devise role declared in your routes.
|
114
114
|
# config.default_scope = :user
|
115
115
|
|
116
|
-
# Configure sign_out behavior.
|
116
|
+
# Configure sign_out behavior.
|
117
117
|
# By default sign_out is scoped (i.e. /users/sign_out affects only :user scope).
|
118
118
|
# In case of sign_out_all_scopes set to true any logout action will sign out all active scopes.
|
119
119
|
# config.sign_out_all_scopes = false
|
metadata
CHANGED
@@ -1,57 +1,74 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: noodall-devise
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 21
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
|
+
- 2
|
8
9
|
- 1
|
9
|
-
|
10
|
-
version: 0.1.8
|
10
|
+
version: 0.2.1
|
11
11
|
platform: ruby
|
12
|
-
authors:
|
13
|
-
|
12
|
+
authors:
|
13
|
+
- Steve England
|
14
14
|
autorequire:
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-
|
18
|
+
date: 2011-07-12 00:00:00 +01:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
22
|
+
prerelease: false
|
23
|
+
type: :runtime
|
22
24
|
requirement: &id001 !ruby/object:Gem::Requirement
|
23
25
|
none: false
|
24
26
|
requirements:
|
25
27
|
- - ~>
|
26
28
|
- !ruby/object:Gem::Version
|
27
|
-
hash:
|
29
|
+
hash: 7
|
28
30
|
segments:
|
29
31
|
- 1
|
30
|
-
-
|
31
|
-
-
|
32
|
-
version: 1.
|
32
|
+
- 4
|
33
|
+
- 0
|
34
|
+
version: 1.4.0
|
35
|
+
version_requirements: *id001
|
33
36
|
name: devise
|
37
|
+
- !ruby/object:Gem::Dependency
|
34
38
|
prerelease: false
|
35
|
-
version_requirements: *id001
|
36
39
|
type: :runtime
|
37
|
-
- !ruby/object:Gem::Dependency
|
38
40
|
requirement: &id002 !ruby/object:Gem::Requirement
|
39
41
|
none: false
|
40
42
|
requirements:
|
41
43
|
- - ~>
|
42
44
|
- !ruby/object:Gem::Version
|
43
|
-
hash:
|
45
|
+
hash: 9
|
44
46
|
segments:
|
45
47
|
- 1
|
46
|
-
-
|
47
|
-
|
48
|
-
|
48
|
+
- 3
|
49
|
+
version: "1.3"
|
50
|
+
version_requirements: *id002
|
49
51
|
name: mm-devise
|
52
|
+
- !ruby/object:Gem::Dependency
|
50
53
|
prerelease: false
|
51
|
-
version_requirements: *id002
|
52
54
|
type: :runtime
|
53
|
-
- !ruby/object:Gem::Dependency
|
54
55
|
requirement: &id003 !ruby/object:Gem::Requirement
|
56
|
+
none: false
|
57
|
+
requirements:
|
58
|
+
- - ">="
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
hash: 13
|
61
|
+
segments:
|
62
|
+
- 0
|
63
|
+
- 4
|
64
|
+
- 1
|
65
|
+
version: 0.4.1
|
66
|
+
version_requirements: *id003
|
67
|
+
name: noodall-ui
|
68
|
+
- !ruby/object:Gem::Dependency
|
69
|
+
prerelease: false
|
70
|
+
type: :development
|
71
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
55
72
|
none: false
|
56
73
|
requirements:
|
57
74
|
- - ">="
|
@@ -62,10 +79,8 @@ dependencies:
|
|
62
79
|
- 0
|
63
80
|
- 0
|
64
81
|
version: 1.0.0
|
82
|
+
version_requirements: *id004
|
65
83
|
name: bundler
|
66
|
-
prerelease: false
|
67
|
-
version_requirements: *id003
|
68
|
-
type: :development
|
69
84
|
description: User sign in and managent with devise. Provides administration of users in the admin area
|
70
85
|
email: []
|
71
86
|
|
@@ -122,14 +137,12 @@ files:
|
|
122
137
|
- spec/dummy/config/initializers/session_store.rb
|
123
138
|
- spec/dummy/config/locales/en.yml
|
124
139
|
- spec/dummy/config/routes.rb
|
125
|
-
- spec/dummy/db/test.sqlite3
|
126
140
|
- spec/dummy/public/404.html
|
127
141
|
- spec/dummy/public/422.html
|
128
142
|
- spec/dummy/public/500.html
|
129
143
|
- spec/dummy/public/favicon.ico
|
130
144
|
- spec/dummy/script/rails
|
131
145
|
- spec/factories/user.rb
|
132
|
-
- spec/integration/navigation_spec.rb
|
133
146
|
- spec/noodall_devise_spec.rb
|
134
147
|
- spec/spec_helper.rb
|
135
148
|
has_rdoc: true
|
@@ -164,7 +177,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
164
177
|
requirements: []
|
165
178
|
|
166
179
|
rubyforge_project:
|
167
|
-
rubygems_version: 1.
|
180
|
+
rubygems_version: 1.5.1
|
168
181
|
signing_key:
|
169
182
|
specification_version: 3
|
170
183
|
summary: "Noodall Devise: User sign in and managent with devise"
|