saucy 0.5.5 → 0.6.0

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.
@@ -1,3 +1,10 @@
1
+ 0.6.0
2
+
3
+ Upgrading to, and making an explicit dependency on Clearance ~> 0.11.0. You can
4
+ get an overview of the important changes to clearance here:
5
+
6
+ https://github.com/thoughtbot/clearance/wiki/upgrading-clearance
7
+
1
8
  0.5.5
2
9
 
3
10
  Fixes for account and project keywords containing special characters, generated by signup
data/Gemfile CHANGED
@@ -5,7 +5,7 @@ gem "rake"
5
5
  gem "rspec-rails", :require => false
6
6
  gem "rails", ">= 3.0.3"
7
7
  gem "thin"
8
- gem "clearance", :git => "git://github.com/thoughtbot/clearance.git", :require => false
8
+ gem "clearance", "~> 0.11.0"
9
9
  gem "shoulda", :require => false
10
10
  gem "bourne", :require => false
11
11
  gem "sqlite3", :require => false
@@ -1,10 +1,3 @@
1
- GIT
2
- remote: git://github.com/thoughtbot/clearance.git
3
- revision: 7fb410051e0e7cce758883c98ec7b13824265cd0
4
- specs:
5
- clearance (0.9.1)
6
- rails (~> 3.0.0)
7
-
8
1
  GEM
9
2
  remote: http://rubygems.org/
10
3
  specs:
@@ -57,6 +50,9 @@ GEM
57
50
  celerity (0.8.8)
58
51
  childprocess (0.1.7)
59
52
  ffi (~> 0.6.3)
53
+ clearance (0.11.1)
54
+ diesel (~> 0.1.4)
55
+ rails (~> 3.0.0)
60
56
  configuration (1.2.0)
61
57
  cucumber (0.9.4)
62
58
  builder (~> 2.1.2)
@@ -69,6 +65,8 @@ GEM
69
65
  culerity (0.2.15)
70
66
  daemons (1.1.0)
71
67
  database_cleaner (0.6.0)
68
+ diesel (0.1.4)
69
+ railties (~> 3.0.3)
72
70
  diff-lcs (1.1.2)
73
71
  dynamic_form (1.1.3)
74
72
  erubis (2.6.6)
@@ -170,7 +168,7 @@ DEPENDENCIES
170
168
  bourne
171
169
  braintree
172
170
  capybara
173
- clearance!
171
+ clearance (~> 0.11.0)
174
172
  cucumber
175
173
  cucumber-rails
176
174
  database_cleaner
@@ -1,5 +1,5 @@
1
1
  class AccountsController < ApplicationController
2
- before_filter :authenticate, :only => [:index, :edit, :update]
2
+ before_filter :authorize, :only => [:index, :edit, :update]
3
3
  before_filter :authorize_admin, :except => [:new, :create, :index]
4
4
  before_filter :ensure_active_account, :only => [:edit, :update]
5
5
  layout Saucy::Layouts.to_proc
@@ -1,7 +1,7 @@
1
1
  class InvitationsController < ApplicationController
2
2
  before_filter :authorize_admin, :except => [:show, :update]
3
3
  before_filter :ensure_account_within_users_limit, :only => [:new, :create]
4
- skip_before_filter :authenticate, :only => [:show, :update]
4
+ skip_before_filter :authorize, :only => [:show, :update]
5
5
  layout Saucy::Layouts.to_proc
6
6
 
7
7
  def new
@@ -1,7 +1,7 @@
1
1
  class ProfilesController < ApplicationController
2
2
  layout Saucy::Layouts.to_proc
3
3
 
4
- before_filter :authenticate
4
+ before_filter :authorize
5
5
 
6
6
  def edit
7
7
  @user = current_user
@@ -8,8 +8,7 @@ class Invitation < ActiveRecord::Base
8
8
  before_create :generate_code
9
9
  after_create :deliver_invitation
10
10
 
11
- attr_accessor :new_user_name, :new_user_password,
12
- :new_user_password_confirmation, :authenticating_user_password, :existing_user
11
+ attr_accessor :new_user_name, :new_user_password, :authenticating_user_password, :existing_user
13
12
  attr_writer :new_user_email, :authenticating_user_email
14
13
  attr_protected :account_id, :used
15
14
  attr_reader :user
@@ -79,7 +78,6 @@ class Invitation < ActiveRecord::Base
79
78
  User.new(
80
79
  :email => new_user_email,
81
80
  :password => new_user_password,
82
- :password_confirmation => new_user_password_confirmation,
83
81
  :name => new_user_name
84
82
  )
85
83
  end
@@ -111,7 +111,6 @@ class Signup
111
111
 
112
112
  def populate_additional_user_fields
113
113
  user.name = short_name
114
- user.password_confirmation = password
115
114
  end
116
115
 
117
116
  def delegate_attributes_for(model_name)
@@ -8,7 +8,6 @@
8
8
  <%= form.input :new_user_email, :label => 'Email' %>
9
9
  <%= form.input :new_user_name, :label => 'Name' %>
10
10
  <%= form.input :new_user_password, :label => 'Password' %>
11
- <%= form.input :new_user_password_confirmation, :label => 'Confirm password' %>
12
11
  <% end -%>
13
12
 
14
13
  <h5 class="legend">I am an existing user</h5>
@@ -1,6 +1,5 @@
1
1
  <%= form.inputs do %>
2
2
  <%= form.input :email %>
3
3
  <%= form.input :password %>
4
- <%= form.input :password_confirmation, :label => "Confirm password", :required => true %>
5
4
  <% end %>
6
5
 
@@ -27,7 +27,6 @@
27
27
 
28
28
  <%= form.inputs do %>
29
29
  <%= form.input :password, :label => "New password", :required => true %>
30
- <%= form.input :password_confirmation, :label => "Confirm password", :required => true %>
31
30
  <% end %>
32
31
 
33
32
  <%= form.buttons do %>
@@ -2,8 +2,8 @@ When /^I bootstrap the application for clearance$/ do
2
2
  steps %{
3
3
  When I remove the file "public/index.html"
4
4
  And I successfully run "rails generate cucumber:install"
5
- And I successfully run "rails generate clearance"
6
- And I successfully run "rails generate clearance_features"
5
+ And I successfully run "rails generate clearance:install"
6
+ And I successfully run "rails generate clearance:features"
7
7
  And I configure ActionMailer to use "www.example.com" as a host
8
8
  And I add flash messages to the layout
9
9
  And I add session links to the layout
@@ -21,7 +21,7 @@ DESC
21
21
  end
22
22
 
23
23
  def remove_conflicting_files
24
- remove_file "features/sign_up.feature"
24
+ remove_file "features/clearance/visitor_signs_up.feature"
25
25
  remove_file "spec/factories/clearance.rb"
26
26
  remove_file "test/factories/clearance.rb"
27
27
  end
@@ -10,7 +10,6 @@ Factory.define :user do |user|
10
10
  user.name { "test user" }
11
11
  user.email { Factory.next :email }
12
12
  user.password { "password" }
13
- user.password_confirmation { "password" }
14
13
  end
15
14
 
16
15
  Factory.define :account do |f|
@@ -23,7 +23,6 @@ Feature: Managing users
23
23
  And I fill in the following new user:
24
24
  | Name | Billy |
25
25
  | Password | secret |
26
- | Confirm password | secret |
27
26
  And I press "Accept Invitation"
28
27
  Then I should be signed in
29
28
  And "invitee@example.com" should be a member of the "See me" project
@@ -34,8 +33,8 @@ Feature: Managing users
34
33
 
35
34
  Scenario: Invite existing user who is not signed in
36
35
  Given the following user exists:
37
- | email | password | password confirmation |
38
- | invitee@example.com | secret | secret |
36
+ | email | password |
37
+ | invitee@example.com | secret |
39
38
  When I follow "Invite user"
40
39
  And I fill in "Email" with "invitee@example.com"
41
40
  And I press "Invite User"
@@ -50,8 +49,8 @@ Feature: Managing users
50
49
 
51
50
  Scenario: Invite existing user who is signed in
52
51
  Given the following user exists:
53
- | email | password | password confirmation |
54
- | invitee@example.com | secret | secret |
52
+ | email | password |
53
+ | invitee@example.com | secret |
55
54
  When I follow "Invite user"
56
55
  And I fill in "Email" with "invitee@example.com"
57
56
  And I press "Invite User"
@@ -72,8 +71,8 @@ Feature: Managing users
72
71
 
73
72
  Scenario: Invite admin users
74
73
  Given the following user exists:
75
- | email | password | password confirmation |
76
- | invitee@example.com | secret | secret |
74
+ | email | password |
75
+ | invitee@example.com | secret |
77
76
  When I follow "Invite user"
78
77
  And I fill in "Email" with "invitee@example.com"
79
78
  And I check "Grant administrator privileges"
@@ -20,7 +20,7 @@ end
20
20
 
21
21
  When /^I sign in as "([^"\/]*)"$/ do |email|
22
22
  user = User.find_by_email!(email)
23
- user.update_attributes!(:password => 'test', :password_confirmation => 'test')
23
+ user.update_attributes!(:password => 'test')
24
24
  When %{I sign in as "#{email}/test"}
25
25
  end
26
26
 
@@ -3,7 +3,7 @@ module Saucy
3
3
  extend ActiveSupport::Concern
4
4
 
5
5
  included do
6
- before_filter :authenticate
6
+ before_filter :authorize
7
7
  before_filter :authorize_member, :only => :show
8
8
  before_filter :authorize_admin, :except => [:show]
9
9
  before_filter :ensure_active_account, :only => [:show, :destroy, :index]
@@ -3,7 +3,7 @@ module Saucy
3
3
  extend ActiveSupport::Concern
4
4
 
5
5
  included do
6
- attr_accessible :name, :project_ids, :email, :password_confirmation, :password
6
+ attr_accessible :name, :project_ids, :email, :password
7
7
  has_many :memberships
8
8
  has_many :accounts, :through => :memberships
9
9
  has_many :permissions
@@ -10,8 +10,7 @@ describe Invitation do
10
10
  it { should_not allow_mass_assignment_of(:account_id) }
11
11
  it { should_not allow_mass_assignment_of(:used) }
12
12
 
13
- %w(new_user_name new_user_email new_user_password
14
- new_user_password_confirmation authenticating_user_password).each do |attribute|
13
+ %w(new_user_name new_user_email new_user_password authenticating_user_password).each do |attribute|
15
14
  it "allows assignment of #{attribute}" do
16
15
  should respond_to(attribute)
17
16
  should respond_to(:"#{attribute}=")
@@ -74,9 +73,7 @@ describe Invitation, "valid accept for a new user" do
74
73
  subject { Factory(:invitation, :account => account, :projects => projects) }
75
74
 
76
75
  let!(:result) do
77
- subject.accept(:new_user_password => password,
78
- :new_user_password_confirmation => password,
79
- :new_user_name => name)
76
+ subject.accept(:new_user_password => password, :new_user_name => name)
80
77
  end
81
78
 
82
79
  let(:user) { subject.user }
@@ -131,9 +128,7 @@ end
131
128
 
132
129
  describe Invitation, "valid accept for an existing user authenticating" do
133
130
  let(:password) { 'secret' }
134
- let(:user) { Factory(:user,
135
- :password => password,
136
- :password_confirmation => password) }
131
+ let(:user) { Factory(:user, :password => password) }
137
132
  subject { Factory(:invitation, :email => user.email) }
138
133
  let(:account) { subject.account }
139
134
 
@@ -242,9 +237,7 @@ describe Invitation, "valid accept for a new user" do
242
237
  subject { Factory(:invitation, :account => account, :projects => projects) }
243
238
 
244
239
  let!(:result) do
245
- subject.accept(:new_user_password => password,
246
- :new_user_password_confirmation => password,
247
- :new_user_name => name)
240
+ subject.accept(:new_user_password => password, :new_user_name => name)
248
241
  end
249
242
 
250
243
  let(:user) { subject.user }
@@ -313,9 +306,7 @@ end
313
306
 
314
307
  describe Invitation, "accepting an admin invite" do
315
308
  let(:password) { 'secret' }
316
- let(:user) { Factory(:user,
317
- :password => password,
318
- :password_confirmation => password) }
309
+ let(:user) { Factory(:user, :password => password) }
319
310
  subject { Factory(:invitation, :email => user.email, :admin => true) }
320
311
  let(:account) { subject.account }
321
312
 
@@ -124,9 +124,7 @@ describe Signup, "valid with an existing user and correct password" do
124
124
  it_should_behave_like "valid signup"
125
125
  let(:email) { "user@example.com" }
126
126
  let(:password) { "test" }
127
- let!(:user) { Factory(:user, :email => email,
128
- :password => password,
129
- :password_confirmation => password) }
127
+ let!(:user) { Factory(:user, :email => email, :password => password) }
130
128
  subject { Factory.build(:signup, :email => email, :password => password) }
131
129
  before { @result = subject.save }
132
130
 
@@ -160,9 +158,7 @@ describe Signup, "valid with an existing user and incorrect password" do
160
158
  it_should_behave_like "invalid signup"
161
159
  let(:email) { "user@example.com" }
162
160
  let(:password) { "test" }
163
- let!(:user) { Factory(:user, :email => email,
164
- :password => password,
165
- :password_confirmation => password) }
161
+ let!(:user) { Factory(:user, :email => email, :password => password) }
166
162
  subject { Factory.build(:signup, :email => email, :password => 'wrong') }
167
163
  before { @result = subject.save }
168
164
 
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: 1
4
+ hash: 7
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
- - 5
9
- - 5
10
- version: 0.5.5
8
+ - 6
9
+ - 0
10
+ version: 0.6.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - thoughtbot, inc.
@@ -18,13 +18,29 @@ autorequire:
18
18
  bindir: bin
19
19
  cert_chain: []
20
20
 
21
- date: 2011-04-28 00:00:00 -04:00
21
+ date: 2011-05-02 00:00:00 -04:00
22
22
  default_executable:
23
23
  dependencies:
24
24
  - !ruby/object:Gem::Dependency
25
- name: formtastic
25
+ name: clearance
26
26
  prerelease: false
27
27
  requirement: &id001 !ruby/object:Gem::Requirement
28
+ none: false
29
+ requirements:
30
+ - - ~>
31
+ - !ruby/object:Gem::Version
32
+ hash: 51
33
+ segments:
34
+ - 0
35
+ - 11
36
+ - 0
37
+ version: 0.11.0
38
+ type: :runtime
39
+ version_requirements: *id001
40
+ - !ruby/object:Gem::Dependency
41
+ name: formtastic
42
+ prerelease: false
43
+ requirement: &id002 !ruby/object:Gem::Requirement
28
44
  none: false
29
45
  requirements:
30
46
  - - ">="
@@ -35,11 +51,11 @@ dependencies:
35
51
  - 2
36
52
  version: "1.2"
37
53
  type: :runtime
38
- version_requirements: *id001
54
+ version_requirements: *id002
39
55
  - !ruby/object:Gem::Dependency
40
56
  name: railties
41
57
  prerelease: false
42
- requirement: &id002 !ruby/object:Gem::Requirement
58
+ requirement: &id003 !ruby/object:Gem::Requirement
43
59
  none: false
44
60
  requirements:
45
61
  - - ">="
@@ -51,11 +67,11 @@ dependencies:
51
67
  - 3
52
68
  version: 3.0.3
53
69
  type: :runtime
54
- version_requirements: *id002
70
+ version_requirements: *id003
55
71
  - !ruby/object:Gem::Dependency
56
72
  name: braintree
57
73
  prerelease: false
58
- requirement: &id003 !ruby/object:Gem::Requirement
74
+ requirement: &id004 !ruby/object:Gem::Requirement
59
75
  none: false
60
76
  requirements:
61
77
  - - ">="
@@ -67,11 +83,11 @@ dependencies:
67
83
  - 2
68
84
  version: 2.6.2
69
85
  type: :runtime
70
- version_requirements: *id003
86
+ version_requirements: *id004
71
87
  - !ruby/object:Gem::Dependency
72
88
  name: sham_rack
73
89
  prerelease: false
74
- requirement: &id004 !ruby/object:Gem::Requirement
90
+ requirement: &id005 !ruby/object:Gem::Requirement
75
91
  none: false
76
92
  requirements:
77
93
  - - "="
@@ -83,11 +99,11 @@ dependencies:
83
99
  - 3
84
100
  version: 1.3.3
85
101
  type: :runtime
86
- version_requirements: *id004
102
+ version_requirements: *id005
87
103
  - !ruby/object:Gem::Dependency
88
104
  name: sinatra
89
105
  prerelease: false
90
- requirement: &id005 !ruby/object:Gem::Requirement
106
+ requirement: &id006 !ruby/object:Gem::Requirement
91
107
  none: false
92
108
  requirements:
93
109
  - - ">="
@@ -99,11 +115,11 @@ dependencies:
99
115
  - 2
100
116
  version: 1.1.2
101
117
  type: :runtime
102
- version_requirements: *id005
118
+ version_requirements: *id006
103
119
  - !ruby/object:Gem::Dependency
104
120
  name: aruba
105
121
  prerelease: false
106
- requirement: &id006 !ruby/object:Gem::Requirement
122
+ requirement: &id007 !ruby/object:Gem::Requirement
107
123
  none: false
108
124
  requirements:
109
125
  - - "="
@@ -115,7 +131,7 @@ dependencies:
115
131
  - 6
116
132
  version: 0.2.6
117
133
  type: :development
118
- version_requirements: *id006
134
+ version_requirements: *id007
119
135
  description: Clearance-based Rails engine for Software as a Service (Saas) that provides account and project management
120
136
  email: support@thoughtbot.com
121
137
  executables: []