about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2016-08-24 19:23:37 +0200
committerEugen Rochko <eugen@zeonfederated.com>2016-08-24 19:23:37 +0200
commitbc0692d75b1eeb7bc439869d892da9b835b40e0d (patch)
tree97094799e3c9234eefba49a068757c277e5e2628
parentd23671b5fd910e1c59f52938789a8a3321724ef6 (diff)
Removing mini-profiler that doesn't work, formatting timelines a bit better
-rw-r--r--.travis.yml4
-rw-r--r--Gemfile5
-rw-r--r--Gemfile.lock5
-rw-r--r--app/assets/javascripts/components/components/status.jsx7
-rw-r--r--app/controllers/application_controller.rb7
-rw-r--r--config/initializers/rack-mini-profiler.rb4
6 files changed, 4 insertions, 28 deletions
diff --git a/.travis.yml b/.travis.yml
index 65f9b59eb..e0bb93146 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -18,10 +18,6 @@ services:
 
 bundler_args: --without development production --retry=3 --jobs=3
 
-before_install:
-  - sudo apt-get -qq update
-  - sudo apt-get install -y nodejs nodejs-legacy npm
-
 before_script:
   - npm install
   - bundle exec rake db:create db:migrate
diff --git a/Gemfile b/Gemfile
index c4f4480f1..cd4989cb6 100644
--- a/Gemfile
+++ b/Gemfile
@@ -60,13 +60,8 @@ group :development do
   gem 'binding_of_caller'
   gem 'letter_opener'
   gem 'bullet'
-  gem 'memory_profiler'
 end
 
 group :production do
   gem 'rails_12factor'
 end
-
-group :development, :production do
-  gem 'rack-mini-profiler'
-end
diff --git a/Gemfile.lock b/Gemfile.lock
index 919a40a56..1ff69cb71 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -162,7 +162,6 @@ GEM
       nokogiri (>= 1.5.9)
     mail (2.6.4)
       mime-types (>= 1.16, < 4)
-    memory_profiler (0.9.6)
     method_source (0.8.2)
     mime-types (3.1)
       mime-types-data (~> 3.2015)
@@ -214,8 +213,6 @@ GEM
     rack (2.0.1)
     rack-attack (5.0.1)
       rack
-    rack-mini-profiler (0.10.1)
-      rack (>= 1.2.0)
     rack-test (0.6.3)
       rack (>= 1.0)
     rails (5.0.0.1)
@@ -380,7 +377,6 @@ DEPENDENCIES
   jbuilder (~> 2.0)
   jquery-rails
   letter_opener
-  memory_profiler
   nokogiri
   oj
   onebox
@@ -391,7 +387,6 @@ DEPENDENCIES
   puma
   rabl
   rack-attack
-  rack-mini-profiler
   rails (= 5.0.0.1)
   rails_12factor
   rails_autolink
diff --git a/app/assets/javascripts/components/components/status.jsx b/app/assets/javascripts/components/components/status.jsx
index 9bbb02077..68c1efaad 100644
--- a/app/assets/javascripts/components/components/status.jsx
+++ b/app/assets/javascripts/components/components/status.jsx
@@ -6,11 +6,12 @@ const Status = React.createClass({
   },
 
   render: function() {
-    console.log(this.props.status.toJS());
+    var content = { __html: this.props.status.get('content') };
 
     return (
-      <div style={{ height: '100px' }}>
-        {this.props.status.getIn(['account', 'username'])}: {this.props.status.get('content')}
+      <div style={{ padding: '5px' }}>
+        <div><strong>{this.props.status.getIn(['account', 'username'])}</strong></div>
+        <div dangerouslySetInnerHTML={content} />
       </div>
     );
   }
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb
index 399faa21e..73de1838c 100644
--- a/app/controllers/application_controller.rb
+++ b/app/controllers/application_controller.rb
@@ -5,13 +5,6 @@ class ApplicationController < ActionController::Base
 
   force_ssl if: "Rails.env.production? && ENV['LOCAL_HTTPS'] == 'true'"
 
-  # Profiling
-  before_action do
-    if (current_user && current_user.admin?) || Rails.env.development?
-      Rack::MiniProfiler.authorize_request
-    end
-  end
-
   helper_method :current_account
 
   protected
diff --git a/config/initializers/rack-mini-profiler.rb b/config/initializers/rack-mini-profiler.rb
deleted file mode 100644
index 01e8aaa15..000000000
--- a/config/initializers/rack-mini-profiler.rb
+++ /dev/null
@@ -1,4 +0,0 @@
-unless Rails.env == 'test'
-  Rails.application.middleware.swap(Rack::Deflater, Rack::MiniProfiler)
-  Rails.application.middleware.swap(Rack::MiniProfiler, Rack::Deflater)
-end