Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test/Dev Environment Changes #243

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

alunny
Copy link

@alunny alunny commented Jan 24, 2013

A few changes intended to make Jammit easier to hack on, and easier to run in Ruby 1.9. Details are summarized in the commit messages, but the main things are making the tests 1.9 compatible and making dependencies explicit (and/or updated).

* move `test/unit/command_line_test` to
 `test/integration/test_command_line`
* require `test_helper` in all test files and require `test/unit` in
 test_helper
 this allows any test file to be run individually as:
 `ruby test/unit/test_uglifier.rb`
* modify `test/unit/jammit_helpers` to force rails 2.3 compatibility
 with ruby 1.9.3
* modify `test/integration/test_command_line` to resolve asset paths
 correctly, and to make debugging a bit easier (still has a couple
 failing tests)
* modify `test/configuration` to work with ruby 1.9's unicode-by-default
 strings
* explicitly ignore Gemfile.lock
* update sass to work with 6f0c096
* change redgreen require (from b6dd1b1) to always require - it should
 be present after `bundle install`, and the `Gem` method isn't supported
 in all environments
* add yard as a development dependency
* require rubygems explicitly, to avoid weirdness in some environments
* only declare Jammit::VERSION in one place
* remove `sudo` from rake tasks - it doesn't play well with tools like
 rvm, and it's easy to run the whole command as sudo
* isolate Jammit::VERSION into single file (easy to require)
* remove redgreen from Rakefile (contentious?)
* remove -rrubygems from bin/jammit - use inline require
* use `bundle exec` path in tests
1) mtime was not being modified when `--force` was set on command line
This has now been fixed - the force option now overrides Jammit's mtime
niceties

2) newlines for JSTs were improperly described in the tests - the JS
file, including templates and the JST definition, have all literal
newlines stripped, but newlines inside of strings (in the templates
themselves) are not stripped. Since calling jammit on the CLI treats the
whole output as a JS file, the fixture for the `pack_templates` unit
test was not appropriate for the CLI test
@alunny
Copy link
Author

alunny commented Jan 28, 2013

Added a couple new commits for travis CI integration (would need to be set up for documentcloud/jammit, which I don't have admin over). Changes are:

  • ensure it runs on Travis (basically using bundle exec everywhere) - 2930f18
  • ensure all the tests pass - c73f240

@andrewhao
Copy link

I'm liking the Travis integration here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants