rack-allocation_stats 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (97) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.markdown +7 -0
  3. data/LICENSE +195 -0
  4. data/README.markdown +114 -0
  5. data/TODO.markdown +31 -0
  6. data/lib/rack/allocation_stats/help.txt +19 -0
  7. data/lib/rack/allocation_stats/interactive/allocations.js.erb +24 -0
  8. data/lib/rack/allocation_stats/interactive/index.html.erb +109 -0
  9. data/lib/rack/allocation_stats/interactive/interactive.js +274 -0
  10. data/lib/rack/allocation_stats/interactive/jquery-2.0.3.min.js +6 -0
  11. data/lib/rack/allocation_stats/interactive/jquery-ui-1.10.3.custom.min.css +6 -0
  12. data/lib/rack/allocation_stats/interactive/jquery-ui-1.10.3.custom.min.js +6 -0
  13. data/lib/rack/allocation_stats/interactive/sizzle.min.js +5 -0
  14. data/lib/rack/allocation_stats/interactive/style.css +104 -0
  15. data/lib/rack/allocation_stats/interactive/style.scss +147 -0
  16. data/lib/rack/allocation_stats/interactive/underscore-min.js +6 -0
  17. data/spec/hello_world.ru +8 -0
  18. data/spec/javascripts/css/docco.css +186 -0
  19. data/spec/javascripts/css/jasmine_docco-1.3.1.css +363 -0
  20. data/spec/javascripts/interactive_spec.html +220 -0
  21. data/spec/javascripts/interactive_spec.html.mustache +78 -0
  22. data/spec/javascripts/interactive_spec.js +110 -0
  23. data/spec/javascripts/js/jasmine-html.js +681 -0
  24. data/spec/javascripts/js/jasmine.css +82 -0
  25. data/spec/javascripts/js/jasmine.js +2600 -0
  26. data/spec/sinatra.ru +8 -0
  27. data/spec/sinatra_templates.ru +8 -0
  28. data/spec/sinatra_templates_app.rb +1 -1
  29. data/spec/yajl.ru +8 -0
  30. data/spec/yaml.ru +8 -0
  31. metadata +58 -97
  32. data/demo_rack_apps/Rails_3.2.15/app/controllers/application_controller.rb +0 -3
  33. data/demo_rack_apps/Rails_3.2.15/app/controllers/projects_controller.rb +0 -83
  34. data/demo_rack_apps/Rails_3.2.15/app/controllers/tasks_controller.rb +0 -83
  35. data/demo_rack_apps/Rails_3.2.15/app/helpers/application_helper.rb +0 -2
  36. data/demo_rack_apps/Rails_3.2.15/app/helpers/projects_helper.rb +0 -2
  37. data/demo_rack_apps/Rails_3.2.15/app/helpers/tasks_helper.rb +0 -2
  38. data/demo_rack_apps/Rails_3.2.15/app/models/project.rb +0 -4
  39. data/demo_rack_apps/Rails_3.2.15/app/models/task.rb +0 -4
  40. data/demo_rack_apps/Rails_3.2.15/config/application.rb +0 -63
  41. data/demo_rack_apps/Rails_3.2.15/config/boot.rb +0 -6
  42. data/demo_rack_apps/Rails_3.2.15/config/environment.rb +0 -5
  43. data/demo_rack_apps/Rails_3.2.15/config/environments/development.rb +0 -37
  44. data/demo_rack_apps/Rails_3.2.15/config/environments/production.rb +0 -67
  45. data/demo_rack_apps/Rails_3.2.15/config/environments/test.rb +0 -37
  46. data/demo_rack_apps/Rails_3.2.15/config/initializers/backtrace_silencers.rb +0 -7
  47. data/demo_rack_apps/Rails_3.2.15/config/initializers/inflections.rb +0 -15
  48. data/demo_rack_apps/Rails_3.2.15/config/initializers/mime_types.rb +0 -5
  49. data/demo_rack_apps/Rails_3.2.15/config/initializers/secret_token.rb +0 -7
  50. data/demo_rack_apps/Rails_3.2.15/config/initializers/session_store.rb +0 -8
  51. data/demo_rack_apps/Rails_3.2.15/config/initializers/wrap_parameters.rb +0 -14
  52. data/demo_rack_apps/Rails_3.2.15/config/routes.rb +0 -64
  53. data/demo_rack_apps/Rails_3.2.15/db/migrate/20131104031828_create_projects.rb +0 -11
  54. data/demo_rack_apps/Rails_3.2.15/db/migrate/20131104031829_create_tasks.rb +0 -11
  55. data/demo_rack_apps/Rails_3.2.15/db/schema.rb +0 -32
  56. data/demo_rack_apps/Rails_3.2.15/db/seeds.rb +0 -15
  57. data/demo_rack_apps/Rails_3.2.15/test/functional/projects_controller_test.rb +0 -49
  58. data/demo_rack_apps/Rails_3.2.15/test/functional/tasks_controller_test.rb +0 -49
  59. data/demo_rack_apps/Rails_3.2.15/test/performance/browsing_test.rb +0 -12
  60. data/demo_rack_apps/Rails_3.2.15/test/test_helper.rb +0 -13
  61. data/demo_rack_apps/Rails_3.2.15/test/unit/helpers/projects_helper_test.rb +0 -4
  62. data/demo_rack_apps/Rails_3.2.15/test/unit/helpers/tasks_helper_test.rb +0 -4
  63. data/demo_rack_apps/Rails_3.2.15/test/unit/project_test.rb +0 -7
  64. data/demo_rack_apps/Rails_3.2.15/test/unit/task_test.rb +0 -7
  65. data/demo_rack_apps/Rails_4.0.1/app/controllers/application_controller.rb +0 -5
  66. data/demo_rack_apps/Rails_4.0.1/app/controllers/projects_controller.rb +0 -74
  67. data/demo_rack_apps/Rails_4.0.1/app/controllers/tasks_controller.rb +0 -74
  68. data/demo_rack_apps/Rails_4.0.1/app/helpers/application_helper.rb +0 -2
  69. data/demo_rack_apps/Rails_4.0.1/app/helpers/projects_helper.rb +0 -2
  70. data/demo_rack_apps/Rails_4.0.1/app/helpers/tasks_helper.rb +0 -2
  71. data/demo_rack_apps/Rails_4.0.1/app/models/project.rb +0 -3
  72. data/demo_rack_apps/Rails_4.0.1/app/models/task.rb +0 -3
  73. data/demo_rack_apps/Rails_4.0.1/config/application.rb +0 -24
  74. data/demo_rack_apps/Rails_4.0.1/config/boot.rb +0 -4
  75. data/demo_rack_apps/Rails_4.0.1/config/environment.rb +0 -5
  76. data/demo_rack_apps/Rails_4.0.1/config/environments/development.rb +0 -29
  77. data/demo_rack_apps/Rails_4.0.1/config/environments/production.rb +0 -80
  78. data/demo_rack_apps/Rails_4.0.1/config/environments/test.rb +0 -36
  79. data/demo_rack_apps/Rails_4.0.1/config/initializers/backtrace_silencers.rb +0 -7
  80. data/demo_rack_apps/Rails_4.0.1/config/initializers/filter_parameter_logging.rb +0 -4
  81. data/demo_rack_apps/Rails_4.0.1/config/initializers/inflections.rb +0 -16
  82. data/demo_rack_apps/Rails_4.0.1/config/initializers/mime_types.rb +0 -5
  83. data/demo_rack_apps/Rails_4.0.1/config/initializers/secret_token.rb +0 -12
  84. data/demo_rack_apps/Rails_4.0.1/config/initializers/session_store.rb +0 -3
  85. data/demo_rack_apps/Rails_4.0.1/config/initializers/wrap_parameters.rb +0 -14
  86. data/demo_rack_apps/Rails_4.0.1/config/routes.rb +0 -60
  87. data/demo_rack_apps/Rails_4.0.1/db/migrate/20131102201320_create_projects.rb +0 -11
  88. data/demo_rack_apps/Rails_4.0.1/db/migrate/20131102201321_create_tasks.rb +0 -11
  89. data/demo_rack_apps/Rails_4.0.1/db/schema.rb +0 -32
  90. data/demo_rack_apps/Rails_4.0.1/db/seeds.rb +0 -15
  91. data/demo_rack_apps/Rails_4.0.1/test/controllers/projects_controller_test.rb +0 -49
  92. data/demo_rack_apps/Rails_4.0.1/test/controllers/tasks_controller_test.rb +0 -49
  93. data/demo_rack_apps/Rails_4.0.1/test/helpers/projects_helper_test.rb +0 -4
  94. data/demo_rack_apps/Rails_4.0.1/test/helpers/tasks_helper_test.rb +0 -4
  95. data/demo_rack_apps/Rails_4.0.1/test/models/project_test.rb +0 -7
  96. data/demo_rack_apps/Rails_4.0.1/test/models/task_test.rb +0 -7
  97. data/demo_rack_apps/Rails_4.0.1/test/test_helper.rb +0 -15
@@ -1,7 +0,0 @@
1
- # Be sure to restart your server when you modify this file.
2
-
3
- # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
4
- # Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
5
-
6
- # You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
7
- # Rails.backtrace_cleaner.remove_silencers!
@@ -1,4 +0,0 @@
1
- # Be sure to restart your server when you modify this file.
2
-
3
- # Configure sensitive parameters which will be filtered from the log file.
4
- Rails.application.config.filter_parameters += [:password]
@@ -1,16 +0,0 @@
1
- # Be sure to restart your server when you modify this file.
2
-
3
- # Add new inflection rules using the following format. Inflections
4
- # are locale specific, and you may define rules for as many different
5
- # locales as you wish. All of these examples are active by default:
6
- # ActiveSupport::Inflector.inflections(:en) do |inflect|
7
- # inflect.plural /^(ox)$/i, '\1en'
8
- # inflect.singular /^(ox)en/i, '\1'
9
- # inflect.irregular 'person', 'people'
10
- # inflect.uncountable %w( fish sheep )
11
- # end
12
-
13
- # These inflection rules are supported but not enabled by default:
14
- # ActiveSupport::Inflector.inflections(:en) do |inflect|
15
- # inflect.acronym 'RESTful'
16
- # end
@@ -1,5 +0,0 @@
1
- # Be sure to restart your server when you modify this file.
2
-
3
- # Add new mime types for use in respond_to blocks:
4
- # Mime::Type.register "text/richtext", :rtf
5
- # Mime::Type.register_alias "text/html", :iphone
@@ -1,12 +0,0 @@
1
- # Be sure to restart your server when you modify this file.
2
-
3
- # Your secret key is used for verifying the integrity of signed cookies.
4
- # If you change this key, all old signed cookies will become invalid!
5
-
6
- # Make sure the secret is at least 30 characters and all random,
7
- # no regular words or you'll be exposed to dictionary attacks.
8
- # You can use `rake secret` to generate a secure secret key.
9
-
10
- # Make sure your secret_key_base is kept private
11
- # if you're sharing your code publicly.
12
- Rails401::Application.config.secret_key_base = '8b38d38fe94d2f57c154f9d8afe6345709ccece113ae707aba786b9ea2905d42952c378fbe9f77d6a66a54689de83c0df07c8b665ce077c1f13160f2c69a6c0e'
@@ -1,3 +0,0 @@
1
- # Be sure to restart your server when you modify this file.
2
-
3
- Rails401::Application.config.session_store :cookie_store, key: '_Rails_4_0_1_session'
@@ -1,14 +0,0 @@
1
- # Be sure to restart your server when you modify this file.
2
-
3
- # This file contains settings for ActionController::ParamsWrapper which
4
- # is enabled by default.
5
-
6
- # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
7
- ActiveSupport.on_load(:action_controller) do
8
- wrap_parameters format: [:json] if respond_to?(:wrap_parameters)
9
- end
10
-
11
- # To enable root element in JSON for ActiveRecord objects.
12
- # ActiveSupport.on_load(:active_record) do
13
- # self.include_root_in_json = true
14
- # end
@@ -1,60 +0,0 @@
1
- Rails401::Application.routes.draw do
2
- resources :tasks
3
-
4
- resources :projects
5
-
6
- # The priority is based upon order of creation: first created -> highest priority.
7
- # See how all your routes lay out with "rake routes".
8
-
9
- # You can have the root of your site routed with "root"
10
- # root 'welcome#index'
11
-
12
- # Example of regular route:
13
- # get 'products/:id' => 'catalog#view'
14
-
15
- # Example of named route that can be invoked with purchase_url(id: product.id)
16
- # get 'products/:id/purchase' => 'catalog#purchase', as: :purchase
17
-
18
- # Example resource route (maps HTTP verbs to controller actions automatically):
19
- # resources :products
20
-
21
- # Example resource route with options:
22
- # resources :products do
23
- # member do
24
- # get 'short'
25
- # post 'toggle'
26
- # end
27
- #
28
- # collection do
29
- # get 'sold'
30
- # end
31
- # end
32
-
33
- # Example resource route with sub-resources:
34
- # resources :products do
35
- # resources :comments, :sales
36
- # resource :seller
37
- # end
38
-
39
- # Example resource route with more complex sub-resources:
40
- # resources :products do
41
- # resources :comments
42
- # resources :sales do
43
- # get 'recent', on: :collection
44
- # end
45
- # end
46
-
47
- # Example resource route with concerns:
48
- # concern :toggleable do
49
- # post 'toggle'
50
- # end
51
- # resources :posts, concerns: :toggleable
52
- # resources :photos, concerns: :toggleable
53
-
54
- # Example resource route within a namespace:
55
- # namespace :admin do
56
- # # Directs /admin/products/* to Admin::ProductsController
57
- # # (app/controllers/admin/products_controller.rb)
58
- # resources :products
59
- # end
60
- end
@@ -1,11 +0,0 @@
1
- class CreateProjects < ActiveRecord::Migration
2
- def change
3
- create_table :projects do |t|
4
- t.string :name
5
- t.integer :priority
6
- t.text :description
7
-
8
- t.timestamps
9
- end
10
- end
11
- end
@@ -1,11 +0,0 @@
1
- class CreateTasks < ActiveRecord::Migration
2
- def change
3
- create_table :tasks do |t|
4
- t.string :name
5
- t.text :description
6
- t.integer :project_id
7
-
8
- t.timestamps
9
- end
10
- end
11
- end
@@ -1,32 +0,0 @@
1
- # encoding: UTF-8
2
- # This file is auto-generated from the current state of the database. Instead
3
- # of editing this file, please use the migrations feature of Active Record to
4
- # incrementally modify your database, and then regenerate this schema definition.
5
- #
6
- # Note that this schema.rb definition is the authoritative source for your
7
- # database schema. If you need to create the application database on another
8
- # system, you should be using db:schema:load, not running all the migrations
9
- # from scratch. The latter is a flawed and unsustainable approach (the more migrations
10
- # you'll amass, the slower it'll run and the greater likelihood for issues).
11
- #
12
- # It's strongly recommended that you check this file into your version control system.
13
-
14
- ActiveRecord::Schema.define(version: 20131102201321) do
15
-
16
- create_table "projects", force: true do |t|
17
- t.string "name"
18
- t.integer "priority"
19
- t.text "description"
20
- t.datetime "created_at"
21
- t.datetime "updated_at"
22
- end
23
-
24
- create_table "tasks", force: true do |t|
25
- t.string "name"
26
- t.text "description"
27
- t.integer "project_id"
28
- t.datetime "created_at"
29
- t.datetime "updated_at"
30
- end
31
-
32
- end
@@ -1,15 +0,0 @@
1
- 10.times do |i|
2
- project = Project.create(
3
- name: "Project #{i}",
4
- priority: i**2,
5
- description: "Project #{i} has a long description." * 8
6
- )
7
-
8
- 4.times do |j|
9
- Task.create(
10
- name: "Task #{j+1}",
11
- project_id: project.id,
12
- description: "Task #{j+1} in Project #{i} has a long description" * 5
13
- )
14
- end
15
- end
@@ -1,49 +0,0 @@
1
- require 'test_helper'
2
-
3
- class ProjectsControllerTest < ActionController::TestCase
4
- setup do
5
- @project = projects(:one)
6
- end
7
-
8
- test "should get index" do
9
- get :index
10
- assert_response :success
11
- assert_not_nil assigns(:projects)
12
- end
13
-
14
- test "should get new" do
15
- get :new
16
- assert_response :success
17
- end
18
-
19
- test "should create project" do
20
- assert_difference('Project.count') do
21
- post :create, project: { description: @project.description, name: @project.name, priority: @project.priority }
22
- end
23
-
24
- assert_redirected_to project_path(assigns(:project))
25
- end
26
-
27
- test "should show project" do
28
- get :show, id: @project
29
- assert_response :success
30
- end
31
-
32
- test "should get edit" do
33
- get :edit, id: @project
34
- assert_response :success
35
- end
36
-
37
- test "should update project" do
38
- patch :update, id: @project, project: { description: @project.description, name: @project.name, priority: @project.priority }
39
- assert_redirected_to project_path(assigns(:project))
40
- end
41
-
42
- test "should destroy project" do
43
- assert_difference('Project.count', -1) do
44
- delete :destroy, id: @project
45
- end
46
-
47
- assert_redirected_to projects_path
48
- end
49
- end
@@ -1,49 +0,0 @@
1
- require 'test_helper'
2
-
3
- class TasksControllerTest < ActionController::TestCase
4
- setup do
5
- @task = tasks(:one)
6
- end
7
-
8
- test "should get index" do
9
- get :index
10
- assert_response :success
11
- assert_not_nil assigns(:tasks)
12
- end
13
-
14
- test "should get new" do
15
- get :new
16
- assert_response :success
17
- end
18
-
19
- test "should create task" do
20
- assert_difference('Task.count') do
21
- post :create, task: { description: @task.description, name: @task.name, project_id: @task.project_id }
22
- end
23
-
24
- assert_redirected_to task_path(assigns(:task))
25
- end
26
-
27
- test "should show task" do
28
- get :show, id: @task
29
- assert_response :success
30
- end
31
-
32
- test "should get edit" do
33
- get :edit, id: @task
34
- assert_response :success
35
- end
36
-
37
- test "should update task" do
38
- patch :update, id: @task, task: { description: @task.description, name: @task.name, project_id: @task.project_id }
39
- assert_redirected_to task_path(assigns(:task))
40
- end
41
-
42
- test "should destroy task" do
43
- assert_difference('Task.count', -1) do
44
- delete :destroy, id: @task
45
- end
46
-
47
- assert_redirected_to tasks_path
48
- end
49
- end
@@ -1,4 +0,0 @@
1
- require 'test_helper'
2
-
3
- class ProjectsHelperTest < ActionView::TestCase
4
- end
@@ -1,4 +0,0 @@
1
- require 'test_helper'
2
-
3
- class TasksHelperTest < ActionView::TestCase
4
- end
@@ -1,7 +0,0 @@
1
- require 'test_helper'
2
-
3
- class ProjectTest < ActiveSupport::TestCase
4
- # test "the truth" do
5
- # assert true
6
- # end
7
- end
@@ -1,7 +0,0 @@
1
- require 'test_helper'
2
-
3
- class TaskTest < ActiveSupport::TestCase
4
- # test "the truth" do
5
- # assert true
6
- # end
7
- end
@@ -1,15 +0,0 @@
1
- ENV["RAILS_ENV"] ||= "test"
2
- require File.expand_path('../../config/environment', __FILE__)
3
- require 'rails/test_help'
4
-
5
- class ActiveSupport::TestCase
6
- ActiveRecord::Migration.check_pending!
7
-
8
- # Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order.
9
- #
10
- # Note: You'll currently still have to declare fixtures explicitly in integration tests
11
- # -- they do not yet inherit this setting
12
- fixtures :all
13
-
14
- # Add more helper methods to be used by all tests here...
15
- end