torquebox-console 0.2.5 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- data/console.rb +7 -0
- data/dependencies.rb +7 -7
- data/lib/torquebox/console/client.rb +5 -1
- data/lib/torquebox/console/version.rb +1 -1
- data/public/console.js +22 -12
- data/stomplets/torque_box_console.rb +19 -6
- data/views/index.haml +8 -3
- metadata +1424 -2690
- data/vendor/bundle/ruby/1.8/bin/catstomp +0 -23
- data/vendor/bundle/ruby/1.8/bin/haml +0 -23
- data/vendor/bundle/ruby/1.8/bin/html2haml +0 -23
- data/vendor/bundle/ruby/1.8/bin/rackup +0 -23
- data/vendor/bundle/ruby/1.8/bin/rake +0 -23
- data/vendor/bundle/ruby/1.8/bin/rake2thor +0 -23
- data/vendor/bundle/ruby/1.8/bin/stompcat +0 -23
- data/vendor/bundle/ruby/1.8/bin/thor +0 -23
- data/vendor/bundle/ruby/1.8/bin/tilt +0 -23
- data/vendor/bundle/ruby/1.8/cache/haml-3.1.8.gem +0 -0
- data/vendor/bundle/ruby/1.8/cache/rack-1.5.2.gem +0 -0
- data/vendor/bundle/ruby/1.8/cache/rack-protection-1.4.0.gem +0 -0
- data/vendor/bundle/ruby/1.8/cache/rake-10.0.3.gem +0 -0
- data/vendor/bundle/ruby/1.8/cache/sinatra-1.3.5.gem +0 -0
- data/vendor/bundle/ruby/1.8/cache/stomp-1.2.8.gem +0 -0
- data/vendor/bundle/ruby/1.8/cache/thor-0.17.0.gem +0 -0
- data/vendor/bundle/ruby/1.8/cache/tilt-1.3.4.gem +0 -0
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/CONTRIBUTING +0 -3
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/MIT-LICENSE +0 -20
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/README.md +0 -133
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/REVISION +0 -1
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/Rakefile +0 -419
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/VERSION +0 -1
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/VERSION_NAME +0 -1
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/bin/haml +0 -9
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/bin/html2haml +0 -7
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/extra/update_watch.rb +0 -13
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/init.rb +0 -18
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/lib/haml.rb +0 -47
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/lib/haml/buffer.rb +0 -301
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/lib/haml/compiler.rb +0 -453
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/lib/haml/engine.rb +0 -312
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/lib/haml/error.rb +0 -22
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/lib/haml/exec.rb +0 -362
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/lib/haml/filters.rb +0 -385
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/lib/haml/helpers.rb +0 -608
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/lib/haml/helpers/action_view_extensions.rb +0 -57
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/lib/haml/helpers/action_view_mods.rb +0 -260
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/lib/haml/helpers/rails_323_textarea_fix.rb +0 -41
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/lib/haml/helpers/xss_mods.rb +0 -165
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/lib/haml/html.rb +0 -412
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/lib/haml/html/erb.rb +0 -141
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/lib/haml/parser.rb +0 -711
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/lib/haml/railtie.rb +0 -19
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/lib/haml/root.rb +0 -7
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/lib/haml/shared.rb +0 -78
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/lib/haml/template.rb +0 -99
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/lib/haml/template/options.rb +0 -16
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/lib/haml/template/patch.rb +0 -58
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/lib/haml/template/plugin.rb +0 -123
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/lib/haml/util.rb +0 -842
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/lib/haml/version.rb +0 -109
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/lib/sass.rb +0 -8
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/lib/sass/plugin.rb +0 -10
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/lib/sass/rails2_shim.rb +0 -9
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/lib/sass/rails3_shim.rb +0 -16
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/rails/init.rb +0 -1
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/benchmark.rb +0 -91
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/gemfiles/Gemfile.rails-2.0.x +0 -8
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/gemfiles/Gemfile.rails-2.0.x.lock +0 -38
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/gemfiles/Gemfile.rails-2.1.x +0 -8
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/gemfiles/Gemfile.rails-2.1.x.lock +0 -38
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/gemfiles/Gemfile.rails-2.2.x +0 -8
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/gemfiles/Gemfile.rails-2.2.x.lock +0 -38
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/gemfiles/Gemfile.rails-2.3.x +0 -8
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/gemfiles/Gemfile.rails-2.3.x.lock +0 -40
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/gemfiles/Gemfile.rails-3.0.x +0 -8
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/gemfiles/Gemfile.rails-3.0.x.lock +0 -85
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/gemfiles/Gemfile.rails-3.1.x +0 -8
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/gemfiles/Gemfile.rails-3.1.x.lock +0 -97
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/gemfiles/Gemfile.rails-3.2.x +0 -8
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/gemfiles/Gemfile.rails-3.2.x.lock +0 -95
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/gemfiles/Gemfile.rails-xss-2.3.x +0 -9
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/gemfiles/Gemfile.rails-xss-2.3.x.lock +0 -42
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/haml/engine_test.rb +0 -1950
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/haml/erb/_av_partial_1.erb +0 -12
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/haml/erb/_av_partial_2.erb +0 -8
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/haml/erb/action_view.erb +0 -62
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/haml/erb/standard.erb +0 -55
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/haml/helper_test.rb +0 -467
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/haml/html2haml/erb_tests.rb +0 -440
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/haml/html2haml_test.rb +0 -336
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/haml/markaby/standard.mab +0 -52
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/haml/mocks/article.rb +0 -6
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/haml/results/content_for_layout.xhtml +0 -12
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/haml/results/eval_suppressed.xhtml +0 -9
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/haml/results/filters.xhtml +0 -62
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/haml/results/helpers.xhtml +0 -70
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/haml/results/helpful.xhtml +0 -10
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/haml/results/just_stuff.xhtml +0 -70
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/haml/results/list.xhtml +0 -12
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/haml/results/nuke_inner_whitespace.xhtml +0 -40
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/haml/results/nuke_outer_whitespace.xhtml +0 -148
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/haml/results/original_engine.xhtml +0 -20
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/haml/results/partial_layout.xhtml +0 -5
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/haml/results/partials.xhtml +0 -21
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/haml/results/render_layout.xhtml +0 -3
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/haml/results/silent_script.xhtml +0 -74
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/haml/results/standard.xhtml +0 -162
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/haml/results/tag_parsing.xhtml +0 -23
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/haml/results/very_basic.xhtml +0 -5
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/haml/results/whitespace_handling.xhtml +0 -85
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/haml/spec/README.md +0 -97
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/haml/spec/lua_haml_spec.lua +0 -30
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/haml/spec/ruby_haml_test.rb +0 -19
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/haml/spec/tests.json +0 -534
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/haml/spec_test.rb +0 -44
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/haml/template_test.rb +0 -443
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/haml/templates/_av_partial_1.haml +0 -9
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/haml/templates/_av_partial_1_ugly.haml +0 -9
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/haml/templates/_av_partial_2.haml +0 -5
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/haml/templates/_av_partial_2_ugly.haml +0 -5
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/haml/templates/_layout.erb +0 -3
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/haml/templates/_layout_for_partial.haml +0 -3
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/haml/templates/_partial.haml +0 -8
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/haml/templates/_text_area.haml +0 -3
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/haml/templates/action_view.haml +0 -47
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/haml/templates/action_view_ugly.haml +0 -47
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/haml/templates/breakage.haml +0 -8
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/haml/templates/content_for_layout.haml +0 -8
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/haml/templates/eval_suppressed.haml +0 -11
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/haml/templates/filters.haml +0 -66
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/haml/templates/helpers.haml +0 -55
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/haml/templates/helpful.haml +0 -11
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/haml/templates/just_stuff.haml +0 -85
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/haml/templates/list.haml +0 -12
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/haml/templates/nuke_inner_whitespace.haml +0 -32
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/haml/templates/nuke_outer_whitespace.haml +0 -144
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/haml/templates/original_engine.haml +0 -17
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/haml/templates/partial_layout.haml +0 -10
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/haml/templates/partialize.haml +0 -1
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/haml/templates/partials.haml +0 -12
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/haml/templates/render_layout.haml +0 -2
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/haml/templates/silent_script.haml +0 -40
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/haml/templates/standard.haml +0 -43
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/haml/templates/standard_ugly.haml +0 -43
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/haml/templates/tag_parsing.haml +0 -21
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/haml/templates/very_basic.haml +0 -4
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/haml/templates/whitespace_handling.haml +0 -87
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/haml/util_test.rb +0 -300
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/linked_rails.rb +0 -42
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/test_helper.rb +0 -75
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/CONTRIBUTING +0 -3
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/MIT-LICENSE +0 -20
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/README.md +0 -201
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/Rakefile +0 -339
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/TODO +0 -39
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/VERSION +0 -1
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/VERSION_NAME +0 -1
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/bin/sass +0 -8
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/bin/sass-convert +0 -7
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/bin/scss +0 -8
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/doc-src/FAQ.md +0 -35
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/doc-src/INDENTED_SYNTAX.md +0 -210
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/doc-src/SASS_CHANGELOG.md +0 -2327
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/doc-src/SASS_REFERENCE.md +0 -1965
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/doc-src/SCSS_FOR_SASS_USERS.md +0 -155
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/ext/extconf.rb +0 -10
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/extra/update_watch.rb +0 -13
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/init.rb +0 -18
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass.rb +0 -73
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/cache_stores.rb +0 -15
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/cache_stores/base.rb +0 -86
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/cache_stores/chain.rb +0 -33
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/cache_stores/filesystem.rb +0 -60
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/cache_stores/memory.rb +0 -47
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/cache_stores/null.rb +0 -25
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/callbacks.rb +0 -66
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/css.rb +0 -295
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/engine.rb +0 -878
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/environment.rb +0 -166
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/error.rb +0 -201
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/exec.rb +0 -672
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/importers.rb +0 -22
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/importers/base.rb +0 -139
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/importers/filesystem.rb +0 -149
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/less.rb +0 -382
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/logger.rb +0 -15
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/logger/base.rb +0 -32
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/logger/log_level.rb +0 -49
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/plugin.rb +0 -132
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/plugin/compiler.rb +0 -383
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/plugin/configuration.rb +0 -123
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/plugin/generic.rb +0 -15
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/plugin/merb.rb +0 -48
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/plugin/rack.rb +0 -60
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/plugin/rails.rb +0 -47
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/plugin/staleness_checker.rb +0 -173
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/railtie.rb +0 -9
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/repl.rb +0 -58
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/root.rb +0 -7
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/script.rb +0 -40
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/script/bool.rb +0 -18
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/script/color.rb +0 -480
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/script/css_lexer.rb +0 -29
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/script/css_parser.rb +0 -31
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/script/funcall.rb +0 -175
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/script/functions.rb +0 -1386
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/script/interpolation.rb +0 -79
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/script/lexer.rb +0 -339
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/script/list.rb +0 -83
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/script/literal.rb +0 -250
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/script/node.rb +0 -99
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/script/number.rb +0 -452
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/script/operation.rb +0 -99
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/script/parser.rb +0 -474
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/script/string.rb +0 -51
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/script/string_interpolation.rb +0 -103
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/script/unary_operation.rb +0 -64
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/script/variable.rb +0 -59
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/scss.rb +0 -17
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/scss/css_parser.rb +0 -46
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/scss/parser.rb +0 -960
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/scss/rx.rb +0 -128
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/scss/sass_parser.rb +0 -11
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/scss/script_lexer.rb +0 -15
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/scss/script_parser.rb +0 -25
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/scss/static_parser.rb +0 -40
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/selector.rb +0 -361
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/selector/abstract_sequence.rb +0 -62
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/selector/comma_sequence.rb +0 -81
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/selector/sequence.rb +0 -233
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/selector/simple.rb +0 -113
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/selector/simple_sequence.rb +0 -134
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/shared.rb +0 -78
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/tree/charset_node.rb +0 -22
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/tree/comment_node.rb +0 -90
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/tree/debug_node.rb +0 -18
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/tree/directive_node.rb +0 -23
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/tree/each_node.rb +0 -24
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/tree/extend_node.rb +0 -29
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/tree/for_node.rb +0 -36
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/tree/function_node.rb +0 -27
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/tree/if_node.rb +0 -52
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/tree/import_node.rb +0 -68
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/tree/media_node.rb +0 -32
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/tree/mixin_def_node.rb +0 -27
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/tree/mixin_node.rb +0 -32
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/tree/node.rb +0 -201
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/tree/prop_node.rb +0 -148
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/tree/return_node.rb +0 -18
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/tree/root_node.rb +0 -28
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/tree/rule_node.rb +0 -136
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/tree/variable_node.rb +0 -30
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/tree/visitors/base.rb +0 -75
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/tree/visitors/check_nesting.rb +0 -133
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/tree/visitors/convert.rb +0 -260
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/tree/visitors/cssize.rb +0 -175
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/tree/visitors/deep_copy.rb +0 -87
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/tree/visitors/perform.rb +0 -332
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/tree/visitors/set_options.rb +0 -97
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/tree/visitors/to_css.rb +0 -210
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/tree/warn_node.rb +0 -18
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/tree/while_node.rb +0 -18
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/util.rb +0 -721
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/util/subset_map.rb +0 -101
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/version.rb +0 -112
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/rails/init.rb +0 -1
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/sass.gemspec +0 -33
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/Gemfile +0 -4
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/Gemfile.lock +0 -19
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/cache_test.rb +0 -89
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/callbacks_test.rb +0 -61
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/conversion_test.rb +0 -1199
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/css2sass_test.rb +0 -373
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/data/hsl-rgb.txt +0 -319
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/engine_test.rb +0 -2567
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/extend_test.rb +0 -1348
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/fixtures/test_staleness_check_across_importers.css +0 -1
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/fixtures/test_staleness_check_across_importers.scss +0 -1
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/functions_test.rb +0 -1038
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/importer_test.rb +0 -192
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/less_conversion_test.rb +0 -653
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/logger_test.rb +0 -58
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/mock_importer.rb +0 -49
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/more_results/more1.css +0 -9
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/more_results/more1_with_line_comments.css +0 -26
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/more_results/more_import.css +0 -29
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/more_templates/_more_partial.sass +0 -2
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/more_templates/more1.sass +0 -23
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/more_templates/more_import.sass +0 -11
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/plugin_test.rb +0 -472
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/results/alt.css +0 -4
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/results/basic.css +0 -9
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/results/compact.css +0 -5
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/results/complex.css +0 -86
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/results/compressed.css +0 -1
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/results/expanded.css +0 -19
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/results/if.css +0 -3
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/results/import.css +0 -31
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/results/import_charset.css +0 -4
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/results/import_charset_1_8.css +0 -4
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/results/import_charset_ibm866.css +0 -4
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/results/line_numbers.css +0 -49
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/results/mixins.css +0 -95
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/results/multiline.css +0 -24
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/results/nested.css +0 -22
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/results/options.css +0 -1
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/results/parent_ref.css +0 -13
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/results/script.css +0 -16
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/results/scss_import.css +0 -31
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/results/scss_importee.css +0 -2
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/results/subdir/nested_subdir/nested_subdir.css +0 -1
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/results/subdir/subdir.css +0 -3
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/results/units.css +0 -11
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/results/warn.css +0 -0
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/results/warn_imported.css +0 -0
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/script_conversion_test.rb +0 -285
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/script_test.rb +0 -514
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/scss/css_test.rb +0 -922
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/scss/rx_test.rb +0 -156
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/scss/scss_test.rb +0 -1273
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/scss/test_helper.rb +0 -37
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/templates/_imported_charset_ibm866.sass +0 -4
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/templates/_imported_charset_utf8.sass +0 -4
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/templates/_partial.sass +0 -2
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/templates/alt.sass +0 -16
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/templates/basic.sass +0 -23
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/templates/bork1.sass +0 -2
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/templates/bork2.sass +0 -2
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/templates/bork3.sass +0 -2
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/templates/bork4.sass +0 -2
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/templates/bork5.sass +0 -3
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/templates/compact.sass +0 -17
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/templates/complex.sass +0 -305
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/templates/compressed.sass +0 -15
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/templates/expanded.sass +0 -17
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/templates/if.sass +0 -11
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/templates/import.sass +0 -12
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/templates/import_charset.sass +0 -7
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/templates/import_charset_1_8.sass +0 -4
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/templates/import_charset_ibm866.sass +0 -9
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/templates/importee.less +0 -2
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/templates/importee.sass +0 -19
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/templates/line_numbers.sass +0 -13
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/templates/mixin_bork.sass +0 -5
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/templates/mixins.sass +0 -76
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/templates/multiline.sass +0 -20
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/templates/nested.sass +0 -25
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/templates/nested_bork1.sass +0 -2
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/templates/nested_bork2.sass +0 -2
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/templates/nested_bork3.sass +0 -2
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/templates/nested_bork4.sass +0 -2
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/templates/nested_bork5.sass +0 -2
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/templates/nested_import.sass +0 -2
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/templates/nested_mixin_bork.sass +0 -6
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/templates/options.sass +0 -2
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/templates/parent_ref.sass +0 -25
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/templates/script.sass +0 -101
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/templates/scss_import.scss +0 -11
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/templates/scss_importee.scss +0 -1
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/templates/subdir/nested_subdir/_nested_partial.sass +0 -2
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/templates/subdir/nested_subdir/nested_subdir.sass +0 -3
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/templates/subdir/subdir.sass +0 -6
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/templates/units.sass +0 -11
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/templates/warn.sass +0 -3
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/templates/warn_imported.sass +0 -4
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/test_helper.rb +0 -8
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/util/subset_map_test.rb +0 -91
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/util_test.rb +0 -266
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/test_helper.rb +0 -69
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/vendor/fssm/Gemfile +0 -3
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/vendor/fssm/LICENSE +0 -20
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/vendor/fssm/README.markdown +0 -83
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/vendor/fssm/Rakefile +0 -11
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/vendor/fssm/example.rb +0 -12
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/vendor/fssm/fssm.gemspec +0 -24
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/vendor/fssm/lib/fssm.rb +0 -37
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/vendor/fssm/lib/fssm/backends/fsevents.rb +0 -36
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/vendor/fssm/lib/fssm/backends/inotify.rb +0 -26
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/vendor/fssm/lib/fssm/backends/polling.rb +0 -25
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/vendor/fssm/lib/fssm/backends/rbfsevent.rb +0 -42
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/vendor/fssm/lib/fssm/backends/rubycocoa/fsevents.rb +0 -131
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/vendor/fssm/lib/fssm/monitor.rb +0 -36
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/vendor/fssm/lib/fssm/path.rb +0 -94
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/vendor/fssm/lib/fssm/pathname.rb +0 -36
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/vendor/fssm/lib/fssm/state/directory.rb +0 -75
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/vendor/fssm/lib/fssm/state/file.rb +0 -24
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/vendor/fssm/lib/fssm/support.rb +0 -92
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/vendor/fssm/lib/fssm/tree.rb +0 -176
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/vendor/fssm/lib/fssm/version.rb +0 -3
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/vendor/fssm/profile/prof-cache.rb +0 -40
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/vendor/fssm/profile/prof-fssm-pathname.html +0 -1231
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/vendor/fssm/profile/prof-pathname-rubinius.rb +0 -35
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/vendor/fssm/profile/prof-pathname.rb +0 -68
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/vendor/fssm/profile/prof-plain-pathname.html +0 -988
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/vendor/fssm/profile/prof.html +0 -2379
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/vendor/fssm/spec/count_down_latch.rb +0 -151
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/vendor/fssm/spec/monitor_spec.rb +0 -202
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/vendor/fssm/spec/path_spec.rb +0 -96
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/vendor/fssm/spec/root/duck/quack.txt +0 -0
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/vendor/fssm/spec/root/file.css +0 -0
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/vendor/fssm/spec/root/file.rb +0 -0
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/vendor/fssm/spec/root/file.yml +0 -0
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/vendor/fssm/spec/root/moo/cow.txt +0 -0
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/vendor/fssm/spec/spec_helper.rb +0 -14
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/yard/callbacks.rb +0 -29
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/yard/default/fulldoc/html/css/common.sass +0 -26
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/yard/default/layout/html/footer.erb +0 -12
- data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/yard/inherited_hash.rb +0 -41
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/COPYING +0 -18
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/KNOWN-ISSUES +0 -30
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/README.rdoc +0 -624
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/Rakefile +0 -125
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/SPEC +0 -237
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/bin/rackup +0 -4
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/contrib/rack.png +0 -0
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/contrib/rack.svg +0 -150
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/contrib/rack_logo.svg +0 -111
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/contrib/rdoc.css +0 -412
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/example/lobster.ru +0 -4
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/example/protectedlobster.rb +0 -14
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/example/protectedlobster.ru +0 -8
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/lib/rack.rb +0 -87
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/lib/rack/auth/abstract/handler.rb +0 -37
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/lib/rack/auth/abstract/request.rb +0 -43
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/lib/rack/auth/basic.rb +0 -58
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/lib/rack/auth/digest/md5.rb +0 -129
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/lib/rack/auth/digest/nonce.rb +0 -51
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/lib/rack/auth/digest/params.rb +0 -53
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/lib/rack/auth/digest/request.rb +0 -41
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/lib/rack/backports/uri/common_18.rb +0 -56
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/lib/rack/backports/uri/common_192.rb +0 -52
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/lib/rack/backports/uri/common_193.rb +0 -29
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/lib/rack/body_proxy.rb +0 -39
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/lib/rack/builder.rb +0 -149
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/lib/rack/cascade.rb +0 -52
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/lib/rack/chunked.rb +0 -58
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/lib/rack/commonlogger.rb +0 -64
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/lib/rack/conditionalget.rb +0 -67
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/lib/rack/config.rb +0 -20
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/lib/rack/content_length.rb +0 -33
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/lib/rack/content_type.rb +0 -29
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/lib/rack/deflater.rb +0 -116
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/lib/rack/directory.rb +0 -161
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/lib/rack/etag.rb +0 -64
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/lib/rack/file.rb +0 -138
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/lib/rack/handler.rb +0 -107
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/lib/rack/handler/cgi.rb +0 -61
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/lib/rack/handler/evented_mongrel.rb +0 -8
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/lib/rack/handler/fastcgi.rb +0 -98
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/lib/rack/handler/lsws.rb +0 -61
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/lib/rack/handler/mongrel.rb +0 -100
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/lib/rack/handler/scgi.rb +0 -67
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/lib/rack/handler/swiftiplied_mongrel.rb +0 -8
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/lib/rack/handler/thin.rb +0 -27
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/lib/rack/handler/webrick.rb +0 -81
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/lib/rack/head.rb +0 -22
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/lib/rack/lint.rb +0 -699
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/lib/rack/lobster.rb +0 -65
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/lib/rack/lock.rb +0 -26
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/lib/rack/logger.rb +0 -18
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/lib/rack/methodoverride.rb +0 -31
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/lib/rack/mime.rb +0 -677
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/lib/rack/mock.rb +0 -190
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/lib/rack/multipart.rb +0 -34
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/lib/rack/multipart/generator.rb +0 -93
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/lib/rack/multipart/parser.rb +0 -176
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/lib/rack/multipart/uploaded_file.rb +0 -34
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/lib/rack/nulllogger.rb +0 -18
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/lib/rack/recursive.rb +0 -61
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/lib/rack/reloader.rb +0 -109
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/lib/rack/request.rb +0 -380
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/lib/rack/response.rb +0 -155
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/lib/rack/rewindable_input.rb +0 -104
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/lib/rack/runtime.rb +0 -27
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/lib/rack/sendfile.rb +0 -155
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/lib/rack/server.rb +0 -362
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/lib/rack/session/abstract/id.rb +0 -398
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/lib/rack/session/cookie.rb +0 -178
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/lib/rack/session/memcache.rb +0 -93
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/lib/rack/session/pool.rb +0 -79
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/lib/rack/showexceptions.rb +0 -378
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/lib/rack/showstatus.rb +0 -113
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/lib/rack/static.rb +0 -153
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/lib/rack/urlmap.rb +0 -76
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/lib/rack/utils.rb +0 -628
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/lib/rack/utils/okjson.rb +0 -599
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/rack.gemspec +0 -33
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/builder/anything.rb +0 -5
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/builder/comment.ru +0 -4
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/builder/end.ru +0 -5
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/builder/line.ru +0 -1
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/builder/options.ru +0 -2
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/cgi/assets/folder/test.js +0 -1
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/cgi/assets/fonts/font.eot +0 -1
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/cgi/assets/images/image.png +0 -1
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/cgi/assets/index.html +0 -1
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/cgi/assets/javascripts/app.js +0 -1
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/cgi/assets/stylesheets/app.css +0 -1
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/cgi/lighttpd.conf +0 -26
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/cgi/rackup_stub.rb +0 -6
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/cgi/sample_rackup.ru +0 -5
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/cgi/test +0 -9
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/cgi/test+directory/test+file +0 -1
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/cgi/test.fcgi +0 -8
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/cgi/test.ru +0 -5
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/gemloader.rb +0 -10
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/multipart/bad_robots +0 -259
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/multipart/binary +0 -0
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/multipart/content_type_and_no_filename +0 -6
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/multipart/empty +0 -10
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/multipart/fail_16384_nofile +0 -814
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/multipart/file1.txt +0 -1
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/multipart/filename_and_modification_param +0 -7
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/multipart/filename_with_escaped_quotes +0 -6
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/multipart/filename_with_escaped_quotes_and_modification_param +0 -7
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/multipart/filename_with_percent_escaped_quotes +0 -6
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/multipart/filename_with_unescaped_percentages +0 -6
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/multipart/filename_with_unescaped_percentages2 +0 -6
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/multipart/filename_with_unescaped_percentages3 +0 -6
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/multipart/filename_with_unescaped_quotes +0 -6
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/multipart/ie +0 -6
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/multipart/mixed_files +0 -21
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/multipart/nested +0 -10
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/multipart/none +0 -9
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/multipart/semicolon +0 -6
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/multipart/text +0 -15
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/multipart/webkit +0 -32
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/rackup/config.ru +0 -31
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/registering_handler/rack/handler/registering_myself.rb +0 -8
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/spec_auth_basic.rb +0 -81
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/spec_auth_digest.rb +0 -259
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/spec_body_proxy.rb +0 -69
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/spec_builder.rb +0 -214
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/spec_cascade.rb +0 -61
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/spec_cgi.rb +0 -102
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/spec_chunked.rb +0 -85
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/spec_commonlogger.rb +0 -57
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/spec_conditionalget.rb +0 -102
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/spec_config.rb +0 -22
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/spec_content_length.rb +0 -83
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/spec_content_type.rb +0 -45
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/spec_deflater.rb +0 -204
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/spec_directory.rb +0 -88
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/spec_etag.rb +0 -98
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/spec_fastcgi.rb +0 -107
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/spec_file.rb +0 -213
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/spec_handler.rb +0 -59
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/spec_head.rb +0 -43
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/spec_lint.rb +0 -522
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/spec_lobster.rb +0 -58
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/spec_lock.rb +0 -164
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/spec_logger.rb +0 -23
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/spec_methodoverride.rb +0 -75
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/spec_mime.rb +0 -51
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/spec_mock.rb +0 -269
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/spec_mongrel.rb +0 -182
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/spec_multipart.rb +0 -445
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/spec_nulllogger.rb +0 -20
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/spec_recursive.rb +0 -72
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/spec_request.rb +0 -1078
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/spec_response.rb +0 -313
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/spec_rewindable_input.rb +0 -118
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/spec_runtime.rb +0 -49
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/spec_sendfile.rb +0 -130
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/spec_server.rb +0 -143
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/spec_session_abstract_id.rb +0 -53
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/spec_session_cookie.rb +0 -367
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/spec_session_memcache.rb +0 -321
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/spec_session_pool.rb +0 -209
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/spec_showexceptions.rb +0 -92
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/spec_showstatus.rb +0 -84
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/spec_static.rb +0 -145
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/spec_thin.rb +0 -91
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/spec_urlmap.rb +0 -213
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/spec_utils.rb +0 -573
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/spec_webrick.rb +0 -143
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/static/another/index.html +0 -1
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/static/index.html +0 -1
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/testrequest.rb +0 -78
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/unregistered_handler/rack/handler/unregistered.rb +0 -7
- data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/unregistered_handler/rack/handler/unregistered_long_one.rb +0 -7
- data/vendor/bundle/ruby/1.8/gems/rack-protection-1.4.0/License +0 -20
- data/vendor/bundle/ruby/1.8/gems/rack-protection-1.4.0/README.md +0 -82
- data/vendor/bundle/ruby/1.8/gems/rack-protection-1.4.0/Rakefile +0 -48
- data/vendor/bundle/ruby/1.8/gems/rack-protection-1.4.0/lib/rack-protection.rb +0 -1
- data/vendor/bundle/ruby/1.8/gems/rack-protection-1.4.0/lib/rack/protection.rb +0 -40
- data/vendor/bundle/ruby/1.8/gems/rack-protection-1.4.0/lib/rack/protection/authenticity_token.rb +0 -24
- data/vendor/bundle/ruby/1.8/gems/rack-protection-1.4.0/lib/rack/protection/base.rb +0 -107
- data/vendor/bundle/ruby/1.8/gems/rack-protection-1.4.0/lib/rack/protection/escaped_params.rb +0 -87
- data/vendor/bundle/ruby/1.8/gems/rack-protection-1.4.0/lib/rack/protection/form_token.rb +0 -23
- data/vendor/bundle/ruby/1.8/gems/rack-protection-1.4.0/lib/rack/protection/frame_options.rb +0 -37
- data/vendor/bundle/ruby/1.8/gems/rack-protection-1.4.0/lib/rack/protection/http_origin.rb +0 -32
- data/vendor/bundle/ruby/1.8/gems/rack-protection-1.4.0/lib/rack/protection/ip_spoofing.rb +0 -23
- data/vendor/bundle/ruby/1.8/gems/rack-protection-1.4.0/lib/rack/protection/json_csrf.rb +0 -35
- data/vendor/bundle/ruby/1.8/gems/rack-protection-1.4.0/lib/rack/protection/path_traversal.rb +0 -36
- data/vendor/bundle/ruby/1.8/gems/rack-protection-1.4.0/lib/rack/protection/remote_referrer.rb +0 -20
- data/vendor/bundle/ruby/1.8/gems/rack-protection-1.4.0/lib/rack/protection/remote_token.rb +0 -22
- data/vendor/bundle/ruby/1.8/gems/rack-protection-1.4.0/lib/rack/protection/session_hijacking.rb +0 -36
- data/vendor/bundle/ruby/1.8/gems/rack-protection-1.4.0/lib/rack/protection/version.rb +0 -16
- data/vendor/bundle/ruby/1.8/gems/rack-protection-1.4.0/lib/rack/protection/xss_header.rb +0 -25
- data/vendor/bundle/ruby/1.8/gems/rack-protection-1.4.0/rack-protection.gemspec +0 -92
- data/vendor/bundle/ruby/1.8/gems/rack-protection-1.4.0/spec/authenticity_token_spec.rb +0 -33
- data/vendor/bundle/ruby/1.8/gems/rack-protection-1.4.0/spec/escaped_params_spec.rb +0 -44
- data/vendor/bundle/ruby/1.8/gems/rack-protection-1.4.0/spec/form_token_spec.rb +0 -33
- data/vendor/bundle/ruby/1.8/gems/rack-protection-1.4.0/spec/frame_options_spec.rb +0 -39
- data/vendor/bundle/ruby/1.8/gems/rack-protection-1.4.0/spec/http_origin_spec.rb +0 -38
- data/vendor/bundle/ruby/1.8/gems/rack-protection-1.4.0/spec/ip_spoofing_spec.rb +0 -35
- data/vendor/bundle/ruby/1.8/gems/rack-protection-1.4.0/spec/json_csrf_spec.rb +0 -44
- data/vendor/bundle/ruby/1.8/gems/rack-protection-1.4.0/spec/path_traversal_spec.rb +0 -28
- data/vendor/bundle/ruby/1.8/gems/rack-protection-1.4.0/spec/protection_spec.rb +0 -37
- data/vendor/bundle/ruby/1.8/gems/rack-protection-1.4.0/spec/remote_referrer_spec.rb +0 -31
- data/vendor/bundle/ruby/1.8/gems/rack-protection-1.4.0/spec/remote_token_spec.rb +0 -42
- data/vendor/bundle/ruby/1.8/gems/rack-protection-1.4.0/spec/session_hijacking_spec.rb +0 -54
- data/vendor/bundle/ruby/1.8/gems/rack-protection-1.4.0/spec/spec_helper.rb +0 -163
- data/vendor/bundle/ruby/1.8/gems/rack-protection-1.4.0/spec/xss_header_spec.rb +0 -56
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/CHANGES +0 -526
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/MIT-LICENSE +0 -21
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/README.rdoc +0 -187
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/Rakefile +0 -374
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/TODO +0 -21
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/bin/rake +0 -33
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/doc/command_line_usage.rdoc +0 -152
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/doc/example/Rakefile1 +0 -38
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/doc/example/Rakefile2 +0 -35
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/doc/example/a.c +0 -6
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/doc/example/b.c +0 -6
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/doc/example/main.c +0 -11
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/doc/glossary.rdoc +0 -51
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/doc/jamis.rb +0 -591
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/doc/proto_rake.rdoc +0 -127
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/doc/rake.1.gz +0 -0
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/doc/rakefile.rdoc +0 -557
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/doc/rational.rdoc +0 -151
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/doc/release_notes/rake-0.4.14.rdoc +0 -23
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/doc/release_notes/rake-0.4.15.rdoc +0 -35
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/doc/release_notes/rake-0.5.0.rdoc +0 -53
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/doc/release_notes/rake-0.5.3.rdoc +0 -78
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/doc/release_notes/rake-0.5.4.rdoc +0 -46
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/doc/release_notes/rake-0.6.0.rdoc +0 -141
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/doc/release_notes/rake-0.7.0.rdoc +0 -119
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/doc/release_notes/rake-0.7.1.rdoc +0 -59
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/doc/release_notes/rake-0.7.2.rdoc +0 -121
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/doc/release_notes/rake-0.7.3.rdoc +0 -47
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/doc/release_notes/rake-0.8.0.rdoc +0 -114
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/doc/release_notes/rake-0.8.2.rdoc +0 -165
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/doc/release_notes/rake-0.8.3.rdoc +0 -112
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/doc/release_notes/rake-0.8.4.rdoc +0 -147
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/doc/release_notes/rake-0.8.5.rdoc +0 -53
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/doc/release_notes/rake-0.8.6.rdoc +0 -55
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/doc/release_notes/rake-0.8.7.rdoc +0 -55
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/doc/release_notes/rake-0.9.0.rdoc +0 -112
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/doc/release_notes/rake-0.9.1.rdoc +0 -52
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/doc/release_notes/rake-0.9.2.2.rdoc +0 -55
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/doc/release_notes/rake-0.9.2.rdoc +0 -49
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/doc/release_notes/rake-0.9.3.rdoc +0 -102
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/doc/release_notes/rake-0.9.4.rdoc +0 -110
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/doc/release_notes/rake-0.9.5.rdoc +0 -114
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/doc/release_notes/rake-0.9.6.rdoc +0 -127
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/doc/release_notes/rake-10.0.0.rdoc +0 -178
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/doc/release_notes/rake-10.0.1.rdoc +0 -187
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/doc/release_notes/rake-10.0.2.rdoc +0 -191
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/doc/release_notes/rake-10.0.3.rdoc +0 -191
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/install.rb +0 -90
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/lib/rake.rb +0 -71
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/lib/rake/alt_system.rb +0 -109
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/lib/rake/application.rb +0 -669
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/lib/rake/backtrace.rb +0 -18
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/lib/rake/clean.rb +0 -32
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/lib/rake/cloneable.rb +0 -16
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/lib/rake/contrib/compositepublisher.rb +0 -21
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/lib/rake/contrib/ftptools.rb +0 -151
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/lib/rake/contrib/publisher.rb +0 -73
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/lib/rake/contrib/rubyforgepublisher.rb +0 -16
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/lib/rake/contrib/sshpublisher.rb +0 -50
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/lib/rake/contrib/sys.rb +0 -1
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/lib/rake/default_loader.rb +0 -10
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/lib/rake/dsl_definition.rb +0 -156
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/lib/rake/early_time.rb +0 -18
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/lib/rake/ext/core.rb +0 -27
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/lib/rake/ext/module.rb +0 -0
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/lib/rake/ext/string.rb +0 -168
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/lib/rake/ext/time.rb +0 -15
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/lib/rake/file_creation_task.rb +0 -24
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/lib/rake/file_list.rb +0 -410
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/lib/rake/file_task.rb +0 -47
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/lib/rake/file_utils.rb +0 -114
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/lib/rake/file_utils_ext.rb +0 -146
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/lib/rake/gempackagetask.rb +0 -1
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/lib/rake/invocation_chain.rb +0 -51
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/lib/rake/invocation_exception_mixin.rb +0 -16
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/lib/rake/loaders/makefile.rb +0 -40
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/lib/rake/multi_task.rb +0 -13
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/lib/rake/name_space.rb +0 -25
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/lib/rake/packagetask.rb +0 -185
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/lib/rake/pathmap.rb +0 -1
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/lib/rake/phony.rb +0 -15
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/lib/rake/private_reader.rb +0 -20
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/lib/rake/promise.rb +0 -99
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/lib/rake/pseudo_status.rb +0 -24
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/lib/rake/rake_module.rb +0 -37
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/lib/rake/rake_test_loader.rb +0 -22
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/lib/rake/rdoctask.rb +0 -1
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/lib/rake/ruby182_test_unit_fix.rb +0 -25
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/lib/rake/rule_recursion_overflow_error.rb +0 -20
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/lib/rake/runtest.rb +0 -22
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/lib/rake/task.rb +0 -350
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/lib/rake/task_argument_error.rb +0 -7
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/lib/rake/task_arguments.rb +0 -78
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/lib/rake/task_manager.rb +0 -296
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/lib/rake/tasklib.rb +0 -22
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/lib/rake/testtask.rb +0 -198
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/lib/rake/thread_history_display.rb +0 -48
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/lib/rake/thread_pool.rb +0 -155
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/lib/rake/trace_output.rb +0 -19
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/lib/rake/version.rb +0 -13
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/lib/rake/win32.rb +0 -55
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/test/file_creation.rb +0 -34
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/test/helper.rb +0 -562
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/test/test_private_reader.rb +0 -42
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/test/test_rake.rb +0 -40
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/test/test_rake_application.rb +0 -515
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/test/test_rake_application_options.rb +0 -443
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/test/test_rake_backtrace.rb +0 -89
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/test/test_rake_clean.rb +0 -14
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/test/test_rake_definitions.rb +0 -80
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/test/test_rake_directory_task.rb +0 -57
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/test/test_rake_dsl.rb +0 -40
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/test/test_rake_early_time.rb +0 -31
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/test/test_rake_extension.rb +0 -59
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/test/test_rake_file_creation_task.rb +0 -56
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/test/test_rake_file_list.rb +0 -628
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/test/test_rake_file_list_path_map.rb +0 -8
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/test/test_rake_file_task.rb +0 -122
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/test/test_rake_file_utils.rb +0 -305
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/test/test_rake_ftp_file.rb +0 -59
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/test/test_rake_functional.rb +0 -496
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/test/test_rake_invocation_chain.rb +0 -52
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/test/test_rake_makefile_loader.rb +0 -44
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/test/test_rake_multi_task.rb +0 -59
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/test/test_rake_name_space.rb +0 -43
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/test/test_rake_package_task.rb +0 -79
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/test/test_rake_path_map.rb +0 -157
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/test/test_rake_path_map_explode.rb +0 -34
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/test/test_rake_path_map_partial.rb +0 -18
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/test/test_rake_pseudo_status.rb +0 -21
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/test/test_rake_rake_test_loader.rb +0 -21
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/test/test_rake_reduce_compat.rb +0 -30
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/test/test_rake_require.rb +0 -40
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/test/test_rake_rules.rb +0 -327
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/test/test_rake_task.rb +0 -316
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/test/test_rake_task_argument_parsing.rb +0 -103
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/test/test_rake_task_arguments.rb +0 -88
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/test/test_rake_task_lib.rb +0 -9
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/test/test_rake_task_manager.rb +0 -157
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/test/test_rake_task_manager_argument_resolution.rb +0 -19
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/test/test_rake_task_with_arguments.rb +0 -171
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/test/test_rake_test_task.rb +0 -120
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/test/test_rake_thread_pool.rb +0 -123
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/test/test_rake_top_level_functions.rb +0 -71
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/test/test_rake_win32.rb +0 -72
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/test/test_thread_history_display.rb +0 -91
- data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/test/test_trace_output.rb +0 -43
- data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/AUTHORS +0 -61
- data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/CHANGES +0 -1063
- data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/Gemfile +0 -82
- data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/LICENSE +0 -22
- data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/README.de.rdoc +0 -2097
- data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/README.es.rdoc +0 -2078
- data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/README.fr.rdoc +0 -2036
- data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/README.hu.rdoc +0 -607
- data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/README.jp.rdoc +0 -1043
- data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/README.ko.rdoc +0 -1926
- data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/README.pt-br.rdoc +0 -647
- data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/README.pt-pt.rdoc +0 -646
- data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/README.rdoc +0 -2017
- data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/README.ru.rdoc +0 -1785
- data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/README.zh.rdoc +0 -1816
- data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/Rakefile +0 -183
- data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/examples/chat.rb +0 -61
- data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/examples/simple.rb +0 -3
- data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/examples/stream.ru +0 -26
- data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/lib/sinatra.rb +0 -4
- data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/lib/sinatra/base.rb +0 -1728
- data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/lib/sinatra/images/404.png +0 -0
- data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/lib/sinatra/images/500.png +0 -0
- data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/lib/sinatra/main.rb +0 -28
- data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/lib/sinatra/showexceptions.rb +0 -340
- data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/lib/sinatra/version.rb +0 -3
- data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/sinatra.gemspec +0 -18
- data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/base_test.rb +0 -160
- data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/builder_test.rb +0 -95
- data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/coffee_test.rb +0 -92
- data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/contest.rb +0 -98
- data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/creole_test.rb +0 -65
- data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/delegator_test.rb +0 -162
- data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/encoding_test.rb +0 -20
- data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/erb_test.rb +0 -104
- data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/extensions_test.rb +0 -100
- data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/filter_test.rb +0 -428
- data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/haml_test.rb +0 -101
- data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/helper.rb +0 -123
- data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/helpers_test.rb +0 -1783
- data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/integration/app.rb +0 -62
- data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/integration_helper.rb +0 -214
- data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/integration_test.rb +0 -85
- data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/less_test.rb +0 -67
- data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/liquid_test.rb +0 -59
- data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/mapped_error_test.rb +0 -259
- data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/markaby_test.rb +0 -80
- data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/markdown_test.rb +0 -82
- data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/middleware_test.rb +0 -68
- data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/nokogiri_test.rb +0 -69
- data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/public/favicon.ico +0 -0
- data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/rack_test.rb +0 -45
- data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/radius_test.rb +0 -59
- data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/rdoc_test.rb +0 -66
- data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/readme_test.rb +0 -136
- data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/request_test.rb +0 -45
- data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/response_test.rb +0 -66
- data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/result_test.rb +0 -98
- data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/route_added_hook_test.rb +0 -59
- data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/routing_test.rb +0 -1126
- data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/sass_test.rb +0 -116
- data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/scss_test.rb +0 -89
- data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/server_test.rb +0 -48
- data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/settings_test.rb +0 -538
- data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/sinatra_test.rb +0 -17
- data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/slim_test.rb +0 -88
- data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/static_test.rb +0 -178
- data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/streaming_test.rb +0 -140
- data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/templates_test.rb +0 -298
- data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/textile_test.rb +0 -65
- data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/views/a/in_a.str +0 -1
- data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/views/ascii.erb +0 -2
- data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/views/b/in_b.str +0 -1
- data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/views/calc.html.erb +0 -1
- data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/views/error.builder +0 -3
- data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/views/error.erb +0 -3
- data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/views/error.haml +0 -3
- data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/views/error.sass +0 -2
- data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/views/explicitly_nested.str +0 -1
- data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/views/foo/hello.test +0 -1
- data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/views/hello.builder +0 -1
- data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/views/hello.coffee +0 -1
- data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/views/hello.creole +0 -1
- data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/views/hello.erb +0 -1
- data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/views/hello.haml +0 -1
- data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/views/hello.less +0 -5
- data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/views/hello.liquid +0 -1
- data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/views/hello.mab +0 -1
- data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/views/hello.md +0 -1
- data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/views/hello.nokogiri +0 -1
- data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/views/hello.radius +0 -1
- data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/views/hello.rdoc +0 -1
- data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/views/hello.sass +0 -2
- data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/views/hello.scss +0 -3
- data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/views/hello.slim +0 -1
- data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/views/hello.str +0 -1
- data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/views/hello.test +0 -1
- data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/views/hello.textile +0 -1
- data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/views/layout2.builder +0 -3
- data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/views/layout2.erb +0 -2
- data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/views/layout2.haml +0 -2
- data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/views/layout2.liquid +0 -2
- data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/views/layout2.mab +0 -2
- data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/views/layout2.nokogiri +0 -3
- data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/views/layout2.radius +0 -2
- data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/views/layout2.slim +0 -3
- data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/views/layout2.str +0 -2
- data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/views/layout2.test +0 -1
- data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/views/nested.str +0 -1
- data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/views/utf8.erb +0 -2
- data/vendor/bundle/ruby/1.8/gems/stomp-1.2.8/CHANGELOG.rdoc +0 -196
- data/vendor/bundle/ruby/1.8/gems/stomp-1.2.8/LICENSE +0 -202
- data/vendor/bundle/ruby/1.8/gems/stomp-1.2.8/README.rdoc +0 -132
- data/vendor/bundle/ruby/1.8/gems/stomp-1.2.8/Rakefile +0 -80
- data/vendor/bundle/ruby/1.8/gems/stomp-1.2.8/bin/catstomp +0 -74
- data/vendor/bundle/ruby/1.8/gems/stomp-1.2.8/bin/stompcat +0 -75
- data/vendor/bundle/ruby/1.8/gems/stomp-1.2.8/examples/client11_ex1.rb +0 -89
- data/vendor/bundle/ruby/1.8/gems/stomp-1.2.8/examples/client11_putget1.rb +0 -71
- data/vendor/bundle/ruby/1.8/gems/stomp-1.2.8/examples/conn11_ex1.rb +0 -112
- data/vendor/bundle/ruby/1.8/gems/stomp-1.2.8/examples/conn11_ex2.rb +0 -87
- data/vendor/bundle/ruby/1.8/gems/stomp-1.2.8/examples/conn11_hb1.rb +0 -57
- data/vendor/bundle/ruby/1.8/gems/stomp-1.2.8/examples/consumer.rb +0 -34
- data/vendor/bundle/ruby/1.8/gems/stomp-1.2.8/examples/get11conn_ex1.rb +0 -117
- data/vendor/bundle/ruby/1.8/gems/stomp-1.2.8/examples/get11conn_ex2.rb +0 -77
- data/vendor/bundle/ruby/1.8/gems/stomp-1.2.8/examples/logexamp.rb +0 -81
- data/vendor/bundle/ruby/1.8/gems/stomp-1.2.8/examples/logexamp_ssl.rb +0 -81
- data/vendor/bundle/ruby/1.8/gems/stomp-1.2.8/examples/publisher.rb +0 -30
- data/vendor/bundle/ruby/1.8/gems/stomp-1.2.8/examples/put11conn_ex1.rb +0 -56
- data/vendor/bundle/ruby/1.8/gems/stomp-1.2.8/examples/putget11_rh1.rb +0 -93
- data/vendor/bundle/ruby/1.8/gems/stomp-1.2.8/examples/slogger.rb +0 -222
- data/vendor/bundle/ruby/1.8/gems/stomp-1.2.8/examples/ssl_uc1.rb +0 -46
- data/vendor/bundle/ruby/1.8/gems/stomp-1.2.8/examples/ssl_uc1_ciphers.rb +0 -46
- data/vendor/bundle/ruby/1.8/gems/stomp-1.2.8/examples/ssl_uc2.rb +0 -48
- data/vendor/bundle/ruby/1.8/gems/stomp-1.2.8/examples/ssl_uc2_ciphers.rb +0 -47
- data/vendor/bundle/ruby/1.8/gems/stomp-1.2.8/examples/ssl_uc3.rb +0 -50
- data/vendor/bundle/ruby/1.8/gems/stomp-1.2.8/examples/ssl_uc3_ciphers.rb +0 -47
- data/vendor/bundle/ruby/1.8/gems/stomp-1.2.8/examples/ssl_uc4.rb +0 -50
- data/vendor/bundle/ruby/1.8/gems/stomp-1.2.8/examples/ssl_uc4_ciphers.rb +0 -48
- data/vendor/bundle/ruby/1.8/gems/stomp-1.2.8/examples/ssl_ucx_default_ciphers.rb +0 -41
- data/vendor/bundle/ruby/1.8/gems/stomp-1.2.8/examples/stomp11_common.rb +0 -48
- data/vendor/bundle/ruby/1.8/gems/stomp-1.2.8/examples/topic_consumer.rb +0 -32
- data/vendor/bundle/ruby/1.8/gems/stomp-1.2.8/examples/topic_publisher.rb +0 -29
- data/vendor/bundle/ruby/1.8/gems/stomp-1.2.8/lib/client/utils.rb +0 -116
- data/vendor/bundle/ruby/1.8/gems/stomp-1.2.8/lib/connection/heartbeats.rb +0 -175
- data/vendor/bundle/ruby/1.8/gems/stomp-1.2.8/lib/connection/netio.rb +0 -360
- data/vendor/bundle/ruby/1.8/gems/stomp-1.2.8/lib/connection/utf8.rb +0 -294
- data/vendor/bundle/ruby/1.8/gems/stomp-1.2.8/lib/connection/utils.rb +0 -239
- data/vendor/bundle/ruby/1.8/gems/stomp-1.2.8/lib/stomp.rb +0 -39
- data/vendor/bundle/ruby/1.8/gems/stomp-1.2.8/lib/stomp/client.rb +0 -350
- data/vendor/bundle/ruby/1.8/gems/stomp-1.2.8/lib/stomp/codec.rb +0 -44
- data/vendor/bundle/ruby/1.8/gems/stomp-1.2.8/lib/stomp/connection.rb +0 -452
- data/vendor/bundle/ruby/1.8/gems/stomp-1.2.8/lib/stomp/constants.rb +0 -114
- data/vendor/bundle/ruby/1.8/gems/stomp-1.2.8/lib/stomp/errors.rb +0 -195
- data/vendor/bundle/ruby/1.8/gems/stomp-1.2.8/lib/stomp/ext/hash.rb +0 -31
- data/vendor/bundle/ruby/1.8/gems/stomp-1.2.8/lib/stomp/message.rb +0 -117
- data/vendor/bundle/ruby/1.8/gems/stomp-1.2.8/lib/stomp/sslparams.rb +0 -84
- data/vendor/bundle/ruby/1.8/gems/stomp-1.2.8/lib/stomp/version.rb +0 -12
- data/vendor/bundle/ruby/1.8/gems/stomp-1.2.8/spec/client_shared_examples.rb +0 -71
- data/vendor/bundle/ruby/1.8/gems/stomp-1.2.8/spec/client_spec.rb +0 -329
- data/vendor/bundle/ruby/1.8/gems/stomp-1.2.8/spec/connection_spec.rb +0 -431
- data/vendor/bundle/ruby/1.8/gems/stomp-1.2.8/spec/message_spec.rb +0 -58
- data/vendor/bundle/ruby/1.8/gems/stomp-1.2.8/spec/spec_helper.rb +0 -8
- data/vendor/bundle/ruby/1.8/gems/stomp-1.2.8/stomp.gemspec +0 -151
- data/vendor/bundle/ruby/1.8/gems/stomp-1.2.8/test/test_client.rb +0 -531
- data/vendor/bundle/ruby/1.8/gems/stomp-1.2.8/test/test_codec.rb +0 -119
- data/vendor/bundle/ruby/1.8/gems/stomp-1.2.8/test/test_connection.rb +0 -517
- data/vendor/bundle/ruby/1.8/gems/stomp-1.2.8/test/test_connection1p.rb +0 -396
- data/vendor/bundle/ruby/1.8/gems/stomp-1.2.8/test/test_helper.rb +0 -168
- data/vendor/bundle/ruby/1.8/gems/stomp-1.2.8/test/test_message.rb +0 -173
- data/vendor/bundle/ruby/1.8/gems/stomp-1.2.8/test/test_ssl.rb +0 -81
- data/vendor/bundle/ruby/1.8/gems/stomp-1.2.8/test/tlogger.rb +0 -80
- data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/CHANGELOG.rdoc +0 -142
- data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/Gemfile +0 -19
- data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/LICENSE.md +0 -20
- data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/README.md +0 -28
- data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/Thorfile +0 -30
- data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/bin/rake2thor +0 -86
- data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/bin/thor +0 -6
- data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/lib/thor.rb +0 -448
- data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/lib/thor/actions.rb +0 -318
- data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/lib/thor/actions/create_file.rb +0 -105
- data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/lib/thor/actions/create_link.rb +0 -57
- data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/lib/thor/actions/directory.rb +0 -117
- data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/lib/thor/actions/empty_directory.rb +0 -153
- data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/lib/thor/actions/file_manipulation.rb +0 -314
- data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/lib/thor/actions/inject_into_file.rb +0 -109
- data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/lib/thor/base.rb +0 -654
- data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/lib/thor/core_ext/file_binary_read.rb +0 -9
- data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/lib/thor/core_ext/hash_with_indifferent_access.rb +0 -80
- data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/lib/thor/core_ext/ordered_hash.rb +0 -100
- data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/lib/thor/error.rb +0 -35
- data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/lib/thor/group.rb +0 -285
- data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/lib/thor/invocation.rb +0 -170
- data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/lib/thor/parser.rb +0 -4
- data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/lib/thor/parser/argument.rb +0 -74
- data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/lib/thor/parser/arguments.rb +0 -171
- data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/lib/thor/parser/option.rb +0 -121
- data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/lib/thor/parser/options.rb +0 -216
- data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/lib/thor/rake_compat.rb +0 -72
- data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/lib/thor/runner.rb +0 -321
- data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/lib/thor/shell.rb +0 -88
- data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/lib/thor/shell/basic.rb +0 -389
- data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/lib/thor/shell/color.rb +0 -144
- data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/lib/thor/shell/html.rb +0 -123
- data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/lib/thor/task.rb +0 -132
- data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/lib/thor/util.rb +0 -266
- data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/lib/thor/version.rb +0 -3
- data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/spec/actions/create_file_spec.rb +0 -170
- data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/spec/actions/create_link_spec.rb +0 -81
- data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/spec/actions/directory_spec.rb +0 -156
- data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/spec/actions/empty_directory_spec.rb +0 -130
- data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/spec/actions/file_manipulation_spec.rb +0 -382
- data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/spec/actions/inject_into_file_spec.rb +0 -135
- data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/spec/actions_spec.rb +0 -331
- data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/spec/base_spec.rb +0 -279
- data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/spec/core_ext/hash_with_indifferent_access_spec.rb +0 -48
- data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/spec/core_ext/ordered_hash_spec.rb +0 -115
- data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/spec/exit_condition_spec.rb +0 -19
- data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/spec/fixtures/application.rb +0 -2
- data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/spec/fixtures/app{1}/README +0 -3
- data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/spec/fixtures/bundle/execute.rb +0 -6
- data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/spec/fixtures/bundle/main.thor +0 -1
- data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/spec/fixtures/doc/%file_name%.rb.tt +0 -1
- data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/spec/fixtures/doc/COMMENTER +0 -11
- data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/spec/fixtures/doc/README +0 -3
- data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/spec/fixtures/doc/block_helper.rb +0 -3
- data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/spec/fixtures/doc/config.rb +0 -1
- data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/spec/fixtures/doc/config.yaml.tt +0 -1
- data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/spec/fixtures/enum.thor +0 -10
- data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/spec/fixtures/group.thor +0 -114
- data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/spec/fixtures/invoke.thor +0 -112
- data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/spec/fixtures/path with spaces b/data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/spec/fixtures/path with → spaces +0 -0
- data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/spec/fixtures/preserve/script.sh +0 -3
- data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/spec/fixtures/script.thor +0 -195
- data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/spec/fixtures/task.thor +0 -10
- data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/spec/group_spec.rb +0 -216
- data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/spec/invocation_spec.rb +0 -100
- data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/spec/parser/argument_spec.rb +0 -53
- data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/spec/parser/arguments_spec.rb +0 -66
- data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/spec/parser/option_spec.rb +0 -202
- data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/spec/parser/options_spec.rb +0 -395
- data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/spec/rake_compat_spec.rb +0 -72
- data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/spec/register_spec.rb +0 -197
- data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/spec/runner_spec.rb +0 -241
- data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/spec/shell/basic_spec.rb +0 -312
- data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/spec/shell/color_spec.rb +0 -81
- data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/spec/shell/html_spec.rb +0 -32
- data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/spec/shell_spec.rb +0 -47
- data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/spec/spec_helper.rb +0 -63
- data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/spec/task_spec.rb +0 -80
- data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/spec/thor_spec.rb +0 -488
- data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/spec/util_spec.rb +0 -196
- data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/thor.gemspec +0 -20
- data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/COPYING +0 -18
- data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/Gemfile +0 -32
- data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/HACKING +0 -16
- data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/README.md +0 -211
- data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/Rakefile +0 -104
- data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/TEMPLATES.md +0 -516
- data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/bin/tilt +0 -112
- data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/lib/tilt.rb +0 -204
- data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/lib/tilt/asciidoc.rb +0 -34
- data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/lib/tilt/builder.rb +0 -40
- data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/lib/tilt/coffee.rb +0 -54
- data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/lib/tilt/css.rb +0 -80
- data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/lib/tilt/csv.rb +0 -71
- data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/lib/tilt/erb.rb +0 -110
- data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/lib/tilt/etanni.rb +0 -27
- data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/lib/tilt/haml.rb +0 -64
- data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/lib/tilt/liquid.rb +0 -45
- data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/lib/tilt/markaby.rb +0 -52
- data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/lib/tilt/markdown.rb +0 -214
- data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/lib/tilt/nokogiri.rb +0 -43
- data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/lib/tilt/plain.rb +0 -20
- data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/lib/tilt/radius.rb +0 -55
- data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/lib/tilt/rdoc.rb +0 -47
- data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/lib/tilt/string.rb +0 -21
- data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/lib/tilt/template.rb +0 -246
- data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/lib/tilt/textile.rb +0 -30
- data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/lib/tilt/wiki.rb +0 -58
- data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/lib/tilt/yajl.rb +0 -94
- data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/test/contest.rb +0 -68
- data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/test/markaby/locals.mab +0 -1
- data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/test/markaby/markaby.mab +0 -1
- data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/test/markaby/markaby_other_static.mab +0 -1
- data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/test/markaby/render_twice.mab +0 -1
- data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/test/markaby/scope.mab +0 -1
- data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/test/markaby/yielding.mab +0 -2
- data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/test/tilt_asciidoctor_test.rb +0 -44
- data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/test/tilt_blueclothtemplate_test.rb +0 -45
- data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/test/tilt_buildertemplate_test.rb +0 -59
- data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/test/tilt_cache_test.rb +0 -32
- data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/test/tilt_coffeescripttemplate_test.rb +0 -114
- data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/test/tilt_compilesite_test.rb +0 -51
- data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/test/tilt_creoletemplate_test.rb +0 -28
- data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/test/tilt_csv_test.rb +0 -73
- data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/test/tilt_erbtemplate_test.rb +0 -239
- data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/test/tilt_erubistemplate_test.rb +0 -151
- data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/test/tilt_etannitemplate_test.rb +0 -173
- data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/test/tilt_fallback_test.rb +0 -122
- data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/test/tilt_hamltemplate_test.rb +0 -144
- data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/test/tilt_kramdown_test.rb +0 -42
- data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/test/tilt_lesstemplate_test.less +0 -1
- data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/test/tilt_lesstemplate_test.rb +0 -42
- data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/test/tilt_liquidtemplate_test.rb +0 -78
- data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/test/tilt_markaby_test.rb +0 -88
- data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/test/tilt_markdown_test.rb +0 -172
- data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/test/tilt_marukutemplate_test.rb +0 -48
- data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/test/tilt_nokogiritemplate_test.rb +0 -87
- data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/test/tilt_radiustemplate_test.rb +0 -75
- data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/test/tilt_rdiscounttemplate_test.rb +0 -55
- data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/test/tilt_rdoctemplate_test.rb +0 -31
- data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/test/tilt_redcarpettemplate_test.rb +0 -71
- data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/test/tilt_redclothtemplate_test.rb +0 -36
- data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/test/tilt_sasstemplate_test.rb +0 -41
- data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/test/tilt_stringtemplate_test.rb +0 -170
- data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/test/tilt_template_test.rb +0 -167
- data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/test/tilt_test.rb +0 -65
- data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/test/tilt_wikiclothtemplate_test.rb +0 -32
- data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/test/tilt_yajltemplate_test.rb +0 -101
- data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/tilt.gemspec +0 -119
- data/vendor/bundle/ruby/1.8/specifications/haml-3.1.8.gemspec +0 -34
- data/vendor/bundle/ruby/1.8/specifications/rack-1.5.2.gemspec +0 -36
- data/vendor/bundle/ruby/1.8/specifications/rack-protection-1.4.0.gemspec +0 -34
- data/vendor/bundle/ruby/1.8/specifications/rake-10.0.3.gemspec +0 -34
- data/vendor/bundle/ruby/1.8/specifications/sinatra-1.3.5.gemspec +0 -37
- data/vendor/bundle/ruby/1.8/specifications/stomp-1.2.8.gemspec +0 -31
- data/vendor/bundle/ruby/1.8/specifications/thor-0.17.0.gemspec +0 -30
- data/vendor/bundle/ruby/1.8/specifications/tilt-1.3.4.gemspec +0 -98
@@ -1,183 +0,0 @@
|
|
1
|
-
# encoding: UTF-8
|
2
|
-
require 'rake/clean'
|
3
|
-
require 'rake/testtask'
|
4
|
-
require 'fileutils'
|
5
|
-
require 'date'
|
6
|
-
|
7
|
-
# CI Reporter is only needed for the CI
|
8
|
-
begin
|
9
|
-
require 'ci/reporter/rake/test_unit'
|
10
|
-
rescue LoadError
|
11
|
-
end
|
12
|
-
|
13
|
-
task :default => :test
|
14
|
-
task :spec => :test
|
15
|
-
|
16
|
-
CLEAN.include "**/*.rbc"
|
17
|
-
|
18
|
-
def source_version
|
19
|
-
@source_version ||= begin
|
20
|
-
load './lib/sinatra/version.rb'
|
21
|
-
Sinatra::VERSION
|
22
|
-
end
|
23
|
-
end
|
24
|
-
|
25
|
-
def prev_feature
|
26
|
-
source_version.gsub(/^(\d\.)(\d+)\..*$/) { $1 + ($2.to_i - 1).to_s }
|
27
|
-
end
|
28
|
-
|
29
|
-
def prev_version
|
30
|
-
return prev_feature + '.0' if source_version.end_with? '.0'
|
31
|
-
source_version.gsub(/\d+$/) { |s| s.to_i - 1 }
|
32
|
-
end
|
33
|
-
|
34
|
-
# SPECS ===============================================================
|
35
|
-
|
36
|
-
task :test do
|
37
|
-
ENV['LANG'] = 'C'
|
38
|
-
ENV.delete 'LC_CTYPE'
|
39
|
-
end
|
40
|
-
|
41
|
-
Rake::TestTask.new(:test) do |t|
|
42
|
-
t.test_files = FileList['test/*_test.rb']
|
43
|
-
t.ruby_opts = ['-rubygems'] if defined? Gem
|
44
|
-
t.ruby_opts << '-I.'
|
45
|
-
end
|
46
|
-
|
47
|
-
Rake::TestTask.new(:"test:core") do |t|
|
48
|
-
core_tests = %w[base delegator encoding extensions filter
|
49
|
-
helpers mapped_error middleware radius rdoc
|
50
|
-
readme request response result route_added_hook
|
51
|
-
routing server settings sinatra static templates]
|
52
|
-
t.test_files = core_tests.map {|n| "test/#{n}_test.rb"}
|
53
|
-
t.ruby_opts = ["-rubygems"] if defined? Gem
|
54
|
-
t.ruby_opts << "-I."
|
55
|
-
end
|
56
|
-
|
57
|
-
# Rcov ================================================================
|
58
|
-
|
59
|
-
namespace :test do
|
60
|
-
desc 'Measures test coverage'
|
61
|
-
task :coverage do
|
62
|
-
rm_f "coverage"
|
63
|
-
sh "rcov -Ilib test/*_test.rb"
|
64
|
-
end
|
65
|
-
end
|
66
|
-
|
67
|
-
# Website =============================================================
|
68
|
-
|
69
|
-
desc 'Generate RDoc under doc/api'
|
70
|
-
task 'doc' => ['doc:api']
|
71
|
-
task('doc:api') { sh "yardoc -o doc/api" }
|
72
|
-
CLEAN.include 'doc/api'
|
73
|
-
|
74
|
-
# README ===============================================================
|
75
|
-
|
76
|
-
task :add_template, [:name] do |t, args|
|
77
|
-
Dir.glob('README.*') do |file|
|
78
|
-
code = File.read(file)
|
79
|
-
if code =~ /^===.*#{args.name.capitalize}/
|
80
|
-
puts "Already covered in #{file}"
|
81
|
-
else
|
82
|
-
template = code[/===[^\n]*Liquid.*index\.liquid<\/tt>[^\n]*/m]
|
83
|
-
if !template
|
84
|
-
puts "Liquid not found in #{file}"
|
85
|
-
else
|
86
|
-
puts "Adding section to #{file}"
|
87
|
-
template = template.gsub(/Liquid/, args.name.capitalize).gsub(/liquid/, args.name.downcase)
|
88
|
-
code.gsub! /^(\s*===.*CoffeeScript)/, "\n" << template << "\n\\1"
|
89
|
-
File.open(file, "w") { |f| f << code }
|
90
|
-
end
|
91
|
-
end
|
92
|
-
end
|
93
|
-
end
|
94
|
-
|
95
|
-
# Thanks in announcement ===============================================
|
96
|
-
|
97
|
-
team = ["Ryan Tomayko", "Blake Mizerany", "Simon Rozet", "Konstantin Haase"]
|
98
|
-
desc "list of contributors"
|
99
|
-
task :thanks, [:release,:backports] do |t, a|
|
100
|
-
a.with_defaults :release => "#{prev_version}..HEAD",
|
101
|
-
:backports => "#{prev_feature}.0..#{prev_feature}.x"
|
102
|
-
included = `git log --format=format:"%aN\t%s" #{a.release}`.lines.to_a
|
103
|
-
excluded = `git log --format=format:"%aN\t%s" #{a.backports}`.lines.to_a
|
104
|
-
commits = (included - excluded).group_by { |c| c[/^[^\t]+/] }
|
105
|
-
authors = commits.keys.sort_by { |n| - commits[n].size } - team
|
106
|
-
puts authors[0..-2].join(', ') << " and " << authors.last,
|
107
|
-
"(based on commits included in #{a.release}, but not in #{a.backports})"
|
108
|
-
end
|
109
|
-
|
110
|
-
desc "list of authors"
|
111
|
-
task :authors, [:commit_range, :format, :sep] do |t, a|
|
112
|
-
a.with_defaults :format => "%s (%d)", :sep => ", ", :commit_range => '--all'
|
113
|
-
authors = Hash.new { |h,k| h[k] = 0 }
|
114
|
-
blake = "Blake Mizerany"
|
115
|
-
overall = 0
|
116
|
-
mapping = {
|
117
|
-
"blake.mizerany@gmail.com" => blake, "bmizerany" => blake,
|
118
|
-
"a_user@mac.com" => blake, "ichverstehe" => "Harry Vangberg",
|
119
|
-
"Wu Jiang (nouse)" => "Wu Jiang" }
|
120
|
-
`git shortlog -s #{a.commit_range}`.lines.map do |line|
|
121
|
-
line = line.force_encoding 'binary' if line.respond_to? :force_encoding
|
122
|
-
num, name = line.split("\t", 2).map(&:strip)
|
123
|
-
authors[mapping[name] || name] += num.to_i
|
124
|
-
overall += num.to_i
|
125
|
-
end
|
126
|
-
puts "#{overall} commits by #{authors.count} authors:"
|
127
|
-
puts authors.sort_by { |n,c| -c }.map { |e| a.format % e }.join(a.sep)
|
128
|
-
end
|
129
|
-
|
130
|
-
# PACKAGING ============================================================
|
131
|
-
|
132
|
-
if defined?(Gem)
|
133
|
-
# Load the gemspec using the same limitations as github
|
134
|
-
def spec
|
135
|
-
require 'rubygems' unless defined? Gem::Specification
|
136
|
-
@spec ||= eval(File.read('sinatra.gemspec'))
|
137
|
-
end
|
138
|
-
|
139
|
-
def package(ext='')
|
140
|
-
"pkg/sinatra-#{spec.version}" + ext
|
141
|
-
end
|
142
|
-
|
143
|
-
desc 'Build packages'
|
144
|
-
task :package => %w[.gem .tar.gz].map {|e| package(e)}
|
145
|
-
|
146
|
-
desc 'Build and install as local gem'
|
147
|
-
task :install => package('.gem') do
|
148
|
-
sh "gem install #{package('.gem')}"
|
149
|
-
end
|
150
|
-
|
151
|
-
directory 'pkg/'
|
152
|
-
CLOBBER.include('pkg')
|
153
|
-
|
154
|
-
file package('.gem') => %w[pkg/ sinatra.gemspec] + spec.files do |f|
|
155
|
-
sh "gem build sinatra.gemspec"
|
156
|
-
mv File.basename(f.name), f.name
|
157
|
-
end
|
158
|
-
|
159
|
-
file package('.tar.gz') => %w[pkg/] + spec.files do |f|
|
160
|
-
sh <<-SH
|
161
|
-
git archive \
|
162
|
-
--prefix=sinatra-#{source_version}/ \
|
163
|
-
--format=tar \
|
164
|
-
HEAD | gzip > #{f.name}
|
165
|
-
SH
|
166
|
-
end
|
167
|
-
|
168
|
-
task 'release' => ['test', package('.gem')] do
|
169
|
-
if File.binread("CHANGES") =~ /= \d\.\d\.\d . not yet released$/i
|
170
|
-
fail 'please update changes first'
|
171
|
-
end
|
172
|
-
|
173
|
-
sh <<-SH
|
174
|
-
gem install #{package('.gem')} --local &&
|
175
|
-
gem push #{package('.gem')} &&
|
176
|
-
git commit --allow-empty -a -m '#{source_version} release' &&
|
177
|
-
git tag -s v#{source_version} -m '#{source_version} release' &&
|
178
|
-
git tag -s #{source_version} -m '#{source_version} release' &&
|
179
|
-
git push && (git push sinatra || true) &&
|
180
|
-
git push --tags && (git push sinatra --tags || true)
|
181
|
-
SH
|
182
|
-
end
|
183
|
-
end
|
@@ -1,61 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby -I ../lib -I lib
|
2
|
-
# coding: utf-8
|
3
|
-
require 'sinatra'
|
4
|
-
set :server, 'thin'
|
5
|
-
connections = []
|
6
|
-
|
7
|
-
get '/' do
|
8
|
-
halt erb(:login) unless params[:user]
|
9
|
-
erb :chat, :locals => { :user => params[:user].gsub(/\W/, '') }
|
10
|
-
end
|
11
|
-
|
12
|
-
get '/stream', :provides => 'text/event-stream' do
|
13
|
-
stream :keep_open do |out|
|
14
|
-
connections << out
|
15
|
-
out.callback { connections.delete(out) }
|
16
|
-
end
|
17
|
-
end
|
18
|
-
|
19
|
-
post '/' do
|
20
|
-
connections.each { |out| out << "data: #{params[:msg]}\n\n" }
|
21
|
-
204 # response without entity body
|
22
|
-
end
|
23
|
-
|
24
|
-
__END__
|
25
|
-
|
26
|
-
@@ layout
|
27
|
-
<html>
|
28
|
-
<head>
|
29
|
-
<title>Super Simple Chat with Sinatra</title>
|
30
|
-
<meta charset="utf-8" />
|
31
|
-
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
|
32
|
-
</head>
|
33
|
-
<body><%= yield %></body>
|
34
|
-
</html>
|
35
|
-
|
36
|
-
@@ login
|
37
|
-
<form action='/'>
|
38
|
-
<label for='user'>User Name:</label>
|
39
|
-
<input name='user' value='' />
|
40
|
-
<input type='submit' value="GO!" />
|
41
|
-
</form>
|
42
|
-
|
43
|
-
@@ chat
|
44
|
-
<pre id='chat'></pre>
|
45
|
-
|
46
|
-
<script>
|
47
|
-
// reading
|
48
|
-
var es = new EventSource('/stream');
|
49
|
-
es.onmessage = function(e) { $('#chat').append(e.data + "\n") };
|
50
|
-
|
51
|
-
// writing
|
52
|
-
$("form").live("submit", function(e) {
|
53
|
-
$.post('/', {msg: "<%= user %>: " + $('#msg').val()});
|
54
|
-
$('#msg').val(''); $('#msg').focus();
|
55
|
-
e.preventDefault();
|
56
|
-
});
|
57
|
-
</script>
|
58
|
-
|
59
|
-
<form>
|
60
|
-
<input id='msg' placeholder='type message here...' />
|
61
|
-
</form>
|
@@ -1,26 +0,0 @@
|
|
1
|
-
# this example does *not* work properly with WEBrick
|
2
|
-
#
|
3
|
-
# run *one* of these:
|
4
|
-
#
|
5
|
-
# rackup -s mongrel stream.ru # gem install mongrel
|
6
|
-
# thin -R stream.ru start # gem install thin
|
7
|
-
# unicorn stream.ru # gem install unicorn
|
8
|
-
# puma stream.ru # gem install puma
|
9
|
-
|
10
|
-
require 'sinatra/base'
|
11
|
-
|
12
|
-
class Stream < Sinatra::Base
|
13
|
-
get '/' do
|
14
|
-
content_type :txt
|
15
|
-
|
16
|
-
stream do |out|
|
17
|
-
out << "It's gonna be legen -\n"
|
18
|
-
sleep 0.5
|
19
|
-
out << " (wait for it) \n"
|
20
|
-
sleep 1
|
21
|
-
out << "- dary!\n"
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
25
|
-
|
26
|
-
run Stream
|
@@ -1,1728 +0,0 @@
|
|
1
|
-
# external dependencies
|
2
|
-
require 'rack'
|
3
|
-
require 'tilt'
|
4
|
-
require 'rack/protection'
|
5
|
-
|
6
|
-
# stdlib dependencies
|
7
|
-
require 'thread'
|
8
|
-
require 'time'
|
9
|
-
require 'uri'
|
10
|
-
|
11
|
-
# other files we need
|
12
|
-
require 'sinatra/showexceptions'
|
13
|
-
require 'sinatra/version'
|
14
|
-
|
15
|
-
module Sinatra
|
16
|
-
# The request object. See Rack::Request for more info:
|
17
|
-
# http://rack.rubyforge.org/doc/classes/Rack/Request.html
|
18
|
-
class Request < Rack::Request
|
19
|
-
# Returns an array of acceptable media types for the response
|
20
|
-
def accept
|
21
|
-
@env['sinatra.accept'] ||= begin
|
22
|
-
entries = @env['HTTP_ACCEPT'].to_s.split(',')
|
23
|
-
entries.map { |e| accept_entry(e) }.sort_by(&:last).map(&:first)
|
24
|
-
end
|
25
|
-
end
|
26
|
-
|
27
|
-
def preferred_type(*types)
|
28
|
-
return accept.first if types.empty?
|
29
|
-
types.flatten!
|
30
|
-
accept.detect do |pattern|
|
31
|
-
type = types.detect { |t| File.fnmatch(pattern, t) }
|
32
|
-
return type if type
|
33
|
-
end
|
34
|
-
end
|
35
|
-
|
36
|
-
alias accept? preferred_type
|
37
|
-
alias secure? ssl?
|
38
|
-
|
39
|
-
def forwarded?
|
40
|
-
@env.include? "HTTP_X_FORWARDED_HOST"
|
41
|
-
end
|
42
|
-
|
43
|
-
def safe?
|
44
|
-
get? or head? or options? or trace?
|
45
|
-
end
|
46
|
-
|
47
|
-
def idempotent?
|
48
|
-
safe? or put? or delete?
|
49
|
-
end
|
50
|
-
|
51
|
-
private
|
52
|
-
|
53
|
-
def accept_entry(entry)
|
54
|
-
type, *options = entry.delete(' ').split(';')
|
55
|
-
quality = 0 # we sort smallest first
|
56
|
-
options.delete_if { |e| quality = 1 - e[2..-1].to_f if e.start_with? 'q=' }
|
57
|
-
[type, [quality, type.count('*'), 1 - options.size]]
|
58
|
-
end
|
59
|
-
end
|
60
|
-
|
61
|
-
# The response object. See Rack::Response and Rack::ResponseHelpers for
|
62
|
-
# more info:
|
63
|
-
# http://rack.rubyforge.org/doc/classes/Rack/Response.html
|
64
|
-
# http://rack.rubyforge.org/doc/classes/Rack/Response/Helpers.html
|
65
|
-
class Response < Rack::Response
|
66
|
-
def initialize(*)
|
67
|
-
super
|
68
|
-
headers['Content-Type'] ||= 'text/html'
|
69
|
-
end
|
70
|
-
|
71
|
-
def body=(value)
|
72
|
-
value = value.body while Rack::Response === value
|
73
|
-
@body = String === value ? [value.to_str] : value
|
74
|
-
end
|
75
|
-
|
76
|
-
def each
|
77
|
-
block_given? ? super : enum_for(:each)
|
78
|
-
end
|
79
|
-
|
80
|
-
def finish
|
81
|
-
result = body
|
82
|
-
|
83
|
-
if drop_content_info?
|
84
|
-
headers.delete "Content-Length"
|
85
|
-
headers.delete "Content-Type"
|
86
|
-
end
|
87
|
-
|
88
|
-
if drop_body?
|
89
|
-
close
|
90
|
-
result = []
|
91
|
-
end
|
92
|
-
|
93
|
-
if calculate_content_length?
|
94
|
-
# if some other code has already set Content-Length, don't muck with it
|
95
|
-
# currently, this would be the static file-handler
|
96
|
-
headers["Content-Length"] = body.inject(0) { |l, p| l + Rack::Utils.bytesize(p) }.to_s
|
97
|
-
end
|
98
|
-
|
99
|
-
[status.to_i, header, result]
|
100
|
-
end
|
101
|
-
|
102
|
-
private
|
103
|
-
|
104
|
-
def calculate_content_length?
|
105
|
-
headers["Content-Type"] and not headers["Content-Length"] and Array === body
|
106
|
-
end
|
107
|
-
|
108
|
-
def drop_content_info?
|
109
|
-
status.to_i / 100 == 1 or drop_body?
|
110
|
-
end
|
111
|
-
|
112
|
-
def drop_body?
|
113
|
-
[204, 205, 304].include?(status.to_i)
|
114
|
-
end
|
115
|
-
end
|
116
|
-
|
117
|
-
# Some Rack handlers (Thin, Rainbows!) implement an extended body object protocol, however,
|
118
|
-
# some middleware (namely Rack::Lint) will break it by not mirroring the methods in question.
|
119
|
-
# This middleware will detect an extended body object and will make sure it reaches the
|
120
|
-
# handler directly. We do this here, so our middleware and middleware set up by the app will
|
121
|
-
# still be able to run.
|
122
|
-
class ExtendedRack < Struct.new(:app)
|
123
|
-
def call(env)
|
124
|
-
result, callback = app.call(env), env['async.callback']
|
125
|
-
return result unless callback and async?(*result)
|
126
|
-
after_response { callback.call result }
|
127
|
-
setup_close(env, *result)
|
128
|
-
throw :async
|
129
|
-
end
|
130
|
-
|
131
|
-
private
|
132
|
-
|
133
|
-
def setup_close(env, status, header, body)
|
134
|
-
return unless body.respond_to? :close and env.include? 'async.close'
|
135
|
-
env['async.close'].callback { body.close }
|
136
|
-
env['async.close'].errback { body.close }
|
137
|
-
end
|
138
|
-
|
139
|
-
def after_response(&block)
|
140
|
-
raise NotImplementedError, "only supports EventMachine at the moment" unless defined? EventMachine
|
141
|
-
EventMachine.next_tick(&block)
|
142
|
-
end
|
143
|
-
|
144
|
-
def async?(status, headers, body)
|
145
|
-
return true if status == -1
|
146
|
-
body.respond_to? :callback and body.respond_to? :errback
|
147
|
-
end
|
148
|
-
end
|
149
|
-
|
150
|
-
# Behaves exactly like Rack::CommonLogger with the notable exception that it does nothing,
|
151
|
-
# if another CommonLogger is already in the middleware chain.
|
152
|
-
class CommonLogger < Rack::CommonLogger
|
153
|
-
def call(env)
|
154
|
-
env['sinatra.commonlogger'] ? @app.call(env) : super
|
155
|
-
end
|
156
|
-
|
157
|
-
superclass.class_eval do
|
158
|
-
alias call_without_check call unless method_defined? :call_without_check
|
159
|
-
def call(env)
|
160
|
-
env['sinatra.commonlogger'] = true
|
161
|
-
call_without_check(env)
|
162
|
-
end
|
163
|
-
end
|
164
|
-
end
|
165
|
-
|
166
|
-
class NotFound < NameError #:nodoc:
|
167
|
-
def code ; 404 ; end
|
168
|
-
end
|
169
|
-
|
170
|
-
# Methods available to routes, before/after filters, and views.
|
171
|
-
module Helpers
|
172
|
-
# Set or retrieve the response status code.
|
173
|
-
def status(value=nil)
|
174
|
-
response.status = value if value
|
175
|
-
response.status
|
176
|
-
end
|
177
|
-
|
178
|
-
# Set or retrieve the response body. When a block is given,
|
179
|
-
# evaluation is deferred until the body is read with #each.
|
180
|
-
def body(value=nil, &block)
|
181
|
-
if block_given?
|
182
|
-
def block.each; yield(call) end
|
183
|
-
response.body = block
|
184
|
-
elsif value
|
185
|
-
response.body = value
|
186
|
-
else
|
187
|
-
response.body
|
188
|
-
end
|
189
|
-
end
|
190
|
-
|
191
|
-
# Halt processing and redirect to the URI provided.
|
192
|
-
def redirect(uri, *args)
|
193
|
-
if env['HTTP_VERSION'] == 'HTTP/1.1' and env["REQUEST_METHOD"] != 'GET'
|
194
|
-
status 303
|
195
|
-
else
|
196
|
-
status 302
|
197
|
-
end
|
198
|
-
|
199
|
-
# According to RFC 2616 section 14.30, "the field value consists of a
|
200
|
-
# single absolute URI"
|
201
|
-
response['Location'] = uri(uri, settings.absolute_redirects?, settings.prefixed_redirects?)
|
202
|
-
halt(*args)
|
203
|
-
end
|
204
|
-
|
205
|
-
# Generates the absolute URI for a given path in the app.
|
206
|
-
# Takes Rack routers and reverse proxies into account.
|
207
|
-
def uri(addr = nil, absolute = true, add_script_name = true)
|
208
|
-
return addr if addr =~ /\A[A-z][A-z0-9\+\.\-]*:/
|
209
|
-
uri = [host = ""]
|
210
|
-
if absolute
|
211
|
-
host << "http#{'s' if request.secure?}://"
|
212
|
-
if request.forwarded? or request.port != (request.secure? ? 443 : 80)
|
213
|
-
host << request.host_with_port
|
214
|
-
else
|
215
|
-
host << request.host
|
216
|
-
end
|
217
|
-
end
|
218
|
-
uri << request.script_name.to_s if add_script_name
|
219
|
-
uri << (addr ? addr : request.path_info).to_s
|
220
|
-
File.join uri
|
221
|
-
end
|
222
|
-
|
223
|
-
alias url uri
|
224
|
-
alias to uri
|
225
|
-
|
226
|
-
# Halt processing and return the error status provided.
|
227
|
-
def error(code, body=nil)
|
228
|
-
code, body = 500, code.to_str if code.respond_to? :to_str
|
229
|
-
response.body = body unless body.nil?
|
230
|
-
halt code
|
231
|
-
end
|
232
|
-
|
233
|
-
# Halt processing and return a 404 Not Found.
|
234
|
-
def not_found(body=nil)
|
235
|
-
error 404, body
|
236
|
-
end
|
237
|
-
|
238
|
-
# Set multiple response headers with Hash.
|
239
|
-
def headers(hash=nil)
|
240
|
-
response.headers.merge! hash if hash
|
241
|
-
response.headers
|
242
|
-
end
|
243
|
-
|
244
|
-
# Access the underlying Rack session.
|
245
|
-
def session
|
246
|
-
request.session
|
247
|
-
end
|
248
|
-
|
249
|
-
# Access shared logger object.
|
250
|
-
def logger
|
251
|
-
request.logger
|
252
|
-
end
|
253
|
-
|
254
|
-
# Look up a media type by file extension in Rack's mime registry.
|
255
|
-
def mime_type(type)
|
256
|
-
Base.mime_type(type)
|
257
|
-
end
|
258
|
-
|
259
|
-
# Set the Content-Type of the response body given a media type or file
|
260
|
-
# extension.
|
261
|
-
def content_type(type = nil, params={})
|
262
|
-
return response['Content-Type'] unless type
|
263
|
-
default = params.delete :default
|
264
|
-
mime_type = mime_type(type) || default
|
265
|
-
fail "Unknown media type: %p" % type if mime_type.nil?
|
266
|
-
mime_type = mime_type.dup
|
267
|
-
unless params.include? :charset or settings.add_charset.all? { |p| not p === mime_type }
|
268
|
-
params[:charset] = params.delete('charset') || settings.default_encoding
|
269
|
-
end
|
270
|
-
params.delete :charset if mime_type.include? 'charset'
|
271
|
-
unless params.empty?
|
272
|
-
mime_type << (mime_type.include?(';') ? ', ' : ';')
|
273
|
-
mime_type << params.map { |kv| kv.join('=') }.join(', ')
|
274
|
-
end
|
275
|
-
response['Content-Type'] = mime_type
|
276
|
-
end
|
277
|
-
|
278
|
-
# Set the Content-Disposition to "attachment" with the specified filename,
|
279
|
-
# instructing the user agents to prompt to save.
|
280
|
-
def attachment(filename=nil)
|
281
|
-
response['Content-Disposition'] = 'attachment'
|
282
|
-
if filename
|
283
|
-
params = '; filename="%s"' % File.basename(filename)
|
284
|
-
response['Content-Disposition'] << params
|
285
|
-
ext = File.extname(filename)
|
286
|
-
content_type(ext) unless response['Content-Type'] or ext.empty?
|
287
|
-
end
|
288
|
-
end
|
289
|
-
|
290
|
-
# Use the contents of the file at +path+ as the response body.
|
291
|
-
def send_file(path, opts={})
|
292
|
-
if opts[:type] or not response['Content-Type']
|
293
|
-
content_type opts[:type] || File.extname(path), :default => 'application/octet-stream'
|
294
|
-
end
|
295
|
-
|
296
|
-
if opts[:disposition] == 'attachment' || opts[:filename]
|
297
|
-
attachment opts[:filename] || path
|
298
|
-
elsif opts[:disposition] == 'inline'
|
299
|
-
response['Content-Disposition'] = 'inline'
|
300
|
-
end
|
301
|
-
|
302
|
-
last_modified opts[:last_modified] if opts[:last_modified]
|
303
|
-
|
304
|
-
file = Rack::File.new nil
|
305
|
-
file.path = path
|
306
|
-
result = file.serving env
|
307
|
-
result[1].each { |k,v| headers[k] ||= v }
|
308
|
-
halt result[0], result[2]
|
309
|
-
rescue Errno::ENOENT
|
310
|
-
not_found
|
311
|
-
end
|
312
|
-
|
313
|
-
# Class of the response body in case you use #stream.
|
314
|
-
#
|
315
|
-
# Three things really matter: The front and back block (back being the
|
316
|
-
# block generating content, front the one sending it to the client) and
|
317
|
-
# the scheduler, integrating with whatever concurrency feature the Rack
|
318
|
-
# handler is using.
|
319
|
-
#
|
320
|
-
# Scheduler has to respond to defer and schedule.
|
321
|
-
class Stream
|
322
|
-
def self.schedule(*) yield end
|
323
|
-
def self.defer(*) yield end
|
324
|
-
|
325
|
-
def initialize(scheduler = self.class, keep_open = false, &back)
|
326
|
-
@back, @scheduler, @keep_open = back.to_proc, scheduler, keep_open
|
327
|
-
@callbacks, @closed = [], false
|
328
|
-
end
|
329
|
-
|
330
|
-
def close
|
331
|
-
return if @closed
|
332
|
-
@closed = true
|
333
|
-
@scheduler.schedule { @callbacks.each { |c| c.call }}
|
334
|
-
end
|
335
|
-
|
336
|
-
def each(&front)
|
337
|
-
@front = front
|
338
|
-
@scheduler.defer do
|
339
|
-
begin
|
340
|
-
@back.call(self)
|
341
|
-
rescue Exception => e
|
342
|
-
@scheduler.schedule { raise e }
|
343
|
-
end
|
344
|
-
close unless @keep_open
|
345
|
-
end
|
346
|
-
end
|
347
|
-
|
348
|
-
def <<(data)
|
349
|
-
@scheduler.schedule { @front.call(data.to_s) }
|
350
|
-
self
|
351
|
-
end
|
352
|
-
|
353
|
-
def callback(&block)
|
354
|
-
return yield if @closed
|
355
|
-
@callbacks << block
|
356
|
-
end
|
357
|
-
|
358
|
-
alias errback callback
|
359
|
-
end
|
360
|
-
|
361
|
-
# Allows to start sending data to the client even though later parts of
|
362
|
-
# the response body have not yet been generated.
|
363
|
-
#
|
364
|
-
# The close parameter specifies whether Stream#close should be called
|
365
|
-
# after the block has been executed. This is only relevant for evented
|
366
|
-
# servers like Thin or Rainbows.
|
367
|
-
def stream(keep_open = false)
|
368
|
-
scheduler = env['async.callback'] ? EventMachine : Stream
|
369
|
-
current = @params.dup
|
370
|
-
body Stream.new(scheduler, keep_open) { |out| with_params(current) { yield(out) } }
|
371
|
-
end
|
372
|
-
|
373
|
-
# Specify response freshness policy for HTTP caches (Cache-Control header).
|
374
|
-
# Any number of non-value directives (:public, :private, :no_cache,
|
375
|
-
# :no_store, :must_revalidate, :proxy_revalidate) may be passed along with
|
376
|
-
# a Hash of value directives (:max_age, :min_stale, :s_max_age).
|
377
|
-
#
|
378
|
-
# cache_control :public, :must_revalidate, :max_age => 60
|
379
|
-
# => Cache-Control: public, must-revalidate, max-age=60
|
380
|
-
#
|
381
|
-
# See RFC 2616 / 14.9 for more on standard cache control directives:
|
382
|
-
# http://tools.ietf.org/html/rfc2616#section-14.9.1
|
383
|
-
def cache_control(*values)
|
384
|
-
if values.last.kind_of?(Hash)
|
385
|
-
hash = values.pop
|
386
|
-
hash.reject! { |k,v| v == false }
|
387
|
-
hash.reject! { |k,v| values << k if v == true }
|
388
|
-
else
|
389
|
-
hash = {}
|
390
|
-
end
|
391
|
-
|
392
|
-
values.map! { |value| value.to_s.tr('_','-') }
|
393
|
-
hash.each do |key, value|
|
394
|
-
key = key.to_s.tr('_', '-')
|
395
|
-
value = value.to_i if key == "max-age"
|
396
|
-
values << [key, value].join('=')
|
397
|
-
end
|
398
|
-
|
399
|
-
response['Cache-Control'] = values.join(', ') if values.any?
|
400
|
-
end
|
401
|
-
|
402
|
-
# Set the Expires header and Cache-Control/max-age directive. Amount
|
403
|
-
# can be an integer number of seconds in the future or a Time object
|
404
|
-
# indicating when the response should be considered "stale". The remaining
|
405
|
-
# "values" arguments are passed to the #cache_control helper:
|
406
|
-
#
|
407
|
-
# expires 500, :public, :must_revalidate
|
408
|
-
# => Cache-Control: public, must-revalidate, max-age=60
|
409
|
-
# => Expires: Mon, 08 Jun 2009 08:50:17 GMT
|
410
|
-
#
|
411
|
-
def expires(amount, *values)
|
412
|
-
values << {} unless values.last.kind_of?(Hash)
|
413
|
-
|
414
|
-
if amount.is_a? Integer
|
415
|
-
time = Time.now + amount.to_i
|
416
|
-
max_age = amount
|
417
|
-
else
|
418
|
-
time = time_for amount
|
419
|
-
max_age = time - Time.now
|
420
|
-
end
|
421
|
-
|
422
|
-
values.last.merge!(:max_age => max_age)
|
423
|
-
cache_control(*values)
|
424
|
-
|
425
|
-
response['Expires'] = time.httpdate
|
426
|
-
end
|
427
|
-
|
428
|
-
# Set the last modified time of the resource (HTTP 'Last-Modified' header)
|
429
|
-
# and halt if conditional GET matches. The +time+ argument is a Time,
|
430
|
-
# DateTime, or other object that responds to +to_time+.
|
431
|
-
#
|
432
|
-
# When the current request includes an 'If-Modified-Since' header that is
|
433
|
-
# equal or later than the time specified, execution is immediately halted
|
434
|
-
# with a '304 Not Modified' response.
|
435
|
-
def last_modified(time)
|
436
|
-
return unless time
|
437
|
-
time = time_for time
|
438
|
-
response['Last-Modified'] = time.httpdate
|
439
|
-
return if env['HTTP_IF_NONE_MATCH']
|
440
|
-
|
441
|
-
if status == 200 and env['HTTP_IF_MODIFIED_SINCE']
|
442
|
-
# compare based on seconds since epoch
|
443
|
-
since = Time.httpdate(env['HTTP_IF_MODIFIED_SINCE']).to_i
|
444
|
-
halt 304 if since >= time.to_i
|
445
|
-
end
|
446
|
-
|
447
|
-
if (success? or status == 412) and env['HTTP_IF_UNMODIFIED_SINCE']
|
448
|
-
# compare based on seconds since epoch
|
449
|
-
since = Time.httpdate(env['HTTP_IF_UNMODIFIED_SINCE']).to_i
|
450
|
-
halt 412 if since < time.to_i
|
451
|
-
end
|
452
|
-
rescue ArgumentError
|
453
|
-
end
|
454
|
-
|
455
|
-
# Set the response entity tag (HTTP 'ETag' header) and halt if conditional
|
456
|
-
# GET matches. The +value+ argument is an identifier that uniquely
|
457
|
-
# identifies the current version of the resource. The +kind+ argument
|
458
|
-
# indicates whether the etag should be used as a :strong (default) or :weak
|
459
|
-
# cache validator.
|
460
|
-
#
|
461
|
-
# When the current request includes an 'If-None-Match' header with a
|
462
|
-
# matching etag, execution is immediately halted. If the request method is
|
463
|
-
# GET or HEAD, a '304 Not Modified' response is sent.
|
464
|
-
def etag(value, options = {})
|
465
|
-
# Before touching this code, please double check RFC 2616 14.24 and 14.26.
|
466
|
-
options = {:kind => options} unless Hash === options
|
467
|
-
kind = options[:kind] || :strong
|
468
|
-
new_resource = options.fetch(:new_resource) { request.post? }
|
469
|
-
|
470
|
-
unless [:strong, :weak].include?(kind)
|
471
|
-
raise ArgumentError, ":strong or :weak expected"
|
472
|
-
end
|
473
|
-
|
474
|
-
value = '"%s"' % value
|
475
|
-
value = 'W/' + value if kind == :weak
|
476
|
-
response['ETag'] = value
|
477
|
-
|
478
|
-
if success? or status == 304
|
479
|
-
if etag_matches? env['HTTP_IF_NONE_MATCH'], new_resource
|
480
|
-
halt(request.safe? ? 304 : 412)
|
481
|
-
end
|
482
|
-
|
483
|
-
if env['HTTP_IF_MATCH']
|
484
|
-
halt 412 unless etag_matches? env['HTTP_IF_MATCH'], new_resource
|
485
|
-
end
|
486
|
-
end
|
487
|
-
end
|
488
|
-
|
489
|
-
# Sugar for redirect (example: redirect back)
|
490
|
-
def back
|
491
|
-
request.referer
|
492
|
-
end
|
493
|
-
|
494
|
-
# whether or not the status is set to 1xx
|
495
|
-
def informational?
|
496
|
-
status.between? 100, 199
|
497
|
-
end
|
498
|
-
|
499
|
-
# whether or not the status is set to 2xx
|
500
|
-
def success?
|
501
|
-
status.between? 200, 299
|
502
|
-
end
|
503
|
-
|
504
|
-
# whether or not the status is set to 3xx
|
505
|
-
def redirect?
|
506
|
-
status.between? 300, 399
|
507
|
-
end
|
508
|
-
|
509
|
-
# whether or not the status is set to 4xx
|
510
|
-
def client_error?
|
511
|
-
status.between? 400, 499
|
512
|
-
end
|
513
|
-
|
514
|
-
# whether or not the status is set to 5xx
|
515
|
-
def server_error?
|
516
|
-
status.between? 500, 599
|
517
|
-
end
|
518
|
-
|
519
|
-
# whether or not the status is set to 404
|
520
|
-
def not_found?
|
521
|
-
status == 404
|
522
|
-
end
|
523
|
-
|
524
|
-
# Generates a Time object from the given value.
|
525
|
-
# Used by #expires and #last_modified.
|
526
|
-
def time_for(value)
|
527
|
-
if value.respond_to? :to_time
|
528
|
-
value.to_time
|
529
|
-
elsif value.is_a? Time
|
530
|
-
value
|
531
|
-
elsif value.respond_to? :new_offset
|
532
|
-
# DateTime#to_time does the same on 1.9
|
533
|
-
d = value.new_offset 0
|
534
|
-
t = Time.utc d.year, d.mon, d.mday, d.hour, d.min, d.sec + d.sec_fraction
|
535
|
-
t.getlocal
|
536
|
-
elsif value.respond_to? :mday
|
537
|
-
# Date#to_time does the same on 1.9
|
538
|
-
Time.local(value.year, value.mon, value.mday)
|
539
|
-
elsif value.is_a? Numeric
|
540
|
-
Time.at value
|
541
|
-
else
|
542
|
-
Time.parse value.to_s
|
543
|
-
end
|
544
|
-
rescue ArgumentError => boom
|
545
|
-
raise boom
|
546
|
-
rescue Exception
|
547
|
-
raise ArgumentError, "unable to convert #{value.inspect} to a Time object"
|
548
|
-
end
|
549
|
-
|
550
|
-
private
|
551
|
-
|
552
|
-
# Helper method checking if a ETag value list includes the current ETag.
|
553
|
-
def etag_matches?(list, new_resource = request.post?)
|
554
|
-
return !new_resource if list == '*'
|
555
|
-
list.to_s.split(/\s*,\s*/).include? response['ETag']
|
556
|
-
end
|
557
|
-
|
558
|
-
def with_params(temp_params)
|
559
|
-
original, @params = @params, temp_params
|
560
|
-
yield
|
561
|
-
ensure
|
562
|
-
@params = original if original
|
563
|
-
end
|
564
|
-
end
|
565
|
-
|
566
|
-
private
|
567
|
-
|
568
|
-
# Template rendering methods. Each method takes the name of a template
|
569
|
-
# to render as a Symbol and returns a String with the rendered output,
|
570
|
-
# as well as an optional hash with additional options.
|
571
|
-
#
|
572
|
-
# `template` is either the name or path of the template as symbol
|
573
|
-
# (Use `:'subdir/myview'` for views in subdirectories), or a string
|
574
|
-
# that will be rendered.
|
575
|
-
#
|
576
|
-
# Possible options are:
|
577
|
-
# :content_type The content type to use, same arguments as content_type.
|
578
|
-
# :layout If set to false, no layout is rendered, otherwise
|
579
|
-
# the specified layout is used (Ignored for `sass` and `less`)
|
580
|
-
# :layout_engine Engine to use for rendering the layout.
|
581
|
-
# :locals A hash with local variables that should be available
|
582
|
-
# in the template
|
583
|
-
# :scope If set, template is evaluate with the binding of the given
|
584
|
-
# object rather than the application instance.
|
585
|
-
# :views Views directory to use.
|
586
|
-
module Templates
|
587
|
-
module ContentTyped
|
588
|
-
attr_accessor :content_type
|
589
|
-
end
|
590
|
-
|
591
|
-
def initialize
|
592
|
-
super
|
593
|
-
@default_layout = :layout
|
594
|
-
end
|
595
|
-
|
596
|
-
def erb(template, options={}, locals={})
|
597
|
-
render :erb, template, options, locals
|
598
|
-
end
|
599
|
-
|
600
|
-
def erubis(template, options={}, locals={})
|
601
|
-
warn "Sinatra::Templates#erubis is deprecated and will be removed, use #erb instead.\n" \
|
602
|
-
"If you have Erubis installed, it will be used automatically."
|
603
|
-
render :erubis, template, options, locals
|
604
|
-
end
|
605
|
-
|
606
|
-
def haml(template, options={}, locals={})
|
607
|
-
render :haml, template, options, locals
|
608
|
-
end
|
609
|
-
|
610
|
-
def sass(template, options={}, locals={})
|
611
|
-
options.merge! :layout => false, :default_content_type => :css
|
612
|
-
render :sass, template, options, locals
|
613
|
-
end
|
614
|
-
|
615
|
-
def scss(template, options={}, locals={})
|
616
|
-
options.merge! :layout => false, :default_content_type => :css
|
617
|
-
render :scss, template, options, locals
|
618
|
-
end
|
619
|
-
|
620
|
-
def less(template, options={}, locals={})
|
621
|
-
options.merge! :layout => false, :default_content_type => :css
|
622
|
-
render :less, template, options, locals
|
623
|
-
end
|
624
|
-
|
625
|
-
def builder(template=nil, options={}, locals={}, &block)
|
626
|
-
options[:default_content_type] = :xml
|
627
|
-
render_ruby(:builder, template, options, locals, &block)
|
628
|
-
end
|
629
|
-
|
630
|
-
def liquid(template, options={}, locals={})
|
631
|
-
render :liquid, template, options, locals
|
632
|
-
end
|
633
|
-
|
634
|
-
def markdown(template, options={}, locals={})
|
635
|
-
render :markdown, template, options, locals
|
636
|
-
end
|
637
|
-
|
638
|
-
def textile(template, options={}, locals={})
|
639
|
-
render :textile, template, options, locals
|
640
|
-
end
|
641
|
-
|
642
|
-
def rdoc(template, options={}, locals={})
|
643
|
-
render :rdoc, template, options, locals
|
644
|
-
end
|
645
|
-
|
646
|
-
def radius(template, options={}, locals={})
|
647
|
-
render :radius, template, options, locals
|
648
|
-
end
|
649
|
-
|
650
|
-
def markaby(template=nil, options={}, locals={}, &block)
|
651
|
-
render_ruby(:mab, template, options, locals, &block)
|
652
|
-
end
|
653
|
-
|
654
|
-
def coffee(template, options={}, locals={})
|
655
|
-
options.merge! :layout => false, :default_content_type => :js
|
656
|
-
render :coffee, template, options, locals
|
657
|
-
end
|
658
|
-
|
659
|
-
def nokogiri(template=nil, options={}, locals={}, &block)
|
660
|
-
options[:default_content_type] = :xml
|
661
|
-
render_ruby(:nokogiri, template, options, locals, &block)
|
662
|
-
end
|
663
|
-
|
664
|
-
def slim(template, options={}, locals={})
|
665
|
-
render :slim, template, options, locals
|
666
|
-
end
|
667
|
-
|
668
|
-
def creole(template, options={}, locals={})
|
669
|
-
render :creole, template, options, locals
|
670
|
-
end
|
671
|
-
|
672
|
-
# Calls the given block for every possible template file in views,
|
673
|
-
# named name.ext, where ext is registered on engine.
|
674
|
-
def find_template(views, name, engine)
|
675
|
-
yield ::File.join(views, "#{name}.#{@preferred_extension}")
|
676
|
-
Tilt.mappings.each do |ext, engines|
|
677
|
-
next unless ext != @preferred_extension and engines.include? engine
|
678
|
-
yield ::File.join(views, "#{name}.#{ext}")
|
679
|
-
end
|
680
|
-
end
|
681
|
-
|
682
|
-
private
|
683
|
-
# logic shared between builder and nokogiri
|
684
|
-
def render_ruby(engine, template, options={}, locals={}, &block)
|
685
|
-
options, template = template, nil if template.is_a?(Hash)
|
686
|
-
template = Proc.new { block } if template.nil?
|
687
|
-
render engine, template, options, locals
|
688
|
-
end
|
689
|
-
|
690
|
-
def render(engine, data, options={}, locals={}, &block)
|
691
|
-
# merge app-level options
|
692
|
-
options = settings.send(engine).merge(options) if settings.respond_to?(engine)
|
693
|
-
options[:outvar] ||= '@_out_buf'
|
694
|
-
options[:default_encoding] ||= settings.default_encoding
|
695
|
-
|
696
|
-
# extract generic options
|
697
|
-
locals = options.delete(:locals) || locals || {}
|
698
|
-
views = options.delete(:views) || settings.views || "./views"
|
699
|
-
layout = options.delete(:layout)
|
700
|
-
eat_errors = layout.nil?
|
701
|
-
layout = @default_layout if layout.nil? or layout == true
|
702
|
-
content_type = options.delete(:content_type) || options.delete(:default_content_type)
|
703
|
-
layout_engine = options.delete(:layout_engine) || engine
|
704
|
-
scope = options.delete(:scope) || self
|
705
|
-
|
706
|
-
# compile and render template
|
707
|
-
begin
|
708
|
-
layout_was = @default_layout
|
709
|
-
@default_layout = false
|
710
|
-
template = compile_template(engine, data, options, views)
|
711
|
-
output = template.render(scope, locals, &block)
|
712
|
-
ensure
|
713
|
-
@default_layout = layout_was
|
714
|
-
end
|
715
|
-
|
716
|
-
# render layout
|
717
|
-
if layout
|
718
|
-
options = options.merge(:views => views, :layout => false, :eat_errors => eat_errors, :scope => scope)
|
719
|
-
catch(:layout_missing) { return render(layout_engine, layout, options, locals) { output } }
|
720
|
-
end
|
721
|
-
|
722
|
-
output.extend(ContentTyped).content_type = content_type if content_type
|
723
|
-
output
|
724
|
-
end
|
725
|
-
|
726
|
-
def compile_template(engine, data, options, views)
|
727
|
-
eat_errors = options.delete :eat_errors
|
728
|
-
template_cache.fetch engine, data, options do
|
729
|
-
template = Tilt[engine]
|
730
|
-
raise "Template engine not found: #{engine}" if template.nil?
|
731
|
-
|
732
|
-
case data
|
733
|
-
when Symbol
|
734
|
-
body, path, line = settings.templates[data]
|
735
|
-
if body
|
736
|
-
body = body.call if body.respond_to?(:call)
|
737
|
-
template.new(path, line.to_i, options) { body }
|
738
|
-
else
|
739
|
-
found = false
|
740
|
-
@preferred_extension = engine.to_s
|
741
|
-
find_template(views, data, template) do |file|
|
742
|
-
path ||= file # keep the initial path rather than the last one
|
743
|
-
if found = File.exists?(file)
|
744
|
-
path = file
|
745
|
-
break
|
746
|
-
end
|
747
|
-
end
|
748
|
-
throw :layout_missing if eat_errors and not found
|
749
|
-
template.new(path, 1, options)
|
750
|
-
end
|
751
|
-
when Proc, String
|
752
|
-
body = data.is_a?(String) ? Proc.new { data } : data
|
753
|
-
path, line = settings.caller_locations.first
|
754
|
-
template.new(path, line.to_i, options, &body)
|
755
|
-
else
|
756
|
-
raise ArgumentError, "Sorry, don't know how to render #{data.inspect}."
|
757
|
-
end
|
758
|
-
end
|
759
|
-
end
|
760
|
-
end
|
761
|
-
|
762
|
-
# Base class for all Sinatra applications and middleware.
|
763
|
-
class Base
|
764
|
-
include Rack::Utils
|
765
|
-
include Helpers
|
766
|
-
include Templates
|
767
|
-
|
768
|
-
attr_accessor :app
|
769
|
-
attr_reader :template_cache
|
770
|
-
|
771
|
-
def initialize(app=nil)
|
772
|
-
super()
|
773
|
-
@app = app
|
774
|
-
@template_cache = Tilt::Cache.new
|
775
|
-
yield self if block_given?
|
776
|
-
end
|
777
|
-
|
778
|
-
# Rack call interface.
|
779
|
-
def call(env)
|
780
|
-
dup.call!(env)
|
781
|
-
end
|
782
|
-
|
783
|
-
attr_accessor :env, :request, :response, :params
|
784
|
-
|
785
|
-
def call!(env) # :nodoc:
|
786
|
-
@env = env
|
787
|
-
@request = Request.new(env)
|
788
|
-
@response = Response.new
|
789
|
-
@params = indifferent_params(@request.params)
|
790
|
-
template_cache.clear if settings.reload_templates
|
791
|
-
force_encoding(@params)
|
792
|
-
|
793
|
-
@response['Content-Type'] = nil
|
794
|
-
invoke { dispatch! }
|
795
|
-
invoke { error_block!(response.status) }
|
796
|
-
|
797
|
-
unless @response['Content-Type']
|
798
|
-
if Array === body and body[0].respond_to? :content_type
|
799
|
-
content_type body[0].content_type
|
800
|
-
else
|
801
|
-
content_type :html
|
802
|
-
end
|
803
|
-
end
|
804
|
-
|
805
|
-
@response.finish
|
806
|
-
end
|
807
|
-
|
808
|
-
# Access settings defined with Base.set.
|
809
|
-
def self.settings
|
810
|
-
self
|
811
|
-
end
|
812
|
-
|
813
|
-
# Access settings defined with Base.set.
|
814
|
-
def settings
|
815
|
-
self.class.settings
|
816
|
-
end
|
817
|
-
|
818
|
-
def options
|
819
|
-
warn "Sinatra::Base#options is deprecated and will be removed, " \
|
820
|
-
"use #settings instead."
|
821
|
-
settings
|
822
|
-
end
|
823
|
-
|
824
|
-
# Exit the current block, halts any further processing
|
825
|
-
# of the request, and returns the specified response.
|
826
|
-
def halt(*response)
|
827
|
-
response = response.first if response.length == 1
|
828
|
-
throw :halt, response
|
829
|
-
end
|
830
|
-
|
831
|
-
# Pass control to the next matching route.
|
832
|
-
# If there are no more matching routes, Sinatra will
|
833
|
-
# return a 404 response.
|
834
|
-
def pass(&block)
|
835
|
-
throw :pass, block
|
836
|
-
end
|
837
|
-
|
838
|
-
# Forward the request to the downstream app -- middleware only.
|
839
|
-
def forward
|
840
|
-
fail "downstream app not set" unless @app.respond_to? :call
|
841
|
-
status, headers, body = @app.call env
|
842
|
-
@response.status = status
|
843
|
-
@response.body = body
|
844
|
-
@response.headers.merge! headers
|
845
|
-
nil
|
846
|
-
end
|
847
|
-
|
848
|
-
private
|
849
|
-
# Run filters defined on the class and all superclasses.
|
850
|
-
def filter!(type, base = settings)
|
851
|
-
filter! type, base.superclass if base.superclass.respond_to?(:filters)
|
852
|
-
base.filters[type].each { |args| process_route(*args) }
|
853
|
-
end
|
854
|
-
|
855
|
-
# Run routes defined on the class and all superclasses.
|
856
|
-
def route!(base = settings, pass_block=nil)
|
857
|
-
if routes = base.routes[@request.request_method]
|
858
|
-
routes.each do |pattern, keys, conditions, block|
|
859
|
-
pass_block = process_route(pattern, keys, conditions) do |*args|
|
860
|
-
route_eval { block[*args] }
|
861
|
-
end
|
862
|
-
end
|
863
|
-
end
|
864
|
-
|
865
|
-
# Run routes defined in superclass.
|
866
|
-
if base.superclass.respond_to?(:routes)
|
867
|
-
return route!(base.superclass, pass_block)
|
868
|
-
end
|
869
|
-
|
870
|
-
route_eval(&pass_block) if pass_block
|
871
|
-
route_missing
|
872
|
-
end
|
873
|
-
|
874
|
-
# Run a route block and throw :halt with the result.
|
875
|
-
def route_eval
|
876
|
-
throw :halt, yield
|
877
|
-
end
|
878
|
-
|
879
|
-
# If the current request matches pattern and conditions, fill params
|
880
|
-
# with keys and call the given block.
|
881
|
-
# Revert params afterwards.
|
882
|
-
#
|
883
|
-
# Returns pass block.
|
884
|
-
def process_route(pattern, keys, conditions, block = nil, values = [])
|
885
|
-
route = @request.path_info
|
886
|
-
route = '/' if route.empty? and not settings.empty_path_info?
|
887
|
-
return unless match = pattern.match(route)
|
888
|
-
values += match.captures.to_a.map { |v| force_encoding URI.decode_www_form_component(v) if v }
|
889
|
-
|
890
|
-
if values.any?
|
891
|
-
original, @params = params, params.merge('splat' => [], 'captures' => values)
|
892
|
-
keys.zip(values) { |k,v| Array === @params[k] ? @params[k] << v : @params[k] = v if v }
|
893
|
-
end
|
894
|
-
|
895
|
-
catch(:pass) do
|
896
|
-
conditions.each { |c| throw :pass if c.bind(self).call == false }
|
897
|
-
block ? block[self, values] : yield(self, values)
|
898
|
-
end
|
899
|
-
ensure
|
900
|
-
@params = original if original
|
901
|
-
end
|
902
|
-
|
903
|
-
# No matching route was found or all routes passed. The default
|
904
|
-
# implementation is to forward the request downstream when running
|
905
|
-
# as middleware (@app is non-nil); when no downstream app is set, raise
|
906
|
-
# a NotFound exception. Subclasses can override this method to perform
|
907
|
-
# custom route miss logic.
|
908
|
-
def route_missing
|
909
|
-
if @app
|
910
|
-
forward
|
911
|
-
else
|
912
|
-
raise NotFound
|
913
|
-
end
|
914
|
-
end
|
915
|
-
|
916
|
-
# Attempt to serve static files from public directory. Throws :halt when
|
917
|
-
# a matching file is found, returns nil otherwise.
|
918
|
-
def static!
|
919
|
-
return if (public_dir = settings.public_folder).nil?
|
920
|
-
public_dir = File.expand_path(public_dir)
|
921
|
-
|
922
|
-
path = File.expand_path(public_dir + unescape(request.path_info))
|
923
|
-
return unless path.start_with?(public_dir) and File.file?(path)
|
924
|
-
|
925
|
-
env['sinatra.static_file'] = path
|
926
|
-
cache_control(*settings.static_cache_control) if settings.static_cache_control?
|
927
|
-
send_file path, :disposition => nil
|
928
|
-
end
|
929
|
-
|
930
|
-
# Enable string or symbol key access to the nested params hash.
|
931
|
-
def indifferent_params(params)
|
932
|
-
params = indifferent_hash.merge(params)
|
933
|
-
params.each do |key, value|
|
934
|
-
next unless value.is_a?(Hash)
|
935
|
-
params[key] = indifferent_params(value)
|
936
|
-
end
|
937
|
-
end
|
938
|
-
|
939
|
-
# Creates a Hash with indifferent access.
|
940
|
-
def indifferent_hash
|
941
|
-
Hash.new {|hash,key| hash[key.to_s] if Symbol === key }
|
942
|
-
end
|
943
|
-
|
944
|
-
# Run the block with 'throw :halt' support and apply result to the response.
|
945
|
-
def invoke
|
946
|
-
res = catch(:halt) { yield }
|
947
|
-
res = [res] if Fixnum === res or String === res
|
948
|
-
if Array === res and Fixnum === res.first
|
949
|
-
status(res.shift)
|
950
|
-
body(res.pop)
|
951
|
-
headers(*res)
|
952
|
-
elsif res.respond_to? :each
|
953
|
-
body res
|
954
|
-
end
|
955
|
-
nil # avoid double setting the same response tuple twice
|
956
|
-
end
|
957
|
-
|
958
|
-
# Dispatch a request with error handling.
|
959
|
-
def dispatch!
|
960
|
-
invoke do
|
961
|
-
static! if settings.static? && (request.get? || request.head?)
|
962
|
-
filter! :before
|
963
|
-
route!
|
964
|
-
end
|
965
|
-
rescue ::Exception => boom
|
966
|
-
invoke { handle_exception!(boom) }
|
967
|
-
ensure
|
968
|
-
filter! :after unless env['sinatra.static_file']
|
969
|
-
end
|
970
|
-
|
971
|
-
# Error handling during requests.
|
972
|
-
def handle_exception!(boom)
|
973
|
-
@env['sinatra.error'] = boom
|
974
|
-
status boom.respond_to?(:code) ? Integer(boom.code) : 500
|
975
|
-
|
976
|
-
if server_error?
|
977
|
-
dump_errors! boom if settings.dump_errors?
|
978
|
-
raise boom if settings.show_exceptions? and settings.show_exceptions != :after_handler
|
979
|
-
end
|
980
|
-
|
981
|
-
if not_found?
|
982
|
-
headers['X-Cascade'] = 'pass'
|
983
|
-
body '<h1>Not Found</h1>'
|
984
|
-
end
|
985
|
-
|
986
|
-
res = error_block!(boom.class, boom) || error_block!(status, boom)
|
987
|
-
return res if res or not server_error?
|
988
|
-
raise boom if settings.raise_errors? or settings.show_exceptions?
|
989
|
-
error_block! Exception, boom
|
990
|
-
end
|
991
|
-
|
992
|
-
# Find an custom error block for the key(s) specified.
|
993
|
-
def error_block!(key, *block_params)
|
994
|
-
base = settings
|
995
|
-
while base.respond_to?(:errors)
|
996
|
-
next base = base.superclass unless args = base.errors[key]
|
997
|
-
args += [block_params]
|
998
|
-
return process_route(*args)
|
999
|
-
end
|
1000
|
-
return false unless key.respond_to? :superclass and key.superclass < Exception
|
1001
|
-
error_block!(key.superclass, *block_params)
|
1002
|
-
end
|
1003
|
-
|
1004
|
-
def dump_errors!(boom)
|
1005
|
-
msg = ["#{boom.class} - #{boom.message}:", *boom.backtrace].join("\n\t")
|
1006
|
-
@env['rack.errors'].puts(msg)
|
1007
|
-
end
|
1008
|
-
|
1009
|
-
class << self
|
1010
|
-
attr_reader :routes, :filters, :templates, :errors
|
1011
|
-
|
1012
|
-
# Removes all routes, filters, middleware and extension hooks from the
|
1013
|
-
# current class (not routes/filters/... defined by its superclass).
|
1014
|
-
def reset!
|
1015
|
-
@conditions = []
|
1016
|
-
@routes = {}
|
1017
|
-
@filters = {:before => [], :after => []}
|
1018
|
-
@errors = {}
|
1019
|
-
@middleware = []
|
1020
|
-
@prototype = nil
|
1021
|
-
@extensions = []
|
1022
|
-
|
1023
|
-
if superclass.respond_to?(:templates)
|
1024
|
-
@templates = Hash.new { |hash,key| superclass.templates[key] }
|
1025
|
-
else
|
1026
|
-
@templates = {}
|
1027
|
-
end
|
1028
|
-
end
|
1029
|
-
|
1030
|
-
# Extension modules registered on this class and all superclasses.
|
1031
|
-
def extensions
|
1032
|
-
if superclass.respond_to?(:extensions)
|
1033
|
-
(@extensions + superclass.extensions).uniq
|
1034
|
-
else
|
1035
|
-
@extensions
|
1036
|
-
end
|
1037
|
-
end
|
1038
|
-
|
1039
|
-
# Middleware used in this class and all superclasses.
|
1040
|
-
def middleware
|
1041
|
-
if superclass.respond_to?(:middleware)
|
1042
|
-
superclass.middleware + @middleware
|
1043
|
-
else
|
1044
|
-
@middleware
|
1045
|
-
end
|
1046
|
-
end
|
1047
|
-
|
1048
|
-
# Sets an option to the given value. If the value is a proc,
|
1049
|
-
# the proc will be called every time the option is accessed.
|
1050
|
-
def set(option, value = (not_set = true), ignore_setter = false, &block)
|
1051
|
-
raise ArgumentError if block and !not_set
|
1052
|
-
value, not_set = block, false if block
|
1053
|
-
|
1054
|
-
if not_set
|
1055
|
-
raise ArgumentError unless option.respond_to?(:each)
|
1056
|
-
option.each { |k,v| set(k, v) }
|
1057
|
-
return self
|
1058
|
-
end
|
1059
|
-
|
1060
|
-
if respond_to?("#{option}=") and not ignore_setter
|
1061
|
-
return __send__("#{option}=", value)
|
1062
|
-
end
|
1063
|
-
|
1064
|
-
setter = proc { |val| set option, val, true }
|
1065
|
-
getter = proc { value }
|
1066
|
-
|
1067
|
-
case value
|
1068
|
-
when Proc
|
1069
|
-
getter = value
|
1070
|
-
when Symbol, Fixnum, FalseClass, TrueClass, NilClass
|
1071
|
-
getter = value.inspect
|
1072
|
-
when Hash
|
1073
|
-
setter = proc do |val|
|
1074
|
-
val = value.merge val if Hash === val
|
1075
|
-
set option, val, true
|
1076
|
-
end
|
1077
|
-
end
|
1078
|
-
|
1079
|
-
define_singleton_method("#{option}=", setter) if setter
|
1080
|
-
define_singleton_method(option, getter) if getter
|
1081
|
-
define_singleton_method("#{option}?", "!!#{option}") unless method_defined? "#{option}?"
|
1082
|
-
self
|
1083
|
-
end
|
1084
|
-
|
1085
|
-
# Same as calling `set :option, true` for each of the given options.
|
1086
|
-
def enable(*opts)
|
1087
|
-
opts.each { |key| set(key, true) }
|
1088
|
-
end
|
1089
|
-
|
1090
|
-
# Same as calling `set :option, false` for each of the given options.
|
1091
|
-
def disable(*opts)
|
1092
|
-
opts.each { |key| set(key, false) }
|
1093
|
-
end
|
1094
|
-
|
1095
|
-
# Define a custom error handler. Optionally takes either an Exception
|
1096
|
-
# class, or an HTTP status code to specify which errors should be
|
1097
|
-
# handled.
|
1098
|
-
def error(*codes, &block)
|
1099
|
-
args = compile! "ERROR", //, block
|
1100
|
-
codes = codes.map { |c| Array(c) }.flatten
|
1101
|
-
codes << Exception if codes.empty?
|
1102
|
-
codes.each { |c| @errors[c] = args }
|
1103
|
-
end
|
1104
|
-
|
1105
|
-
# Sugar for `error(404) { ... }`
|
1106
|
-
def not_found(&block)
|
1107
|
-
error 404, &block
|
1108
|
-
end
|
1109
|
-
|
1110
|
-
# Define a named template. The block must return the template source.
|
1111
|
-
def template(name, &block)
|
1112
|
-
filename, line = caller_locations.first
|
1113
|
-
templates[name] = [block, filename, line.to_i]
|
1114
|
-
end
|
1115
|
-
|
1116
|
-
# Define the layout template. The block must return the template source.
|
1117
|
-
def layout(name=:layout, &block)
|
1118
|
-
template name, &block
|
1119
|
-
end
|
1120
|
-
|
1121
|
-
# Load embeded templates from the file; uses the caller's __FILE__
|
1122
|
-
# when no file is specified.
|
1123
|
-
def inline_templates=(file=nil)
|
1124
|
-
file = (file.nil? || file == true) ? (caller_files.first || File.expand_path($0)) : file
|
1125
|
-
|
1126
|
-
begin
|
1127
|
-
io = ::IO.respond_to?(:binread) ? ::IO.binread(file) : ::IO.read(file)
|
1128
|
-
app, data = io.gsub("\r\n", "\n").split(/^__END__$/, 2)
|
1129
|
-
rescue Errno::ENOENT
|
1130
|
-
app, data = nil
|
1131
|
-
end
|
1132
|
-
|
1133
|
-
if data
|
1134
|
-
if app and app =~ /([^\n]*\n)?#[^\n]*coding: *(\S+)/m
|
1135
|
-
encoding = $2
|
1136
|
-
else
|
1137
|
-
encoding = settings.default_encoding
|
1138
|
-
end
|
1139
|
-
lines = app.count("\n") + 1
|
1140
|
-
template = nil
|
1141
|
-
force_encoding data, encoding
|
1142
|
-
data.each_line do |line|
|
1143
|
-
lines += 1
|
1144
|
-
if line =~ /^@@\s*(.*\S)\s*$/
|
1145
|
-
template = force_encoding('', encoding)
|
1146
|
-
templates[$1.to_sym] = [template, file, lines]
|
1147
|
-
elsif template
|
1148
|
-
template << line
|
1149
|
-
end
|
1150
|
-
end
|
1151
|
-
end
|
1152
|
-
end
|
1153
|
-
|
1154
|
-
# Lookup or register a mime type in Rack's mime registry.
|
1155
|
-
def mime_type(type, value=nil)
|
1156
|
-
return type if type.nil? || type.to_s.include?('/')
|
1157
|
-
type = ".#{type}" unless type.to_s[0] == ?.
|
1158
|
-
return Rack::Mime.mime_type(type, nil) unless value
|
1159
|
-
Rack::Mime::MIME_TYPES[type] = value
|
1160
|
-
end
|
1161
|
-
|
1162
|
-
# provides all mime types matching type, including deprecated types:
|
1163
|
-
# mime_types :html # => ['text/html']
|
1164
|
-
# mime_types :js # => ['application/javascript', 'text/javascript']
|
1165
|
-
def mime_types(type)
|
1166
|
-
type = mime_type type
|
1167
|
-
type =~ /^application\/(xml|javascript)$/ ? [type, "text/#$1"] : [type]
|
1168
|
-
end
|
1169
|
-
|
1170
|
-
# Define a before filter; runs before all requests within the same
|
1171
|
-
# context as route handlers and may access/modify the request and
|
1172
|
-
# response.
|
1173
|
-
def before(path = nil, options = {}, &block)
|
1174
|
-
add_filter(:before, path, options, &block)
|
1175
|
-
end
|
1176
|
-
|
1177
|
-
# Define an after filter; runs after all requests within the same
|
1178
|
-
# context as route handlers and may access/modify the request and
|
1179
|
-
# response.
|
1180
|
-
def after(path = nil, options = {}, &block)
|
1181
|
-
add_filter(:after, path, options, &block)
|
1182
|
-
end
|
1183
|
-
|
1184
|
-
# add a filter
|
1185
|
-
def add_filter(type, path = nil, options = {}, &block)
|
1186
|
-
path, options = //, path if path.respond_to?(:each_pair)
|
1187
|
-
filters[type] << compile!(type, path || //, block, options)
|
1188
|
-
end
|
1189
|
-
|
1190
|
-
# Add a route condition. The route is considered non-matching when the
|
1191
|
-
# block returns false.
|
1192
|
-
def condition(name = "#{caller.first[/`.*'/]} condition", &block)
|
1193
|
-
@conditions << generate_method(name, &block)
|
1194
|
-
end
|
1195
|
-
|
1196
|
-
def public=(value)
|
1197
|
-
warn ":public is no longer used to avoid overloading Module#public, use :public_folder instead"
|
1198
|
-
set(:public_folder, value)
|
1199
|
-
end
|
1200
|
-
|
1201
|
-
private
|
1202
|
-
# Dynamically defines a method on settings.
|
1203
|
-
def define_singleton_method(name, content = Proc.new)
|
1204
|
-
# replace with call to singleton_class once we're 1.9 only
|
1205
|
-
(class << self; self; end).class_eval do
|
1206
|
-
undef_method(name) if method_defined? name
|
1207
|
-
String === content ? class_eval("def #{name}() #{content}; end") : define_method(name, &content)
|
1208
|
-
end
|
1209
|
-
end
|
1210
|
-
|
1211
|
-
# Condition for matching host name. Parameter might be String or Regexp.
|
1212
|
-
def host_name(pattern)
|
1213
|
-
condition { pattern === request.host }
|
1214
|
-
end
|
1215
|
-
|
1216
|
-
# Condition for matching user agent. Parameter should be Regexp.
|
1217
|
-
# Will set params[:agent].
|
1218
|
-
def user_agent(pattern)
|
1219
|
-
condition do
|
1220
|
-
if request.user_agent.to_s =~ pattern
|
1221
|
-
@params[:agent] = $~[1..-1]
|
1222
|
-
true
|
1223
|
-
else
|
1224
|
-
false
|
1225
|
-
end
|
1226
|
-
end
|
1227
|
-
end
|
1228
|
-
alias_method :agent, :user_agent
|
1229
|
-
|
1230
|
-
# Condition for matching mimetypes. Accepts file extensions.
|
1231
|
-
def provides(*types)
|
1232
|
-
types.map! { |t| mime_types(t) }
|
1233
|
-
types.flatten!
|
1234
|
-
condition do
|
1235
|
-
if type = request.preferred_type(types)
|
1236
|
-
content_type(type)
|
1237
|
-
true
|
1238
|
-
else
|
1239
|
-
false
|
1240
|
-
end
|
1241
|
-
end
|
1242
|
-
end
|
1243
|
-
|
1244
|
-
public
|
1245
|
-
# Defining a `GET` handler also automatically defines
|
1246
|
-
# a `HEAD` handler.
|
1247
|
-
def get(path, opts={}, &block)
|
1248
|
-
conditions = @conditions.dup
|
1249
|
-
route('GET', path, opts, &block)
|
1250
|
-
|
1251
|
-
@conditions = conditions
|
1252
|
-
route('HEAD', path, opts, &block)
|
1253
|
-
end
|
1254
|
-
|
1255
|
-
def put(path, opts={}, &bk) route 'PUT', path, opts, &bk end
|
1256
|
-
def post(path, opts={}, &bk) route 'POST', path, opts, &bk end
|
1257
|
-
def delete(path, opts={}, &bk) route 'DELETE', path, opts, &bk end
|
1258
|
-
def head(path, opts={}, &bk) route 'HEAD', path, opts, &bk end
|
1259
|
-
def options(path, opts={}, &bk) route 'OPTIONS', path, opts, &bk end
|
1260
|
-
def patch(path, opts={}, &bk) route 'PATCH', path, opts, &bk end
|
1261
|
-
|
1262
|
-
private
|
1263
|
-
def route(verb, path, options={}, &block)
|
1264
|
-
# Because of self.options.host
|
1265
|
-
host_name(options.delete(:host)) if options.key?(:host)
|
1266
|
-
enable :empty_path_info if path == "" and empty_path_info.nil?
|
1267
|
-
signature = compile!(verb, path, block, options)
|
1268
|
-
(@routes[verb] ||= []) << signature
|
1269
|
-
invoke_hook(:route_added, verb, path, block)
|
1270
|
-
signature
|
1271
|
-
end
|
1272
|
-
|
1273
|
-
def invoke_hook(name, *args)
|
1274
|
-
extensions.each { |e| e.send(name, *args) if e.respond_to?(name) }
|
1275
|
-
end
|
1276
|
-
|
1277
|
-
def generate_method(method_name, &block)
|
1278
|
-
define_method(method_name, &block)
|
1279
|
-
method = instance_method method_name
|
1280
|
-
remove_method method_name
|
1281
|
-
method
|
1282
|
-
end
|
1283
|
-
|
1284
|
-
def compile!(verb, path, block, options = {})
|
1285
|
-
options.each_pair { |option, args| send(option, *args) }
|
1286
|
-
method_name = "#{verb} #{path}"
|
1287
|
-
unbound_method = generate_method(method_name, &block)
|
1288
|
-
pattern, keys = compile path
|
1289
|
-
conditions, @conditions = @conditions, []
|
1290
|
-
|
1291
|
-
[ pattern, keys, conditions, block.arity != 0 ?
|
1292
|
-
proc { |a,p| unbound_method.bind(a).call(*p) } :
|
1293
|
-
proc { |a,p| unbound_method.bind(a).call } ]
|
1294
|
-
end
|
1295
|
-
|
1296
|
-
def compile(path)
|
1297
|
-
keys = []
|
1298
|
-
if path.respond_to? :to_str
|
1299
|
-
pattern = path.to_str.gsub(/[^\?\%\\\/\:\*\w]/) { |c| encoded(c) }
|
1300
|
-
pattern.gsub!(/((:\w+)|\*)/) do |match|
|
1301
|
-
if match == "*"
|
1302
|
-
keys << 'splat'
|
1303
|
-
"(.*?)"
|
1304
|
-
else
|
1305
|
-
keys << $2[1..-1]
|
1306
|
-
"([^/?#]+)"
|
1307
|
-
end
|
1308
|
-
end
|
1309
|
-
[/^#{pattern}$/, keys]
|
1310
|
-
elsif path.respond_to?(:keys) && path.respond_to?(:match)
|
1311
|
-
[path, path.keys]
|
1312
|
-
elsif path.respond_to?(:names) && path.respond_to?(:match)
|
1313
|
-
[path, path.names]
|
1314
|
-
elsif path.respond_to? :match
|
1315
|
-
[path, keys]
|
1316
|
-
else
|
1317
|
-
raise TypeError, path
|
1318
|
-
end
|
1319
|
-
end
|
1320
|
-
|
1321
|
-
URI = ::URI.const_defined?(:Parser) ? ::URI::Parser.new : ::URI
|
1322
|
-
|
1323
|
-
def encoded(char)
|
1324
|
-
enc = URI.escape(char)
|
1325
|
-
enc = "(?:#{Regexp.escape enc}|#{URI.escape char, /./})" if enc == char
|
1326
|
-
enc = "(?:#{enc}|#{encoded('+')})" if char == " "
|
1327
|
-
enc
|
1328
|
-
end
|
1329
|
-
|
1330
|
-
public
|
1331
|
-
# Makes the methods defined in the block and in the Modules given
|
1332
|
-
# in `extensions` available to the handlers and templates
|
1333
|
-
def helpers(*extensions, &block)
|
1334
|
-
class_eval(&block) if block_given?
|
1335
|
-
include(*extensions) if extensions.any?
|
1336
|
-
end
|
1337
|
-
|
1338
|
-
# Register an extension. Alternatively take a block from which an
|
1339
|
-
# extension will be created and registered on the fly.
|
1340
|
-
def register(*extensions, &block)
|
1341
|
-
extensions << Module.new(&block) if block_given?
|
1342
|
-
@extensions += extensions
|
1343
|
-
extensions.each do |extension|
|
1344
|
-
extend extension
|
1345
|
-
extension.registered(self) if extension.respond_to?(:registered)
|
1346
|
-
end
|
1347
|
-
end
|
1348
|
-
|
1349
|
-
def development?; environment == :development end
|
1350
|
-
def production?; environment == :production end
|
1351
|
-
def test?; environment == :test end
|
1352
|
-
|
1353
|
-
# Set configuration options for Sinatra and/or the app.
|
1354
|
-
# Allows scoping of settings for certain environments.
|
1355
|
-
def configure(*envs, &block)
|
1356
|
-
yield self if envs.empty? || envs.include?(environment.to_sym)
|
1357
|
-
end
|
1358
|
-
|
1359
|
-
# Use the specified Rack middleware
|
1360
|
-
def use(middleware, *args, &block)
|
1361
|
-
@prototype = nil
|
1362
|
-
@middleware << [middleware, args, block]
|
1363
|
-
end
|
1364
|
-
|
1365
|
-
def quit!(server, handler_name)
|
1366
|
-
# Use Thin's hard #stop! if available, otherwise just #stop.
|
1367
|
-
server.respond_to?(:stop!) ? server.stop! : server.stop
|
1368
|
-
$stderr.puts "\n== Sinatra has ended his set (crowd applauds)" unless handler_name =~/cgi/i
|
1369
|
-
end
|
1370
|
-
|
1371
|
-
# Run the Sinatra app as a self-hosted server using
|
1372
|
-
# Thin, Mongrel or WEBrick (in that order). If given a block, will call
|
1373
|
-
# with the constructed handler once we have taken the stage.
|
1374
|
-
def run!(options={})
|
1375
|
-
set options
|
1376
|
-
handler = detect_rack_handler
|
1377
|
-
handler_name = handler.name.gsub(/.*::/, '')
|
1378
|
-
handler.run self, :Host => bind, :Port => port do |server|
|
1379
|
-
unless handler_name =~ /cgi/i
|
1380
|
-
$stderr.puts "== Sinatra/#{Sinatra::VERSION} has taken the stage " +
|
1381
|
-
"on #{port} for #{environment} with backup from #{handler_name}"
|
1382
|
-
end
|
1383
|
-
[:INT, :TERM].each { |sig| trap(sig) { quit!(server, handler_name) } }
|
1384
|
-
server.threaded = settings.threaded if server.respond_to? :threaded=
|
1385
|
-
set :running, true
|
1386
|
-
yield server if block_given?
|
1387
|
-
end
|
1388
|
-
rescue Errno::EADDRINUSE
|
1389
|
-
$stderr.puts "== Someone is already performing on port #{port}!"
|
1390
|
-
end
|
1391
|
-
|
1392
|
-
# The prototype instance used to process requests.
|
1393
|
-
def prototype
|
1394
|
-
@prototype ||= new
|
1395
|
-
end
|
1396
|
-
|
1397
|
-
# Create a new instance without middleware in front of it.
|
1398
|
-
alias new! new unless method_defined? :new!
|
1399
|
-
|
1400
|
-
# Create a new instance of the class fronted by its middleware
|
1401
|
-
# pipeline. The object is guaranteed to respond to #call but may not be
|
1402
|
-
# an instance of the class new was called on.
|
1403
|
-
def new(*args, &bk)
|
1404
|
-
build(Rack::Builder.new, *args, &bk).to_app
|
1405
|
-
end
|
1406
|
-
|
1407
|
-
# Creates a Rack::Builder instance with all the middleware set up and
|
1408
|
-
# an instance of this class as end point.
|
1409
|
-
def build(builder, *args, &bk)
|
1410
|
-
setup_default_middleware builder
|
1411
|
-
setup_middleware builder
|
1412
|
-
builder.run new!(*args, &bk)
|
1413
|
-
builder
|
1414
|
-
end
|
1415
|
-
|
1416
|
-
def call(env)
|
1417
|
-
synchronize { prototype.call(env) }
|
1418
|
-
end
|
1419
|
-
|
1420
|
-
private
|
1421
|
-
def setup_default_middleware(builder)
|
1422
|
-
builder.use ExtendedRack
|
1423
|
-
builder.use ShowExceptions if show_exceptions?
|
1424
|
-
builder.use Rack::MethodOverride if method_override?
|
1425
|
-
builder.use Rack::Head
|
1426
|
-
setup_logging builder
|
1427
|
-
setup_sessions builder
|
1428
|
-
setup_protection builder
|
1429
|
-
end
|
1430
|
-
|
1431
|
-
def setup_middleware(builder)
|
1432
|
-
middleware.each { |c,a,b| builder.use(c, *a, &b) }
|
1433
|
-
end
|
1434
|
-
|
1435
|
-
def setup_logging(builder)
|
1436
|
-
if logging?
|
1437
|
-
setup_common_logger(builder)
|
1438
|
-
setup_custom_logger(builder)
|
1439
|
-
elsif logging == false
|
1440
|
-
setup_null_logger(builder)
|
1441
|
-
end
|
1442
|
-
end
|
1443
|
-
|
1444
|
-
def setup_null_logger(builder)
|
1445
|
-
builder.use Rack::NullLogger
|
1446
|
-
end
|
1447
|
-
|
1448
|
-
def setup_common_logger(builder)
|
1449
|
-
builder.use Sinatra::CommonLogger
|
1450
|
-
end
|
1451
|
-
|
1452
|
-
def setup_custom_logger(builder)
|
1453
|
-
if logging.respond_to? :to_int
|
1454
|
-
builder.use Rack::Logger, logging
|
1455
|
-
else
|
1456
|
-
builder.use Rack::Logger
|
1457
|
-
end
|
1458
|
-
end
|
1459
|
-
|
1460
|
-
def setup_protection(builder)
|
1461
|
-
return unless protection?
|
1462
|
-
options = Hash === protection ? protection.dup : {}
|
1463
|
-
options[:except] = Array options[:except]
|
1464
|
-
options[:except] += [:session_hijacking, :remote_token] unless sessions?
|
1465
|
-
options[:reaction] ||= :drop_session
|
1466
|
-
builder.use Rack::Protection, options
|
1467
|
-
end
|
1468
|
-
|
1469
|
-
def setup_sessions(builder)
|
1470
|
-
return unless sessions?
|
1471
|
-
options = {}
|
1472
|
-
options[:secret] = session_secret if session_secret?
|
1473
|
-
options.merge! sessions.to_hash if sessions.respond_to? :to_hash
|
1474
|
-
builder.use Rack::Session::Cookie, options
|
1475
|
-
end
|
1476
|
-
|
1477
|
-
def detect_rack_handler
|
1478
|
-
servers = Array(server)
|
1479
|
-
servers.each do |server_name|
|
1480
|
-
begin
|
1481
|
-
return Rack::Handler.get(server_name.to_s)
|
1482
|
-
rescue LoadError, NameError
|
1483
|
-
end
|
1484
|
-
end
|
1485
|
-
fail "Server handler (#{servers.join(',')}) not found."
|
1486
|
-
end
|
1487
|
-
|
1488
|
-
def inherited(subclass)
|
1489
|
-
subclass.reset!
|
1490
|
-
subclass.set :app_file, caller_files.first unless subclass.app_file?
|
1491
|
-
super
|
1492
|
-
end
|
1493
|
-
|
1494
|
-
@@mutex = Mutex.new
|
1495
|
-
def synchronize(&block)
|
1496
|
-
if lock?
|
1497
|
-
@@mutex.synchronize(&block)
|
1498
|
-
else
|
1499
|
-
yield
|
1500
|
-
end
|
1501
|
-
end
|
1502
|
-
|
1503
|
-
public
|
1504
|
-
CALLERS_TO_IGNORE = [ # :nodoc:
|
1505
|
-
/\/sinatra(\/(base|main|showexceptions))?\.rb$/, # all sinatra code
|
1506
|
-
/lib\/tilt.*\.rb$/, # all tilt code
|
1507
|
-
/^\(.*\)$/, # generated code
|
1508
|
-
/rubygems\/(custom|core_ext\/kernel)_require\.rb$/, # rubygems require hacks
|
1509
|
-
/active_support/, # active_support require hacks
|
1510
|
-
/bundler(\/runtime)?\.rb/, # bundler require hacks
|
1511
|
-
/<internal:/, # internal in ruby >= 1.9.2
|
1512
|
-
/src\/kernel\/bootstrap\/[A-Z]/ # maglev kernel files
|
1513
|
-
]
|
1514
|
-
|
1515
|
-
# contrary to what the comment said previously, rubinius never supported this
|
1516
|
-
if defined?(RUBY_IGNORE_CALLERS)
|
1517
|
-
warn "RUBY_IGNORE_CALLERS is deprecated and will no longer be supported by Sinatra 2.0"
|
1518
|
-
CALLERS_TO_IGNORE.concat(RUBY_IGNORE_CALLERS)
|
1519
|
-
end
|
1520
|
-
|
1521
|
-
# Like Kernel#caller but excluding certain magic entries and without
|
1522
|
-
# line / method information; the resulting array contains filenames only.
|
1523
|
-
def caller_files
|
1524
|
-
cleaned_caller(1).flatten
|
1525
|
-
end
|
1526
|
-
|
1527
|
-
# Like caller_files, but containing Arrays rather than strings with the
|
1528
|
-
# first element being the file, and the second being the line.
|
1529
|
-
def caller_locations
|
1530
|
-
cleaned_caller 2
|
1531
|
-
end
|
1532
|
-
|
1533
|
-
private
|
1534
|
-
# used for deprecation warnings
|
1535
|
-
def warn(message)
|
1536
|
-
super message + "\n\tfrom #{cleaned_caller.first.join(':')}"
|
1537
|
-
end
|
1538
|
-
|
1539
|
-
# Like Kernel#caller but excluding certain magic entries
|
1540
|
-
def cleaned_caller(keep = 3)
|
1541
|
-
caller(1).
|
1542
|
-
map { |line| line.split(/:(?=\d|in )/, 3)[0,keep] }.
|
1543
|
-
reject { |file, *_| CALLERS_TO_IGNORE.any? { |pattern| file =~ pattern } }
|
1544
|
-
end
|
1545
|
-
end
|
1546
|
-
|
1547
|
-
# Fixes encoding issues by
|
1548
|
-
# * defaulting to UTF-8
|
1549
|
-
# * casting params to Encoding.default_external
|
1550
|
-
#
|
1551
|
-
# The latter might not be necessary if Rack handles it one day.
|
1552
|
-
# Keep an eye on Rack's LH #100.
|
1553
|
-
def force_encoding(*args) settings.force_encoding(*args) end
|
1554
|
-
if defined? Encoding
|
1555
|
-
def self.force_encoding(data, encoding = default_encoding)
|
1556
|
-
return if data == settings || data.is_a?(Tempfile)
|
1557
|
-
if data.respond_to? :force_encoding
|
1558
|
-
data.force_encoding(encoding).encode!
|
1559
|
-
elsif data.respond_to? :each_value
|
1560
|
-
data.each_value { |v| force_encoding(v, encoding) }
|
1561
|
-
elsif data.respond_to? :each
|
1562
|
-
data.each { |v| force_encoding(v, encoding) }
|
1563
|
-
end
|
1564
|
-
data
|
1565
|
-
end
|
1566
|
-
else
|
1567
|
-
def self.force_encoding(data, *) data end
|
1568
|
-
end
|
1569
|
-
|
1570
|
-
reset!
|
1571
|
-
|
1572
|
-
set :environment, (ENV['RACK_ENV'] || :development).to_sym
|
1573
|
-
set :raise_errors, Proc.new { test? }
|
1574
|
-
set :dump_errors, Proc.new { !test? }
|
1575
|
-
set :show_exceptions, Proc.new { development? }
|
1576
|
-
set :sessions, false
|
1577
|
-
set :logging, false
|
1578
|
-
set :protection, true
|
1579
|
-
set :method_override, false
|
1580
|
-
set :default_encoding, "utf-8"
|
1581
|
-
set :add_charset, %w[javascript xml xhtml+xml json].map { |t| "application/#{t}" }
|
1582
|
-
settings.add_charset << /^text\//
|
1583
|
-
|
1584
|
-
# explicitly generating a session secret eagerly to play nice with preforking
|
1585
|
-
begin
|
1586
|
-
require 'securerandom'
|
1587
|
-
set :session_secret, SecureRandom.hex(64)
|
1588
|
-
rescue LoadError, NotImplementedError
|
1589
|
-
# SecureRandom raises a NotImplementedError if no random device is available
|
1590
|
-
set :session_secret, "%064x" % Kernel.rand(2**256-1)
|
1591
|
-
end
|
1592
|
-
|
1593
|
-
class << self
|
1594
|
-
alias_method :methodoverride?, :method_override?
|
1595
|
-
alias_method :methodoverride=, :method_override=
|
1596
|
-
end
|
1597
|
-
|
1598
|
-
set :run, false # start server via at-exit hook?
|
1599
|
-
set :running, false # is the built-in server running now?
|
1600
|
-
set :server, %w[thin mongrel webrick]
|
1601
|
-
set :bind, '0.0.0.0'
|
1602
|
-
set :port, 4567
|
1603
|
-
|
1604
|
-
set :absolute_redirects, true
|
1605
|
-
set :prefixed_redirects, false
|
1606
|
-
set :empty_path_info, nil
|
1607
|
-
|
1608
|
-
set :app_file, nil
|
1609
|
-
set :root, Proc.new { app_file && File.expand_path(File.dirname(app_file)) }
|
1610
|
-
set :views, Proc.new { root && File.join(root, 'views') }
|
1611
|
-
set :reload_templates, Proc.new { development? }
|
1612
|
-
set :lock, false
|
1613
|
-
set :threaded, true
|
1614
|
-
|
1615
|
-
set :public_folder, Proc.new { root && File.join(root, 'public') }
|
1616
|
-
set :static, Proc.new { public_folder && File.exist?(public_folder) }
|
1617
|
-
set :static_cache_control, false
|
1618
|
-
|
1619
|
-
error ::Exception do
|
1620
|
-
response.status = 500
|
1621
|
-
content_type 'text/html'
|
1622
|
-
'<h1>Internal Server Error</h1>'
|
1623
|
-
end
|
1624
|
-
|
1625
|
-
configure :development do
|
1626
|
-
get '/__sinatra__/:image.png' do
|
1627
|
-
filename = File.dirname(__FILE__) + "/images/#{params[:image]}.png"
|
1628
|
-
content_type :png
|
1629
|
-
send_file filename
|
1630
|
-
end
|
1631
|
-
|
1632
|
-
error NotFound do
|
1633
|
-
content_type 'text/html'
|
1634
|
-
|
1635
|
-
(<<-HTML).gsub(/^ {8}/, '')
|
1636
|
-
<!DOCTYPE html>
|
1637
|
-
<html>
|
1638
|
-
<head>
|
1639
|
-
<style type="text/css">
|
1640
|
-
body { text-align:center;font-family:helvetica,arial;font-size:22px;
|
1641
|
-
color:#888;margin:20px}
|
1642
|
-
#c {margin:0 auto;width:500px;text-align:left}
|
1643
|
-
</style>
|
1644
|
-
</head>
|
1645
|
-
<body>
|
1646
|
-
<h2>Sinatra doesn’t know this ditty.</h2>
|
1647
|
-
<img src='#{uri "/__sinatra__/404.png"}'>
|
1648
|
-
<div id="c">
|
1649
|
-
Try this:
|
1650
|
-
<pre>#{request.request_method.downcase} '#{request.path_info}' do\n "Hello World"\nend</pre>
|
1651
|
-
</div>
|
1652
|
-
</body>
|
1653
|
-
</html>
|
1654
|
-
HTML
|
1655
|
-
end
|
1656
|
-
end
|
1657
|
-
end
|
1658
|
-
|
1659
|
-
# Execution context for classic style (top-level) applications. All
|
1660
|
-
# DSL methods executed on main are delegated to this class.
|
1661
|
-
#
|
1662
|
-
# The Application class should not be subclassed, unless you want to
|
1663
|
-
# inherit all settings, routes, handlers, and error pages from the
|
1664
|
-
# top-level. Subclassing Sinatra::Base is highly recommended for
|
1665
|
-
# modular applications.
|
1666
|
-
class Application < Base
|
1667
|
-
set :logging, Proc.new { ! test? }
|
1668
|
-
set :method_override, true
|
1669
|
-
set :run, Proc.new { ! test? }
|
1670
|
-
set :session_secret, Proc.new { super() unless development? }
|
1671
|
-
set :app_file, nil
|
1672
|
-
|
1673
|
-
def self.register(*extensions, &block) #:nodoc:
|
1674
|
-
added_methods = extensions.map {|m| m.public_instance_methods }.flatten
|
1675
|
-
Delegator.delegate(*added_methods)
|
1676
|
-
super(*extensions, &block)
|
1677
|
-
end
|
1678
|
-
end
|
1679
|
-
|
1680
|
-
# Sinatra delegation mixin. Mixing this module into an object causes all
|
1681
|
-
# methods to be delegated to the Sinatra::Application class. Used primarily
|
1682
|
-
# at the top-level.
|
1683
|
-
module Delegator #:nodoc:
|
1684
|
-
def self.delegate(*methods)
|
1685
|
-
methods.each do |method_name|
|
1686
|
-
define_method(method_name) do |*args, &block|
|
1687
|
-
return super(*args, &block) if respond_to? method_name
|
1688
|
-
Delegator.target.send(method_name, *args, &block)
|
1689
|
-
end
|
1690
|
-
private method_name
|
1691
|
-
end
|
1692
|
-
end
|
1693
|
-
|
1694
|
-
delegate :get, :patch, :put, :post, :delete, :head, :options, :template, :layout,
|
1695
|
-
:before, :after, :error, :not_found, :configure, :set, :mime_type,
|
1696
|
-
:enable, :disable, :use, :development?, :test?, :production?,
|
1697
|
-
:helpers, :settings
|
1698
|
-
|
1699
|
-
class << self
|
1700
|
-
attr_accessor :target
|
1701
|
-
end
|
1702
|
-
|
1703
|
-
self.target = Application
|
1704
|
-
end
|
1705
|
-
|
1706
|
-
# Create a new Sinatra application. The block is evaluated in the new app's
|
1707
|
-
# class scope.
|
1708
|
-
def self.new(base=Base, options={}, &block)
|
1709
|
-
base = Class.new(base)
|
1710
|
-
base.class_eval(&block) if block_given?
|
1711
|
-
base
|
1712
|
-
end
|
1713
|
-
|
1714
|
-
# Extend the top-level DSL with the modules provided.
|
1715
|
-
def self.register(*extensions, &block)
|
1716
|
-
Delegator.target.register(*extensions, &block)
|
1717
|
-
end
|
1718
|
-
|
1719
|
-
# Include the helper modules provided in Sinatra's request context.
|
1720
|
-
def self.helpers(*extensions, &block)
|
1721
|
-
Delegator.target.helpers(*extensions, &block)
|
1722
|
-
end
|
1723
|
-
|
1724
|
-
# Use the middleware for classic applications.
|
1725
|
-
def self.use(*args, &block)
|
1726
|
-
Delegator.target.use(*args, &block)
|
1727
|
-
end
|
1728
|
-
end
|