rackamole 0.2.5 → 0.2.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (82) hide show
  1. data/HISTORY +12 -1
  2. data/README.rdoc +35 -35
  3. data/lib/rackamole.rb +1 -1
  4. data/lib/rackamole/alert/twitt.rb +5 -4
  5. data/lib/rackamole/mole.rb +40 -18
  6. data/lib/rackamole/store/mongo_db.rb +5 -3
  7. data/spec/rackamole/alert/twitt_spec.rb +3 -3
  8. data/spec/rackamole/mole_spec.rb +52 -5
  9. data/spec/rackamole/store/mongo_db_spec.rb +4 -4
  10. data/tasks/setup.rb +1 -1
  11. data/tasks/test.rake +1 -0
  12. metadata +3 -85
  13. data/a.rb +0 -18
  14. data/aaa.txt +0 -52
  15. data/images/mole_logo.png +0 -0
  16. data/images/mole_logo.psd +0 -0
  17. data/images/mole_logo_small.png +0 -0
  18. data/images/mole_logo_small.psd +0 -0
  19. data/samples/rails/moled/README +0 -243
  20. data/samples/rails/moled/Rakefile +0 -10
  21. data/samples/rails/moled/app/controllers/application_controller.rb +0 -21
  22. data/samples/rails/moled/app/controllers/fred_controller.rb +0 -14
  23. data/samples/rails/moled/app/helpers/application_helper.rb +0 -3
  24. data/samples/rails/moled/app/views/fred/index.html.erb +0 -1
  25. data/samples/rails/moled/app/views/fred/show.html.erb +0 -1
  26. data/samples/rails/moled/config/boot.rb +0 -110
  27. data/samples/rails/moled/config/database.yml +0 -22
  28. data/samples/rails/moled/config/environment.rb +0 -52
  29. data/samples/rails/moled/config/environments/development.rb +0 -17
  30. data/samples/rails/moled/config/environments/production.rb +0 -28
  31. data/samples/rails/moled/config/environments/test.rb +0 -28
  32. data/samples/rails/moled/config/initializers/backtrace_silencers.rb +0 -7
  33. data/samples/rails/moled/config/initializers/inflections.rb +0 -10
  34. data/samples/rails/moled/config/initializers/mime_types.rb +0 -5
  35. data/samples/rails/moled/config/initializers/new_rails_defaults.rb +0 -19
  36. data/samples/rails/moled/config/initializers/session_store.rb +0 -15
  37. data/samples/rails/moled/config/locales/en.yml +0 -5
  38. data/samples/rails/moled/config/routes.rb +0 -6
  39. data/samples/rails/moled/db/development.sqlite3 +0 -0
  40. data/samples/rails/moled/db/production.sqlite3 +0 -0
  41. data/samples/rails/moled/doc/README_FOR_APP +0 -2
  42. data/samples/rails/moled/log/development.log +0 -100
  43. data/samples/rails/moled/log/production.log +0 -46
  44. data/samples/rails/moled/log/server.log +0 -0
  45. data/samples/rails/moled/log/test.log +0 -0
  46. data/samples/rails/moled/public/404.html +0 -30
  47. data/samples/rails/moled/public/422.html +0 -30
  48. data/samples/rails/moled/public/500.html +0 -30
  49. data/samples/rails/moled/public/favicon.ico +0 -0
  50. data/samples/rails/moled/public/images/rails.png +0 -0
  51. data/samples/rails/moled/public/index.html +0 -275
  52. data/samples/rails/moled/public/javascripts/application.js +0 -2
  53. data/samples/rails/moled/public/javascripts/controls.js +0 -963
  54. data/samples/rails/moled/public/javascripts/dragdrop.js +0 -973
  55. data/samples/rails/moled/public/javascripts/effects.js +0 -1128
  56. data/samples/rails/moled/public/javascripts/prototype.js +0 -4320
  57. data/samples/rails/moled/public/robots.txt +0 -5
  58. data/samples/rails/moled/script/about +0 -4
  59. data/samples/rails/moled/script/console +0 -3
  60. data/samples/rails/moled/script/dbconsole +0 -3
  61. data/samples/rails/moled/script/destroy +0 -3
  62. data/samples/rails/moled/script/generate +0 -3
  63. data/samples/rails/moled/script/performance/benchmarker +0 -3
  64. data/samples/rails/moled/script/performance/profiler +0 -3
  65. data/samples/rails/moled/script/plugin +0 -3
  66. data/samples/rails/moled/script/runner +0 -3
  67. data/samples/rails/moled/script/server +0 -3
  68. data/samples/rails/moled/test/performance/browsing_test.rb +0 -9
  69. data/samples/rails/moled/test/test_helper.rb +0 -38
  70. data/samples/sinatra/moled.rb +0 -63
  71. data/samples/sinatra/public/.DS_Store +0 -0
  72. data/samples/sinatra/public/images/mole_logo.png +0 -0
  73. data/samples/sinatra/public/stylesheets/styles.css +0 -58
  74. data/samples/sinatra/views/index.erb +0 -14
  75. data/samples/sinatra/views/layout.erb +0 -23
  76. data/samples/sinatra/views/normal.erb +0 -1
  77. data/samples/sinatra/views/params.erb +0 -1
  78. data/samples/sinatra/views/post.erb +0 -1
  79. data/samples/sinatra/views/slow.erb +0 -1
  80. data/z_experiments/config.rb +0 -38
  81. data/z_experiments/config_sample.rb +0 -9
  82. data/z_experiments/configuration.rb +0 -5
@@ -1,5 +0,0 @@
1
- # See http://www.robotstxt.org/wc/norobots.html for documentation on how to use the robots.txt file
2
- #
3
- # To ban all spiders from the entire site uncomment the next two lines:
4
- # User-Agent: *
5
- # Disallow: /
@@ -1,4 +0,0 @@
1
- #!/usr/bin/env ruby
2
- require File.dirname(__FILE__) + '/../config/boot'
3
- $LOAD_PATH.unshift "#{RAILTIES_PATH}/builtin/rails_info"
4
- require 'commands/about'
@@ -1,3 +0,0 @@
1
- #!/usr/bin/env ruby
2
- require File.dirname(__FILE__) + '/../config/boot'
3
- require 'commands/console'
@@ -1,3 +0,0 @@
1
- #!/usr/bin/env ruby
2
- require File.dirname(__FILE__) + '/../config/boot'
3
- require 'commands/dbconsole'
@@ -1,3 +0,0 @@
1
- #!/usr/bin/env ruby
2
- require File.dirname(__FILE__) + '/../config/boot'
3
- require 'commands/destroy'
@@ -1,3 +0,0 @@
1
- #!/usr/bin/env ruby
2
- require File.dirname(__FILE__) + '/../config/boot'
3
- require 'commands/generate'
@@ -1,3 +0,0 @@
1
- #!/usr/bin/env ruby
2
- require File.dirname(__FILE__) + '/../../config/boot'
3
- require 'commands/performance/benchmarker'
@@ -1,3 +0,0 @@
1
- #!/usr/bin/env ruby
2
- require File.dirname(__FILE__) + '/../../config/boot'
3
- require 'commands/performance/profiler'
@@ -1,3 +0,0 @@
1
- #!/usr/bin/env ruby
2
- require File.dirname(__FILE__) + '/../config/boot'
3
- require 'commands/plugin'
@@ -1,3 +0,0 @@
1
- #!/usr/bin/env ruby
2
- require File.dirname(__FILE__) + '/../config/boot'
3
- require 'commands/runner'
@@ -1,3 +0,0 @@
1
- #!/usr/bin/env ruby
2
- require File.dirname(__FILE__) + '/../config/boot'
3
- require 'commands/server'
@@ -1,9 +0,0 @@
1
- require 'test_helper'
2
- require 'performance_test_help'
3
-
4
- # Profiling results for each test method are written to tmp/performance.
5
- class BrowsingTest < ActionController::PerformanceTest
6
- def test_homepage
7
- get '/'
8
- end
9
- end
@@ -1,38 +0,0 @@
1
- ENV["RAILS_ENV"] = "test"
2
- require File.expand_path(File.dirname(__FILE__) + "/../config/environment")
3
- require 'test_help'
4
-
5
- class ActiveSupport::TestCase
6
- # Transactional fixtures accelerate your tests by wrapping each test method
7
- # in a transaction that's rolled back on completion. This ensures that the
8
- # test database remains unchanged so your fixtures don't have to be reloaded
9
- # between every test method. Fewer database queries means faster tests.
10
- #
11
- # Read Mike Clark's excellent walkthrough at
12
- # http://clarkware.com/cgi/blosxom/2005/10/24#Rails10FastTesting
13
- #
14
- # Every Active Record database supports transactions except MyISAM tables
15
- # in MySQL. Turn off transactional fixtures in this case; however, if you
16
- # don't care one way or the other, switching from MyISAM to InnoDB tables
17
- # is recommended.
18
- #
19
- # The only drawback to using transactional fixtures is when you actually
20
- # need to test transactions. Since your test is bracketed by a transaction,
21
- # any transactions started in your code will be automatically rolled back.
22
- self.use_transactional_fixtures = true
23
-
24
- # Instantiated fixtures are slow, but give you @david where otherwise you
25
- # would need people(:david). If you don't want to migrate your existing
26
- # test cases which use the @david style and don't mind the speed hit (each
27
- # instantiated fixtures translates to a database query per test method),
28
- # then set this back to true.
29
- self.use_instantiated_fixtures = false
30
-
31
- # Setup all fixtures in test/fixtures/*.(yml|csv) for all tests in alphabetical order.
32
- #
33
- # Note: You'll currently still have to declare fixtures explicitly in integration tests
34
- # -- they do not yet inherit this setting
35
- fixtures :all
36
-
37
- # Add more helper methods to be used by all tests here...
38
- end
@@ -1,63 +0,0 @@
1
- require 'rubygems'
2
- require 'sinatra'
3
- require 'rackamole'
4
-
5
-
6
- configure do
7
- set :sessions, true
8
-
9
- puts "mole_sinatra_#{Sinatra::Application.environment}_mdb"
10
-
11
- use Rack::Lint
12
- use Rack::Session::Cookie
13
- use Rack::Mole, {
14
- :app_name => "Franky",
15
- :environment => Sinatra::Application.environment,
16
- :log_level => :debug,
17
- :user_key => :user_name,
18
- :store => Rackamole::Store::MongoDb.new(
19
- :host => 'ec2-174-129-88-130.compute-1.amazonaws.com',
20
- :database => "mole_franky_#{Sinatra::Application.environment}_mdb" ),
21
- # :store => Rackamole::Store::MongoDb.new( :database => "mole_franky_#{Sinatra::Application.environment}_mdb" ),
22
- :expiration => 10,
23
- :perf_threshold => 0.2,
24
- # :twitter => { :username => 'moled', :password => 'fernand~1', :alert_on => [Rackamole.perf, Rackamole.fault] },
25
- :excluded_paths => [ /.+?\.css/, /.+?\.js/, /.+?\.png/, /.+?\.ico/ ]
26
- }
27
- end
28
-
29
- before do
30
- session[:user_name] = "Fernand"
31
- end
32
-
33
- get '/' do
34
- erb :index
35
- end
36
-
37
- get '/normal' do
38
- @blee = "Hello World!"
39
- session[:normal] = "something normal"
40
- erb :normal
41
- end
42
-
43
- post '/post' do
44
- @post = params[:blee]
45
- session[:post] = "something posted"
46
- erb :post
47
- end
48
-
49
- get '/params/:id' do
50
- @blee = params[:id]
51
- session[:param] = "something param"
52
-
53
- erb :params
54
- end
55
-
56
- get '/error' do
57
- raise "Oh Snap!"
58
- end
59
-
60
- get '/slow' do
61
- sleep 0.2
62
- erb :slow
63
- end
Binary file
@@ -1,58 +0,0 @@
1
- * {
2
- outline-color: invert;
3
- outline-style: none;
4
- outline-width: medium;
5
- margin: 0px;
6
- padding: 0px;
7
- }
8
-
9
- body {
10
- font-family: "Trebuchet","Lucida Grande","Lucida Sans Unicode","bitstream vera sans","trebuchet ms","verdana";
11
- background: #f4f4f4 repeat-x top left;
12
- color: #ffffff;
13
- font-size: 2em;
14
- font-size-adjust: none;
15
- font-stretch: normal;
16
- font-style: normal;
17
- font-variant: normal;
18
- font-weight: normal;
19
- margin: 0;
20
- }
21
-
22
- #overall {
23
- margin: 0px auto;
24
- width: 1000px;
25
- overflow: none;
26
- margin-top: 30px;
27
- }
28
-
29
- #logo {
30
- float:left;
31
- width:45%;
32
- margin-bottom:10px;
33
- }
34
-
35
- #main {
36
- clear: left;
37
- margin: 20px 10px 10px 20px;
38
- overflow: none;
39
- }
40
-
41
- h1 {
42
- font-size: 2.2em;
43
- color: #434343;
44
- }
45
-
46
- a {
47
- color: #cccccc;
48
- text-decoration: none;
49
- }
50
-
51
- a:hover {
52
- text_decoration: underline;
53
- }
54
-
55
- input {
56
- font-size: 1em;
57
- color: #cccccc;
58
- }
@@ -1,14 +0,0 @@
1
- <h1>Mole sampler</h1>
2
-
3
- <ul>
4
- <li><a href="/normal">Plain ol' get</a></li>
5
- <li><a href="/params/10">Get with params</a></li>
6
- <li><a href="/error">Uncaught fault</a></li>
7
- <li><a href="/slow">Slow request</a></li>
8
- <li>
9
- <form action="/post" method="post" >
10
- <input type="text" name="blee"/>
11
- <input type="submit" value="push me"/>
12
- </form>
13
- </li>
14
- </ul>
@@ -1,23 +0,0 @@
1
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
3
- <head>
4
- <title>R A C K A M O L E - Sampler</title>
5
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
6
- <link rel="icon" href="/favicon.ico" type="image/x-icon"/>
7
- <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon"/>
8
- <link rel="stylesheet" href="/stylesheets/styles.css" type="text/css" media="screen" />
9
- </head>
10
-
11
- <body id="body">
12
- <div id="overall">
13
- <div id="logo">
14
- <a href="/">
15
- <img src='/images/mole_logo.png' style="border:none"/>
16
- </a>
17
- </div>
18
- <div id="main">
19
- <%= yield %>
20
- </div>
21
- </div>
22
- </body>
23
- </html>
@@ -1 +0,0 @@
1
- <h1>Normal -- <%=@blee%></h1>
@@ -1 +0,0 @@
1
- <h1>Params -- <%=@post%></h1>
@@ -1 +0,0 @@
1
- <h1>Posted - <%=@post%></h1>
@@ -1 +0,0 @@
1
- <h1>I am the slow one</h1>
@@ -1,38 +0,0 @@
1
- require 'rubygems'
2
- require 'yaml'
3
- require 'pp'
4
-
5
- class Fred
6
- def method_missing( *args )
7
- puts "Method missing -- #{args.inspect}"
8
- self
9
- end
10
- end
11
-
12
- Fred.new.blee( "a" ).duh( 10 )
13
-
14
-
15
- class Blee
16
- def initialize
17
- @list = []
18
- end
19
-
20
- def method_missing( *args )
21
- @list << args
22
- self
23
- end
24
- end
25
-
26
- blee = Blee.new
27
-
28
- blee.instance_eval do
29
- hello.world
30
- end
31
-
32
- puts blee.to_yaml
33
-
34
- Fred do
35
- fred "hello"
36
- blee 10
37
- end
38
-
@@ -1,9 +0,0 @@
1
- require 'rubygems'
2
- require File.join( File.dirname(__FILE__), %w[.. lib rackamole] )
3
-
4
- include Rackamole::Config
5
-
6
- twitter do
7
- username 'duh'
8
- password 'fred'
9
- end
@@ -1,5 +0,0 @@
1
- module Rackamole::Config
2
- def twitter( &block )
3
- puts "Twitt options"
4
- end
5
- end