This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source 'https://rubygems.org' | |
gem 'active_model_serializers' | |
gem 'has_scope' | |
gem 'inherited_resources', '~> 1.3' | |
gem 'kaminari' | |
gem 'rails', '4.0.2' | |
gem 'rails-api' | |
gem 'pg' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module_function | |
def MultiHash h | |
h.keys.each do |key| | |
if key.is_a? Array | |
key.each do |new_key| | |
h[new_key] = h[key] | |
end | |
h.delete key | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gate@vorash:~ ✔Ξ uname -a | |
Darwin vorash.local 13.0.0 Darwin Kernel Version 13.0.0: Thu Sep 19 22:22:27 PDT 2013; root:xnu-2422.1.72~6/RELEASE_X86_64 x86_64 | |
gate@vorash:~ ✔Ξ brew doctor | |
Warning: Setting DYLD_* vars can break dynamic linking. | |
Set variables: | |
DYLD_LIBRARY_PATH | |
Warning: "config" scripts exist outside your system or Homebrew directories. | |
`./configure` scripts often look for *-config scripts to determine if | |
software packages are installed, and what additional flags to use when |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ bundle check | |
The Gemfile's dependencies are satisfied | |
$ bundle list | |
Gems included by the bundle: | |
* actionmailer (4.0.0) | |
* actionpack (4.0.0) | |
* active_model_serializers (0.8.1) | |
* activeadmin (0.6.1 9f6b030) | |
* activemodel (4.0.0) | |
* activerecord (4.0.0) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gate@vorash:~ ✔Ξ gem update passenger | |
Updating installed gems | |
Updating passenger | |
Fetching: passenger-4.0.21.gem (100%) | |
Building native extensions. This could take a while... | |
Successfully installed passenger-4.0.21 | |
Parsing documentation for passenger-4.0.21 | |
Installing ri documentation for passenger-4.0.21 | |
Installing darkfish documentation for passenger-4.0.21 | |
Gems updated: passenger |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mkdir tmp_ps_inst | |
cd tmp_ps_inst | |
echo "source 'https://rubygems.org'\ngem 'passenger', git: '[email protected]:phusion/passenger.git'" > Gemfile | |
bundle install | |
bundle exec passenger-install-apache2-module | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/Users/gate/personal/test_app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.0/lib/rails/commands/runner.rb:53:in `eval': `attr_accessible` is extracted out of Rails into a gem. Please use new recommended protection model for params(strong_parameters) or add `protected_attributes` to your Gemfile to use old one. (RuntimeError) | |
from /Users/gate/personal/test_app/vendor/bundle/ruby/2.0.0/gems/songkick-oauth2-provider-0.10.2/lib/songkick/oauth2/model/authorization.rb:20:in `<class:Authorization>' | |
from /Users/gate/personal/test_app/vendor/bundle/ruby/2.0.0/gems/songkick-oauth2-provider-0.10.2/lib/songkick/oauth2/model/authorization.rb:5:in `<module:Model>' | |
from /Users/gate/personal/test_app/vendor/bundle/ruby/2.0.0/gems/songkick-oauth2-provider-0.10.2/lib/songkick/oauth2/model/authorization.rb:3:in `<module:OAuth2>' | |
from /Users/gate/personal/test_app/vendor/bundle/ruby/2.0.0/gems/songkick-oauth2-provider-0.10.2/lib/songkick/oauth2/model/authorization.rb:2:in `<module:Songkick>' | |
from /Users/gate/personal/test_app |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ENV["RAILS_ENV"] ||= "test" | |
require File.expand_path('../../config/environment', __FILE__) | |
require 'rails/test_help' | |
require "minitest/spec" | |
# require "mocha/setup" | |
# require "turn/autorun" | |
class ActiveSupport::TestCase | |
ActiveRecord::Migration.check_pending! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'uri' | |
require 'csv' | |
i = 1 | |
files = Dir.glob("app0*/*.log*") | |
data = files.map do |filename| | |
puts "Reading #{filename} #{i}/#{files.count}" | |
i = i + 1 | |
File.readlines(filename).select do |line| | |
line.match /GET \"\/api\/image_search/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
_.each this.clips || [], (clip) => | |
clip.selected = false | |
clip.selected = true if `clip.id == _this.model.clip_id` |