win_gui 0.1.6 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (169) hide show
  1. data/.gitignore +21 -21
  2. data/HISTORY +7 -0
  3. data/LICENSE +20 -20
  4. data/README.rdoc +77 -114
  5. data/Rakefile +24 -58
  6. data/VERSION +1 -1
  7. data/features/support/env.rb +7 -4
  8. data/features/win_gui.feature +9 -9
  9. data/lib/version.rb +8 -0
  10. data/lib/win_gui/window.rb +78 -69
  11. data/lib/win_gui.rb +25 -3
  12. data/spec/spec.opts +1 -1
  13. data/spec/spec_helper.rb +90 -118
  14. data/spec/win_gui/window_spec.rb +120 -123
  15. data/tasks/common.rake +14 -0
  16. data/tasks/doc.rake +14 -0
  17. data/tasks/gem.rake +39 -0
  18. data/tasks/git.rake +34 -0
  19. data/tasks/spec.rake +19 -0
  20. data/tasks/version.rake +71 -0
  21. metadata +68 -188
  22. data/.document +0 -5
  23. data/book_code/early_success/bundle.rb +0 -34
  24. data/book_code/early_success/english.txt +0 -1
  25. data/book_code/early_success/jruby_basics.rb +0 -47
  26. data/book_code/early_success/windows_basics.rb +0 -97
  27. data/book_code/guessing/locknote.rb +0 -379
  28. data/book_code/guessing/monkeyshines.rb +0 -14
  29. data/book_code/guessing/note.rb +0 -120
  30. data/book_code/guessing/note_spec.rb +0 -175
  31. data/book_code/guessing/replay.rb +0 -21
  32. data/book_code/guessing/seed.rb +0 -9
  33. data/book_code/guessing/spec_helper.rb +0 -69
  34. data/book_code/guessing/windows_gui.rb +0 -247
  35. data/book_code/home_stretch/junquenote.rb +0 -151
  36. data/book_code/home_stretch/locknote.rb +0 -180
  37. data/book_code/home_stretch/note.rb +0 -144
  38. data/book_code/home_stretch/note_spec.rb +0 -191
  39. data/book_code/home_stretch/spec_helper.rb +0 -55
  40. data/book_code/home_stretch/swing_gui.rb +0 -50
  41. data/book_code/home_stretch/windows_gui.rb +0 -232
  42. data/book_code/junquenote/exports.sh +0 -10
  43. data/book_code/junquenote/jruby_mac.sh +0 -10
  44. data/book_code/junquenote/junquenote_app.rb +0 -262
  45. data/book_code/novite/Rakefile +0 -10
  46. data/book_code/novite/app/controllers/application.rb +0 -18
  47. data/book_code/novite/app/controllers/guests_controller.rb +0 -28
  48. data/book_code/novite/app/controllers/parties_controller.rb +0 -77
  49. data/book_code/novite/app/helpers/application_helper.rb +0 -11
  50. data/book_code/novite/app/helpers/guests_helper.rb +0 -10
  51. data/book_code/novite/app/helpers/parties_helper.rb +0 -10
  52. data/book_code/novite/app/models/guest.rb +0 -11
  53. data/book_code/novite/app/models/party.rb +0 -32
  54. data/book_code/novite/app/models/party_mailer.rb +0 -19
  55. data/book_code/novite/app/views/layouts/application.rhtml +0 -44
  56. data/book_code/novite/app/views/parties/new.html.erb +0 -42
  57. data/book_code/novite/app/views/parties/show.html.erb +0 -43
  58. data/book_code/novite/app/views/party_mailer/invite.erb +0 -17
  59. data/book_code/novite/config/boot.rb +0 -117
  60. data/book_code/novite/config/database.yml +0 -19
  61. data/book_code/novite/config/environment.rb +0 -67
  62. data/book_code/novite/config/environments/development.rb +0 -29
  63. data/book_code/novite/config/environments/production.rb +0 -27
  64. data/book_code/novite/config/environments/test.rb +0 -30
  65. data/book_code/novite/config/initializers/inflections.rb +0 -18
  66. data/book_code/novite/config/initializers/mime_types.rb +0 -13
  67. data/book_code/novite/config/routes.rb +0 -47
  68. data/book_code/novite/db/migrate/001_create_parties.rb +0 -26
  69. data/book_code/novite/db/migrate/002_create_guests.rb +0 -23
  70. data/book_code/novite/db/schema.rb +0 -41
  71. data/book_code/novite/log/empty.txt +0 -0
  72. data/book_code/novite/public/.htaccess +0 -40
  73. data/book_code/novite/public/404.html +0 -38
  74. data/book_code/novite/public/422.html +0 -38
  75. data/book_code/novite/public/500.html +0 -38
  76. data/book_code/novite/public/dispatch.cgi +0 -10
  77. data/book_code/novite/public/dispatch.fcgi +0 -24
  78. data/book_code/novite/public/dispatch.rb +0 -18
  79. data/book_code/novite/public/favicon.ico +0 -0
  80. data/book_code/novite/public/images/rails.png +0 -0
  81. data/book_code/novite/public/index.html +0 -285
  82. data/book_code/novite/public/javascripts/application.js +0 -10
  83. data/book_code/novite/public/javascripts/controls.js +0 -971
  84. data/book_code/novite/public/javascripts/dragdrop.js +0 -980
  85. data/book_code/novite/public/javascripts/effects.js +0 -1128
  86. data/book_code/novite/public/javascripts/prototype.js +0 -4233
  87. data/book_code/novite/public/robots.txt +0 -5
  88. data/book_code/novite/script/about +0 -3
  89. data/book_code/novite/script/console +0 -3
  90. data/book_code/novite/script/destroy +0 -3
  91. data/book_code/novite/script/generate +0 -3
  92. data/book_code/novite/script/performance/benchmarker +0 -3
  93. data/book_code/novite/script/performance/profiler +0 -3
  94. data/book_code/novite/script/performance/request +0 -3
  95. data/book_code/novite/script/plugin +0 -3
  96. data/book_code/novite/script/process/inspector +0 -3
  97. data/book_code/novite/script/process/reaper +0 -3
  98. data/book_code/novite/script/process/spawner +0 -3
  99. data/book_code/novite/script/runner +0 -3
  100. data/book_code/novite/script/server +0 -3
  101. data/book_code/novite/test/test_helper.rb +0 -46
  102. data/book_code/one_more_thing/applescript.rb +0 -68
  103. data/book_code/one_more_thing/note_spec.rb +0 -50
  104. data/book_code/one_more_thing/spec_helper.rb +0 -17
  105. data/book_code/one_more_thing/textedit-pure.rb +0 -28
  106. data/book_code/one_more_thing/textedit.applescript +0 -26
  107. data/book_code/one_more_thing/textedit.rb +0 -32
  108. data/book_code/one_more_thing/textnote.rb +0 -87
  109. data/book_code/simplify/junquenote.rb +0 -48
  110. data/book_code/simplify/locknote.rb +0 -46
  111. data/book_code/simplify/note.rb +0 -35
  112. data/book_code/simplify/note_spec.rb +0 -28
  113. data/book_code/simplify/swing_gui.rb +0 -45
  114. data/book_code/simplify/windows_gui.rb +0 -232
  115. data/book_code/simplify/windows_gui_spec.rb +0 -35
  116. data/book_code/story/invite.story +0 -19
  117. data/book_code/story/journal.txt +0 -29
  118. data/book_code/story/novite_stories.rb +0 -156
  119. data/book_code/story/party.rb +0 -149
  120. data/book_code/story/password.rb +0 -61
  121. data/book_code/story/password.story +0 -26
  122. data/book_code/story/rsvp.story +0 -29
  123. data/book_code/tables/TestTime.html +0 -93
  124. data/book_code/tables/TestTimeSample.html +0 -63
  125. data/book_code/tables/calculate_time.rb +0 -39
  126. data/book_code/tables/calculator.rb +0 -108
  127. data/book_code/tables/calculator_actions.rb +0 -27
  128. data/book_code/tables/calculator_spec.rb +0 -47
  129. data/book_code/tables/fit.rb +0 -32
  130. data/book_code/tables/matrix.rb +0 -109
  131. data/book_code/tables/pseudocode.rb +0 -17
  132. data/book_code/tubes/book_selenium.rb +0 -67
  133. data/book_code/tubes/book_watir.rb +0 -60
  134. data/book_code/tubes/dragdrop.html +0 -81
  135. data/book_code/tubes/html_capture.rb +0 -33
  136. data/book_code/tubes/joke_list.rb +0 -67
  137. data/book_code/tubes/list_spec.rb +0 -41
  138. data/book_code/tubes/search_spec.rb +0 -32
  139. data/book_code/tubes/selenium_example.rb +0 -66
  140. data/book_code/tubes/selenium_link.rb +0 -23
  141. data/book_code/tubes/web_server.rb +0 -14
  142. data/book_code/windows/wgui.rb +0 -29
  143. data/book_code/windows/wobj.rb +0 -25
  144. data/book_code/windows/wsh.rb +0 -25
  145. data/book_code/with_rspec/empty_spec.rb +0 -13
  146. data/book_code/with_rspec/junquenote.rb +0 -60
  147. data/book_code/with_rspec/locknote.rb +0 -129
  148. data/book_code/with_rspec/note_spec.rb +0 -32
  149. data/book_code/with_rspec/should_examples.rb +0 -18
  150. data/lib/note/java/jemmy.jar +0 -0
  151. data/lib/note/java/jnote.rb +0 -48
  152. data/lib/note/java/jruby_basics.rb +0 -37
  153. data/lib/note/java/junquenote_app.rb +0 -262
  154. data/lib/note/java/note_spec.rb +0 -20
  155. data/lib/note/win/locknote.rb +0 -19
  156. data/lib/note.rb +0 -15
  157. data/lib/win_gui/constants.rb +0 -82
  158. data/lib/win_gui/def_api.rb +0 -160
  159. data/lib/win_gui/string_extensions.rb +0 -36
  160. data/lib/win_gui/win_gui.rb +0 -437
  161. data/old/windows_basics.rb +0 -80
  162. data/old/wnote.rb +0 -80
  163. data/old/wnote_spec.rb +0 -20
  164. data/spec/note/win/locknote_spec.rb +0 -7
  165. data/spec/test_apps/locknote/LockNote.exe +0 -0
  166. data/spec/win_gui/def_api_spec.rb +0 -339
  167. data/spec/win_gui/string_extensions_spec.rb +0 -61
  168. data/spec/win_gui/win_gui_spec.rb +0 -537
  169. data/win_gui.gemspec +0 -215
@@ -1,117 +0,0 @@
1
- #---
2
- # Excerpted from "Scripted GUI Testing With Ruby",
3
- # published by The Pragmatic Bookshelf.
4
- # Copyrights apply to this code. It may not be used to create training material,
5
- # courses, books, articles, and the like. Contact us if you are in doubt.
6
- # We make no guarantees that this code is fit for any purpose.
7
- # Visit http://www.pragmaticprogrammer.com/titles/idgtr for more book information.
8
- #---
9
- # Don't change this file!
10
- # Configure your app in config/environment.rb and config/environments/*.rb
11
-
12
- RAILS_ROOT = "#{File.dirname(__FILE__)}/.." unless defined?(RAILS_ROOT)
13
-
14
- module Rails
15
- class << self
16
- def boot!
17
- unless booted?
18
- preinitialize
19
- pick_boot.run
20
- end
21
- end
22
-
23
- def booted?
24
- defined? Rails::Initializer
25
- end
26
-
27
- def pick_boot
28
- (vendor_rails? ? VendorBoot : GemBoot).new
29
- end
30
-
31
- def vendor_rails?
32
- File.exist?("#{RAILS_ROOT}/vendor/rails")
33
- end
34
-
35
- # FIXME : Ruby 1.9
36
- def preinitialize
37
- load(preinitializer_path) if File.exists?(preinitializer_path)
38
- end
39
-
40
- def preinitializer_path
41
- "#{RAILS_ROOT}/config/preinitializer.rb"
42
- end
43
- end
44
-
45
- class Boot
46
- def run
47
- load_initializer
48
- Rails::Initializer.run(:set_load_path)
49
- end
50
- end
51
-
52
- class VendorBoot < Boot
53
- def load_initializer
54
- require "#{RAILS_ROOT}/vendor/rails/railties/lib/initializer"
55
- end
56
- end
57
-
58
- class GemBoot < Boot
59
- def load_initializer
60
- self.class.load_rubygems
61
- load_rails_gem
62
- require 'initializer'
63
- end
64
-
65
- def load_rails_gem
66
- if version = self.class.gem_version
67
- gem 'rails', version
68
- else
69
- gem 'rails'
70
- end
71
- rescue Gem::LoadError => load_error
72
- $stderr.puts %(Missing the Rails #{version} gem. Please `gem install -v=#{version} rails`, update your RAILS_GEM_VERSION setting in config/environment.rb for the Rails version you do have installed, or comment out RAILS_GEM_VERSION to use the latest version installed.)
73
- exit 1
74
- end
75
-
76
- class << self
77
- def rubygems_version
78
- Gem::RubyGemsVersion if defined? Gem::RubyGemsVersion
79
- end
80
-
81
- def gem_version
82
- if defined? RAILS_GEM_VERSION
83
- RAILS_GEM_VERSION
84
- elsif ENV.include?('RAILS_GEM_VERSION')
85
- ENV['RAILS_GEM_VERSION']
86
- else
87
- parse_gem_version(read_environment_rb)
88
- end
89
- end
90
-
91
- def load_rubygems
92
- require 'rubygems'
93
-
94
- unless rubygems_version >= '0.9.4'
95
- $stderr.puts %(Rails requires RubyGems >= 0.9.4 (you have #{rubygems_version}). Please `gem update --system` and try again.)
96
- exit 1
97
- end
98
-
99
- rescue LoadError
100
- $stderr.puts %(Rails requires RubyGems >= 0.9.4. Please install RubyGems and try again: http://rubygems.rubyforge.org)
101
- exit 1
102
- end
103
-
104
- def parse_gem_version(text)
105
- $1 if text =~ /^[^#]*RAILS_GEM_VERSION\s*=\s*["']([!~<>=]*\s*[\d.]+)["']/
106
- end
107
-
108
- private
109
- def read_environment_rb
110
- File.read("#{RAILS_ROOT}/config/environment.rb")
111
- end
112
- end
113
- end
114
- end
115
-
116
- # All that for this:
117
- Rails.boot!
@@ -1,19 +0,0 @@
1
- # SQLite version 3.x
2
- # gem install sqlite3-ruby (not necessary on OS X Leopard)
3
- development:
4
- adapter: sqlite3
5
- database: db/development.sqlite3
6
- timeout: 5000
7
-
8
- # Warning: The database defined as 'test' will be erased and
9
- # re-generated from your development database when you run 'rake'.
10
- # Do not set this db to the same as development or production.
11
- test:
12
- adapter: sqlite3
13
- database: db/test.sqlite3
14
- timeout: 5000
15
-
16
- production:
17
- adapter: sqlite3
18
- database: db/production.sqlite3
19
- timeout: 5000
@@ -1,67 +0,0 @@
1
- #---
2
- # Excerpted from "Scripted GUI Testing With Ruby",
3
- # published by The Pragmatic Bookshelf.
4
- # Copyrights apply to this code. It may not be used to create training material,
5
- # courses, books, articles, and the like. Contact us if you are in doubt.
6
- # We make no guarantees that this code is fit for any purpose.
7
- # Visit http://www.pragmaticprogrammer.com/titles/idgtr for more book information.
8
- #---
9
- # Be sure to restart your server when you modify this file
10
-
11
- # Uncomment below to force Rails into production mode when
12
- # you don't control web/app server and can't set it the proper way
13
- # ENV['RAILS_ENV'] ||= 'production'
14
-
15
- # Specifies gem version of Rails to use when vendor/rails is not present
16
- RAILS_GEM_VERSION = '2.0.2' unless defined? RAILS_GEM_VERSION
17
-
18
- # Bootstrap the Rails environment, frameworks, and default configuration
19
- require File.join(File.dirname(__FILE__), 'boot')
20
-
21
- Rails::Initializer.run do |config|
22
- # Settings in config/environments/* take precedence over those specified here.
23
- # Application configuration should go into files in config/initializers
24
- # -- all .rb files in that directory are automatically loaded.
25
- # See Rails::Configuration for more options.
26
-
27
- # Skip frameworks you're not going to use (only works if using vendor/rails).
28
- # To use Rails without a database, you must remove the Active Record framework
29
- # config.frameworks -= [ :active_record, :active_resource, :action_mailer ]
30
-
31
- # Only load the plugins named here, in the order given. By default, all plugins
32
- # in vendor/plugins are loaded in alphabetical order.
33
- # :all can be used as a placeholder for all plugins not explicitly named
34
- # config.plugins = [ :exception_notification, :ssl_requirement, :all ]
35
-
36
- # Add additional load paths for your own custom dirs
37
- # config.load_paths += %W( #{RAILS_ROOT}/extras )
38
-
39
- # Force all environments to use the same logger level
40
- # (by default production uses :info, the others :debug)
41
- # config.log_level = :debug
42
-
43
- # Your secret key for verifying cookie session data integrity.
44
- # If you change this key, all old sessions will become invalid!
45
- # Make sure the secret is at least 30 characters and all random,
46
- # no regular words or you'll be exposed to dictionary attacks.
47
- config.action_controller.session = {
48
- :session_key => '_novite_session',
49
- :secret => 'f8bbdc086b1ec51e8fe5f508481132ac14b2c17d46be77b7744957dc356fab9a454a8f3d874dd022ae5c4b50486549768bd80b97f398e0f07c342f114c2eba09'
50
- }
51
-
52
- # Use the database for sessions instead of the cookie-based default,
53
- # which shouldn't be used to store highly confidential information
54
- # (create the session table with 'rake db:sessions:create')
55
- # config.action_controller.session_store = :active_record_store
56
-
57
- # Use SQL instead of Active Record's schema dumper when creating the test database.
58
- # This is necessary if your schema can't be completely dumped by the schema dumper,
59
- # like if you have constraints or database-specific column types
60
- # config.active_record.schema_format = :sql
61
-
62
- # Activate observers that should always be running
63
- # config.active_record.observers = :cacher, :garbage_collector
64
-
65
- # Make Active Record use UTC-base instead of local time
66
- # config.active_record.default_timezone = :utc
67
- end
@@ -1,29 +0,0 @@
1
- #---
2
- # Excerpted from "Scripted GUI Testing With Ruby",
3
- # published by The Pragmatic Bookshelf.
4
- # Copyrights apply to this code. It may not be used to create training material,
5
- # courses, books, articles, and the like. Contact us if you are in doubt.
6
- # We make no guarantees that this code is fit for any purpose.
7
- # Visit http://www.pragmaticprogrammer.com/titles/idgtr for more book information.
8
- #---
9
- # Settings specified here will take precedence over those in config/environment.rb
10
-
11
- # In the development environment your application's code is reloaded on
12
- # every request. This slows down response time but is perfect for development
13
- # since you don't have to restart the webserver when you make code changes.
14
- config.cache_classes = false
15
-
16
- # Log error messages when you accidentally call methods on nil.
17
- config.whiny_nils = true
18
-
19
- # Show full error reports and disable caching
20
- config.action_controller.consider_all_requests_local = true
21
- config.action_view.debug_rjs = true
22
- config.action_controller.perform_caching = false
23
- config.action_view.cache_template_extensions = false
24
-
25
- # Don't care if the mailer can't send
26
- config.action_mailer.raise_delivery_errors = false
27
-
28
- # Just pretend to send mail
29
- config.action_mailer.delivery_method = :test
@@ -1,27 +0,0 @@
1
- #---
2
- # Excerpted from "Scripted GUI Testing With Ruby",
3
- # published by The Pragmatic Bookshelf.
4
- # Copyrights apply to this code. It may not be used to create training material,
5
- # courses, books, articles, and the like. Contact us if you are in doubt.
6
- # We make no guarantees that this code is fit for any purpose.
7
- # Visit http://www.pragmaticprogrammer.com/titles/idgtr for more book information.
8
- #---
9
- # Settings specified here will take precedence over those in config/environment.rb
10
-
11
- # The production environment is meant for finished, "live" apps.
12
- # Code is not reloaded between requests
13
- config.cache_classes = true
14
-
15
- # Use a different logger for distributed setups
16
- # config.logger = SyslogLogger.new
17
-
18
- # Full error reports are disabled and caching is turned on
19
- config.action_controller.consider_all_requests_local = false
20
- config.action_controller.perform_caching = true
21
- config.action_view.cache_template_loading = true
22
-
23
- # Enable serving of images, stylesheets, and javascripts from an asset server
24
- # config.action_controller.asset_host = "http://assets.example.com"
25
-
26
- # Disable delivery errors, bad email addresses will be ignored
27
- # config.action_mailer.raise_delivery_errors = false
@@ -1,30 +0,0 @@
1
- #---
2
- # Excerpted from "Scripted GUI Testing With Ruby",
3
- # published by The Pragmatic Bookshelf.
4
- # Copyrights apply to this code. It may not be used to create training material,
5
- # courses, books, articles, and the like. Contact us if you are in doubt.
6
- # We make no guarantees that this code is fit for any purpose.
7
- # Visit http://www.pragmaticprogrammer.com/titles/idgtr for more book information.
8
- #---
9
- # Settings specified here will take precedence over those in config/environment.rb
10
-
11
- # The test environment is used exclusively to run your application's
12
- # test suite. You never need to work with it otherwise. Remember that
13
- # your test database is "scratch space" for the test suite and is wiped
14
- # and recreated between test runs. Don't rely on the data there!
15
- config.cache_classes = true
16
-
17
- # Log error messages when you accidentally call methods on nil.
18
- config.whiny_nils = true
19
-
20
- # Show full error reports and disable caching
21
- config.action_controller.consider_all_requests_local = true
22
- config.action_controller.perform_caching = false
23
-
24
- # Disable request forgery protection in test environment
25
- config.action_controller.allow_forgery_protection = false
26
-
27
- # Tell ActionMailer not to deliver emails to the real world.
28
- # The :test delivery method accumulates sent emails in the
29
- # ActionMailer::Base.deliveries array.
30
- config.action_mailer.delivery_method = :test
@@ -1,18 +0,0 @@
1
- #---
2
- # Excerpted from "Scripted GUI Testing With Ruby",
3
- # published by The Pragmatic Bookshelf.
4
- # Copyrights apply to this code. It may not be used to create training material,
5
- # courses, books, articles, and the like. Contact us if you are in doubt.
6
- # We make no guarantees that this code is fit for any purpose.
7
- # Visit http://www.pragmaticprogrammer.com/titles/idgtr for more book information.
8
- #---
9
- # Be sure to restart your server when you modify this file.
10
-
11
- # Add new inflection rules using the following format
12
- # (all these examples are active by default):
13
- # Inflector.inflections do |inflect|
14
- # inflect.plural /^(ox)$/i, '\1en'
15
- # inflect.singular /^(ox)en/i, '\1'
16
- # inflect.irregular 'person', 'people'
17
- # inflect.uncountable %w( fish sheep )
18
- # end
@@ -1,13 +0,0 @@
1
- #---
2
- # Excerpted from "Scripted GUI Testing With Ruby",
3
- # published by The Pragmatic Bookshelf.
4
- # Copyrights apply to this code. It may not be used to create training material,
5
- # courses, books, articles, and the like. Contact us if you are in doubt.
6
- # We make no guarantees that this code is fit for any purpose.
7
- # Visit http://www.pragmaticprogrammer.com/titles/idgtr for more book information.
8
- #---
9
- # Be sure to restart your server when you modify this file.
10
-
11
- # Add new mime types for use in respond_to blocks:
12
- # Mime::Type.register "text/richtext", :rtf
13
- # Mime::Type.register_alias "text/html", :iphone
@@ -1,47 +0,0 @@
1
- #---
2
- # Excerpted from "Scripted GUI Testing With Ruby",
3
- # published by The Pragmatic Bookshelf.
4
- # Copyrights apply to this code. It may not be used to create training material,
5
- # courses, books, articles, and the like. Contact us if you are in doubt.
6
- # We make no guarantees that this code is fit for any purpose.
7
- # Visit http://www.pragmaticprogrammer.com/titles/idgtr for more book information.
8
- #---
9
- ActionController::Routing::Routes.draw do |map|
10
- map.resources :guests
11
-
12
- map.resources :parties
13
-
14
- # The priority is based upon order of creation: first created -> highest priority.
15
-
16
- # Sample of regular route:
17
- # map.connect 'products/:id', :controller => 'catalog', :action => 'view'
18
- # Keep in mind you can assign values other than :controller and :action
19
-
20
- # Sample of named route:
21
- # map.purchase 'products/:id/purchase', :controller => 'catalog', :action => 'purchase'
22
- # This route can be invoked with purchase_url(:id => product.id)
23
-
24
- # Sample resource route (maps HTTP verbs to controller actions automatically):
25
- # map.resources :products
26
-
27
- # Sample resource route with options:
28
- # map.resources :products, :member => { :short => :get, :toggle => :post }, :collection => { :sold => :get }
29
-
30
- # Sample resource route with sub-resources:
31
- # map.resources :products, :has_many => [ :comments, :sales ], :has_one => :seller
32
-
33
- # Sample resource route within a namespace:
34
- # map.namespace :admin do |admin|
35
- # # Directs /admin/products/* to Admin::ProductsController (app/controllers/admin/products_controller.rb)
36
- # admin.resources :products
37
- # end
38
-
39
- # You can have the root of your site routed with map.root -- just remember to delete public/index.html.
40
- # map.root :controller => "welcome"
41
-
42
- # See how all your routes lay out with "rake routes"
43
-
44
- # Install the default routes as the lowest priority.
45
- map.connect ':controller/:action/:id'
46
- map.connect ':controller/:action/:id.:format'
47
- end
@@ -1,26 +0,0 @@
1
- #---
2
- # Excerpted from "Scripted GUI Testing With Ruby",
3
- # published by The Pragmatic Bookshelf.
4
- # Copyrights apply to this code. It may not be used to create training material,
5
- # courses, books, articles, and the like. Contact us if you are in doubt.
6
- # We make no guarantees that this code is fit for any purpose.
7
- # Visit http://www.pragmaticprogrammer.com/titles/idgtr for more book information.
8
- #---
9
- class CreateParties < ActiveRecord::Migration
10
- def self.up
11
- create_table :parties do |t|
12
- t.string :name
13
- t.text :description
14
- t.text :location
15
- t.datetime :begins_at
16
- t.datetime :ends_at
17
- t.string :permalink
18
-
19
- t.timestamps
20
- end
21
- end
22
-
23
- def self.down
24
- drop_table :parties
25
- end
26
- end
@@ -1,23 +0,0 @@
1
- #---
2
- # Excerpted from "Scripted GUI Testing With Ruby",
3
- # published by The Pragmatic Bookshelf.
4
- # Copyrights apply to this code. It may not be used to create training material,
5
- # courses, books, articles, and the like. Contact us if you are in doubt.
6
- # We make no guarantees that this code is fit for any purpose.
7
- # Visit http://www.pragmaticprogrammer.com/titles/idgtr for more book information.
8
- #---
9
- class CreateGuests < ActiveRecord::Migration
10
- def self.up
11
- create_table :guests do |t|
12
- t.integer :party_id
13
- t.string :name
14
- t.boolean :attending
15
-
16
- t.timestamps
17
- end
18
- end
19
-
20
- def self.down
21
- drop_table :guests
22
- end
23
- end
@@ -1,41 +0,0 @@
1
- #---
2
- # Excerpted from "Scripted GUI Testing With Ruby",
3
- # published by The Pragmatic Bookshelf.
4
- # Copyrights apply to this code. It may not be used to create training material,
5
- # courses, books, articles, and the like. Contact us if you are in doubt.
6
- # We make no guarantees that this code is fit for any purpose.
7
- # Visit http://www.pragmaticprogrammer.com/titles/idgtr for more book information.
8
- #---
9
- # This file is auto-generated from the current state of the database. Instead of editing this file,
10
- # please use the migrations feature of ActiveRecord to incrementally modify your database, and
11
- # then regenerate this schema definition.
12
- #
13
- # Note that this schema.rb definition is the authoritative source for your database schema. If you need
14
- # to create the application database on another system, you should be using db:schema:load, not running
15
- # all the migrations from scratch. The latter is a flawed and unsustainable approach (the more migrations
16
- # you'll amass, the slower it'll run and the greater likelihood for issues).
17
- #
18
- # It's strongly recommended to check this file into your version control system.
19
-
20
- ActiveRecord::Schema.define(:version => 2) do
21
-
22
- create_table "guests", :force => true do |t|
23
- t.integer "party_id"
24
- t.string "name"
25
- t.boolean "attending"
26
- t.datetime "created_at"
27
- t.datetime "updated_at"
28
- end
29
-
30
- create_table "parties", :force => true do |t|
31
- t.string "name"
32
- t.text "description"
33
- t.text "location"
34
- t.datetime "begins_at"
35
- t.datetime "ends_at"
36
- t.string "permalink"
37
- t.datetime "created_at"
38
- t.datetime "updated_at"
39
- end
40
-
41
- end
File without changes
@@ -1,40 +0,0 @@
1
- # General Apache options
2
- AddHandler fastcgi-script .fcgi
3
- AddHandler cgi-script .cgi
4
- Options +FollowSymLinks +ExecCGI
5
-
6
- # If you don't want Rails to look in certain directories,
7
- # use the following rewrite rules so that Apache won't rewrite certain requests
8
- #
9
- # Example:
10
- # RewriteCond %{REQUEST_URI} ^/notrails.*
11
- # RewriteRule .* - [L]
12
-
13
- # Redirect all requests not available on the filesystem to Rails
14
- # By default the cgi dispatcher is used which is very slow
15
- #
16
- # For better performance replace the dispatcher with the fastcgi one
17
- #
18
- # Example:
19
- # RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]
20
- RewriteEngine On
21
-
22
- # If your Rails application is accessed via an Alias directive,
23
- # then you MUST also set the RewriteBase in this htaccess file.
24
- #
25
- # Example:
26
- # Alias /myrailsapp /path/to/myrailsapp/public
27
- # RewriteBase /myrailsapp
28
-
29
- RewriteRule ^$ index.html [QSA]
30
- RewriteRule ^([^.]+)$ $1.html [QSA]
31
- RewriteCond %{REQUEST_FILENAME} !-f
32
- RewriteRule ^(.*)$ dispatch.cgi [QSA,L]
33
-
34
- # In case Rails experiences terminal errors
35
- # Instead of displaying this message you can supply a file here which will be rendered instead
36
- #
37
- # Example:
38
- # ErrorDocument 500 /500.html
39
-
40
- ErrorDocument 500 "<h2>Application error</h2>Rails application failed to start properly"
@@ -1,38 +0,0 @@
1
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
- <!--
4
- ! Excerpted from "Scripted GUI Testing With Ruby",
5
- ! published by The Pragmatic Bookshelf.
6
- ! Copyrights apply to this code. It may not be used to create training material,
7
- ! courses, books, articles, and the like. Contact us if you are in doubt.
8
- ! We make no guarantees that this code is fit for any purpose.
9
- ! Visit http://www.pragmaticprogrammer.com/titles/idgtr for more book information.
10
- -->
11
-
12
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
13
-
14
- <head>
15
- <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
16
- <title>The page you were looking for doesn't exist (404)</title>
17
- <style type="text/css">
18
- body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
19
- div.dialog {
20
- width: 25em;
21
- padding: 0 4em;
22
- margin: 4em auto 0 auto;
23
- border: 1px solid #ccc;
24
- border-right-color: #999;
25
- border-bottom-color: #999;
26
- }
27
- h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
28
- </style>
29
- </head>
30
-
31
- <body>
32
- <!-- This file lives in public/404.html -->
33
- <div class="dialog">
34
- <h1>The page you were looking for doesn't exist.</h1>
35
- <p>You may have mistyped the address or the page may have moved.</p>
36
- </div>
37
- </body>
38
- </html>
@@ -1,38 +0,0 @@
1
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
- <!--
4
- ! Excerpted from "Scripted GUI Testing With Ruby",
5
- ! published by The Pragmatic Bookshelf.
6
- ! Copyrights apply to this code. It may not be used to create training material,
7
- ! courses, books, articles, and the like. Contact us if you are in doubt.
8
- ! We make no guarantees that this code is fit for any purpose.
9
- ! Visit http://www.pragmaticprogrammer.com/titles/idgtr for more book information.
10
- -->
11
-
12
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
13
-
14
- <head>
15
- <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
16
- <title>The change you wanted was rejected (422)</title>
17
- <style type="text/css">
18
- body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
19
- div.dialog {
20
- width: 25em;
21
- padding: 0 4em;
22
- margin: 4em auto 0 auto;
23
- border: 1px solid #ccc;
24
- border-right-color: #999;
25
- border-bottom-color: #999;
26
- }
27
- h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
28
- </style>
29
- </head>
30
-
31
- <body>
32
- <!-- This file lives in public/422.html -->
33
- <div class="dialog">
34
- <h1>The change you wanted was rejected.</h1>
35
- <p>Maybe you tried to change something you didn't have access to.</p>
36
- </div>
37
- </body>
38
- </html>
@@ -1,38 +0,0 @@
1
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
- <!--
4
- ! Excerpted from "Scripted GUI Testing With Ruby",
5
- ! published by The Pragmatic Bookshelf.
6
- ! Copyrights apply to this code. It may not be used to create training material,
7
- ! courses, books, articles, and the like. Contact us if you are in doubt.
8
- ! We make no guarantees that this code is fit for any purpose.
9
- ! Visit http://www.pragmaticprogrammer.com/titles/idgtr for more book information.
10
- -->
11
-
12
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
13
-
14
- <head>
15
- <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
16
- <title>We're sorry, but something went wrong (500)</title>
17
- <style type="text/css">
18
- body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
19
- div.dialog {
20
- width: 25em;
21
- padding: 0 4em;
22
- margin: 4em auto 0 auto;
23
- border: 1px solid #ccc;
24
- border-right-color: #999;
25
- border-bottom-color: #999;
26
- }
27
- h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
28
- </style>
29
- </head>
30
-
31
- <body>
32
- <!-- This file lives in public/500.html -->
33
- <div class="dialog">
34
- <h1>We're sorry, but something went wrong.</h1>
35
- <p>We've been notified about this issue and we'll take a look at it shortly.</p>
36
- </div>
37
- </body>
38
- </html>
@@ -1,10 +0,0 @@
1
- #!/opt/local/bin/ruby
2
-
3
- require File.dirname(__FILE__) + "/../config/environment" unless defined?(RAILS_ROOT)
4
-
5
- # If you're using RubyGems and mod_ruby, this require should be changed to an absolute path one, like:
6
- # "/usr/local/lib/ruby/gems/1.8/gems/rails-0.8.0/lib/dispatcher" -- otherwise performance is severely impaired
7
- require "dispatcher"
8
-
9
- ADDITIONAL_LOAD_PATHS.reverse.each { |dir| $:.unshift(dir) if File.directory?(dir) } if defined?(Apache::RubyRun)
10
- Dispatcher.dispatch
@@ -1,24 +0,0 @@
1
- #!/opt/local/bin/ruby
2
- #
3
- # You may specify the path to the FastCGI crash log (a log of unhandled
4
- # exceptions which forced the FastCGI instance to exit, great for debugging)
5
- # and the number of requests to process before running garbage collection.
6
- #
7
- # By default, the FastCGI crash log is RAILS_ROOT/log/fastcgi.crash.log
8
- # and the GC period is nil (turned off). A reasonable number of requests
9
- # could range from 10-100 depending on the memory footprint of your app.
10
- #
11
- # Example:
12
- # # Default log path, normal GC behavior.
13
- # RailsFCGIHandler.process!
14
- #
15
- # # Default log path, 50 requests between GC.
16
- # RailsFCGIHandler.process! nil, 50
17
- #
18
- # # Custom log path, normal GC behavior.
19
- # RailsFCGIHandler.process! '/var/log/myapp_fcgi_crash.log'
20
- #
21
- require File.dirname(__FILE__) + "/../config/environment"
22
- require 'fcgi_handler'
23
-
24
- RailsFCGIHandler.process!