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

do not load test-case in development #28

Merged
merged 2 commits into from
Jan 8, 2014

Conversation

grosser
Copy link
Contributor

@grosser grosser commented Dec 27, 2013

@grosser
Copy link
Contributor Author

grosser commented Dec 27, 2013

can you also pick this to the rails 3 branch ?

@grosser
Copy link
Contributor Author

grosser commented Jan 2, 2014

bump

ActionView::TestCase.class_eval do
include ActionView::Helpers::PrototypeHelper
include ActionView::Helpers::ScriptaculousHelper
if Rails.env.test?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This entire code should be inside the Railtie

@grosser
Copy link
Contributor Author

grosser commented Jan 2, 2014

better ?

include ActionView::Helpers::ScriptaculousHelper
end

if Rails.env.test? # do not trigger test-case autoload in development/production
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry. I was talking about only the Rails.env check and the conditional inclusion of modules at TestCase. The rest of the code is fine to be in that file

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, more like this ?

On Thu, Jan 2, 2014 at 5:33 PM, Rafael Mendonça França <
[email protected]> wrote:

In lib/prototype-rails.rb:

  •    require 'action_view/helpers/scriptaculous_helper'
    
  •    require 'action_view/template/handlers/rjs'
    
  •    require 'prototype-rails/javascript_helper'
    
  •    require 'prototype-rails/rendering'
    
  •    ActionView::Base.class_eval do
    
  •      cattr_accessor :debug_rjs
    
  •      self.debug_rjs = false
    
  •    end
    
  •    ActionView::Base.class_eval do
    
  •      include ActionView::Helpers::PrototypeHelper
    
  •      include ActionView::Helpers::ScriptaculousHelper
    
  •    end
    
  •    if Rails.env.test? # do not trigger test-case autoload in development/production
    

Sorry. I was talking about only the Rails.env check and the conditional
inclusion of modules at TestCase. The rest of the code is fine to be in
that file


Reply to this email directly or view it on GitHubhttps://github.com//pull/28/files#r8628297
.

@rafaelfranca
Copy link
Member

👍

@grosser
Copy link
Contributor Author

grosser commented Jan 3, 2014

Can you also merge and release this?

@rafaelfranca
Copy link
Member

Sure! It is in my TODO list. Will be the first thing I'll do tomorrow

@grosser
Copy link
Contributor Author

grosser commented Jan 6, 2014

Hmm tomorrow is gone :)

@rafaelfranca
Copy link
Member

yes, yes. Sorry I have a lot of work to do.

But you can always install a gem pointing to your fork using bundler if you have hurry 😉

@grosser
Copy link
Contributor Author

grosser commented Jan 6, 2014

pff you only maintain like 2 or 300 projects, how hard can that be ;)
I already did the git dependency, but would love to make it a real gem :>

On Mon, Jan 6, 2014 at 9:23 AM, Rafael Mendonça França <
[email protected]> wrote:

yes, yes. Sorry I have a lot of work to do.

But you can always install a gem pointing to your fork using bundler if
you have hurry [image: 😉]


Reply to this email directly or view it on GitHubhttps://github.com//pull/28#issuecomment-31667105
.

rafaelfranca added a commit that referenced this pull request Jan 8, 2014
do not load test-case in development
@rafaelfranca rafaelfranca merged commit 3f512ec into rails:master Jan 8, 2014
@rafaelfranca
Copy link
Member

Now I can work on this. Thanks ❤️

@grosser
Copy link
Contributor Author

grosser commented Jan 13, 2014

bump :)
(please also release for the rails 3 branch/tag, I can make a PR if that helps, just picking the commit on the latest rails 3 tag)

@rafaelfranca
Copy link
Member

Really sorry but before releasing the gem I want to do some work. Like I said we don't need to hurry to release the gem since you can always use bundler.

@grosser
Copy link
Contributor Author

grosser commented Jan 13, 2014

Sure, take your time :)

On Mon, Jan 13, 2014 at 9:19 AM, Rafael Mendonça França <
[email protected]> wrote:

Really sorry but before releasing the gem I want to do some work. Like I
said we don't need to hurry to release the gem since you can always use
bundler.


Reply to this email directly or view it on GitHubhttps://github.com//pull/28#issuecomment-32190147
.

@rafaelfranca
Copy link
Member

I want to review all the open PR and issues and see if I can merge/fix something else before releasing, so the release will help more people

@grosser
Copy link
Contributor Author

grosser commented Jan 21, 2014

no more PR's left except some 6month + olds, ready to release ?

rafaelfranca pushed a commit that referenced this pull request Feb 6, 2014
This reverts commit 3f512ec, reversing
changes made to 2841450.

Reason: I'll use the solution in
#23 that doesn't check the
Rails environment
@guigs
Copy link

guigs commented Dec 8, 2014

This would solve #32 on Rails 4.2.

guigs added a commit to guigs/prototype-rails that referenced this pull request Dec 8, 2014
grosser added a commit to grosser/prototype-rails that referenced this pull request Dec 13, 2014
grosser added a commit to grosser/prototype-rails that referenced this pull request Dec 13, 2014
grosser added a commit to grosser/prototype-rails that referenced this pull request Jan 21, 2015
pixeltrix pushed a commit that referenced this pull request Dec 2, 2016
saturnflyer pushed a commit to zendesk/prototype-rails that referenced this pull request Sep 27, 2019
This reverts commit 3f512ec, reversing
changes made to 2841450.

Reason: I'll use the solution in
rails#23 that doesn't check the
Rails environment
saturnflyer pushed a commit to zendesk/prototype-rails that referenced this pull request Sep 27, 2019
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.

3 participants