Commit graph

330 commits

Author SHA1 Message Date
Phil Hagelberg
04133b573a Accept both orderings of args in :show subtask of new. 2013-11-18 20:08:09 -08:00
Phil Hagelberg
a45e8a5b0f Move parse-options test, fix typo. 2013-11-16 14:43:59 -08:00
Phil Hagelberg
1f7886c8bb Move parse-options into leiningen.core.main for general use.
Also remove support for single-dashed args.
2013-11-16 14:43:59 -08:00
Travis Vachon
1926f12e48 Refactor lein new argument parsing
It was a bit janky and hard to extend. This is maybe still janky, but
very extensible. Win?

We can now easily add new options to this command. I took some pains to
maintain backwards compatibility, even with the undocumented ability to
pass arguments on to templates. The full extent of this syntax isn't
documented in the docstring yet, but I'll expand that once we support
options that expose its darker corners.
2013-11-16 14:43:59 -08:00
Jean Niklas L'orange
ae2e789b04 Support nested do chains, remove implicit help.
Also provide an example in the sample project. Closes #1359.
2013-10-30 00:40:44 +01:00
Toby Crawley
3e865aedf2 Account for repl urls with paths [fixes #1344, again] 2013-10-17 00:06:40 -04:00
Toby Crawley
9f41ea9154 Fix 'repl :connect <port>' when used outside of a project [fixes #1344]
connect-string now verifies that the string ends with a port after the
string is fully formed, aborting if no port is found. This also
includes improvements to the repl help text, and more test coverage
for connect-string.
2013-10-10 11:50:44 -04:00
Phil Hagelberg
7b3ff4e570 Add a test for gpg keys and ssl cert expiry. 2013-10-05 15:29:16 -07:00
Marshall Bockrath-Vandegrift
39e3d57ec9 Implement :uberjar-merge-with requested in issue #973. 2013-10-05 13:56:57 -04:00
Jim Crossley
360fab0fe7 Abort with a nicer message when neither port nor .nrepl-port is provided 2013-10-02 11:05:16 -04:00
Jim Crossley
bd008f800e Fallback to .nrepl-port for 'repl :connect' subtask 2013-10-01 15:18:25 -04:00
Jean Niklas L'orange
ab7f332797 Merge in better error messages for -m in lein run. 2013-09-29 20:07:49 +02:00
Jean Niklas L'orange
f39b4b7c38 More descriptive error message for nonexistant ns.
Closes #1257.
2013-09-29 20:02:17 +02:00
Jean Niklas L'orange
10adf535d3 Better error message for bad -m args. 2013-09-29 18:57:52 +02:00
Jean Niklas L'orange
c86a69333e Don't add alias-help as public API in lein.help.
Also add in a couple of tests to ensure that aliases print docstrings.
2013-09-07 03:01:06 +02:00
Jean Niklas L'orange
89f06a49aa Add in a :plugin-tree test. 2013-08-29 15:21:08 +02:00
Jean Niklas L'orange
400d782272 Reenable java main run test.
Also more changes from use to require.
2013-08-24 17:36:21 +02:00
Jean Niklas L'orange
d00670f27f Delete subdir directory. 2013-08-24 17:12:15 +02:00
Jean Niklas L'orange
ab9271bcef Go from use->require. 2013-08-24 16:56:43 +02:00
Jean Niklas L'orange
cbd9e6b1cb Clean up helper docstrings. 2013-08-24 16:56:29 +02:00
Vadim Platonov
5b97d9a472 fix(jar): Add directory entries to the jar file
According to the [jar file specification](http://docs.oracle.com/javase/7/docs/technotes/guides/jar/jar.html)

> For resource files with non-empty directory prefixes, mappings are also
> recorded at the directory level.  Only for classes with null package
> name, and resource files which reside in the root directory, will the
> mapping be recorded at the individual file level.

If needed, directory entries may be excluded using `:jar-exclusions`
regex like `#"^.*/$"`.
2013-08-21 14:30:10 +03:00
Phil Hagelberg
95bdc72f80 Add :exclusions to :base deps to avoid version conflict warnings. 2013-08-17 21:10:58 -07:00
Phil Hagelberg
d12e7b1343 Fix pom tests. 2013-08-08 14:30:13 -07:00
Gary Fredericks
08eaf70781 #1269: Skip tests differently when using :test-selectors
The old method skipped tests by adding a hook to
clojure.test/test-var, the problem being that :each fixtures
associated with the test have already run at that point, which is
unideal.

This change skips test by removing their :test metadata before running
the tests at all, which causes clojure.test to not see it as a test.

We use ns-interns to enumerate the vars, the same way clojure.test
does.
2013-07-31 23:29:19 -05:00
Wolodja Wentland
83c136daa1 Add LICENSE file to project templates
Projects created by "lein new" are meant to be licensed under the EPL as noted
in project.clj and README.md. One requirement of the EPL is, however, that "a
copy of this Agreement [the EPL] must be included with each copy of the
Program." [0].

This means that projects created by leiningen cannot be legally distributed if
the author fails to add the LICENSE him/herself. This patch fixes this issue
by creating a LICENSE file with a plain text copy of the EPL 1.0 (cf. [0]) by
default for new projects.

[0] http://www.eclipse.org/legal/epl-v10.html → 3. REQUIREMENTS
2013-07-30 15:07:44 +01:00
Jean Niklas L'orange
2d8d5b39a6 Revert uberjar test back to std. name, ref #1260. 2013-07-26 09:17:35 +02:00
Jean Niklas L'orange
ae161bac8a "Fix" uberjar test, and make jar defn private.
Ref #1260, all uberjars generated without any specific profile
additions/deletions are now put in the folder `target/uberjar+provided`.
That's not intentional, right?
2013-07-25 10:37:58 +02:00
Phil Hagelberg
962ce20ae9 Scope :compile-path and :native-path under :target-path. 2013-07-24 20:55:23 -07:00
Phil Hagelberg
4feade3f7b Fix wonky newlines. 2013-07-24 19:21:23 -07:00
Jean Niklas L'orange
c3aa8d51be Add resources dir to app template, ref #1016. 2013-07-10 12:21:49 +02:00
Phil Hagelberg
a41c7e4bd0 Merge pull request #1223 from kanej/hostreplarg
Add :host as an option to 'lein repl :start' and 'lein repl :headless' commands
2013-06-14 12:36:42 -07:00
John Kane
6cabea9be8 Add Host as arg to "repl :start" and "repl :headless" commands.
This is a step towards easier setting up of remote nrepl
sessions, see issue #1217.
2013-06-11 00:39:10 +01:00
Leon Barrett
2d5e1b04de Fixed long line support in make-manifest. 2013-06-10 16:08:00 -07:00
Gary Fredericks
61091d44c3 Crash on :aot [does.not.exist]; also regression test; Fixes #1205
We want missing namespaces in :aot to not be silently ignored.
Implemented by removing the file-existence check from the function
that determines which namespaces need to be compiled.

This means we won't get the error if you compile an existing namespace
and subsequently delete the *.clj file. Oh well.
2013-06-04 16:39:58 -05:00
Leon Barrett
38090775f8 Fix a bug where the manifest is missing its last line.
Despite the documentation on java.util.jar.Manifest [1], the Manifest class
seems to require an endline in its input. If not, it drops the last line (on my
system, version [2], anyway).

[1] http://docs.oracle.com/javase/6/docs/technotes/guides/jar/jar.html
[2] $ java -version
java version "1.7.0_21"
OpenJDK Runtime Environment (IcedTea 2.3.9) (7u21-2.3.9-0ubuntu0.12.04.1)
OpenJDK 64-Bit Server VM (build 23.7-b01, mixed mode)
2013-05-31 10:51:51 -07:00
Colin Jones
3118083d44 Add custom-help to reply-options expectation 2013-05-27 22:20:51 -05:00
Gary Fredericks
71e609c8a1 Don't try static methods on lein run: better error msg
lein run tries to support invoking static methods on classes by
swallowing FileNotFoundExceptions when requiring the namespace to run,
which can obscure the real error when there's a real issue loading a
namespace.

Phil said he wasn't interested in keeping the (undocumented) feature
around, so the easiest fix to the error message problem was to remove
that feature.

Added a test as well.
2013-05-22 17:32:23 -05:00
AtKaaZ
533f4725db fix repo name should not contain path delims under windows so test won't
fail
all tests pass under windows
2013-05-16 05:32:38 +03:00
AtKaaZ
718cfc3f4c oops still forgot some parens on their own line 2013-05-15 06:34:40 +03:00
AtKaaZ
5b1b097c64 fix 2 test failures which only showed on windows 2013-05-15 06:16:47 +03:00
AtKaaZ
3521a21a9d moving 2 functions from utils to helper
merged all commits to date which required adding "dev-resources" so a
test wouldn't fail
`bin\lein test` tested under windows (currently 2 failures and 1 error)
2013-05-15 02:39:23 +03:00
AtKaaZ
6c34ce7e6f Merge branch 'master' into testsUnderWindows1 2013-05-15 01:53:44 +03:00
Phil Hagelberg
f40da67ece Make profile-scope-target-path work with anonymous profiles.
Also make it work in scenarios where the project map lacks :target-path.
2013-05-14 13:42:41 -07:00
AtKaaZ
a8e20e96ce fix some path errors in windows tests
lein test still has 2 failures and 1 error after this.
normalize-path should now handle absolute *nix paths correctly under
windows
addresses #1176
2013-05-13 08:15:55 +03:00
Colin Jones
b4660d52db Bump nrepl & clojure-complete dependencies 2013-05-12 15:19:07 -05:00
AtKaaZ
eb30389ff8 two strings were one for windows x86_64 test 2013-05-12 20:41:24 +03:00
Phil Hagelberg
9663106e84 Work around completely bonkers test failure.
Running deps on a project that includes ring causes an error
extracting the zip file for native deps, but only when you do it from
the first test in deps.clj and even then only when doing a full test
run.
2013-05-09 09:51:38 -07:00
Phil Hagelberg
01dd252b8a Fix a bunch of tests from reorg-repl. 2013-05-02 14:12:58 -07:00
Phil Hagelberg
02f1d5dc82 Merge branch 'reorg-repl'
Conflicts:
	leiningen-core/src/leiningen/core/main.clj
	leiningen-core/src/leiningen/core/project.clj
	src/leiningen/repl.clj
2013-05-02 13:13:55 -07:00
Colin Jones
4fe1b3df09 Update offline test metadata & run configuration 2013-04-27 12:15:24 -05:00