diagnostics 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +4 -4
- data/.specification +0 -0
- data/Gemfile.lock +39 -0
- data/LICENSE +20 -0
- data/README.md +7 -0
- data/app/controllers/diagnostics_application_controller.rb +12 -0
- data/app/controllers/diagnostics_controller.rb +6 -0
- data/app/controllers/statuses_controller.rb +20 -0
- data/app/views/diagnostics/_check.html.erb +1 -0
- data/app/views/diagnostics/index.html.erb +22 -0
- data/app/views/layouts/diagnostics.html.erb +114 -0
- data/app/views/statuses/show.html.erb +15 -0
- data/config/routes.rb +6 -0
- data/diagnostics.gemspec +2 -2
- data/features/diagnostic_checks.feature +167 -0
- data/features/step_definitions/aruba.rb +5 -0
- data/features/support/env.rb +2 -0
- data/lib/diagnostics/check.rb +66 -0
- data/lib/diagnostics/data/attribute.rb +15 -0
- data/lib/diagnostics/data/elements.rb +40 -0
- data/lib/diagnostics/data/list.rb +15 -0
- data/lib/diagnostics/data/table.rb +47 -0
- data/lib/diagnostics/data/text.rb +15 -0
- data/lib/diagnostics/data_group.rb +37 -0
- data/lib/diagnostics/methods.rb +46 -0
- data/lib/diagnostics/version.rb +1 -1
- data/rails/init.rb +1 -0
- data/spec/diagnostics/check_spec.rb +78 -0
- data/spec/diagnostics/data/attribute_spec.rb +22 -0
- data/spec/diagnostics/data/list_spec.rb +22 -0
- data/spec/diagnostics/data/table_spec.rb +63 -0
- data/spec/diagnostics/data/text_spec.rb +22 -0
- data/spec/diagnostics/data_group_spec.rb +177 -0
- data/spec/diagnostics/methods_spec.rb +128 -0
- data/spec/diagnostics_spec.rb +11 -0
- data/spec/spec_helper.rb +13 -0
- data/spec_rails/rails2/Gemfile +13 -0
- data/spec_rails/rails2/Gemfile.lock +91 -0
- data/spec_rails/rails2/Rakefile +13 -0
- data/spec_rails/rails2/app_root/README +243 -0
- data/spec_rails/rails2/app_root/Rakefile +10 -0
- data/spec_rails/rails2/app_root/app/controllers/application_controller.rb +10 -0
- data/spec_rails/rails2/app_root/app/helpers/application_helper.rb +3 -0
- data/spec_rails/rails2/app_root/config/boot.rb +114 -0
- data/spec_rails/rails2/app_root/config/database.yml +25 -0
- data/spec_rails/rails2/app_root/config/environment.rb +45 -0
- data/spec_rails/rails2/app_root/config/environments/cucumber.rb +29 -0
- data/spec_rails/rails2/app_root/config/environments/development.rb +17 -0
- data/spec_rails/rails2/app_root/config/environments/production.rb +28 -0
- data/spec_rails/rails2/app_root/config/environments/test.rb +28 -0
- data/spec_rails/rails2/app_root/config/initializers/backtrace_silencers.rb +7 -0
- data/spec_rails/rails2/app_root/config/initializers/cookie_verification_secret.rb +7 -0
- data/spec_rails/rails2/app_root/config/initializers/inflections.rb +10 -0
- data/spec_rails/rails2/app_root/config/initializers/load_diagnostics.rb +2 -0
- data/spec_rails/rails2/app_root/config/initializers/mime_types.rb +5 -0
- data/spec_rails/rails2/app_root/config/initializers/new_rails_defaults.rb +21 -0
- data/spec_rails/rails2/app_root/config/initializers/session_store.rb +15 -0
- data/spec_rails/rails2/app_root/config/locales/en.yml +5 -0
- data/spec_rails/rails2/app_root/config/routes.rb +43 -0
- data/spec_rails/rails2/app_root/db/seeds.rb +7 -0
- data/spec_rails/rails2/app_root/doc/README_FOR_APP +2 -0
- data/spec_rails/rails2/app_root/lib/diagnostics/mysql_check.rb +18 -0
- data/spec_rails/rails2/app_root/lib/diagnostics/server_check.rb +4 -0
- data/spec_rails/rails2/app_root/lib/tasks/cucumber.rake +53 -0
- data/spec_rails/rails2/app_root/public/404.html +30 -0
- data/spec_rails/rails2/app_root/public/422.html +30 -0
- data/spec_rails/rails2/app_root/public/500.html +30 -0
- data/spec_rails/rails2/app_root/public/favicon.ico +0 -0
- data/spec_rails/rails2/app_root/public/images/rails.png +0 -0
- data/spec_rails/rails2/app_root/public/index.html +275 -0
- data/spec_rails/rails2/app_root/public/javascripts/application.js +2 -0
- data/spec_rails/rails2/app_root/public/javascripts/controls.js +963 -0
- data/spec_rails/rails2/app_root/public/javascripts/dragdrop.js +973 -0
- data/spec_rails/rails2/app_root/public/javascripts/effects.js +1128 -0
- data/spec_rails/rails2/app_root/public/javascripts/prototype.js +4320 -0
- data/spec_rails/rails2/app_root/public/robots.txt +5 -0
- data/spec_rails/rails2/app_root/script/about +4 -0
- data/spec_rails/rails2/app_root/script/console +3 -0
- data/spec_rails/rails2/app_root/script/cucumber +10 -0
- data/spec_rails/rails2/app_root/script/dbconsole +3 -0
- data/spec_rails/rails2/app_root/script/destroy +3 -0
- data/spec_rails/rails2/app_root/script/generate +3 -0
- data/spec_rails/rails2/app_root/script/performance/benchmarker +3 -0
- data/spec_rails/rails2/app_root/script/performance/profiler +3 -0
- data/spec_rails/rails2/app_root/script/plugin +3 -0
- data/spec_rails/rails2/app_root/script/runner +3 -0
- data/spec_rails/rails2/app_root/script/server +3 -0
- data/spec_rails/rails2/app_root/test/performance/browsing_test.rb +9 -0
- data/spec_rails/rails2/app_root/test/test_helper.rb +38 -0
- data/spec_rails/rails2/controllers/diagnostics_controller_spec.rb +12 -0
- data/spec_rails/rails2/controllers/statuses_controller_spec.rb +34 -0
- data/spec_rails/rails2/features/diagnostics_page.feature +34 -0
- data/spec_rails/rails2/features/status_page.feature +43 -0
- data/spec_rails/rails2/features/step_definitions/diagnostic_steps.rb +39 -0
- data/spec_rails/rails2/features/step_definitions/web_steps.rb +219 -0
- data/spec_rails/rails2/features/support/env.rb +61 -0
- data/spec_rails/rails2/features/support/hooks.rb +3 -0
- data/spec_rails/rails2/features/support/paths.rb +36 -0
- data/spec_rails/rails2/spec.opts +1 -0
- data/spec_rails/rails2/spec_helper.rb +4 -0
- data/spec_rails/rails3/Gemfile +0 -0
- metadata +119 -7
@@ -0,0 +1,61 @@
|
|
1
|
+
# IMPORTANT: This file is generated by cucumber-rails - edit at your own peril.
|
2
|
+
# It is recommended to regenerate this file in the future when you upgrade to a
|
3
|
+
# newer version of cucumber-rails. Consider adding your own code to a new file
|
4
|
+
# instead of editing this one. Cucumber will automatically load all features/**/*.rb
|
5
|
+
# files.
|
6
|
+
|
7
|
+
ENV["RAILS_ENV"] ||= "cucumber"
|
8
|
+
require File.expand_path(File.dirname(__FILE__) + '/../../app_root/config/environment')
|
9
|
+
|
10
|
+
require 'cucumber/formatter/unicode' # Remove this line if you don't want Cucumber Unicode support
|
11
|
+
require 'cucumber/rails/rspec'
|
12
|
+
require 'cucumber/rails/world'
|
13
|
+
require 'cucumber/rails/active_record'
|
14
|
+
require 'cucumber/web/tableish'
|
15
|
+
|
16
|
+
require 'capybara/rails'
|
17
|
+
require 'capybara/cucumber'
|
18
|
+
require 'capybara/session'
|
19
|
+
require 'cucumber/rails/capybara_javascript_emulation' # Lets you click links with onclick javascript handlers without using @culerity or @javascript
|
20
|
+
# Capybara defaults to XPath selectors rather than Webrat's default of CSS3. In
|
21
|
+
# order to ease the transition to Capybara we set the default here. If you'd
|
22
|
+
# prefer to use XPath just remove this line and adjust any selectors in your
|
23
|
+
# steps to use the XPath syntax.
|
24
|
+
|
25
|
+
require 'diagnostics'
|
26
|
+
|
27
|
+
Capybara.default_selector = :css
|
28
|
+
|
29
|
+
# If you set this to false, any error raised from within your app will bubble
|
30
|
+
# up to your step definition and out to cucumber unless you catch it somewhere
|
31
|
+
# on the way. You can make Rails rescue errors and render error pages on a
|
32
|
+
# per-scenario basis by tagging a scenario or feature with the @allow-rescue tag.
|
33
|
+
#
|
34
|
+
# If you set this to true, Rails will rescue all errors and render error
|
35
|
+
# pages, more or less in the same way your application would behave in the
|
36
|
+
# default production environment. It's not recommended to do this for all
|
37
|
+
# of your scenarios, as this makes it hard to discover errors in your application.
|
38
|
+
ActionController::Base.allow_rescue = false
|
39
|
+
|
40
|
+
# If you set this to true, each scenario will run in a database transaction.
|
41
|
+
# You can still turn off transactions on a per-scenario basis, simply tagging
|
42
|
+
# a feature or scenario with the @no-txn tag. If you are using Capybara,
|
43
|
+
# tagging with @culerity or @javascript will also turn transactions off.
|
44
|
+
#
|
45
|
+
# If you set this to false, transactions will be off for all scenarios,
|
46
|
+
# regardless of whether you use @no-txn or not.
|
47
|
+
#
|
48
|
+
# Beware that turning transactions off will leave data in your database
|
49
|
+
# after each scenario, which can lead to hard-to-debug failures in
|
50
|
+
# subsequent scenarios. If you do this, we recommend you create a Before
|
51
|
+
# block that will explicitly put your database in a known state.
|
52
|
+
Cucumber::Rails::World.use_transactional_fixtures = true
|
53
|
+
# How to clean your database when transactions are turned off. See
|
54
|
+
# http://github.com/bmabey/database_cleaner for more info.
|
55
|
+
if defined?(ActiveRecord::Base)
|
56
|
+
begin
|
57
|
+
require 'database_cleaner'
|
58
|
+
DatabaseCleaner.strategy = :truncation
|
59
|
+
rescue LoadError => ignore_if_database_cleaner_not_present
|
60
|
+
end
|
61
|
+
end
|
@@ -0,0 +1,36 @@
|
|
1
|
+
module NavigationHelpers
|
2
|
+
# Maps a name to a path. Used by the
|
3
|
+
#
|
4
|
+
# When /^I go to (.+)$/ do |page_name|
|
5
|
+
#
|
6
|
+
# step definition in web_steps.rb
|
7
|
+
#
|
8
|
+
def path_to(page_name)
|
9
|
+
case page_name
|
10
|
+
|
11
|
+
when /the status page/
|
12
|
+
status_path
|
13
|
+
|
14
|
+
when /the diagnostics page/
|
15
|
+
diagnostics_path
|
16
|
+
|
17
|
+
# Add more mappings here.
|
18
|
+
# Here is an example that pulls values out of the Regexp:
|
19
|
+
#
|
20
|
+
# when /^(.*)'s profile page$/i
|
21
|
+
# user_profile_path(User.find_by_login($1))
|
22
|
+
|
23
|
+
else
|
24
|
+
begin
|
25
|
+
page_name =~ /the (.*) page/
|
26
|
+
path_components = $1.split(/\s+/)
|
27
|
+
self.send(path_components.push('path').join('_').to_sym)
|
28
|
+
rescue Object => e
|
29
|
+
raise "Can't find mapping from \"#{page_name}\" to a path.\n" +
|
30
|
+
"Now, go and add a mapping in #{__FILE__}"
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
World(NavigationHelpers)
|
@@ -0,0 +1 @@
|
|
1
|
+
--color
|
File without changes
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: diagnostics
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 27
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 2
|
10
|
+
version: 0.0.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Justin Ko
|
@@ -77,13 +77,114 @@ extra_rdoc_files: []
|
|
77
77
|
|
78
78
|
files:
|
79
79
|
- .gitignore
|
80
|
+
- .specification
|
80
81
|
- Gemfile
|
82
|
+
- Gemfile.lock
|
83
|
+
- LICENSE
|
84
|
+
- README.md
|
81
85
|
- Rakefile
|
86
|
+
- app/controllers/diagnostics_application_controller.rb
|
87
|
+
- app/controllers/diagnostics_controller.rb
|
88
|
+
- app/controllers/statuses_controller.rb
|
89
|
+
- app/views/diagnostics/_check.html.erb
|
90
|
+
- app/views/diagnostics/index.html.erb
|
91
|
+
- app/views/layouts/diagnostics.html.erb
|
92
|
+
- app/views/statuses/show.html.erb
|
93
|
+
- config/routes.rb
|
82
94
|
- diagnostics.gemspec
|
95
|
+
- features/diagnostic_checks.feature
|
96
|
+
- features/step_definitions/aruba.rb
|
97
|
+
- features/support/env.rb
|
83
98
|
- lib/diagnostics.rb
|
99
|
+
- lib/diagnostics/check.rb
|
100
|
+
- lib/diagnostics/data/attribute.rb
|
101
|
+
- lib/diagnostics/data/elements.rb
|
102
|
+
- lib/diagnostics/data/list.rb
|
103
|
+
- lib/diagnostics/data/table.rb
|
104
|
+
- lib/diagnostics/data/text.rb
|
105
|
+
- lib/diagnostics/data_group.rb
|
106
|
+
- lib/diagnostics/methods.rb
|
84
107
|
- lib/diagnostics/version.rb
|
108
|
+
- rails/init.rb
|
109
|
+
- spec/diagnostics/check_spec.rb
|
110
|
+
- spec/diagnostics/data/attribute_spec.rb
|
111
|
+
- spec/diagnostics/data/list_spec.rb
|
112
|
+
- spec/diagnostics/data/table_spec.rb
|
113
|
+
- spec/diagnostics/data/text_spec.rb
|
114
|
+
- spec/diagnostics/data_group_spec.rb
|
115
|
+
- spec/diagnostics/methods_spec.rb
|
116
|
+
- spec/diagnostics_spec.rb
|
117
|
+
- spec/spec_helper.rb
|
118
|
+
- spec_rails/rails2/Gemfile
|
119
|
+
- spec_rails/rails2/Gemfile.lock
|
120
|
+
- spec_rails/rails2/Rakefile
|
121
|
+
- spec_rails/rails2/app_root/README
|
122
|
+
- spec_rails/rails2/app_root/Rakefile
|
123
|
+
- spec_rails/rails2/app_root/app/controllers/application_controller.rb
|
124
|
+
- spec_rails/rails2/app_root/app/helpers/application_helper.rb
|
125
|
+
- spec_rails/rails2/app_root/config/boot.rb
|
126
|
+
- spec_rails/rails2/app_root/config/database.yml
|
127
|
+
- spec_rails/rails2/app_root/config/environment.rb
|
128
|
+
- spec_rails/rails2/app_root/config/environments/cucumber.rb
|
129
|
+
- spec_rails/rails2/app_root/config/environments/development.rb
|
130
|
+
- spec_rails/rails2/app_root/config/environments/production.rb
|
131
|
+
- spec_rails/rails2/app_root/config/environments/test.rb
|
132
|
+
- spec_rails/rails2/app_root/config/initializers/backtrace_silencers.rb
|
133
|
+
- spec_rails/rails2/app_root/config/initializers/cookie_verification_secret.rb
|
134
|
+
- spec_rails/rails2/app_root/config/initializers/inflections.rb
|
135
|
+
- spec_rails/rails2/app_root/config/initializers/load_diagnostics.rb
|
136
|
+
- spec_rails/rails2/app_root/config/initializers/mime_types.rb
|
137
|
+
- spec_rails/rails2/app_root/config/initializers/new_rails_defaults.rb
|
138
|
+
- spec_rails/rails2/app_root/config/initializers/session_store.rb
|
139
|
+
- spec_rails/rails2/app_root/config/locales/en.yml
|
140
|
+
- spec_rails/rails2/app_root/config/routes.rb
|
141
|
+
- spec_rails/rails2/app_root/db/seeds.rb
|
142
|
+
- spec_rails/rails2/app_root/doc/README_FOR_APP
|
143
|
+
- spec_rails/rails2/app_root/lib/diagnostics/mysql_check.rb
|
144
|
+
- spec_rails/rails2/app_root/lib/diagnostics/server_check.rb
|
145
|
+
- spec_rails/rails2/app_root/lib/tasks/cucumber.rake
|
146
|
+
- spec_rails/rails2/app_root/log/development.log
|
147
|
+
- spec_rails/rails2/app_root/log/production.log
|
148
|
+
- spec_rails/rails2/app_root/log/server.log
|
149
|
+
- spec_rails/rails2/app_root/public/404.html
|
150
|
+
- spec_rails/rails2/app_root/public/422.html
|
151
|
+
- spec_rails/rails2/app_root/public/500.html
|
152
|
+
- spec_rails/rails2/app_root/public/favicon.ico
|
153
|
+
- spec_rails/rails2/app_root/public/images/rails.png
|
154
|
+
- spec_rails/rails2/app_root/public/index.html
|
155
|
+
- spec_rails/rails2/app_root/public/javascripts/application.js
|
156
|
+
- spec_rails/rails2/app_root/public/javascripts/controls.js
|
157
|
+
- spec_rails/rails2/app_root/public/javascripts/dragdrop.js
|
158
|
+
- spec_rails/rails2/app_root/public/javascripts/effects.js
|
159
|
+
- spec_rails/rails2/app_root/public/javascripts/prototype.js
|
160
|
+
- spec_rails/rails2/app_root/public/robots.txt
|
161
|
+
- spec_rails/rails2/app_root/script/about
|
162
|
+
- spec_rails/rails2/app_root/script/console
|
163
|
+
- spec_rails/rails2/app_root/script/cucumber
|
164
|
+
- spec_rails/rails2/app_root/script/dbconsole
|
165
|
+
- spec_rails/rails2/app_root/script/destroy
|
166
|
+
- spec_rails/rails2/app_root/script/generate
|
167
|
+
- spec_rails/rails2/app_root/script/performance/benchmarker
|
168
|
+
- spec_rails/rails2/app_root/script/performance/profiler
|
169
|
+
- spec_rails/rails2/app_root/script/plugin
|
170
|
+
- spec_rails/rails2/app_root/script/runner
|
171
|
+
- spec_rails/rails2/app_root/script/server
|
172
|
+
- spec_rails/rails2/app_root/test/performance/browsing_test.rb
|
173
|
+
- spec_rails/rails2/app_root/test/test_helper.rb
|
174
|
+
- spec_rails/rails2/controllers/diagnostics_controller_spec.rb
|
175
|
+
- spec_rails/rails2/controllers/statuses_controller_spec.rb
|
176
|
+
- spec_rails/rails2/features/diagnostics_page.feature
|
177
|
+
- spec_rails/rails2/features/status_page.feature
|
178
|
+
- spec_rails/rails2/features/step_definitions/diagnostic_steps.rb
|
179
|
+
- spec_rails/rails2/features/step_definitions/web_steps.rb
|
180
|
+
- spec_rails/rails2/features/support/env.rb
|
181
|
+
- spec_rails/rails2/features/support/hooks.rb
|
182
|
+
- spec_rails/rails2/features/support/paths.rb
|
183
|
+
- spec_rails/rails2/spec.opts
|
184
|
+
- spec_rails/rails2/spec_helper.rb
|
185
|
+
- spec_rails/rails3/Gemfile
|
85
186
|
has_rdoc: true
|
86
|
-
homepage:
|
187
|
+
homepage: http://github.com/justinko/diagnostics
|
87
188
|
licenses: []
|
88
189
|
|
89
190
|
post_install_message:
|
@@ -115,6 +216,17 @@ rubyforge_project: diagnostics
|
|
115
216
|
rubygems_version: 1.4.2
|
116
217
|
signing_key:
|
117
218
|
specification_version: 3
|
118
|
-
summary: diagnostics-0.0.
|
119
|
-
test_files:
|
120
|
-
|
219
|
+
summary: diagnostics-0.0.2
|
220
|
+
test_files:
|
221
|
+
- features/diagnostic_checks.feature
|
222
|
+
- features/step_definitions/aruba.rb
|
223
|
+
- features/support/env.rb
|
224
|
+
- spec/diagnostics/check_spec.rb
|
225
|
+
- spec/diagnostics/data/attribute_spec.rb
|
226
|
+
- spec/diagnostics/data/list_spec.rb
|
227
|
+
- spec/diagnostics/data/table_spec.rb
|
228
|
+
- spec/diagnostics/data/text_spec.rb
|
229
|
+
- spec/diagnostics/data_group_spec.rb
|
230
|
+
- spec/diagnostics/methods_spec.rb
|
231
|
+
- spec/diagnostics_spec.rb
|
232
|
+
- spec/spec_helper.rb
|