Skip to content

Commit ed48045

Browse files
committed
2 parents 61dc435 + 3019dd2 commit ed48045

File tree

5 files changed

+74
-80
lines changed

5 files changed

+74
-80
lines changed

Gemfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ gem 'aws-sdk'
2121
gem 'paperclip'
2222
gem 'remotipart'
2323
gem 'jquery-rails'
24-
gem 'rb-readline'
24+
2525
# Making the world a better, more stable place
2626
gem 'airbrake'
2727

@@ -30,7 +30,7 @@ gem 'airbrake'
3030
group :assets do
3131
gem 'sass-rails'
3232
gem 'coffee-rails'
33-
gem 'bourbon'
33+
gem 'bourbon', '~> 1.4.0'
3434
gem 'execjs'
3535
gem 'eco'
3636
gem 'uglifier'

Gemfile.lock

+61-62
Original file line numberDiff line numberDiff line change
@@ -38,29 +38,29 @@ GEM
3838
i18n (~> 0.6)
3939
multi_json (~> 1.0)
4040
addressable (2.3.2)
41-
airbrake (3.0.9)
41+
airbrake (3.1.8)
4242
activesupport
4343
builder
44+
json
4445
arel (3.0.2)
4546
awesome_print (1.1.0)
46-
aws-sdk (1.3.8)
47-
httparty (~> 0.7)
47+
aws-sdk (1.8.1.2)
4848
json (~> 1.4)
49-
nokogiri (<= 1.5.0)
49+
nokogiri (>= 1.4.4)
5050
uuidtools (~> 2.1)
5151
bcrypt-ruby (3.0.1)
52-
better_errors (0.3.2)
52+
better_errors (0.5.0)
5353
coderay (>= 1.0.0)
54-
erubis (>= 2.7.0)
54+
erubis (>= 2.6.6)
5555
binding_of_caller (0.6.8)
5656
bourbon (1.4.0)
5757
sass (>= 3.1)
5858
bourne (1.1.2)
5959
mocha (= 0.10.5)
6060
builder (3.0.4)
61-
childprocess (0.3.7)
62-
ffi (~> 1.0, >= 1.0.6)
63-
cloudfuji (0.0.39)
61+
childprocess (0.3.8)
62+
ffi (~> 1.0, >= 1.0.11)
63+
cloudfuji (0.0.46)
6464
highline (>= 1.6.1)
6565
json (>= 1.4.6)
6666
orm_adapter (~> 0.0.3)
@@ -73,9 +73,9 @@ GEM
7373
coffee-script (2.2.0)
7474
coffee-script-source
7575
execjs
76-
coffee-script-source (1.2.0)
76+
coffee-script-source (1.4.0)
7777
cookiejar (0.3.0)
78-
daemons (1.1.8)
78+
daemons (1.1.9)
7979
database_cleaner (0.9.1)
8080
devise (1.5.3)
8181
bcrypt-ruby (~> 3.0)
@@ -90,36 +90,38 @@ GEM
9090
eco-source
9191
execjs
9292
eco-source (1.1.0.rc.1)
93-
em-http-request (0.3.0)
94-
addressable (>= 2.0.0)
95-
escape_utils
96-
eventmachine (>= 0.12.9)
93+
em-http-request (1.0.3)
94+
addressable (>= 2.2.3)
95+
cookiejar
96+
em-socksify
97+
eventmachine (>= 1.0.0.beta.4)
98+
http_parser.rb (>= 0.5.3)
99+
em-socksify (0.2.1)
100+
eventmachine (>= 1.0.0.beta.4)
97101
erubis (2.7.0)
98-
escape_utils (0.2.4)
99-
eventmachine (0.12.10)
100-
execjs (1.3.0)
102+
eventmachine (1.0.0)
103+
execjs (1.4.0)
101104
multi_json (~> 1.0)
102-
factory_girl (3.1.0)
105+
factory_girl (4.2.0)
103106
activesupport (>= 3.0.0)
104-
factory_girl_rails (3.1.0)
105-
factory_girl (~> 3.1.0)
107+
factory_girl_rails (4.2.1)
108+
factory_girl (~> 4.2.0)
106109
railties (>= 3.0.0)
107110
faker (1.1.2)
108111
i18n (~> 0.5)
109112
ffi (1.3.1)
110-
guard (1.6.1)
113+
guard (1.6.2)
111114
listen (>= 0.6.0)
112115
lumberjack (>= 1.0.2)
113116
pry (>= 0.9.10)
117+
terminal-table (>= 1.4.3)
114118
thor (>= 0.14.6)
115-
guard-rspec (2.3.3)
119+
guard-rspec (2.4.0)
116120
guard (>= 1.1)
117121
rspec (~> 2.11)
118-
highline (1.6.11)
122+
highline (1.6.15)
119123
hike (1.2.1)
120-
httparty (0.8.1)
121-
multi_json
122-
multi_xml
124+
http_parser.rb (0.5.3)
123125
i18n (0.6.1)
124126
jasmine (1.3.1)
125127
jasmine-core (~> 1.3.1)
@@ -128,49 +130,47 @@ GEM
128130
selenium-webdriver (>= 0.1.3)
129131
jasmine-core (1.3.1)
130132
journey (1.0.4)
131-
jquery-rails (2.0.1)
132-
railties (>= 3.2.0, < 5.0)
133-
thor (~> 0.14)
134-
json (1.7.6)
135-
kaminari (0.13.0)
133+
jquery-rails (2.2.1)
134+
railties (>= 3.0, < 5.0)
135+
thor (>= 0.14, < 2.0)
136+
json (1.7.7)
137+
kaminari (0.14.1)
136138
actionpack (>= 3.0.0)
137139
activesupport (>= 3.0.0)
138-
railties (>= 3.0.0)
139-
listen (0.7.1)
140+
listen (0.7.2)
140141
lumberjack (1.0.2)
141142
mail (2.4.4)
142143
i18n (>= 0.4.0)
143144
mime-types (~> 1.16)
144145
treetop (~> 1.4.8)
145146
metaclass (0.0.1)
146147
method_source (0.8.1)
147-
mime-types (1.19)
148+
mime-types (1.21)
148149
mocha (0.10.5)
149150
metaclass (~> 0.0.1)
150-
multi_json (1.5.0)
151-
multi_xml (0.4.2)
152-
nokogiri (1.5.0)
153-
orm_adapter (0.0.6)
151+
multi_json (1.5.1)
152+
nokogiri (1.5.6)
153+
orm_adapter (0.0.7)
154154
paperclip (3.4.0)
155155
activemodel (>= 3.0.0)
156156
activerecord (>= 3.0.0)
157157
activesupport (>= 3.0.0)
158158
cocaine (~> 0.4.0)
159159
mime-types
160-
pg (0.12.2)
160+
pg (0.14.1)
161161
polyglot (0.3.3)
162-
pry (0.9.10)
162+
pry (0.9.11.4)
163163
coderay (~> 1.0.5)
164164
method_source (~> 0.8)
165-
slop (~> 3.3.1)
165+
slop (~> 3.4)
166166
pry-rails (0.2.2)
167167
pry (>= 0.9.10)
168168
quiet_assets (1.0.1)
169169
railties (~> 3.1)
170-
rack (1.4.4)
170+
rack (1.4.5)
171171
rack-cache (1.2)
172172
rack (>= 0.4)
173-
rack-ssl (1.3.2)
173+
rack-ssl (1.3.3)
174174
rack
175175
rack-test (0.6.2)
176176
rack (>= 1.0)
@@ -190,10 +190,9 @@ GEM
190190
rdoc (~> 3.4)
191191
thor (>= 0.14.6, < 2.0)
192192
rake (10.0.3)
193-
rb-readline (0.4.2)
194-
rdoc (3.12)
193+
rdoc (3.12.1)
195194
json (~> 1.4)
196-
remotipart (1.0.2)
195+
remotipart (1.0.5)
197196
rest-client (1.6.7)
198197
mime-types (>= 1.16)
199198
rspec (2.12.0)
@@ -203,19 +202,19 @@ GEM
203202
rspec-core (2.12.2)
204203
rspec-expectations (2.12.1)
205204
diff-lcs (~> 1.1.3)
206-
rspec-mocks (2.12.1)
207-
rspec-rails (2.12.1)
205+
rspec-mocks (2.12.2)
206+
rspec-rails (2.12.2)
208207
actionpack (>= 3.0)
209208
activesupport (>= 3.0)
210209
railties (>= 3.0)
211210
rspec-core (~> 2.12.0)
212211
rspec-expectations (~> 2.12.0)
213212
rspec-mocks (~> 2.12.0)
214-
rubycas-client (2.3.8)
213+
rubycas-client (2.3.9)
215214
activesupport
216215
rubyzip (0.9.9)
217216
sass (3.2.5)
218-
sass-rails (3.2.4)
217+
sass-rails (3.2.6)
219218
railties (~> 3.2.0)
220219
sass (>= 3.1.10)
221220
tilt (~> 1.3)
@@ -231,30 +230,31 @@ GEM
231230
multi_json (~> 1.0)
232231
simplecov-html (~> 0.7.1)
233232
simplecov-html (0.7.1)
234-
slop (3.3.3)
233+
slop (3.4.3)
235234
sprockets (2.2.2)
236235
hike (~> 1.2)
237236
multi_json (~> 1.0)
238237
rack (~> 1.0)
239238
tilt (~> 1.1, != 1.3.0)
240-
sqlite3 (1.3.6)
241-
thin (1.3.1)
239+
sqlite3 (1.3.7)
240+
terminal-table (1.4.5)
241+
thin (1.5.0)
242242
daemons (>= 1.0.9)
243243
eventmachine (>= 0.12.6)
244244
rack (>= 1.0.0)
245-
thor (0.16.0)
245+
thor (0.17.0)
246246
tilt (1.3.3)
247247
treetop (1.4.12)
248248
polyglot
249249
polyglot (>= 0.3.1)
250250
tzinfo (0.3.35)
251-
uglifier (1.2.3)
251+
uglifier (1.3.0)
252252
execjs (>= 0.3.0)
253-
multi_json (>= 1.0.2)
254-
uuidtools (2.1.2)
255-
warden (1.1.1)
253+
multi_json (~> 1.0, >= 1.0.2)
254+
uuidtools (2.1.3)
255+
warden (1.2.1)
256256
rack (>= 1.0)
257-
websocket (1.0.6)
257+
websocket (1.0.7)
258258
yajl-ruby (1.1.0)
259259

260260
PLATFORMS
@@ -267,7 +267,7 @@ DEPENDENCIES
267267
aws-sdk
268268
better_errors
269269
binding_of_caller
270-
bourbon
270+
bourbon (~> 1.4.0)
271271
cloudfuji
272272
coffee-rails
273273
database_cleaner
@@ -287,7 +287,6 @@ DEPENDENCIES
287287
pry-rails
288288
quiet_assets
289289
rails (= 3.2.11)
290-
rb-readline
291290
remotipart
292291
rspec-rails
293292
sass-rails

app/assets/javascripts/backbone/views/chatbox.js.coffee

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class Kandan.Views.Chatbox extends Backbone.View
3737
)
3838

3939
$("#activity-c#{model.cid}").attr("id", "activity-#{model.get('id')}")
40-
$scrollbox = $(event.target).parent().find(".paginated-activities")
40+
$scrollbox = $('.channels-pane')
4141
$scrollbox.prop("scrollTop", $scrollbox.prop('scrollHeight'))
4242
})
4343

app/controllers/activities_controller.rb

+4-5
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,11 @@ def index
3434
def create
3535
@activity = Channel.find(params[:channel_id]).activities.build(params[:activity])
3636
@activity.user_id = current_user.id if @activity.action == "message"
37-
if @activity.save
38-
respond_to do |format|
37+
38+
respond_to do |format|
39+
if @activity.save
3940
format.json { render :json => @activity, :status => :created }
40-
end
41-
else
42-
respond_to do |format|
41+
else
4342
format.json { render :json => @activity.errors, :status => :unprocessable_entity }
4443
end
4544
end

app/controllers/channels_controller.rb

+6-10
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,10 @@ def index
2626

2727
def create
2828
@channel = Channel.new(params[:channel])
29-
if @channel.save
30-
respond_to do |format|
29+
respond_to do |format|
30+
if @channel.save
3131
format.json { render :json => @channel, :status => :created }
32-
end
33-
else
34-
respond_to do |format|
32+
else
3533
format.json { render :json => @channel.errors, :status => :unprocessable_entity }
3634
end
3735
end
@@ -46,12 +44,10 @@ def show
4644

4745
def update
4846
@channel = Channel.find(params[:id])
49-
if @channel.update_attributes(params[:channel])
50-
respond_to do |format|
47+
respond_to do |format|
48+
if @channel.update_attributes(params[:channel])
5149
format.json { render :json => @channel, :status => :ok }
52-
end
53-
else
54-
respond_to do |format|
50+
else
5551
format.json { render :json => @channel.errors, :status => :unprocessable_entity }
5652
end
5753
end

0 commit comments

Comments
 (0)