muck-users 0.1.10 → 0.1.11

Sign up to get free protection for your applications and to get access to all the features.
data/README.rdoc CHANGED
@@ -48,6 +48,8 @@ Route to a public user page (this could also go to home etc. if needed)
48
48
  map.public_user_path '/profiles/:id', :controller => 'profiles', :action => 'show'
49
49
  This is the path that a user will be redirected to if they attempt to access another user's dashboard page.
50
50
 
51
+ muck-users sends out emails that need to be able to generate links. Be sure to set a value for application_url in global_config.yml
52
+
51
53
 
52
54
  == General information
53
55
  This engine implements authlogic. Some of the code contained was taken from here:
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.10
1
+ 0.1.11
@@ -39,15 +39,16 @@ class UserMailer < ActionMailer::Base
39
39
  def username_request(user)
40
40
  setup_email(user)
41
41
  subject I18n.t('muck.users.request_username_subject', :application_name => GlobalConfig.application_name)
42
- body :login => user.login,
42
+ body :user => user,
43
43
  :application_name => GlobalConfig.application_name
44
44
  end
45
45
 
46
46
  protected
47
- def setup_email(user)
48
- recipients user.email
49
- from "#{GlobalConfig.application_name} <#{GlobalConfig.from_email_name}>"
50
- sent_on Time.now
51
- end
47
+ def setup_email(user)
48
+ recipients user.email
49
+ from "#{GlobalConfig.application_name} <#{GlobalConfig.from_email_name}>"
50
+ sent_on Time.now
51
+ content_type "text/html" # There is a bug in Rails that prevents multipart emails from working inside an engine. See: https://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/2263-rails-232-breaks-implicit-multipart-actionmailer-tests#ticket-2263-22
52
+ end
52
53
 
53
54
  end
data/muck-users.gemspec CHANGED
@@ -2,11 +2,11 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{muck-users}
5
- s.version = "0.1.10"
5
+ s.version = "0.1.11"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Justin Ball"]
9
- s.date = %q{2009-06-25}
9
+ s.date = %q{2009-06-26}
10
10
  s.description = %q{Easily add user signup, login and other features to your application}
11
11
  s.email = %q{justinball@gmail.com}
12
12
  s.extra_rdoc_files = [
@@ -114,7 +114,6 @@ Gem::Specification.new do |s|
114
114
  "locales/zh.yml",
115
115
  "muck-users-0.1.4.gem",
116
116
  "muck-users.gemspec",
117
- "pkg/muck-users-0.1.9.gem",
118
117
  "public/images/profile_default.jpg",
119
118
  "rails/init.rb",
120
119
  "rdoc/classes/ActionController.html",
@@ -51,6 +51,15 @@ class UserMailerTest < ActiveSupport::TestCase
51
51
  assert_equal email.from, GlobalConfig.from_email
52
52
  end
53
53
 
54
+ should "send username request email" do
55
+ user = Factory(:user)
56
+ response = UserMailer.deliver_username_request(user)
57
+ assert !ActionMailer::Base.deliveries.empty?, "No email was sent"
58
+ email = ActionMailer::Base.deliveries.last
59
+ assert_equal email.to, [user.email]
60
+ assert_equal email.from, GlobalConfig.from_email
61
+ end
62
+
54
63
  should "send welcome email" do
55
64
  user = Factory(:user)
56
65
  response = UserMailer.deliver_welcome_notification(user)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: muck-users
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.10
4
+ version: 0.1.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Ball
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-06-25 00:00:00 -06:00
12
+ date: 2009-06-26 00:00:00 -06:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -162,7 +162,6 @@ files:
162
162
  - locales/zh.yml
163
163
  - muck-users-0.1.4.gem
164
164
  - muck-users.gemspec
165
- - pkg/muck-users-0.1.9.gem
166
165
  - public/images/profile_default.jpg
167
166
  - rails/init.rb
168
167
  - rdoc/classes/ActionController.html
Binary file