devise-guests 0.3.1 → 0.3.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 2883c0da938e25f93c598f986736adb89e55665d
4
+ data.tar.gz: d895092456bcf761c3148a558b56de279f504d81
5
+ SHA512:
6
+ metadata.gz: c2cd3bd1fce54f1e0e8579fa8da65587a2fe768e1c0589ab5e97d8ac620481dede6fa9972a99169c115acec14180c596b5827acbba4cde74db88c909a4fa27ae
7
+ data.tar.gz: f2b80f1c9f4057b1412252b44d087dc1a6c847829828722b2ea39a0c92d8b0c64dd24d85552ff53f7d9ca4ac56ec2107be62be59066c72bed3d7f3648637a166
data/Gemfile CHANGED
@@ -1,6 +1,11 @@
1
- source :rubygems
1
+ source 'https://rubygems.org'
2
2
 
3
3
  gemspec
4
4
 
5
5
  gem 'sqlite3'
6
6
  gem 'simplecov', :platform => :ruby_19
7
+
8
+ group :test do
9
+ gem 'activerecord'
10
+ gem 'actionmailer'
11
+ end
data/README.md CHANGED
@@ -1,4 +1,5 @@
1
1
  # Devise Guests
2
+ [![Build Status](https://travis-ci.org/cbeer/devise-guests.png?branch=master)](https://travis-ci.org/cbeer/devise-guests)
2
3
 
3
4
  A drop-in guest user implementation for devise
4
5
 
@@ -34,4 +35,4 @@ guest_user # ( for anonymous users)
34
35
 
35
36
  => User<id: nil, email: guest_RANDOMENOUGHSTRING_@example.com, guest: true>
36
37
 
37
- ```
38
+ ```
@@ -16,7 +16,7 @@ Gem::Specification.new do |s|
16
16
 
17
17
  s.add_development_dependency "rspec"
18
18
  s.add_development_dependency "rake"
19
- s.add_development_dependency "combustion"
19
+ s.add_development_dependency "combustion", '~> 0.4.0'
20
20
  s.add_development_dependency "rspec-rails"
21
21
  s.add_development_dependency "capybara"
22
22
  s.add_development_dependency "yard"
@@ -64,7 +64,10 @@ module DeviseGuests::Controllers
64
64
  def create_guest_#{mapping} email = nil
65
65
  email &&= nil unless email.to_s.match(/^guest/)
66
66
  email ||= "guest_" + guest_#{mapping}_unique_suffix + "@example.com"
67
- u = #{class_name}.create(:email => email)
67
+ u = #{class_name}.new.tap do |g|
68
+ g.email = email
69
+ g.save
70
+ end
68
71
  u.password = u.password_confirmation = email
69
72
  u.guest = true if u.respond_to? :guest
70
73
  u
@@ -1,3 +1,3 @@
1
1
  module DeviseGuests
2
- VERSION = '0.3.1'
2
+ VERSION = '0.3.2'
3
3
  end
@@ -18,7 +18,7 @@ describe ApplicationController do
18
18
  end
19
19
 
20
20
  it "should use the current user when available" do
21
- m = mock()
21
+ m = double()
22
22
  @mock_warden.stub(:authenticate).with(anything).and_return(m)
23
23
 
24
24
  @controller.current_or_guest_user.should == m
@@ -4,9 +4,5 @@ class User < ActiveRecord::Base
4
4
  # :lockable, :timeoutable and :omniauthable
5
5
  devise :database_authenticatable, :registerable,
6
6
  :recoverable, :rememberable, :trackable, :validatable
7
-
8
- # Setup accessible (or protected) attributes for your model
9
- attr_accessible :email, :password, :password_confirmation, :remember_me
10
- # attr_accessible :title, :body
11
7
  end
12
8
 
data/spec/spec_helper.rb CHANGED
@@ -1,18 +1,18 @@
1
1
  require 'rubygems'
2
- require 'bundler'
3
-
4
- Bundler.require :default, :development
2
+ require 'bundler/setup'
5
3
 
6
4
  if ENV['COVERAGE'] and RUBY_VERSION =~ /^1.9/
7
5
  require 'simplecov'
8
6
  SimpleCov.start
9
7
  end
10
8
 
9
+ require 'combustion'
11
10
  require 'capybara/rspec'
12
11
 
13
- Combustion.initialize!
12
+ require 'devise'
13
+ require 'devise-guests'
14
+ Combustion.initialize!(:active_record,:action_mailer)
14
15
 
15
16
  require 'rspec/rails'
16
17
  require 'capybara/rails'
17
18
 
18
- require 'devise-guests'
metadata CHANGED
@@ -1,129 +1,114 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: devise-guests
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
5
- prerelease:
4
+ version: 0.3.2
6
5
  platform: ruby
7
6
  authors:
8
7
  - Chris Beer
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2012-11-30 00:00:00.000000000 Z
11
+ date: 2013-07-15 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: devise
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ! '>='
17
+ - - '>='
20
18
  - !ruby/object:Gem::Version
21
19
  version: '0'
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
- - - ! '>='
24
+ - - '>='
28
25
  - !ruby/object:Gem::Version
29
26
  version: '0'
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: rspec
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
- - - ! '>='
31
+ - - '>='
36
32
  - !ruby/object:Gem::Version
37
33
  version: '0'
38
34
  type: :development
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
- - - ! '>='
38
+ - - '>='
44
39
  - !ruby/object:Gem::Version
45
40
  version: '0'
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: rake
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
- - - ! '>='
45
+ - - '>='
52
46
  - !ruby/object:Gem::Version
53
47
  version: '0'
54
48
  type: :development
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
51
  requirements:
59
- - - ! '>='
52
+ - - '>='
60
53
  - !ruby/object:Gem::Version
61
54
  version: '0'
62
55
  - !ruby/object:Gem::Dependency
63
56
  name: combustion
64
57
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
58
  requirements:
67
- - - ! '>='
59
+ - - ~>
68
60
  - !ruby/object:Gem::Version
69
- version: '0'
61
+ version: 0.4.0
70
62
  type: :development
71
63
  prerelease: false
72
64
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
65
  requirements:
75
- - - ! '>='
66
+ - - ~>
76
67
  - !ruby/object:Gem::Version
77
- version: '0'
68
+ version: 0.4.0
78
69
  - !ruby/object:Gem::Dependency
79
70
  name: rspec-rails
80
71
  requirement: !ruby/object:Gem::Requirement
81
- none: false
82
72
  requirements:
83
- - - ! '>='
73
+ - - '>='
84
74
  - !ruby/object:Gem::Version
85
75
  version: '0'
86
76
  type: :development
87
77
  prerelease: false
88
78
  version_requirements: !ruby/object:Gem::Requirement
89
- none: false
90
79
  requirements:
91
- - - ! '>='
80
+ - - '>='
92
81
  - !ruby/object:Gem::Version
93
82
  version: '0'
94
83
  - !ruby/object:Gem::Dependency
95
84
  name: capybara
96
85
  requirement: !ruby/object:Gem::Requirement
97
- none: false
98
86
  requirements:
99
- - - ! '>='
87
+ - - '>='
100
88
  - !ruby/object:Gem::Version
101
89
  version: '0'
102
90
  type: :development
103
91
  prerelease: false
104
92
  version_requirements: !ruby/object:Gem::Requirement
105
- none: false
106
93
  requirements:
107
- - - ! '>='
94
+ - - '>='
108
95
  - !ruby/object:Gem::Version
109
96
  version: '0'
110
97
  - !ruby/object:Gem::Dependency
111
98
  name: yard
112
99
  requirement: !ruby/object:Gem::Requirement
113
- none: false
114
100
  requirements:
115
- - - ! '>='
101
+ - - '>='
116
102
  - !ruby/object:Gem::Version
117
103
  version: '0'
118
104
  type: :development
119
105
  prerelease: false
120
106
  version_requirements: !ruby/object:Gem::Requirement
121
- none: false
122
107
  requirements:
123
- - - ! '>='
108
+ - - '>='
124
109
  - !ruby/object:Gem::Version
125
110
  version: '0'
126
- description: ! ' Guest user implementation for devise '
111
+ description: ' Guest user implementation for devise '
127
112
  email: chris@cbeer.info
128
113
  executables: []
129
114
  extensions: []
@@ -160,33 +145,26 @@ files:
160
145
  - spec/spec_helper.rb
161
146
  homepage: http://github.com/cbeer/devise-guests
162
147
  licenses: []
148
+ metadata: {}
163
149
  post_install_message:
164
150
  rdoc_options: []
165
151
  require_paths:
166
152
  - lib
167
153
  required_ruby_version: !ruby/object:Gem::Requirement
168
- none: false
169
154
  requirements:
170
- - - ! '>='
155
+ - - '>='
171
156
  - !ruby/object:Gem::Version
172
157
  version: '0'
173
- segments:
174
- - 0
175
- hash: 3640487035443286190
176
158
  required_rubygems_version: !ruby/object:Gem::Requirement
177
- none: false
178
159
  requirements:
179
- - - ! '>='
160
+ - - '>='
180
161
  - !ruby/object:Gem::Version
181
162
  version: '0'
182
- segments:
183
- - 0
184
- hash: 3640487035443286190
185
163
  requirements: []
186
164
  rubyforge_project:
187
- rubygems_version: 1.8.23
165
+ rubygems_version: 2.0.3
188
166
  signing_key:
189
- specification_version: 3
167
+ specification_version: 4
190
168
  summary: Guest user implementation for devise
191
169
  test_files:
192
170
  - spec/controllers/application_controller_spec.rb