prologue 0.3.6 → 0.3.7

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,8 +1,8 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- prologue (0.3.1)
5
- rails (>= 3.0.0)
4
+ prologue (0.3.7)
5
+ rails (~> 3.0.0)
6
6
  thor
7
7
 
8
8
  GEM
@@ -105,6 +105,6 @@ DEPENDENCIES
105
105
  bundler (~> 1.0.0)
106
106
  cucumber
107
107
  prologue!
108
- rails (>= 3.0.0)
108
+ rails (~> 3.0.0)
109
109
  rspec (~> 2.0.0)
110
110
  thor
@@ -1,3 +1,3 @@
1
1
  module Prologue
2
- VERSION = "0.3.6"
2
+ VERSION = "0.3.7"
3
3
  end
@@ -11,11 +11,11 @@ Gem::Specification.new do |s|
11
11
  s.summary = "prologue-#{s.version}"
12
12
  s.description = "Generate a Rails 3 app with application templates Quick Left uses to start their projects off right!"
13
13
 
14
- s.required_rubygems_version = ">= 1.3.6"
14
+ s.required_rubygems_version = "~> 1.3.6"
15
15
  s.rubyforge_project = "prologue"
16
16
 
17
17
  s.add_dependency "thor"
18
- s.add_dependency('rails', '>= 3.0.0')
18
+ s.add_dependency('rails', '~> 3.0.0')
19
19
  s.add_development_dependency "bundler", "~> 1.0.0"
20
20
  s.add_development_dependency "cucumber"
21
21
  s.add_development_dependency "aruba"
@@ -17,7 +17,7 @@ Feature: Admin dashboard
17
17
  So that I can have full control over the site
18
18
 
19
19
  Scenario: Login as an admin
20
- Given a logged in admin user
20
+ Given a logged in admin
21
21
  When I am on the admin
22
22
  Then I should see "Admin"
23
23
  FILE
@@ -34,14 +34,15 @@ Feature: Administer users
34
34
  Given the following role records
35
35
  | name |
36
36
  | Member |
37
+ And a logged in admin
37
38
 
38
39
  Scenario: Create, update, delete a user in the admin
39
- Given a logged in admin user
40
40
  When I am on the add user page
41
- And I fill in "Name" with "Big Boi"
42
- And I fill in "Email" with "big@sirluciousleftfoot.com"
43
- And I fill in "Password" with "Ch!coDusty$"
44
- And I fill in "Password confirmation" with "Ch!coDusty$"
41
+ And I fill in the following:
42
+ | Email | big@sirluciousleftfoot.com |
43
+ | Name | Big Boi |
44
+ | Password | Ch!coDusty$ |
45
+ | Password confirmation | Ch!coDusty$ |
45
46
  And I check "Member"
46
47
  And I press "Save"
47
48
  Then I should see "User created!"
@@ -25,6 +25,8 @@ create_file 'app/views/admin/shared/_messages.html.haml' do
25
25
  %div#messenger{:class => "flasher"}= flash[:notice]
26
26
  - if flash[:error]
27
27
  %div#error{:class => "flasher"}= flash[:error]
28
+ - if flash[:alert]
29
+ %div#alert{:class => "flasher"}= flash[:alert]
28
30
  FILE
29
31
  end
30
32
 
@@ -17,6 +17,8 @@ create_file 'app/views/shared/_messages.html.haml' do
17
17
  %div#messenger{:class => "flasher"}= flash[:notice]
18
18
  - if flash[:error]
19
19
  %div#error{:class => "flasher"}= flash[:error]
20
+ - if flash[:alert]
21
+ %div#alert{:class => "flasher"}= flash[:alert]
20
22
  FILE
21
23
  end
22
24
 
@@ -3,7 +3,7 @@ create_file 'spec/factories/user.rb' do
3
3
  <<-'FILE'
4
4
  Factory.define :user do |u|
5
5
  u.sequence(:name) { |n| "Quick #{n}" }
6
- u.sequence(:email) { |n| "info.#{n}@quickleft.com" }
6
+ u.sequence(:email) { |n| "user.#{n}@quickleft.com" }
7
7
  u.password "password"
8
8
  u.confirmed_at Time.new.to_s
9
9
  u.confirmation_sent_at Time.new.to_s
@@ -11,7 +11,7 @@ Factory.define :user do |u|
11
11
  end
12
12
 
13
13
  Factory.define :admin, :parent => :user do |admin|
14
- admin.email "quickleft@quickleft.com"
14
+ admin.email "admin@quickleft.com"
15
15
  admin.password "password"
16
16
  admin.roles { [ Factory(:role, :name => 'Admin') ] }
17
17
  end
@@ -37,18 +37,10 @@ When /^I log in as "([^\"]*)" with password "([^\"]*)"$/ do |email, password|
37
37
  click_button("Sign in")
38
38
  end
39
39
 
40
- Given /^a logged in admin user$/ do
41
- Factory.create(:admin)
40
+ Given /^a logged in (\w+)$/ do |usertype|
41
+ Factory.create(usertype.to_sym)
42
42
  visit(new_user_session_path)
43
- fill_in("user[email]", :with => "quickleft@quickleft.com")
44
- fill_in("user[password]", :with => "password")
45
- click_button("Sign in")
46
- end
47
-
48
- Given /^a logged in member user$/ do
49
- Factory.create(:member)
50
- visit(new_user_session_path)
51
- fill_in("user[email]", :with => "member@quickleft.com")
43
+ fill_in("user[email]", :with => "#{usertype}@quickleft.com")
52
44
  fill_in("user[password]", :with => "password")
53
45
  click_button("Sign in")
54
46
  end
@@ -57,8 +49,8 @@ When /^I log out$/ do
57
49
  visit(destroy_user_session_path)
58
50
  end
59
51
 
60
- Given /^a user "([^\"]*)"$/ do |email|
61
- Factory.create(:user, :email => email)
52
+ Given /^an? (\w+) "([^\"]*)"$/ do |usertype, email|
53
+ Factory.create(usertype.to_sym, :email => email)
62
54
  end
63
55
  FILE
64
56
  end
@@ -3,7 +3,7 @@ create_file 'Gemfile', "source 'http://rubygems.org'\n"
3
3
  gem "rails", "~> 3.0.0"
4
4
  gem "sqlite3-ruby", :require => "sqlite3"
5
5
  if ENV['PROLOGUE_AUTH']
6
- gem 'devise', ">= 1.1.3"
6
+ gem 'devise', "~> 1.1.3"
7
7
  end
8
8
  if ENV['PROLOGUE_ROLES']
9
9
  gem 'cancan'
@@ -12,7 +12,7 @@ gem "hoptoad_notifier"
12
12
  gem "jammit"
13
13
  gem "friendly_id", "~> 3.1"
14
14
  gem "will_paginate", "~> 3.0.pre2"
15
- gem "haml", ">= 3.0.21"
15
+ gem "haml", "~> 3.0.21"
16
16
  gem "rails3-generators", :group => :development
17
17
  gem "hpricot", :group => :development
18
18
  gem "ruby_parser", :group => :development
@@ -26,7 +26,7 @@ gem "thin", :group => [:test, :cucumber, :development]
26
26
  gem "cucumber", :group => [:cucumber]
27
27
  gem "database_cleaner", :group => [:test, :cucumber]
28
28
  gem "cucumber-rails", :group => [:cucumber]
29
- gem "capybara", "0.4.0", :group => [:cucumber]
29
+ gem "capybara", "~> 0.4.0", :group => [:cucumber]
30
30
  gem "launchy", :group => [:cucumber]
31
31
  gem "timecop", :group => [:test, :cucumber]
32
32
  gem "pickle", :group => [:test, :cucumber]
@@ -20,12 +20,29 @@ gsub_file 'features/support/env.rb',/require 'cucumber\/rails\/capybara_javascri
20
20
 
21
21
  run 'mkdir spec/factories'
22
22
 
23
- create_file 'features/step_definitions/helper_steps.rb' do
23
+ create_file 'features/step_definitions/web_steps_extended.rb' do
24
24
  <<-'FILE'
25
25
  When /^I confirm a js popup on the next step$/ do
26
26
  page.evaluate_script("window.alert = function(msg) { return true; }")
27
27
  page.evaluate_script("window.confirm = function(msg) { return true; }")
28
28
  end
29
+
30
+ When /^I perform the following actions:$/ do |table|
31
+ table.hashes.each do |row|
32
+ case row['Action']
33
+ when 'Fill in'
34
+ Given "I fill in \"#{row['Field']}\" with \"#{row['Value']}\""
35
+ when 'Check'
36
+ if row['Value'] =~ /true/
37
+ Given "I check \"#{row['Field']}\""
38
+ else
39
+ Given "I uncheck \"#{row['Field']}\""
40
+ end
41
+ when 'Choose'
42
+ Given "I choose \"#{row['Field']}\""
43
+ end
44
+ end
45
+ end
29
46
  FILE
30
47
  end
31
48
 
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 3
8
- - 6
9
- version: 0.3.6
8
+ - 7
9
+ version: 0.3.7
10
10
  platform: ruby
11
11
  authors:
12
12
  - Quick Left
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-11-05 00:00:00 -06:00
17
+ date: 2010-11-12 00:00:00 -07:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
@@ -36,7 +36,7 @@ dependencies:
36
36
  requirement: &id002 !ruby/object:Gem::Requirement
37
37
  none: false
38
38
  requirements:
39
- - - ">="
39
+ - - ~>
40
40
  - !ruby/object:Gem::Version
41
41
  segments:
42
42
  - 3
@@ -171,7 +171,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
171
171
  required_rubygems_version: !ruby/object:Gem::Requirement
172
172
  none: false
173
173
  requirements:
174
- - - ">="
174
+ - - ~>
175
175
  - !ruby/object:Gem::Version
176
176
  segments:
177
177
  - 1
@@ -184,6 +184,6 @@ rubyforge_project: prologue
184
184
  rubygems_version: 1.3.7
185
185
  signing_key:
186
186
  specification_version: 3
187
- summary: prologue-0.3.6
187
+ summary: prologue-0.3.7
188
188
  test_files: []
189
189