Skip to content

Commit

Permalink
Merge branch 'release/0.40.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
Dave Haeffner committed Dec 12, 2014
2 parents a144752 + 266831e commit 09b0db2
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 3 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# The Internet 0.39.0 (12-11-2014)
# The Internet 0.40.0 (12-12-2014)
=======

An example application that captures prominent and ugly functionality found on the web. Perfect for writing automated acceptance tests against.
Expand All @@ -17,6 +17,7 @@ Deployed and available at [http://the-internet.herokuapp.com](http://the-interne
+ [Drag and Drop](http://the-internet.herokuapp.com/drag_and_drop)
+ [Dropdown](http://the-internet.herokuapp.com/dropdown)
+ [Dynamic Content](http://the-internet.herokuapp.com/dynamic_content)
+ [Dynamic Controls](http://the-internet.herokuapp.com/dynamic_controls)
+ [Dynamic Loading](http://the-internet.herokuapp.com/dynamic_loading)
+ [File Download](http://the-internet.herokuapp.com/download)
+ [File Upload](http://the-internet.herokuapp.com/upload)
Expand Down
2 changes: 1 addition & 1 deletion README.template
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# The Internet 0.39.0 (12-11-2014)
# The Internet 0.40.0 (12-12-2014)
=======

An example application that captures prominent and ugly functionality found on the web. Perfect for writing automated acceptance tests against.
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.39.0
0.40.0
3 changes: 3 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#0.40.0
+ Made is so the number of pixels can be specified in the URL for /shifting_content and /shifting_content/random

#0.39.0
+ Pulled in the pull request for a dynamic controls example

Expand Down
1 change: 1 addition & 0 deletions examples.csv
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,4 @@ Shifting Content,/shifting_content
Dynamic Content,/dynamic_content
Challenging DOM,/challenging_dom
Disappearing Elements,/disappearing_elements
Dynamic Controls,/dynamic_controls
22 changes: 22 additions & 0 deletions server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -376,12 +376,34 @@ def authorized?
erb :shifting_content
end

get '/shifting_content/:pixel_shift' do |pixel_shift|
pixel_count = [0, pixel_shift]
cookies[:page_visit_count] ||= '0'
page_visit_count = cookies[:page_visit_count].to_i

if page_visit_count.even?
@pixel_shift = pixel_count[0]
else
@pixel_shift = pixel_count[1]
end

page_visit_count += 1
cookies[:page_visit_count] = page_visit_count.to_s
erb :shifting_content
end

get '/shifting_content/random' do
pixel_count = [0, 25]
@pixel_shift = pixel_count[rand(2)]
erb :shifting_content
end

get '/shifting_content/random/:pixel_shift' do |pixel_shift|
pixel_count = [0, pixel_shift]
@pixel_shift = pixel_count[rand(2)]
erb :shifting_content
end

get '/challenging_dom' do
require 'uuid'
@text = %w(foo bar baz qux)
Expand Down

0 comments on commit 09b0db2

Please sign in to comment.