ubiquitous_user 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
data/README.rdoc CHANGED
@@ -15,41 +15,34 @@ user = userObject.
15
15
  This library also provides an authorize method, to use as a filter for those
16
16
  actions that really require a logged in user.
17
17
 
18
- An important consideration is that users should be mergeable now. If you have
19
- a user with an account, and that user comes back a month latter, he may start
20
- to operate your site with the new ghost account and only log in latter on. At
21
- that moment you should merge the accounts.
18
+ The user model and how to authenticate is your responsibility; ubiquity_user
19
+ doesn't try solve those problem (not yet at least). I may recommend
20
+ {rails_openid}[http://github.com/pupeno/rails_openid] for authentication, but
21
+ maybe it's only because I wrote it.
22
+
23
+ Since people just accessing your web site will have a user, people that is
24
+ already registered at your web site may have an anonymous user with activity in
25
+ it. You should try to merge it.
22
26
 
23
27
  == Installation
24
28
 
25
- This gem is provided through Gemcutter so you need to have gem configured to
26
- pull gems from Gemcutter.
29
+ This gem is provided through RubyGems.org so you need to have gem configured to
30
+ pull gems from RubyGems.org.
27
31
 
28
- === Enabling Gemcutter
32
+ === Enabling RubyGems.org (formerly known as GemCutter)
29
33
 
30
- A properly configured environment would be like this:
34
+ You can skip this if you have RubyGems.org enabled (which is going to be the
35
+ default in the future anyway). A properly configured environment should list
36
+ rubygems.org or gemcutter.org in the gem sources, like:
31
37
 
32
38
  $ gem sources
33
39
  *** CURRENT SOURCES ***
34
-
35
- http://gemcutter.org
36
- http://gems.rubyforge.org/
37
- http://gems.github.com
38
-
39
- If you don't have http://gemcutter.org in your sources then you need to add. I
40
- know two ways to do. One is installing Gemcutter and running gem tumble:
41
40
 
42
- $ sudo gem install gemcutter
43
- $ gem tumble
41
+ http://rubygems.org/
44
42
 
45
- Be careful that gem tumble will remove Gemcutter from your repositories if it's
46
- already there.
43
+ If you don't have it, you can probably add it this way:
47
44
 
48
- The other way is by hand like this:
49
-
50
- $ gem source -a http://gemcutter.org
51
-
52
- I'm not sure if there's any difference. I think there isn't one.
45
+ $ gem source -a http://rubygems.org/
53
46
 
54
47
  === Installing ubiquitous_user manually
55
48
 
@@ -59,7 +52,21 @@ It's simple a matter of running:
59
52
 
60
53
  and that's it. Let me know if something breaks.
61
54
 
62
- === Installing through your Ruby on Rails project
55
+ === Installing through your Ruby on Rails 3 project
56
+
57
+ In the +Gemfile+ file of your Ruby on Rails project you'll need to add:
58
+
59
+ gem "ubiquitous_user"
60
+
61
+ after that run
62
+
63
+ bundle install
64
+
65
+ and watch the magic happen, all required gems will be installed. Configuring
66
+ your Rails project like that is something you'll need anyway, so this is my
67
+ recommended way.
68
+
69
+ === Installing through your Ruby on Rails 2.3 project
63
70
 
64
71
  In the +environment.rb+ file of your Ruby on Rails project you'll have some
65
72
  commented out lines like this:
@@ -120,7 +127,7 @@ You can use user= and authorize in the controllers, for example:
120
127
  end
121
128
 
122
129
  Another interesting method is the authorize generator, which allows you to
123
- specify the message you want to give the authorization is not granted. For
130
+ specify the message you want to give when the authorization is not granted. For
124
131
  example:
125
132
 
126
133
  class ProfilesController < ApplicationController
data/Rakefile CHANGED
@@ -1,3 +1,6 @@
1
+ # coding: utf-8
2
+ # Copyright 2010 J. Pablo Fernández
3
+
1
4
  require 'rubygems'
2
5
  require 'rake'
3
6
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.0
1
+ 0.3.1
@@ -1,3 +1,6 @@
1
+ # coding: utf-8
2
+ # Copyright 2010 J. Pablo Fernández
3
+
1
4
  module UsableConfig
2
5
  @user_model = :User
3
6
  @user_model_new = :new
data/test/helper.rb CHANGED
@@ -1,8 +1,10 @@
1
+ # coding: utf-8
2
+ # Copyright 2010 J. Pablo Fernández
3
+
1
4
  require 'rubygems'
2
5
  require 'test/unit'
3
6
  require 'shoulda'
4
7
  require 'mocha'
5
- require 'ruby-debug'
6
8
 
7
9
  $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
8
10
  $LOAD_PATH.unshift(File.dirname(__FILE__))
@@ -1,3 +1,6 @@
1
+ # coding: utf-8
2
+ # Copyright 2010 J. Pablo Fernández
3
+
1
4
  require 'helper'
2
5
 
3
6
  class TestUbiquitousUser < Test::Unit::TestCase
metadata CHANGED
@@ -1,7 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ubiquitous_user
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ prerelease: false
5
+ segments:
6
+ - 0
7
+ - 3
8
+ - 1
9
+ version: 0.3.1
5
10
  platform: ruby
6
11
  authors:
7
12
  - "J. Pablo Fern\xC3\xA1ndez"
@@ -9,19 +14,23 @@ autorequire:
9
14
  bindir: bin
10
15
  cert_chain: []
11
16
 
12
- date: 2009-12-26 00:00:00 +01:00
17
+ date: 2010-03-07 00:00:00 +01:00
13
18
  default_executable:
14
19
  dependencies:
15
20
  - !ruby/object:Gem::Dependency
16
21
  name: actionpack
17
- type: :runtime
18
- version_requirement:
19
- version_requirements: !ruby/object:Gem::Requirement
22
+ prerelease: false
23
+ requirement: &id001 !ruby/object:Gem::Requirement
20
24
  requirements:
21
25
  - - ">="
22
26
  - !ruby/object:Gem::Version
27
+ segments:
28
+ - 2
29
+ - 0
30
+ - 0
23
31
  version: 2.0.0
24
- version:
32
+ type: :runtime
33
+ version_requirements: *id001
25
34
  description: Create accounts for users right away, even when they are anonymous.
26
35
  email: pupeno@pupeno.com
27
36
  executables: []
@@ -53,18 +62,20 @@ required_ruby_version: !ruby/object:Gem::Requirement
53
62
  requirements:
54
63
  - - ">="
55
64
  - !ruby/object:Gem::Version
65
+ segments:
66
+ - 0
56
67
  version: "0"
57
- version:
58
68
  required_rubygems_version: !ruby/object:Gem::Requirement
59
69
  requirements:
60
70
  - - ">="
61
71
  - !ruby/object:Gem::Version
72
+ segments:
73
+ - 0
62
74
  version: "0"
63
- version:
64
75
  requirements: []
65
76
 
66
77
  rubyforge_project:
67
- rubygems_version: 1.3.5
78
+ rubygems_version: 1.3.6
68
79
  signing_key:
69
80
  specification_version: 3
70
81
  summary: Helpers to get and retrieve users ubiquitously