Giter Site home page Giter Site logo

codefirst / asakusasatellite Goto Github PK

View Code? Open in Web Editor NEW
101.0 101.0 24.0 3.7 MB

a realtime chat application for developers

Home Page: https://www.codefirst.org/AsakusaSatellite

License: MIT License

Ruby 55.76% JavaScript 33.75% CSS 0.97% HTML 8.53% Shell 0.37% Alloy 0.63%

asakusasatellite's People

Contributors

authornari avatar banjun avatar dependabot[bot] avatar kent013 avatar knothole avatar mallowlabs avatar mzp avatar notogawa avatar shimomura1004 avatar suer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

asakusasatellite's Issues

AsakusaSatellite::Filter::TwitterLink と CodeHighlightFilter が競合する

as_twitter_link と as_code_highlight_filter を設定で有効にした場合、
以下のようなメッセージを投稿した場合、コードハイライトと Twitterのアンカーが同時に展開されてしまうので、 @ を含んだプログラムソースが意図した状態で貼れません。

ruby::
@hoge

Post error when websocket server disabled

Hi

I installed AkasakaSatellite-0.8.1 to my server.
Some member of our team cannnot use the websocket server. He got a error when he posted a message.

We're sorry, but something went wrong.

We've been notified about this issue and we'll take a look at it shortly.

And I got a error log in log/production.log.

...
Started POST "/chat/message?room_id=51a311b1aed0f12cc9000004" for XXX.XXX.XXX.XXX at Tue May 28 15:28:37 +0900 2013
Processing by ChatController#message as HTML
  Parameters: {"utf8"=>"✓", "commit"=>"Send", "authenticity_token"=>"q2JMiVBomRdFslRPYdpXQxtHBqQvWY9VcFZ2wN4koGU=", "room_id"=>"51a311b1aed0f12cc9000004", "message"=>"テスト"}
Redirected to https://YYY.YYY.YYY.YYY:50001/
Redirected to
Completed 500 Internal Server Error in 5ms

AbstractController::DoubleRenderError (Render and/or redirect were called multiple times in this action. Please note that you may only call render OR redirect, and at most once per action. Also note that neither redirect nor render terminate execution of the action, so if you want to exit an action after redirecting, you need to do something like "redirect_to(...) and return".):
  app/controllers/chat_controller.rb:75:in `message'

Is websocket server required to post messages?

Thanks,
Yoshihiro Imai (@yoshihiro503)

inviting user who haven't logged in yet

When you try to add an user, who haven't logged in yet, to private room, AsakusaSatellite just ignores the request.
This behavior isn't good especially for enterprise use.

Heroku上でas_localauth_pluginが使えない

※すみません、手元にMongoDB環境が無いためローカルでは試していません。Herokuと関係ないかもしれません。

環境:

AsakusaSatellite v0.7.0 (git cloneによって取得)
Heroku (stack = bamboo-ree-1.8.7)

手順:

  1. HerokuのMongolab add-onをセットアップし、Herokuアップをデプロイする
  2. マニュアル通りにas_localauth_pluginを有効にする。(とりあえずユーザリストをデフォルトのままにした。)
  3. Herokuアップを再起動し、ブラウザで画面を開く。
  4. "testuser1", "test1"でログインしてみる。

以上の手順を実施すると、「We're sorry, but something went wrong.」となってしまいました。

heroku logsは以下のようです:

2012-01-04T08:37:40+00:00 app[web.1]: Started POST "/localauth/login" for 219.101.133.190 at Wed Jan 04 00:37:40 -0800 2012
2012-01-04T08:37:40+00:00 app[web.1]:   Processing by LocalauthController#login as HTML
2012-01-04T08:37:40+00:00 app[web.1]:   Parameters: {"commit"=>"Login", "authenticity_token"=>"cm/k0fUPFjduqJO+wlZcZ10nVBojmPYOki1SI8+iTyE=", "utf8"=>"?", "login"=>{"username"=>"testuser1", "password"=>"[FILTERED]"}}
2012-01-04T08:37:40+00:00 app[web.1]: Completed 500 Internal Server Error in 2ms
2012-01-04T08:37:40+00:00 app[web.1]:
2012-01-04T08:37:40+00:00 app[web.1]: NoMethodError (private method `select' called for User:Class):
2012-01-04T08:37:40+00:00 app[web.1]:
2012-01-04T08:37:40+00:00 app[web.1]:
2012-01-04T08:37:40+00:00 app[web.1]: cache: [POST /localauth/login] invalidate, pass

TypeError (db_name must be a string or symbol) happens

After I finish installation, system display following message on browser.

We're sorry, but something went wrong.

We've been notified about this issue and we'll take a look at it shortly.

In log/production.log, I can find following message.

Started GET "/as" for 192.168.1.231 at 2012-09-07 13:33:35 +0800
Processing by ChatController#index as HTML
Completed 500 Internal Server Error in 3ms

TypeError (db_name must be a string or symbol):
app/helpers/application_helper.rb:10:in current_user' app/helpers/application_helper.rb:6:inlogged?'
app/controllers/application_controller.rb:23:in `check_login'

Software versions are as follows.

$ ruby --version
ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux]
$ gem --version
1.8.23
$ bundle --version
Bundler version 1.1.5
$ mongod --version
db version v2.2.0, pdfile version 4.5
Fri Sep 7 13:52:30 git version: f5e83eae9cfbec7fb7a071321928f00d1b0c5207

Log errors in hook

Currently errors happened in hooks are just ignored.
Plugin developers need detailed information.

メッセージをRedmineに投稿するリンクが、メッセージにセミコロンが含まれていると壊れる

Redmine連携プラグインを使うと「メッセージの内容を Redmine に投稿するためのリンクを各メッセージに付加」してくれますが、メッセージにセミコロンやアンパサンドが含まれているときにこのリンクを使うと、「題名」や「説明」欄にコピーされるメッセージが、それらの記号の手前で途切れてしまいます。

How To Reproduce

  1. Redmine連携したAsakusaSatelliteの部屋に入る
  2. 「StringBuffer sb = new StringBuffer(); は StringBuilder に書き換えたい」というメッセージを送信します
  3. メッセージにカーソルを合わせ、右上のRedmineアイコンのリンクをクリックする

→表示されるRedmineの「新しいチケット」フォームの「題名」や「説明」欄に入力済みの内容に「; は StringBuilder に書き換えたい」 が欠けています。

controller hook in chat_controller

For plugin developers, it's very useful if there is some way to add member variables in chatroom page.
But there isn't any hook point in controllers.

WebSocket API doesn't work

After installation, I found that AsakusaSatellite indicates that WebSocket API is not working correctly.

I found setting in config/message_pusher.yml and modified as follows.

default: <%= ENV['MESSAGE_PUSHER_ENGINE'] || 'socky' %>

engines:
 socky:
  http: http://192.168.1.1:3002/http
  web_socket: ws://192.168.1.1:3002/websocket
  app: as
  secret: secret

But still WebSocket does not work.

I invoke WebSocket server with following command.

bundle exec thin -R socky/config.ru -p3002 -t0 start

Invite multiple users

By default, it is very annoying to invite many users to private room.
We need function to invite many users at a time.

Emoji filter mistakes the mark

Emoji filter replace all the words enclosed by colons regardless of whether the emoji actually exists.
It is good to replace them if and only if the emoji actually exists.

部屋ページを開いたとき、ブラウザによってオートフォーカスする入力欄が異なります

仕様上1ページに1か所でしか使ってはならない autofocus 属性が、部屋ページのHTMLコードでは2か所現れています。
このため、Google Chromeではページ下部の新規メッセージ入力欄がオートフォーカスされるのに対し、Firefoxではページ上部の検索キーワード入力欄がオートフォーカスされます。

Firefoxでの挙動は不都合があるので、検索キーワード入力欄 <input id="search_message" name="search[message]"> の要素から autofocus 属性を除去した方が良いと思います。

Image is not displayed correctly.

After I finished the setup, I found that images are not displayed correctly.
Browser Display

img tags for these images are as follows.

<img alt="AsakusaSatellite" src="/as/assets/logo-267254a2ada74232ce59af14aede8d6d.png" />

マニュアルにあるQuoteItプラグインの有効化のやり方がおかしい

公式のマニュアルでは下記のように表記されていますが、QuoteItプラグインが有効になりません。

config/filter.yml に以下を記述します

  • name: quote_it

blogの紹介記事では下記のように表記されており、filter.ymlで上書きできるようにありますが、動作しませんでした。

設定
QuoteIt 連携は、インターネット環境が必要なためデフォルトでは有効になっていません。
設定を有効にするためには、config/filter_intra.yml にある auto_link の代わりに quote_it を記述してください。
単純に config/filter.yml で上書きしても構いません。

config/filter_intra.ymlを編集したところquote_itプラグインが動作するようになりました。
filter.ymlでの上書きが動作していないように思えます。

filter.ymlの内容は元の状態から変更を加えていません。

  • name: code_highlight_filter
  • name: quote_it
  • name: redmine_ticket_link
  • name: twitter_link
  • name: emoji_filter

Passenger でApache にデプロイ時にNoMethodError (undefined method `support_key?' for nil:NilClass):エラー

harupiyo と申します。
うまくPassenger でApache にデプロイできないようなので、お問い合わせさせて下さい。

http://codefirst.github.com/AsakusaSatellite/manual/setup.html#passenger
の通り設定したのですが、ブラウザからアクセスすると

We're sorry, but something went wrong.

We've been notified about this issue and we'll take a look at it shortly.

というエラーになってしまいます。

ログには次のエラーが書きこまれていました。

# cat log/production.log
Started GET "/as" for 118.243.71.17 at Mon May 16 15:43:13 +0900 2011
  Processing by ChatController#index as HTML
Completed   in 1ms

NoMethodError (undefined method `support_key?' for nil:NilClass):
  app/helpers/application_helper.rb:10:in `current_user'
  app/helpers/application_helper.rb:6:in `logged?'
  app/controllers/application_controller.rb:20:in `check_login'

ちなみに、次の方法による、ruby websocket/server.rb &; bundle exec rails server の方法では問題なく動いております。
http://codefirst.github.com/AsakusaSatellite/manual/setup.html#windows-os

もしお分かりの事がありましたらお教えください。

なお、サーバーはさくらVPS(CentOS5) で、AsakusaSatellite のインストール手順は次の通りです。

Ruby 1.8.7

wget ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7-p334.tar.gz
tar xfz ruby-1.8.7-p334.tar.gz
cd ruby-1.8.7-p334
./configure
make
make test
sudo make install

(http://d.hatena.ne.jp/shokai/20100919/1284908455 より)
sudo yum install zlib-devel
cd ext/zlib
ruby extconf.rb
make
sudo make install

(http://d.hatena.ne.jp/hata-hata/20080416 より)
cd ext/openssl/
ruby extconf.rb
make
sudo make install

RubyGems

wget http://rubyforge.org/frs/download.php/74818/rubygems-1.8.1.tgz
tar xfz rubygems-1.8.1.tgz
cd rubygems-1.8.1
sudo /usr/local/bin/ruby setup.rb

bundler - http://gembundler.com/

sudo /usr/local/bin/gem install bundler

AsakusaSatellite

sudo yum install gcc*
sudo yum install -y libxml2 libxml2-devel libxslt libxslt-devel
sudo yum install openssl
wget --no-check-certificate https://github.com/codefirst/AsakusaSatellite/tarball/master
tar xfz codefirst-AsakusaSatellite-v0.3.0-0-g74037f1.tar.gz
cd codefirst-AsakusaSatellite-74037f1/
cp config/filter.yml.example config/filter.yml
cp config/websocket.yml.example config/websocket.yml
cp config/settings.yml.example config/settings.yml
bundle install --path vendor/bundle
bundle exec rake groonga:migrate
※「unsupported column エラーが発生する場合がありますが、問題ないので無視してください。」とのこと。出たので無視した。
ruby websocket/server.rb &
bundle exec rails server

Passenger

gem install passenger
yum install -y libcurl-devel httpd-devel
passenger-install-apache2-module

以下の3行をhttpd.conf に追加
LoadModule passenger_module /usr/local/lib/ruby/gems/1.8/gems/passenger-3.0.7/ext/apache2/mod_passenger.so
PassengerRoot /usr/local/lib/ruby/gems/1.8/gems/passenger-3.0.7
PassengerRuby /usr/local/bin/ruby
次の2行をhttpd.conf に追加
RailsEnv production
RailsBaseURI /as
DocumentRoot が/var/www/html だったので、public フォルダを次のようにシンボリックリンクを設置
cd /var/www/html
sudo ln -s /var/AsakusaSatellite/public as

非公開部屋に参加者の追加ができない

非公開部屋を作成し、マニュアルにあるようにユーザの追加を行うと画面上には追加ユーザが表示されますが、update configを押すと元の状態(ユーザが追加されていない状態)に戻ってしまいます。
http://asakusasatellite.readthedocs.org/en/latest/function.html#room-conf

ユーザ名の欄にはRedmineのユーザ名を入れていますが、違う情報を入れる必要があるのでしょうか?

ユーザ認証はRedmine API アクセスキー認証で動かしています。

存在しないRoomを指定すると 500エラー

存在しないRoom ID を指定すると 500 エラーになります。

ActionView::Template::Error (undefined method `user' for nil:NilClass):
    7:   %div
    8:    .left
    9:     %h3.title
    10:      - if @room.user == current_user
    11:       = on_the_spot_edit @room, :title
    12:      - else
    13:       = @room.title

Individual test for ruby 1.9+

README.markdown says you can test individual specs by:

bundle exec ruby path/to/spec.rb

but it fails because ruby(1.9+) can't find spec_helper.

Firefoxでファイルアップロード機能が使えません

Firefox16.0.1からAsakusaSatelliteを利用すると、ファイルのドラッグ&ドロップによるアップロード機能が使えないようです。一瞬ボーダーが変化してドロップを受け付ける状態になったと思うと、すぐ元の表示に戻ってしまい、ドロップしてもアップロードが行われません。

Complicated controllers

I think some controllers are a bit complicated to add new feathres.
We should move some code from controllers and helpers to models and refactor them.

preserve page state

When you move to some othe page and back to the chat page, messages received from websocket are disappeared.

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.