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

Handle asset gems in a sane manner #2028

Closed
wants to merge 3 commits into from
Closed

Handle asset gems in a sane manner #2028

wants to merge 3 commits into from

Conversation

seanlinsley
Copy link
Contributor

This allows us to conditionally require asset-related gems instead of hardcoding them into the gemspec.

Related issues: #437, #1259, #1686

@seanlinsley
Copy link
Contributor Author

Not sure where Rails 3.0 was getting its dose of CoffeeScript before this PR...

@seanlinsley
Copy link
Contributor Author

I'm going to set this for the 0.6.0 release. Really don't feel like figuring out a hack for Rails 3.0.

@seanlinsley seanlinsley closed this Apr 1, 2013
@seanlinsley seanlinsley reopened this Apr 1, 2013
@jherdman
Copy link
Contributor

What's the status of this issue given that the 0.6.0 release is out?

@seanlinsley
Copy link
Contributor Author

Given that 0.6.0 became what 0.5.2 would have been, had the release not been so far delayed, this PR has been pushed into 0.7.0.

If someone can figure out a way to get this working with Rails 3.0, we can include it in 0.6.1 instead.

@jherdman
Copy link
Contributor

What's the problem with this issue and Rails 3.0?

@seanlinsley
Copy link
Contributor Author

Look at the Travis test build.

@seanlinsley
Copy link
Contributor Author

(I don't really know what the problem is)

@jherdman
Copy link
Contributor

coffee-rails isn't available for Rails < 3.1.0. There seems to be two obvious solutions:

  1. Don't support Rails 3.0.0. This is probably the easiest solution.
  2. Don't use CoffeeScript. This is probably unlikely as the owners of this project seem to be bent on using it, and it would require a rewrite of the existing JavaScript.

@seanlinsley
Copy link
Contributor Author

But there must be some other version of CoffeeScript available. I mean, our test suite never failed before this.

@jherdman
Copy link
Contributor

It could be that a dependency was yanked from RubyGems, I'd have to investigate to find out for certain. It seems that the coffeescript-rails repo has only ever supported Rails 3.1.0 and greater. Quickly Googling about, Barista seems to be the way to get Rails of many versions using CoffeeScript.

@seanlinsley
Copy link
Contributor Author

It's somehow already included, hence why everything on master works with Rails 3.0. But I don't know what is adding it in, so I don't know how to ensure that it's loaded.

Instead of having hard requirements for asset-related gems in our
gemspec, this approach allows us to require them as needed.

+ use Bundler to confirm that asset gems are installed
+ remove asset compilation code that's no longer needed
+ changed the JS template file to use CoffeeScript
+ added a few tests to ensure core AA files are created by the generator
@seanlinsley
Copy link
Contributor Author

This implementation is out of date. I wrote a better one that currently resides on the rails4 branch.

@seanlinsley seanlinsley closed this Jul 4, 2013
@seanlinsley seanlinsley deleted the bugfix/sane-asset-gem-handler branch July 4, 2013 20:39
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.

2 participants