• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

shakacode / react_on_rails / 999
91%
master: 0%

Build:
Build:
LAST BUILD BRANCH: andrey/add-option-method
DEFAULT BRANCH: master
Ran 14 Jan 2016 04:49AM UTC
Jobs 1
Files 14
Run time 0s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
999

push

travis-ci

justin808
ReactOnRails v2.0

- Move JavaScript part of react_on_rails to npm package
  'react-on-rails'.
- Converted JavaScript code to ES6! with tests!
- No global namespace pollution. ReactOnRails is the only global added.
- New API. Instead of placing React components on the global namespace,
  you instead call ReactOnRails.register, passing an object where keys
  are the names of your components.
  ```
  import ReactOnRails from 'react-on-rails';
  ReactOnRails.registerComponent({name: component});
  ```
  Best done with Object destructing
  ```
  import ReactOnRails from 'react-on-rails';
  ReactOnRails.registerComponent(
    {
      Component1,
      Component2
    }
  );
  ```
  Previously, you used
  ```
  window.Component1 = Component1;
  window.Component2 = Component2;
  ```
  This would pollute the global namespace. See details in the README.md
  for more information.
- Your jade template for the WebpackDevServer setup should use the new
  API:
  `ReactOnRails.render(componentName, props, domNodeId);`
  such as:
  `ReactOnRails.render("HelloWorldApp", {name: "Stranger"}, 'app');`
- All npm dependency libraries updated. Most notable is going to Babel
  6.
- Dropped support for react 0.13.
- JS Linter uses ShakaCode JavaScript style:
  https://github.com/shakacode/style-guide-javascript
- Generators account these differences.

Other fixes and changes
* Auto detection of generator function!
* Previously, we could not have react installed as a devDependency at the
  top level with react-on-rails, or else we get an obscure 'react is
  included multiple times' error.

  Fix is to add this to the webpack configs:

    resolve: {
      root: [path.join(__dirname, 'app')],
      extensions: ['', '.js', '.jsx'],
      fallback: [path.join(__dirname, 'node_modules')],
      alias: {
        react: path.resolve('./node_modules/react'),
        "react-dom": path.resolve('./node_modules/react-dom'),
      },
    },

  That ensures that react is only loaded from one place.

  Also cleaned up linting and test scripts so that it's easier to run all
  the tests.
* Finish up the changes to the generators
* Doc updates
* Changed domId to domNodeId (thanks Rob and Alex)
* Fixed generators to use new API of "registration" from "globals"
* Fixed tests for generators
* Updated doc to indicate directories to ignore
* Change example apps to use Poltergeist for integration tests
* Move coveralls push to Rakefile so we don't fail after running tests locally and short circuit the linters
* Update technique for generatorFunction
  See discussion on
  https://discuss.reactjs.org/t/how-to-determine-if-js-object-is-react-component/2825/2
* Change styling of gen app
* fix issue with ruby-lint.yml
* Fixed display of warning messages and stop app
* add option to override stopping when you get warnings
* Made the dumb component dumber, better formatting
* Allows removal of bootstrap and better styling
* Add resolveLoader to generated example apps' webpack.client.base.config.js
* Shakacode linter style, switch to non-docker lint
* Using eslint-config-shakacode
* Created tutorial
* Create rails3.md
* Add migration steps to changelog.MD
* VersionChecker only warns if major versions are different

304 of 335 relevant lines covered (90.75%)

12.65 hits per line

Jobs
ID Job ID Ran Files Coverage
1 999.1 (2.2.3, export RAILS_ENV=test DRIVER=selenium_chrome, spec/dummy/Gemfile) 14 Jan 2016 04:49AM UTC 0
90.75
Travis Job 999.1
Source Files on build 999
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #999
  • f7ef290b on github
  • Prev Build on npm-react-on-rails-js (#998)
  • Next Build on npm-react-on-rails-js (#1001)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc