Giter Club home page Giter Club logo

asumibot's People

Contributors

h3poteto avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

asumibot's Issues

movies#searchを整理

sqlを整理,合わせてview内に書いているコードをできるだけhelperに移行.

patientsをスマホ対応

patients#indexはページキャッシュしているので,一度キャッシュをすべて廃止します.

絵文字を含む文字列をinsertできない件

やはりまだ治っていない模様

An exception occurred: 'Mysql2::Error: Incorrect string value: '\xF0\x9F\x91\x8D\x0A\x0A...' for column 'tweet' at row 1: INSERT INTO `asumi_tweets` (`patient_id`, `tweet`, `tweet_id`, `tweet_time`, `created_at`, `updated_at`) VALUES (409, 'もこちゃんよくやった!!\n俺も単行本派だったのに…\n前向きにいきましょう:thumbsup:\n\n#agqr #hoshihina', '635816710117957632', '2015-08-24 05:11:31.000000', '2015-08-24 14:36:16.921558', '2015-08-24 14:36:16.921558')' on '/srv/www/asumibot/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.0/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:299:in `query''
*Data:*
sidekiq: {"retry"=>true, "queue"=>"default", "class"=>"ActiveJob::QueueAdapters::SidekiqAdapter::JobWrapper", "args"=>[{"job_class"=>"PatientJob", "job_id"=>"f2dcb84c-75f7-48b1-9c94-9a54c2e4e411", "queue_name"=>"default", "arguments"=>[3199188720, "もこちゃんよくやった!!\n俺も単行本派だったのに…\n前向きにいきましょう:thumbsup:\n\n#agqr #hoshihina", "635816710117957632", "2015-08-24 14:11:31"]}], "jid"=>"738e4c4206923498a983cece", "enqueued_at"=>1440425491.491001, "error_message"=>"Mysql2::Error: Incorrect string value: '\\xF0\\x9F\\x91\\x8D\\x0A\\x0A...' for column 'tweet' at row 1: INSERT INTO `asumi_tweets` (`patient_id`, `tweet`, `tweet_id`, `tweet_time`, `created_at`, `updated_at`) VALUES (409, 'もこちゃんよくやった!!\\n俺も単行本派だったのに…\\n前向きにいきましょう:thumbsup:\\n\\n#agqr #hoshihina', '635816710117957632', '2015-08-24 05:11:31.000000', '2015-08-24 14:36:16.921558', '2015-08-24 14:36:16.921558')", "error_class"=>"ActiveRecord::StatementInvalid", "failed_at"=>1440425491.5540748, "retry_count"=>6, "retried_at"=>1440426976.9360185}
*Backtrace:*
app/jobs/patient_job.rb:11:in `perform'

画像のViewを修正

  • navbarをつけてそこに収める
  • ダブルタップで拡大,もう一度ダブルタップで元に戻す

落ちているテストを救済

  1) niconico:popular should change result from 0
     Failure/Error: expect{ subject.invoke }.to change{ NiconicoPopular.count }.from(0)
       expected result to have changed from 0, but did not change
     # ./spec/lib/tasks/niconico_rake_spec.rb:21:in `block (2 levels) in <top (required)>'

Finished in 29.88 seconds (files took 6.42 seconds to load)
362 examples, 1 failure

Failed examples:


rspec ./spec/lib/tasks/niconico_rake_spec.rb:20 # niconico:popular should change result from 0 bundle exec rspec spec/ returned exit code 1

おそらくニコニコAPI接続系でリミットに達しやすいのだと思われる

rss更新のバグ修正

An exception occurred: 'wrong number of arguments (1 for 2)' on '/srv/www/asumibot/releases/20150720092259/lib/modules/twitter_client.rb:11:in update'' Data: rake_command_line: rake rss:recent --silent Backtrace: lib/modules/twitter_client.rb:11:inupdate'
lib/tasks/rss.rake:21:in `block (2 levels) in <top (required)>'

APIを公開して動画を取得できるようにしよう

ランダムセレクトと新着があればいいと思う.
ニコニコとyoutubeをランダムに織り交ぜて.

  • youtubeの動画ランダム取得API
  • 上記テスト追加
  • niconicoの動画ランダム取得API
  • 上記テスト追加
  • moviesコントローラをjsonとhtmlで分けて,動画出力APIの作成
  • 上記テスト追加

patientのバグ修正

An exception occurred: 'undefined method `*' for nil:NilClass' on '/srv/www/asumibot/releases/20150720092259/app/controllers/patients_controller.rb:51:in `block in show''
*Backtrace:*
app/controllers/patients_controller.rb:51:in `block in show'
app/controllers/patients_controller.rb:47:in `show'

スマホ対応

jpmobile入れて,とりあえずのスマホ対応化を進めます

mysqlに絵文字が突っ込めない問題

WARN: {"retry"=>true, "queue"=>"default", "class"=>"ActiveJob::QueueAdapters::SidekiqAdapter::JobWrapper", "args"=>[{"job_class"=>"PatientJob", "job_id"=>"3e9256bb-\
fc71-47a4-9968-a8b14de935d5", "queue_name"=>"default", "arguments"=>[2201148458, "RT @I_love_alive_: #阿澄佳奈生誕祭\n\n┏┓┏┓。・゚゚・。。゚☆\n┃┗┛ appy☆\n┃┏┓┃ birth☆\n┗┛┗┛  day*゚☆\n\nもこちゃん、お誕生日おめでとう\
🎉 http://t.co/pwXybO60Ix", "631258529282658305", "2015-08-12 00:18:56"]}], "jid"=>"fc8126d7229b66348a23ec67", "enqueued_at"=>1439338736.6846151, "error_message"=>"Mysql2::Error: Incorrect string value: '\\xF0\
\\x9F\\x8E\\x89 h...' for column 'tweet' at row 1: INSERT INTO `asumi_tweets` (`patient_id`, `tweet`, `tweet_id`, `tweet_time`, `created_at`, `updated_at`) VALUES (288, 'RT @I_love_alive_: #阿澄佳奈生誕祭\\n\\
\n┏┓┏┓。・゚゚・。。゚☆\\n┃┗┛ appy☆\\n┃┏┓┃ birth☆\\n┗┛┗┛  day*゚☆\\n\\nもこちゃん、お誕生日おめでとう🎉 http://t.co/pwXybO60Ix', '631258529282658305', '2015-08-11 15:18:56.000000', '2015-08-12 07:48:23.639927', '201\
5-08-12 07:48:23.639927')", "error_class"=>"ActiveRecord::StatementInvalid", "failed_at"=>1439338737.1782572, "retry_count"=>11, "retried_at"=>1439365703.6524634}
2015-08-12T07:48:23.664Z 9000 TID-osrbvjo8s WARN: Mysql2::Error: Incorrect string value: '\xF0\x9F\x8E\x89 h...' for column 'tweet' at row 1: INSERT INTO `asumi_tweets` (`patient_id`, `tweet`, `tweet_id`, `tw\
eet_time`, `created_at`, `updated_at`) VALUES (288, 'RT @I_love_alive_: #阿澄佳奈生誕祭\n\n┏┓┏┓。・゚゚・。。゚☆\n┃┗┛ appy☆\n┃┏┓┃ birth☆\n┗┛┗┛  day*゚☆\n\nもこちゃん、お誕生日おめでとう🎉 http://t.co/pwXybO60Ix', '6\
31258529282658305', '2015-08-11 15:18:56.000000', '2015-08-12 07:48:23.639927', '2015-08-12 07:48:23.639927')

ニコニコ動画の結果が0件だった場合の対策

An exception occurred: 'undefined method `each' for nil:NilClass' on '/srv/www/asumibot/releases/20150719092810/lib/modules/niconico_client.rb:46:in `block in get_today_movies''
*Data:*
rake_command_line: rake niconico:new --silent
*Backtrace:*
lib/modules/niconico_client.rb:46:in `block in get_today_movies'
lib/modules/niconico_client.rb:39:in `each'
lib/modules/niconico_client.rb:39:in `get_today_movies'
lib/tasks/niconico.rake:11:in `block (2 levels) in <top (required)>'

本番用のapplication.ymlを分ける

分離しておかないと同じキーが使えなくて困る.
コレに伴い,DB関連情報も揃えていい気がする.
youtubeのdeveloper_keyも本番用を用意してデプロイ.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.