Skip to content

Commit 47b6512

Browse files
committed
renaming all rocket to rocketchat
1 parent 1a0eb3b commit 47b6512

File tree

14 files changed

+61
-61
lines changed

14 files changed

+61
-61
lines changed

Diff for: LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2015 ChatRocket
3+
Copyright (c) 2015 RocketChat
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

Diff for: client/lib/rocket.coffee

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@Rocket = (->
1+
@RocketChat = (->
22

33

44
@Login = (->

Diff for: packages/rocketchat-file/file.server.coffee

+9-9
Original file line numberDiff line numberDiff line change
@@ -5,28 +5,28 @@ path = Npm.require('path')
55
mkdirp = Npm.require('mkdirp')
66
gm = Npm.require('gm')
77

8-
RocketFile =
8+
RocketChatFile =
99
gm: gm
1010

11-
RocketFile.bufferToStream = (buffer) ->
11+
RocketChatFile.bufferToStream = (buffer) ->
1212
bufferStream = new stream.PassThrough()
13-
bufferStream.end buffer
13+
bufferStream.end buffer
1414
return bufferStream
1515

16-
RocketFile.dataURIParse = (dataURI) ->
16+
RocketChatFile.dataURIParse = (dataURI) ->
1717
imageData = dataURI.split ';base64,'
1818
return {
1919
image: imageData[1]
2020
contentType: imageData[0].replace('data:', '')
2121
}
2222

23-
RocketFile.addPassThrough = (st, fn) ->
23+
RocketChatFile.addPassThrough = (st, fn) ->
2424
pass = new stream.PassThrough()
2525
fn pass, st
2626
return pass
2727

2828

29-
RocketFile.GridFS = class
29+
RocketChatFile.GridFS = class
3030
constructor: (config={}) ->
3131
{name, transformWrite} = config
3232

@@ -61,7 +61,7 @@ RocketFile.GridFS = class
6161
content_type: contentType
6262

6363
if self.transformWrite?
64-
ws = RocketFile.addPassThrough ws, (rs, ws) ->
64+
ws = RocketChatFile.addPassThrough ws, (rs, ws) ->
6565
file =
6666
name: self.name
6767
fileName: fileName
@@ -101,7 +101,7 @@ RocketFile.GridFS = class
101101
return this.remove fileName
102102

103103

104-
RocketFile.FileSystem = class
104+
RocketChatFile.FileSystem = class
105105
constructor: (config={}) ->
106106
{absolutePath, transformWrite} = config
107107

@@ -127,7 +127,7 @@ RocketFile.FileSystem = class
127127
ws = fs.createWriteStream path.join this.absolutePath, fileName
128128

129129
if self.transformWrite?
130-
ws = RocketFile.addPassThrough ws, (rs, ws) ->
130+
ws = RocketChatFile.addPassThrough ws, (rs, ws) ->
131131
file =
132132
fileName: fileName
133133
contentType: contentType

Diff for: packages/rocketchat-file/package.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Package.describe({
2-
name: 'rocket:file',
2+
name: 'rocketchat:file',
33
version: '0.0.1',
44
summary: '',
55
git: ''
@@ -18,9 +18,9 @@ Package.onUse(function(api) {
1818

1919
api.addFiles('file.server.coffee', 'server');
2020

21-
api.export(['RocketFile'], ['server']);
21+
api.export(['RocketChatFile'], ['server']);
2222
});
2323

2424
Package.onTest(function(api) {
2525

26-
});
26+
});

Diff for: packages/rocketchat-lib/lib/callbacks.coffee

+19-19
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
# https://github.com/TelescopeJS/Telescope/blob/master/packages/telescope-lib/lib/callbacks.js
22

33
###
4-
# Callback hooks provide an easy way to add extra steps to common operations.
5-
# @namespace Rocket.callbacks
4+
# Callback hooks provide an easy way to add extra steps to common operations.
5+
# @namespace RocketChat.callbacks
66
###
7-
Rocket.callbacks = {}
7+
RocketChat.callbacks = {}
88

99
###
1010
# Callback priorities
1111
###
12-
Rocket.callbacks.priority =
12+
RocketChat.callbacks.priority =
1313
HIGH: -1
1414
MEDIUM: 0
1515
LOW: 1
@@ -20,14 +20,14 @@ Rocket.callbacks.priority =
2020
# @param {Function} callback - The callback function
2121
###
2222

23-
Rocket.callbacks.add = (hook, callback, priority) ->
23+
RocketChat.callbacks.add = (hook, callback, priority) ->
2424
# if callback array doesn't exist yet, initialize it
25-
priority ?= Rocket.callbacks.priority.MEDIUM
25+
priority ?= RocketChat.callbacks.priority.MEDIUM
2626
unless _.isNumber priority
27-
priority = Rocket.callbacks.priority.MEDIUM
27+
priority = RocketChat.callbacks.priority.MEDIUM
2828
callback.priority = priority
29-
Rocket.callbacks[hook] ?= []
30-
Rocket.callbacks[hook].push callback
29+
RocketChat.callbacks[hook] ?= []
30+
RocketChat.callbacks[hook].push callback
3131
return
3232

3333
###
@@ -36,8 +36,8 @@ Rocket.callbacks.add = (hook, callback, priority) ->
3636
# @param {string} functionName - The name of the function to remove
3737
###
3838

39-
Rocket.callbacks.remove = (hookName, callbackName) ->
40-
Rocket.callbacks[hookName] = _.reject Rocket.callbacks[hookName], (callback) ->
39+
RocketChat.callbacks.remove = (hookName, callbackName) ->
40+
RocketChat.callbacks[hookName] = _.reject RocketChat.callbacks[hookName], (callback) ->
4141
callback.name is callbackName
4242
return
4343

@@ -49,11 +49,11 @@ Rocket.callbacks.remove = (hookName, callbackName) ->
4949
# @returns {Object} Returns the item after it's been through all the callbacks for this hook
5050
###
5151

52-
Rocket.callbacks.run = (hook, item, constant) ->
53-
callbacks = Rocket.callbacks[hook]
52+
RocketChat.callbacks.run = (hook, item, constant) ->
53+
callbacks = RocketChat.callbacks[hook]
5454
if !!callbacks?.length
5555
# if the hook exists, and contains callbacks to run
56-
_.sortBy(callbacks, (callback) -> return callback.priority or Rocket.callbacks.priority.MEDIUM).reduce (result, callback) ->
56+
_.sortBy(callbacks, (callback) -> return callback.priority or RocketChat.callbacks.priority.MEDIUM).reduce (result, callback) ->
5757
# console.log(callback.name);
5858
callback result, constant
5959
, item
@@ -65,20 +65,20 @@ Rocket.callbacks.run = (hook, item, constant) ->
6565
# Successively run all of a hook's callbacks on an item, in async mode (only works on server)
6666
# @param {String} hook - The name of the hook
6767
# @param {Object} item - The post, comment, modifier, etc. on which to run the callbacks
68-
# @param {Object} [constant] - An optional constant that will be passed along to each callback
68+
# @param {Object} [constant] - An optional constant that will be passed along to each callback
6969
###
7070

71-
Rocket.callbacks.runAsync = (hook, item, constant) ->
72-
callbacks = Rocket.callbacks[hook]
71+
RocketChat.callbacks.runAsync = (hook, item, constant) ->
72+
callbacks = RocketChat.callbacks[hook]
7373
if Meteor.isServer and !!callbacks?.length
7474
# use defer to avoid holding up client
7575
Meteor.defer ->
7676
# run all post submit server callbacks on post object successively
77-
_.sortBy(callbacks, (callback) -> return callback.priority or Rocket.callbacks.priority.MEDIUM).forEach (callback) ->
77+
_.sortBy(callbacks, (callback) -> return callback.priority or RocketChat.callbacks.priority.MEDIUM).forEach (callback) ->
7878
# console.log(callback.name);
7979
callback item, constant
8080
return
8181
return
8282
else
8383
return item
84-
return
84+
return

Diff for: packages/rocketchat-lib/lib/core.coffee

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
###
2-
# Kick off the global namespace for Rocket.
3-
# @namespace Rocket
2+
# Kick off the global namespace for RocketChat.
3+
# @namespace RocketChat
44
###
55

6-
Rocket = {}
6+
RocketChat = {}

Diff for: packages/rocketchat-lib/package.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Package.describe({
2-
name: 'rocket:lib',
2+
name: 'rocketchat:lib',
33
version: '0.0.1',
4-
summary: 'Rocket libraries',
4+
summary: 'RocketChat libraries',
55
git: ''
66
});
77

@@ -18,9 +18,9 @@ Package.onUse(function(api) {
1818
api.addFiles('lib/core.coffee', 'server');
1919
api.addFiles('lib/callbacks.coffee', 'server');
2020

21-
api.export(['Rocket'], ['server']);
21+
api.export(['RocketChat'], ['server']);
2222
});
2323

2424
Package.onTest(function(api) {
2525

26-
});
26+
});

Diff for: packages/rocketchat-me/me.coffee

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
# @param {Object} doc - The message object
44
###
55

6-
class Me
6+
class Me
77
constructor: (doc) ->
88
# If message starts with /me, replace it for text formatting
99
if doc.message.indexOf('/me') is 0
1010
doc.message = '######' + Meteor.user().name + doc.message.replace('/me', '')
1111
return doc
1212

13-
Rocket.callbacks.add 'sendMessage', Me
13+
RocketChat.callbacks.add 'sendMessage', Me

Diff for: packages/rocketchat-me/package.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Package.describe({
2-
name: 'rocket:me',
2+
name: 'rocketchat:me',
33
version: '0.0.1',
44
summary: 'Message pre-processor that will translate /me commands',
55
git: ''
@@ -10,12 +10,12 @@ Package.onUse(function(api) {
1010

1111
api.use([
1212
'coffeescript',
13-
13+
'rocketchat:[email protected]'
1414
]);
1515

1616
api.addFiles('me.coffee', 'server');
1717
});
1818

1919
Package.onTest(function(api) {
2020

21-
});
21+
});

Diff for: public/landing/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@
8787
<button class="button red"><span>Access the Online Demo</span></button>
8888
</a>
8989
<div class='text'>
90-
<h1>RocketChat</h1>
90+
<h1>Rocket.Chat</h1>
9191
<h2>Your own Open Source chat solution</h2>
9292
<p>Have your own web chat. Developed with Meteor.com, the Rocket.Chat is a great solution for developers looking forward to build and evolve their own chat platform.</p>
9393
<a class="button" href="/login"><span>Access the Online Demo</span></a>

Diff for: server/methods/sendMessage.coffee

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ Meteor.methods
4545
if mentions.length is 0
4646
mentions = undefined
4747

48-
msg = Rocket.callbacks.run 'sendMessage', msg
48+
msg = RocketChat.callbacks.run 'sendMessage', msg
4949

5050
ChatMessage.upsert messageFilter,
5151
$set:

Diff for: server/methods/setAvatarFromService.coffee

+4-4
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ Meteor.methods
99
Meteor.users.update {_id: user._id}, {$set: {avatarOrigin: service}}
1010
return
1111

12-
{image, contentType} = RocketFile.dataURIParse dataURI
12+
{image, contentType} = RocketChatFile.dataURIParse dataURI
1313

14-
rs = RocketFile.bufferToStream new Buffer(image, 'base64')
15-
ws = RocketFileAvatarInstance.createWriteStream "#{user.username}.jpg", contentType
14+
rs = RocketChatFile.bufferToStream new Buffer(image, 'base64')
15+
ws = RocketChatFileAvatarInstance.createWriteStream "#{user.username}.jpg", contentType
1616
ws.on 'end', Meteor.bindEnvironment ->
1717
Meteor.users.update {_id: user._id}, {$set: {avatarOrigin: service}}
1818

@@ -26,7 +26,7 @@ Meteor.methods
2626

2727
user = Meteor.user()
2828

29-
RocketFileAvatarInstance.deleteFile "#{user.username}.jpg"
29+
RocketChatFileAvatarInstance.deleteFile "#{user.username}.jpg"
3030

3131
Meteor.users.update user._id, {$unset: {avatarOrigin: 1}}
3232
return

Diff for: server/startup/AvatarFileConfig.coffee

+6-6
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ Meteor.startup ->
44
if Meteor.settings?.public?.avatarStore?.type?
55
storeType = Meteor.settings.public.avatarStore.type
66

7-
RocketStore = RocketFile[storeType]
7+
RocketChatStore = RocketChatFile[storeType]
88

9-
if not RocketStore?
10-
throw new Error "Invalid RocketStore type [#{storeType}]"
9+
if not RocketChatStore?
10+
throw new Error "Invalid RocketChatStore type [#{storeType}]"
1111

1212
console.log "Using #{storeType} for Avatar storage".green
1313

@@ -16,14 +16,14 @@ Meteor.startup ->
1616
height = Meteor.settings.public.avatarStore.size.height
1717
width = Meteor.settings.public.avatarStore.size.width
1818
transformWrite = (file, readStream, writeStream) ->
19-
RocketFile.gm(readStream, file.fileName).background('#ffffff').resize(width, height+'^>').gravity('Center').extent(width, height).stream('jpeg').pipe(writeStream)
19+
RocketChatFile.gm(readStream, file.fileName).background('#ffffff').resize(width, height+'^>').gravity('Center').extent(width, height).stream('jpeg').pipe(writeStream)
2020

2121
path = "~/uploads"
2222

2323
if Meteor.settings?.public?.avatarStore?.path?
2424
path = Meteor.settings.public.avatarStore.path
2525

26-
@RocketFileAvatarInstance = new RocketStore
26+
@RocketChatFileAvatarInstance = new RocketChatStore
2727
name: 'avatars'
2828
absolutePath: path
2929
transformWrite: transformWrite
@@ -33,7 +33,7 @@ Meteor.startup ->
3333
'stream': true
3434
'get': (data) ->
3535
this.params.username
36-
file = RocketFileAvatarInstance.getFileWithReadStream this.params.username
36+
file = RocketChatFileAvatarInstance.getFileWithReadStream this.params.username
3737

3838
this.setContentType 'image/jpeg'
3939
this.addHeader 'Content-Disposition', 'inline'

Diff for: server/startup/migrations/v0.1.2.coffee

+4-4
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ Meteor.startup ->
1515

1616
dataURI = avatars[service].blob
1717

18-
{image, contentType} = RocketFile.dataURIParse dataURI
18+
{image, contentType} = RocketChatFile.dataURIParse dataURI
1919

20-
rs = RocketFile.bufferToStream new Buffer(image, 'base64')
21-
ws = RocketFileAvatarInstance.createWriteStream "#{user.username}.jpg", contentType
20+
rs = RocketChatFile.bufferToStream new Buffer(image, 'base64')
21+
ws = RocketChatFileAvatarInstance.createWriteStream "#{user.username}.jpg", contentType
2222
ws.on 'end', Meteor.bindEnvironment ->
2323
Meteor.users.update {_id: user._id}, {$set: {avatarOrigin: service}}
2424

25-
rs.pipe(ws)
25+
rs.pipe(ws)

0 commit comments

Comments
 (0)