Skip to content

Commit

Permalink
Moved config into main module. Resolves #77 and resolves #78
Browse files Browse the repository at this point in the history
  • Loading branch information
jpatel531 committed Aug 27, 2015
1 parent ebc2947 commit 9c915a9
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 27 deletions.
26 changes: 22 additions & 4 deletions lib/atom_pair.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,40 @@ HipChatInvitation = null
SlackInvitation = null
Session = null
_ = null
AtomPairConfig = null

module.exports = AtomPair =

AtomPairView: null
modalPanel: null
subscriptions: null

config:
hipchat_token:
type: 'string'
description: 'HipChat admin token (optional)'
default: ''
hipchat_room_name:
type: 'string'
description: 'HipChat room name for sending invitations (optional)'
default: ''
pusher_app_key:
type: 'string'
description: 'Pusher App Key (sign up at http://pusher.com/signup and change for added security)'
default: 'd41a439c438a100756f5'
pusher_app_secret:
type: 'string'
description: 'Pusher App Secret'
default: '4bf35003e819bb138249'
slack_url:
type: 'string'
description: 'WebHook URL for Slack Incoming Webhook Integration'
default: ''

activate: (state) ->
_ = require 'underscore'
Invitation = require './modules/invitations/invitation'
HipChatInvitation = require './modules/invitations/hipchat_invitation'
SlackInvitation = require './modules/invitations/slack_invitation'
AtomPairConfig = require './modules/atom_pair_config'
_.extend(@, AtomPairConfig)

Session = require './modules/session'

# Events subscribed to in atom's system can be easily cleaned up with a CompositeDisposable
Expand Down
23 changes: 0 additions & 23 deletions lib/modules/atom_pair_config.coffee

This file was deleted.

2 changes: 2 additions & 0 deletions spec/invitations/invitation-spec.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ describe 'Invitation', ->
it 'complains if there are no Pusher keys', ->
waitsForPromise -> activationPromise
runs ->
atom.config.set('atom-pair.pusher_app_key', '')
atom.config.set('atom-pair.pusher_app_secret', '')
session = new Session
spyOn(atom.notifications, 'addError')
invitation = new Invitation(session)
Expand Down

0 comments on commit 9c915a9

Please sign in to comment.