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

Build and Compile for Test Environment #556

Open
smolnar opened this issue Dec 14, 2017 · 0 comments
Open

Build and Compile for Test Environment #556

smolnar opened this issue Dec 14, 2017 · 0 comments

Comments

@smolnar
Copy link
Contributor

smolnar commented Dec 14, 2017

Which operating system and version is the project developed on?
macOS 10.12.6

Which version of ruby is the project developed on?
Ruby 2.4.2

Which version of npm is the project developed on?
4.2.0

Which version of ember-cli is the project developed on?
2.14.0

What is the rails version?
4.2.10

What is the ember-cli-rails version (from Gemfile)?
0.10.0

What is the ember-cli-rails-addon version (from package.json)?
0.10.0

Is your application server multi-threaded
(such as puma and unicorn) or is it multi-process (such as thin and webrick)?

Puma, multi-threaded

What are the contents of config/initializers/ember.rb?

EmberCli.configure do |c|
  c.app :frontend, yarn: true
end

What are the contents of the Rails' view that renders the Ember application?
Default

How are the EmberCLI-related routes defined?

mount_ember_app :frontend, to: '/'

How is the application deployed?
Capistrano + ember-cli-deploy

What is the issue?

We're running a Rails server for our Capybara specs to cut down on a time of a first build of our Ember app, so the server is still running in-between the specs as well and Capybara is not responsible for spawning it. As we're writing the specs, we're sometimes changing the code and as you can see in here

# ember-cli-rails/lib/ember_cli/app.rb

def build
  unless EmberCli.skip?
    if development?
      build_and_watch
    elsif test?
      compile
    end

    @build.wait!
  end
end

the test environment only supports compilation, so our changes after starting the server are not propagated and therefore we are forced to restart the server. Is it possible to provide an option for this, e.g.

```ruby
EmberCli.configure do |c|
  c.app :frontend, yarn: true, build_and_watch: 'always' # other options: ['development', 'test'] or 'test' 
end

so the build_and_watch works for other environments as well? We're happy to provide a PR of this as well, just want to hear your opinion.

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

No branches or pull requests

1 participant