Removing mini-profiler that doesn't work, formatting timelines a bit better
parent
d23671b5fd
commit
bc0692d75b
|
@ -18,10 +18,6 @@ services:
|
||||||
|
|
||||||
bundler_args: --without development production --retry=3 --jobs=3
|
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:
|
before_script:
|
||||||
- npm install
|
- npm install
|
||||||
- bundle exec rake db:create db:migrate
|
- bundle exec rake db:create db:migrate
|
||||||
|
|
5
Gemfile
5
Gemfile
|
@ -60,13 +60,8 @@ group :development do
|
||||||
gem 'binding_of_caller'
|
gem 'binding_of_caller'
|
||||||
gem 'letter_opener'
|
gem 'letter_opener'
|
||||||
gem 'bullet'
|
gem 'bullet'
|
||||||
gem 'memory_profiler'
|
|
||||||
end
|
end
|
||||||
|
|
||||||
group :production do
|
group :production do
|
||||||
gem 'rails_12factor'
|
gem 'rails_12factor'
|
||||||
end
|
end
|
||||||
|
|
||||||
group :development, :production do
|
|
||||||
gem 'rack-mini-profiler'
|
|
||||||
end
|
|
||||||
|
|
|
@ -162,7 +162,6 @@ GEM
|
||||||
nokogiri (>= 1.5.9)
|
nokogiri (>= 1.5.9)
|
||||||
mail (2.6.4)
|
mail (2.6.4)
|
||||||
mime-types (>= 1.16, < 4)
|
mime-types (>= 1.16, < 4)
|
||||||
memory_profiler (0.9.6)
|
|
||||||
method_source (0.8.2)
|
method_source (0.8.2)
|
||||||
mime-types (3.1)
|
mime-types (3.1)
|
||||||
mime-types-data (~> 3.2015)
|
mime-types-data (~> 3.2015)
|
||||||
|
@ -214,8 +213,6 @@ GEM
|
||||||
rack (2.0.1)
|
rack (2.0.1)
|
||||||
rack-attack (5.0.1)
|
rack-attack (5.0.1)
|
||||||
rack
|
rack
|
||||||
rack-mini-profiler (0.10.1)
|
|
||||||
rack (>= 1.2.0)
|
|
||||||
rack-test (0.6.3)
|
rack-test (0.6.3)
|
||||||
rack (>= 1.0)
|
rack (>= 1.0)
|
||||||
rails (5.0.0.1)
|
rails (5.0.0.1)
|
||||||
|
@ -380,7 +377,6 @@ DEPENDENCIES
|
||||||
jbuilder (~> 2.0)
|
jbuilder (~> 2.0)
|
||||||
jquery-rails
|
jquery-rails
|
||||||
letter_opener
|
letter_opener
|
||||||
memory_profiler
|
|
||||||
nokogiri
|
nokogiri
|
||||||
oj
|
oj
|
||||||
onebox
|
onebox
|
||||||
|
@ -391,7 +387,6 @@ DEPENDENCIES
|
||||||
puma
|
puma
|
||||||
rabl
|
rabl
|
||||||
rack-attack
|
rack-attack
|
||||||
rack-mini-profiler
|
|
||||||
rails (= 5.0.0.1)
|
rails (= 5.0.0.1)
|
||||||
rails_12factor
|
rails_12factor
|
||||||
rails_autolink
|
rails_autolink
|
||||||
|
|
|
@ -6,11 +6,12 @@ const Status = React.createClass({
|
||||||
},
|
},
|
||||||
|
|
||||||
render: function() {
|
render: function() {
|
||||||
console.log(this.props.status.toJS());
|
var content = { __html: this.props.status.get('content') };
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div style={{ height: '100px' }}>
|
<div style={{ padding: '5px' }}>
|
||||||
{this.props.status.getIn(['account', 'username'])}: {this.props.status.get('content')}
|
<div><strong>{this.props.status.getIn(['account', 'username'])}</strong></div>
|
||||||
|
<div dangerouslySetInnerHTML={content} />
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,13 +5,6 @@ class ApplicationController < ActionController::Base
|
||||||
|
|
||||||
force_ssl if: "Rails.env.production? && ENV['LOCAL_HTTPS'] == 'true'"
|
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
|
helper_method :current_account
|
||||||
|
|
||||||
protected
|
protected
|
||||||
|
|
|
@ -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
|
|
Loading…
Reference in New Issue