wiser_chat 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5b89eb85a0890d0b2e6ce8119ddaa0c125eef985
4
- data.tar.gz: 6d2169b0537a9b8f1e4017300c95e127632e8154
3
+ metadata.gz: 104ecfc8caf8f38d809de6d1d96c548f05b9bb46
4
+ data.tar.gz: 895ba3e3ee8479df85d3776c1f324cbb41d4e5f3
5
5
  SHA512:
6
- metadata.gz: 819418813e49d78c21b72e0dc64502de0b80720a8b5de0b5d659ad6b382a446fa6b02ba144ec7b7abf2fc1c692764b3fe51ae3028cd477bd46ac113613a2c678
7
- data.tar.gz: f22dda3f030e230429acbeb25f7972bcb902e859aadbe8628a3ed93990bd6e8d1a16f99f6118346cad44f089ad0ec0514b8ed2e830d5ea3324d55f9efcf7da29
6
+ metadata.gz: b9eb6cac5590ff4409ba31e9f75c607a7cf982e025f2b20941a9fc552be39add7d7a058043609f5c47e171ece1ab020ee0564f9692cedacae4c27d86a21a1c74
7
+ data.tar.gz: ec175efbd86fb9a5b2442ad51eb660dabc55b4230f412855ce64f24ed83849340764fb45def73a0101099c108c6737de1444a25f9b9a8e0db47a7821c48cadf1
data/README.md CHANGED
@@ -7,7 +7,7 @@ Awesome chat on fire!
7
7
  _WiserChat_ only support Rails >= 3.2 with jQuery.
8
8
 
9
9
  The following items are required:
10
-
10
+
11
11
  - Redis should be installed in the server, please see [http://redis.io](http://redis.io).
12
12
  - `User` model should be available and it should have a `name` method that returns the user name for the chat.
13
13
  - WiserChat should be used only when there's a user logged in - `current_user` method should be available.
@@ -22,19 +22,19 @@ Include the following lines in your `Gemfile`:
22
22
  gem 'redis', '3.2.0'
23
23
  gem 'websocket-rails', '~> 0.7.0'
24
24
  gem 'wiser_chat', '~> 0.1.0'
25
-
25
+
26
26
  Then run:
27
27
 
28
28
  bundle install
29
29
 
30
30
  After installing the gems, you're now ready to install WiserChat by running this command:
31
31
 
32
- bundle exec generate wiser_chat:install
33
-
32
+ bundle exec rails generate wiser_chat:install
33
+
34
34
  The install command will generate the necessary files as well as the migration for the database. Now, run the migration to create the database table:
35
35
 
36
36
  bundle exec rake db:migrate
37
-
37
+
38
38
  Lastly, remove the Rack::Lock middleware by adding this line at the end of your `development.rb` file:
39
39
 
40
40
  config.middleware.delete Rack::Lock
@@ -46,7 +46,7 @@ Lastly, remove the Rack::Lock middleware by adding this line at the end of your
46
46
  WiserChat will use websocket and redis, you need to start the websocket server:
47
47
 
48
48
  bundle exec rake websocket_rails:start_server
49
-
49
+
50
50
  The websocket logs will be available at `log/websocket_rails.log` and `log/websocket_rails_server.log`.
51
51
 
52
52
  ### Rendering the chat box
@@ -54,7 +54,7 @@ The websocket logs will be available at `log/websocket_rails.log` and `log/webso
54
54
  You can always use this helper method in your view:
55
55
 
56
56
  = wiser_chat(@channel_name)
57
-
57
+
58
58
  You need to specify the `@channel_name` to group the chat conversations. You can have different channels in different pages, but you cannot have multiple channels in a single page.
59
59
 
60
60
  Channel name is very sensitive, use alpha-numeric characters only. In other words, do not use any special characters in your channel name.
@@ -64,11 +64,11 @@ Channel name is very sensitive, use alpha-numeric characters only. In other word
64
64
  Include the `wiser_chat` stylesheet into your `app/assets/stylesheets/application.css`:
65
65
 
66
66
  *= require wiser_chat
67
-
67
+
68
68
  By default, the chat box will be hidden and you need to toggle the `#wiser-chat` element to display it. But you can create a link with `toggle_chat` class to add a display control for the chat box.
69
69
 
70
70
  = link_to "Chat", "#", class: "toggle_chat"
71
-
71
+
72
72
  However, you can always customize it or event create your own appearance by editing the `app/assets/stylesheets/wiser_chat.css`.
73
73
 
74
74
  ## Capistrano
@@ -92,7 +92,7 @@ You need to run the websocket in your server and adding the codes below will mak
92
92
  end
93
93
  end
94
94
  end
95
-
95
+
96
96
  desc 'Start websocket deamon'
97
97
  task :start do
98
98
  on roles(:app), in: :sequence, wait: 5 do
@@ -105,15 +105,15 @@ You need to run the websocket in your server and adding the codes below will mak
105
105
  end
106
106
  end
107
107
  end
108
-
108
+
109
109
  After that, these capistrano commands will do the work:
110
110
 
111
111
  bundle exec cap production websocket:start
112
-
112
+
113
113
  You can also kill the websocket using this capistrano command:
114
114
 
115
115
  bundle exec cap production websocket:stop
116
-
116
+
117
117
 
118
118
  ## Contributing
119
119
 
@@ -1,5 +1,5 @@
1
1
  module WiserChatHelper
2
2
  def wiser_chat(channel)
3
- render "layouts/wiser_chat", channel: channel
3
+ render "wiser_chat/box", channel: channel
4
4
  end
5
5
  end
@@ -12,13 +12,7 @@ module WiserChat
12
12
  timestamp = Time.now.strftime("%Y%m%d%H%M%S")
13
13
  template 'events.rb', File.join('config', 'events.rb')
14
14
  template 'websocket.rb', File.join('config', 'initializers', 'websocket_rails.rb')
15
- template 'moment.js', File.join('app', 'assets', 'javascripts', 'jquery.moment.js')
16
- template 'javascript.js', File.join('app', 'assets', 'javascripts', 'wiser_chat.js')
17
15
  template 'stylesheet.css', File.join('app', 'assets', 'stylesheets', 'wiser_chat.css')
18
- template 'partial.html.haml', File.join('app', 'views', 'layouts', '_wiser_chat.html.haml')
19
- template 'model.rb', File.join('app', 'models', 'wiser_chat_message.rb')
20
- template 'helper.rb', File.join('app', 'helpers', 'wiser_chat_helper.rb')
21
- template 'controller.rb', File.join('app', 'controllers', 'wiser_chat_controller.rb')
22
16
  template 'migration.rb', File.join('db', 'migrate', "#{timestamp}_create_wiser_chat_messages.rb")
23
17
  end
24
18
 
@@ -1,3 +1,3 @@
1
1
  module WiserChat
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wiser_chat
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kenneth John Balgos
@@ -50,16 +50,16 @@ files:
50
50
  - LICENSE.txt
51
51
  - README.md
52
52
  - Rakefile
53
+ - app/assets/javascripts/jquery.moment.js
54
+ - app/assets/javascripts/wiser_chat.js
55
+ - app/controllers/wiser_chat_controller.rb
56
+ - app/helpers/wiser_chat_helper.rb
57
+ - app/models/wiser_chat_message.rb
58
+ - app/views/wiser_chat/_box.html.haml
53
59
  - lib/generators/wiser_chat.rb
54
60
  - lib/generators/wiser_chat/install/install_generator.rb
55
- - lib/generators/wiser_chat/install/templates/controller.rb
56
61
  - lib/generators/wiser_chat/install/templates/events.rb
57
- - lib/generators/wiser_chat/install/templates/helper.rb
58
- - lib/generators/wiser_chat/install/templates/javascript.js
59
62
  - lib/generators/wiser_chat/install/templates/migration.rb
60
- - lib/generators/wiser_chat/install/templates/model.rb
61
- - lib/generators/wiser_chat/install/templates/moment.js
62
- - lib/generators/wiser_chat/install/templates/partial.html.haml
63
63
  - lib/generators/wiser_chat/install/templates/stylesheet.css
64
64
  - lib/generators/wiser_chat/install/templates/websocket.rb
65
65
  - lib/generators/wiser_chat/migration/migration_generator.rb
@@ -72,7 +72,7 @@ homepage: https://github.com/kennethjohnbalgos/wiser_chat
72
72
  licenses:
73
73
  - MIT
74
74
  metadata: {}
75
- post_install_message: Welcome to WiserChat v0.1.0!
75
+ post_install_message: Welcome to WiserChat v0.1.1!
76
76
  rdoc_options: []
77
77
  require_paths:
78
78
  - lib