mongodb_logger 0.5.2 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 869d1bd5bc8d527263e521641148dc69847554d6
4
+ data.tar.gz: 63e6c1baac19db2e51eb55ca34130aad515356b8
5
+ SHA512:
6
+ metadata.gz: 7157cd077d0fecf0f876205e24765f6b2782a6a8c037610d0612fb5645fddf2e8df0557415d8c2e5ec10c215e050a1d86aa4c97cac07bc0019ecda7a3ab2d1d2
7
+ data.tar.gz: d00d4192fadef0a24f053f4f81fa7f8ac6a7d1c28d54d0e6c3f4617095d6db1d796a281e1a7fb5479493be2cf5997044caf62a3a6b453c5d4b8795deb663e975
data/.travis.yml CHANGED
@@ -2,12 +2,12 @@ language: ruby
2
2
  before_install:
3
3
  - "export DISPLAY=:99.0"
4
4
  - "sh -e /etc/init.d/xvfb start"
5
+ - gem install bundler --pre
5
6
  before_script:
6
7
  - bundle exec rake appraisal:install
7
8
  services:
8
9
  - mongodb
9
10
  rvm:
10
- - 1.9.2
11
11
  - 1.9.3
12
12
  - 2.0.0
13
13
  - jruby-19mode
data/Appraisals CHANGED
@@ -6,4 +6,10 @@ end
6
6
  appraise "rails32" do
7
7
  gem "rails", "~> 3.2.12"
8
8
  gem "mongodb_logger", :path => "../"
9
+ end
10
+
11
+ appraise "rails40" do
12
+ gem "rails", "4.0.0"
13
+ gem "minitest", "~> 4.0"
14
+ gem "mongodb_logger", :path => "../"
9
15
  end
data/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## master
2
+
3
+ ## 0.6.0
4
+
5
+ * Support Rails 4
6
+ * config as hash with indifferent access
7
+
1
8
  ## 0.5.2
2
9
 
3
10
  * Use new mongo API
data/README.md CHANGED
@@ -144,7 +144,7 @@ Beyond that, if you want to add extra information to the base of the document (l
144
144
  you can just call the Rails.logger.add\_metadata method on your logger like so (for example from a before\_filter):
145
145
 
146
146
  # make sure we're using the MongodbLogger in this environment
147
- Rails.logger.add_metadata(:user_id => @current_user.id) if Rails.logger.respond_to?(:add_metadata)
147
+ Rails.logger.add_metadata(user_id: @current_user.id) if Rails.logger.respond_to?(:add_metadata)
148
148
 
149
149
  ## Callback on exceptions
150
150
 
@@ -9,7 +9,7 @@ end
9
9
  require 'mongodb_logger/server'
10
10
 
11
11
  Vegas::Runner.new(MongodbLogger::Server, 'mongodb_logger_web', {
12
- :before_run => lambda {|v|
12
+ before_run: lambda {|v|
13
13
  config_file = (ENV['MONGODBLOGGERCONFIG'] || v.args.first)
14
14
  if config_file
15
15
  MongodbLogger::ServerConfig.set_config(config_file)
@@ -23,12 +23,12 @@ Given /^homepage$/ do
23
23
  end
24
24
 
25
25
  Then /^I should see text that no logs in system$/ do
26
- page.has_selector?('div', :text => 'No logs found, try to filter out the other parameters', :visible => true)
26
+ page.has_selector?('div', text: 'No logs found, try to filter out the other parameters', visible: true)
27
27
  end
28
28
 
29
29
  Given /^I should see start tail button$/ do
30
- page.has_link?('tailLogsLink', :visible => true)
31
- page.has_link?('tailLogsStopLink', :visible => false)
30
+ page.has_link?('tailLogsLink', visible: true)
31
+ page.has_link?('tailLogsStopLink', visible: false)
32
32
  end
33
33
 
34
34
  When /^I click on start tail button$/ do
@@ -36,12 +36,12 @@ When /^I click on start tail button$/ do
36
36
  end
37
37
 
38
38
  Then /^I should see stop tails button$/ do
39
- page.has_link?('tailLogsLink', :visible => false)
40
- page.has_link?('tailLogsStopLink', :visible => true)
39
+ page.has_link?('tailLogsLink', visible: false)
40
+ page.has_link?('tailLogsStopLink', visible: true)
41
41
  end
42
42
 
43
43
  Then /^box with time of last log tail$/ do
44
- page.has_selector?('span#tailLogsTime', :visible => true)
44
+ page.has_selector?('span#tailLogsTime', visible: true)
45
45
  end
46
46
 
47
47
  When /^I click on stop tail button$/ do
@@ -53,6 +53,10 @@ When /^I have copy tests_controller_spec$/ do
53
53
  test_file = File.join(PROJECT_ROOT, 'spec', 'rails_spec', 'controllers', 'tests_controller_spec_rails.rb')
54
54
  target = File.join(rails_root, 'spec', 'controllers', 'tests_controller_spec.rb')
55
55
  FileUtils.cp(test_file, target)
56
+ # init log file
57
+ logfile = File.join(rails_root, 'log', 'test.log')
58
+ FileUtils.touch(logfile)
59
+ FileUtils.chmod(0666, logfile)
56
60
  end
57
61
 
58
62
  When /^I have set up tests controllers$/ do
@@ -71,8 +75,8 @@ class TestsController < ApplicationController
71
75
  LOG_USER_ID = 12345
72
76
 
73
77
  def index
74
- logger.debug LOG_MESSAGE
75
- logger.add_metadata(:application_name_again => Rails.root.basename.to_s, :user_id => LOG_USER_ID)
78
+ logger.info LOG_MESSAGE
79
+ logger.add_metadata(application_name_again: Rails.root.basename.to_s, user_id: LOG_USER_ID)
76
80
  render text: "index"
77
81
  end
78
82
 
@@ -0,0 +1,9 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "http://rubygems.org"
4
+
5
+ gem "rails", "4.0.0"
6
+ gem "minitest", "~> 4.0"
7
+ gem "mongodb_logger", :path=>"../"
8
+
9
+ gemspec :path=>"../"
@@ -14,9 +14,9 @@ module MongodbLogger
14
14
 
15
15
  def self.included(base)
16
16
  base.class_eval do
17
- begin
17
+ if defined?(around_action)
18
18
  around_action :enable_mongodb_logger
19
- rescue
19
+ else
20
20
  around_filter :enable_mongodb_logger
21
21
  end
22
22
  end
@@ -26,19 +26,19 @@ module MongodbLogger
26
26
  return yield unless Rails.logger.respond_to?(:mongoize)
27
27
  f_session = (request.respond_to?(:session) ? request.session : session)
28
28
  Rails.logger.mongoize({
29
- :method => request.method,
30
- :action => action_name,
31
- :controller => controller_name,
32
- :path => request.path,
33
- :url => request.url,
34
- :params => (request.respond_to?(:filtered_parameters) ? request.filtered_parameters : params),
35
- :session => mongo_fix_session_keys(f_session),
36
- :ip => request.remote_ip
29
+ method: request.method,
30
+ action: action_name,
31
+ controller: controller_name,
32
+ path: request.path,
33
+ url: request.url,
34
+ params: (request.respond_to?(:filtered_parameters) ? request.filtered_parameters : params),
35
+ session: mongo_fix_session_keys(f_session),
36
+ ip: request.remote_ip
37
37
  }) { yield }
38
38
  end
39
39
  # session keys can be with dots. It is invalid keys for BSON
40
40
  def mongo_fix_session_keys(session = {})
41
- new_session = {}
41
+ new_session = Hash.new
42
42
  session.each do |i, j|
43
43
  new_session[i.gsub(/\./i, "|")] = j.inspect
44
44
  end if session
@@ -5,7 +5,7 @@ module MongodbLogger
5
5
  attr_reader :configuration, :connection, :connection_type, :collection, :authenticated
6
6
 
7
7
  def collection_name
8
- @configuration['collection']
8
+ @configuration[:collection]
9
9
  end
10
10
 
11
11
  def authenticated?
@@ -14,12 +14,12 @@ module MongodbLogger
14
14
 
15
15
  def check_for_collection
16
16
  # setup the capped collection if it doesn't already exist
17
- create_collection unless @connection.collection_names.include?(@configuration['collection'])
18
- @collection = @connection[@configuration['collection']]
17
+ create_collection unless @connection.collection_names.include?(@configuration[:collection])
18
+ @collection = @connection[@configuration[:collection]]
19
19
  end
20
20
 
21
21
  def rename_collection_command(admin_session, to, drop_target = false)
22
- admin_session.command({ renameCollection: "#{@configuration['database']}.#{collection_name}", to: "#{@configuration['database']}.#{to}", dropTarget: drop_target })
22
+ admin_session.command({ renameCollection: "#{@configuration[:database]}.#{collection_name}", to: "#{@configuration[:database]}.#{to}", dropTarget: drop_target })
23
23
  end
24
24
 
25
25
  def reset_collection
@@ -31,12 +31,12 @@ module MongodbLogger
31
31
 
32
32
  def collection_stats_hash(stats)
33
33
  {
34
- :is_capped => (stats["capped"] && ([1, true].include?(stats["capped"]))),
35
- :count => stats["count"].to_i,
36
- :size => stats["size"].to_f,
37
- :storageSize => stats["storageSize"].to_f,
38
- :db_name => @configuration["database"],
39
- :collection => collection_name
34
+ is_capped: (stats["capped"] && ([1, true].include?(stats["capped"]))),
35
+ count: stats["count"].to_i,
36
+ size: stats["size"].to_f,
37
+ storageSize: stats["storageSize"].to_f,
38
+ db_name: @configuration["database"],
39
+ collection: collection_name
40
40
  }
41
41
  end
42
42
 
@@ -5,24 +5,24 @@ module MongodbLogger
5
5
  def initialize(options = {})
6
6
  @authenticated = false
7
7
  @configuration = options
8
- if @configuration['url']
9
- uri = URI.parse(@configuration['url'])
10
- @configuration['database'] = uri.path.gsub(/^\//, '')
11
- @connection ||= mongo_connection_object.db(@configuration['database'])
8
+ if @configuration[:url]
9
+ uri = URI.parse(@configuration[:url])
10
+ @configuration[:database] = uri.path.gsub(/^\//, '')
11
+ @connection ||= mongo_connection_object.db(@configuration[:database])
12
12
  @authenticated = true
13
13
  else
14
- @connection ||= mongo_connection_object.db(@configuration['database'])
15
- if @configuration['username'] && @configuration['password']
14
+ @connection ||= mongo_connection_object.db(@configuration[:database])
15
+ if @configuration[:username] && @configuration[:password]
16
16
  # the driver stores credentials in case reconnection is required
17
- @authenticated = @connection.authenticate(@configuration['username'],
18
- @configuration['password'])
17
+ @authenticated = @connection.authenticate(@configuration[:username],
18
+ @configuration[:password])
19
19
  end
20
20
  end
21
21
  end
22
22
 
23
23
  def create_collection
24
24
  @connection.create_collection(collection_name,
25
- {:capped => true, :size => @configuration['capsize'].to_i})
25
+ { capped: true, size: @configuration[:capsize].to_i })
26
26
  end
27
27
 
28
28
  def insert_log_record(record, options = {})
@@ -57,34 +57,34 @@ module MongodbLogger
57
57
  end
58
58
  logs.reverse!
59
59
  else
60
- log = @collection.find_one({}, {:sort => ['$natural', -1]})
60
+ log = @collection.find_one({}, { sort: ['$natural', -1] })
61
61
  log_last_id = log["_id"].to_s unless log.blank?
62
62
  end
63
63
  {
64
- :log_last_id => log_last_id,
65
- :time => Time.now.strftime("%F %T"),
66
- :logs => logs
64
+ log_last_id: log_last_id,
65
+ time: Time.now.strftime("%F %T"),
66
+ logs: logs
67
67
  }
68
68
  end
69
69
 
70
70
  def calculate_mapreduce(map, reduce, params = {})
71
- @collection.map_reduce(map, reduce, {:query => params[:conditions], :sort => ['$natural', -1], :out => {:inline => true}, :raw => true}).find()
71
+ @collection.map_reduce(map, reduce, { query: params[:conditions], sort: ['$natural', -1], out: { inline: true }, raw: true }).find()
72
72
  end
73
73
 
74
74
  private
75
75
 
76
76
  def mongo_connection_object
77
- if @configuration['hosts']
78
- conn = ::Mongo::MongoReplicaSetClient.new(@configuration['hosts'],
79
- :pool_timeout => 6, :ssl => @configuration['ssl'])
80
- @configuration['replica_set'] = true
81
- elsif @configuration['url']
82
- conn = ::Mongo::MongoClient.from_uri(@configuration['url'])
77
+ if @configuration[:hosts]
78
+ conn = ::Mongo::MongoReplicaSetClient.new(@configuration[:hosts],
79
+ pool_timeout: 6, ssl: @configuration[:ssl])
80
+ @configuration[:replica_set] = true
81
+ elsif @configuration[:url]
82
+ conn = ::Mongo::MongoClient.from_uri(@configuration[:url])
83
83
  else
84
- conn = ::Mongo::MongoClient.new(@configuration['host'],
85
- @configuration['port'],
86
- :pool_timeout => 6,
87
- :ssl => @configuration['ssl'])
84
+ conn = ::Mongo::MongoClient.new(@configuration[:host],
85
+ @configuration[:port],
86
+ pool_timeout: 6,
87
+ ssl: @configuration[:ssl])
88
88
  end
89
89
  @connection_type = conn.class
90
90
  conn
@@ -4,25 +4,25 @@ module MongodbLogger
4
4
 
5
5
  def initialize(options = {})
6
6
  @configuration = options
7
- if @configuration['url']
8
- uri = URI.parse(@configuration['url'])
9
- @configuration['database'] = uri.path.gsub(/^\//, '')
7
+ if @configuration[:url]
8
+ uri = URI.parse(@configuration[:url])
9
+ @configuration[:database] = uri.path.gsub(/^\//, '')
10
10
  @connection ||= mongo_connection_object
11
- @connection.use @configuration['database']
11
+ @connection.use @configuration[:database]
12
12
  @authenticated = true
13
13
  else
14
14
  @connection ||= mongo_connection_object
15
- @connection.use @configuration['database']
16
- if @configuration['username'] && @configuration['password']
15
+ @connection.use @configuration[:database]
16
+ if @configuration[:username] && @configuration[:password]
17
17
  # the driver stores credentials in case reconnection is required
18
- @authenticated = @connection.login(@configuration['username'],
19
- @configuration['password'])
18
+ @authenticated = @connection.login(@configuration[:username],
19
+ @configuration[:password])
20
20
  end
21
21
  end
22
22
  end
23
23
 
24
24
  def create_collection
25
- @connection.command(create: collection_name, capped: true, size: @configuration['capsize'].to_i)
25
+ @connection.command(create: collection_name, capped: true, size: @configuration[:capsize].to_i)
26
26
  end
27
27
 
28
28
  def insert_log_record(record, options = {})
@@ -64,9 +64,9 @@ module MongodbLogger
64
64
  log_last_id = log["_id"].to_s unless log.blank?
65
65
  end
66
66
  {
67
- :log_last_id => log_last_id,
68
- :time => Time.now.strftime("%F %T"),
69
- :logs => logs
67
+ log_last_id: log_last_id,
68
+ time: Time.now.strftime("%F %T"),
69
+ logs: logs
70
70
  }
71
71
  end
72
72
 
@@ -84,13 +84,13 @@ module MongodbLogger
84
84
  private
85
85
 
86
86
  def mongo_connection_object
87
- if @configuration['hosts']
88
- conn = ::Moped::Session.new(@configuration['hosts'].map{|(host,port)| "#{host}:#{port}"}, :timeout => 6, :ssl => @configuration['ssl'])
87
+ if @configuration[:hosts]
88
+ conn = ::Moped::Session.new(@configuration[:hosts].map{|(host,port)| "#{host}:#{port}"}, timeout: 6, ssl: @configuration[:ssl])
89
89
  @configuration['replica_set'] = true
90
- elsif @configuration['url']
91
- conn = ::Moped::Session.connect(@configuration['url'])
90
+ elsif @configuration[:url]
91
+ conn = ::Moped::Session.connect(@configuration[:url])
92
92
  else
93
- conn = ::Moped::Session.new(["#{@configuration['host']}:#{@configuration['port']}"], :timeout => 6, :ssl => @configuration['ssl'])
93
+ conn = ::Moped::Session.new(["#{@configuration[:host]}:#{@configuration[:port]}"], timeout: 6, ssl: @configuration[:ssl])
94
94
  end
95
95
  @connection_type = conn.class
96
96
  conn
@@ -1,8 +1,7 @@
1
1
  Capistrano::Configuration.instance.load do
2
2
  _cset :mongodb_logger_asset_env, "RAILS_GROUPS=assets"
3
- _cset :mongodb_logger_assets_role, [:app]
4
3
  _cset :mongodb_logger_assets_dir, "public/assets"
5
-
4
+ _cset :mongodb_logger_assets_role, [:app]
6
5
  _cset :mongodb_logger_db_role, [:app]
7
6
 
8
7
  namespace :mongodb_logger do
@@ -10,14 +9,14 @@ Capistrano::Configuration.instance.load do
10
9
  desc <<-DESC
11
10
  Run the asset precompilation rake task.
12
11
  DESC
13
- task :precompile, :roles => mongodb_logger_assets_role, :except => { :no_release => true } do
12
+ task :precompile, roles: mongodb_logger_assets_role, except: { no_release: true } do
14
13
  run "cd #{latest_release} && #{rake} RAILS_ENV=#{rails_env} #{mongodb_logger_asset_env} mongodb_logger:assets:compile[#{mongodb_logger_assets_dir}]"
15
14
  end
16
15
 
17
16
  desc <<-DESC
18
17
  Run collection migrate rake task.
19
18
  DESC
20
- task :migrate, :roles => mongodb_logger_db_role, :except => { :no_release => true } do
19
+ task :migrate, roles: mongodb_logger_db_role, except: { no_release: true } do
21
20
  run "cd #{latest_release} && #{rake} RAILS_ENV=#{rails_env} mongodb_logger:migrate"
22
21
  end
23
22
  end
@@ -1,3 +1,5 @@
1
+ require 'mongodb_logger/rails_logger'
2
+
1
3
  module MongodbLogger
2
4
  module InitializerMixin
3
5
 
@@ -7,16 +9,16 @@ module MongodbLogger
7
9
 
8
10
  def create_logger(config)
9
11
  path = config.paths['log'].first
10
- level = ActiveSupport::BufferedLogger.const_get(config.log_level.to_s.upcase)
11
- logger = MongodbLogger::Logger.new(:path => path, :level => level)
12
+ level = RailsLogger.const_get(config.log_level.to_s.upcase)
13
+ logger = MongodbLogger::Logger.new(path, level)
12
14
  # decorating with TaggedLogging
13
15
  logger = MongodbLogger::TaggedLogger.new(logger) if defined?(ActiveSupport::TaggedLogging)
14
16
  logger.level = level
15
17
  logger.auto_flushing = false if Rails.env.production? && rails3(1)
16
18
  logger
17
19
  rescue StandardError => e
18
- logger = ActiveSupport::BufferedLogger.new(STDERR)
19
- logger.level = ActiveSupport::BufferedLogger::WARN
20
+ logger = RailsLogger.new(STDERR)
21
+ logger.level = RailsLogger::WARN
20
22
  logger.warn(
21
23
  "MongodbLogger Initializer Error: Unable to access log file. Please ensure that #{path} exists and is chmod 0666. " +
22
24
  "The log level has been raised to WARN and the output directed to STDERR until the problem is fixed." + "\n" +
@@ -2,13 +2,13 @@ require 'erb'
2
2
  require 'uri'
3
3
  require 'active_support'
4
4
  require 'active_support/core_ext'
5
- require 'active_support/core_ext/logger'
6
5
  require 'action_dispatch/http/upload'
6
+ require 'mongodb_logger/rails_logger'
7
7
  require 'mongodb_logger/adapters'
8
8
  require 'mongodb_logger/replica_set_helper'
9
9
 
10
10
  module MongodbLogger
11
- class Logger < ActiveSupport::BufferedLogger
11
+ class Logger < RailsLogger
12
12
  include ReplicaSetHelper
13
13
 
14
14
  DEFAULT_COLLECTION_SIZE = 250.megabytes
@@ -23,9 +23,9 @@ module MongodbLogger
23
23
 
24
24
  attr_reader :db_configuration, :mongo_adapter
25
25
 
26
- def initialize(options = {})
27
- path = options[:path] || File.join(Rails.root, "log/#{Rails.env}.log")
28
- @level = options[:level] || DEBUG
26
+ def initialize(path = nil, level = DEBUG)
27
+ path ||= File.join(Rails.root, "log/#{Rails.env}.log")
28
+ @level = level
29
29
  internal_initialize
30
30
  rescue => e
31
31
  # should use a config block for this
@@ -51,9 +51,10 @@ module MongodbLogger
51
51
 
52
52
  def add(severity, message = nil, progname = nil, &block)
53
53
  $stdout.puts(message) if ENV['HEROKU_RACK'] # log in stdout on Heroku
54
- if @level && @level <= severity && message.present? && @mongo_record.present?
54
+ if @level && @level <= severity && (message.present? || progname.present?) && @mongo_record.present?
55
55
  # do not modify the original message used by the buffered logger
56
- msg = logging_colorized? ? message.to_s.gsub(/(\e(\[([\d;]*[mz]?))?)?/, '').strip : message
56
+ msg = (message ? message : progname)
57
+ msg = logging_colorized? ? msg.to_s.gsub(/(\e(\[([\d;]*[mz]?))?)?/, '').strip : msg
57
58
  @mongo_record[:messages][LOG_LEVEL_SYM[severity]] << msg
58
59
  end
59
60
  # may modify the original message
@@ -62,14 +63,14 @@ module MongodbLogger
62
63
 
63
64
  def mongoize(options = {})
64
65
  @mongo_record = options.merge({
65
- :messages => Hash.new { |hash, key| hash[key] = Array.new },
66
- :request_time => Time.now.getutc,
67
- :application_name => @db_configuration['application_name']
66
+ messages: Hash.new { |hash, key| hash[key] = Array.new },
67
+ request_time: Time.now.getutc,
68
+ application_name: @db_configuration['application_name']
68
69
  })
69
70
 
70
71
  runtime = Benchmark.measure{ yield }.real if block_given?
71
72
  rescue Exception => e
72
- add(3, e.message.to_s + "\n" + e.backtrace.join("\n"))
73
+ add(3, "#{e.message}\n#{e.backtrace.join("\n")}")
73
74
  # log exceptions
74
75
  @mongo_record[:is_exception] = true
75
76
  # Reraise the exception for anyone else who cares
@@ -103,23 +104,23 @@ module MongodbLogger
103
104
  end
104
105
 
105
106
  def disable_file_logging?
106
- @db_configuration.fetch('disable_file_logging', false)
107
+ @db_configuration.fetch(:disable_file_logging, false)
107
108
  end
108
109
 
109
110
  def configure
110
111
  default_capsize = DEFAULT_COLLECTION_SIZE
111
112
  @db_configuration = {
112
- 'host' => 'localhost',
113
- 'port' => 27017,
114
- 'capsize' => default_capsize,
115
- 'ssl' => false}.merge(resolve_config)
116
- @db_configuration['collection'] ||= defined?(Rails) ? "#{Rails.env}_log" : "production_log"
117
- @db_configuration['application_name'] ||= resolve_application_name
118
- @db_configuration['write_options'] ||= { w: 0, wtimeout: 200 }
119
-
120
- @insert_block = @db_configuration.has_key?('replica_set') && @db_configuration['replica_set'] ?
121
- lambda { rescue_connection_failure{ insert_log_record(@db_configuration['write_options']) } } :
122
- lambda { insert_log_record(@db_configuration['write_options']) }
113
+ host: 'localhost',
114
+ port: 27017,
115
+ capsize: default_capsize,
116
+ ssl: false}.merge(resolve_config).with_indifferent_access
117
+ @db_configuration[:collection] ||= defined?(Rails) ? "#{Rails.env}_log" : "production_log"
118
+ @db_configuration[:application_name] ||= resolve_application_name
119
+ @db_configuration[:write_options] ||= { w: 0, wtimeout: 200 }
120
+
121
+ @insert_block = @db_configuration.has_key?(:replica_set) && @db_configuration[:replica_set] ?
122
+ lambda { rescue_connection_failure{ insert_log_record(@db_configuration[:write_options]) } } :
123
+ lambda { insert_log_record(@db_configuration[:write_options]) }
123
124
  end
124
125
 
125
126
  def resolve_application_name
@@ -140,6 +141,9 @@ module MongodbLogger
140
141
  end
141
142
 
142
143
  def find_adapter
144
+ return Adapers::Mongo if defined?(::Mongo)
145
+ return Adapers::Moped if defined?(::Moped)
146
+
143
147
  ADAPTERS.each do |(library, adapter)|
144
148
  begin
145
149
  require library
@@ -193,7 +197,7 @@ module MongodbLogger
193
197
  when Array
194
198
  data.map{ |v| nice_serialize_object(v) }
195
199
  when ActionDispatch::Http::UploadedFile, Rack::Test::UploadedFile # uploaded files
196
- hvalues = {
200
+ {
197
201
  original_filename: data.original_filename,
198
202
  content_type: data.content_type
199
203
  }
@@ -8,13 +8,15 @@ module MongodbLogger
8
8
  def call(env)
9
9
  request = ::Rack::Request.new env
10
10
  path = request.path.split('/')
11
- log_attrs = {:method => request.request_method,
12
- :action => path[2..-1].join('/'),
13
- :controller => path[1],
14
- :path => request.path,
15
- :url => request.url,
16
- :params => request.params,
17
- :ip => env['REMOTE_ADDR'] }
11
+ log_attrs = {
12
+ method: request.request_method,
13
+ action: path[2..-1].join('/'),
14
+ controller: path[1],
15
+ path: request.path,
16
+ url: request.url,
17
+ params: request.params,
18
+ ip: env['REMOTE_ADDR']
19
+ }
18
20
 
19
21
  Rails.logger.mongoize(log_attrs) do
20
22
  return @app.call(env)
@@ -0,0 +1,7 @@
1
+ module MongodbLogger
2
+ if defined?(ActiveSupport::Logger)
3
+ class RailsLogger < ActiveSupport::Logger; end
4
+ else
5
+ class RailsLogger < ActiveSupport::BufferedLogger; end
6
+ end
7
+ end
@@ -3,9 +3,8 @@ module MongodbLogger
3
3
  class Railtie < Rails::Railtie
4
4
  include MongodbLogger::InitializerMixin
5
5
 
6
- initializer :initialize_mongodb_logger, :before => :initialize_logger do
7
- app_config = Rails.application.config
8
- Rails.logger = config.logger = create_logger(app_config)
6
+ initializer :initialize_mongodb_logger, before: :initialize_logger do
7
+ Rails.logger = config.logger = create_logger(Rails.application.config)
9
8
  end
10
9
 
11
10
  rake_tasks do
@@ -43,18 +43,18 @@ module MongodbLogger
43
43
  @mongo_adapter = (ServerConfig.mongo_adapter ? ServerConfig.mongo_adapter : Rails.logger.mongo_adapter)
44
44
  @collection_stats = @mongo_adapter.collection_stats
45
45
  rescue => e
46
- erb :error, {:layout => false}, :error => "Can't connect to MongoDB!"
46
+ erb :error, { layout: false }, error: "Can't connect to MongoDB!"
47
47
  return false
48
48
  end
49
49
 
50
- cache_control :private, :must_revalidate, :max_age => 0
50
+ cache_control :private, :must_revalidate, max_age: 0
51
51
  end
52
52
 
53
53
  def show(page, layout = true)
54
54
  begin
55
- erb page.to_sym, {:layout => layout}
55
+ erb page.to_sym, { layout: layout }
56
56
  rescue => e
57
- erb :error, { :layout => false }, :error => "Error in view. Debug: #{e.inspect}"
57
+ erb :error, { layout: false }, error: "Error in view. Debug: #{e.inspect}"
58
58
  end
59
59
  end
60
60
 
@@ -63,7 +63,7 @@ module MongodbLogger
63
63
  end
64
64
 
65
65
  error do
66
- erb :error, { :layout => false }, :error => 'Sorry there was a nasty error. Maybe no connection to MongoDB. Debug: ' + env['sinatra.error'].inspect + '<br />' + env.inspect
66
+ erb :error, { layout: false }, error: 'Sorry there was a nasty error. Maybe no connection to MongoDB. Debug: ' + env['sinatra.error'].inspect + '<br />' + env.inspect
67
67
  end
68
68
 
69
69
  end
@@ -16,7 +16,7 @@ module MongodbLogger
16
16
  class << self
17
17
  def set_config(config_path)
18
18
  ENV['MONGODBLOGGERCONFIG'] = config_path
19
- @logger = ServerLogger.new(path: "server.log")
19
+ @logger = ServerLogger.new("server.log")
20
20
  @logger.mongo_adapter
21
21
  end
22
22
 
@@ -1,9 +1,20 @@
1
1
  module MongodbLogger
2
- class TaggedLogger < ActiveSupport::TaggedLogging
3
- delegate :mongoize, :add_metadata, to: :base_logger
2
+ # rails 3
3
+ if ActiveSupport::TaggedLogging.instance_of?(::Class)
4
+ class TaggedLogger < ActiveSupport::TaggedLogging
5
+ delegate :mongoize, :add_metadata, to: :mongo_logger
4
6
 
5
- def base_logger
6
- @logger
7
+ def mongo_logger
8
+ @logger
9
+ end
10
+ end
11
+ # rails 4
12
+ else
13
+ # module TaggedLogger
14
+ module TaggedLogger
15
+ def self.new(logger)
16
+ ActiveSupport::TaggedLogging.new(logger)
17
+ end
7
18
  end
8
19
  end
9
20
  end
@@ -40,7 +40,7 @@ module MongodbLogger
40
40
  class MongoMigrateLogger < MongodbLogger::Logger
41
41
  def initialize(config = {})
42
42
  @static_config = config
43
- super(path: "/dev/null")
43
+ super("/dev/null")
44
44
  end
45
45
 
46
46
  private
@@ -1,3 +1,3 @@
1
1
  module MongodbLogger
2
- VERSION = "0.5.2"
2
+ VERSION = "0.6.0"
3
3
  end
@@ -43,6 +43,7 @@ describe MongodbLogger::Logger do
43
43
  @mongodb_logger.send(:connect)
44
44
  @mongodb_logger.mongo_adapter.authenticated?.should be_true
45
45
  @mongodb_logger.db_configuration['database'].should == "system_log"
46
+ @mongodb_logger.db_configuration[:database].should == "system_log"
46
47
  end
47
48
  end
48
49
 
@@ -78,6 +79,13 @@ describe MongodbLogger::Logger do
78
79
  @mongo_adapter.configuration['ssl'].should == false
79
80
  end
80
81
 
82
+ it "set the default host, port, ssl and capsize if not configured in sym keys" do
83
+ @mongo_adapter.configuration[:host].should == 'localhost'
84
+ @mongo_adapter.configuration[:port].should == 27017
85
+ @mongo_adapter.configuration[:capsize].should == MongodbLogger::Logger::DEFAULT_COLLECTION_SIZE
86
+ @mongo_adapter.configuration[:ssl].should == false
87
+ end
88
+
81
89
  it "set the mongo collection name depending on the Rails environment" do
82
90
  @mongo_adapter.collection_name.should == "#{Rails.env}_log"
83
91
  end
@@ -117,6 +125,7 @@ describe MongodbLogger::Logger do
117
125
 
118
126
  it "be true" do
119
127
  @mongodb_logger.db_configuration['ssl'].should == true
128
+ @mongodb_logger.db_configuration[:ssl].should == true
120
129
  end
121
130
  end
122
131
 
@@ -243,7 +252,7 @@ describe MongodbLogger::Logger do
243
252
  context "after instantiation" do
244
253
  context "upon insertion of a log record" do
245
254
  before do
246
- @mongodb_logger = MongodbLogger::Logger.new(path: @log_file)
255
+ @mongodb_logger = MongodbLogger::Logger.new(@log_file)
247
256
  log_to_mongo("Test")
248
257
  end
249
258
 
@@ -17,7 +17,7 @@ describe TestsController do
17
17
 
18
18
  it "renders the index text" do
19
19
  get :index
20
- response.should render_template(text: "index")
20
+ response.body.should == "index"
21
21
  end
22
22
 
23
23
  it "log a single record" do
@@ -31,10 +31,10 @@ describe TestsController do
31
31
  get :index
32
32
  record = @collection.find.first
33
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
34
+ record["messages"]["info"].should_not be_nil
35
+ record["messages"]["info"].should be_a(Array)
36
+ record["messages"]["info"].size.should == 1
37
+ record["messages"]["info"].first.should == described_class::LOG_MESSAGE
38
38
  end
39
39
 
40
40
  it "write request method" do
@@ -49,7 +49,9 @@ module MongodbLogger::SpecHelper
49
49
 
50
50
  def common_mongodb_logger_setup(options = {}, config = DEFAULT_CONFIG)
51
51
  cp_config(config, DEFAULT_CONFIG)
52
- @mongodb_logger = MongodbLogger::Logger.new(options)
52
+ level = (options[:level] || MongodbLogger::Logger::DEBUG)
53
+ @mongodb_logger = MongodbLogger::Logger.new(nil, level)
54
+ @mongodb_logger.level = level
53
55
  @mongo_adapter = @mongodb_logger.mongo_adapter
54
56
  @mongo_adapter.reset_collection
55
57
  end
@@ -68,7 +70,7 @@ module MongodbLogger::SpecHelper
68
70
  end
69
71
 
70
72
  def log_params_to_mongo(msg)
71
- @mongodb_logger.mongoize({:params => msg})
73
+ @mongodb_logger.mongoize({params: msg})
72
74
  end
73
75
 
74
76
  def log_exception_to_mongo(msg)
metadata CHANGED
@@ -1,20 +1,18 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mongodb_logger
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.2
5
- prerelease:
4
+ version: 0.6.0
6
5
  platform: ruby
7
6
  authors:
8
7
  - Alexey Vasiliev
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-04-16 00:00:00.000000000 Z
11
+ date: 2013-07-03 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: rspec
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
17
  - - '>='
20
18
  - !ruby/object:Gem::Version
@@ -22,7 +20,6 @@ dependencies:
22
20
  type: :development
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
24
  - - '>='
28
25
  - !ruby/object:Gem::Version
@@ -30,7 +27,6 @@ dependencies:
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: rspec-rails
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
31
  - - '>='
36
32
  - !ruby/object:Gem::Version
@@ -38,7 +34,6 @@ dependencies:
38
34
  type: :development
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
38
  - - '>='
44
39
  - !ruby/object:Gem::Version
@@ -46,7 +41,6 @@ dependencies:
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: shoulda
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
45
  - - '>='
52
46
  - !ruby/object:Gem::Version
@@ -54,7 +48,6 @@ dependencies:
54
48
  type: :development
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
51
  requirements:
59
52
  - - '>='
60
53
  - !ruby/object:Gem::Version
@@ -62,7 +55,6 @@ dependencies:
62
55
  - !ruby/object:Gem::Dependency
63
56
  name: mocha
64
57
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
58
  requirements:
67
59
  - - '>='
68
60
  - !ruby/object:Gem::Version
@@ -70,7 +62,6 @@ dependencies:
70
62
  type: :development
71
63
  prerelease: false
72
64
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
65
  requirements:
75
66
  - - '>='
76
67
  - !ruby/object:Gem::Version
@@ -78,7 +69,6 @@ dependencies:
78
69
  - !ruby/object:Gem::Dependency
79
70
  name: cucumber
80
71
  requirement: !ruby/object:Gem::Requirement
81
- none: false
82
72
  requirements:
83
73
  - - '>='
84
74
  - !ruby/object:Gem::Version
@@ -86,7 +76,6 @@ dependencies:
86
76
  type: :development
87
77
  prerelease: false
88
78
  version_requirements: !ruby/object:Gem::Requirement
89
- none: false
90
79
  requirements:
91
80
  - - '>='
92
81
  - !ruby/object:Gem::Version
@@ -94,7 +83,6 @@ dependencies:
94
83
  - !ruby/object:Gem::Dependency
95
84
  name: cucumber-rails
96
85
  requirement: !ruby/object:Gem::Requirement
97
- none: false
98
86
  requirements:
99
87
  - - '>='
100
88
  - !ruby/object:Gem::Version
@@ -102,7 +90,6 @@ dependencies:
102
90
  type: :development
103
91
  prerelease: false
104
92
  version_requirements: !ruby/object:Gem::Requirement
105
- none: false
106
93
  requirements:
107
94
  - - '>='
108
95
  - !ruby/object:Gem::Version
@@ -110,7 +97,6 @@ dependencies:
110
97
  - !ruby/object:Gem::Dependency
111
98
  name: capybara
112
99
  requirement: !ruby/object:Gem::Requirement
113
- none: false
114
100
  requirements:
115
101
  - - '='
116
102
  - !ruby/object:Gem::Version
@@ -118,7 +104,6 @@ dependencies:
118
104
  type: :development
119
105
  prerelease: false
120
106
  version_requirements: !ruby/object:Gem::Requirement
121
- none: false
122
107
  requirements:
123
108
  - - '='
124
109
  - !ruby/object:Gem::Version
@@ -126,7 +111,6 @@ dependencies:
126
111
  - !ruby/object:Gem::Dependency
127
112
  name: coffee-script
128
113
  requirement: !ruby/object:Gem::Requirement
129
- none: false
130
114
  requirements:
131
115
  - - '>='
132
116
  - !ruby/object:Gem::Version
@@ -134,7 +118,6 @@ dependencies:
134
118
  type: :development
135
119
  prerelease: false
136
120
  version_requirements: !ruby/object:Gem::Requirement
137
- none: false
138
121
  requirements:
139
122
  - - '>='
140
123
  - !ruby/object:Gem::Version
@@ -142,7 +125,6 @@ dependencies:
142
125
  - !ruby/object:Gem::Dependency
143
126
  name: uglifier
144
127
  requirement: !ruby/object:Gem::Requirement
145
- none: false
146
128
  requirements:
147
129
  - - '>='
148
130
  - !ruby/object:Gem::Version
@@ -150,7 +132,6 @@ dependencies:
150
132
  type: :development
151
133
  prerelease: false
152
134
  version_requirements: !ruby/object:Gem::Requirement
153
- none: false
154
135
  requirements:
155
136
  - - '>='
156
137
  - !ruby/object:Gem::Version
@@ -158,7 +139,6 @@ dependencies:
158
139
  - !ruby/object:Gem::Dependency
159
140
  name: jasmine
160
141
  requirement: !ruby/object:Gem::Requirement
161
- none: false
162
142
  requirements:
163
143
  - - '>='
164
144
  - !ruby/object:Gem::Version
@@ -166,7 +146,6 @@ dependencies:
166
146
  type: :development
167
147
  prerelease: false
168
148
  version_requirements: !ruby/object:Gem::Requirement
169
- none: false
170
149
  requirements:
171
150
  - - '>='
172
151
  - !ruby/object:Gem::Version
@@ -174,7 +153,6 @@ dependencies:
174
153
  - !ruby/object:Gem::Dependency
175
154
  name: appraisal
176
155
  requirement: !ruby/object:Gem::Requirement
177
- none: false
178
156
  requirements:
179
157
  - - '>='
180
158
  - !ruby/object:Gem::Version
@@ -182,7 +160,6 @@ dependencies:
182
160
  type: :development
183
161
  prerelease: false
184
162
  version_requirements: !ruby/object:Gem::Requirement
185
- none: false
186
163
  requirements:
187
164
  - - '>='
188
165
  - !ruby/object:Gem::Version
@@ -190,7 +167,6 @@ dependencies:
190
167
  - !ruby/object:Gem::Dependency
191
168
  name: aruba
192
169
  requirement: !ruby/object:Gem::Requirement
193
- none: false
194
170
  requirements:
195
171
  - - '>='
196
172
  - !ruby/object:Gem::Version
@@ -198,7 +174,6 @@ dependencies:
198
174
  type: :development
199
175
  prerelease: false
200
176
  version_requirements: !ruby/object:Gem::Requirement
201
- none: false
202
177
  requirements:
203
178
  - - '>='
204
179
  - !ruby/object:Gem::Version
@@ -206,7 +181,6 @@ dependencies:
206
181
  - !ruby/object:Gem::Dependency
207
182
  name: mongo
208
183
  requirement: !ruby/object:Gem::Requirement
209
- none: false
210
184
  requirements:
211
185
  - - '>='
212
186
  - !ruby/object:Gem::Version
@@ -214,7 +188,6 @@ dependencies:
214
188
  type: :development
215
189
  prerelease: false
216
190
  version_requirements: !ruby/object:Gem::Requirement
217
- none: false
218
191
  requirements:
219
192
  - - '>='
220
193
  - !ruby/object:Gem::Version
@@ -222,7 +195,6 @@ dependencies:
222
195
  - !ruby/object:Gem::Dependency
223
196
  name: moped
224
197
  requirement: !ruby/object:Gem::Requirement
225
- none: false
226
198
  requirements:
227
199
  - - '>='
228
200
  - !ruby/object:Gem::Version
@@ -230,7 +202,6 @@ dependencies:
230
202
  type: :development
231
203
  prerelease: false
232
204
  version_requirements: !ruby/object:Gem::Requirement
233
- none: false
234
205
  requirements:
235
206
  - - '>='
236
207
  - !ruby/object:Gem::Version
@@ -238,7 +209,6 @@ dependencies:
238
209
  - !ruby/object:Gem::Dependency
239
210
  name: rake
240
211
  requirement: !ruby/object:Gem::Requirement
241
- none: false
242
212
  requirements:
243
213
  - - '>='
244
214
  - !ruby/object:Gem::Version
@@ -246,7 +216,6 @@ dependencies:
246
216
  type: :runtime
247
217
  prerelease: false
248
218
  version_requirements: !ruby/object:Gem::Requirement
249
- none: false
250
219
  requirements:
251
220
  - - '>='
252
221
  - !ruby/object:Gem::Version
@@ -254,7 +223,6 @@ dependencies:
254
223
  - !ruby/object:Gem::Dependency
255
224
  name: multi_json
256
225
  requirement: !ruby/object:Gem::Requirement
257
- none: false
258
226
  requirements:
259
227
  - - '>='
260
228
  - !ruby/object:Gem::Version
@@ -262,7 +230,6 @@ dependencies:
262
230
  type: :runtime
263
231
  prerelease: false
264
232
  version_requirements: !ruby/object:Gem::Requirement
265
- none: false
266
233
  requirements:
267
234
  - - '>='
268
235
  - !ruby/object:Gem::Version
@@ -270,7 +237,6 @@ dependencies:
270
237
  - !ruby/object:Gem::Dependency
271
238
  name: activesupport
272
239
  requirement: !ruby/object:Gem::Requirement
273
- none: false
274
240
  requirements:
275
241
  - - '>='
276
242
  - !ruby/object:Gem::Version
@@ -278,7 +244,6 @@ dependencies:
278
244
  type: :runtime
279
245
  prerelease: false
280
246
  version_requirements: !ruby/object:Gem::Requirement
281
- none: false
282
247
  requirements:
283
248
  - - '>='
284
249
  - !ruby/object:Gem::Version
@@ -286,7 +251,6 @@ dependencies:
286
251
  - !ruby/object:Gem::Dependency
287
252
  name: actionpack
288
253
  requirement: !ruby/object:Gem::Requirement
289
- none: false
290
254
  requirements:
291
255
  - - '>='
292
256
  - !ruby/object:Gem::Version
@@ -294,7 +258,6 @@ dependencies:
294
258
  type: :runtime
295
259
  prerelease: false
296
260
  version_requirements: !ruby/object:Gem::Requirement
297
- none: false
298
261
  requirements:
299
262
  - - '>='
300
263
  - !ruby/object:Gem::Version
@@ -302,7 +265,6 @@ dependencies:
302
265
  - !ruby/object:Gem::Dependency
303
266
  name: sprockets
304
267
  requirement: !ruby/object:Gem::Requirement
305
- none: false
306
268
  requirements:
307
269
  - - '>='
308
270
  - !ruby/object:Gem::Version
@@ -310,7 +272,6 @@ dependencies:
310
272
  type: :runtime
311
273
  prerelease: false
312
274
  version_requirements: !ruby/object:Gem::Requirement
313
- none: false
314
275
  requirements:
315
276
  - - '>='
316
277
  - !ruby/object:Gem::Version
@@ -318,7 +279,6 @@ dependencies:
318
279
  - !ruby/object:Gem::Dependency
319
280
  name: sinatra
320
281
  requirement: !ruby/object:Gem::Requirement
321
- none: false
322
282
  requirements:
323
283
  - - '>='
324
284
  - !ruby/object:Gem::Version
@@ -326,7 +286,6 @@ dependencies:
326
286
  type: :runtime
327
287
  prerelease: false
328
288
  version_requirements: !ruby/object:Gem::Requirement
329
- none: false
330
289
  requirements:
331
290
  - - '>='
332
291
  - !ruby/object:Gem::Version
@@ -334,7 +293,6 @@ dependencies:
334
293
  - !ruby/object:Gem::Dependency
335
294
  name: erubis
336
295
  requirement: !ruby/object:Gem::Requirement
337
- none: false
338
296
  requirements:
339
297
  - - '>='
340
298
  - !ruby/object:Gem::Version
@@ -342,7 +300,6 @@ dependencies:
342
300
  type: :runtime
343
301
  prerelease: false
344
302
  version_requirements: !ruby/object:Gem::Requirement
345
- none: false
346
303
  requirements:
347
304
  - - '>='
348
305
  - !ruby/object:Gem::Version
@@ -350,7 +307,6 @@ dependencies:
350
307
  - !ruby/object:Gem::Dependency
351
308
  name: mustache
352
309
  requirement: !ruby/object:Gem::Requirement
353
- none: false
354
310
  requirements:
355
311
  - - '>='
356
312
  - !ruby/object:Gem::Version
@@ -358,7 +314,6 @@ dependencies:
358
314
  type: :runtime
359
315
  prerelease: false
360
316
  version_requirements: !ruby/object:Gem::Requirement
361
- none: false
362
317
  requirements:
363
318
  - - '>='
364
319
  - !ruby/object:Gem::Version
@@ -366,7 +321,6 @@ dependencies:
366
321
  - !ruby/object:Gem::Dependency
367
322
  name: vegas
368
323
  requirement: !ruby/object:Gem::Requirement
369
- none: false
370
324
  requirements:
371
325
  - - ~>
372
326
  - !ruby/object:Gem::Version
@@ -374,7 +328,6 @@ dependencies:
374
328
  type: :runtime
375
329
  prerelease: false
376
330
  version_requirements: !ruby/object:Gem::Requirement
377
- none: false
378
331
  requirements:
379
332
  - - ~>
380
333
  - !ruby/object:Gem::Version
@@ -462,6 +415,7 @@ files:
462
415
  - features/support/rails.rb
463
416
  - gemfiles/rails31.gemfile
464
417
  - gemfiles/rails32.gemfile
418
+ - gemfiles/rails40.gemfile
465
419
  - lib/mongodb_logger.rb
466
420
  - lib/mongodb_logger/adapters.rb
467
421
  - lib/mongodb_logger/adapters/base.rb
@@ -473,6 +427,7 @@ files:
473
427
  - lib/mongodb_logger/initializer_mixin.rb
474
428
  - lib/mongodb_logger/logger.rb
475
429
  - lib/mongodb_logger/rack_middleware.rb
430
+ - lib/mongodb_logger/rails_logger.rb
476
431
  - lib/mongodb_logger/railtie.rb
477
432
  - lib/mongodb_logger/replica_set_helper.rb
478
433
  - lib/mongodb_logger/server.rb
@@ -537,34 +492,27 @@ files:
537
492
  - tasks/mongodb_logger.rake
538
493
  homepage: http://mongodb-logger.catware.org
539
494
  licenses: []
495
+ metadata: {}
540
496
  post_install_message:
541
497
  rdoc_options:
542
498
  - --charset=UTF-8
543
499
  require_paths:
544
500
  - lib
545
501
  required_ruby_version: !ruby/object:Gem::Requirement
546
- none: false
547
502
  requirements:
548
503
  - - '>='
549
504
  - !ruby/object:Gem::Version
550
505
  version: '0'
551
- segments:
552
- - 0
553
- hash: -1758663782148875802
554
506
  required_rubygems_version: !ruby/object:Gem::Requirement
555
- none: false
556
507
  requirements:
557
508
  - - '>='
558
509
  - !ruby/object:Gem::Version
559
510
  version: '0'
560
- segments:
561
- - 0
562
- hash: -1758663782148875802
563
511
  requirements: []
564
512
  rubyforge_project: mongodb_logger
565
- rubygems_version: 1.8.25
513
+ rubygems_version: 2.0.3
566
514
  signing_key:
567
- specification_version: 3
515
+ specification_version: 4
568
516
  summary: MongoDB logger for Rails
569
517
  test_files:
570
518
  - features/mongodb_logger_web.feature