{"action":"created","issue":{"url":"https://api.github.com/repos/rails/rails/issues/22669","labels_url":"https://api.github.com/repos/rails/rails/issues/22669/labels{/name}","comments_url":"https://api.github.com/repos/rails/rails/issues/22669/comments","events_url":"https://api.github.com/repos/rails/rails/issues/22669/events","html_url":"https://github.com/rails/rails/issues/22669","id":123006740,"number":22669,"title":"Action Cable channel generator should not create JS assets in --api mode","user":{"login":"dhh","id":2741,"avatar_url":"https://avatars.githubusercontent.com/u/2741?v=3","gravatar_id":"","url":"https://api.github.com/users/dhh","html_url":"https://github.com/dhh","followers_url":"https://api.github.com/users/dhh/followers","following_url":"https://api.github.com/users/dhh/following{/other_user}","gists_url":"https://api.github.com/users/dhh/gists{/gist_id}","starred_url":"https://api.github.com/users/dhh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dhh/subscriptions","organizations_url":"https://api.github.com/users/dhh/orgs","repos_url":"https://api.github.com/users/dhh/repos","events_url":"https://api.github.com/users/dhh/events{/privacy}","received_events_url":"https://api.github.com/users/dhh/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/rails/rails/labels/actioncable","name":"actioncable","color":"bfdadc"}],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/rails/rails/milestones/34","html_url":"https://github.com/rails/rails/milestones/5.0.0%20[temp]","labels_url":"https://api.github.com/repos/rails/rails/milestones/34/labels","id":665192,"number":34,"title":"5.0.0 [temp]","description":"","creator":{"login":"rafaelfranca","id":47848,"avatar_url":"https://avatars.githubusercontent.com/u/47848?v=3","gravatar_id":"","url":"https://api.github.com/users/rafaelfranca","html_url":"https://github.com/rafaelfranca","followers_url":"https://api.github.com/users/rafaelfranca/followers","following_url":"https://api.github.com/users/rafaelfranca/following{/other_user}","gists_url":"https://api.github.com/users/rafaelfranca/gists{/gist_id}","starred_url":"https://api.github.com/users/rafaelfranca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rafaelfranca/subscriptions","organizations_url":"https://api.github.com/users/rafaelfranca/orgs","repos_url":"https://api.github.com/users/rafaelfranca/repos","events_url":"https://api.github.com/users/rafaelfranca/events{/privacy}","received_events_url":"https://api.github.com/users/rafaelfranca/received_events","type":"User","site_admin":false},"open_issues":72,"closed_issues":197,"state":"open","created_at":"2014-05-21T00:58:22Z","updated_at":"2015-12-21T20:06:17Z","due_on":null,"closed_at":null},"comments":4,"created_at":"2015-12-18T18:57:26Z","updated_at":"2015-12-21T20:19:09Z","closed_at":"2015-12-21T20:06:17Z","body":"If you've created your app as --api, the Action Cable channel generator should not create the corresponding channel JS stub."},"comment":{"url":"https://api.github.com/repos/rails/rails/issues/comments/166407348","html_url":"https://github.com/rails/rails/issues/22669#issuecomment-166407348","issue_url":"https://api.github.com/repos/rails/rails/issues/22669","id":166407348,"user":{"login":"habermann24","id":7480,"avatar_url":"https://avatars.githubusercontent.com/u/7480?v=3","gravatar_id":"","url":"https://api.github.com/users/habermann24","html_url":"https://github.com/habermann24","followers_url":"https://api.github.com/users/habermann24/followers","following_url":"https://api.github.com/users/habermann24/following{/other_user}","gists_url":"https://api.github.com/users/habermann24/gists{/gist_id}","starred_url":"https://api.github.com/users/habermann24/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/habermann24/subscriptions","organizations_url":"https://api.github.com/users/habermann24/orgs","repos_url":"https://api.github.com/users/habermann24/repos","events_url":"https://api.github.com/users/habermann24/events{/privacy}","received_events_url":"https://api.github.com/users/habermann24/received_events","type":"User","site_admin":false},"created_at":"2015-12-21T20:19:09Z","updated_at":"2015-12-21T20:19:09Z","body":"Hey @rafaelfranca, I'm afraid the merge request you picked fails sometimes.\r\n\r\n```\r\nruby -I test test/generators/channel_generator_test.rb\r\nRun options: --seed 18568\r\n\r\n# Running:\r\n\r\n.F\r\n\r\nFinished in 0.006424s, 311.3325 runs/s, 1245.3300 assertions/s.\r\n\r\n  1) Failure:\r\nChannelGeneratorTest#test_channel_is_created [test/generators/channel_generator_test.rb:15]:\r\nExpected file \"app/assets/javascripts/channels/chat.coffee\" to exist, but does not\r\n\r\n2 runs, 8 assertions, 1 failures, 0 errors, 0 skips\r\n```\r\n\r\nMy guess is that some other test might set the options[:assets], so that the test order is important.\r\n\r\n\r\nI created another pull-request to fix this: https://github.com/rails/rails/pull/22737"}}