mongodb_logger 0.2.8-jruby → 0.3.0-jruby

Sign up to get free protection for your applications and to get access to all the features.
Files changed (68) hide show
  1. data/.gitignore +1 -0
  2. data/.travis.yml +0 -3
  3. data/README.md +8 -0
  4. data/Rakefile +2 -2
  5. data/SUPPORTED_RAILS_VERSIONS +2 -13
  6. data/{lib/mongodb_logger/server/public → app/assets}/images/arrow-down.png +0 -0
  7. data/{lib/mongodb_logger/server/public → app/assets}/images/arrow-up.png +0 -0
  8. data/{lib/mongodb_logger/server/public → app/assets}/images/date.png +0 -0
  9. data/{lib/mongodb_logger/server/public → app/assets}/images/external.png +0 -0
  10. data/{lib/mongodb_logger/server/public → app/assets}/images/failure.png +0 -0
  11. data/{lib/mongodb_logger/server/public → app/assets}/images/logo.png +0 -0
  12. data/{lib/mongodb_logger/server/public → app/assets}/images/mongodb.png +0 -0
  13. data/{lib/mongodb_logger/server/public → app/assets}/images/newlog.png +0 -0
  14. data/{lib/mongodb_logger/server/public → app/assets}/images/play-icon.png +0 -0
  15. data/{lib/mongodb_logger/server/public → app/assets}/images/spinner.gif +0 -0
  16. data/{lib/mongodb_logger/server/public → app/assets}/images/spinner2.gif +0 -0
  17. data/{lib/mongodb_logger/server/public → app/assets}/images/stop-icon.png +0 -0
  18. data/{lib/mongodb_logger/server/public → app/assets}/images/success.png +0 -0
  19. data/{lib/mongodb_logger/server/coffee/logs.coffee → app/assets/javascripts/logs.js.coffee} +0 -0
  20. data/app/assets/javascripts/mongodb_logger.js +2 -0
  21. data/{lib/mongodb_logger/server/public → app/assets}/javascripts/vendors/highlight.pack.js +0 -0
  22. data/{lib/mongodb_logger/server/public → app/assets}/javascripts/vendors/jquery-1.7.1.min.js +0 -0
  23. data/{lib/mongodb_logger/server/public → app/assets}/javascripts/vendors/jquery-ui-1.8.16.min.js +0 -0
  24. data/{lib/mongodb_logger/server/public → app/assets}/javascripts/vendors/jquery.pjax.min.js +0 -0
  25. data/{lib/mongodb_logger/server/public → app/assets}/stylesheets/grids.css +0 -0
  26. data/{lib/mongodb_logger/server/public/stylesheets/group-buttons.css → app/assets/stylesheets/group-buttons.css.erb} +2 -2
  27. data/{lib/mongodb_logger/server/public → app/assets}/stylesheets/group-forms.css +0 -0
  28. data/{lib/mongodb_logger/server/public → app/assets}/stylesheets/group-headers.css +0 -0
  29. data/{lib/mongodb_logger/server/public → app/assets}/stylesheets/group-tables.css +0 -0
  30. data/{lib/mongodb_logger/server/public → app/assets}/stylesheets/highlight/zenburn.css +0 -0
  31. data/{lib/mongodb_logger/server/public → app/assets}/stylesheets/humanity/images/ui-bg_flat_75_aaaaaa_40x100.png +0 -0
  32. data/{lib/mongodb_logger/server/public → app/assets}/stylesheets/humanity/images/ui-bg_glass_100_f5f0e5_1x400.png +0 -0
  33. data/{lib/mongodb_logger/server/public → app/assets}/stylesheets/humanity/images/ui-bg_glass_25_cb842e_1x400.png +0 -0
  34. data/{lib/mongodb_logger/server/public → app/assets}/stylesheets/humanity/images/ui-bg_glass_70_ede4d4_1x400.png +0 -0
  35. data/{lib/mongodb_logger/server/public → app/assets}/stylesheets/humanity/images/ui-bg_highlight-hard_100_f4f0ec_1x100.png +0 -0
  36. data/{lib/mongodb_logger/server/public → app/assets}/stylesheets/humanity/images/ui-bg_highlight-hard_65_fee4bd_1x100.png +0 -0
  37. data/{lib/mongodb_logger/server/public → app/assets}/stylesheets/humanity/images/ui-bg_highlight-hard_75_f5f5b5_1x100.png +0 -0
  38. data/{lib/mongodb_logger/server/public → app/assets}/stylesheets/humanity/images/ui-bg_inset-soft_100_f4f0ec_1x100.png +0 -0
  39. data/{lib/mongodb_logger/server/public → app/assets}/stylesheets/humanity/images/ui-icons_c47a23_256x240.png +0 -0
  40. data/{lib/mongodb_logger/server/public → app/assets}/stylesheets/humanity/images/ui-icons_cb672b_256x240.png +0 -0
  41. data/{lib/mongodb_logger/server/public → app/assets}/stylesheets/humanity/images/ui-icons_f08000_256x240.png +0 -0
  42. data/{lib/mongodb_logger/server/public → app/assets}/stylesheets/humanity/images/ui-icons_f35f07_256x240.png +0 -0
  43. data/{lib/mongodb_logger/server/public → app/assets}/stylesheets/humanity/images/ui-icons_ff7519_256x240.png +0 -0
  44. data/{lib/mongodb_logger/server/public → app/assets}/stylesheets/humanity/images/ui-icons_ffffff_256x240.png +0 -0
  45. data/{lib/mongodb_logger/server/public → app/assets}/stylesheets/humanity/jquery-ui-1.8.16.custom.css +0 -0
  46. data/{lib/mongodb_logger/server/public → app/assets}/stylesheets/layout.css +0 -0
  47. data/{lib/mongodb_logger/server/public/stylesheets/library.css → app/assets/stylesheets/library.css.erb} +8 -8
  48. data/app/assets/stylesheets/mongodb_logger.css +16 -0
  49. data/{lib/mongodb_logger/server/public → app/assets}/stylesheets/reset.css +0 -0
  50. data/{lib/mongodb_logger/server/public → app/assets}/stylesheets/spaces.css +0 -0
  51. data/lib/mongodb_logger/capistrano.rb +17 -0
  52. data/lib/mongodb_logger/engine.rb +5 -0
  53. data/lib/mongodb_logger/initializer_mixin.rb +3 -2
  54. data/lib/mongodb_logger/railtie.rb +4 -0
  55. data/lib/mongodb_logger/server/sprokets.rb +40 -0
  56. data/lib/mongodb_logger/server/views/layout.erb +3 -7
  57. data/lib/mongodb_logger/server/views/shared/_top_panel.erb +1 -1
  58. data/lib/mongodb_logger/server.rb +4 -7
  59. data/lib/mongodb_logger/version.rb +1 -1
  60. data/lib/mongodb_logger.rb +1 -0
  61. data/lib/tasks/mongodb_logger.rake +38 -0
  62. data/mongodb_logger.gemspec +9 -8
  63. data/mongodb_logger.java.gemspec +3 -2
  64. data/test/Gemfile_tests +8 -0
  65. data/test/test.sh +2 -1
  66. metadata +108 -91
  67. data/lib/mongodb_logger/server/public/javascripts/logs.js +0 -1
  68. data/lib/mongodb_logger/server/public/stylesheets/all.css +0 -12
data/.gitignore CHANGED
@@ -18,3 +18,4 @@ test/version_tmp
18
18
  test/log/*.log
19
19
  tmp
20
20
  .DS_Store
21
+ test/Gemfile_tests.lock
data/.travis.yml CHANGED
@@ -3,12 +3,9 @@ before_script:
3
3
  script: "sh -c 'export DISPLAY=:99.0 && test/test.sh'"
4
4
  language: ruby
5
5
  rvm:
6
- - 1.8.7
7
- # - ree
8
6
  - 1.9.2
9
7
  - 1.9.3
10
8
  - ruby-head
11
- - jruby
12
9
  # - jruby-head
13
10
  notifications:
14
11
  email: false
data/README.md CHANGED
@@ -67,6 +67,14 @@ It:
67
67
  - 27018
68
68
  - - 127.0.0.1
69
69
  - 27019
70
+
71
+ 1. For assets pipeline you can generate all js/css file into folder by rake task:
72
+
73
+ rake mongodb_logger:assets:compile[public/assets]
74
+
75
+ For capistrano possible compile assets by receipt. Add this to config/deploy.rb:
76
+
77
+ require 'mongodb_logger/capistrano'
70
78
 
71
79
 
72
80
  ## Usage
data/Rakefile CHANGED
@@ -77,9 +77,9 @@ LOCAL_GEM_ROOT = File.join(GEM_ROOT, 'tmp', 'local_gems').freeze
77
77
  if ENV['CI']
78
78
  # for ci testing only major rails versions
79
79
  if 'java' == RUBY_PLATFORM
80
- RAILS_VERSIONS = ['3.0.11', '3.1.3']
80
+ RAILS_VERSIONS = ['3.1.3', '3.2.5']
81
81
  else
82
- RAILS_VERSIONS = ['3.0.11', '3.1.3', '3.2.3']
82
+ RAILS_VERSIONS = ['3.1.3', '3.2.5']
83
83
  end
84
84
  else
85
85
  RAILS_VERSIONS = IO.read('SUPPORTED_RAILS_VERSIONS').strip.split("\n")
@@ -1,15 +1,3 @@
1
- 3.0.0
2
- 3.0.1
3
- 3.0.2
4
- 3.0.3
5
- 3.0.4
6
- 3.0.5
7
- 3.0.6
8
- 3.0.7
9
- 3.0.8
10
- 3.0.9
11
- 3.0.10
12
- 3.0.11
13
1
  3.1.0
14
2
  3.1.1
15
3
  3.1.2
@@ -17,4 +5,5 @@
17
5
  3.2.0
18
6
  3.2.1
19
7
  3.2.2
20
- 3.2.3
8
+ 3.2.3
9
+ 3.2.5
@@ -0,0 +1,2 @@
1
+ //= require_tree ./vendors/
2
+ //= require logs.js.coffee
@@ -71,11 +71,11 @@
71
71
  .start {
72
72
  display: inline-block;
73
73
  padding-left: 13px;
74
- background: url(../images/play-icon.png) no-repeat 0 -35px;
74
+ background: url(<%= asset_data_uri('play-icon.png') %>) no-repeat 0 -35px;
75
75
  }
76
76
 
77
77
  .stop {
78
78
  display: inline-block;
79
79
  padding-left: 13px;
80
- background: url(../images/stop-icon.png) no-repeat 0 5px;
80
+ background: url(<%= asset_data_uri('stop-icon.png') %>) no-repeat 0 5px;
81
81
  }
@@ -46,12 +46,12 @@ a:hover, a:active {
46
46
 
47
47
  .success {
48
48
  padding-right: 15px;
49
- background: url(../images/success.png) no-repeat 100% 50%;
49
+ background: url(<%= asset_data_uri('success.png') %>) no-repeat 100% 50%;
50
50
  }
51
51
 
52
52
  .failure {
53
53
  padding-right: 15px;
54
- background: url(../images/failure.png) no-repeat 100% 50%;
54
+ background: url(<%= asset_data_uri('failure.png') %>) no-repeat 100% 50%;
55
55
  }
56
56
 
57
57
  .notice {
@@ -62,7 +62,7 @@ a:hover, a:active {
62
62
  display: inline-block;
63
63
  margin-right: 5px;
64
64
  margin-left: -17px;
65
- /* background: url(../images/success.png) no-repeat 0 0; */
65
+ /* background: url(<%= asset_data_uri('success.png') %>) no-repeat 0 0; */
66
66
  }
67
67
 
68
68
  .error {
@@ -73,16 +73,16 @@ a:hover, a:active {
73
73
  display: inline-block;
74
74
  margin-right: 5px;
75
75
  margin-left: -17px;
76
- background: url(../images/failure.png) no-repeat 0 0;
76
+ background: url(<%= asset_data_uri('failure.png') %>) no-repeat 0 0;
77
77
  }
78
78
 
79
79
  .arrow-down {
80
80
  padding-right: 15px;
81
- background: url(../images/arrow-down.png) no-repeat 100% 50%;
81
+ background: url(<%= asset_data_uri('arrow-down.png') %>) no-repeat 100% 50%;
82
82
  }
83
83
 
84
84
  .arrow-down.rotate {
85
- background: url(../images/arrow-up.png) no-repeat 100% 50%;
85
+ background: url(<%= asset_data_uri('arrow-up.png') %>) no-repeat 100% 50%;
86
86
  }
87
87
 
88
88
  code {
@@ -156,7 +156,7 @@ code {
156
156
  font: 12px arial, sans-serif;
157
157
  vertical-align: middle;
158
158
  border: 1px solid #bbb;
159
- background: #fff url(../images/date.png) no-repeat 9px 50%;
159
+ background: #fff url(<%= asset_data_uri('date.png') %>) no-repeat 9px 50%;
160
160
  border-radius: 3px;
161
161
  box-shadow: 0 1px 2px #e6e6e6 inset, 0 1px 0 #fff;
162
162
  }
@@ -230,7 +230,7 @@ li.message_tab {
230
230
 
231
231
  a[target="_blank"] {
232
232
  display: inline-block;
233
- background: url(../images/external.png) no-repeat 0 3px;
233
+ background: url(<%= asset_data_uri('external.png') %>) no-repeat 0 3px;
234
234
  padding-left: 17px;
235
235
  }
236
236
 
@@ -0,0 +1,16 @@
1
+ /*
2
+ * This is a manifest file that'll automatically include all the stylesheets available in this directory
3
+ * and any sub-directories. You're free to add application-wide styles to this file and they'll appear at
4
+ * the top of the compiled file, but it's generally better to create a new file per style scope.
5
+ *= require "reset.css"
6
+ *= require "grids.css"
7
+ *= require "spaces.css"
8
+ *= require "layout.css"
9
+ *= require "library.css.erb"
10
+ *= require "group-headers.css"
11
+ *= require "group-buttons.css.erb"
12
+ *= require "group-forms.css"
13
+ *= require "group-tables.css"
14
+ *= require "humanity/jquery-ui-1.8.16.custom.css"
15
+ *= require "highlight/zenburn.css"
16
+ */
@@ -0,0 +1,17 @@
1
+ Capistrano::Configuration.instance.load do
2
+ after 'deploy:update_code', 'mongodb_logger:precompile'
3
+ _cset :mongodb_logger_asset_env, "RAILS_GROUPS=assets"
4
+ _cset :mongodb_logger_assets_role, [:web]
5
+ _cset :mongodb_logger_assets_dir, "public/assets"
6
+
7
+ namespace :mongodb_logger do
8
+
9
+ desc <<-DESC
10
+ Run the asset precompilation rake task.
11
+ DESC
12
+ task :precompile, :roles => mongodb_logger_assets_role, :except => { :no_release => true } do
13
+ run "cd #{latest_release} && #{rake} RAILS_ENV=#{rails_env} #{mongodb_logger_asset_env} mongodb_logger:assets:compile[#{mongodb_logger_assets_dir}]"
14
+ end
15
+
16
+ end
17
+ end
@@ -0,0 +1,5 @@
1
+ module MongodbLogger
2
+ class Engine < Rails::Engine
3
+ # auto wire assets
4
+ end
5
+ end
@@ -6,10 +6,11 @@ module MongodbLogger
6
6
  end
7
7
 
8
8
  def create_logger(config)
9
- path = rails3(0) ? config.paths.log.to_a.first : config.paths['log'].first
9
+ path = config.paths['log'].first
10
10
  level = ActiveSupport::BufferedLogger.const_get(config.log_level.to_s.upcase)
11
11
  logger = MongodbLogger::Logger.new(:path => path, :level => level)
12
- logger.auto_flushing = false if Rails.env.production? && (rails3(0) || rails3(1))
12
+ logger.level = level
13
+ logger.auto_flushing = false if Rails.env.production? && rails3(1)
13
14
  logger
14
15
  rescue StandardError => e
15
16
  logger = ActiveSupport::BufferedLogger.new(STDERR)
@@ -8,5 +8,9 @@ module MongodbLogger
8
8
  Rails.logger = config.logger = create_logger(app_config)
9
9
  end
10
10
 
11
+ rake_tasks do
12
+ load "tasks/mongodb_logger.rake"
13
+ end
14
+
11
15
  end
12
16
  end
@@ -0,0 +1,40 @@
1
+ require 'base64'
2
+ require 'rack/utils'
3
+ require 'sprockets'
4
+
5
+ module MongodbLogger
6
+
7
+ module AssetHelpers
8
+ def asset_path(source)
9
+ "/assets/#{Assets.instance.find_asset(source).digest_path}" unless Assets.instance.find_asset(source).nil?
10
+ end
11
+ def asset_data_uri(source)
12
+ unless Assets.instance.find_asset(source).nil?
13
+ asset = Assets.instance.find_asset(source)
14
+ base64 = Base64.encode64(asset.to_s).gsub(/\s+/, "")
15
+ "data:#{asset.content_type};base64,#{Rack::Utils.escape(base64)}"
16
+ end
17
+ end
18
+ end
19
+
20
+ class Assets < Sprockets::Environment
21
+ class << self
22
+ def instance(root = nil)
23
+ assets_path = File.expand_path('../../../../app/assets', __FILE__)
24
+ @instance ||= new(assets_path)
25
+ end
26
+ end
27
+
28
+ def initialize(assets_path)
29
+ super
30
+ append_path(File.join(assets_path, 'stylesheets'))
31
+ append_path(File.join(assets_path, 'javascripts'))
32
+ append_path(File.join(assets_path, 'images'))
33
+
34
+ context_class.instance_eval do
35
+ include AssetHelpers
36
+ end
37
+ end
38
+ end
39
+
40
+ end
@@ -2,7 +2,7 @@
2
2
  <html>
3
3
  <head>
4
4
  <title>MongoDB Logger</title>
5
- <link href="<%=u 'stylesheets/all.css' %>" media="screen" rel="stylesheet" type="text/css">
5
+ <link href="<%= asset_path('mongodb_logger.css') %>" media="screen" rel="stylesheet" type="text/css">
6
6
  </head>
7
7
  <body>
8
8
  <div class="page">
@@ -17,7 +17,7 @@
17
17
  <%= partial(:"shared/collection_stats", :object => @collection_stats) %>
18
18
  </div>
19
19
  </div>
20
- <a href="<%=h url_path("overview") %>" class="logo" data-pjax='#main_pjax'><img src="<%=u 'images/logo.png'%>" alt="MongoDB Logger"></a>
20
+ <a href="<%=h url_path("overview") %>" class="logo" data-pjax='#main_pjax'><img src="<%= asset_path 'logo.png' %>" alt="MongoDB Logger"></a>
21
21
  </div> <!-- wrapper -->
22
22
  </div> <!-- header -->
23
23
  <div class="content">
@@ -30,11 +30,7 @@
30
30
  </div>
31
31
 
32
32
  <!-- scripts -->
33
- <script src="<%=u 'javascripts/vendors/jquery-1.7.1.min.js' %>" type="text/javascript"></script>
34
- <script src="<%=u 'javascripts/vendors/jquery-ui-1.8.16.min.js' %>" type="text/javascript"></script>
35
- <script src="<%=u 'javascripts/vendors/jquery.pjax.min.js' %>" type="text/javascript"></script>
36
- <script src="<%=u 'javascripts/vendors/highlight.pack.js' %>" type="text/javascript"></script>
37
- <script src="<%=u 'javascripts/logs.js' %>" type="text/javascript"></script>
33
+ <script src="<%= asset_path('mongodb_logger.js') %>" type="text/javascript"></script>
38
34
 
39
35
  <!-- charts -->
40
36
  <script type="text/javascript" src="https://www.google.com/jsapi"></script>
@@ -3,5 +3,5 @@
3
3
  <div class="unit-right">
4
4
  <% yield_content :right_top_panel %>
5
5
  </div> <!-- unit-right -->
6
- <div id="ajax_loader"><img src="<%=u 'images/spinner.gif'%>" alt="loading..."></div>
6
+ <div id="ajax_loader"><img src="<%= asset_path 'spinner.gif' %>" alt="loading..."></div>
7
7
  </div> <!-- topline -->
@@ -6,6 +6,7 @@ require 'active_support'
6
6
  require 'mongodb_logger/server/view_helpers'
7
7
  require 'mongodb_logger/server/partials'
8
8
  require 'mongodb_logger/server/content_for'
9
+ require 'mongodb_logger/server/sprokets'
9
10
 
10
11
  require 'mongodb_logger/server/model/additional_filter'
11
12
  require 'mongodb_logger/server/model/filter'
@@ -26,18 +27,14 @@ module MongodbLogger
26
27
  dir = File.dirname(File.expand_path(__FILE__))
27
28
 
28
29
  set :views, "#{dir}/server/views"
29
-
30
- if respond_to? :public_folder
31
- set :public_folder, "#{dir}/server/public"
32
- else
33
- set :public, "#{dir}/server/public"
34
- end
35
30
  #set :environment, :production
36
31
  set :static, true
37
32
 
38
33
  helpers do
39
34
  include Rack::Utils
40
35
  alias_method :h, :escape_html
36
+ # pipeline
37
+ include AssetHelpers
41
38
 
42
39
  def current_page
43
40
  url_path request.path_info.sub('/','')
@@ -167,7 +164,7 @@ module MongodbLogger
167
164
  end
168
165
 
169
166
  error do
170
- erb :error, {:layout => false}, :error => 'Sorry there was a nasty error. Maybe no connection to MongoDB. Debug: ' + env['sinatra.error'].inspect
167
+ erb :error, {:layout => false}, :error => 'Sorry there was a nasty error. Maybe no connection to MongoDB. Debug: ' + env['sinatra.error'].inspect + '<br />' + env.inspect
171
168
  end
172
169
 
173
170
  end
@@ -1,3 +1,3 @@
1
1
  module MongodbLogger
2
- VERSION = "0.2.8"
2
+ VERSION = "0.3.0"
3
3
  end
@@ -4,6 +4,7 @@ require 'mongo'
4
4
  require 'mongodb_logger/config'
5
5
  require 'mongodb_logger/logger'
6
6
  require 'mongodb_logger/railtie' if defined?(Rails::Railtie)
7
+ require 'mongodb_logger/engine' if defined?(Rails::Engine)
7
8
  require 'mongodb_logger/version'
8
9
 
9
10
  module MongodbLogger
@@ -0,0 +1,38 @@
1
+ require 'mongodb_logger/server/sprokets'
2
+ namespace :mongodb_logger do
3
+ namespace :assets do
4
+ desc 'compile assets'
5
+ task :compile, [:output_dir] => [:compile_js, :compile_css, :compile_imgs] do
6
+ end
7
+
8
+ desc 'compile javascript assets'
9
+ task :compile_js, [:output_dir] => :environment do |t, args|
10
+ return (raise "Specify output dir for assets") if args.output_dir.nil?
11
+ sprockets = MongodbLogger::Assets.instance
12
+ asset_name = 'mongodb_logger.js'
13
+ asset = sprockets[asset_name]
14
+ asset.write_to(File.join(args.output_dir, sprockets.find_asset(asset_name).digest_path))
15
+ puts "successfully compiled js assets"
16
+ end
17
+
18
+ desc 'compile css assets'
19
+ task :compile_css, [:output_dir] => :environment do |t, args|
20
+ return (raise "Specify output dir for assets") if args.output_dir.nil?
21
+ sprockets = MongodbLogger::Assets.instance
22
+ asset_name = 'mongodb_logger.css'
23
+ asset = sprockets[asset_name]
24
+ asset.write_to(File.join(args.output_dir, sprockets.find_asset(asset_name).digest_path))
25
+ puts "successfully compiled css assets"
26
+ end
27
+
28
+ desc 'compile images assets'
29
+ task :compile_imgs, [:output_dir] => :environment do |t, args|
30
+ return (raise "Specify output dir for assets") if args.output_dir.nil?
31
+ sprockets = MongodbLogger::Assets.instance
32
+ asset_name = 'logo.png'
33
+ asset = sprockets[asset_name]
34
+ asset.write_to(File.join(args.output_dir, sprockets.find_asset(asset_name).digest_path))
35
+ puts "successfully compiled images assets"
36
+ end
37
+ end
38
+ end
@@ -15,22 +15,23 @@ Gem::Specification.new do |gem|
15
15
  gem.add_development_dependency "rspec", ">= 2.8.0"
16
16
  gem.add_development_dependency "shoulda", ">= 2.0.0"
17
17
  gem.add_development_dependency "mocha", ">= 0.10.0"
18
- gem.add_development_dependency "cucumber", "~> 1.1.2"
19
- gem.add_development_dependency "capybara", "~> 1.1.2"
20
- gem.add_development_dependency "coffee-script", "~> 2.2.0"
18
+ gem.add_development_dependency "cucumber", ">= 1.1.2"
19
+ gem.add_development_dependency "capybara", ">= 1.1.2"
21
20
  gem.add_development_dependency "uglifier", ">= 1.2.0"
22
21
  gem.add_development_dependency "therubyracer", ">= 0.9.9"
23
22
 
24
- gem.add_runtime_dependency "rake", "~> 0.9.0"
25
- gem.add_runtime_dependency "mongo", "~> 1.6.1"
26
- gem.add_runtime_dependency "bson_ext", "~> 1.6.1"
23
+ gem.add_runtime_dependency "rake", ">= 0.9.0"
24
+ gem.add_runtime_dependency "mongo", ">= 1.6.1"
25
+ gem.add_runtime_dependency "bson_ext", ">= 1.6.1"
27
26
  gem.add_runtime_dependency "i18n", ">= 0.4.1"
28
- gem.add_runtime_dependency "json", "~> 1.6.1"
27
+ gem.add_runtime_dependency "json", ">= 1.6.1"
29
28
  gem.add_runtime_dependency "activesupport", ">= 3.0.0"
30
29
  gem.add_runtime_dependency "actionpack", ">= 3.0.0"
30
+ gem.add_runtime_dependency "sprockets", ">= 2.0.0"
31
+ gem.add_runtime_dependency "coffee-script", ">= 2.2.0"
31
32
  gem.add_runtime_dependency "sinatra", ">= 1.2.0"
32
33
  gem.add_runtime_dependency "erubis", ">= 2.6.6"
33
- gem.add_runtime_dependency "vegas", "~> 0.1.2"
34
+ gem.add_runtime_dependency "vegas", ">= 0.1.2"
34
35
 
35
36
  gem.rubyforge_project = "mongodb_logger"
36
37
 
@@ -17,15 +17,16 @@ Gem::Specification.new do |gem|
17
17
  gem.add_development_dependency "mocha", ">= 0.10.0"
18
18
  gem.add_development_dependency "cucumber", "~> 1.1.2"
19
19
  gem.add_development_dependency "capybara", "~> 1.1.2"
20
- gem.add_development_dependency "coffee-script", "~> 2.2.0"
21
20
  gem.add_development_dependency "uglifier", ">= 1.2.0"
22
21
 
23
22
  gem.add_runtime_dependency "rake", "~> 0.9.0"
24
23
  gem.add_runtime_dependency "mongo", "~> 1.6.1"
25
24
  gem.add_runtime_dependency "i18n", ">= 0.4.1"
26
- gem.add_runtime_dependency "json", "~> 1.6.1"
25
+ gem.add_runtime_dependency "json", ">= 1.6.1"
27
26
  gem.add_runtime_dependency "activesupport", ">= 3.0.0"
28
27
  gem.add_runtime_dependency "actionpack", ">= 3.0.0"
28
+ gem.add_runtime_dependency "sprockets", ">= 2.0.0"
29
+ gem.add_runtime_dependency "coffee-script", "~> 2.2.0"
29
30
  gem.add_runtime_dependency "sinatra", ">= 1.2.0"
30
31
  gem.add_runtime_dependency "erubis", ">= 2.6.6"
31
32
  gem.add_runtime_dependency "vegas", "~> 0.1.2"
@@ -0,0 +1,8 @@
1
+ source 'http://rubygems.org'
2
+
3
+ gem "jasmine", ">= 1.0.0"
4
+ gem "rspec", ">= 2.8.0"
5
+ gem "shoulda", ">= 2.0.0"
6
+ gem "mocha", ">= 0.10.0"
7
+ gem "cucumber", "~> 1.1.2"
8
+ gem "capybara", "~> 1.1.2"
data/test/test.sh CHANGED
@@ -1,5 +1,6 @@
1
1
  #!/bin/bash
2
- rake vendor_test_gems && \
2
+ BUNDLE_GEMFILE=test/Gemfile_tests bundle
3
+ BUNDLE_GEMFILE=test/Gemfile_tests rake vendor_test_gems && \
3
4
  rake test && \
4
5
  rake cucumber:web && \
5
6
  #rake jasmine:ci && \
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.2.8
4
+ version: 0.3.0
5
5
  prerelease:
6
6
  platform: jruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-04-22 00:00:00.000000000 Z
12
+ date: 2012-06-10 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: jasmine
16
- requirement: &70176175566300 !ruby/object:Gem::Requirement
16
+ requirement: &70351656978920 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 1.0.0
22
22
  type: :development
23
23
  prerelease: false
24
- version_requirements: *70176175566300
24
+ version_requirements: *70351656978920
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: rspec
27
- requirement: &70176175565600 !ruby/object:Gem::Requirement
27
+ requirement: &70351656975420 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: 2.8.0
33
33
  type: :development
34
34
  prerelease: false
35
- version_requirements: *70176175565600
35
+ version_requirements: *70351656975420
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: shoulda
38
- requirement: &70176175565000 !ruby/object:Gem::Requirement
38
+ requirement: &70351656974440 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: 2.0.0
44
44
  type: :development
45
45
  prerelease: false
46
- version_requirements: *70176175565000
46
+ version_requirements: *70351656974440
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: mocha
49
- requirement: &70176175564380 !ruby/object:Gem::Requirement
49
+ requirement: &70351656973260 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ! '>='
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: 0.10.0
55
55
  type: :development
56
56
  prerelease: false
57
- version_requirements: *70176175564380
57
+ version_requirements: *70351656973260
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: cucumber
60
- requirement: &70176175563820 !ruby/object:Gem::Requirement
60
+ requirement: &70351656972120 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ~>
@@ -65,10 +65,10 @@ dependencies:
65
65
  version: 1.1.2
66
66
  type: :development
67
67
  prerelease: false
68
- version_requirements: *70176175563820
68
+ version_requirements: *70351656972120
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: capybara
71
- requirement: &70176175593020 !ruby/object:Gem::Requirement
71
+ requirement: &70351656970520 !ruby/object:Gem::Requirement
72
72
  none: false
73
73
  requirements:
74
74
  - - ~>
@@ -76,21 +76,10 @@ dependencies:
76
76
  version: 1.1.2
77
77
  type: :development
78
78
  prerelease: false
79
- version_requirements: *70176175593020
80
- - !ruby/object:Gem::Dependency
81
- name: coffee-script
82
- requirement: &70176175592240 !ruby/object:Gem::Requirement
83
- none: false
84
- requirements:
85
- - - ~>
86
- - !ruby/object:Gem::Version
87
- version: 2.2.0
88
- type: :development
89
- prerelease: false
90
- version_requirements: *70176175592240
79
+ version_requirements: *70351656970520
91
80
  - !ruby/object:Gem::Dependency
92
81
  name: uglifier
93
- requirement: &70176175590980 !ruby/object:Gem::Requirement
82
+ requirement: &70351656969180 !ruby/object:Gem::Requirement
94
83
  none: false
95
84
  requirements:
96
85
  - - ! '>='
@@ -98,10 +87,10 @@ dependencies:
98
87
  version: 1.2.0
99
88
  type: :development
100
89
  prerelease: false
101
- version_requirements: *70176175590980
90
+ version_requirements: *70351656969180
102
91
  - !ruby/object:Gem::Dependency
103
92
  name: rake
104
- requirement: &70176175590080 !ruby/object:Gem::Requirement
93
+ requirement: &70351656967300 !ruby/object:Gem::Requirement
105
94
  none: false
106
95
  requirements:
107
96
  - - ~>
@@ -109,10 +98,10 @@ dependencies:
109
98
  version: 0.9.0
110
99
  type: :runtime
111
100
  prerelease: false
112
- version_requirements: *70176175590080
101
+ version_requirements: *70351656967300
113
102
  - !ruby/object:Gem::Dependency
114
103
  name: mongo
115
- requirement: &70176175589420 !ruby/object:Gem::Requirement
104
+ requirement: &70351656963300 !ruby/object:Gem::Requirement
116
105
  none: false
117
106
  requirements:
118
107
  - - ~>
@@ -120,10 +109,10 @@ dependencies:
120
109
  version: 1.6.1
121
110
  type: :runtime
122
111
  prerelease: false
123
- version_requirements: *70176175589420
112
+ version_requirements: *70351656963300
124
113
  - !ruby/object:Gem::Dependency
125
114
  name: i18n
126
- requirement: &70176175588660 !ruby/object:Gem::Requirement
115
+ requirement: &70351656960220 !ruby/object:Gem::Requirement
127
116
  none: false
128
117
  requirements:
129
118
  - - ! '>='
@@ -131,21 +120,21 @@ dependencies:
131
120
  version: 0.4.1
132
121
  type: :runtime
133
122
  prerelease: false
134
- version_requirements: *70176175588660
123
+ version_requirements: *70351656960220
135
124
  - !ruby/object:Gem::Dependency
136
125
  name: json
137
- requirement: &70176175587880 !ruby/object:Gem::Requirement
126
+ requirement: &70351656958320 !ruby/object:Gem::Requirement
138
127
  none: false
139
128
  requirements:
140
- - - ~>
129
+ - - ! '>='
141
130
  - !ruby/object:Gem::Version
142
131
  version: 1.6.1
143
132
  type: :runtime
144
133
  prerelease: false
145
- version_requirements: *70176175587880
134
+ version_requirements: *70351656958320
146
135
  - !ruby/object:Gem::Dependency
147
136
  name: activesupport
148
- requirement: &70176175587140 !ruby/object:Gem::Requirement
137
+ requirement: &70351656955120 !ruby/object:Gem::Requirement
149
138
  none: false
150
139
  requirements:
151
140
  - - ! '>='
@@ -153,10 +142,10 @@ dependencies:
153
142
  version: 3.0.0
154
143
  type: :runtime
155
144
  prerelease: false
156
- version_requirements: *70176175587140
145
+ version_requirements: *70351656955120
157
146
  - !ruby/object:Gem::Dependency
158
147
  name: actionpack
159
- requirement: &70176175586520 !ruby/object:Gem::Requirement
148
+ requirement: &70351656784000 !ruby/object:Gem::Requirement
160
149
  none: false
161
150
  requirements:
162
151
  - - ! '>='
@@ -164,10 +153,32 @@ dependencies:
164
153
  version: 3.0.0
165
154
  type: :runtime
166
155
  prerelease: false
167
- version_requirements: *70176175586520
156
+ version_requirements: *70351656784000
157
+ - !ruby/object:Gem::Dependency
158
+ name: sprockets
159
+ requirement: &70351656782520 !ruby/object:Gem::Requirement
160
+ none: false
161
+ requirements:
162
+ - - ! '>='
163
+ - !ruby/object:Gem::Version
164
+ version: 2.0.0
165
+ type: :runtime
166
+ prerelease: false
167
+ version_requirements: *70351656782520
168
+ - !ruby/object:Gem::Dependency
169
+ name: coffee-script
170
+ requirement: &70351656780880 !ruby/object:Gem::Requirement
171
+ none: false
172
+ requirements:
173
+ - - ~>
174
+ - !ruby/object:Gem::Version
175
+ version: 2.2.0
176
+ type: :runtime
177
+ prerelease: false
178
+ version_requirements: *70351656780880
168
179
  - !ruby/object:Gem::Dependency
169
180
  name: sinatra
170
- requirement: &70176175585820 !ruby/object:Gem::Requirement
181
+ requirement: &70351656779400 !ruby/object:Gem::Requirement
171
182
  none: false
172
183
  requirements:
173
184
  - - ! '>='
@@ -175,10 +186,10 @@ dependencies:
175
186
  version: 1.2.0
176
187
  type: :runtime
177
188
  prerelease: false
178
- version_requirements: *70176175585820
189
+ version_requirements: *70351656779400
179
190
  - !ruby/object:Gem::Dependency
180
191
  name: erubis
181
- requirement: &70176175624260 !ruby/object:Gem::Requirement
192
+ requirement: &70351656777680 !ruby/object:Gem::Requirement
182
193
  none: false
183
194
  requirements:
184
195
  - - ! '>='
@@ -186,10 +197,10 @@ dependencies:
186
197
  version: 2.6.6
187
198
  type: :runtime
188
199
  prerelease: false
189
- version_requirements: *70176175624260
200
+ version_requirements: *70351656777680
190
201
  - !ruby/object:Gem::Dependency
191
202
  name: vegas
192
- requirement: &70176175623420 !ruby/object:Gem::Requirement
203
+ requirement: &70351656776660 !ruby/object:Gem::Requirement
193
204
  none: false
194
205
  requirements:
195
206
  - - ~>
@@ -197,7 +208,7 @@ dependencies:
197
208
  version: 0.1.2
198
209
  type: :runtime
199
210
  prerelease: false
200
- version_requirements: *70176175623420
211
+ version_requirements: *70351656776660
201
212
  description: MongoDB logger for Rails 3
202
213
  email:
203
214
  - leopard.not.a@gmail.com
@@ -218,6 +229,51 @@ files:
218
229
  - Rakefile
219
230
  - SUPPORTED_RAILS_VERSIONS
220
231
  - TESTING.md
232
+ - app/assets/images/arrow-down.png
233
+ - app/assets/images/arrow-up.png
234
+ - app/assets/images/date.png
235
+ - app/assets/images/external.png
236
+ - app/assets/images/failure.png
237
+ - app/assets/images/logo.png
238
+ - app/assets/images/mongodb.png
239
+ - app/assets/images/newlog.png
240
+ - app/assets/images/play-icon.png
241
+ - app/assets/images/spinner.gif
242
+ - app/assets/images/spinner2.gif
243
+ - app/assets/images/stop-icon.png
244
+ - app/assets/images/success.png
245
+ - app/assets/javascripts/logs.js.coffee
246
+ - app/assets/javascripts/mongodb_logger.js
247
+ - app/assets/javascripts/vendors/highlight.pack.js
248
+ - app/assets/javascripts/vendors/jquery-1.7.1.min.js
249
+ - app/assets/javascripts/vendors/jquery-ui-1.8.16.min.js
250
+ - app/assets/javascripts/vendors/jquery.pjax.min.js
251
+ - app/assets/stylesheets/grids.css
252
+ - app/assets/stylesheets/group-buttons.css.erb
253
+ - app/assets/stylesheets/group-forms.css
254
+ - app/assets/stylesheets/group-headers.css
255
+ - app/assets/stylesheets/group-tables.css
256
+ - app/assets/stylesheets/highlight/zenburn.css
257
+ - app/assets/stylesheets/humanity/images/ui-bg_flat_75_aaaaaa_40x100.png
258
+ - app/assets/stylesheets/humanity/images/ui-bg_glass_100_f5f0e5_1x400.png
259
+ - app/assets/stylesheets/humanity/images/ui-bg_glass_25_cb842e_1x400.png
260
+ - app/assets/stylesheets/humanity/images/ui-bg_glass_70_ede4d4_1x400.png
261
+ - app/assets/stylesheets/humanity/images/ui-bg_highlight-hard_100_f4f0ec_1x100.png
262
+ - app/assets/stylesheets/humanity/images/ui-bg_highlight-hard_65_fee4bd_1x100.png
263
+ - app/assets/stylesheets/humanity/images/ui-bg_highlight-hard_75_f5f5b5_1x100.png
264
+ - app/assets/stylesheets/humanity/images/ui-bg_inset-soft_100_f4f0ec_1x100.png
265
+ - app/assets/stylesheets/humanity/images/ui-icons_c47a23_256x240.png
266
+ - app/assets/stylesheets/humanity/images/ui-icons_cb672b_256x240.png
267
+ - app/assets/stylesheets/humanity/images/ui-icons_f08000_256x240.png
268
+ - app/assets/stylesheets/humanity/images/ui-icons_f35f07_256x240.png
269
+ - app/assets/stylesheets/humanity/images/ui-icons_ff7519_256x240.png
270
+ - app/assets/stylesheets/humanity/images/ui-icons_ffffff_256x240.png
271
+ - app/assets/stylesheets/humanity/jquery-ui-1.8.16.custom.css
272
+ - app/assets/stylesheets/layout.css
273
+ - app/assets/stylesheets/library.css.erb
274
+ - app/assets/stylesheets/mongodb_logger.css
275
+ - app/assets/stylesheets/reset.css
276
+ - app/assets/stylesheets/spaces.css
221
277
  - bin/mongodb_logger_web
222
278
  - config.ru
223
279
  - examples/server_config.yml
@@ -229,62 +285,20 @@ files:
229
285
  - features/support/rails.rb
230
286
  - features/support/terminal.rb
231
287
  - lib/mongodb_logger.rb
288
+ - lib/mongodb_logger/capistrano.rb
232
289
  - lib/mongodb_logger/config.rb
290
+ - lib/mongodb_logger/engine.rb
233
291
  - lib/mongodb_logger/initializer_mixin.rb
234
292
  - lib/mongodb_logger/logger.rb
235
293
  - lib/mongodb_logger/railtie.rb
236
294
  - lib/mongodb_logger/replica_set_helper.rb
237
295
  - lib/mongodb_logger/server.rb
238
- - lib/mongodb_logger/server/coffee/logs.coffee
239
296
  - lib/mongodb_logger/server/content_for.rb
240
297
  - lib/mongodb_logger/server/model/additional_filter.rb
241
298
  - lib/mongodb_logger/server/model/analytic.rb
242
299
  - lib/mongodb_logger/server/model/filter.rb
243
300
  - lib/mongodb_logger/server/partials.rb
244
- - lib/mongodb_logger/server/public/images/arrow-down.png
245
- - lib/mongodb_logger/server/public/images/arrow-up.png
246
- - lib/mongodb_logger/server/public/images/date.png
247
- - lib/mongodb_logger/server/public/images/external.png
248
- - lib/mongodb_logger/server/public/images/failure.png
249
- - lib/mongodb_logger/server/public/images/logo.png
250
- - lib/mongodb_logger/server/public/images/mongodb.png
251
- - lib/mongodb_logger/server/public/images/newlog.png
252
- - lib/mongodb_logger/server/public/images/play-icon.png
253
- - lib/mongodb_logger/server/public/images/spinner.gif
254
- - lib/mongodb_logger/server/public/images/spinner2.gif
255
- - lib/mongodb_logger/server/public/images/stop-icon.png
256
- - lib/mongodb_logger/server/public/images/success.png
257
- - lib/mongodb_logger/server/public/javascripts/logs.js
258
- - lib/mongodb_logger/server/public/javascripts/vendors/highlight.pack.js
259
- - lib/mongodb_logger/server/public/javascripts/vendors/jquery-1.7.1.min.js
260
- - lib/mongodb_logger/server/public/javascripts/vendors/jquery-ui-1.8.16.min.js
261
- - lib/mongodb_logger/server/public/javascripts/vendors/jquery.pjax.min.js
262
- - lib/mongodb_logger/server/public/stylesheets/all.css
263
- - lib/mongodb_logger/server/public/stylesheets/grids.css
264
- - lib/mongodb_logger/server/public/stylesheets/group-buttons.css
265
- - lib/mongodb_logger/server/public/stylesheets/group-forms.css
266
- - lib/mongodb_logger/server/public/stylesheets/group-headers.css
267
- - lib/mongodb_logger/server/public/stylesheets/group-tables.css
268
- - lib/mongodb_logger/server/public/stylesheets/highlight/zenburn.css
269
- - lib/mongodb_logger/server/public/stylesheets/humanity/images/ui-bg_flat_75_aaaaaa_40x100.png
270
- - lib/mongodb_logger/server/public/stylesheets/humanity/images/ui-bg_glass_100_f5f0e5_1x400.png
271
- - lib/mongodb_logger/server/public/stylesheets/humanity/images/ui-bg_glass_25_cb842e_1x400.png
272
- - lib/mongodb_logger/server/public/stylesheets/humanity/images/ui-bg_glass_70_ede4d4_1x400.png
273
- - lib/mongodb_logger/server/public/stylesheets/humanity/images/ui-bg_highlight-hard_100_f4f0ec_1x100.png
274
- - lib/mongodb_logger/server/public/stylesheets/humanity/images/ui-bg_highlight-hard_65_fee4bd_1x100.png
275
- - lib/mongodb_logger/server/public/stylesheets/humanity/images/ui-bg_highlight-hard_75_f5f5b5_1x100.png
276
- - lib/mongodb_logger/server/public/stylesheets/humanity/images/ui-bg_inset-soft_100_f4f0ec_1x100.png
277
- - lib/mongodb_logger/server/public/stylesheets/humanity/images/ui-icons_c47a23_256x240.png
278
- - lib/mongodb_logger/server/public/stylesheets/humanity/images/ui-icons_cb672b_256x240.png
279
- - lib/mongodb_logger/server/public/stylesheets/humanity/images/ui-icons_f08000_256x240.png
280
- - lib/mongodb_logger/server/public/stylesheets/humanity/images/ui-icons_f35f07_256x240.png
281
- - lib/mongodb_logger/server/public/stylesheets/humanity/images/ui-icons_ff7519_256x240.png
282
- - lib/mongodb_logger/server/public/stylesheets/humanity/images/ui-icons_ffffff_256x240.png
283
- - lib/mongodb_logger/server/public/stylesheets/humanity/jquery-ui-1.8.16.custom.css
284
- - lib/mongodb_logger/server/public/stylesheets/layout.css
285
- - lib/mongodb_logger/server/public/stylesheets/library.css
286
- - lib/mongodb_logger/server/public/stylesheets/reset.css
287
- - lib/mongodb_logger/server/public/stylesheets/spaces.css
301
+ - lib/mongodb_logger/server/sprokets.rb
288
302
  - lib/mongodb_logger/server/view_helpers.rb
289
303
  - lib/mongodb_logger/server/views/analytics.erb
290
304
  - lib/mongodb_logger/server/views/error.erb
@@ -301,6 +315,7 @@ files:
301
315
  - lib/mongodb_logger/server/views/show_log.erb
302
316
  - lib/mongodb_logger/server_config.rb
303
317
  - lib/mongodb_logger/version.rb
318
+ - lib/tasks/mongodb_logger.rake
304
319
  - mongodb_logger.gemspec
305
320
  - mongodb_logger.java.gemspec
306
321
  - spec/javascripts/MongodbLoggerMainSpec.js
@@ -308,6 +323,7 @@ files:
308
323
  - spec/javascripts/support/jasmine.yml
309
324
  - spec/javascripts/support/jasmine_config.rb
310
325
  - spec/javascripts/support/jasmine_runner.rb
326
+ - test/Gemfile_tests
311
327
  - test/active_record.rb
312
328
  - test/config/samples/database.yml
313
329
  - test/config/samples/database_no_file_logging.yml
@@ -365,6 +381,7 @@ test_files:
365
381
  - spec/javascripts/support/jasmine.yml
366
382
  - spec/javascripts/support/jasmine_config.rb
367
383
  - spec/javascripts/support/jasmine_runner.rb
384
+ - test/Gemfile_tests
368
385
  - test/active_record.rb
369
386
  - test/config/samples/database.yml
370
387
  - test/config/samples/database_no_file_logging.yml
@@ -1 +0,0 @@
1
- ((function(){var a;a=typeof global!="undefined"&&global!==null?global:window,a.MongodbLoggerMain={tail_logs_url:null,tail_log_started:!1,log_info_offset:null,log_info_padding:15,is_charts_ready:!1,init:function(){var a=this;return $(document).ajaxStart(function(){return $("#ajax_loader").show()}),$(document).ajaxStop(function(){return $("#ajax_loader").hide()}),$(document).on("click","#tail_logs_link",function(a){return MongodbLoggerMain.tail_logs_url=$(a.target).attr("data-url"),$("#tail_logs_block").addClass("started"),MongodbLoggerMain.tail_logs(null),!1}),$(document).on("click","#tail_logs_stop_link",function(a){return MongodbLoggerMain.tail_log_started=!1,$("#tail_logs_block").removeClass("started"),!1}),$(document).on("click",".log_info",function(a){var b,c;return b=$(a.target),c=b.data("url"),c==null&&(c=b.parent("tr").data("url")),c!=null&&(b.parents("table").find("tr").removeClass("current"),b.parent("tr").addClass("current"),$("#log_info").load(c)),!1}),$(document).on("click","div.filter-toggle",function(a){return $("div.filter").slideToggle(),$("div.filter-toggle span.arrow-down").toggleClass("rotate")}),$(document).on("click","#add_more_filter",function(a){var b;return b=$(a.target).attr("href"),$.ajax({url:b,success:function(a){var b;return b=$("<li></li>").html(a),$("#more_filter_list").append(b)}}),!1}),$(document).on("change","select.filter_type",function(a){var b,c;return b=$(a.target),c=b.attr("rel")+"/"+b.val(),$.ajax({url:c,dataType:"json",success:function(a){var c,d,e=this;c="",d="",$.each(a.conditions,function(a,b){return c+='<option value="'+b+'">'+b+"</option>"}),b.parents("div.filter_block").find("select.filter_conditions").empty().append(c),a.values.length>0?(d='<select id="filter[more][]_value" name="filter[more][][value]">',$.each(a.values,function(a,b){return d+='<option value="'+b+'">'+b+"</option>"}),d+="</select>"):d='<input type="text" name="filter[more][][value]" value="" placeholder="value">',b.parents("div.filter_block").find("div.filter_values").html(d);if("date"===b.val())return b.parents("div.filter_block").find("div.filter_values input").datepicker({dateFormat:"yy-mm-dd",changeMonth:!0,changeYear:!0,yearRange:"c-50:c+10"})}}),!1}),$(document).on("click",".close_more_filter",function(a){return $(a.target).parents("li").remove(),!1}),$(document).on("click","li.message_tab",function(a){var b,c;b=$(a.target),c=b.attr("data-tab");if(c!=null)return $("li.message_tab").removeClass("active"),$("pre.tab_content").addClass("hidden"),b.addClass("active"),$("."+c).removeClass("hidden")}),$(document).on("submit","#analyticForm",function(a){var b,c,d;return c=$("#analyticForm"),d=c.attr("action"),b=c.serializeArray(),$.ajax({url:d,dataType:"json",data:b,type:"POST",success:function(a,b,c){return MongodbLoggerMain.build_analytic_charts(a)}}),!1}),$(document).on("keydown","*",function(a){console.log(a.keyCode);switch(a.keyCode){case 37:return MongodbLoggerMain.move_by_logs("begin");case 38:return MongodbLoggerMain.move_by_logs("up");case 39:return MongodbLoggerMain.move_by_logs("end");case 40:return MongodbLoggerMain.move_by_logs("down")}}),this.init_pjax(),this.init_on_pages()},init_pjax:function(){var a=this;return $("a[data-pjax]").pjax(),$("body").bind("pjax:start",function(){return $("#ajax_loader").show()}),$("body").bind("pjax:end",function(){return $("#ajax_loader").hide(),MongodbLoggerMain.tail_log_started=!1,$(window).scrollTop()>100&&$("html, body").stop().animate({scrollTop:0},"slow"),MongodbLoggerMain.init_on_pages()})},init_on_pages:function(){var a=this;$("pre code").each(function(a,b){return hljs.highlightBlock(b," ")}),$(".datepicker, .filter_values input.date").datepicker({dateFormat:"yy-mm-dd",changeMonth:!0,changeYear:!0,yearRange:"c-50:c+10"});if($("#log_info").length>0)return MongodbLoggerMain.log_info_offset=$("#log_info").offset(),$(window).scroll(function(){return $(window).scrollTop()>MongodbLoggerMain.log_info_offset.top?$("#log_info").stop().animate({marginTop:$(window).scrollTop()-MongodbLoggerMain.log_info_offset.top+MongodbLoggerMain.log_info_padding}):$("#log_info").stop().animate({marginTop:0})})},tail_logs:function(a){var b;b=MongodbLoggerMain.tail_logs_url,a!=null&&a.length>0?b=MongodbLoggerMain.tail_logs_url+"/"+a:(MongodbLoggerMain.tail_log_started=!0,a="");if(MongodbLoggerMain.tail_log_started)return $.ajax({url:b,dataType:"json",success:function(b){var c,d;b.time&&($("#tail_logs_time").text(b.time),b.log_last_id!=null&&(a=b.log_last_id),b.content!=null&&b.content.length>0&&(c=$(b.content),c.addClass("newlog"),$("#logs_list tr:first").after(c).effect("highlight",{},1e3)),b.collection_stats&&$("#collection_stats").length>0&&$("#collection_stats").html(b.collection_stats));if(MongodbLoggerMain.tail_log_started)return d=function(){return MongodbLoggerMain.tail_logs(a)},setTimeout(d,2e3)}})},move_by_logs:function(a){var b,c;if($("#logs_list").length>0&&$("#logs_list").find("tr.current").length>0){b=$("#logs_list").find("tr.current");switch(a){case"begin":c=$("#logs_list tr:first").next("tr");if(c.length>0)return c.find("td:first").trigger("click"),$(window).scrollTop(c.height()+c.offset().top-100),!1;break;case"end":c=$("#logs_list tr:last");if(c.length>0)return c.find("td:first").trigger("click"),$(window).scrollTop(c.height()+c.offset().top-100),!1;break;case"down":c=b.next("tr");if(c.length>0)return c.find("td:first").trigger("click"),MongodbLoggerMain.is_scrolled_into_view(c)?$(window).scrollTop($(window).scrollTop()+c.height()):$(window).scrollTop(c.height()+c.offset().top-100),!1;break;case"up":c=b.prev("tr");if(c.length>0)return c.find("td:first").trigger("click"),MongodbLoggerMain.is_scrolled_into_view(c)?$(window).scrollTop($(window).scrollTop()-c.height()):$(window).scrollTop(c.height()+c.offset().top-100),!1}}},is_scrolled_into_view:function(a){var b,c,d,e;return c=$(window).scrollTop(),b=c+$(window).height(),e=$(a).offset().top,d=e+$(a).height(),c<e&&b>d},init_analytic_charts:function(){return MongodbLoggerMain.is_charts_ready=!0},build_analytic_charts:function(a){var b,c,d,e,f,g,h,i;if(MongodbLoggerMain.is_charts_ready!==!0)return alert("Error of loading Google Charts. Sorry :(");if(a.data!=null){c=new google.visualization.DataTable,c.addColumn("date","Date"),c.addColumn("number","Requests"),f=[],i=a.data;for(g=0,h=i.length;g<h;g++)e=i[g],f.push([new Date(e._id.year,e._id.month-1,e._id.day),e.value.count]);return c.addRows(f),b=new google.visualization.LineChart(document.getElementById("analyticData")),d={title:$("#analytic_type option:selected").text(),width:"100%",height:600,vAxis:{title:$("#analytic_type option:selected").text()}},b.draw(c,d)}}},$(function(){return MongodbLoggerMain.init()})})).call(this)
@@ -1,12 +0,0 @@
1
- @import "reset.css";
2
- @import "grids.css";
3
- @import "spaces.css";
4
- @import "layout.css";
5
- @import "library.css";
6
- @import "group-headers.css";
7
- @import "group-buttons.css";
8
- @import "group-forms.css";
9
- @import "group-tables.css";
10
-
11
- @import "humanity/jquery-ui-1.8.16.custom.css";
12
- @import "highlight/zenburn.css";