mirror of
https://github.com/atom/atom.git
synced 2026-01-24 14:28:14 -05:00
Merge branch 'ns-latest-telepath'
This commit is contained in:
@@ -43,7 +43,7 @@
|
||||
"season": "0.14.0",
|
||||
"semver": "1.1.4",
|
||||
"space-pen": "2.0.1",
|
||||
"telepath": "0.66.0",
|
||||
"telepath": "0.68.0",
|
||||
"temp": "0.5.0",
|
||||
"underscore-plus": "0.5.0"
|
||||
},
|
||||
|
||||
@@ -438,3 +438,11 @@ describe "the `atom` global", ->
|
||||
expect(atom.config.get('core.themes')).not.toContain packageName
|
||||
expect(atom.config.get('core.themes')).not.toContain packageName
|
||||
expect(atom.config.get('core.disabledPackages')).not.toContain packageName
|
||||
|
||||
describe ".isReleasedVersion()", ->
|
||||
it "returns false if the version is a SHA and true otherwise", ->
|
||||
version = '0.1.0'
|
||||
spyOn(atom, 'getVersion').andCallFake -> version
|
||||
expect(atom.isReleasedVersion()).toBe true
|
||||
version = '36b5518'
|
||||
expect(atom.isReleasedVersion()).toBe false
|
||||
|
||||
@@ -9,7 +9,8 @@ dialog = remote.require 'dialog'
|
||||
app = remote.require 'app'
|
||||
|
||||
_ = require 'underscore-plus'
|
||||
{Document} = require 'telepath'
|
||||
telepath = require 'telepath'
|
||||
{Document} = telepath
|
||||
fs = require 'fs-plus'
|
||||
{Subscriber} = require 'emissary'
|
||||
|
||||
@@ -53,6 +54,8 @@ class Atom
|
||||
{devMode, resourcePath} = atom.getLoadSettings()
|
||||
configDirPath = @getConfigDirPath()
|
||||
|
||||
telepath.devMode = not @isReleasedVersion()
|
||||
|
||||
Config = require './config'
|
||||
Keymap = require './keymap'
|
||||
PackageManager = require './package-manager'
|
||||
@@ -361,6 +364,10 @@ class Atom
|
||||
getVersion: ->
|
||||
app.getVersion()
|
||||
|
||||
# Public: Determine whether the current version is an official release.
|
||||
isReleasedVersion: ->
|
||||
not /\w{7}/.test(@getVersion()) # Check if the release is a 7-character SHA prefix
|
||||
|
||||
getGitHubAuthTokenName: ->
|
||||
'Atom GitHub API Token'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user