mongodb_logger 0.4.2 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (94) hide show
  1. data/.gitignore +2 -1
  2. data/.rvmrc +1 -1
  3. data/.travis.yml +5 -4
  4. data/Appraisals +9 -0
  5. data/CHANGELOG.md +20 -3
  6. data/README.md +58 -35
  7. data/Rakefile +33 -96
  8. data/app/assets/javascripts/analytics.js.coffee +5 -4
  9. data/app/assets/javascripts/logs.js.coffee +11 -11
  10. data/app/assets/javascripts/mongodb_logger.js +2 -1
  11. data/app/assets/javascripts/vendors/jquery-1.9.1.min.js +5 -0
  12. data/app/assets/javascripts/vendors/jquery.pjax.min.js +15 -13
  13. data/app/assets/javascripts/vendors/mustache.min.js +10 -0
  14. data/app/assets/stylesheets/layout.css +20 -15
  15. data/app/assets/stylesheets/mongodb_logger.css +0 -3
  16. data/bin/mongodb_logger_web +1 -2
  17. data/features/rails.feature +20 -8
  18. data/features/step_definitions/mongodb_logger_web_steps.rb +2 -3
  19. data/features/step_definitions/rails_application_steps.rb +84 -58
  20. data/features/step_definitions/rake_steps.rb +10 -0
  21. data/features/support/aruba.rb +5 -0
  22. data/features/support/env.rb +11 -5
  23. data/features/support/rails.rb +55 -67
  24. data/gemfiles/rails31.gemfile +8 -0
  25. data/gemfiles/rails32.gemfile +8 -0
  26. data/lib/mongodb_logger.rb +10 -3
  27. data/lib/mongodb_logger/adapters/base.rb +5 -1
  28. data/lib/mongodb_logger/adapters/mongo.rb +17 -13
  29. data/lib/mongodb_logger/adapters/moped.rb +17 -11
  30. data/lib/mongodb_logger/capistrano.rb +8 -0
  31. data/lib/mongodb_logger/logger.rb +13 -26
  32. data/lib/mongodb_logger/rack_middleware.rb +24 -0
  33. data/lib/mongodb_logger/railtie.rb +4 -4
  34. data/lib/mongodb_logger/server.rb +43 -68
  35. data/lib/mongodb_logger/server/helpers.rb +5 -0
  36. data/lib/mongodb_logger/server/{content_for.rb → helpers/content_for.rb} +0 -0
  37. data/lib/mongodb_logger/server/helpers/mustache_helpers.rb +66 -0
  38. data/lib/mongodb_logger/server/{partials.rb → helpers/partials.rb} +0 -0
  39. data/lib/mongodb_logger/server/{sprokets.rb → helpers/sprokets.rb} +4 -4
  40. data/lib/mongodb_logger/server/{view_helpers.rb → helpers/view_helpers.rb} +22 -38
  41. data/lib/mongodb_logger/server/model.rb +4 -0
  42. data/lib/mongodb_logger/server/model/additional_filter.rb +15 -23
  43. data/lib/mongodb_logger/server/model/analytic.rb +24 -32
  44. data/lib/mongodb_logger/server/model/base.rb +21 -0
  45. data/lib/mongodb_logger/server/model/filter.rb +12 -20
  46. data/lib/mongodb_logger/server/mustache/logs/info.rb +15 -0
  47. data/lib/mongodb_logger/server/templates/logs/info.mustache +25 -0
  48. data/lib/mongodb_logger/server/views/layout.erb +28 -26
  49. data/lib/mongodb_logger/server/views/shared/_log.erb +1 -1
  50. data/lib/mongodb_logger/server/views/shared/_tabs.erb +2 -2
  51. data/lib/mongodb_logger/server/views/shared/layout/_mustache.erb +6 -0
  52. data/lib/mongodb_logger/server/views/show_log.erb +2 -2
  53. data/lib/mongodb_logger/server_config.rb +4 -4
  54. data/lib/mongodb_logger/utils/migrate.rb +50 -0
  55. data/lib/mongodb_logger/utils/progressbar.rb +79 -0
  56. data/lib/mongodb_logger/version.rb +1 -1
  57. data/mongodb_logger.gemspec +15 -8
  58. data/{test/config/samples → spec/factories/config}/database.yml +0 -0
  59. data/{test/config/samples → spec/factories/config}/database_no_file_logging.yml +0 -0
  60. data/{test/config/samples → spec/factories/config}/database_replica_set.yml +0 -0
  61. data/{test/config/samples → spec/factories/config}/database_with_auth.yml +0 -0
  62. data/spec/factories/config/database_with_capsize.yml +9 -0
  63. data/{test/config/samples → spec/factories/config}/database_with_collection.yml +0 -0
  64. data/{test/config/samples → spec/factories/config}/database_with_url.yml +0 -0
  65. data/{test/config/samples → spec/factories/config}/mongodb_logger.yml +0 -0
  66. data/{test/config/samples → spec/factories/config}/mongoid.yml +0 -0
  67. data/{test/config/samples → spec/factories/config}/server_config.yml +0 -0
  68. data/spec/javascripts/support/jasmine.yml +1 -5
  69. data/spec/mongodb_logger_spec.rb +257 -0
  70. data/spec/rails_spec/controllers/tests_controller_spec_rails.rb +128 -0
  71. data/spec/rails_spec/spec_helper_rails.rb +13 -0
  72. data/spec/spec_helper.rb +17 -0
  73. data/{test/test_helper.rb → spec/support/mongodb_logger_helper.rb} +44 -63
  74. data/spec/support/mongodb_logger_macros.rb +22 -0
  75. data/spec/support/rails.rb +40 -0
  76. data/spec/utils/migrate_spec.rb +32 -0
  77. data/{lib/tasks → tasks}/mongodb_logger.rake +14 -6
  78. metadata +198 -78
  79. data/SUPPORTED_RAILS_VERSIONS +0 -16
  80. data/TESTING.md +0 -24
  81. data/app/assets/javascripts/vendors/jquery-1.8.3.min.js +0 -2
  82. data/features/support/terminal.rb +0 -95
  83. data/lib/mongodb_logger/server/views/shared/_log_info.erb +0 -27
  84. data/test/Gemfile_tests +0 -9
  85. data/test/active_record.rb +0 -13
  86. data/test/log/.gitkeep +0 -0
  87. data/test/rails.rb +0 -22
  88. data/test/rails/app/controllers/order_controller.rb +0 -23
  89. data/test/rails/test/functional/order_controller_test.rb +0 -116
  90. data/test/rails/test/test_helper.rb +0 -10
  91. data/test/shoulda_macros/log_macros.rb +0 -13
  92. data/test/test.sh +0 -7
  93. data/test/unit/mongodb_logger_replica_test.rb +0 -56
  94. data/test/unit/mongodb_logger_test.rb +0 -307
@@ -0,0 +1,128 @@
1
+ require "spec_helper"
2
+
3
+ describe TestsController do
4
+ before :each do
5
+ @mongodb_logger = Rails.logger
6
+ @mongo_adapter = @mongodb_logger.mongo_adapter
7
+ @mongo_adapter.reset_collection
8
+ @collection = @mongo_adapter.collection
9
+ end
10
+
11
+ describe "GET #index" do
12
+ it "responds successfully with an HTTP 200 status code" do
13
+ get :index
14
+ expect(response).to be_success
15
+ expect(response.code.to_i).to eq(200)
16
+ end
17
+
18
+ it "renders the index text" do
19
+ get :index
20
+ response.should render_template(text: "index")
21
+ end
22
+
23
+ it "log a single record" do
24
+ @collection.find.count.should == 0
25
+ get :index
26
+ expect(response).to be_success
27
+ @collection.find.count.should == 1
28
+ end
29
+
30
+ it "log a debug message" do
31
+ get :index
32
+ record = @collection.find.first
33
+ record.should_not be_nil
34
+ record["messages"]["debug"].should_not be_nil
35
+ record["messages"]["debug"].should be_a(Array)
36
+ record["messages"]["debug"].size.should == 1
37
+ record["messages"]["debug"].first.should == described_class::LOG_MESSAGE
38
+ end
39
+
40
+ it "write request method" do
41
+ get :index
42
+ record = @collection.find.first
43
+ @collection.find.first['method'].should == "GET"
44
+ end
45
+ end
46
+
47
+ describe "POST #create" do
48
+ it "write request method" do
49
+ post :create
50
+ @collection.find.first['method'].should == "POST"
51
+ end
52
+
53
+ it "log find by params keys" do
54
+ some_name = "name"
55
+ post :create, activity: { name: some_name }
56
+ @collection.find({"params.activity.name" => some_name}).count.should == 1
57
+ end
58
+
59
+ it "search any values in params" do
60
+ post :create, data: {
61
+ int: 1,
62
+ is_true: true,
63
+ is_false: false,
64
+ string: "string",
65
+ push_hash: { yes: "yes" },
66
+ float: 1.22
67
+ }
68
+
69
+ # such testing down on Rails 3.1.x, because in tests params convert Fixnum values into String
70
+ # :(
71
+ # assert_equal 1, @collection.find({"params.data.int" => 1}).count
72
+
73
+ # data types
74
+ @collection.find({"params.data.is_true" => true}).count.should == 1
75
+ @collection.find({"params.data.is_false" => false}).count.should == 1
76
+ @collection.find({"params.data.string" => "string"}).count.should == 1
77
+ @collection.find({"params.data.push_hash.yes" => "yes"}).count.should == 1
78
+ end
79
+
80
+ context "search values in params" do
81
+ before do
82
+ @content_type = "text/html"
83
+ @tempfile = Tempfile.new("file_#{rand(100)}.html")
84
+ @tempfile.write("<html></html>")
85
+ @tempfile.rewind
86
+ @tempfile.close
87
+ end
88
+ after do
89
+ @tempfile.unlink
90
+ end
91
+
92
+ it "with attachments" do
93
+ uploaded_file = fixture_file_upload(@tempfile.path, @content_type, :binary)
94
+ post :create, data: {
95
+ some_key: { file: uploaded_file },
96
+ new_string: "string"
97
+ }
98
+ # data types
99
+ @collection.find({"params.data.new_string" => "string"}).count.should == 1
100
+ # attachment
101
+ @collection.find({"params.data.some_key.file.content_type" => @content_type}).count.should == 1
102
+ @collection.find({"params.data.some_key.file.original_filename" => { "$exists" => true }}).count.should == 1
103
+ end
104
+ end
105
+
106
+ it "not log hidden params" do
107
+ post :create, order: { password: described_class::LOG_MESSAGE }
108
+ @collection.find({"params.order.password" => "[FILTERED]"}).count.should == 1
109
+ end
110
+ end
111
+
112
+ describe "GET #new" do
113
+ it "write log exceptions" do
114
+ expect { get :new }.to raise_error RuntimeError, described_class::LOG_ERROR_MESSAGE
115
+ @collection.find({"messages.error" => /^#{described_class::LOG_ERROR_MESSAGE}/}).count.should == 1
116
+ @collection.find({"is_exception" => true}).count.should == 1
117
+ end
118
+ end
119
+
120
+ describe "DELETE #destroy" do
121
+ it "write request method" do
122
+ id = 101
123
+ delete :destroy, id: id
124
+ @collection.find.first['method'].should == "DELETE"
125
+ @collection.find.first['params']['id'].to_i.should == id
126
+ end
127
+ end
128
+ end
@@ -0,0 +1,13 @@
1
+ # This file is copied to spec/ when you run 'rails generate rspec:install'
2
+ ENV["RAILS_ENV"] ||= 'test'
3
+ require File.expand_path("../../config/environment", __FILE__)
4
+ require 'rspec/rails'
5
+ require 'rspec/autorun'
6
+
7
+ # Requires supporting ruby files with custom matchers and macros, etc,
8
+ # in spec/support/ and its subdirectories.
9
+ Dir[Rails.root.join("spec/support/**/*.rb")].each {|f| require f}
10
+
11
+ RSpec.configure do |config|
12
+
13
+ end
@@ -0,0 +1,17 @@
1
+ require 'rspec'
2
+
3
+ require "mocha"
4
+ require 'mocha/api'
5
+ require 'shoulda'
6
+
7
+ require 'tempfile'
8
+ require 'pathname'
9
+ require 'fileutils'
10
+
11
+ require File.dirname(__FILE__) + "/../lib/mongodb_logger"
12
+
13
+ Dir["#{File.expand_path(File.join(File.dirname(__FILE__), "support"))}/**/*.rb"].each {|f| require f}
14
+
15
+ RSpec.configure do |config|
16
+ config.include MongodbLogger::SpecHelper
17
+ end
@@ -1,98 +1,79 @@
1
- require 'rubygems'
2
- require 'bundler'
1
+ require 'mongo'
2
+ require File.expand_path(File.join(File.dirname(__FILE__), "rails.rb"))
3
3
 
4
- Bundler.require
5
-
6
- require 'test/unit'
7
- require "mocha"
8
- require 'mocha/api'
9
- require 'shoulda'
10
-
11
- # mock rails class
12
- require 'pathname'
13
- require 'rails'
14
- require 'fileutils'
15
-
16
- $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
17
- $LOAD_PATH.unshift(File.dirname(__FILE__))
18
-
19
- Shoulda.autoload_macros("#{File.dirname(__FILE__)}/..")
20
-
21
- class Test::Unit::TestCase
22
- CONFIG_DIR = Rails.root.join("config")
23
- SAMPLE_CONFIG_DIR = File.join(CONFIG_DIR, "samples")
4
+ module MongodbLogger::SpecHelper
5
+ CONFIG_DIR = File.expand_path(File.join(File.dirname(__FILE__), "..", "..", "tmp", "config"))
6
+ SAMPLE_CONFIG_DIR = File.expand_path(File.join(File.dirname(__FILE__), "..", "factories", "config"))
24
7
  DEFAULT_CONFIG = "database.yml"
25
8
  DEFAULT_CONFIG_WITH_AUTH = "database_with_auth.yml"
9
+ DEFAULT_CONFIG_CAPSIZE = "database_with_capsize.yml"
26
10
  DEFAULT_CONFIG_WITH_URL = "database_with_url.yml"
27
11
  DEFAULT_CONFIG_WITH_COLLECTION = "database_with_collection.yml"
28
12
  DEFAULT_CONFIG_WITH_NO_FILE_LOGGING = "database_no_file_logging.yml"
29
- MONGOID_CONFIG = "mongoid.yml"
30
13
  REPLICA_SET_CONFIG = "database_replica_set.yml"
14
+ MONGOID_CONFIG = "mongoid.yml"
31
15
  LOGGER_CONFIG = "mongodb_logger.yml"
32
16
 
33
- def log(msg)
34
- @mongodb_logger.mongoize({"id" => 1}) do
35
- @mongodb_logger.debug(msg)
36
- end
37
- end
38
-
39
- def log_params(msg)
40
- @mongodb_logger.mongoize({:params => msg})
41
- end
42
-
43
- def log_exception(msg)
44
- @mongodb_logger.mongoize({"id" => 1}) do
45
- raise msg
46
- end
17
+ def create_logs_dir
18
+ FileUtils.mkdir_p(File.expand_path(File.join(File.dirname(__FILE__), "..", "..", "tmp", "log")))
19
+ FileUtils.mkdir_p(CONFIG_DIR)
20
+ FileUtils.mkdir_p(File.join(CONFIG_DIR, "log"))
47
21
  end
48
22
 
49
23
  def setup_for_config(source, dest = source)
50
- File.delete(File.join(CONFIG_DIR, DEFAULT_CONFIG))
24
+ File.delete(File.join(CONFIG_DIR, DEFAULT_CONFIG)) if File.exists?(File.join(CONFIG_DIR, DEFAULT_CONFIG))
51
25
  cp_config(source, dest)
52
- @mongodb_logger.send(:configure)
26
+ @mongodb_logger.send(:configure) if @mongodb_logger
53
27
  end
54
28
 
55
29
  def cp_config(source, dest = source)
56
30
  FileUtils.cp(File.join(SAMPLE_CONFIG_DIR, source), File.join(CONFIG_DIR, dest))
57
31
  end
58
32
 
59
- def teardown_for_config(file)
33
+ def cleanup_for_config(file)
60
34
  File.delete(File.join(CONFIG_DIR, file)) if File.exists?(File.join(CONFIG_DIR, file))
61
35
  end
62
36
 
63
- def log_metadata(options)
64
- @mongodb_logger.mongoize({"id" => 1}) do
65
- @mongodb_logger.add_metadata(options)
66
- end
37
+ def create_mongo_user
38
+ db_conf = @mongodb_logger.db_configuration
39
+ @user = db_conf['username']
40
+ @mongo_connection = ::Mongo::Connection.new(db_conf['host'],
41
+ db_conf['port']).db(db_conf['database'])
42
+ @mongo_connection.add_user(@user, db_conf['password'])
67
43
  end
68
44
 
69
- def require_bogus_active_record
70
- require 'active_record'
45
+ def remove_mongo_user
46
+ @mongo_connection.remove_user(@user)
71
47
  end
72
48
 
73
- def common_setup
49
+ def common_mongodb_logger_setup(options = {}, config = DEFAULT_CONFIG)
50
+ cp_config(config, DEFAULT_CONFIG)
51
+ @mongodb_logger = MongodbLogger::Logger.new(options)
74
52
  @mongo_adapter = @mongodb_logger.mongo_adapter
75
- @con = @mongo_adapter.connection
76
- @collection = @mongo_adapter.collection
53
+ @mongo_adapter.reset_collection
77
54
  end
78
-
79
- def reset_collection
80
- if @mongo_adapter && @collection
81
- @collection.drop
82
- @mongo_adapter.create_collection
55
+
56
+ # logs
57
+ def log_to_mongo(msg)
58
+ @mongodb_logger.mongoize({"id" => 1}) do
59
+ @mongodb_logger.debug(msg)
83
60
  end
84
61
  end
85
62
 
86
- def create_mongo_user
87
- db_conf = @mongodb_logger.db_configuration
88
- @user = db_conf['username']
89
- @mongo_connection = ::Mongo::Connection.new(db_conf['host'],
90
- db_conf['port']).db(db_conf['database'])
91
- @mongo_connection.add_user(@user, db_conf['password'])
63
+ def log_metadata_to_mongo(options)
64
+ @mongodb_logger.mongoize({"id" => 1}) do
65
+ @mongodb_logger.add_metadata(options)
66
+ end
92
67
  end
93
68
 
94
- def remove_mongo_user
95
- @mongo_connection.remove_user(@user)
69
+ def log_params_to_mongo(msg)
70
+ @mongodb_logger.mongoize({:params => msg})
71
+ end
72
+
73
+ def log_exception_to_mongo(msg)
74
+ @mongodb_logger.mongoize({"id" => 1}) do
75
+ raise msg
76
+ end
96
77
  end
97
78
 
98
- end
79
+ end
@@ -0,0 +1,22 @@
1
+ require File.expand_path(File.join(File.dirname(__FILE__), "rails.rb"))
2
+
3
+ module MongodbLogger::SpecMacros
4
+ def should_contain_one_log_record
5
+ it "contain a log record" do
6
+ @mongo_adapter.collection.find.count.should == 1
7
+ end
8
+ end
9
+
10
+ def should_use_database_name_in_config
11
+ it "use the database name in the config file" do
12
+ @mongodb_logger.db_configuration['database'].should == "system_log"
13
+ end
14
+ end
15
+
16
+ def should_have_default_capsize
17
+ it "cap collection the same size as in default" do
18
+ @mongo_adapter.collection_stats[:storageSize].should >= MongodbLogger::Logger::DEFAULT_COLLECTION_SIZE
19
+ @mongo_adapter.collection_stats[:storageSize].should < MongodbLogger::Logger::DEFAULT_COLLECTION_SIZE + 1.megabyte
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,40 @@
1
+ module MongodbLogger
2
+ class Application
3
+ end
4
+ end
5
+
6
+ class Rails
7
+ module VERSION
8
+ MAJOR = 3
9
+ end
10
+
11
+ def self.env
12
+ ActiveSupport::StringInquirer.new("test")
13
+ end
14
+
15
+ def self.root
16
+ Pathname.new(File.expand_path(File.join(File.dirname(__FILE__), "..", "..", "tmp")))
17
+ end
18
+
19
+ def self.application
20
+ MongodbLogger::Application.new
21
+ end
22
+
23
+ def self.logger
24
+ MongodbLogger::Logger.new
25
+ end
26
+ end
27
+
28
+ module ActiveRecord
29
+ class LogSubscriber
30
+ def self.colorize_logging
31
+ true
32
+ end
33
+ end
34
+
35
+ class Base
36
+ def self.colorize_logging
37
+ true
38
+ end
39
+ end
40
+ end
@@ -0,0 +1,32 @@
1
+ require 'spec_helper'
2
+ require File.dirname(__FILE__) + "/../../lib/mongodb_logger/utils/migrate"
3
+
4
+ describe MongodbLogger::Utils::Migrate do
5
+ extend MongodbLogger::SpecMacros
6
+
7
+ context "migrate" do
8
+ before do
9
+ common_mongodb_logger_setup
10
+ end
11
+
12
+ should_have_default_capsize
13
+
14
+ context 'after change config' do
15
+ before do
16
+ setup_for_config(MongodbLogger::SpecHelper::DEFAULT_CONFIG_CAPSIZE, MongodbLogger::SpecHelper::DEFAULT_CONFIG)
17
+ end
18
+
19
+ should_have_default_capsize
20
+
21
+ it 'changed after migration' do
22
+ MongodbLogger::Utils::Migrate.new
23
+ @mongodb_logger = MongodbLogger::Logger.new
24
+ @mongo_adapter = @mongodb_logger.mongo_adapter
25
+ @mongo_adapter.collection_stats[:storageSize].should >= 50.megabyte
26
+ @mongo_adapter.collection_stats[:storageSize].should < 51.megabyte
27
+ end
28
+ end
29
+
30
+ end
31
+
32
+ end
@@ -1,9 +1,17 @@
1
- require 'mongodb_logger/server/sprokets'
1
+ require 'mongodb_logger/server/helpers/sprokets'
2
+ require 'mongodb_logger/utils/migrate'
3
+
2
4
  namespace :mongodb_logger do
5
+ desc 'copy data from mongodb collection to another'
6
+ task :migrate => :environment do |t, args|
7
+ MongodbLogger::Utils::Migrate.new
8
+ puts "Operation finished"
9
+ end
10
+
3
11
  namespace :assets do
4
- desc 'compile assets'
5
- task :compile, [:output_dir] => [:compile_js, :compile_css, :compile_imgs] do
6
- end
12
+
13
+ desc 'compile all assets'
14
+ task :compile, [:output_dir] => [:compile_js, :compile_css, :compile_img]
7
15
 
8
16
  desc 'compile javascript assets'
9
17
  task :compile_js, [:output_dir] => :environment do |t, args|
@@ -24,9 +32,9 @@ namespace :mongodb_logger do
24
32
  asset.write_to(File.join(args.output_dir, sprockets.find_asset(asset_name).digest_path))
25
33
  puts "successfully compiled css assets"
26
34
  end
27
-
35
+
28
36
  desc 'compile images assets'
29
- task :compile_imgs, [:output_dir] => :environment do |t, args|
37
+ task :compile_img, [:output_dir] => :environment do |t, args|
30
38
  return (raise "Specify output dir for assets") if args.output_dir.nil?
31
39
  sprockets = MongodbLogger::Assets.instance
32
40
  asset_names = ['logo.png', 'spinner.gif']
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mongodb_logger
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.2
4
+ version: 0.5.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,14 +9,14 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-01-24 00:00:00.000000000 Z
12
+ date: 2013-03-16 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
- - - ! '>='
19
+ - - '>='
20
20
  - !ruby/object:Gem::Version
21
21
  version: '0'
22
22
  type: :development
@@ -24,7 +24,23 @@ dependencies:
24
24
  version_requirements: !ruby/object:Gem::Requirement
25
25
  none: false
26
26
  requirements:
27
- - - ! '>='
27
+ - - '>='
28
+ - !ruby/object:Gem::Version
29
+ version: '0'
30
+ - !ruby/object:Gem::Dependency
31
+ name: rspec-rails
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - '>='
36
+ - !ruby/object:Gem::Version
37
+ version: '0'
38
+ type: :development
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - '>='
28
44
  - !ruby/object:Gem::Version
29
45
  version: '0'
30
46
  - !ruby/object:Gem::Dependency
@@ -32,7 +48,7 @@ dependencies:
32
48
  requirement: !ruby/object:Gem::Requirement
33
49
  none: false
34
50
  requirements:
35
- - - ! '>='
51
+ - - '>='
36
52
  - !ruby/object:Gem::Version
37
53
  version: '0'
38
54
  type: :development
@@ -40,7 +56,7 @@ dependencies:
40
56
  version_requirements: !ruby/object:Gem::Requirement
41
57
  none: false
42
58
  requirements:
43
- - - ! '>='
59
+ - - '>='
44
60
  - !ruby/object:Gem::Version
45
61
  version: '0'
46
62
  - !ruby/object:Gem::Dependency
@@ -48,7 +64,7 @@ dependencies:
48
64
  requirement: !ruby/object:Gem::Requirement
49
65
  none: false
50
66
  requirements:
51
- - - ! '>='
67
+ - - '>='
52
68
  - !ruby/object:Gem::Version
53
69
  version: '0'
54
70
  type: :development
@@ -56,7 +72,7 @@ dependencies:
56
72
  version_requirements: !ruby/object:Gem::Requirement
57
73
  none: false
58
74
  requirements:
59
- - - ! '>='
75
+ - - '>='
60
76
  - !ruby/object:Gem::Version
61
77
  version: '0'
62
78
  - !ruby/object:Gem::Dependency
@@ -64,7 +80,23 @@ dependencies:
64
80
  requirement: !ruby/object:Gem::Requirement
65
81
  none: false
66
82
  requirements:
67
- - - ! '>='
83
+ - - '>='
84
+ - !ruby/object:Gem::Version
85
+ version: '0'
86
+ type: :development
87
+ prerelease: false
88
+ version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
90
+ requirements:
91
+ - - '>='
92
+ - !ruby/object:Gem::Version
93
+ version: '0'
94
+ - !ruby/object:Gem::Dependency
95
+ name: cucumber-rails
96
+ requirement: !ruby/object:Gem::Requirement
97
+ none: false
98
+ requirements:
99
+ - - '>='
68
100
  - !ruby/object:Gem::Version
69
101
  version: '0'
70
102
  type: :development
@@ -72,7 +104,7 @@ dependencies:
72
104
  version_requirements: !ruby/object:Gem::Requirement
73
105
  none: false
74
106
  requirements:
75
- - - ! '>='
107
+ - - '>='
76
108
  - !ruby/object:Gem::Version
77
109
  version: '0'
78
110
  - !ruby/object:Gem::Dependency
@@ -80,7 +112,7 @@ dependencies:
80
112
  requirement: !ruby/object:Gem::Requirement
81
113
  none: false
82
114
  requirements:
83
- - - ! '>='
115
+ - - '>='
84
116
  - !ruby/object:Gem::Version
85
117
  version: '0'
86
118
  type: :development
@@ -88,7 +120,7 @@ dependencies:
88
120
  version_requirements: !ruby/object:Gem::Requirement
89
121
  none: false
90
122
  requirements:
91
- - - ! '>='
123
+ - - '>='
92
124
  - !ruby/object:Gem::Version
93
125
  version: '0'
94
126
  - !ruby/object:Gem::Dependency
@@ -96,7 +128,7 @@ dependencies:
96
128
  requirement: !ruby/object:Gem::Requirement
97
129
  none: false
98
130
  requirements:
99
- - - ! '>='
131
+ - - '>='
100
132
  - !ruby/object:Gem::Version
101
133
  version: '0'
102
134
  type: :development
@@ -104,7 +136,7 @@ dependencies:
104
136
  version_requirements: !ruby/object:Gem::Requirement
105
137
  none: false
106
138
  requirements:
107
- - - ! '>='
139
+ - - '>='
108
140
  - !ruby/object:Gem::Version
109
141
  version: '0'
110
142
  - !ruby/object:Gem::Dependency
@@ -112,7 +144,7 @@ dependencies:
112
144
  requirement: !ruby/object:Gem::Requirement
113
145
  none: false
114
146
  requirements:
115
- - - ! '>='
147
+ - - '>='
116
148
  - !ruby/object:Gem::Version
117
149
  version: '0'
118
150
  type: :development
@@ -120,7 +152,7 @@ dependencies:
120
152
  version_requirements: !ruby/object:Gem::Requirement
121
153
  none: false
122
154
  requirements:
123
- - - ! '>='
155
+ - - '>='
124
156
  - !ruby/object:Gem::Version
125
157
  version: '0'
126
158
  - !ruby/object:Gem::Dependency
@@ -128,7 +160,39 @@ dependencies:
128
160
  requirement: !ruby/object:Gem::Requirement
129
161
  none: false
130
162
  requirements:
131
- - - ! '>='
163
+ - - '>='
164
+ - !ruby/object:Gem::Version
165
+ version: '0'
166
+ type: :development
167
+ prerelease: false
168
+ version_requirements: !ruby/object:Gem::Requirement
169
+ none: false
170
+ requirements:
171
+ - - '>='
172
+ - !ruby/object:Gem::Version
173
+ version: '0'
174
+ - !ruby/object:Gem::Dependency
175
+ name: appraisal
176
+ requirement: !ruby/object:Gem::Requirement
177
+ none: false
178
+ requirements:
179
+ - - '>='
180
+ - !ruby/object:Gem::Version
181
+ version: '0'
182
+ type: :development
183
+ prerelease: false
184
+ version_requirements: !ruby/object:Gem::Requirement
185
+ none: false
186
+ requirements:
187
+ - - '>='
188
+ - !ruby/object:Gem::Version
189
+ version: '0'
190
+ - !ruby/object:Gem::Dependency
191
+ name: aruba
192
+ requirement: !ruby/object:Gem::Requirement
193
+ none: false
194
+ requirements:
195
+ - - '>='
132
196
  - !ruby/object:Gem::Version
133
197
  version: '0'
134
198
  type: :development
@@ -136,7 +200,7 @@ dependencies:
136
200
  version_requirements: !ruby/object:Gem::Requirement
137
201
  none: false
138
202
  requirements:
139
- - - ! '>='
203
+ - - '>='
140
204
  - !ruby/object:Gem::Version
141
205
  version: '0'
142
206
  - !ruby/object:Gem::Dependency
@@ -144,7 +208,7 @@ dependencies:
144
208
  requirement: !ruby/object:Gem::Requirement
145
209
  none: false
146
210
  requirements:
147
- - - ! '>='
211
+ - - '>='
148
212
  - !ruby/object:Gem::Version
149
213
  version: '0'
150
214
  type: :development
@@ -152,7 +216,7 @@ dependencies:
152
216
  version_requirements: !ruby/object:Gem::Requirement
153
217
  none: false
154
218
  requirements:
155
- - - ! '>='
219
+ - - '>='
156
220
  - !ruby/object:Gem::Version
157
221
  version: '0'
158
222
  - !ruby/object:Gem::Dependency
@@ -160,7 +224,7 @@ dependencies:
160
224
  requirement: !ruby/object:Gem::Requirement
161
225
  none: false
162
226
  requirements:
163
- - - ! '>='
227
+ - - '>='
164
228
  - !ruby/object:Gem::Version
165
229
  version: '0'
166
230
  type: :development
@@ -168,7 +232,7 @@ dependencies:
168
232
  version_requirements: !ruby/object:Gem::Requirement
169
233
  none: false
170
234
  requirements:
171
- - - ! '>='
235
+ - - '>='
172
236
  - !ruby/object:Gem::Version
173
237
  version: '0'
174
238
  - !ruby/object:Gem::Dependency
@@ -176,7 +240,7 @@ dependencies:
176
240
  requirement: !ruby/object:Gem::Requirement
177
241
  none: false
178
242
  requirements:
179
- - - ! '>='
243
+ - - '>='
180
244
  - !ruby/object:Gem::Version
181
245
  version: 0.9.0
182
246
  type: :runtime
@@ -184,31 +248,31 @@ dependencies:
184
248
  version_requirements: !ruby/object:Gem::Requirement
185
249
  none: false
186
250
  requirements:
187
- - - ! '>='
251
+ - - '>='
188
252
  - !ruby/object:Gem::Version
189
253
  version: 0.9.0
190
254
  - !ruby/object:Gem::Dependency
191
- name: json
255
+ name: multi_json
192
256
  requirement: !ruby/object:Gem::Requirement
193
257
  none: false
194
258
  requirements:
195
- - - ~>
259
+ - - '>='
196
260
  - !ruby/object:Gem::Version
197
- version: 1.7.0
261
+ version: 1.6.0
198
262
  type: :runtime
199
263
  prerelease: false
200
264
  version_requirements: !ruby/object:Gem::Requirement
201
265
  none: false
202
266
  requirements:
203
- - - ~>
267
+ - - '>='
204
268
  - !ruby/object:Gem::Version
205
- version: 1.7.0
269
+ version: 1.6.0
206
270
  - !ruby/object:Gem::Dependency
207
271
  name: activesupport
208
272
  requirement: !ruby/object:Gem::Requirement
209
273
  none: false
210
274
  requirements:
211
- - - ! '>='
275
+ - - '>='
212
276
  - !ruby/object:Gem::Version
213
277
  version: 3.1.0
214
278
  type: :runtime
@@ -216,7 +280,7 @@ dependencies:
216
280
  version_requirements: !ruby/object:Gem::Requirement
217
281
  none: false
218
282
  requirements:
219
- - - ! '>='
283
+ - - '>='
220
284
  - !ruby/object:Gem::Version
221
285
  version: 3.1.0
222
286
  - !ruby/object:Gem::Dependency
@@ -224,7 +288,7 @@ dependencies:
224
288
  requirement: !ruby/object:Gem::Requirement
225
289
  none: false
226
290
  requirements:
227
- - - ! '>='
291
+ - - '>='
228
292
  - !ruby/object:Gem::Version
229
293
  version: 3.1.0
230
294
  type: :runtime
@@ -232,7 +296,7 @@ dependencies:
232
296
  version_requirements: !ruby/object:Gem::Requirement
233
297
  none: false
234
298
  requirements:
235
- - - ! '>='
299
+ - - '>='
236
300
  - !ruby/object:Gem::Version
237
301
  version: 3.1.0
238
302
  - !ruby/object:Gem::Dependency
@@ -240,7 +304,7 @@ dependencies:
240
304
  requirement: !ruby/object:Gem::Requirement
241
305
  none: false
242
306
  requirements:
243
- - - ! '>='
307
+ - - '>='
244
308
  - !ruby/object:Gem::Version
245
309
  version: 2.0.0
246
310
  type: :runtime
@@ -248,7 +312,7 @@ dependencies:
248
312
  version_requirements: !ruby/object:Gem::Requirement
249
313
  none: false
250
314
  requirements:
251
- - - ! '>='
315
+ - - '>='
252
316
  - !ruby/object:Gem::Version
253
317
  version: 2.0.0
254
318
  - !ruby/object:Gem::Dependency
@@ -256,7 +320,7 @@ dependencies:
256
320
  requirement: !ruby/object:Gem::Requirement
257
321
  none: false
258
322
  requirements:
259
- - - ~>
323
+ - - '>='
260
324
  - !ruby/object:Gem::Version
261
325
  version: 1.3.0
262
326
  type: :runtime
@@ -264,7 +328,7 @@ dependencies:
264
328
  version_requirements: !ruby/object:Gem::Requirement
265
329
  none: false
266
330
  requirements:
267
- - - ~>
331
+ - - '>='
268
332
  - !ruby/object:Gem::Version
269
333
  version: 1.3.0
270
334
  - !ruby/object:Gem::Dependency
@@ -272,7 +336,7 @@ dependencies:
272
336
  requirement: !ruby/object:Gem::Requirement
273
337
  none: false
274
338
  requirements:
275
- - - ~>
339
+ - - '>='
276
340
  - !ruby/object:Gem::Version
277
341
  version: 2.7.0
278
342
  type: :runtime
@@ -280,9 +344,25 @@ dependencies:
280
344
  version_requirements: !ruby/object:Gem::Requirement
281
345
  none: false
282
346
  requirements:
283
- - - ~>
347
+ - - '>='
284
348
  - !ruby/object:Gem::Version
285
349
  version: 2.7.0
350
+ - !ruby/object:Gem::Dependency
351
+ name: mustache
352
+ requirement: !ruby/object:Gem::Requirement
353
+ none: false
354
+ requirements:
355
+ - - '>='
356
+ - !ruby/object:Gem::Version
357
+ version: 0.99.0
358
+ type: :runtime
359
+ prerelease: false
360
+ version_requirements: !ruby/object:Gem::Requirement
361
+ none: false
362
+ requirements:
363
+ - - '>='
364
+ - !ruby/object:Gem::Version
365
+ version: 0.99.0
286
366
  - !ruby/object:Gem::Dependency
287
367
  name: vegas
288
368
  requirement: !ruby/object:Gem::Requirement
@@ -299,7 +379,7 @@ dependencies:
299
379
  - - ~>
300
380
  - !ruby/object:Gem::Version
301
381
  version: 0.1.0
302
- description: MongoDB logger for Rails 3
382
+ description: MongoDB logger for Rails
303
383
  email:
304
384
  - leopard.not.a@gmail.com
305
385
  executables:
@@ -312,13 +392,12 @@ files:
312
392
  - .gitignore
313
393
  - .rvmrc
314
394
  - .travis.yml
395
+ - Appraisals
315
396
  - CHANGELOG.md
316
397
  - Gemfile
317
398
  - LICENSE
318
399
  - README.md
319
400
  - Rakefile
320
- - SUPPORTED_RAILS_VERSIONS
321
- - TESTING.md
322
401
  - app/assets/images/arrow-down.png
323
402
  - app/assets/images/arrow-up.png
324
403
  - app/assets/images/date.png
@@ -336,9 +415,10 @@ files:
336
415
  - app/assets/javascripts/logs.js.coffee
337
416
  - app/assets/javascripts/mongodb_logger.js
338
417
  - app/assets/javascripts/vendors/highlight.pack.js
339
- - app/assets/javascripts/vendors/jquery-1.8.3.min.js
418
+ - app/assets/javascripts/vendors/jquery-1.9.1.min.js
340
419
  - app/assets/javascripts/vendors/jquery-ui-1.9.2.min.js
341
420
  - app/assets/javascripts/vendors/jquery.pjax.min.js
421
+ - app/assets/javascripts/vendors/mustache.min.js
342
422
  - app/assets/javascripts/vendors/rickshaw/d3.layout.min.js
343
423
  - app/assets/javascripts/vendors/rickshaw/d3.min.js
344
424
  - app/assets/javascripts/vendors/rickshaw/rickshaw.js
@@ -376,9 +456,12 @@ files:
376
456
  - features/rails.feature
377
457
  - features/step_definitions/mongodb_logger_web_steps.rb
378
458
  - features/step_definitions/rails_application_steps.rb
459
+ - features/step_definitions/rake_steps.rb
460
+ - features/support/aruba.rb
379
461
  - features/support/env.rb
380
462
  - features/support/rails.rb
381
- - features/support/terminal.rb
463
+ - gemfiles/rails31.gemfile
464
+ - gemfiles/rails32.gemfile
382
465
  - lib/mongodb_logger.rb
383
466
  - lib/mongodb_logger/adapters.rb
384
467
  - lib/mongodb_logger/adapters/base.rb
@@ -389,16 +472,23 @@ files:
389
472
  - lib/mongodb_logger/engine.rb
390
473
  - lib/mongodb_logger/initializer_mixin.rb
391
474
  - lib/mongodb_logger/logger.rb
475
+ - lib/mongodb_logger/rack_middleware.rb
392
476
  - lib/mongodb_logger/railtie.rb
393
477
  - lib/mongodb_logger/replica_set_helper.rb
394
478
  - lib/mongodb_logger/server.rb
395
- - lib/mongodb_logger/server/content_for.rb
479
+ - lib/mongodb_logger/server/helpers.rb
480
+ - lib/mongodb_logger/server/helpers/content_for.rb
481
+ - lib/mongodb_logger/server/helpers/mustache_helpers.rb
482
+ - lib/mongodb_logger/server/helpers/partials.rb
483
+ - lib/mongodb_logger/server/helpers/sprokets.rb
484
+ - lib/mongodb_logger/server/helpers/view_helpers.rb
485
+ - lib/mongodb_logger/server/model.rb
396
486
  - lib/mongodb_logger/server/model/additional_filter.rb
397
487
  - lib/mongodb_logger/server/model/analytic.rb
488
+ - lib/mongodb_logger/server/model/base.rb
398
489
  - lib/mongodb_logger/server/model/filter.rb
399
- - lib/mongodb_logger/server/partials.rb
400
- - lib/mongodb_logger/server/sprokets.rb
401
- - lib/mongodb_logger/server/view_helpers.rb
490
+ - lib/mongodb_logger/server/mustache/logs/info.rb
491
+ - lib/mongodb_logger/server/templates/logs/info.mustache
402
492
  - lib/mongodb_logger/server/views/analytics.erb
403
493
  - lib/mongodb_logger/server/views/error.erb
404
494
  - lib/mongodb_logger/server/views/layout.erb
@@ -406,42 +496,41 @@ files:
406
496
  - lib/mongodb_logger/server/views/shared/_collection_stats.erb
407
497
  - lib/mongodb_logger/server/views/shared/_dynamic_filter.erb
408
498
  - lib/mongodb_logger/server/views/shared/_log.erb
409
- - lib/mongodb_logger/server/views/shared/_log_info.erb
410
499
  - lib/mongodb_logger/server/views/shared/_message_tabs.erb
411
500
  - lib/mongodb_logger/server/views/shared/_tabs.erb
412
501
  - lib/mongodb_logger/server/views/shared/_tail_panel.erb
413
502
  - lib/mongodb_logger/server/views/shared/_top_panel.erb
503
+ - lib/mongodb_logger/server/views/shared/layout/_mustache.erb
414
504
  - lib/mongodb_logger/server/views/show_log.erb
415
505
  - lib/mongodb_logger/server_config.rb
506
+ - lib/mongodb_logger/utils/migrate.rb
507
+ - lib/mongodb_logger/utils/progressbar.rb
416
508
  - lib/mongodb_logger/version.rb
417
- - lib/tasks/mongodb_logger.rake
418
509
  - mongodb_logger.gemspec
510
+ - spec/factories/config/database.yml
511
+ - spec/factories/config/database_no_file_logging.yml
512
+ - spec/factories/config/database_replica_set.yml
513
+ - spec/factories/config/database_with_auth.yml
514
+ - spec/factories/config/database_with_capsize.yml
515
+ - spec/factories/config/database_with_collection.yml
516
+ - spec/factories/config/database_with_url.yml
517
+ - spec/factories/config/mongodb_logger.yml
518
+ - spec/factories/config/mongoid.yml
519
+ - spec/factories/config/server_config.yml
419
520
  - spec/javascripts/MongodbLoggerMainSpec.js
420
521
  - spec/javascripts/helpers/SpecHelper.js
421
522
  - spec/javascripts/support/jasmine.yml
422
523
  - spec/javascripts/support/jasmine_config.rb
423
524
  - spec/javascripts/support/jasmine_runner.rb
424
- - test/Gemfile_tests
425
- - test/active_record.rb
426
- - test/config/samples/database.yml
427
- - test/config/samples/database_no_file_logging.yml
428
- - test/config/samples/database_replica_set.yml
429
- - test/config/samples/database_with_auth.yml
430
- - test/config/samples/database_with_collection.yml
431
- - test/config/samples/database_with_url.yml
432
- - test/config/samples/mongodb_logger.yml
433
- - test/config/samples/mongoid.yml
434
- - test/config/samples/server_config.yml
435
- - test/log/.gitkeep
436
- - test/rails.rb
437
- - test/rails/app/controllers/order_controller.rb
438
- - test/rails/test/functional/order_controller_test.rb
439
- - test/rails/test/test_helper.rb
440
- - test/shoulda_macros/log_macros.rb
441
- - test/test.sh
442
- - test/test_helper.rb
443
- - test/unit/mongodb_logger_replica_test.rb
444
- - test/unit/mongodb_logger_test.rb
525
+ - spec/mongodb_logger_spec.rb
526
+ - spec/rails_spec/controllers/tests_controller_spec_rails.rb
527
+ - spec/rails_spec/spec_helper_rails.rb
528
+ - spec/spec_helper.rb
529
+ - spec/support/mongodb_logger_helper.rb
530
+ - spec/support/mongodb_logger_macros.rb
531
+ - spec/support/rails.rb
532
+ - spec/utils/migrate_spec.rb
533
+ - tasks/mongodb_logger.rake
445
534
  homepage: http://mongodb-logger.catware.org
446
535
  licenses: []
447
536
  post_install_message:
@@ -452,25 +541,56 @@ require_paths:
452
541
  required_ruby_version: !ruby/object:Gem::Requirement
453
542
  none: false
454
543
  requirements:
455
- - - ! '>='
544
+ - - '>='
456
545
  - !ruby/object:Gem::Version
457
546
  version: '0'
458
547
  segments:
459
548
  - 0
460
- hash: -1635214188254528067
549
+ hash: -1140087102498880128
461
550
  required_rubygems_version: !ruby/object:Gem::Requirement
462
551
  none: false
463
552
  requirements:
464
- - - ! '>='
553
+ - - '>='
465
554
  - !ruby/object:Gem::Version
466
555
  version: '0'
467
556
  segments:
468
557
  - 0
469
- hash: -1635214188254528067
558
+ hash: -1140087102498880128
470
559
  requirements: []
471
560
  rubyforge_project: mongodb_logger
472
- rubygems_version: 1.8.24
561
+ rubygems_version: 1.8.25
473
562
  signing_key:
474
563
  specification_version: 3
475
- summary: MongoDB logger for Rails 3
476
- test_files: []
564
+ summary: MongoDB logger for Rails
565
+ test_files:
566
+ - features/mongodb_logger_web.feature
567
+ - features/rails.feature
568
+ - features/step_definitions/mongodb_logger_web_steps.rb
569
+ - features/step_definitions/rails_application_steps.rb
570
+ - features/step_definitions/rake_steps.rb
571
+ - features/support/aruba.rb
572
+ - features/support/env.rb
573
+ - features/support/rails.rb
574
+ - spec/factories/config/database.yml
575
+ - spec/factories/config/database_no_file_logging.yml
576
+ - spec/factories/config/database_replica_set.yml
577
+ - spec/factories/config/database_with_auth.yml
578
+ - spec/factories/config/database_with_capsize.yml
579
+ - spec/factories/config/database_with_collection.yml
580
+ - spec/factories/config/database_with_url.yml
581
+ - spec/factories/config/mongodb_logger.yml
582
+ - spec/factories/config/mongoid.yml
583
+ - spec/factories/config/server_config.yml
584
+ - spec/javascripts/MongodbLoggerMainSpec.js
585
+ - spec/javascripts/helpers/SpecHelper.js
586
+ - spec/javascripts/support/jasmine.yml
587
+ - spec/javascripts/support/jasmine_config.rb
588
+ - spec/javascripts/support/jasmine_runner.rb
589
+ - spec/mongodb_logger_spec.rb
590
+ - spec/rails_spec/controllers/tests_controller_spec_rails.rb
591
+ - spec/rails_spec/spec_helper_rails.rb
592
+ - spec/spec_helper.rb
593
+ - spec/support/mongodb_logger_helper.rb
594
+ - spec/support/mongodb_logger_macros.rb
595
+ - spec/support/rails.rb
596
+ - spec/utils/migrate_spec.rb