Commit Graph

111 Commits

Author SHA1 Message Date
Max Brunsfeld
69b1a08ef5 Rename .splitPath -> .relativizePath 2015-02-26 08:46:00 -08:00
Max Brunsfeld
b307024218 Add API for getting paths relative to project dirs 2015-02-25 17:15:08 -08:00
Michael Bolin
d5abd87643 reword it() message 2015-02-19 21:35:07 -08:00
Michael Bolin
54c7070648 kill assertions about directoryProviders 2015-02-19 21:16:30 -08:00
Michael Bolin
bf9c4132b2 Create a comprehensive test for the new behavior in Project. 2015-02-19 21:02:31 -08:00
Max Brunsfeld
cf60855245 Don't destroy repo in ::removePath if it is still needed 2015-02-19 10:28:54 -08:00
Max Brunsfeld
d4298bf077 Add Project::removePath
The tree-view needs to be able to remove a path from
the project
2015-02-19 10:02:37 -08:00
Max Brunsfeld
a9adfa6a76 Fix bug in Project::relativize 2015-02-18 16:47:35 -08:00
Michael Bolin
222db8af21 ./script/grunt lint and temp.mkdirSync('atom-project') instead of 'tmp'. 2015-02-17 10:14:35 -08:00
Michael Bolin
5805bf9675 Try to set the Project's repo if it does not have one when a new RepositoryProvider is registered.
I tested this using my test `HgRepositoryProvider`. Now when I run the following from the
command line:

    atom <path-to-directory-with-hg-repository>

And then run the following in the console:

    atom.project.getRepositories()

I get an array with an `HgRepository` in it. Previously, I got an empty array because the
`Project`'s paths were set before my `HgRepositoryProvider` was registered.
2015-02-13 22:27:13 -08:00
Max Brunsfeld
ac78cee584 🔥 ncp; use fs.copySync 2015-02-12 22:14:02 -08:00
Max Brunsfeld
e0aa8e7f5c Move ncp dependency to build/package.json 2015-02-12 21:18:20 -08:00
Max Brunsfeld
f7e1629cfc Set multiple project paths for multiple cmd-line paths
Signed-off-by: Jessica Lord <jlord@github.com>
2015-02-12 21:18:18 -08:00
Max Brunsfeld
4ebfd22e3d Add Project::addPath 2015-02-12 21:16:26 -08:00
Max Brunsfeld
8ab4ad54d8 Allow Project::setPaths to handle multiple paths
Signed-off-by: Jessica Lord <jlord@github.com>
2015-02-12 21:16:15 -08:00
Michael Bolin
653bd32a3f Introduce local promise variable to simplify assertion. 2015-02-12 09:52:48 -08:00
Michael Bolin
603a672629 Moved the bulk of the test into waitsForPromise to eliminate some extra variables. 2015-02-12 09:47:11 -08:00
Michael Bolin
673dae9f5b Remove snake-case variable names in tests. 2015-02-12 09:38:29 -08:00
Michael Bolin
ca31c08e22 Remove reference to private atom.project.repositoryForDirectory property in unit test. 2015-02-12 09:31:44 -08:00
Michael Bolin
a3286f1f1d Fix up assertion messages. Make some .then() calls one-liners. 2015-02-12 09:28:26 -08:00
Michael Bolin
7a89366146 excise outdated comment 2015-02-12 09:22:27 -08:00
Michael Bolin
ddd0ef5eb1 change describe() to it() so runs() is nested in an it() 2015-02-12 09:20:17 -08:00
Michael Bolin
485a4deb83 Fix an assertion that was failing but was being reported as part of the wrong test. 2015-02-11 23:01:19 -08:00
Michael Bolin
5b03cfe878 Added unit test for Project::repositoryForDirectory and fixed the bug
that my unit test caught.
2015-02-11 22:38:02 -08:00
Kevin Sawicki
d736ebff38 Don't deserialize buffers with inaccessible paths 2015-01-16 09:33:42 -08:00
Kevin Sawicki
16cc9f76c4 📝 Tweak spec description 2015-01-16 09:33:42 -08:00
Kevin Sawicki
6ad8aa7e5c Ignore buffer errors when the path is a directory
This would previously cause Atom to fail to launch if a buffer's
serialized path was now a directory on launch.
2015-01-16 09:33:42 -08:00
Ben Ogle
274ae6cd57 Use buffer.getPath not @getPath in project
😬
2015-01-14 16:15:53 -08:00
Ben Ogle
3dc908c5ff Use eventType from pathwatcher's watch errors in messages 2015-01-14 16:15:53 -08:00
Ben Ogle
b8efbedee1 Create a warning notification when buffer has a watch error 2015-01-14 16:15:52 -08:00
Nathan Sobo
d26c19a0ec Deprecate Project::resolve
It’s not something that will make sense once we add the ability to have
multiple directories in a project. This adds a new private method on
Project, ::resolvePath, with the original implementation for convenience
until we actually implement multi-folder projects.
2015-01-09 15:03:07 -08:00
Nathan Sobo
19bf64f3cd Revert "Deprecate Project::resolve"
This reverts commit 3c5bd9f10a.
2015-01-09 13:58:01 -08:00
Nathan Sobo
3c5bd9f10a Deprecate Project::resolve
It’s not something that will make sense once we add the ability to have
multiple directories in a project.
2015-01-09 13:40:35 -08:00
Nathan Sobo
bdfc862dac Move Project::replace to Workspace 2014-12-29 11:43:17 -06:00
Nathan Sobo
2c7aa170e9 Move Project::scan to Workspace 2014-12-29 11:35:07 -06:00
Nathan Sobo
ddc04f2278 Fix spec name 2014-11-27 09:11:21 -07:00
Ben Ogle
d8f64c15b8 Use project.getDirectories() 2014-11-26 14:55:39 -08:00
Nathan Sobo
33c1ce863e Pluralize Project API
This changes all APIs concerning paths and repositories on the project
to be plural, preparing us to switch to multi-folder projects. It
doesn’t make any changes to actually support multiple folders. Instead
we just wrap the previous return values in singleton arrays.

* constructor ‘path’ params -> ‘paths’
* getRootDirectory -> getDirectories
* getPath -> getPaths
* setPath -> setPaths
* getRepo -> getRepositories
2014-10-01 10:48:39 -06:00
Kevin Sawicki
24add494ae Normalize project path in Project::setPath
This will remove consecutive slashes as well as . and ..
characters and make path comparisons accurate.

Closes atom/tree-view#191
2014-09-02 10:49:02 -07:00
Kevin Sawicki
2e554ac819 Use cross platform path in Project::replace spec 2014-07-05 10:01:19 -07:00
Ben Ogle
06d06d10e0 💄 2014-07-01 10:45:13 -07:00
Ben Ogle
44b95fc637 Emit errors from the out of process searches 2014-07-01 10:44:30 -07:00
Kevin Sawicki
0245ec28eb Always handle resolving absolute URIs 2014-06-02 15:45:47 -07:00
Kevin Sawicki
94f86cb461 Don't resolve uris when project has not path 2014-06-02 15:41:05 -07:00
Corey Johnson
9d92a27ccf Remove deprecated method calls from project spec 2014-04-23 16:50:25 -07:00
Corey Johnson
1583271e2f Use setTextInRange instead of change 2014-04-18 15:50:30 -07:00
probablycorey
63a80a4d4d Revert "Revert "Merge pull request #1844 from atom/cj-move-functionality-to-workspace""
This reverts commit 87d008c337.
2014-04-08 10:52:19 -07:00
probablycorey
87d008c337 Revert "Merge pull request #1844 from atom/cj-move-functionality-to-workspace"
This reverts commit 2d7dda066c, reversing
changes made to 96e3c63291.
2014-04-08 10:44:08 -07:00
probablycorey
11a91fb974 Move editor-created specs to Workspace 2014-04-04 15:31:44 -07:00
probablycorey
1d426e8fd2 Move editor-created event to Workspace 2014-04-04 15:31:44 -07:00