Git Product home page Git Product logo

entakun's People

Contributors

nicklegr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

entakun's Issues

positionがnullのレコードで落ちるのを修正

web.rbに下記のパッチで仮修正。

     staffs.each do |e|
       next unless e.task_ids
       e.task_ids.sort_by! do |id|
-        project.tasks.find(id).position
+        project.tasks.find(id).position || 99999999
       end
     end

古いデータにのみ存在するのか、新規プロジェクトでも起きるのか確認。

Safariでゴミ箱周りの点線が一部欠ける

タスクのドラッグ中にゴミ箱周りに点線が現れますが、
Safariでは右側の点線が表示されないようです。

border-rightで検索するとそれらしい記事がいくつか引っかかるのですが、
回避方法にたどり着けていません。

Dockerをproductionモードに対応

apt-get -y install openjdk-7-jre-headless

environment:
  RACK_ENV: production

if ENV['RACK_ENV'] == 'production'
  environment.js_compressor  = YUI::JavaScriptCompressor.new(munge: true)
  environment.css_compressor = YUI::CssCompressor.new
end

これだとdocker logsで何も出ないのでログをstdoutに出す設定も入れるといいかも

Operaでカスタムカーソルが表示されない

ペイントモードとタスクをドラッグ中はマウスカーソルが変化しますが、Operaでは変化しません。
Operaがcssのcursorに対応していないので、Javascriptでのエミュレーションが必要らしいです。

ルートディレクトリ以外で起動すると、IEで一部の画像が表示されない

たとえば thin --prefix entakun のように起動して、http://example.com/entakun/ でentakunを立ち上げます。
すると、cssで相対パスで指定されている画像が一部表示されなくなります。

原因は、IEがページのURLを起点として相対パスを解釈するためです。
(cssのURLを起点とするのが正しい)

sinatra-assetpack などを導入して、URLを前処理させることで解決できそうです。

DBのバックアップスクリプト

#!/bin/bash

# バックアップスクリプト
# コンテナの外で実行します。docker-composeでmongoコンテナを起動中なのが前提

set -o errexit

SRC_CONTAINER=$1
OUTPUT_DIR=$2
WORK_DIR=/tmp/entakun-backup-`date +%Y%m%d-%H%M%S`

mkdir -p $OUTPUT_DIR
mkdir -p $WORK_DIR/mongodb

docker run --rm -v $WORK_DIR/mongodb:/backup --link $SRC_CONTAINER:mongodb mongo:3.0.4 \
  /bin/bash -c 'mongodump --host mongodb -o/backup --quiet'

# バックアップファイルのオーナーがrootになるので、dockerに変更
# (idコマンドでホスト側のdockerのuid,gidを調べて渡している)
docker run --rm -v $WORK_DIR:/backup mongo:3.0.4 \
  /bin/bash -c "chown -R `id -u`:`id -g` /backup"

tar cpzf $OUTPUT_DIR/entakun_backup_`date +%Y%m%d_%H%M%S`.tgz -C $WORK_DIR .

rm -rf $WORK_DIR
#!/bin/bash
 
# リストアスクリプト
# コンテナの外で実行します。docker-composeでmongoコンテナを起動中なのが前提です

# 使い方
#   第1引数: mongoコンテナの名前
#   第2引数: バックアップファイルのパス
# 例)
#   restore.sh entakun_mongodb_1 /home/docker/backup/entakun/entakun_backup.tgz
 
set -o errexit
 
DEST_CONTAINER=$1
BACKUP_TAR_PATH=$2
WORK_DIR=/tmp/entakun-restore
 
mkdir -p $WORK_DIR
 
tar xpzf $BACKUP_TAR_PATH -C $WORK_DIR
 
docker run --rm -v $WORK_DIR/mongodb:/backup --link $DEST_CONTAINER:mongodb mongo:3.0.4 \
  /bin/bash -c 'mongorestore --host mongodb /backup --drop'
 
rm -rf $WORK_DIR

パーミッションもコミットしとくと便利

git update-index --add --chmod=+x backup.sh restore.sh

付箋の幅を変えたい

現在の画面の2列分くらいの幅にしたいという要望がありました。

**の縦の点線をドラッグして、全体の幅を変えるUIがいいかな。

Travisのビルドがランダムに失敗する

下記のようなパターンがありました。(それぞれ別のビルド)
すべて成功する場合もあります。Travisのサーバが混んでいると失敗しやすいようです。
capybaraの使い方が悪くてタイミング問題を起こしてる気がしますが、
それだとDB周りのエラーが出るのがうまく説明できません。

Failures:

  1) Task open/close Input long name
     Failure/Error: Unable to find matching line from backtrace
     Mongoid::Errors::DocumentNotFound:

       Problem:
         Document(s) not found for class Task with id(s) 53ea32216065c3485000000d.
       Summary:
         When calling Task.find with an id or array of ids, each parameter must match a document in the database or this error will be raised. The search was for the id(s): 53ea32216065c3485000000d ... (1 total) and the following ids were not found: 53ea32216065c3485000000d.
       Resolution:
         Search for an id that is in the database or set the Mongoid.raise_not_found_error configuration option to false, which will cause a nil to be returned instead of raising this error when searching for a single id, or only the matched documents when searching for multiples.
     # ./web.rb:168:in `block in <class:App>'

  2) Task open/close Input long name when opened
     Failure/Error: Unable to find matching line from backtrace
     Mongoid::Errors::DocumentNotFound:

       Problem:
         Document(s) not found for class Task with id(s) 53ea32246065c34850000022.
       Summary:
         When calling Task.find with an id or array of ids, each parameter must match a document in the database or this error will be raised. The search was for the id(s): 53ea32246065c34850000022 ... (1 total) and the following ids were not found: 53ea32246065c34850000022.
       Resolution:
         Search for an id that is in the database or set the Mongoid.raise_not_found_error configuration option to false, which will cause a nil to be returned instead of raising this error when searching for a single id, or only the matched documents when searching for multiples.
     # ./web.rb:168:in `block in <class:App>'

Finished in 11.44 seconds
20 examples, 2 failures
Failures:

1) Task open/close Open/Close task
  Failure/Error: expect(task.close?).to be_true
  expected: true value
  got: false
  # ./spec/task_open_close_spec.rb:61:in `block (2 levels) in <top (required)>'

Finished in 9.51 seconds
20 examples, 1 failure
Failures:

1) Task open/close Input short & long name when closed
  Failure/Error: Unable to find matching line from backtrace
  Mongoid::Errors::DocumentNotFound:

    Problem:
      Document(s) not found for class Task with id(s) 53ea538936bb31595000001c.
    Summary:
      When calling Task.find with an id or array of ids, each parameter must match a document in the database or this error will be raised. The search was for the id(s): 53ea538936bb31595000001c ... (1 total) and the following ids were not found: 53ea538936bb31595000001c.
    Resolution:
      Search for an id that is in the database or set the Mongoid.raise_not_found_error configuration option to false, which will cause a nil to be returned instead of raising this error when searching for a single id, or only the matched documents when searching for multiples.
  # ./web.rb:168:in `block in <class:App>'

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.