query_diet 0.3.1 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (80) hide show
  1. data/.gitignore +5 -0
  2. data/README.rdoc +20 -10
  3. data/Rakefile +36 -23
  4. data/lib/query_diet/active_record_ext.rb +4 -4
  5. data/lib/query_diet/logger.rb +6 -5
  6. data/lib/query_diet/rack/reset_logger.rb +26 -0
  7. data/lib/query_diet/version.rb +3 -0
  8. data/lib/query_diet/widget.rb +14 -13
  9. data/lib/query_diet.rb +1 -2
  10. data/query_diet.gemspec +15 -64
  11. data/spec/rails-2.3/Gemfile +9 -0
  12. data/spec/rails-2.3/Rakefile +11 -0
  13. data/spec/rails-2.3/app_root/config/database.yml +4 -0
  14. data/spec/{spec.opts → rails-2.3/spec.opts} +1 -0
  15. data/spec/{spec_helper.rb → rails-2.3/spec_helper.rb} +5 -2
  16. data/spec/rails-3.0/.rspec +2 -0
  17. data/spec/rails-3.0/Gemfile +9 -0
  18. data/spec/rails-3.0/Rakefile +10 -0
  19. data/spec/rails-3.0/app_root/.gitignore +4 -0
  20. data/spec/rails-3.0/app_root/config/application.rb +32 -0
  21. data/spec/rails-3.0/app_root/config/boot.rb +13 -0
  22. data/spec/rails-3.0/app_root/config/database.yml +4 -0
  23. data/spec/rails-3.0/app_root/config/environment.rb +5 -0
  24. data/spec/rails-3.0/app_root/config/environments/test.rb +35 -0
  25. data/spec/rails-3.0/app_root/config/initializers/backtrace_silencers.rb +7 -0
  26. data/spec/rails-3.0/app_root/config/initializers/inflections.rb +10 -0
  27. data/spec/rails-3.0/app_root/config/initializers/mime_types.rb +5 -0
  28. data/spec/rails-3.0/app_root/config/initializers/secret_token.rb +7 -0
  29. data/spec/rails-3.0/app_root/config/initializers/session_store.rb +8 -0
  30. data/spec/rails-3.0/app_root/config/routes.rb +58 -0
  31. data/spec/rails-3.0/app_root/script/rails +6 -0
  32. data/spec/rails-3.0/spec_helper.rb +27 -0
  33. data/spec/rails-3.2/.rspec +2 -0
  34. data/spec/rails-3.2/Gemfile +10 -0
  35. data/spec/rails-3.2/Rakefile +10 -0
  36. data/spec/rails-3.2/app_root/.gitignore +4 -0
  37. data/spec/rails-3.2/app_root/config/application.rb +32 -0
  38. data/spec/rails-3.2/app_root/config/boot.rb +13 -0
  39. data/spec/rails-3.2/app_root/config/database.yml +4 -0
  40. data/spec/rails-3.2/app_root/config/environment.rb +5 -0
  41. data/spec/rails-3.2/app_root/config/environments/test.rb +35 -0
  42. data/spec/rails-3.2/app_root/config/initializers/backtrace_silencers.rb +7 -0
  43. data/spec/rails-3.2/app_root/config/initializers/inflections.rb +10 -0
  44. data/spec/rails-3.2/app_root/config/initializers/mime_types.rb +5 -0
  45. data/spec/rails-3.2/app_root/config/initializers/secret_token.rb +7 -0
  46. data/spec/rails-3.2/app_root/config/initializers/session_store.rb +8 -0
  47. data/spec/rails-3.2/app_root/config/routes.rb +58 -0
  48. data/spec/rails-3.2/app_root/log/.gitignore +1 -0
  49. data/spec/rails-3.2/rcov.opts +2 -0
  50. data/spec/rails-3.2/spec_helper.rb +25 -0
  51. data/spec/shared/app_root/app/controllers/query_diet_controller.rb +13 -0
  52. data/spec/{app_root → shared/app_root}/app/views/layouts/screen.html.erb +1 -0
  53. data/spec/shared/app_root/db/.gitignore +1 -0
  54. data/spec/shared/query_diet/helpers/widget_spec.rb +32 -0
  55. data/spec/shared/query_diet/integration/widget_spec.rb +23 -0
  56. data/spec/{logger_spec.rb → shared/query_diet/logger_spec.rb} +3 -3
  57. metadata +135 -39
  58. data/Gemfile +0 -10
  59. data/Gemfile.lock +0 -51
  60. data/lib/query_diet/action_controller_ext.rb +0 -20
  61. data/spec/app_root/app/controllers/query_diet_controller.rb +0 -21
  62. data/spec/app_root/config/database.yml +0 -21
  63. data/spec/app_root/config/environments/sqlite.rb +0 -0
  64. data/spec/app_root/config/environments/sqlite3.rb +0 -0
  65. data/spec/app_root/lib/console_with_fixtures.rb +0 -4
  66. data/spec/app_root/script/console +0 -7
  67. data/spec/controllers/query_diet_controller_spec.rb +0 -40
  68. /data/spec/{app_root → rails-2.3/app_root}/config/boot.rb +0 -0
  69. /data/spec/{app_root → rails-2.3/app_root}/config/environment.rb +0 -0
  70. /data/spec/{app_root/config/environments/in_memory.rb → rails-2.3/app_root/config/environments/test.rb} +0 -0
  71. /data/spec/{app_root → rails-2.3/app_root}/config/routes.rb +0 -0
  72. /data/spec/{app_root → rails-2.3/app_root}/log/.gitignore +0 -0
  73. /data/spec/{app_root/config/environments/mysql.rb → rails-3.0/app_root/lib/tasks/.gitkeep} +0 -0
  74. /data/spec/{app_root/config/environments/postgresql.rb → rails-3.0/app_root/log/.gitkeep} +0 -0
  75. /data/spec/{support → rails-3.0}/rcov.opts +0 -0
  76. /data/spec/{app_root → shared/app_root}/app/controllers/application_controller.rb +0 -0
  77. /data/spec/{app_root → shared/app_root}/app/models/movie.rb +0 -0
  78. /data/spec/{app_root → shared/app_root}/app/views/query_diet/no_query.html.erb +0 -0
  79. /data/spec/{app_root → shared/app_root}/app/views/query_diet/two_queries.html.erb +0 -0
  80. /data/spec/{app_root → shared/app_root}/db/migrate/001_create_movies.rb +0 -0
@@ -0,0 +1,27 @@
1
+ $: << File.join(File.dirname(__FILE__), "/../lib" )
2
+
3
+ # Set the default environment to sqlite3's in_memory database
4
+ ENV['RAILS_ENV'] ||= 'test'
5
+ ENV['RAILS_ROOT'] = 'app_root'
6
+
7
+ # Load the Rails environment and testing framework
8
+ require "#{File.dirname(__FILE__)}/app_root/config/environment"
9
+ require 'rspec/rails'
10
+
11
+ # Load dependencies
12
+ # require 'has_defaults'
13
+
14
+ # Require support code
15
+ # Dir["../shared/support/**/*.rb"].each {|f| require f}
16
+
17
+ FileUtils.rm(Dir.glob("#{Rails.root}/db/*.db"), :force => true)
18
+
19
+ # Run the migrations
20
+ print "\033[30m" # dark gray text
21
+ ActiveRecord::Migrator.migrate("#{Rails.root}/db/migrate")
22
+ print "\033[0m"
23
+
24
+ RSpec.configure do |config|
25
+ config.use_transactional_fixtures = false
26
+ config.use_instantiated_fixtures = false
27
+ end
@@ -0,0 +1,2 @@
1
+ --colour
2
+ --format progress
@@ -0,0 +1,10 @@
1
+ source 'http://rubygems.org'
2
+
3
+ gem 'sqlite3'
4
+ gem 'rails', '~>3.2'
5
+ gem 'rspec'
6
+ gem 'rspec-rails'
7
+ gem 'ruby-debug'
8
+ gem 'webrat'
9
+ gem 'database_cleaner'
10
+ gem 'query_diet', :path => '../..'
@@ -0,0 +1,10 @@
1
+ require 'rake'
2
+ require 'rspec/core/rake_task'
3
+
4
+ desc 'Default: Run all specs for a specific rails version.'
5
+ task :default => :spec
6
+
7
+ desc "Run all specs for a specific rails version"
8
+ RSpec::Core::RakeTask.new(:spec) do |t|
9
+ t.pattern = defined?(SPEC) ? SPEC : ['**/*_spec.rb', '../shared/**/*_spec.rb']
10
+ end
@@ -0,0 +1,4 @@
1
+ .bundle
2
+ db/*.sqlite3
3
+ log/*.log
4
+ tmp/**/*
@@ -0,0 +1,32 @@
1
+ require File.expand_path('../boot', __FILE__)
2
+
3
+ require 'rails/all'
4
+
5
+ # If you have a Gemfile, require the gems listed there, including any gems
6
+ # you've limited to :test, :development, or :production.
7
+ Bundler.require(:default, Rails.env) if defined?(Bundler)
8
+
9
+
10
+ module HasDefaultSpecApp
11
+ class Application < Rails::Application
12
+ config.encoding = "utf-8"
13
+
14
+ config.cache_classes = true
15
+ config.whiny_nils = true
16
+
17
+ config.consider_all_requests_local = true
18
+ config.action_controller.perform_caching = false
19
+
20
+ config.action_dispatch.show_exceptions = false
21
+
22
+ config.action_controller.allow_forgery_protection = false
23
+
24
+ config.action_mailer.delivery_method = :test
25
+
26
+ config.active_support.deprecation = :stderr
27
+
28
+ config.root = File.expand_path('../..', __FILE__)
29
+
30
+ # railties.plugins << Rails::Plugin.new(File.expand_path('../../../../..', __FILE__))
31
+ end
32
+ end
@@ -0,0 +1,13 @@
1
+ require 'rubygems'
2
+
3
+ # Set up gems listed in the Gemfile.
4
+ gemfile = File.expand_path('../../Gemfile', __FILE__)
5
+ begin
6
+ ENV['BUNDLE_GEMFILE'] = gemfile
7
+ require 'bundler'
8
+ Bundler.setup
9
+ rescue Bundler::GemNotFound => e
10
+ STDERR.puts e.message
11
+ STDERR.puts "Try running `bundle install`."
12
+ exit!
13
+ end if File.exist?(gemfile)
@@ -0,0 +1,4 @@
1
+ test:
2
+ adapter: sqlite3
3
+ database: db/query_diet_test.db
4
+ verbosity: quiet
@@ -0,0 +1,5 @@
1
+ # Load the rails application
2
+ require File.expand_path('../application', __FILE__)
3
+
4
+ # Initialize the rails application
5
+ HasDefaultSpecApp::Application.initialize!
@@ -0,0 +1,35 @@
1
+ HasDefaultSpecApp::Application.configure do
2
+ # Settings specified here will take precedence over those in config/application.rb
3
+
4
+ # The test environment is used exclusively to run your application's
5
+ # test suite. You never need to work with it otherwise. Remember that
6
+ # your test database is "scratch space" for the test suite and is wiped
7
+ # and recreated between test runs. Don't rely on the data there!
8
+ config.cache_classes = true
9
+
10
+ # Log error messages when you accidentally call methods on nil.
11
+ config.whiny_nils = true
12
+
13
+ # Show full error reports and disable caching
14
+ config.consider_all_requests_local = true
15
+ config.action_controller.perform_caching = false
16
+
17
+ # Raise exceptions instead of rendering exception templates
18
+ config.action_dispatch.show_exceptions = false
19
+
20
+ # Disable request forgery protection in test environment
21
+ config.action_controller.allow_forgery_protection = false
22
+
23
+ # Tell Action Mailer not to deliver emails to the real world.
24
+ # The :test delivery method accumulates sent emails in the
25
+ # ActionMailer::Base.deliveries array.
26
+ config.action_mailer.delivery_method = :test
27
+
28
+ # Use SQL instead of Active Record's schema dumper when creating the test database.
29
+ # This is necessary if your schema can't be completely dumped by the schema dumper,
30
+ # like if you have constraints or database-specific column types
31
+ # config.active_record.schema_format = :sql
32
+
33
+ # Print deprecation notices to the stderr
34
+ config.active_support.deprecation = :stderr
35
+ end
@@ -0,0 +1,7 @@
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!
@@ -0,0 +1,10 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Add new inflection rules using the following format
4
+ # (all these examples are active by default):
5
+ # ActiveSupport::Inflector.inflections do |inflect|
6
+ # inflect.plural /^(ox)$/i, '\1en'
7
+ # inflect.singular /^(ox)en/i, '\1'
8
+ # inflect.irregular 'person', 'people'
9
+ # inflect.uncountable %w( fish sheep )
10
+ # end
@@ -0,0 +1,5 @@
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
@@ -0,0 +1,7 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Your secret key for verifying the integrity of signed cookies.
4
+ # If you change this key, all old signed cookies will become invalid!
5
+ # Make sure the secret is at least 30 characters and all random,
6
+ # no regular words or you'll be exposed to dictionary attacks.
7
+ HasDefaultSpecApp::Application.config.secret_token = 'cb014a08a45243e7143f31e04774c342c1fba329fd594ae1a480d8283b1a851f425dc08044311fb4be6d000b6e6681de7c76d19148419a5ffa0a9f84556d3b33'
@@ -0,0 +1,8 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ HasDefaultSpecApp::Application.config.session_store :cookie_store, :key => '_app_root_session'
4
+
5
+ # Use the database for sessions instead of the cookie-based default,
6
+ # which shouldn't be used to store highly confidential information
7
+ # (create the session table with "rails generate session_migration")
8
+ # HasDefaultSpecApp::Application.config.session_store :active_record_store
@@ -0,0 +1,58 @@
1
+ HasDefaultSpecApp::Application.routes.draw do
2
+ # The priority is based upon order of creation:
3
+ # first created -> highest priority.
4
+
5
+ # Sample of regular route:
6
+ # match 'products/:id' => 'catalog#view'
7
+ # Keep in mind you can assign values other than :controller and :action
8
+
9
+ # Sample of named route:
10
+ # match 'products/:id/purchase' => 'catalog#purchase', :as => :purchase
11
+ # This route can be invoked with purchase_url(:id => product.id)
12
+
13
+ # Sample resource route (maps HTTP verbs to controller actions automatically):
14
+ # resources :products
15
+
16
+ # Sample resource route with options:
17
+ # resources :products do
18
+ # member do
19
+ # get 'short'
20
+ # post 'toggle'
21
+ # end
22
+ #
23
+ # collection do
24
+ # get 'sold'
25
+ # end
26
+ # end
27
+
28
+ # Sample resource route with sub-resources:
29
+ # resources :products do
30
+ # resources :comments, :sales
31
+ # resource :seller
32
+ # end
33
+
34
+ # Sample resource route with more complex sub-resources
35
+ # resources :products do
36
+ # resources :comments
37
+ # resources :sales do
38
+ # get 'recent', :on => :collection
39
+ # end
40
+ # end
41
+
42
+ # Sample resource route within a namespace:
43
+ # namespace :admin do
44
+ # # Directs /admin/products/* to Admin::ProductsController
45
+ # # (app/controllers/admin/products_controller.rb)
46
+ # resources :products
47
+ # end
48
+
49
+ # You can have the root of your site routed with "root"
50
+ # just remember to delete public/index.html.
51
+ # root :to => "welcome#index"
52
+
53
+ # See how all your routes lay out with "rake routes"
54
+
55
+ # This is a legacy wild controller route that's not recommended for RESTful applications.
56
+ # Note: This route will make all actions in every controller accessible via GET requests.
57
+ match ':controller(/:action(/:id(.:format)))'
58
+ end
@@ -0,0 +1 @@
1
+ *.log
@@ -0,0 +1,2 @@
1
+ --exclude "spec/*,gems/*"
2
+ --rails
@@ -0,0 +1,25 @@
1
+ $: << File.join(File.dirname(__FILE__), "/../lib" )
2
+
3
+ # Set the default environment to sqlite3's in_memory database
4
+ ENV['RAILS_ENV'] ||= 'test'
5
+ ENV['RAILS_ROOT'] = 'app_root'
6
+
7
+ # Load the Rails environment and testing framework
8
+ require "#{File.dirname(__FILE__)}/app_root/config/environment"
9
+ require 'rspec/rails'
10
+ require 'database_cleaner'
11
+
12
+ FileUtils.rm(Dir.glob("#{Rails.root}/db/*.db"), :force => true)
13
+
14
+ # Run the migrations
15
+ print "\033[30m" # dark gray text
16
+ ActiveRecord::Migrator.migrate("#{Rails.root}/db/migrate")
17
+ print "\033[0m"
18
+
19
+ RSpec.configure do |config|
20
+ config.use_transactional_fixtures = false
21
+ config.use_instantiated_fixtures = false
22
+ config.before(:each) do
23
+ DatabaseCleaner.clean
24
+ end
25
+ end
@@ -0,0 +1,13 @@
1
+ class QueryDietController < ApplicationController
2
+
3
+ layout 'screen'
4
+
5
+ def no_query
6
+ end
7
+
8
+ def two_queries
9
+ Movie.create!
10
+ Movie.all
11
+ end
12
+
13
+ end
@@ -1,5 +1,6 @@
1
1
  <html>
2
2
  <body>
3
+ <%= query_diet_widget %>
3
4
  <h1>Title</h1>
4
5
  <%= yield %>
5
6
  </body>
@@ -0,0 +1 @@
1
+ *.db
@@ -0,0 +1,32 @@
1
+ require 'spec_helper'
2
+
3
+ describe QueryDiet::Widget::Helper, :type => :helper do
4
+
5
+ it "should be highlighted if the request was too intimate with the database" do
6
+ QueryDiet::Logger.stub :bad? => true
7
+ helper.query_diet_widget.should have_selector('div#query_diet.bad')
8
+ end
9
+
10
+ it "should not be highlighted if the request spent little time in the database" do
11
+ QueryDiet::Logger.stub :bad? => false
12
+ helper.query_diet_widget.should have_selector('div#query_diet.good')
13
+ end
14
+
15
+ it "should contain the number of requests and the duration spent running queries" do
16
+ QueryDiet::Logger.stub :count => 78, :time => 43500
17
+ helper.query_diet_widget.should have_selector('div#query_diet', :content => "78 / 43500ms")
18
+ end
19
+
20
+ it 'should allow to set the request threshold' do
21
+ QueryDiet::Logger.stub :count => 4, :time => 1000
22
+ helper.query_diet_widget.should have_selector('div#query_diet.good')
23
+ helper.query_diet_widget(:bad_count => 3).should have_selector('div#query_diet.bad')
24
+ end
25
+
26
+ it 'should allow to set the request threshold' do
27
+ QueryDiet::Logger.stub :count => 2, :time => 3000
28
+ helper.query_diet_widget.should have_selector('div#query_diet.good')
29
+ helper.query_diet_widget(:bad_time => 2000).should have_selector('div#query_diet.bad')
30
+ end
31
+
32
+ end
@@ -0,0 +1,23 @@
1
+ require 'spec_helper'
2
+
3
+ describe 'The widget', :type => defined?(RSpec) ? :request : :integration do
4
+
5
+ it "should be included via a helper" do
6
+ get 'query_diet/two_queries'
7
+ response.should have_selector('div#query_diet')
8
+ end
9
+
10
+ it 'should show the correct number of queries' do
11
+ get 'query_diet/no_query'
12
+ response.should have_selector('#query_diet', :content => '0 /')
13
+ get 'query_diet/two_queries'
14
+ response.should have_selector('#query_diet', :content => '2 /')
15
+ end
16
+
17
+ it 'should reset the queries after each request' do
18
+ get 'query_diet/two_queries'
19
+ get 'query_diet/two_queries'
20
+ response.should have_selector('#query_diet', :content => '2 /')
21
+ end
22
+
23
+ end
@@ -11,7 +11,7 @@ describe QueryDiet::Logger do
11
11
  QueryDiet::Logger.time.should == 0
12
12
  QueryDiet::Logger.queries.should == []
13
13
 
14
- Benchmark.should_receive(:realtime).and_return(5)
14
+ Benchmark.should_receive(:realtime).at_least(:once).and_return(5)
15
15
  Movie.create
16
16
 
17
17
  QueryDiet::Logger.count.should > 0
@@ -30,7 +30,7 @@ describe QueryDiet::Logger do
30
30
 
31
31
  describe "#time" do
32
32
  it "should return the number of miliseconds spent running database queries since the last reset" do
33
- Benchmark.should_receive(:realtime).and_return(5)
33
+ Benchmark.should_receive(:realtime).at_least(:once).and_return(5)
34
34
  Movie.create
35
35
  QueryDiet::Logger.time.should == 5000
36
36
  end
@@ -38,7 +38,7 @@ describe QueryDiet::Logger do
38
38
 
39
39
  describe "#queries" do
40
40
  it "should return the queries since last reset" do
41
- Benchmark.should_receive(:realtime).and_return(5.1234)
41
+ Benchmark.should_receive(:realtime).at_least(:once).and_return(5.1234)
42
42
  Movie.create
43
43
  QueryDiet::Logger.queries.size.should == 1
44
44
  query = QueryDiet::Logger.queries.first
metadata CHANGED
@@ -1,21 +1,23 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: query_diet
3
3
  version: !ruby/object:Gem::Version
4
- hash: 17
4
+ hash: 15
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
- - 3
9
- - 1
10
- version: 0.3.1
8
+ - 4
9
+ - 0
10
+ version: 0.4.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Henning Koch
14
+ - Tobias Kraze
14
15
  autorequire:
15
16
  bindir: bin
16
17
  cert_chain: []
17
18
 
18
- date: 2012-09-19 00:00:00 Z
19
+ date: 2012-11-02 00:00:00 +01:00
20
+ default_executable:
19
21
  dependencies: []
20
22
 
21
23
  description: Rails database query counter that stays out of your way
@@ -24,49 +26,85 @@ executables: []
24
26
 
25
27
  extensions: []
26
28
 
27
- extra_rdoc_files:
28
- - README.rdoc
29
+ extra_rdoc_files: []
30
+
29
31
  files:
30
- - Gemfile
31
- - Gemfile.lock
32
+ - .gitignore
32
33
  - MIT-LICENSE
33
34
  - README.rdoc
34
35
  - Rakefile
35
36
  - VERSION
36
37
  - lib/query_diet.rb
37
- - lib/query_diet/action_controller_ext.rb
38
38
  - lib/query_diet/active_record_ext.rb
39
39
  - lib/query_diet/logger.rb
40
+ - lib/query_diet/rack/reset_logger.rb
41
+ - lib/query_diet/version.rb
40
42
  - lib/query_diet/widget.rb
41
43
  - query_diet.gemspec
42
- - spec/app_root/app/controllers/application_controller.rb
43
- - spec/app_root/app/controllers/query_diet_controller.rb
44
- - spec/app_root/app/models/movie.rb
45
- - spec/app_root/app/views/layouts/screen.html.erb
46
- - spec/app_root/app/views/query_diet/no_query.html.erb
47
- - spec/app_root/app/views/query_diet/two_queries.html.erb
48
- - spec/app_root/config/boot.rb
49
- - spec/app_root/config/database.yml
50
- - spec/app_root/config/environment.rb
51
- - spec/app_root/config/environments/in_memory.rb
52
- - spec/app_root/config/environments/mysql.rb
53
- - spec/app_root/config/environments/postgresql.rb
54
- - spec/app_root/config/environments/sqlite.rb
55
- - spec/app_root/config/environments/sqlite3.rb
56
- - spec/app_root/config/routes.rb
57
- - spec/app_root/db/migrate/001_create_movies.rb
58
- - spec/app_root/lib/console_with_fixtures.rb
59
- - spec/app_root/log/.gitignore
60
- - spec/app_root/script/console
61
- - spec/controllers/query_diet_controller_spec.rb
62
- - spec/logger_spec.rb
63
- - spec/spec.opts
64
- - spec/spec_helper.rb
65
- - spec/support/rcov.opts
66
- homepage: http://github.com/makandra/query_diet
44
+ - spec/rails-2.3/Gemfile
45
+ - spec/rails-2.3/Rakefile
46
+ - spec/rails-2.3/app_root/config/boot.rb
47
+ - spec/rails-2.3/app_root/config/database.yml
48
+ - spec/rails-2.3/app_root/config/environment.rb
49
+ - spec/rails-2.3/app_root/config/environments/test.rb
50
+ - spec/rails-2.3/app_root/config/routes.rb
51
+ - spec/rails-2.3/app_root/log/.gitignore
52
+ - spec/rails-2.3/spec.opts
53
+ - spec/rails-2.3/spec_helper.rb
54
+ - spec/rails-3.0/.rspec
55
+ - spec/rails-3.0/Gemfile
56
+ - spec/rails-3.0/Rakefile
57
+ - spec/rails-3.0/app_root/.gitignore
58
+ - spec/rails-3.0/app_root/config/application.rb
59
+ - spec/rails-3.0/app_root/config/boot.rb
60
+ - spec/rails-3.0/app_root/config/database.yml
61
+ - spec/rails-3.0/app_root/config/environment.rb
62
+ - spec/rails-3.0/app_root/config/environments/test.rb
63
+ - spec/rails-3.0/app_root/config/initializers/backtrace_silencers.rb
64
+ - spec/rails-3.0/app_root/config/initializers/inflections.rb
65
+ - spec/rails-3.0/app_root/config/initializers/mime_types.rb
66
+ - spec/rails-3.0/app_root/config/initializers/secret_token.rb
67
+ - spec/rails-3.0/app_root/config/initializers/session_store.rb
68
+ - spec/rails-3.0/app_root/config/routes.rb
69
+ - spec/rails-3.0/app_root/lib/tasks/.gitkeep
70
+ - spec/rails-3.0/app_root/log/.gitkeep
71
+ - spec/rails-3.0/app_root/script/rails
72
+ - spec/rails-3.0/rcov.opts
73
+ - spec/rails-3.0/spec_helper.rb
74
+ - spec/rails-3.2/.rspec
75
+ - spec/rails-3.2/Gemfile
76
+ - spec/rails-3.2/Rakefile
77
+ - spec/rails-3.2/app_root/.gitignore
78
+ - spec/rails-3.2/app_root/config/application.rb
79
+ - spec/rails-3.2/app_root/config/boot.rb
80
+ - spec/rails-3.2/app_root/config/database.yml
81
+ - spec/rails-3.2/app_root/config/environment.rb
82
+ - spec/rails-3.2/app_root/config/environments/test.rb
83
+ - spec/rails-3.2/app_root/config/initializers/backtrace_silencers.rb
84
+ - spec/rails-3.2/app_root/config/initializers/inflections.rb
85
+ - spec/rails-3.2/app_root/config/initializers/mime_types.rb
86
+ - spec/rails-3.2/app_root/config/initializers/secret_token.rb
87
+ - spec/rails-3.2/app_root/config/initializers/session_store.rb
88
+ - spec/rails-3.2/app_root/config/routes.rb
89
+ - spec/rails-3.2/app_root/log/.gitignore
90
+ - spec/rails-3.2/rcov.opts
91
+ - spec/rails-3.2/spec_helper.rb
92
+ - spec/shared/app_root/app/controllers/application_controller.rb
93
+ - spec/shared/app_root/app/controllers/query_diet_controller.rb
94
+ - spec/shared/app_root/app/models/movie.rb
95
+ - spec/shared/app_root/app/views/layouts/screen.html.erb
96
+ - spec/shared/app_root/app/views/query_diet/no_query.html.erb
97
+ - spec/shared/app_root/app/views/query_diet/two_queries.html.erb
98
+ - spec/shared/app_root/db/.gitignore
99
+ - spec/shared/app_root/db/migrate/001_create_movies.rb
100
+ - spec/shared/query_diet/helpers/widget_spec.rb
101
+ - spec/shared/query_diet/integration/widget_spec.rb
102
+ - spec/shared/query_diet/logger_spec.rb
103
+ has_rdoc: true
104
+ homepage: https://github.com/makandra/query_diet
67
105
  licenses: []
68
106
 
69
- post_install_message:
107
+ post_install_message: Remember to put <%= query_diet_widget %> into your app layout.
70
108
  rdoc_options: []
71
109
 
72
110
  require_paths:
@@ -92,9 +130,67 @@ required_rubygems_version: !ruby/object:Gem::Requirement
92
130
  requirements: []
93
131
 
94
132
  rubyforge_project:
95
- rubygems_version: 1.8.21
133
+ rubygems_version: 1.3.9.5
96
134
  signing_key:
97
135
  specification_version: 3
98
136
  summary: Rails database query counter that stays out of your way
99
- test_files: []
100
-
137
+ test_files:
138
+ - spec/rails-2.3/Gemfile
139
+ - spec/rails-2.3/Rakefile
140
+ - spec/rails-2.3/app_root/config/boot.rb
141
+ - spec/rails-2.3/app_root/config/database.yml
142
+ - spec/rails-2.3/app_root/config/environment.rb
143
+ - spec/rails-2.3/app_root/config/environments/test.rb
144
+ - spec/rails-2.3/app_root/config/routes.rb
145
+ - spec/rails-2.3/app_root/log/.gitignore
146
+ - spec/rails-2.3/spec.opts
147
+ - spec/rails-2.3/spec_helper.rb
148
+ - spec/rails-3.0/.rspec
149
+ - spec/rails-3.0/Gemfile
150
+ - spec/rails-3.0/Rakefile
151
+ - spec/rails-3.0/app_root/.gitignore
152
+ - spec/rails-3.0/app_root/config/application.rb
153
+ - spec/rails-3.0/app_root/config/boot.rb
154
+ - spec/rails-3.0/app_root/config/database.yml
155
+ - spec/rails-3.0/app_root/config/environment.rb
156
+ - spec/rails-3.0/app_root/config/environments/test.rb
157
+ - spec/rails-3.0/app_root/config/initializers/backtrace_silencers.rb
158
+ - spec/rails-3.0/app_root/config/initializers/inflections.rb
159
+ - spec/rails-3.0/app_root/config/initializers/mime_types.rb
160
+ - spec/rails-3.0/app_root/config/initializers/secret_token.rb
161
+ - spec/rails-3.0/app_root/config/initializers/session_store.rb
162
+ - spec/rails-3.0/app_root/config/routes.rb
163
+ - spec/rails-3.0/app_root/lib/tasks/.gitkeep
164
+ - spec/rails-3.0/app_root/log/.gitkeep
165
+ - spec/rails-3.0/app_root/script/rails
166
+ - spec/rails-3.0/rcov.opts
167
+ - spec/rails-3.0/spec_helper.rb
168
+ - spec/rails-3.2/.rspec
169
+ - spec/rails-3.2/Gemfile
170
+ - spec/rails-3.2/Rakefile
171
+ - spec/rails-3.2/app_root/.gitignore
172
+ - spec/rails-3.2/app_root/config/application.rb
173
+ - spec/rails-3.2/app_root/config/boot.rb
174
+ - spec/rails-3.2/app_root/config/database.yml
175
+ - spec/rails-3.2/app_root/config/environment.rb
176
+ - spec/rails-3.2/app_root/config/environments/test.rb
177
+ - spec/rails-3.2/app_root/config/initializers/backtrace_silencers.rb
178
+ - spec/rails-3.2/app_root/config/initializers/inflections.rb
179
+ - spec/rails-3.2/app_root/config/initializers/mime_types.rb
180
+ - spec/rails-3.2/app_root/config/initializers/secret_token.rb
181
+ - spec/rails-3.2/app_root/config/initializers/session_store.rb
182
+ - spec/rails-3.2/app_root/config/routes.rb
183
+ - spec/rails-3.2/app_root/log/.gitignore
184
+ - spec/rails-3.2/rcov.opts
185
+ - spec/rails-3.2/spec_helper.rb
186
+ - spec/shared/app_root/app/controllers/application_controller.rb
187
+ - spec/shared/app_root/app/controllers/query_diet_controller.rb
188
+ - spec/shared/app_root/app/models/movie.rb
189
+ - spec/shared/app_root/app/views/layouts/screen.html.erb
190
+ - spec/shared/app_root/app/views/query_diet/no_query.html.erb
191
+ - spec/shared/app_root/app/views/query_diet/two_queries.html.erb
192
+ - spec/shared/app_root/db/.gitignore
193
+ - spec/shared/app_root/db/migrate/001_create_movies.rb
194
+ - spec/shared/query_diet/helpers/widget_spec.rb
195
+ - spec/shared/query_diet/integration/widget_spec.rb
196
+ - spec/shared/query_diet/logger_spec.rb
data/Gemfile DELETED
@@ -1,10 +0,0 @@
1
- source :rubygems
2
-
3
- group :dev do
4
- gem 'rails', '~> 2.3'
5
- gem 'rspec', '~> 1.3'
6
- gem 'rspec-rails', '~> 1.3'
7
- gem 'sqlite3'
8
- gem 'jeweler'
9
- gem 'test-unit', '1.2.3'
10
- end