saucy 0.5.2 → 0.5.3

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/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ 0.5.3
2
+
3
+ Removes uniqueness constraint on account names
4
+
1
5
  0.5.2
2
6
 
3
7
  Simplifies the signup process to asking users for just an email and password.
data/app/models/signup.rb CHANGED
@@ -97,7 +97,11 @@ class Signup
97
97
  private
98
98
 
99
99
  def short_name
100
- email.split(/@/).first if email.present?
100
+ if email.present?
101
+ email.split(/@/).first
102
+ elsif user && user.email.present?
103
+ existing_user.email.split(/@/).first
104
+ end
101
105
  end
102
106
 
103
107
  def populate_additional_account_fields
data/lib/saucy/account.rb CHANGED
@@ -19,7 +19,7 @@ module Saucy
19
19
 
20
20
  delegate :free?, :billed?, :trial?, :to => :plan
21
21
 
22
- validates_uniqueness_of :name, :keyword
22
+ validates_uniqueness_of :keyword
23
23
  validates_presence_of :name, :keyword, :plan_id
24
24
 
25
25
  attr_accessible :name, :keyword
@@ -8,7 +8,6 @@ describe Account do
8
8
  it { should have_many(:projects) }
9
9
  it { should belong_to(:plan) }
10
10
 
11
- it { should validate_uniqueness_of(:name) }
12
11
  it { should validate_uniqueness_of(:keyword) }
13
12
  it { should validate_presence_of( :name) }
14
13
  it { should validate_presence_of(:keyword) }
@@ -78,7 +78,6 @@ describe Signup, "with a valid user and account" do
78
78
  end
79
79
 
80
80
  it "gives a friendly account keyword" do
81
- p subject.account
82
81
  subject.account.keyword.should =~ /^user.+/
83
82
  end
84
83
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: saucy
3
3
  version: !ruby/object:Gem::Version
4
- hash: 15
4
+ hash: 13
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 5
9
- - 2
10
- version: 0.5.2
9
+ - 3
10
+ version: 0.5.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - thoughtbot, inc.