diff --git a/.travis.yml b/.travis.yml
index 2adb4bbb..13cdfbf2 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -28,7 +28,7 @@ addons:
postgresql: '9.6'
before_script:
- - createdb real-time-test
+ - createdb teletype-test
script: 'curl -s https://raw.githubusercontent.com/atom/ci/master/build-package.sh | sh'
diff --git a/ISSUE_TEMPLATE.md b/ISSUE_TEMPLATE.md
index 97dffd50..7a5d4a82 100644
--- a/ISSUE_TEMPLATE.md
+++ b/ISSUE_TEMPLATE.md
@@ -15,7 +15,7 @@ Do you want to ask a question? Are you looking for support? The Atom message boa
[debugging-guide]: http://flight-manual.atom.io/hacking-atom/sections/debugging/
[message-board]: https://discuss.atom.io/c/faq
-[already-filed]: https://github.com/atom/real-time/issues
+[already-filed]: https://github.com/atom/teletype/issues
### Description
diff --git a/PULL_REQUEST_TEMPLATE.md b/PULL_REQUEST_TEMPLATE.md
index 356e8611..bf949830 100644
--- a/PULL_REQUEST_TEMPLATE.md
+++ b/PULL_REQUEST_TEMPLATE.md
@@ -1,4 +1,4 @@
-**Please be sure to read the [contributor's guide](https://github.com/atom/real-time/blob/master/CONTRIBUTING.md) before submitting any pull requests.**
+**Please be sure to read the [contributor's guide](https://github.com/atom/teletype/blob/master/CONTRIBUTING.md) before submitting any pull requests.**
### Requirements
diff --git a/README.md b/README.md
index 50db44d5..cd0d2975 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
-# real-time
+# teletype
-Welcome to the **TOP SECRET** real-time package!
+Welcome to the **TOP SECRET** teletype package!
⚠️❗🔐 This package is super duper top secret for now. Please don't mention it to any non-Hubbers. 🔐❗⚠️
@@ -12,7 +12,7 @@ Welcome to the **TOP SECRET** real-time package!
2. In the terminal, install the package via apm:
```sh
- apm install atom/real-time
+ apm install atom/teletype
```
### GUI
@@ -21,37 +21,37 @@ Welcome to the **TOP SECRET** real-time package!
1. Launch Atom
1. Open Settings View using Cmd+, on macOS or Ctrl+, on other platforms
1. Click the Install tab on the left side
-1. Enter `https://github.com/atom/real-time` in the search box and press Enter
+1. Enter `https://github.com/atom/teletype` in the search box and press Enter
1. Click the "Install" button that appears
## Usage
-Once you've installed the package, you're ready to start collaborating in real-time.
+Once you've installed the package, you're ready to start collaborating in teletype.
- To share your workspace, open the command palette and run the _Real Time: Share Portal_ command. Then, use Slack to send the portal ID to the GitHubbers that you want to collaborate with.
- To join a portal, open the command palette, run the _Real Time: Join Portal_ command, and enter the portal ID.
## Demo
-[](https://githubber.tv/jasonrudolph/real-time-collaboration-in-atom)
+[](https://githubber.tv/jasonrudolph/teletype-collaboration-in-atom)
## Known issues
-It's super early days for the real-time package, so there are a few things you'll want to keep in mind:
+It's super early days for the teletype package, so there are a few things you'll want to keep in mind:
-- Portals use security-by-obscurity for now. Anyone with your portal ID can join your portal. (We'll address this in [Milestone 2](https://github.com/github/atom-log/blob/1f94a5b7ce6f90d9232d51663c9a6adf728831d6/real-time-collaboration/portals-roadmap.md#milestone-2-authentication-and-presence).)
-- If you're wondering what's coming next, check out the [roadmap](https://github.com/github/atom-log/blob/master/real-time-collaboration/portals-roadmap.md).
-- If you notice any issues or have any feedback, please [open an issue](https://github.com/atom/real-time/issues/new) or ping us (@as-cii, @jasonrudolph, @nathansobo) in the [#atom-real-time][#atom-real-time] channel.
+- Portals use security-by-obscurity for now. Anyone with your portal ID can join your portal. (We'll address this in [Milestone 2](https://github.com/github/atom-log/blob/1f94a5b7ce6f90d9232d51663c9a6adf728831d6/teletype-collaboration/portals-roadmap.md#milestone-2-authentication-and-presence).)
+- If you're wondering what's coming next, check out the [roadmap](https://github.com/github/atom-log/blob/master/teletype-collaboration/portals-roadmap.md).
+- If you notice any issues or have any feedback, please [open an issue](https://github.com/atom/teletype/issues/new) or ping us (@as-cii, @jasonrudolph, @nathansobo) in the [#atom-teletype][#atom-teletype] channel.
## Development
-**Prerequisites**: For now, you must be a member of the [@atom/hubbers team in npm](https://www.npmjs.com/org/atom/team/hubbers#members). If you aren't, please drop a note in [#atom-real-time][#atom-real-time] and we'll add you.
+**Prerequisites**: For now, you must be a member of the [@atom/hubbers team in npm](https://www.npmjs.com/org/atom/team/hubbers#members). If you aren't, please drop a note in [#atom-teletype][#atom-teletype] and we'll add you.
```sh
-git clone https://github.com/atom/real-time
-cd real-time
+git clone https://github.com/atom/teletype
+cd teletype
apm install
apm link
```
-[#atom-real-time]: https://github.slack.com/messages/C65B6TS0K/details/
+[#atom-teletype]: https://github.slack.com/messages/C65B6TS0K/details/
diff --git a/index.js b/index.js
index 4cb5189f..ba138a36 100644
--- a/index.js
+++ b/index.js
@@ -1,10 +1,10 @@
-const RealTimePackage = require('./lib/real-time-package')
-module.exports = new RealTimePackage({
+const TeletypePackage = require('./lib/teletype-package')
+module.exports = new TeletypePackage({
workspace: atom.workspace,
notificationManager: atom.notifications,
commandRegistry: atom.commands,
tooltipManager: atom.tooltips,
clipboard: atom.clipboard,
- pusherKey: atom.config.get('real-time.pusherKey'),
- baseURL: atom.config.get('real-time.baseURL')
+ pusherKey: atom.config.get('teletype.pusherKey'),
+ baseURL: atom.config.get('teletype.baseURL')
})
diff --git a/lib/credential-cache.js b/lib/credential-cache.js
index e44794ac..1d15163c 100644
--- a/lib/credential-cache.js
+++ b/lib/credential-cache.js
@@ -1,7 +1,7 @@
const {execFile} = require('child_process')
const path = require('path')
-const SERVICE_NAME = 'atom-tachyon'
+const SERVICE_NAME = 'atom-teletype'
class CredentialCache {
async get (key) {
diff --git a/lib/editor-binding.js b/lib/editor-binding.js
index 7f38ac27..e2603dee 100644
--- a/lib/editor-binding.js
+++ b/lib/editor-binding.js
@@ -1,7 +1,7 @@
const path = require('path')
const {Range, Disposable, CompositeDisposable} = require('atom')
const normalizeURI = require('./normalize-uri')
-const {FollowState} = require('@atom/real-time-client')
+const {FollowState} = require('@atom/teletype-client')
const SitePositionsComponent = require('./site-positions-component')
function doNothing () {}
@@ -83,7 +83,7 @@ class EditorBinding {
buffer.getPath = () => `${uriPrefix}:${bufferURI}`
buffer.save = () => {}
buffer.isModified = () => false
- editor.element.classList.add('realtime-RemotePaneItem')
+ editor.element.classList.add('teletype-RemotePaneItem')
}
restoreOriginalEditorMethods (editor) {
@@ -100,7 +100,7 @@ class EditorBinding {
delete buffer.save
delete buffer.isModified
- editor.element.classList.remove('realtime-RemotePaneItem')
+ editor.element.classList.remove('teletype-RemotePaneItem')
editor.emitter.emit('did-change-title', editor.getTitle())
}
diff --git a/lib/empty-portal-pane-item.js b/lib/empty-portal-pane-item.js
index 0e38763c..dc7b0d31 100644
--- a/lib/empty-portal-pane-item.js
+++ b/lib/empty-portal-pane-item.js
@@ -7,7 +7,7 @@ class EmptyPortalPaneItem {
this.emitter = new Emitter()
this.element = document.createElement('div')
this.element.tabIndex = -1
- this.element.classList.add('realtime-RemotePaneItem')
+ this.element.classList.add('teletype-RemotePaneItem')
this.element.style.position = 'absolute'
this.element.style.width = '100%'
this.element.style.top = '50%'
diff --git a/lib/guest-portal-binding.js b/lib/guest-portal-binding.js
index c6bf34b2..7a008ee7 100644
--- a/lib/guest-portal-binding.js
+++ b/lib/guest-portal-binding.js
@@ -1,5 +1,5 @@
const {CompositeDisposable, Emitter, TextEditor, TextBuffer} = require('atom')
-const {Errors} = require('@atom/real-time-client')
+const {Errors} = require('@atom/teletype-client')
const BufferBinding = require('./buffer-binding')
const EditorBinding = require('./editor-binding')
const GuestPortalBinding = require('./guest-portal-binding')
diff --git a/lib/host-portal-binding.js b/lib/host-portal-binding.js
index 8031a510..b18ed761 100644
--- a/lib/host-portal-binding.js
+++ b/lib/host-portal-binding.js
@@ -26,7 +26,7 @@ class HostPortalBinding {
this.didChangeActiveTextEditor.bind(this)
))
- this.workspace.getElement().classList.add('realtime-Host')
+ this.workspace.getElement().classList.add('teletype-Host')
return true
} catch (error) {
this.notificationManager.addError('Failed to share portal', {
@@ -38,7 +38,7 @@ class HostPortalBinding {
}
dispose () {
- this.workspace.getElement().classList.remove('realtime-Host')
+ this.workspace.getElement().classList.remove('teletype-Host')
this.disposables.dispose()
this.didDispose()
}
diff --git a/lib/popover-component.js b/lib/popover-component.js
index 430f945e..ab7fdb66 100644
--- a/lib/popover-component.js
+++ b/lib/popover-component.js
@@ -38,6 +38,6 @@ class PopoverComponent {
})
}
- return $.div({className: 'RealTimePopoverComponent'}, activeComponent)
+ return $.div({className: 'TeletypePopoverComponent'}, activeComponent)
}
}
diff --git a/lib/portal-binding-manager.js b/lib/portal-binding-manager.js
index ad7c1d60..6c1e07a8 100644
--- a/lib/portal-binding-manager.js
+++ b/lib/portal-binding-manager.js
@@ -96,7 +96,7 @@ class PortalBindingManager {
})
if (await portalBinding.initialize()) {
- this.workspace.getElement().classList.add('realtime-Guest')
+ this.workspace.getElement().classList.add('teletype-Guest')
this.emitter.emit('did-change')
return portalBinding
}
@@ -126,7 +126,7 @@ class PortalBindingManager {
didDisposeGuestPortalBinding (portalBinding) {
this.promisesByGuestPortalId.delete(portalBinding.portalId)
if (this.promisesByGuestPortalId.size === 0) {
- this.workspace.getElement().classList.remove('realtime-Guest')
+ this.workspace.getElement().classList.remove('teletype-Guest')
}
this.emitter.emit('did-change')
}
diff --git a/lib/portal-status-bar-indicator.js b/lib/portal-status-bar-indicator.js
index 168a31c9..126fa215 100644
--- a/lib/portal-status-bar-indicator.js
+++ b/lib/portal-status-bar-indicator.js
@@ -9,7 +9,7 @@ class PortalStatusBarIndicator {
this.element,
{
item: this.popoverComponent,
- class: 'RealTimePopoverTooltip',
+ class: 'TeletypePopoverTooltip',
trigger: 'click',
placement: 'top'
}
diff --git a/lib/real-time-package.js b/lib/teletype-package.js
similarity index 86%
rename from lib/real-time-package.js
rename to lib/teletype-package.js
index 439ec48a..52d6c00e 100644
--- a/lib/real-time-package.js
+++ b/lib/teletype-package.js
@@ -1,11 +1,11 @@
-const {RealTimeClient, Errors} = require('@atom/real-time-client')
+const {TeletypeClient, Errors} = require('@atom/teletype-client')
const PortalBindingManager = require('./portal-binding-manager')
const PortalStatusBarIndicator = require('./portal-status-bar-indicator')
const AuthenticationProvider = require('./authentication-provider')
const CredentialCache = require('./credential-cache')
module.exports =
-class RealTimePackage {
+class TeletypePackage {
constructor (options) {
const {
workspace, notificationManager, commandRegistry, tooltipManager, clipboard,
@@ -22,7 +22,7 @@ class RealTimePackage {
this.baseURL = baseURL
this.tetherDisconnectWindow = tetherDisconnectWindow
this.credentialCache = credentialCache || new CredentialCache()
- this.client = new RealTimeClient({
+ this.client = new TeletypeClient({
pusherKey: this.pusherKey,
baseURL: this.baseURL,
pubSubGateway: this.pubSubGateway,
@@ -45,17 +45,17 @@ class RealTimePackage {
}
activate () {
- console.log('real-time: Using pusher key:', this.pusherKey)
- console.log('real-time: Using base URL:', this.baseURL)
+ console.log('teletype: Using pusher key:', this.pusherKey)
+ console.log('teletype: Using base URL:', this.baseURL)
this.commandRegistry.add('atom-workspace', {
- 'real-time:share-portal': () => this.sharePortal()
+ 'teletype:share-portal': () => this.sharePortal()
})
this.commandRegistry.add('atom-workspace', {
- 'real-time:join-portal': () => this.joinPortal()
+ 'teletype:join-portal': () => this.joinPortal()
})
- this.commandRegistry.add('atom-workspace.realtime-Host', {
- 'real-time:close-portal': () => this.closeHostPortal()
+ this.commandRegistry.add('atom-workspace.teletype-Host', {
+ 'teletype:close-portal': () => this.closeHostPortal()
})
// Initiate sign-in, which will continue asynchronously, since we don't want
@@ -96,8 +96,8 @@ class RealTimePackage {
}
async consumeStatusBar (statusBar) {
- const realTimeClient = await this.getClient()
- if (!realTimeClient) return
+ const teletypeClient = await this.getClient()
+ if (!teletypeClient) return
const portalBindingManager = await this.getPortalBindingManager()
if (!portalBindingManager) return
@@ -106,7 +106,7 @@ class RealTimePackage {
if (!authenticationProvider) return
this.portalStatusBarIndicator = new PortalStatusBarIndicator({
- realTimeClient,
+ teletypeClient,
portalBindingManager,
authenticationProvider,
tooltipManager: this.tooltipManager,
@@ -155,7 +155,7 @@ class RealTimePackage {
handleConnectionError (event) {
const message = 'Connection Error'
- const description = `An error occurred with a real-time connection: ${event.message}
`
+ const description = `An error occurred with a teletype connection: ${event.message}
`
this.notificationManager.addError(message, {
description,
dismissable: true
@@ -209,18 +209,18 @@ class RealTimePackage {
} catch (error) {
let message, description, buttons
if (error instanceof Errors.ClientOutOfDateError) {
- message = 'The real-time package is out of date'
+ message = 'The teletype package is out of date'
description = 'You will need to update the package to continue collaborating.'
buttons = [{
text: 'View Package Settings',
onDidClick: () => {
- this.workspace.open('atom://config/packages/real-time')
+ this.workspace.open('atom://config/packages/teletype')
notification.dismiss()
}
}]
} else {
- message = 'Failed to initialize the real-time package'
- description = `Establishing a real-time connection failed with error: ${error.message}
`
+ message = 'Failed to initialize the teletype package'
+ description = `Establishing a teletype connection failed with error: ${error.message}
`
buttons = null
}
diff --git a/package.json b/package.json
index dfe7a6bb..27358221 100644
--- a/package.json
+++ b/package.json
@@ -1,9 +1,9 @@
{
- "name": "real-time",
+ "name": "teletype",
"version": "0.1.0",
"description": "",
"main": "index.js",
- "repository": "https://github.com/atom/real-time",
+ "repository": "https://github.com/atom/teletype",
"scripts": {
"test": "atom --test test"
},
@@ -11,13 +11,13 @@
"license": "MIT",
"atomTestRunner": "./test/setup",
"devDependencies": {
- "@atom/real-time-server": "https://user-with-just-readonly-access-to-realtime-repos:924792417376b236ca11cc234bcc95d306dcd1cb@api.github.com/repos/atom/real-time-server/tarball/v0.15.0",
+ "@atom/teletype-server": "https://user-with-just-readonly-access-to-realtime-repos:924792417376b236ca11cc234bcc95d306dcd1cb@api.github.com/repos/atom/teletype-server/tarball/v0.16.0",
"atom-mocha-test-runner": "^1.0.1",
"deep-equal": "^1.0.1",
"temp": "^0.8.3"
},
"dependencies": {
- "@atom/real-time-client": "https://user-with-just-readonly-access-to-realtime-repos:924792417376b236ca11cc234bcc95d306dcd1cb@api.github.com/repos/atom/real-time-client/tarball/v0.24.0",
+ "@atom/teletype-client": "https://user-with-just-readonly-access-to-realtime-repos:924792417376b236ca11cc234bcc95d306dcd1cb@api.github.com/repos/atom/teletype-client/tarball/v0.25.0",
"etch": "^0.12.6"
},
"consumedServices": {
diff --git a/styles/real-time.less b/styles/teletype.less
similarity index 99%
rename from styles/real-time.less
rename to styles/teletype.less
index a6d571d8..f9798e1e 100644
--- a/styles/real-time.less
+++ b/styles/teletype.less
@@ -19,7 +19,7 @@
}
}
-.RealTimePopoverTooltip {
+.TeletypePopoverTooltip {
user-select: none;
&.tooltip {
@@ -51,7 +51,7 @@
}
}
-.RealTimePopoverComponent {
+.TeletypePopoverComponent {
height: 100%;
display: flex;
align-items: center;
diff --git a/test/editor-binding.test.js b/test/editor-binding.test.js
index 16574d80..29d1b1ac 100644
--- a/test/editor-binding.test.js
+++ b/test/editor-binding.test.js
@@ -5,7 +5,7 @@ const SAMPLE_TEXT = fs.readFileSync(path.join(__dirname, 'fixtures', 'sample.js'
const {TextEditor, TextBuffer, Range} = require('atom')
const EditorBinding = require('../lib/editor-binding')
const {buildAtomEnvironment, destroyAtomEnvironments} = require('./helpers/atom-environments')
-const {FollowState} = require('@atom/real-time-client')
+const {FollowState} = require('@atom/teletype-client')
suite('EditorBinding', function () {
if (process.env.CI) this.timeout(process.env.TEST_TIMEOUT_IN_MS)
@@ -17,7 +17,7 @@ suite('EditorBinding', function () {
const environment = buildAtomEnvironment()
// Load also package style sheets, so that additional UI elements are styled
// correctly.
- const packageStyleSheetPath = path.join(__dirname, '..', 'styles', 'real-time.less')
+ const packageStyleSheetPath = path.join(__dirname, '..', 'styles', 'teletype.less')
const compiledStyleSheet = environment.themes.loadStylesheet(packageStyleSheetPath)
environment.styles.addStyleSheet(compiledStyleSheet)
// Position editor absolutely to prevent its size from being affected by the
@@ -239,7 +239,7 @@ suite('EditorBinding', function () {
const editorProxy = new FakeEditorProxy(binding)
binding.setEditorProxy(editorProxy)
- // Ensure exclusivity is being relayed. This enables tachyon to resolve
+ // Ensure exclusivity is being relayed. This enables teletype-crdt to resolve
// logical ranges correctly when the local site performs an insertion right
// at a remote site cursor position, but before such cursor has been relayed
// to the local site.
@@ -312,7 +312,7 @@ suite('EditorBinding', function () {
assert.equal(editor.copy(), null)
assert.equal(editor.serialize(), null)
assert.equal(buffer.getPath(), '@site-1:fake-buffer-proxy-uri')
- assert(editor.element.classList.contains('realtime-RemotePaneItem'))
+ assert(editor.element.classList.contains('teletype-RemotePaneItem'))
assert(!editor.getBuffer().isModified())
binding.dispose()
@@ -321,7 +321,7 @@ suite('EditorBinding', function () {
assert.notEqual(editor.copy(), null)
assert.notEqual(editor.serialize(), null)
assert.equal(buffer.getPath(), null)
- assert(!editor.element.classList.contains('realtime-RemotePaneItem'))
+ assert(!editor.element.classList.contains('teletype-RemotePaneItem'))
assert(editor.getBuffer().isModified())
})
})
diff --git a/test/guest-portal-binding.test.js b/test/guest-portal-binding.test.js
index c3a27eac..03c3519d 100644
--- a/test/guest-portal-binding.test.js
+++ b/test/guest-portal-binding.test.js
@@ -1,6 +1,6 @@
const assert = require('assert')
const {buildAtomEnvironment, destroyAtomEnvironments} = require('./helpers/atom-environments')
-const {RealTimeClient} = require('@atom/real-time-client')
+const {TeletypeClient} = require('@atom/teletype-client')
const GuestPortalBinding = require('../lib/guest-portal-binding')
suite('GuestPortalBinding', () => {
@@ -10,7 +10,7 @@ suite('GuestPortalBinding', () => {
test('handling an unexpected error when joining a portal', async () => {
const stubPubSubGateway = {}
- const client = new RealTimeClient({pubSubGateway: stubPubSubGateway})
+ const client = new TeletypeClient({pubSubGateway: stubPubSubGateway})
client.joinPortal = function () {
throw new Error('It broke!')
}
@@ -28,7 +28,7 @@ suite('GuestPortalBinding', () => {
test('showing notifications when sites join or leave', async () => {
const stubPubSubGateway = {}
- const client = new RealTimeClient({pubSubGateway: stubPubSubGateway})
+ const client = new TeletypeClient({pubSubGateway: stubPubSubGateway})
const portal = {
setDelegate (delegate) {
this.delegate = delegate
@@ -59,7 +59,7 @@ suite('GuestPortalBinding', () => {
test('switching the active editor in rapid succession', async () => {
const stubPubSubGateway = {}
- const client = new RealTimeClient({pubSubGateway: stubPubSubGateway})
+ const client = new TeletypeClient({pubSubGateway: stubPubSubGateway})
const portal = {
getSiteIdentity (siteId) {
return {login: 'some-host'}
diff --git a/test/host-portal-binding.test.js b/test/host-portal-binding.test.js
index 3d337121..84af2486 100644
--- a/test/host-portal-binding.test.js
+++ b/test/host-portal-binding.test.js
@@ -1,6 +1,6 @@
const assert = require('assert')
const {buildAtomEnvironment, destroyAtomEnvironments} = require('./helpers/atom-environments')
-const {RealTimeClient} = require('@atom/real-time-client')
+const {TeletypeClient} = require('@atom/teletype-client')
const HostPortalBinding = require('../lib/host-portal-binding')
const FakeClipboard = require('./helpers/fake-clipboard')
@@ -11,7 +11,7 @@ suite('HostPortalBinding', () => {
test('handling an unexpected error when joining a portal', async () => {
const stubPubSubGateway = {}
- const client = new RealTimeClient({pubSubGateway: stubPubSubGateway})
+ const client = new TeletypeClient({pubSubGateway: stubPubSubGateway})
client.createPortal = function () {
throw new Error('It broke!')
}
@@ -29,7 +29,7 @@ suite('HostPortalBinding', () => {
test('showing notifications when sites join or leave', async () => {
const stubPubSubGateway = {}
- const client = new RealTimeClient({pubSubGateway: stubPubSubGateway})
+ const client = new TeletypeClient({pubSubGateway: stubPubSubGateway})
const portal = {
setDelegate (delegate) {
this.delegate = delegate
diff --git a/test/portal-binding-manager.test.js b/test/portal-binding-manager.test.js
index 4d83313d..819c59f8 100644
--- a/test/portal-binding-manager.test.js
+++ b/test/portal-binding-manager.test.js
@@ -69,18 +69,18 @@ suite('PortalBindingManager', () => {
const portalBinding1Promise = manager.createGuestPortalBinding('1')
manager.client.resolveLastJoinPortalPromise(buildPortal())
const portalBinding1 = await portalBinding1Promise
- assert(manager.workspace.element.classList.contains('realtime-Guest'))
+ assert(manager.workspace.element.classList.contains('teletype-Guest'))
const portalBinding2Promise = manager.createGuestPortalBinding('2')
manager.client.resolveLastJoinPortalPromise(buildPortal())
const portalBinding2 = await portalBinding2Promise
- assert(manager.workspace.element.classList.contains('realtime-Guest'))
+ assert(manager.workspace.element.classList.contains('teletype-Guest'))
portalBinding1.leave()
- assert(manager.workspace.element.classList.contains('realtime-Guest'))
+ assert(manager.workspace.element.classList.contains('teletype-Guest'))
portalBinding2.leave()
- assert(!manager.workspace.element.classList.contains('realtime-Guest'))
+ assert(!manager.workspace.element.classList.contains('teletype-Guest'))
})
})
diff --git a/test/portal-list-component.test.js b/test/portal-list-component.test.js
index 7d16b4cb..1bd34147 100644
--- a/test/portal-list-component.test.js
+++ b/test/portal-list-component.test.js
@@ -3,8 +3,8 @@ const etch = require('etch')
const condition = require('./helpers/condition')
const {Disposable} = require('atom')
const FakeClipboard = require('./helpers/fake-clipboard')
-const {RealTimeClient} = require('@atom/real-time-client')
-const {startTestServer} = require('@atom/real-time-server')
+const {TeletypeClient} = require('@atom/teletype-client')
+const {startTestServer} = require('@atom/teletype-server')
const PortalBindingManager = require('../lib/portal-binding-manager')
const PortalListComponent = require('../lib/portal-list-component')
@@ -14,7 +14,7 @@ suite('PortalListComponent', function () {
let testServer, portalBindingManagers
suiteSetup(async function () {
- testServer = await startTestServer({databaseURL: 'postgres://localhost:5432/real-time-test'})
+ testServer = await startTestServer({databaseURL: 'postgres://localhost:5432/teletype-test'})
})
suiteTeardown(() => {
@@ -188,7 +188,7 @@ suite('PortalListComponent', function () {
}
async function buildPortalBindingManager () {
- const client = new RealTimeClient({
+ const client = new TeletypeClient({
baseURL: testServer.address,
pubSubGateway: testServer.pubSubGateway
})
diff --git a/test/real-time-package.test.js b/test/teletype-package.test.js
similarity index 97%
rename from test/real-time-package.test.js
rename to test/teletype-package.test.js
index 4291ccd5..ef44f026 100644
--- a/test/real-time-package.test.js
+++ b/test/teletype-package.test.js
@@ -1,5 +1,5 @@
-const RealTimePackage = require('../lib/real-time-package')
-const {Errors} = require('@atom/real-time-client')
+const TeletypePackage = require('../lib/teletype-package')
+const {Errors} = require('@atom/teletype-client')
const {TextBuffer, TextEditor} = require('atom')
const {buildAtomEnvironment, destroyAtomEnvironments} = require('./helpers/atom-environments')
@@ -14,15 +14,15 @@ const fs = require('fs')
const path = require('path')
const temp = require('temp').track()
-suite('RealTimePackage', function () {
+suite('TeletypePackage', function () {
this.timeout(process.env.TEST_TIMEOUT_IN_MS || 5000)
let testServer, containerElement, environments, packages, portals
suiteSetup(async function () {
- const {startTestServer} = require('@atom/real-time-server')
+ const {startTestServer} = require('@atom/teletype-server')
testServer = await startTestServer({
- databaseURL: 'postgres://localhost:5432/real-time-test',
+ databaseURL: 'postgres://localhost:5432/teletype-test',
// Uncomment and provide credentials to test against Pusher.
// pusherCredentials: {
// appId: '123',
@@ -852,9 +852,9 @@ suite('RealTimePackage', function () {
const host1Env = buildAtomEnvironment()
const host1Package = await buildPackage(host1Env)
const host1Portal = await host1Package.sharePortal()
- assert(host1Env.workspace.getElement().classList.contains('realtime-Host'))
+ assert(host1Env.workspace.getElement().classList.contains('teletype-Host'))
await host1Package.closeHostPortal()
- assert(!host1Env.workspace.getElement().classList.contains('realtime-Host'))
+ assert(!host1Env.workspace.getElement().classList.contains('teletype-Host'))
})
test('reports when the package needs to be upgraded due to an out-of-date protocol version', async () => {
@@ -873,11 +873,11 @@ suite('RealTimePackage', function () {
assert.equal(env.notifications.getNotifications().length, 1)
const notification = env.notifications.getNotifications()[0]
assert.equal(notification.type, 'error')
- assert.equal(notification.message, 'The real-time package is out of date')
+ assert.equal(notification.message, 'The teletype package is out of date')
const openedURIs = []
env.workspace.open = (uri) => openedURIs.push(uri)
notification.options.buttons[0].onDidClick()
- assert.deepEqual(openedURIs, ['atom://config/packages/real-time'])
+ assert.deepEqual(openedURIs, ['atom://config/packages/teletype'])
assert(notification.isDismissed())
}
@@ -890,11 +890,11 @@ suite('RealTimePackage', function () {
assert.equal(env.notifications.getNotifications().length, 1)
const notification = env.notifications.getNotifications()[0]
assert.equal(notification.type, 'error')
- assert.equal(notification.message, 'The real-time package is out of date')
+ assert.equal(notification.message, 'The teletype package is out of date')
const openedURIs = []
env.workspace.open = (uri) => openedURIs.push(uri)
notification.options.buttons[0].onDidClick()
- assert.deepEqual(openedURIs, ['atom://config/packages/real-time'])
+ assert.deepEqual(openedURIs, ['atom://config/packages/teletype'])
assert(notification.isDismissed())
}
})
@@ -916,7 +916,7 @@ suite('RealTimePackage', function () {
const {type, message, options} = env.notifications.getNotifications()[0]
const {description} = options
assert.equal(type, 'error')
- assert.equal(message, 'Failed to initialize the real-time package')
+ assert.equal(message, 'Failed to initialize the teletype package')
assert(description.includes('an error'))
}
@@ -929,7 +929,7 @@ suite('RealTimePackage', function () {
const {type, message, options} = env.notifications.getNotifications()[0]
const {description} = options
assert.equal(type, 'error')
- assert.equal(message, 'Failed to initialize the real-time package')
+ assert.equal(message, 'Failed to initialize the teletype package')
assert(description.includes('an error'))
}
})
@@ -952,7 +952,7 @@ suite('RealTimePackage', function () {
let nextTokenId = 0
async function buildPackage (env, options = {}) {
const credentialCache = new FakeCredentialCache()
- const pack = new RealTimePackage({
+ const pack = new TeletypePackage({
baseURL: testServer.address,
pubSubGateway: testServer.pubSubGateway,
workspace: env.workspace,
@@ -1011,7 +1011,7 @@ function getPaneItems ({workspace}) {
function getRemotePaneItems ({workspace}) {
return workspace.getPaneItems().filter((item) => {
- return item.element.classList.contains('realtime-RemotePaneItem')
+ return item.element.classList.contains('teletype-RemotePaneItem')
})
}