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

add channels group to rails profile #492

Conversation

BenMorganIO
Copy link
Contributor

This basically adds Channels as a group for test coverage. What I don't like about this is that it assumes (a) you're on Rails 5 and (b) that you're using ActionCable. I'm very open to modifying this PR to support Rails <5 and just do a detection for ActionCable.

@dtaniwaki
Copy link

👍

@@ -29,6 +29,7 @@
add_filter "/db/"

add_group "Controllers", "app/controllers"
add_group "Channels", "app/channels"
Copy link
Collaborator

Choose a reason for hiding this comment

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

could be something like add_group "Channels", "app/channels" if defined?(ActionCable) || defined?(Rails) && Rails::VERSION::MAJOR >= 5 but the below might be cleaner.

SimpleCov.profiles.define "rails5" do
  load_profile "rails"

  add_group "Channels", "app/channels"
end

@colszowka @xaviershay Any preference for adding the group here in all Rails version, with a condition, or making a new rails5 profile?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Maybe just check for ActionCable. I know that in Rails 5 APIs, ActionCable isn't exactly used much :p

Copy link

@Fudoshiki Fudoshiki Oct 3, 2016

Choose a reason for hiding this comment

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

Rails 5 can be used w/o AC

@PragTob
Copy link
Collaborator

PragTob commented Jan 26, 2017

Hi there,

thanks for the PR! I think as the others suggested just adding it when ActionCable is defined might be a good idea.

If you have time, please go ahead and do it, otherwise I can also take over :)

@PragTob
Copy link
Collaborator

PragTob commented Jan 29, 2017

Merged as 5571d0d :)

Thanks!

@PragTob PragTob closed this Jan 29, 2017
@BenMorganIO BenMorganIO deleted the add-channels-group-for-rails-5 branch January 30, 2017 15:40
@PragTob PragTob mentioned this pull request Mar 5, 2017
jsonn pushed a commit to jsonn/pkgsrc that referenced this pull request Mar 20, 2017
0.14.1 2017-03-18 ([changes](simplecov-ruby/simplecov@v0.14.0...v0.14.1))
========

## Bugfixes

* Files that were skipped as a whole/had no relevant coverage could lead to Float errors. See [#564](simplecov-ruby/simplecov#564) (thanks to @stevehanson for the report in [#563](simplecov-ruby/simplecov#563))

0.14.0 2017-03-15 ([changes](simplecov-ruby/simplecov@v0.13.0...v0.14.0))
==========

## Enhancements

* Officially support JRuby 9.1+ going forward (should also work with previous releases). See [#547](simplecov-ruby/simplecov#547) (ping @PragTob when encountering issues)
* Add Channel group to Rails profile, when `ActionCable` is loaded. See [#492](simplecov-ruby/simplecov#492) (thanks @BenMorganIO)
* Stop `extend`ing instances of `Array` and `Hash` during merging results avoiding problems frozen results while manually merging results. See [#558](simplecov-ruby/simplecov#558) (thanks @aroben)

## Bugfixes

* Fix parallel_tests when a thread ends up running no tests. See [#533](simplecov-ruby/simplecov#533) (thanks @cshaffer)
* Skip the `:nocov:` comments along with the code that they skip. See [#551](simplecov-ruby/simplecov#551) (thanks @ebiven)
* Fix crash when Home environment variable is unset. See [#482](simplecov-ruby/simplecov#482) (thanks @waldyr)
* Make track_files work again when explicitly setting it to nil. See [#463](simplecov-ruby/simplecov#463) (thanks @craiglittle)
* Do not overwrite .last_run.json file when refuse_coverage_drop option is enabled and the coverage has dropped (lead to you being able to just rerun tests and everything was _fine_). See [#553](simplecov-ruby/simplecov#553) (thanks @Miloshes)

0.13.0 2016-01-25 ([changes](simplecov-ruby/simplecov@v0.12.0...v0.13.0))
==========

## Enhancements

* Faster run times when a very large number of files is loaded into SimpleCov. See [#520](simplecov-ruby/simplecov#520) (thanks @alyssais)
* Only read in source code files that are actually used (faster when files are ignored etc.). See [#540](simplecov-ruby/simplecov#540) (tahks @yui-knk)

## Bugfixes

* Fix merging of resultsets if a file is missing on one side. See [#513](simplecov-ruby/simplecov#513) (thanks @hanazuki)
* Fix Ruby 2.4 deprecation warnings by using Integer instead of Fixnum. See [#523](simplecov-ruby/simplecov#523) (thanks @nobu)
* Force Ruby 2 to json 2. See [dc7417d50](simplecov-ruby/simplecov@dc7417d) (thanks @amatsuda)
* Various other gem dependency fixes for different gems on different ruby versions. (thanks @amatsuda)
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

5 participants