update gems -- mainly omniauth (we explicitly include omniauth libs now... much cleaner)

This commit is contained in:
Daniel Grippi 2011-12-05 19:52:17 -08:00
parent 548c225102
commit 0d41c9c5f3
17 changed files with 178 additions and 210 deletions

19
Gemfile
View file

@ -5,7 +5,7 @@ gem 'rails', '3.0.11'
gem 'bundler', '>= 1.0.0' gem 'bundler', '>= 1.0.0'
gem 'foreman' gem 'foreman'
gem 'thin', '1.2.11', :require => false gem 'thin', '~> 1.3.1', :require => false
# authentication # authentication
@ -13,8 +13,13 @@ gem 'devise', '~> 1.3.1'
gem 'devise_invitable', '0.5.0' gem 'devise_invitable', '0.5.0'
gem 'jwt', "0.1.3" gem 'jwt', "0.1.3"
gem 'oauth2-provider', '0.0.16' gem 'oauth2-provider', '0.0.16'
gem 'omniauth', '0.2.6'
gem 'twitter', '1.5.0' gem 'omniauth', '1.0.1'
gem 'omniauth-facebook'
gem 'omniauth-tumblr'
gem 'omniauth-twitter'
gem 'twitter', '2.0.1'
# backups # backups
@ -93,7 +98,7 @@ gem 'http_accept_language', :git => 'git://github.com/iain/http_accept_language.
# views # views
gem 'haml', '3.1.2' gem 'haml', '3.1.4'
gem 'mobile-fu' gem 'mobile-fu'
gem 'sass', '3.1.7' gem 'sass', '3.1.7'
gem 'will_paginate', '3.0.pre2' gem 'will_paginate', '3.0.pre2'
@ -118,19 +123,19 @@ end
group :test do group :test do
gem 'capybara', '~> 0.3.9' gem 'capybara', '~> 0.3.9'
gem 'cucumber-rails', '0.3.2' gem 'cucumber-rails', '0.3.2'
gem 'cucumber-api-steps', :require => false gem 'cucumber-api-steps', '0.6', :require => false
gem 'database_cleaner', '0.6.0' gem 'database_cleaner', '0.6.0'
gem 'diaspora-client', :git => 'git://github.com/diaspora/diaspora-client.git' gem 'diaspora-client', :git => 'git://github.com/diaspora/diaspora-client.git'
#"0.1.0", #:path => '~/workspace/diaspora-client' #"0.1.0", #:path => '~/workspace/diaspora-client'
gem 'factory_girl_rails' gem 'factory_girl_rails'
gem 'fixture_builder', '0.3.0' gem 'fixture_builder', '0.3.0'
gem 'fuubar' gem 'fuubar', '0.0.5'
gem 'mongrel', :require => false, :platforms => :ruby_18 gem 'mongrel', :require => false, :platforms => :ruby_18
gem 'rspec', '>= 2.0.0' gem 'rspec', '>= 2.0.0'
gem 'rspec-core', '2.6.0' gem 'rspec-core', '2.6.0'
gem 'rspec-instafail', '>= 0.1.7', :require => false gem 'rspec-instafail', '>= 0.1.7', :require => false
gem 'rspec-rails', '>= 2.0.0' gem 'rspec-rails', '>= 2.0.0'
gem "selenium-webdriver", "~> 2.10.0" gem 'selenium-webdriver', '~> 2.14.0'
gem 'webmock', :require => false gem 'webmock', :require => false
gem 'sqlite3' gem 'sqlite3'
gem 'mock_redis' gem 'mock_redis'

View file

@ -9,7 +9,7 @@ GIT
GIT GIT
remote: git://github.com/MikeSofaer/sod.git remote: git://github.com/MikeSofaer/sod.git
revision: 08e990601bfa6ffd3224a2e4c792df9eae712693 revision: e7fb74b412ec9dcd6b18f29c2accca6375cacdcf
specs: specs:
sod (0.0.1) sod (0.0.1)
net-scp net-scp
@ -31,13 +31,13 @@ GIT
GIT GIT
remote: git://github.com/diaspora/diaspora-client.git remote: git://github.com/diaspora/diaspora-client.git
revision: a1b6c480fa3caa8ce24912dda471579de842aa51 revision: 04fffe5d8eebc11653716e501de755c51f5cd884
specs: specs:
diaspora-client (0.1.1) diaspora-client (0.1.2)
activerecord activerecord
faraday faraday
jwt (>= 0.1.3) jwt (>= 0.1.3)
oauth2 (= 0.4.1) oauth2 (= 0.5.0)
sinatra sinatra
GIT GIT
@ -129,18 +129,18 @@ GEM
ohai (>= 0.5.7) ohai (>= 0.5.7)
rest-client (>= 1.0.4, < 1.7.0) rest-client (>= 1.0.4, < 1.7.0)
uuidtools uuidtools
childprocess (0.2.2) childprocess (0.2.3)
ffi (~> 1.0.6) ffi (~> 1.0.6)
client_side_validations (3.1.0) client_side_validations (3.1.3)
closure-compiler (1.1.4) closure-compiler (1.1.4)
cloudfiles (1.4.10) cloudfiles (1.4.10)
mime-types (>= 1.16) mime-types (>= 1.16)
columnize (0.3.4) columnize (0.3.5)
crack (0.3.1) crack (0.3.1)
cucumber (1.1.0) cucumber (1.1.3)
builder (>= 2.1.2) builder (>= 2.1.2)
diff-lcs (>= 1.1.2) diff-lcs (>= 1.1.2)
gherkin (~> 2.5.0) gherkin (~> 2.6.7)
json (>= 1.4.6) json (>= 1.4.6)
term-ansicolor (>= 1.0.6) term-ansicolor (>= 1.0.6)
cucumber-api-steps (0.6) cucumber-api-steps (0.6)
@ -169,22 +169,20 @@ GEM
eventmachine (0.12.10) eventmachine (0.12.10)
excon (0.2.4) excon (0.2.4)
extlib (0.9.15) extlib (0.9.15)
factory_girl (2.1.2) factory_girl (2.3.2)
activesupport activesupport
factory_girl_rails (1.2.0) factory_girl_rails (1.4.0)
factory_girl (~> 2.1.0) factory_girl (~> 2.3.0)
railties (>= 3.0.0) railties (>= 3.0.0)
faraday (0.6.1) faraday (0.7.0)
addressable (~> 2.2.4) addressable (~> 2.2.4)
multipart-post (~> 1.1.0) multipart-post (~> 1.1.0)
rack (>= 1.1.0, < 2) rack (>= 1.1.0, < 2)
faraday-stack (0.1.3) faraday-stack (0.1.3)
faraday (~> 0.6) faraday (~> 0.6)
faraday_middleware (0.6.5)
faraday (~> 0.6.0)
fastercsv (1.5.4) fastercsv (1.5.4)
fastthread (1.0.7) fastthread (1.0.7)
ffi (1.0.9) ffi (1.0.11)
fixture_builder (0.3.0) fixture_builder (0.3.0)
activerecord (>= 2) activerecord (>= 2)
activesupport (>= 2) activesupport (>= 2)
@ -198,20 +196,20 @@ GEM
nokogiri (~> 1.4.3.1) nokogiri (~> 1.4.3.1)
ruby-hmac ruby-hmac
foreigner (0.9.1) foreigner (0.9.1)
foreman (0.24.0) foreman (0.27.0)
term-ansicolor (~> 1.0.5) term-ansicolor (~> 1.0.5)
thor (>= 0.13.6) thor (>= 0.13.6)
formatador (0.2.1) formatador (0.2.1)
fuubar (0.0.6) fuubar (0.0.5)
rspec (~> 2.0) rspec (~> 2.0)
rspec-instafail (~> 0.1.8) rspec-instafail (~> 0.1.4)
ruby-progressbar (~> 0.0.10) ruby-progressbar (~> 0.0.10)
gem_plugin (0.2.3) gem_plugin (0.2.3)
gherkin (2.5.2) gherkin (2.6.9)
json (>= 1.4.6) json (>= 1.4.6)
haml (3.1.2) haml (3.1.4)
hashie (1.0.0) hashie (1.2.0)
highline (1.6.2) highline (1.6.8)
hoptoad_notifier (2.4.11) hoptoad_notifier (2.4.11)
activesupport activesupport
builder builder
@ -231,9 +229,8 @@ GEM
rack (>= 1.1) rack (>= 1.1)
rspec (>= 1.3.1) rspec (>= 1.3.1)
selenium-webdriver (>= 0.1.3) selenium-webdriver (>= 0.1.3)
jasmine-core (1.2.0.rc1) jasmine-core (1.1.0)
json (1.4.6) json (1.4.6)
json_pure (1.6.1)
jsonpath (0.4.2) jsonpath (0.4.2)
multi_json multi_json
jwt (0.1.3) jwt (0.1.3)
@ -265,11 +262,9 @@ GEM
daemons (>= 1.0.3) daemons (>= 1.0.3)
fastthread (>= 1.0.1) fastthread (>= 1.0.1)
gem_plugin (>= 0.2.3) gem_plugin (>= 0.2.3)
multi_json (1.0.3) multi_json (1.0.4)
multi_xml (0.2.2) multipart-post (1.1.4)
multipart-post (1.1.3)
mysql2 (0.2.13) mysql2 (0.2.13)
net-ldap (0.2.2)
net-scp (1.0.4) net-scp (1.0.4)
net-ssh (>= 1.99.1) net-ssh (>= 1.99.1)
net-sftp (2.0.5) net-sftp (2.0.5)
@ -279,36 +274,10 @@ GEM
net-ssh (>= 1.99.1) net-ssh (>= 1.99.1)
newrelic_rpm (3.3.0) newrelic_rpm (3.3.0)
nokogiri (1.4.3.1) nokogiri (1.4.3.1)
oa-basic (0.2.6)
oa-core (= 0.2.6)
rest-client (~> 1.6.0)
oa-core (0.2.6)
oa-enterprise (0.2.6)
addressable (= 2.2.4)
net-ldap (~> 0.2.2)
nokogiri (~> 1.4.2)
oa-core (= 0.2.6)
pyu-ruby-sasl (~> 0.0.3.1)
rubyntlm (~> 0.1.1)
oa-more (0.2.6)
multi_json (~> 1.0.0)
oa-core (= 0.2.6)
rest-client (~> 1.6.0)
oa-oauth (0.2.6)
faraday (~> 0.6.1)
multi_json (~> 1.0.0)
multi_xml (~> 0.2.2)
oa-core (= 0.2.6)
oauth (~> 0.4.0)
oauth2 (~> 0.4.1)
oa-openid (0.2.6)
oa-core (= 0.2.6)
rack-openid (~> 1.3.1)
ruby-openid-apps-discovery (~> 1.2.0)
oauth (0.4.5) oauth (0.4.5)
oauth2 (0.4.1) oauth2 (0.5.0)
faraday (~> 0.6.1) faraday (>= 0.6.1, < 0.8)
multi_json (>= 0.0.5) multi_json (~> 1.0.0)
oauth2-provider (0.0.16) oauth2-provider (0.0.16)
activesupport (~> 3.0.1) activesupport (~> 3.0.1)
addressable (~> 2.2) addressable (~> 2.2)
@ -319,28 +288,32 @@ GEM
mixlib-config mixlib-config
mixlib-log mixlib-log
systemu systemu
omniauth (0.2.6) omniauth (1.0.1)
oa-basic (= 0.2.6) hashie (~> 1.2)
oa-core (= 0.2.6) rack
oa-enterprise (= 0.2.6) omniauth-facebook (1.0.0)
oa-more (= 0.2.6) omniauth-oauth2 (~> 1.0.0)
oa-oauth (= 0.2.6) omniauth-oauth (1.0.0)
oa-openid (= 0.2.6) oauth
open4 (1.2.0) omniauth (~> 1.0)
omniauth-oauth2 (1.0.0)
oauth2 (~> 0.5.0)
omniauth (~> 1.0)
omniauth-tumblr (1.0)
omniauth-oauth (~> 1.0)
omniauth-twitter (0.0.7)
omniauth-oauth (~> 1.0)
open4 (1.3.0)
orm_adapter (0.0.5) orm_adapter (0.0.5)
parallel (0.5.9) parallel (0.5.9)
parallel_tests (0.6.7) parallel_tests (0.6.11)
parallel parallel
polyglot (0.3.3) polyglot (0.3.3)
pyu-ruby-sasl (0.0.3.3)
rack (1.2.4) rack (1.2.4)
rack-mobile-detect (0.3.0) rack-mobile-detect (0.3.0)
rack rack
rack-mount (0.6.14) rack-mount (0.6.14)
rack (>= 1.0.0) rack (>= 1.0.0)
rack-openid (1.3.1)
rack (>= 1.1.0)
ruby-openid (>= 2.1.8)
rack-test (0.5.7) rack-test (0.5.7)
rack (>= 1.0) rack (>= 1.0)
rails (3.0.11) rails (3.0.11)
@ -351,7 +324,7 @@ GEM
activesupport (= 3.0.11) activesupport (= 3.0.11)
bundler (~> 1.0) bundler (~> 1.0)
railties (= 3.0.11) railties (= 3.0.11)
rails-i18n (0.1.11) rails-i18n (0.2.0)
i18n (~> 0.5) i18n (~> 0.5)
railties (3.0.11) railties (3.0.11)
actionpack (= 3.0.11) actionpack (= 3.0.11)
@ -360,8 +333,6 @@ GEM
rdoc (~> 3.4) rdoc (~> 3.4)
thor (~> 0.14.4) thor (~> 0.14.4)
rake (0.9.2.2) rake (0.9.2.2)
rash (0.3.0)
hashie (~> 1.0.0)
rdoc (3.11) rdoc (3.11)
json (~> 1.4) json (~> 1.4)
redcarpet (2.0.0b5) redcarpet (2.0.0b5)
@ -373,9 +344,9 @@ GEM
redis-namespace (~> 0.8.0) redis-namespace (~> 0.8.0)
sinatra (>= 0.9.2) sinatra (>= 0.9.2)
vegas (~> 0.1.2) vegas (~> 0.1.2)
resque-ensure-connected (0.1.0) resque-ensure-connected (0.2.0)
activerecord (>= 2.3.5) activerecord (>= 2.3.5)
resque (~> 1.10.0) resque (>= 1.10.0)
resque-timeout (1.0.0) resque-timeout (1.0.0)
resque (~> 1.0) resque (~> 1.0)
rest-client (1.6.1) rest-client (1.6.1)
@ -387,7 +358,7 @@ GEM
rspec-core (2.6.0) rspec-core (2.6.0)
rspec-expectations (2.6.0) rspec-expectations (2.6.0)
diff-lcs (~> 1.1.2) diff-lcs (~> 1.1.2)
rspec-instafail (0.1.8) rspec-instafail (0.1.9)
rspec-mocks (2.6.0) rspec-mocks (2.6.0)
rspec-rails (2.6.1) rspec-rails (2.6.1)
actionpack (~> 3.0) actionpack (~> 3.0)
@ -408,31 +379,27 @@ GEM
linecache19 (>= 0.5.11) linecache19 (>= 0.5.11)
ruby-debug-base19 (>= 0.11.19) ruby-debug-base19 (>= 0.11.19)
ruby-hmac (0.4.0) ruby-hmac (0.4.0)
ruby-oembed (0.8.3) ruby-oembed (0.8.5)
ruby-openid (2.1.8)
ruby-openid-apps-discovery (1.2.0)
ruby-openid (>= 2.1.7)
ruby-progressbar (0.0.10) ruby-progressbar (0.0.10)
ruby_core_source (0.1.5) ruby_core_source (0.1.5)
archive-tar-minitar (>= 0.5.2) archive-tar-minitar (>= 0.5.2)
rubyntlm (0.1.1) rubyzip (0.9.5)
rubyzip (0.9.4)
sass (3.1.7) sass (3.1.7)
selenium-webdriver (2.10.0) selenium-webdriver (2.14.0)
childprocess (>= 0.2.1) childprocess (>= 0.2.1)
ffi (= 1.0.9) ffi (~> 1.0.9)
json_pure multi_json (~> 1.0.4)
rubyzip rubyzip
settingslogic (2.0.6) settingslogic (2.0.6)
simple_oauth (0.1.5) simple_oauth (0.1.5)
sinatra (1.2.7) sinatra (1.2.7)
rack (~> 1.1) rack (~> 1.1)
tilt (>= 1.2.2, < 2.0) tilt (>= 1.2.2, < 2.0)
sqlite3 (1.3.4) sqlite3 (1.3.5)
subexec (0.0.4) subexec (0.0.4)
systemu (2.4.0) systemu (2.4.1)
term-ansicolor (1.0.7) term-ansicolor (1.0.7)
thin (1.2.11) thin (1.3.1)
daemons (>= 1.0.9) daemons (>= 1.0.9)
eventmachine (>= 0.12.6) eventmachine (>= 0.12.6)
rack (>= 1.0.0) rack (>= 1.0.0)
@ -441,16 +408,12 @@ GEM
treetop (1.4.10) treetop (1.4.10)
polyglot polyglot
polyglot (>= 0.3.1) polyglot (>= 0.3.1)
twitter (1.5.0) twitter (2.0.1)
faraday (~> 0.6.1) activesupport (>= 2.3.9, < 4)
faraday_middleware (~> 0.6.3) faraday (~> 0.7)
hashie (~> 1.0.0) multi_json (~> 1.0)
multi_json (~> 1.0.0) simple_oauth (~> 0.1)
multi_xml (~> 0.2.0) typhoeus (0.3.3)
rash (~> 0.3.0)
simple_oauth (~> 0.1.5)
typhoeus (0.2.4)
mime-types
mime-types mime-types
tzinfo (0.3.31) tzinfo (0.3.31)
uuidtools (2.1.2) uuidtools (2.1.2)
@ -463,7 +426,7 @@ GEM
crack (>= 0.1.7) crack (>= 0.1.7)
will_paginate (3.0.pre2) will_paginate (3.0.pre2)
xml-simple (1.1.1) xml-simple (1.1.1)
yard (0.7.2) yard (0.7.4)
yui-compressor (0.9.6) yui-compressor (0.9.6)
POpen4 (>= 0.1.4) POpen4 (>= 0.1.4)
@ -485,7 +448,7 @@ DEPENDENCIES
chef (= 0.9.12) chef (= 0.9.12)
client_side_validations client_side_validations
cloudfiles (= 1.4.10) cloudfiles (= 1.4.10)
cucumber-api-steps cucumber-api-steps (= 0.6)
cucumber-rails (= 0.3.2) cucumber-rails (= 0.3.2)
database_cleaner (= 0.6.0) database_cleaner (= 0.6.0)
devise (~> 1.3.1) devise (~> 1.3.1)
@ -502,8 +465,8 @@ DEPENDENCIES
fog (= 0.3.25) fog (= 0.3.25)
foreigner (= 0.9.1) foreigner (= 0.9.1)
foreman foreman
fuubar fuubar (= 0.0.5)
haml (= 3.1.2) haml (= 3.1.4)
hoptoad_notifier hoptoad_notifier
http_accept_language! http_accept_language!
i18n-inflector-rails (~> 1.0) i18n-inflector-rails (~> 1.0)
@ -522,7 +485,10 @@ DEPENDENCIES
nokogiri nokogiri
oauth2-provider (= 0.0.16) oauth2-provider (= 0.0.16)
ohai (= 0.5.8) ohai (= 0.5.8)
omniauth (= 0.2.6) omniauth (= 1.0.1)
omniauth-facebook
omniauth-tumblr
omniauth-twitter
parallel_tests parallel_tests
rails (= 3.0.11) rails (= 3.0.11)
rails-i18n rails-i18n
@ -540,12 +506,12 @@ DEPENDENCIES
ruby-debug19 ruby-debug19
ruby-oembed ruby-oembed
sass (= 3.1.7) sass (= 3.1.7)
selenium-webdriver (~> 2.10.0) selenium-webdriver (~> 2.14.0)
settingslogic (= 2.0.6) settingslogic (= 2.0.6)
sod! sod!
sqlite3 sqlite3
thin (= 1.2.11) thin (~> 1.3.1)
twitter (= 1.5.0) twitter (= 2.0.1)
typhoeus typhoeus
vanna! vanna!
webmock webmock

View file

@ -3,9 +3,9 @@ Feature: API
as an epic developer as an epic developer
I need to get user's info I need to get user's info
Scenario: Getting a users public profile Scenario: Getting a users public profile
Given a user named "Maxwell S" with email "maxwell@example.com" Given a user named "Maxwell S" with email "maxwell@example.com"
And I send and accept JSON And I send and accept JSON
When I send a GET request to "/api/v0/users/maxwell_s" When I send a GET request for "/api/v0/users/maxwell_s"
Then the response status should be "200" Then the response status should be "200"
And the JSON response should have "first_name" with the text "Maxwell" And the JSON response should have "first_name" with the text "Maxwell"

View file

@ -1,5 +1,5 @@
When /^I click on "([^"]*)" aspect edit icon$/ do |aspect_name| When /^I click on "([^"]*)" aspect edit icon$/ do |aspect_name|
When %{I hover over the "ul.sub_nav > li:contains('#{aspect_name}')"} step %{I hover over the "ul.sub_nav > li:contains('#{aspect_name}')"}
within("#aspect_nav") do within("#aspect_nav") do
find(:xpath, "//a[@rel='facebox'][.//img[@title='Edit #{aspect_name}']]").click find(:xpath, "//a[@rel='facebox'][.//img[@title='Edit #{aspect_name}']]").click
end end
@ -10,19 +10,19 @@ When /^I select only "([^"]*)" aspect$/ do |aspect_name|
click_link 'Select all' if has_link? 'Select all' click_link 'Select all' if has_link? 'Select all'
end end
And %{I wait for the ajax to finish} step %{I wait for the ajax to finish}
within('#aspect_nav') do within('#aspect_nav') do
click_link 'Deselect all' if has_link? 'Deselect all' click_link 'Deselect all' if has_link? 'Deselect all'
end end
And %{I wait for the ajax to finish} step %{I wait for the ajax to finish}
within('#aspect_nav') do within('#aspect_nav') do
click_link aspect_name click_link aspect_name
end end
And %{I wait for the ajax to finish} step %{I wait for the ajax to finish}
end end
When /^I should see "([^"]*)" aspect selected$/ do |aspect_name| When /^I should see "([^"]*)" aspect selected$/ do |aspect_name|

View file

@ -5,22 +5,22 @@ Then /^"([^"]*)" should be part of active conversation$/ do |name|
end end
Then /^I send a message with subject "([^"]*)" and text "([^"]*)" to "([^"]*)"$/ do |subject, text, person| Then /^I send a message with subject "([^"]*)" and text "([^"]*)" to "([^"]*)"$/ do |subject, text, person|
Given %(I am on the conversations page) step %(I am on the conversations page)
And %(I follow "New Message") step %(I follow "New Message")
And %(I wait for the ajax to finish) step %(I wait for the ajax to finish)
And %(I fill in "contact_autocomplete" with "#{person}" in the modal window) step %(I fill in "contact_autocomplete" with "#{person}" in the modal window)
And %(I press the first ".as-result-item" within ".as-results" in the modal window) step %(I press the first ".as-result-item" within ".as-results" in the modal window)
And %(I fill in "conversation_subject" with "#{subject}" in the modal window) step %(I fill in "conversation_subject" with "#{subject}" in the modal window)
And %(I fill in "conversation_text" with "#{text}" in the modal window) step %(I fill in "conversation_text" with "#{text}" in the modal window)
And %(I press "Send" in the modal window) step %(I press "Send" in the modal window)
And %(I wait for the ajax to finish) step %(I wait for the ajax to finish)
end end
When /^I reply with "([^"]*)"$/ do |text| When /^I reply with "([^"]*)"$/ do |text|
When %(I am on the conversations page) step %(I am on the conversations page)
And %(I press the first ".conversation" within ".conversations") step %(I press the first ".conversation" within ".conversations")
And %(I wait for the ajax to finish) step %(I wait for the ajax to finish)
And %(I fill in "message_text" with "#{text}") step %(I fill in "message_text" with "#{text}")
And %(I press "Reply") step %(I press "Reply")
And %(I wait for the ajax to finish) step %(I wait for the ajax to finish)
end end

View file

@ -1,6 +1,6 @@
When /^(.*) in the header$/ do |action| When /^(.*) in the header$/ do |action|
within('header') do within('header') do
When action step action
end end
end end
@ -25,11 +25,11 @@ And /^I toggle the aspect "([^"]*)"$/ do |aspect_name|
end end
Then /^the publisher should be collapsed$/ do Then /^the publisher should be collapsed$/ do
find("#publisher")["class"].should include("closed") find("#publisher")["class"].should include("closed")
end end
Then /^the publisher should be expanded$/ do Then /^the publisher should be expanded$/ do
find("#publisher")["class"].should_not include("closed") find("#publisher")["class"].should_not include("closed")
end end
When /^I append "([^"]*)" to the publisher$/ do |stuff| When /^I append "([^"]*)" to the publisher$/ do |stuff|
@ -91,7 +91,7 @@ end
When /^(.*) in the modal window$/ do |action| When /^(.*) in the modal window$/ do |action|
within('#facebox') do within('#facebox') do
When action step action
end end
end end
@ -133,9 +133,9 @@ When /^I attach the file "([^\"]*)" to hidden element "([^\"]*)"(?: within "([^\
JS JS
if selector if selector
When "I attach the file \"#{Rails.root.join(path).to_s}\" to \"#{field}\" within \"#{selector}\"" step "I attach the file \"#{Rails.root.join(path).to_s}\" to \"#{field}\" within \"#{selector}\""
else else
When "I attach the file \"#{Rails.root.join(path).to_s}\" to \"#{field}\"" step "I attach the file \"#{Rails.root.join(path).to_s}\" to \"#{field}\""
end end
page.execute_script <<-JS page.execute_script <<-JS
@ -148,7 +148,7 @@ Then /^I should get download alert$/ do
end end
When /^I search for "([^\"]*)"$/ do |search_term| When /^I search for "([^\"]*)"$/ do |search_term|
When "I fill in \"q\" with \"#{search_term}\"" step "I fill in \"q\" with \"#{search_term}\""
page.execute_script <<-JS page.execute_script <<-JS
var e = jQuery.Event("keypress"); var e = jQuery.Event("keypress");
e.keyCode = 13; e.keyCode = 13;
@ -197,11 +197,11 @@ end
Then /^I follow Edit Profile in the same window$/ do Then /^I follow Edit Profile in the same window$/ do
page.execute_script("$('a[href=\"#{edit_profile_path}\"]').removeAttr('target')") page.execute_script("$('a[href=\"#{edit_profile_path}\"]').removeAttr('target')")
And %(I follow "Edit Profile") step %(I follow "Edit Profile")
end end
Then 'I should see an image attached to the post' do Then 'I should see an image attached to the post' do
Then %{I should see a "img" within ".stream_element div.photo_attachments"} step %{I should see a "img" within ".stream_element div.photo_attachments"}
end end
Then 'I press the attached image' do Then 'I press the attached image' do

View file

@ -37,7 +37,7 @@ Given %r{^I have a (.+)$} do |model_name|
end end
Given %r{^I have the following (.+):$} do |child, table| Given %r{^I have the following (.+):$} do |child, table|
Given "that me has the following #{child}:", table step "that me has the following #{child}:", table
end end
Given %r{^the following (.+):$} do |model_name, table| Given %r{^the following (.+):$} do |model_name, table|

View file

@ -1,13 +1,13 @@
Then 'I should see the photo lightbox' do Then 'I should see the photo lightbox' do
Then %{I should see a "img" within "#lightbox-imageset"} step %{I should see a "img" within "#lightbox-imageset"}
And %{I should see a "#lightbox-backdrop" within "body"} step %{I should see a "#lightbox-backdrop" within "body"}
And %{I should see a "#lightbox-image" within "body"} step %{I should see a "#lightbox-image" within "body"}
end end
Then 'I should not see the photo lightbox' do Then 'I should not see the photo lightbox' do
Then %{I should not see a "img" within "#lightbox-imageset"} step %{I should not see a "img" within "#lightbox-imageset"}
And %{I should not see a "#lightbox-backdrop" within "body"} step %{I should not see a "#lightbox-backdrop" within "body"}
And %{I should not see a "#lightbox-image" within "body"} step %{I should not see a "#lightbox-image" within "body"}
end end
Then 'I press the close lightbox link' do Then 'I press the close lightbox link' do
@ -16,4 +16,4 @@ end
Then 'I press the lightbox backdrop' do Then 'I press the lightbox backdrop' do
find(:css, "#lightbox-backdrop").click find(:css, "#lightbox-backdrop").click
end end

View file

@ -33,26 +33,26 @@ end
When /^I try to authorize Chubbies$/ do When /^I try to authorize Chubbies$/ do
# We need to reset the tokens saved in Chubbies, # We need to reset the tokens saved in Chubbies,
# as we are clearing the Diaspora DB every scenario # as we are clearing the Diaspora DB every scenario
Then 'I visit "/new" on Chubbies' step 'I visit "/new" on Chubbies'
### ###
And "I fill in my Diaspora ID to connect" step "I fill in my Diaspora ID to connect"
And 'I press "Connect to Diaspora"' step 'I press "Connect to Diaspora"'
Then 'I should be on the new user session page' step 'I should be on the new user session page'
And "I fill in \"Username\" with \"#{@me.username}\"" step "I fill in \"Username\" with \"#{@me.username}\""
And "I fill in \"Password\" with \"#{@me.password}\"" step "I fill in \"Password\" with \"#{@me.password}\""
And 'I press "Sign in"' step 'I press "Sign in"'
Then 'I should be on the oauth authorize page' step 'I should be on the oauth authorize page'
Then 'I should see "Chubbies"' step 'I should see "Chubbies"'
And 'I should see "The best way to chub."' step 'I should see "The best way to chub."'
end end
And /^I fill in my Diaspora ID to connect$/ do And /^I fill in my Diaspora ID to connect$/ do
And "I fill in \"Diaspora ID\" with \"#{@me.diaspora_handle}\"" step "I fill in \"Diaspora ID\" with \"#{@me.diaspora_handle}\""
end end
And /^I should have (\d) user on Chubbies$/ do |num| And /^I should have (\d) user on Chubbies$/ do |num|
When "I visit \"/user_count\" on Chubbies" step "I visit \"/user_count\" on Chubbies"
Then "I should see \"#{num}\"" step "I should see \"#{num}\""
end end
When /^I visit "([^"]+)" on Chubbies$/ do |path| When /^I visit "([^"]+)" on Chubbies$/ do |path|

View file

@ -1,10 +1,8 @@
module SectionLocator module SectionLocator
def within_parent(content, elements = ['*'], &block) def within_parent(content, elements = ['*'], &block)
expr = %(//*[(#{elements.join('|')})/descendant-or-self::*[contains(., "#{content}")]]) expr = %(//*[(#{elements.join('|')})/descendant-or-self::*[contains(., "#{content}")]])
within(expr, &block) within(expr, &block)
end end
end end
World(SectionLocator) World(SectionLocator)
@ -13,18 +11,18 @@ sections = %w(h1 h2 h3 h4 h5 h6 legend caption dt strong header)
When /^(.*) in the "([^\"]*)" section$/ do |action, title| When /^(.*) in the "([^\"]*)" section$/ do |action, title|
within_parent(title, sections) do within_parent(title, sections) do
When action step action
end end
end end
When /^(.*) in the "([^\"]*)" section:$/ do |action, title, table| When /^(.*) in the "([^\"]*)" section:$/ do |action, title, table|
within_parent(title, sections) do within_parent(title, sections) do
When "#{action}:", table step "#{action}:", table
end end
end end
When /^(.*) in the "([^\"]*)" row$/ do |action, title| When /^(.*) in the "([^\"]*)" row$/ do |action, title|
within_parent(title, %w(th td)) do within_parent(title, %w(th td)) do
When action step action
end end
end end

View file

@ -1,43 +1,43 @@
Given /^(?:I am signed in|I sign in)$/ do Given /^(?:I am signed in|I sign in)$/ do
When %(I try to sign in) step %(I try to sign in)
wait_until { page.has_content?("#{@me.first_name} #{@me.last_name}") } wait_until { page.has_content?("#{@me.first_name} #{@me.last_name}") }
end end
When /^I try to sign in$/ do When /^I try to sign in$/ do
@me ||= Factory(:user_with_aspect, :getting_started => false) @me ||= Factory(:user_with_aspect, :getting_started => false)
page.driver.visit(new_integration_sessions_path(:user_id => @me.id)) page.driver.visit(new_integration_sessions_path(:user_id => @me.id))
And %(I press "Login") step %(I press "Login")
And %(I am on the homepage) step %(I am on the homepage)
# To save time as compared to: # To save time as compared to:
#When %(I go to the new user session page) #step %(I go to the new user session page)
#When %(I fill in "Username" with "#{@me.username}") #step %(I fill in "Username" with "#{@me.username}")
#When %(I fill in "Password" with "#{@me.password}") #step %(I fill in "Password" with "#{@me.password}")
#When %(I press "Sign in") #step %(I press "Sign in")
end end
When /^I try to sign in manually$/ do When /^I try to sign in manually$/ do
When %(I go to the new user session page) step %(I go to the new user session page)
When %(I fill in "Username" with "#{@me.username}") step %(I fill in "Username" with "#{@me.username}")
When %(I fill in "Password" with "#{@me.password}") step %(I fill in "Password" with "#{@me.password}")
When %(I press "Sign in") step %(I press "Sign in")
end end
When /^I sign in as "([^"]*)"$/ do |email| When /^I sign in as "([^"]*)"$/ do |email|
@me = User.find_by_email(email) @me = User.find_by_email(email)
@me.password ||= 'password' @me.password ||= 'password'
Given 'I am signed in' step 'I am signed in'
end end
When /^I sign in with password "([^"]*)"$/ do |password| When /^I sign in with password "([^"]*)"$/ do |password|
@me.password = password @me.password = password
Given 'I am signed in' step 'I am signed in'
end end
When /^I put in my password in "([^"]*)"$/ do |field| When /^I put in my password in "([^"]*)"$/ do |field|
When %(I fill in "#{field}" with "#{@me.password}") step %(I fill in "#{field}" with "#{@me.password}")
end end
When /^I (?:log|sign) out$/ do When /^I (?:log|sign) out$/ do
When 'I click on my name in the header' step 'I click on my name in the header'
And 'I follow "Log out"' step 'I follow "Log out"'
end end

View file

@ -1,30 +1,30 @@
Given /^configuration parameter (\w+) is ([^ ]+)$/ do |key, value| Given /^configuration parameter (\w+) is ([^ ]+)$/ do |key, value|
require Rails.root.join('config', "initializers", "_load_app_config.rb") require Rails.root.join('config', "initializers", "_load_app_config.rb")
app_value = AppConfig[ key.to_sym] app_value = AppConfig[ key.to_sym]
assert_equal value, app_value, assert_equal value, app_value,
"You must set #{key} to #{value} and kill running server" "You must set #{key} to #{value} and kill running server"
end end
When /^I visit url ([^ ]+)$/ do |url| When /^I visit url ([^ ]+)$/ do |url|
visit( url) visit( url)
end end
Then /^I should find '([^']*)' in ([^ ]+)$/ do |pattern,file| Then /^I should find '([^']*)' in ([^ ]+)$/ do |pattern,file|
found = %x!fgrep -o #{pattern} #{file}! found = %x!fgrep -o #{pattern} #{file}!
assert_equal pattern, found.chomp, "Can't find pattern in #{file}" assert_equal pattern, found.chomp, "Can't find pattern in #{file}"
end end
Then /^I should match '([^']*)' in ([^ ]+)$/ do |pattern,file| Then /^I should match '([^']*)' in ([^ ]+)$/ do |pattern,file|
found = `egrep -o '#{pattern}' #{file}` found = `egrep -o '#{pattern}' #{file}`
assert_match /#{pattern}/, found.chomp, "Can't find #{pattern} in #{file}" assert_match /#{pattern}/, found.chomp, "Can't find #{pattern} in #{file}"
end end
When /^I retrieve ([^ ]+) into ([^ ]+)$/ do |url,file| When /^I retrieve ([^ ]+) into ([^ ]+)$/ do |url,file|
system( "wget -q -O #{file} #{url}") system( "wget -q -O #{file} #{url}")
end end
Then /^a page\-asset should be ([^ ]+)$/ do |asset_path| Then /^a page\-asset should be ([^ ]+)$/ do |asset_path|
page.has_content?(asset_path) page.has_content?(asset_path)
end end

View file

@ -72,7 +72,7 @@ end
Given /^there is a user "([^\"]*)" who's tagged "([^\"]*)"$/ do |full_name, tag| Given /^there is a user "([^\"]*)" who's tagged "([^\"]*)"$/ do |full_name, tag|
username = full_name.gsub(/\W/, "").underscore username = full_name.gsub(/\W/, "").underscore
Given "a user named \"#{full_name}\" with email \"#{username}@example.com\"" step "a user named \"#{full_name}\" with email \"#{username}@example.com\""
user = User.find_by_username(username) user = User.find_by_username(username)
user.profile.tag_string = tag user.profile.tag_string = tag
user.profile.build_tags user.profile.build_tags

View file

@ -4,7 +4,6 @@
# instead of editing this one. Cucumber will automatically load all features/**/*.rb # instead of editing this one. Cucumber will automatically load all features/**/*.rb
# files. # files.
require 'uri' require 'uri'
require 'cgi' require 'cgi'
require File.expand_path(File.join(File.dirname(__FILE__), "..", "support", "paths")) require File.expand_path(File.join(File.dirname(__FILE__), "..", "support", "paths"))
@ -64,7 +63,7 @@ end
When /^(?:|I )fill in the following(?: within "([^"]*)")?:$/ do |selector, fields| When /^(?:|I )fill in the following(?: within "([^"]*)")?:$/ do |selector, fields|
with_scope(selector) do with_scope(selector) do
fields.rows_hash.each do |name, value| fields.rows_hash.each do |name, value|
When %{I fill in "#{name}" with "#{value}"} step %{I fill in "#{name}" with "#{value}"}
end end
end end
end end

View file

@ -68,7 +68,7 @@ DIASPORA* ALPHA
<div class='span-24 last' style=''> <div class='span-24 last' style=''>
<div id='landing_content'> <div id='landing_content'>
<div class='ilya'> <div class='ilya'>
<a href="https://joindiaspora.com/u/ilya"><img alt="Seed" src="https://db78ml4vyrxnw.cloudfront.net/seed.jpg" /></a> <a href="https://joindiaspora.com/u/ilya"><img alt="Seed" src="https://db78ml4vyrxnw.cloudfront.net/seed.jpg" /></a>
<div class='memory'> <div class='memory'>
<h1>Ilya Zhitomirskiy</h1> <h1>Ilya Zhitomirskiy</h1>
<h2>1989-2011</h2> <h2>1989-2011</h2>

View file

@ -11,15 +11,15 @@ describe Webfinger do
let(:user1) { alice } let(:user1) { alice }
let(:user2) { eve } let(:user2) { eve }
let(:account) {"foo@tom.joindiaspora.com"} let(:account) { "foo@tom.joindiaspora.com" }
let(:person){ Factory(:person, :diaspora_handle => account)} let(:person) { Factory(:person, :diaspora_handle => account) }
let(:finger){Webfinger.new(account)} let(:finger) { Webfinger.new(account) }
let(:good_request) { FakeHttpRequest.new(:success)} let(:good_request) { FakeHttpRequest.new(:success) }
let(:diaspora_xrd) {puts "requiring host-meta"; File.open(File.join(Rails.root, 'spec', 'fixtures', 'host-meta.fixture.html')).read} let(:diaspora_xrd) { File.open(File.join(Rails.root, 'spec', 'fixtures', 'host-meta.fixture.html')).read }
let(:diaspora_finger) {File.open(File.join(Rails.root, 'spec', 'fixtures', 'webfinger.fixture.html')).read} let(:diaspora_finger) { File.open(File.join(Rails.root, 'spec', 'fixtures', 'webfinger.fixture.html')).read }
let(:hcard_xml) {File.open(File.join(Rails.root, 'spec', 'fixtures', 'hcard.fixture.html')).read} let(:hcard_xml) { File.open(File.join(Rails.root, 'spec', 'fixtures', 'hcard.fixture.html')).read }
context 'setup' do context 'setup' do
@ -28,7 +28,7 @@ describe Webfinger do
n = Webfinger.new("mbs348@gmail.com") n = Webfinger.new("mbs348@gmail.com")
n.instance_variable_get(:@account).should_not be nil n.instance_variable_get(:@account).should_not be nil
end end
it 'downcases account' do it 'downcases account' do
account = "BIGBOY@Example.Org" account = "BIGBOY@Example.Org"
n = Webfinger.new(account) n = Webfinger.new(account)

View file

@ -30,7 +30,7 @@ describe Services::Twitter do
describe "#profile_photo_url" do describe "#profile_photo_url" do
it 'returns the original profile photo url' do it 'returns the original profile photo url' do
stub_request(:get, "https://api.twitter.com/1/users/profile_image/joindiaspora.json?size=original"). stub_request(:get, "https://api.twitter.com/1/users/profile_image/joindiaspora?size=original").
to_return(:status => 302, :body => "", :headers => {:location => "http://a2.twimg.com/profile_images/uid/avatar.png"}) to_return(:status => 302, :body => "", :headers => {:location => "http://a2.twimg.com/profile_images/uid/avatar.png"})
@service.nickname = "joindiaspora" @service.nickname = "joindiaspora"