noodall-devise 0.1.8 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -2,21 +2,16 @@ source :rubygems
2
2
 
3
3
  gemspec
4
4
 
5
- gem "rails", "~> 3.0.1"
6
- gem 'noodall-ui'
7
- gem "capybara", ">= 0.3.9"
8
- gem "rspec-rails", ">= 2.0.0.beta"
9
- gem 'database_cleaner'
10
- gem 'cucumber-rails'
11
- gem 'launchy' # So you can do Then show me the page
12
- gem 'rmagick', :require => 'RMagick'
13
- gem 'dragonfly', '~> 0.7.6'
14
- gem 'factory_girl', '~> 1.3.2'
15
- gem "faker", "~> 0.3.1"
16
- gem "bson_ext", "~> 1.2.0"
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
-
@@ -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
- alias_attribute :groups, :tags
17
- alias_attribute :group_list, :tag_list
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
- find(:first, :conditions => conditions.merge(:email => /^#{Regexp.escape(conditions[:email].strip)}$/i))
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.body))
103
+ actual = JSON.pretty_generate(JSON.parse(page.source))
104
104
  expected.should == actual
105
105
  end
106
106
 
@@ -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/formatter/unicode' # Remove this line if you don't want Cucumber Unicode support
11
- require 'cucumber/rails/rspec'
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
@@ -1,5 +1,5 @@
1
1
  module Noodall
2
2
  module Devise
3
- VERSION = "0.1.8"
3
+ VERSION = "0.2.1"
4
4
  end
5
5
  end
@@ -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
- # s.rubyforge_project = "noodall-component-gallery"
16
- s.add_dependency 'devise', '~> 1.1.8'
17
- s.add_dependency 'mm-devise', '~> 1.1.6'
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
 
@@ -5,7 +5,7 @@ require "action_controller/railtie"
5
5
  require "action_view/railtie"
6
6
  require "action_mailer/railtie"
7
7
 
8
- Bundler.require
8
+ Bundler.require(:default, Rails.env) if defined?(Bundler)
9
9
  require "noodall-devise"
10
10
 
11
11
  module Dummy
@@ -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: 11
4
+ hash: 21
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
+ - 2
8
9
  - 1
9
- - 8
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-03-30 00:00:00 +01:00
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: 3
29
+ hash: 7
28
30
  segments:
29
31
  - 1
30
- - 1
31
- - 8
32
- version: 1.1.8
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: 31
45
+ hash: 9
44
46
  segments:
45
47
  - 1
46
- - 1
47
- - 6
48
- version: 1.1.6
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.4.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"
@@ -1,9 +0,0 @@
1
- require 'spec_helper'
2
-
3
- describe "Navigation" do
4
- include Capybara
5
-
6
- it "should be a valid app" do
7
- ::Rails.application.should be_a(Dummy::Application)
8
- end
9
- end