From 8bcaa3487e4a44b64bfc0291109919258515acaf Mon Sep 17 00:00:00 2001 From: Justin Gordon Date: Sat, 24 Dec 2016 22:29:26 -1000 Subject: [PATCH] Update all gems with bundle update (#657) * Update all gems with bundle update * update node dependencies to run on sierra 10.12.2 * remove jscs * Fix JS linting, using ShakaCode 13.2.1 * Updated rubocop linting * Fix flow errors --- docs/contributor-info/linters.md | 13 +- docs/misc/doctrine.md | 2 +- lib/react_on_rails/assets_precompile.rb | 3 +- lib/react_on_rails/configuration.rb | 55 +- .../test_helper/node_process_launcher.rb | 12 +- node_package/src/Authenticity.js | 7 +- node_package/tests/ComponentRegistry.test.js | 1 + node_package/tests/buildConsoleReplay.test.js | 3 - package.json | 36 +- rakelib/docker.rake | 4 - spec/dummy/Gemfile | 2 + spec/dummy/Gemfile.lock | 159 +-- spec/dummy/Procfile | 2 +- spec/dummy/client/.eslintrc | 1 + .../client/app/components/DeferredRender.jsx | 19 +- .../components/DeferredRenderAsyncPage.jsx | 2 +- .../client/app/components/HelloWorld.jsx | 10 +- .../client/app/components/HelloWorldES5.jsx | 8 +- .../client/app/components/HelloWorldRedux.jsx | 8 +- .../client/app/components/RailsContext.jsx | 2 +- .../client/app/startup/ClientReduxApp.jsx | 2 +- .../app/startup/ClientReduxSharedStoreApp.jsx | 2 +- .../client/app/startup/ClientRouterApp.jsx | 4 +- .../app/startup/DeferredRenderAppRenderer.jsx | 6 +- .../app/startup/DeferredRenderAppServer.jsx | 2 +- .../app/startup/ManualRenderAppRenderer.jsx | 2 +- .../app/startup/ServerReduxSharedStoreApp.jsx | 2 +- .../client/app/startup/ServerRouterApp.jsx | 2 +- .../client/app/stores/SharedReduxStore.jsx | 4 +- spec/dummy/client/package.json | 55 +- spec/dummy/client/server-rails-hot.js | 1 + spec/dummy/client/tests | 1 - .../webpack.client.rails.build.config.js | 2 + .../client/webpack.client.rails.hot.config.js | 1 + .../webpack.server.rails.build.config.js | 1 + spec/dummy/config/puma.rb | 47 + spec/dummy/npm-shrinkwrap.json | 942 ------------------ spec/dummy/package.json | 6 +- spec/dummy/spec/features/integration_spec.rb | 6 +- .../support/generator_spec_helper.rb | 11 +- 40 files changed, 289 insertions(+), 1159 deletions(-) delete mode 120000 spec/dummy/client/tests create mode 100644 spec/dummy/config/puma.rb delete mode 100644 spec/dummy/npm-shrinkwrap.json diff --git a/docs/contributor-info/linters.md b/docs/contributor-info/linters.md index 1d1cd33e5..d3ab130c1 100644 --- a/docs/contributor-info/linters.md +++ b/docs/contributor-info/linters.md @@ -3,7 +3,7 @@ These linters support the [ShakaCode Style Guidelines](./style.md) ## Autofix! -If you haven't tried the autofix options for `jscs` and `rubocop`, you're seriously missing out! +If you haven't tried the autofix options for `eslint` and `rubocop`, you're seriously missing out! 1. Be **SURE** you have a clean git status, as you'll want to review what the autofix does to your code! 2. **Rubocop:** Be sure to be in the right directory where you have Ruby files, probably the top level of your Rails project. @@ -11,9 +11,15 @@ If you haven't tried the autofix options for `jscs` and `rubocop`, you're seriou rubocop -a ``` -3. **JSCS:**: Be sure to be in the right directory where you have JS files. +3. **eslint:**: Be sure to be in the right directory where you have JS files. ``` - jscs -x . + eslint --fix . + ``` + + or + + ``` + npm run lint -- --fix ``` Autofixing is a **HUGE** time saver! @@ -60,5 +66,4 @@ You can disable all rules for a line or block, or only specific rules, as shown * [ESLint quick start](http://untilfalse.com/eslint-quick-start/) * [RuboCop](https://github.com/bbatsov/rubocop) * [ESLint](http://eslint.org/) -* [JSCS](https://github.com/jscs-dev/node-jscs) diff --git a/docs/misc/doctrine.md b/docs/misc/doctrine.md index fc359f055..56dc52747 100644 --- a/docs/misc/doctrine.md +++ b/docs/misc/doctrine.md @@ -44,7 +44,7 @@ Here's the chef's selection from the React on Rails community: ### JavaScript Tooling * [Babel](https://babeljs.io/): Transpiler for ES6 into ES5 and much more. -* [EsLint](http://eslint.org/) and [Jsrc](http://jscs.info/): JavaScript linters. +* [EsLint](http://eslint.org/) * [Webpack](http://webpack.github.io/): Generator of deployment assets and provider of hot module reloading. By having a common set of tools, we can discuss what we should or shouldn't be using. Thus, this takes out the "JavaScript Fatigue" from having too many unclear choices in the JavaScript world. diff --git a/lib/react_on_rails/assets_precompile.rb b/lib/react_on_rails/assets_precompile.rb index a98d1000d..ec993ee55 100644 --- a/lib/react_on_rails/assets_precompile.rb +++ b/lib/react_on_rails/assets_precompile.rb @@ -69,7 +69,8 @@ def symlink_non_digested_assets manifest_path = manifest_glob.first manifest_file = File.new(manifest_path) manifest_data = if File.extname(manifest_file) == ".json" - JSON.load(manifest_file)["assets"] + manifest_file_data = File.read(manifest_path) + JSON.parse(manifest_file_data)["assets"] else YAML.load(manifest_file) end diff --git a/lib/react_on_rails/configuration.rb b/lib/react_on_rails/configuration.rb index 6c60b3eb5..a967038ee 100644 --- a/lib/react_on_rails/configuration.rb +++ b/lib/react_on_rails/configuration.rb @@ -7,35 +7,48 @@ def self.configure DEFAULT_GENERATED_ASSETS_DIR = File.join(%w(app assets webpack)).freeze def self.setup_config_values - if @configuration.webpack_generated_files.empty? - files = ["webpack-bundle.js"] - if @configuration.server_bundle_js_file.present? - files << @configuration.server_bundle_js_file - end - @configuration.webpack_generated_files = files - end + ensure_webpack_generated_files_exists + configure_generated_assets_dirs_deprecation + ensure_generated_assets_dir_present + ensure_server_bundle_js_file_has_no_path + end - if @configuration.generated_assets_dirs.present? - puts "[DEPRECATION] ReactOnRails: Use config.generated_assets_dir rather than "\ + def self.ensure_generated_assets_dir_present + return unless @configuration.generated_assets_dir.blank? + + @configuration.generated_assets_dir = DEFAULT_GENERATED_ASSETS_DIR + puts "ReactOnRails: Set generated_assets_dir to default: #{DEFAULT_GENERATED_ASSETS_DIR}" + end + + def self.configure_generated_assets_dirs_deprecation + return unless @configuration.generated_assets_dirs.present? + + puts "[DEPRECATION] ReactOnRails: Use config.generated_assets_dir rather than "\ "generated_assets_dirs" - if @configuration.generated_assets_dir.blank? - @configuration.generated_assets_dir = @configuration.generated_assets_dirs - else - puts "[DEPRECATION] ReactOnRails. You have both generated_assets_dirs and "\ + if @configuration.generated_assets_dir.blank? + @configuration.generated_assets_dir = @configuration.generated_assets_dirs + else + puts "[DEPRECATION] ReactOnRails. You have both generated_assets_dirs and "\ "generated_assets_dir defined. Define ONLY generated_assets_dir" - end end + end - if @configuration.generated_assets_dir.blank? - @configuration.generated_assets_dir = DEFAULT_GENERATED_ASSETS_DIR - puts "ReactOnRails: Set generated_assets_dir to default: #{DEFAULT_GENERATED_ASSETS_DIR}" + def self.ensure_webpack_generated_files_exists + return unless @configuration.webpack_generated_files.empty? + + files = ["webpack-bundle.js"] + if @configuration.server_bundle_js_file.present? + files << @configuration.server_bundle_js_file end + @configuration.webpack_generated_files = files + end + + def self.ensure_server_bundle_js_file_has_no_path + return unless @configuration.server_bundle_js_file.include?(File::SEPARATOR) - if @configuration.server_bundle_js_file.include?(File::SEPARATOR) - puts "[DEPRECATION] ReactOnRails: remove path from server_bundle_js_file in configuration. "\ + puts "[DEPRECATION] ReactOnRails: remove path from server_bundle_js_file in configuration. "\ "All generated files must go in #{@configuration.generated_assets_dir}" - @configuration.server_bundle_js_file = File.basename(@configuration.server_bundle_js_file) - end + @configuration.server_bundle_js_file = File.basename(@configuration.server_bundle_js_file) end def self.configuration diff --git a/lib/react_on_rails/test_helper/node_process_launcher.rb b/lib/react_on_rails/test_helper/node_process_launcher.rb index 96a33f4e3..d1c2c91be 100644 --- a/lib/react_on_rails/test_helper/node_process_launcher.rb +++ b/lib/react_on_rails/test_helper/node_process_launcher.rb @@ -1,12 +1,12 @@ module ReactOnRails module TestHelper def self.launch_node - if ReactOnRails.configuration.server_render_method == "NodeJS" - path = "#{::Rails.root}/client/node" - puts "Launching NodeJS server at #{path}" - system("cd #{path} && npm start &") - sleep(1) - end + return unless ReactOnRails.configuration.server_render_method == "NodeJS" + + path = "#{::Rails.root}/client/node" + puts "Launching NodeJS server at #{path}" + system("cd #{path} && npm start &") + sleep(1) end end end diff --git a/node_package/src/Authenticity.js b/node_package/src/Authenticity.js index 6106c863b..6d26960b0 100644 --- a/node_package/src/Authenticity.js +++ b/node_package/src/Authenticity.js @@ -3,8 +3,11 @@ export default { authenticityToken() { - const token: {content?: string} = document.querySelector('meta[name="csrf-token"]'); - return token ? token.content : null; + const token: ?HTMLElement = document.querySelector('meta[name="csrf-token"]'); + if (token && (token instanceof window.HTMLMetaElement)) { + return token.content; + } + return null; }, authenticityHeaders(otherHeaders: {[id:string]: string} = {}) { diff --git a/node_package/tests/ComponentRegistry.test.js b/node_package/tests/ComponentRegistry.test.js index d904a5e9d..869a70325 100644 --- a/node_package/tests/ComponentRegistry.test.js +++ b/node_package/tests/ComponentRegistry.test.js @@ -3,6 +3,7 @@ /* eslint-disable react/prefer-stateless-function */ /* eslint-disable react/jsx-filename-extension */ /* eslint-disable no-unused-vars */ +/* eslint-disable import/extensions */ import test from 'tape'; import React from 'react'; diff --git a/node_package/tests/buildConsoleReplay.test.js b/node_package/tests/buildConsoleReplay.test.js index f58daf7e4..374ff6f8b 100644 --- a/node_package/tests/buildConsoleReplay.test.js +++ b/node_package/tests/buildConsoleReplay.test.js @@ -84,14 +84,11 @@ test('buildConsoleReplay wraps console replay in a script tag', (assert) => { ]; const actual = buildConsoleReplay(); - // https://github.com/jscs-dev/node-jscs/issues/2137 - // jscs:disable disallowSpacesInsideTemplateStringPlaceholders const expected = ` `; - // jscs:enable disallowSpacesInsideTemplateStringPlaceholders assert.equals(actual, expected, 'Unexpected value for console replay history'); }); diff --git a/package.json b/package.json index 9dbfb7c62..88af3d81f 100644 --- a/package.json +++ b/package.json @@ -7,35 +7,35 @@ "doc": "docs" }, "devDependencies": { - "babel-cli": "^6.16.0", - "babel-core": "^6.17.0", - "babel-loader": "^6.2.5", + "babel-cli": "^6.18.0", + "babel-core": "^6.21.0", + "babel-loader": "^6.2.10", "babel-plugin-react-transform": "^2.0.2", - "babel-plugin-transform-flow-strip-types": "^6.14.0", + "babel-plugin-transform-flow-strip-types": "^6.21.0", "babel-plugin-transform-runtime": "^6.15.0", - "babel-preset-es2015": "^6.16.0", + "babel-preset-es2015": "^6.18.0", "babel-preset-react": "^6.16.0", "babel-preset-stage-0": "^6.16.0", - "babel-runtime": "^6.11.6", + "babel-runtime": "^6.20.0", "babel-tape-runner": "^2.0.1", - "babel-types": "^6.16.0", + "babel-types": "^6.21.0", "babelify": "^7.3.0", "blue-tape": "^1.0.0", - "eslint": "^3.8.1", - "eslint-config-shakacode": "^13.2.0-beta.1", - "eslint-plugin-import": "^2.0.1", + "eslint": "^3.12.2", + "eslint-config-shakacode": "^13.2.1", + "eslint-plugin-import": "^2.2.0", "eslint-plugin-jsx-a11y": "^2.2.3", - "eslint-plugin-react": "^6.4.1", - "flow-bin": "^0.36.0", - "jsdom": "^9.8.0", - "react": "^15.3.2", - "react-dom": "^15.3.2", + "eslint-plugin-react": "^6.8.0", + "flow-bin": "^0.37.4", + "jsdom": "^9.9.1", + "react": "^15.4.1", + "react-dom": "^15.4.1", "react-transform-hmr": "^1.0.4", "redux": "^3.6.0", - "release-it": "^2.4.3", + "release-it": "^2.5.2", "tap-spec": "^4.1.1", - "tape": "^4.6.2", - "webpack": "^1.13.2" + "tape": "^4.6.3", + "webpack": "^1.14.0" }, "peerDependencies": { "react": ">= 0.14", diff --git a/rakelib/docker.rake b/rakelib/docker.rake index a370158ca..1ddedc185 100644 --- a/rakelib/docker.rake +++ b/rakelib/docker.rake @@ -19,10 +19,6 @@ namespace :docker do sh "docker-compose run lint rake lint:eslint" end - desc "Run jscs linter from docker" - task :jscs do - sh "docker-compose run lint rake lint:jscs" - end desc "Run all linting from docker" task :lint do sh "docker-compose run lint rake lint" diff --git a/spec/dummy/Gemfile b/spec/dummy/Gemfile index ca6ab9053..7081328cd 100644 --- a/spec/dummy/Gemfile +++ b/spec/dummy/Gemfile @@ -18,6 +18,8 @@ gem 'coffee-rails', '~> 4.1.0' # Use jquery as the JavaScript library gem 'jquery-rails' +gem 'puma' + # Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks if ENV["DISABLE_TURBOLINKS"].nil? || ENV["DISABLE_TURBOLINKS"].strip.empty? if ENV["ENABLE_TURBOLINKS_5"].nil? || ENV["ENABLE_TURBOLINKS_5"].strip.empty? diff --git a/spec/dummy/Gemfile.lock b/spec/dummy/Gemfile.lock index bcf9db5a9..b77236312 100644 --- a/spec/dummy/Gemfile.lock +++ b/spec/dummy/Gemfile.lock @@ -47,16 +47,17 @@ GEM minitest (~> 5.1) thread_safe (~> 0.3, >= 0.3.4) tzinfo (~> 1.1) - addressable (2.4.0) + addressable (2.5.0) + public_suffix (~> 2.0, >= 2.0.2) archive-zip (0.7.0) io-like (~> 0.3.0) arel (6.0.3) - ast (2.2.0) - awesome_print (1.6.1) + ast (2.3.0) + awesome_print (1.7.0) binding_of_caller (0.7.2) debug_inspector (>= 0.0.1) builder (3.2.2) - byebug (8.2.5) + byebug (9.0.6) capybara (2.7.1) addressable mime-types (>= 1.16) @@ -64,7 +65,7 @@ GEM rack (>= 1.0.0) rack-test (>= 0.5.4) xpath (~> 2.0) - capybara-screenshot (1.0.12) + capybara-screenshot (1.0.14) capybara (>= 1.0, < 3) launchy capybara-webkit (1.11.1) @@ -83,86 +84,85 @@ GEM coffee-script (2.4.1) coffee-script-source execjs - coffee-script-source (1.10.0) - concurrent-ruby (1.0.2) + coffee-script-source (1.12.2) + concurrent-ruby (1.0.3) connection_pool (2.2.1) - coveralls (0.8.13) - json (~> 1.8) - simplecov (~> 0.11.0) + coveralls (0.8.17) + json (>= 1.8, < 3) + simplecov (~> 0.12.0) term-ansicolor (~> 1.3) thor (~> 0.19.1) - tins (~> 1.6.0) + tins (~> 1.6) debug_inspector (0.0.2) diff-lcs (1.2.5) docile (1.1.5) erubis (2.7.0) execjs (2.7.0) - ffi (1.9.10) + ffi (1.9.14) foreman (0.82.0) thor (~> 0.19.1) generator_spec (0.9.3) activesupport (>= 3.0.0) railties (>= 3.0.0) - globalid (0.3.6) + globalid (0.3.7) activesupport (>= 4.1.0) i18n (0.7.0) interception (0.5) io-like (0.3.0) - jbuilder (2.4.1) + jbuilder (2.6.1) activesupport (>= 3.0.0, < 5.1) multi_json (~> 1.2) - jquery-rails (4.1.1) + jquery-rails (4.2.1) rails-dom-testing (>= 1, < 3) railties (>= 4.2.0) thor (>= 0.14, < 2.0) json (1.8.3) launchy (2.4.3) addressable (~> 2.3) - libv8 (5.0.71.48.3) + libv8 (5.3.332.38.3) loofah (2.0.3) nokogiri (>= 1.5.9) mail (2.6.4) mime-types (>= 1.16, < 4) method_source (0.8.2) - mime-types (3.0) + mime-types (3.1) mime-types-data (~> 3.2015) - mime-types-data (3.2016.0221) + mime-types-data (3.2016.0521) mini_portile2 (2.1.0) - mini_racer (0.1.4) - libv8 (~> 5.0, < 5.1.11) - minitest (5.9.0) - multi_json (1.12.0) - nokogiri (1.6.8) + mini_racer (0.1.7) + libv8 (~> 5.3) + minitest (5.10.1) + multi_json (1.12.1) + nokogiri (1.6.8.1) mini_portile2 (~> 2.1.0) - pkg-config (~> 1.1.7) - parser (2.3.1.0) + parser (2.3.3.1) ast (~> 2.2) - pkg-config (1.1.7) - poltergeist (1.9.0) + poltergeist (1.12.0) capybara (~> 2.1) cliver (~> 0.3.1) - multi_json (~> 1.0) websocket-driver (>= 0.2.0) powerpack (0.1.1) - pry (0.10.3) + pry (0.10.4) coderay (~> 1.1.0) method_source (~> 0.8.1) slop (~> 3.4) - pry-byebug (3.3.0) - byebug (~> 8.0) + pry-byebug (3.4.2) + byebug (~> 9.0) pry (~> 0.10) - pry-doc (0.8.0) + pry-doc (0.9.0) pry (~> 0.9) yard (~> 0.8) pry-rails (0.3.4) pry (>= 0.9.10) - pry-rescue (1.4.2) + pry-rescue (1.4.4) interception (>= 0.5) pry pry-stack_explorer (0.4.9.2) binding_of_caller (>= 0.7) pry (>= 0.9.11) - rack (1.6.4) + public_suffix (2.0.4) + puma (3.6.2) + rack (1.6.5) rack-test (0.6.3) rack (>= 1.0) rails (4.2.3) @@ -190,95 +190,95 @@ GEM rake (>= 0.8.7) thor (>= 0.18.1, < 2.0) rainbow (2.1.0) - rake (11.2.2) - rdoc (4.2.2) - json (~> 1.4) - rspec-core (3.4.4) - rspec-support (~> 3.4.0) - rspec-expectations (3.4.0) + rake (12.0.0) + rdoc (4.3.0) + rspec-core (3.5.4) + rspec-support (~> 3.5.0) + rspec-expectations (3.5.0) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.4.0) - rspec-mocks (3.4.1) + rspec-support (~> 3.5.0) + rspec-mocks (3.5.0) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.4.0) - rspec-rails (3.4.2) - actionpack (>= 3.0, < 4.3) - activesupport (>= 3.0, < 4.3) - railties (>= 3.0, < 4.3) - rspec-core (~> 3.4.0) - rspec-expectations (~> 3.4.0) - rspec-mocks (~> 3.4.0) - rspec-support (~> 3.4.0) + rspec-support (~> 3.5.0) + rspec-rails (3.5.2) + actionpack (>= 3.0) + activesupport (>= 3.0) + railties (>= 3.0) + rspec-core (~> 3.5.0) + rspec-expectations (~> 3.5.0) + rspec-mocks (~> 3.5.0) + rspec-support (~> 3.5.0) rspec-retry (0.5.2) rspec-core (> 3.3, < 3.6) - rspec-support (3.4.1) - rubocop (0.42.0) - parser (>= 2.3.1.0, < 3.0) + rspec-support (3.5.0) + rubocop (0.46.0) + parser (>= 2.3.1.1, < 3.0) powerpack (~> 0.1) rainbow (>= 1.99.1, < 3.0) ruby-progressbar (~> 1.7) unicode-display_width (~> 1.0, >= 1.0.1) - ruby-lint (2.1.0) + ruby-lint (2.3.1) parser (~> 2.2) slop (~> 3.4, >= 3.4.7) - ruby-progressbar (1.8.0) + ruby-progressbar (1.8.1) rubyzip (1.2.0) - sass (3.4.22) - sass-rails (5.0.4) - railties (>= 4.0.0, < 5.0) + sass (3.4.23) + sass-rails (5.0.6) + railties (>= 4.0.0, < 6) sass (~> 3.1) sprockets (>= 2.8, < 4.0) sprockets-rails (>= 2.0, < 4.0) tilt (>= 1.1, < 3) - scss_lint (0.48.0) - rake (>= 0.9, < 12) - sass (~> 3.4.15) - sdoc (0.4.1) + scss_lint (0.51.0) + rake (>= 0.9, < 13) + sass (~> 3.4.20) + sdoc (0.4.2) json (~> 1.7, >= 1.7.7) rdoc (~> 4.0) - selenium-webdriver (2.53.0) + selenium-webdriver (3.0.4) childprocess (~> 0.5) rubyzip (~> 1.0) websocket (~> 1.0) - simplecov (0.11.2) + simplecov (0.12.0) docile (~> 1.1.0) - json (~> 1.8) + json (>= 1.8, < 3) simplecov-html (~> 0.10.0) simplecov-html (0.10.0) slop (3.6.0) - spring (1.7.1) - sprockets (3.6.0) + spring (2.0.0) + activesupport (>= 4.2) + sprockets (3.7.1) concurrent-ruby (~> 1.0) rack (> 1, < 3) - sprockets-rails (3.0.4) + sprockets-rails (3.2.0) actionpack (>= 4.0) activesupport (>= 4.0) sprockets (>= 3.0.0) - sqlite3 (1.3.11) - term-ansicolor (1.3.2) + sqlite3 (1.3.12) + term-ansicolor (1.4.0) tins (~> 1.0) - thor (0.19.1) + thor (0.19.4) thread_safe (0.3.5) - tilt (2.0.2) - tins (1.6.0) + tilt (2.0.5) + tins (1.13.0) turbolinks (2.5.3) coffee-rails tzinfo (1.2.2) thread_safe (~> 0.1) - uglifier (3.0.0) + uglifier (3.0.4) execjs (>= 0.3.0, < 3) - unicode-display_width (1.0.5) - web-console (3.1.1) + unicode-display_width (1.1.2) + web-console (3.3.0) activemodel (>= 4.2) debug_inspector railties (>= 4.2) websocket (1.2.3) - websocket-driver (0.6.3) + websocket-driver (0.6.4) websocket-extensions (>= 0.1.0) websocket-extensions (0.1.2) xpath (2.0.0) nokogiri (~> 1.3) - yard (0.8.7.6) + yard (0.9.5) PLATFORMS ruby @@ -303,6 +303,7 @@ DEPENDENCIES pry-rails pry-rescue pry-stack_explorer + puma rails (= 4.2.3) react_on_rails! rspec-rails diff --git a/spec/dummy/Procfile b/spec/dummy/Procfile index 8687b0001..008ba4d87 100644 --- a/spec/dummy/Procfile +++ b/spec/dummy/Procfile @@ -1 +1 @@ -web: bundle exec puma -C config/puma.rb -b 0.0.0.0 +rails: REACT_ON_RAILS_ENV=HOT rails s -b 0.0.0.0 diff --git a/spec/dummy/client/.eslintrc b/spec/dummy/client/.eslintrc index f29f04e9c..b9a5fce50 100644 --- a/spec/dummy/client/.eslintrc +++ b/spec/dummy/client/.eslintrc @@ -6,3 +6,4 @@ rules: no-console: 0 import/no-unresolved: 0 import/no-extraneous-dependencies: 0 + react/forbid-prop-types: 0 diff --git a/spec/dummy/client/app/components/DeferredRender.jsx b/spec/dummy/client/app/components/DeferredRender.jsx index a002fdb02..e77cb7484 100644 --- a/spec/dummy/client/app/components/DeferredRender.jsx +++ b/spec/dummy/client/app/components/DeferredRender.jsx @@ -5,20 +5,23 @@ const DeferredRender = ({ children }) => (

Deferred Rendering

- Here, we're testing async routes with server rendering. + Here, we're testing async routes with server rendering. By deferring the initial render, we can prevent a client/server checksum mismatch error.

{ - children ? children : ( -

- - Test Async Route - -

- ) + children || +

+ + Test Async Route + +

}
); +DeferredRender.propTypes = { + children: React.PropTypes.node, +}; + export default DeferredRender; diff --git a/spec/dummy/client/app/components/DeferredRenderAsyncPage.jsx b/spec/dummy/client/app/components/DeferredRenderAsyncPage.jsx index afcd597f9..613220031 100644 --- a/spec/dummy/client/app/components/DeferredRenderAsyncPage.jsx +++ b/spec/dummy/client/app/components/DeferredRenderAsyncPage.jsx @@ -5,7 +5,7 @@ const DeferredRenderAsyncPage = () => (

Noice! It works.

Now, try reloading this page and looking at the developer console. - There shouldn't be any client/server mismatch error from React. + There shouldn't be any client/server mismatch error from React.

); diff --git a/spec/dummy/client/app/components/HelloWorld.jsx b/spec/dummy/client/app/components/HelloWorld.jsx index 1c82f33a5..3fbe99da7 100644 --- a/spec/dummy/client/app/components/HelloWorld.jsx +++ b/spec/dummy/client/app/components/HelloWorld.jsx @@ -12,8 +12,6 @@ class HelloWorld extends React.Component { name: PropTypes.string, }).isRequired, railsContext: PropTypes.object, - - error: PropTypes.any, }; // Not necessary if we only call super, but we'll need to initialize state, etc. @@ -24,15 +22,15 @@ class HelloWorld extends React.Component { this.handleChange = this.handleChange.bind(this); } + setNameDomRef(nameDomNode) { + this.nameDomRef = nameDomNode; + } + handleChange() { const name = this.nameDomRef.value; this.setState({ name }); } - setNameDomRef(nameDomNode) { - this.nameDomRef = nameDomNode; - } - render() { console.log('HelloWorld demonstrating a call to console.log in ' + 'spec/dummy/client/app/components/HelloWorld.jsx:18'); diff --git a/spec/dummy/client/app/components/HelloWorldES5.jsx b/spec/dummy/client/app/components/HelloWorldES5.jsx index 30934631b..faaca9944 100644 --- a/spec/dummy/client/app/components/HelloWorldES5.jsx +++ b/spec/dummy/client/app/components/HelloWorldES5.jsx @@ -12,15 +12,15 @@ const HelloWorldES5 = React.createClass({ return this.props.helloWorldData; }, + setNameDomRef(nameDomNode) { + this.nameDomRef = nameDomNode; + }, + handleChange() { const name = this.nameDomRef.value; this.setState({ name }); }, - setNameDomRef(nameDomNode) { - this.nameDomRef = nameDomNode; - }, - render() { const { name } = this.state; diff --git a/spec/dummy/client/app/components/HelloWorldRedux.jsx b/spec/dummy/client/app/components/HelloWorldRedux.jsx index 1f71c6ce3..18d92818e 100644 --- a/spec/dummy/client/app/components/HelloWorldRedux.jsx +++ b/spec/dummy/client/app/components/HelloWorldRedux.jsx @@ -17,15 +17,15 @@ export default class HelloWorldRedux extends React.Component { this.handleChange = this.handleChange.bind(this); } + setNameDomRef(nameDomNode) { + this.nameDomRef = nameDomNode; + } + handleChange() { const name = this.nameDomRef.value; this.props.actions.updateName(name); } - setNameDomRef(nameDomNode) { - this.nameDomRef = nameDomNode; - } - render() { const { data, railsContext } = this.props; const { name } = data; diff --git a/spec/dummy/client/app/components/RailsContext.jsx b/spec/dummy/client/app/components/RailsContext.jsx index 459631589..08ef05040 100644 --- a/spec/dummy/client/app/components/RailsContext.jsx +++ b/spec/dummy/client/app/components/RailsContext.jsx @@ -12,7 +12,7 @@ function renderContextRows(railsContext) { {key}:  {`${value}`} - + , ); } }, []); diff --git a/spec/dummy/client/app/startup/ClientReduxApp.jsx b/spec/dummy/client/app/startup/ClientReduxApp.jsx index c0418861b..3449fc077 100644 --- a/spec/dummy/client/app/startup/ClientReduxApp.jsx +++ b/spec/dummy/client/app/startup/ClientReduxApp.jsx @@ -32,5 +32,5 @@ export default (props, railsContext) => { - ); + ); }; diff --git a/spec/dummy/client/app/startup/ClientReduxSharedStoreApp.jsx b/spec/dummy/client/app/startup/ClientReduxSharedStoreApp.jsx index 8e83ed06b..0ec1ab01d 100644 --- a/spec/dummy/client/app/startup/ClientReduxSharedStoreApp.jsx +++ b/spec/dummy/client/app/startup/ClientReduxSharedStoreApp.jsx @@ -20,5 +20,5 @@ export default () => { - ); + ); }; diff --git a/spec/dummy/client/app/startup/ClientRouterApp.jsx b/spec/dummy/client/app/startup/ClientRouterApp.jsx index e501e9b67..2d2480f22 100644 --- a/spec/dummy/client/app/startup/ClientRouterApp.jsx +++ b/spec/dummy/client/app/startup/ClientRouterApp.jsx @@ -3,5 +3,7 @@ import { Router, browserHistory } from 'react-router'; import routes from '../routes/routes'; export default (props) => ( - + + {routes} + ); diff --git a/spec/dummy/client/app/startup/DeferredRenderAppRenderer.jsx b/spec/dummy/client/app/startup/DeferredRenderAppRenderer.jsx index 6f71ab263..76c11747f 100644 --- a/spec/dummy/client/app/startup/DeferredRenderAppRenderer.jsx +++ b/spec/dummy/client/app/startup/DeferredRenderAppRenderer.jsx @@ -4,14 +4,14 @@ import { match, Router, browserHistory } from 'react-router'; import DeferredRender from '../components/DeferredRender'; -const DeferredRenderAppRenderer = (props, railsContext, domNodeId) => { +const DeferredRenderAppRenderer = (_props, _railsContext, domNodeId) => { const history = browserHistory; const routes = { path: '/deferred_render_with_server_rendering', component: DeferredRender, childRoutes: [{ path: '/deferred_render_with_server_rendering/async_page', - getComponent(nextState, callback) { + getComponent(_nextState, callback) { require.ensure([], (require) => { const component = require('../components/DeferredRenderAsyncPage').default; @@ -26,7 +26,7 @@ const DeferredRenderAppRenderer = (props, railsContext, domNodeId) => { // implements an asyncronous getComponent. Since we do server rendering for this // component, immediately rendering a Router could cause a client/server // checksum mismatch. - match({ history, routes }, (error, redirectionLocation, routerProps) => { + match({ history, routes }, (error, _redirectionLocation, routerProps) => { if (error) { throw error; } diff --git a/spec/dummy/client/app/startup/DeferredRenderAppServer.jsx b/spec/dummy/client/app/startup/DeferredRenderAppServer.jsx index 4695a84ef..0c6eb9245 100644 --- a/spec/dummy/client/app/startup/DeferredRenderAppServer.jsx +++ b/spec/dummy/client/app/startup/DeferredRenderAppServer.jsx @@ -4,7 +4,7 @@ import { match, RouterContext } from 'react-router'; import DeferredRender from '../components/DeferredRender'; import DeferredRenderAsyncPage from '../components/DeferredRenderAsyncPage'; -const DeferredRenderAppServer = (props, railsContext) => { +const DeferredRenderAppServer = (_props, railsContext) => { let error; let redirectLocation; let routerProps; diff --git a/spec/dummy/client/app/startup/ManualRenderAppRenderer.jsx b/spec/dummy/client/app/startup/ManualRenderAppRenderer.jsx index 0b08a6473..a70fa5b8a 100644 --- a/spec/dummy/client/app/startup/ManualRenderAppRenderer.jsx +++ b/spec/dummy/client/app/startup/ManualRenderAppRenderer.jsx @@ -1,7 +1,7 @@ import React from 'react'; import ReactDOM from 'react-dom'; -export default (props, railsContext, domNodeId) => { +export default (_props, _railsContext, domNodeId) => { const reactElement = (

Manual Render Example

diff --git a/spec/dummy/client/app/startup/ServerReduxSharedStoreApp.jsx b/spec/dummy/client/app/startup/ServerReduxSharedStoreApp.jsx index ed926e65a..1f2d3b11c 100644 --- a/spec/dummy/client/app/startup/ServerReduxSharedStoreApp.jsx +++ b/spec/dummy/client/app/startup/ServerReduxSharedStoreApp.jsx @@ -20,5 +20,5 @@ export default () => { - ); + ); }; diff --git a/spec/dummy/client/app/startup/ServerRouterApp.jsx b/spec/dummy/client/app/startup/ServerRouterApp.jsx index 1fff87544..6d3369322 100644 --- a/spec/dummy/client/app/startup/ServerRouterApp.jsx +++ b/spec/dummy/client/app/startup/ServerRouterApp.jsx @@ -3,7 +3,7 @@ import { match, RouterContext } from 'react-router'; import routes from '../routes/routes'; -export default (props, railsContext) => { +export default (_props, railsContext) => { let error; let redirectLocation; let routeProps; diff --git a/spec/dummy/client/app/stores/SharedReduxStore.jsx b/spec/dummy/client/app/stores/SharedReduxStore.jsx index 95b5bb88a..b9541774a 100644 --- a/spec/dummy/client/app/stores/SharedReduxStore.jsx +++ b/spec/dummy/client/app/stores/SharedReduxStore.jsx @@ -9,6 +9,6 @@ import reducers from '../reducers/reducersIndex'; */ export default (props, railsContext) => { const combinedReducer = combineReducers(reducers); - props.railsContext = railsContext; - return applyMiddleware(middleware)(createStore)(combinedReducer, props); + const newProps = { ...props, railsContext }; + return applyMiddleware(middleware)(createStore)(combinedReducer, newProps); }; diff --git a/spec/dummy/client/package.json b/spec/dummy/client/package.json index 3498c1584..963e752b8 100644 --- a/spec/dummy/client/package.json +++ b/spec/dummy/client/package.json @@ -8,65 +8,64 @@ }, "main": "js/app.js", "dependencies": { - "autoprefixer": "^6.5.1", + "autoprefixer": "^6.6.0", "babel": "^6.5.2", - "babel-cli": "^6.16.0", - "babel-core": "^6.17.0", - "babel-loader": "^6.2.5", - "babel-polyfill": "^6.16.0", - "babel-preset-es2015": "^6.16.0", + "babel-cli": "^6.18.0", + "babel-core": "^6.21.0", + "babel-loader": "^6.2.10", + "babel-polyfill": "^6.20.0", + "babel-preset-es2015": "^6.18.0", "babel-preset-react": "^6.16.0", "babel-preset-stage-0": "^6.16.0", - "babel-runtime": "^6.11.6", - "css-loader": "^0.25.0", + "babel-runtime": "^6.20.0", + "css-loader": "^0.26.1", "es5-shim": "^4.5.9", "expose-loader": "^0.7.1", "extract-text-webpack-plugin": "^1.0.1", "file-loader": "^0.9.0", - "history": "^4.3.0", - "imports-loader": "^0.6.5", + "history": "^4.5.0", + "imports-loader": "^0.7.0", "jquery": "^3.1.1", "jquery-ujs": "^1.2.2", "loader-utils": "^0.2.16", - "lodash": "^4.16.4", - "node-libs-browser": "^1.0.0", - "node-sass": "^3.10.1", - "postcss-loader": "^1.0.0", - "react": "^15.3.2", - "react-dom": "^15.3.2", + "lodash": "^4.17.3", + "node-libs-browser": "^2.0.0", + "node-sass": "^4.1.1", + "postcss-loader": "^1.2.1", + "react": "^15.4.1", + "react-dom": "^15.4.1", "react-on-rails": "../../..", - "react-redux": "^4.4.5", - "react-router": "^2.8.1", + "react-redux": "^5.0.1", + "react-router": "^3.0.0", "redux": "^3.6.0", "redux-thunk": "^2.1.0", - "resolve-url-loader": "^1.6.0", - "sass-loader": "^4.0.2", + "resolve-url-loader": "^1.6.1", + "sass-loader": "^4.1.1", "sass-resources-loader": "1.1.0", "style-loader": "^0.13.1", "url-loader": "^0.5.7", - "webpack": "^1.13.2" + "webpack": "^1.14.0" }, "devDependencies": { "babel-plugin-react-transform": "^2.0.2", "body-parser": "^1.15.2", "eslint": "^3.8.1", - "eslint-config-shakacode": "^6.0.0", - "eslint-plugin-react": "^6.4.1", + "eslint-config-shakacode": "^13.2.1", + "eslint-plugin-import": "^2.2.0", + "eslint-plugin-jsx-a11y": "^2.2.3", + "eslint-plugin-react": "^6.8.0", "fbjs": "^0.8.5", - "jscs": "^2.11.0", "jsdom": "^9.8.0", "react-transform-hmr": "^1.0.4", - "tape": "^4.6.2", + "tape": "^4.6.3", "webpack-dev-server": "^1.16.2" }, "browser": { "fs": false }, "scripts": { - "lint": "npm run eslint --silent && npm run jscs --silent", + "lint": "npm run eslint --silent", "eslint": "eslint --ext .js,.jsx .", - "jscs": "jscs --verbose .", - "jscs:fix": "jscs --verbose -x . --silent", "test": "npm run build:test && rspec", "build:test": "npm run build:client && npm run build:server", "build:production:client": "NODE_ENV=production webpack --config webpack.client.rails.build.config.js", diff --git a/spec/dummy/client/server-rails-hot.js b/spec/dummy/client/server-rails-hot.js index 9d14157f5..679ff0347 100644 --- a/spec/dummy/client/server-rails-hot.js +++ b/spec/dummy/client/server-rails-hot.js @@ -1,4 +1,5 @@ /* eslint no-var: 0, no-console: 0, import/no-extraneous-dependencies: 0 */ +/* eslint-disable comma-dangle */ // This file is used by the npm script: // "hot-assets": "babel-node server-rails-hot.js" diff --git a/spec/dummy/client/tests b/spec/dummy/client/tests deleted file mode 120000 index 3819056a3..000000000 --- a/spec/dummy/client/tests +++ /dev/null @@ -1 +0,0 @@ -../../../node_package/tests \ No newline at end of file diff --git a/spec/dummy/client/webpack.client.rails.build.config.js b/spec/dummy/client/webpack.client.rails.build.config.js index 1c3a06ddf..828dd15e7 100644 --- a/spec/dummy/client/webpack.client.rails.build.config.js +++ b/spec/dummy/client/webpack.client.rails.build.config.js @@ -2,6 +2,8 @@ // cd client && npm run build:client // Note that Foreman (Procfile.dev) has also been configured to take care of this. +/* eslint-disable comma-dangle */ + const webpack = require('webpack'); const ExtractTextPlugin = require('extract-text-webpack-plugin'); diff --git a/spec/dummy/client/webpack.client.rails.hot.config.js b/spec/dummy/client/webpack.client.rails.hot.config.js index 7f3012613..8ff7d9a69 100644 --- a/spec/dummy/client/webpack.client.rails.hot.config.js +++ b/spec/dummy/client/webpack.client.rails.hot.config.js @@ -2,6 +2,7 @@ // rails s // cd client && babel-node server-rails-hot.js // Note that Foreman (Procfile.dev) has also been configured to take care of this. +/* eslint-disable comma-dangle */ const path = require('path'); const webpack = require('webpack'); diff --git a/spec/dummy/client/webpack.server.rails.build.config.js b/spec/dummy/client/webpack.server.rails.build.config.js index 3b742be45..397614d83 100644 --- a/spec/dummy/client/webpack.server.rails.build.config.js +++ b/spec/dummy/client/webpack.server.rails.build.config.js @@ -1,4 +1,5 @@ // Common webpack configuration for server bundle +/* eslint-disable comma-dangle */ const webpack = require('webpack'); const path = require('path'); diff --git a/spec/dummy/config/puma.rb b/spec/dummy/config/puma.rb new file mode 100644 index 000000000..fa11fb8fd --- /dev/null +++ b/spec/dummy/config/puma.rb @@ -0,0 +1,47 @@ +# Puma can serve each request in a thread from an internal thread pool. +# The `threads` method setting takes two numbers a minimum and maximum. +# Any libraries that use thread pools should be configured to match +# the maximum value specified for Puma. Default is set to 5 threads for minimum +# and maximum, this matches the default thread size of Active Record. +# +threads_count = ENV.fetch("RAILS_MAX_THREADS") { 5 }.to_i +threads threads_count, threads_count + +# Specifies the `port` that Puma will listen on to receive requests, default is 3000. +# +port ENV.fetch("PORT") { 3000 } + +# Specifies the `environment` that Puma will run in. +# +environment ENV.fetch("RAILS_ENV") { "development" } + +# Specifies the number of `workers` to boot in clustered mode. +# Workers are forked webserver processes. If using threads and workers together +# the concurrency of the application would be max `threads` * `workers`. +# Workers do not work on JRuby or Windows (both of which do not support +# processes). +# +workers ENV.fetch("WEB_CONCURRENCY") { 2 } + +# Use the `preload_app!` method when specifying a `workers` number. +# This directive tells Puma to first boot the application and load code +# before forking the application. This takes advantage of Copy On Write +# process behavior so workers use less memory. If you use this option +# you need to make sure to reconnect any threads in the `on_worker_boot` +# block. +# +preload_app! + +# The code in the `on_worker_boot` will be called if you are using +# clustered mode by specifying a number of `workers`. After each worker +# process is booted this block will be run, if you are using `preload_app!` +# option you will want to use this block to reconnect to any threads +# or connections that may have been created at application boot, Ruby +# cannot share connections between processes. +# +on_worker_boot do + ActiveRecord::Base.establish_connection if defined?(ActiveRecord) +end + +# Allow puma to be restarted by `rails restart` command. +plugin :tmp_restart diff --git a/spec/dummy/npm-shrinkwrap.json b/spec/dummy/npm-shrinkwrap.json deleted file mode 100644 index 9a8c013eb..000000000 --- a/spec/dummy/npm-shrinkwrap.json +++ /dev/null @@ -1,942 +0,0 @@ -{ - "name": "react_on_rails", - "version": "2.0.0-rc.2", - "dependencies": { - "acorn-to-esprima": { - "version": "2.0.8", - "from": "acorn-to-esprima@>=2.0.4 <3.0.0", - "resolved": "https://registry.npmjs.org/acorn-to-esprima/-/acorn-to-esprima-2.0.8.tgz" - }, - "align-text": { - "version": "0.1.3", - "from": "align-text@>=0.1.0 <0.2.0", - "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.3.tgz" - }, - "amdefine": { - "version": "1.0.0", - "from": "amdefine@>=0.0.4", - "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.0.tgz" - }, - "ansi-escapes": { - "version": "1.1.1", - "from": "ansi-escapes@>=1.1.0 <2.0.0", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-1.1.1.tgz" - }, - "ansi-regex": { - "version": "2.0.0", - "from": "ansi-regex@>=2.0.0 <3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.0.0.tgz" - }, - "ansi-styles": { - "version": "2.1.0", - "from": "ansi-styles@>=2.1.0 <3.0.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.1.0.tgz" - }, - "argparse": { - "version": "1.0.4", - "from": "argparse@>=1.0.2 <2.0.0", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.4.tgz", - "dependencies": { - "lodash": { - "version": "4.1.0", - "from": "lodash@>=4.0.0 <5.0.0", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.1.0.tgz" - } - } - }, - "array-union": { - "version": "1.0.1", - "from": "array-union@>=1.0.1 <2.0.0", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.1.tgz" - }, - "array-uniq": { - "version": "1.0.2", - "from": "array-uniq@>=1.0.1 <2.0.0", - "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.2.tgz" - }, - "arrify": { - "version": "1.0.1", - "from": "arrify@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz" - }, - "async": { - "version": "1.5.2", - "from": "async@>=1.4.0 <2.0.0", - "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz" - }, - "babel-code-frame": { - "version": "6.3.13", - "from": "babel-code-frame@>=6.3.13 <7.0.0", - "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.3.13.tgz" - }, - "babel-messages": { - "version": "6.3.18", - "from": "babel-messages@>=6.3.13 <7.0.0", - "resolved": "https://registry.npmjs.org/babel-messages/-/babel-messages-6.3.18.tgz" - }, - "babel-runtime": { - "version": "5.8.35", - "from": "babel-runtime@>=5.0.0 <6.0.0", - "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-5.8.35.tgz" - }, - "babel-traverse": { - "version": "6.4.5", - "from": "babel-traverse@>=6.0.20 <7.0.0", - "resolved": "https://registry.npmjs.org/babel-traverse/-/babel-traverse-6.4.5.tgz" - }, - "babel-types": { - "version": "6.4.5", - "from": "babel-types@>=6.0.19 <7.0.0", - "resolved": "https://registry.npmjs.org/babel-types/-/babel-types-6.4.5.tgz" - }, - "babylon": { - "version": "6.4.5", - "from": "babylon@>=6.0.18 <7.0.0", - "resolved": "https://registry.npmjs.org/babylon/-/babylon-6.4.5.tgz" - }, - "balanced-match": { - "version": "0.3.0", - "from": "balanced-match@>=0.3.0 <0.4.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.3.0.tgz" - }, - "brace-expansion": { - "version": "1.1.2", - "from": "brace-expansion@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.2.tgz" - }, - "camelcase": { - "version": "1.2.1", - "from": "camelcase@>=1.0.2 <2.0.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz" - }, - "center-align": { - "version": "0.1.2", - "from": "center-align@>=0.1.1 <0.2.0", - "resolved": "https://registry.npmjs.org/center-align/-/center-align-0.1.2.tgz" - }, - "chalk": { - "version": "1.1.1", - "from": "chalk@>=1.1.0 <2.0.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.1.tgz" - }, - "cli-cursor": { - "version": "1.0.2", - "from": "cli-cursor@>=1.0.1 <2.0.0", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-1.0.2.tgz" - }, - "cli-width": { - "version": "1.1.1", - "from": "cli-width@>=1.0.1 <2.0.0", - "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-1.1.1.tgz" - }, - "cliui": { - "version": "2.1.0", - "from": "cliui@>=2.1.0 <3.0.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz", - "dependencies": { - "wordwrap": { - "version": "0.0.2", - "from": "wordwrap@0.0.2", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz" - } - } - }, - "code-point-at": { - "version": "1.0.0", - "from": "code-point-at@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.0.0.tgz" - }, - "concat-map": { - "version": "0.0.1", - "from": "concat-map@0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz" - }, - "concat-stream": { - "version": "1.5.1", - "from": "concat-stream@>=1.4.6 <2.0.0", - "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.5.1.tgz" - }, - "core-js": { - "version": "1.2.6", - "from": "core-js@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-1.2.6.tgz" - }, - "core-util-is": { - "version": "1.0.2", - "from": "core-util-is@>=1.0.0 <1.1.0", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz" - }, - "d": { - "version": "0.1.1", - "from": "d@>=0.1.1 <0.2.0", - "resolved": "https://registry.npmjs.org/d/-/d-0.1.1.tgz" - }, - "debug": { - "version": "2.2.0", - "from": "debug@>=2.2.0 <3.0.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.2.0.tgz" - }, - "decamelize": { - "version": "1.1.2", - "from": "decamelize@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.1.2.tgz" - }, - "deep-is": { - "version": "0.1.3", - "from": "deep-is@>=0.1.3 <0.2.0", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz" - }, - "del": { - "version": "2.2.0", - "from": "del@>=2.0.2 <3.0.0", - "resolved": "https://registry.npmjs.org/del/-/del-2.2.0.tgz" - }, - "doctrine": { - "version": "0.7.2", - "from": "doctrine@>=0.7.1 <0.8.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-0.7.2.tgz", - "dependencies": { - "esutils": { - "version": "1.1.6", - "from": "esutils@>=1.1.6 <2.0.0", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-1.1.6.tgz" - } - } - }, - "es5-ext": { - "version": "0.10.11", - "from": "es5-ext@>=0.10.8 <0.11.0", - "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.11.tgz" - }, - "es6-iterator": { - "version": "2.0.0", - "from": "es6-iterator@>=2.0.0 <3.0.0", - "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.0.tgz" - }, - "es6-map": { - "version": "0.1.3", - "from": "es6-map@>=0.1.2 <0.2.0", - "resolved": "https://registry.npmjs.org/es6-map/-/es6-map-0.1.3.tgz" - }, - "es6-set": { - "version": "0.1.4", - "from": "es6-set@>=0.1.3 <0.2.0", - "resolved": "https://registry.npmjs.org/es6-set/-/es6-set-0.1.4.tgz" - }, - "es6-symbol": { - "version": "3.0.2", - "from": "es6-symbol@>=3.0.1 <3.1.0", - "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.0.2.tgz" - }, - "es6-weak-map": { - "version": "2.0.1", - "from": "es6-weak-map@>=2.0.1 <3.0.0", - "resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.1.tgz" - }, - "escape-string-regexp": { - "version": "1.0.4", - "from": "escape-string-regexp@>=1.0.2 <2.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.4.tgz" - }, - "escope": { - "version": "3.3.0", - "from": "escope@>=3.3.0 <4.0.0", - "resolved": "https://registry.npmjs.org/escope/-/escope-3.3.0.tgz" - }, - "espree": { - "version": "2.2.5", - "from": "espree@>=2.2.4 <3.0.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-2.2.5.tgz" - }, - "esrecurse": { - "version": "3.1.1", - "from": "esrecurse@>=3.1.1 <4.0.0", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-3.1.1.tgz", - "dependencies": { - "estraverse": { - "version": "3.1.0", - "from": "estraverse@>=3.1.0 <3.2.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-3.1.0.tgz" - } - } - }, - "estraverse": { - "version": "4.1.1", - "from": "estraverse@>=4.1.1 <5.0.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.1.1.tgz" - }, - "estraverse-fb": { - "version": "1.3.1", - "from": "estraverse-fb@>=1.3.1 <2.0.0", - "resolved": "https://registry.npmjs.org/estraverse-fb/-/estraverse-fb-1.3.1.tgz" - }, - "esutils": { - "version": "2.0.2", - "from": "esutils@>=2.0.2 <3.0.0", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz" - }, - "event-emitter": { - "version": "0.3.4", - "from": "event-emitter@>=0.3.4 <0.4.0", - "resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.4.tgz" - }, - "exit-hook": { - "version": "1.1.1", - "from": "exit-hook@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/exit-hook/-/exit-hook-1.1.1.tgz" - }, - "fast-levenshtein": { - "version": "1.0.7", - "from": "fast-levenshtein@>=1.0.6 <1.1.0", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-1.0.7.tgz" - }, - "figures": { - "version": "1.4.0", - "from": "figures@>=1.3.5 <2.0.0", - "resolved": "https://registry.npmjs.org/figures/-/figures-1.4.0.tgz" - }, - "file-entry-cache": { - "version": "1.2.4", - "from": "file-entry-cache@>=1.1.1 <2.0.0", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-1.2.4.tgz" - }, - "flat-cache": { - "version": "1.0.10", - "from": "flat-cache@>=1.0.9 <2.0.0", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-1.0.10.tgz" - }, - "generate-function": { - "version": "2.0.0", - "from": "generate-function@>=2.0.0 <3.0.0", - "resolved": "https://registry.npmjs.org/generate-function/-/generate-function-2.0.0.tgz" - }, - "generate-object-property": { - "version": "1.2.0", - "from": "generate-object-property@>=1.1.0 <2.0.0", - "resolved": "https://registry.npmjs.org/generate-object-property/-/generate-object-property-1.2.0.tgz" - }, - "glob": { - "version": "5.0.15", - "from": "glob@>=5.0.14 <6.0.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz" - }, - "globals": { - "version": "8.18.0", - "from": "globals@>=8.3.0 <9.0.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-8.18.0.tgz" - }, - "globby": { - "version": "4.0.0", - "from": "globby@>=4.0.0 <5.0.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-4.0.0.tgz", - "dependencies": { - "glob": { - "version": "6.0.4", - "from": "glob@>=6.0.1 <7.0.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-6.0.4.tgz" - } - } - }, - "graceful-fs": { - "version": "4.1.2", - "from": "graceful-fs@>=4.1.2 <5.0.0", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.2.tgz" - }, - "handlebars": { - "version": "4.0.5", - "from": "handlebars@>=4.0.0 <5.0.0", - "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.0.5.tgz" - }, - "has-ansi": { - "version": "2.0.0", - "from": "has-ansi@>=2.0.0 <3.0.0", - "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz" - }, - "inflight": { - "version": "1.0.4", - "from": "inflight@>=1.0.4 <2.0.0", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.4.tgz" - }, - "inherits": { - "version": "2.0.1", - "from": "inherits@>=2.0.1 <2.1.0", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz" - }, - "inquirer": { - "version": "0.11.4", - "from": "inquirer@>=0.11.0 <0.12.0", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-0.11.4.tgz" - }, - "invariant": { - "version": "2.2.0", - "from": "invariant@>=2.2.0 <3.0.0", - "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.0.tgz" - }, - "is-buffer": { - "version": "1.1.2", - "from": "is-buffer@>=1.0.2 <2.0.0", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.2.tgz" - }, - "is-finite": { - "version": "1.0.1", - "from": "is-finite@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.0.1.tgz" - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "from": "is-fullwidth-code-point@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz" - }, - "is-my-json-valid": { - "version": "2.12.4", - "from": "is-my-json-valid@>=2.10.0 <3.0.0", - "resolved": "https://registry.npmjs.org/is-my-json-valid/-/is-my-json-valid-2.12.4.tgz" - }, - "is-path-cwd": { - "version": "1.0.0", - "from": "is-path-cwd@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-1.0.0.tgz" - }, - "is-path-in-cwd": { - "version": "1.0.0", - "from": "is-path-in-cwd@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/is-path-in-cwd/-/is-path-in-cwd-1.0.0.tgz" - }, - "is-path-inside": { - "version": "1.0.0", - "from": "is-path-inside@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-1.0.0.tgz" - }, - "is-property": { - "version": "1.0.2", - "from": "is-property@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz" - }, - "is-resolvable": { - "version": "1.0.0", - "from": "is-resolvable@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/is-resolvable/-/is-resolvable-1.0.0.tgz" - }, - "isarray": { - "version": "0.0.1", - "from": "isarray@0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz" - }, - "js-tokens": { - "version": "1.0.2", - "from": "js-tokens@>=1.0.1 <2.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-1.0.2.tgz" - }, - "js-yaml": { - "version": "3.4.5", - "from": "js-yaml@3.4.5", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.4.5.tgz", - "dependencies": { - "esprima": { - "version": "2.7.1", - "from": "esprima@>=2.6.0 <3.0.0", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.1.tgz" - } - } - }, - "json-stable-stringify": { - "version": "1.0.0", - "from": "json-stable-stringify@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.0.tgz" - }, - "jsonify": { - "version": "0.0.0", - "from": "jsonify@>=0.0.0 <0.1.0", - "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz" - }, - "jsonpointer": { - "version": "2.0.0", - "from": "jsonpointer@2.0.0", - "resolved": "https://registry.npmjs.org/jsonpointer/-/jsonpointer-2.0.0.tgz" - }, - "kind-of": { - "version": "2.0.1", - "from": "kind-of@>=2.0.0 <3.0.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-2.0.1.tgz" - }, - "lazy-cache": { - "version": "0.2.7", - "from": "lazy-cache@>=0.2.4 <0.3.0", - "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-0.2.7.tgz" - }, - "left-pad": { - "version": "0.0.3", - "from": "left-pad@0.0.3", - "resolved": "https://registry.npmjs.org/left-pad/-/left-pad-0.0.3.tgz" - }, - "levn": { - "version": "0.2.5", - "from": "levn@>=0.2.5 <0.3.0", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.2.5.tgz" - }, - "line-numbers": { - "version": "0.2.0", - "from": "line-numbers@>=0.2.0 <0.3.0", - "resolved": "https://registry.npmjs.org/line-numbers/-/line-numbers-0.2.0.tgz" - }, - "lodash": { - "version": "3.10.1", - "from": "lodash@>=3.10.1 <4.0.0", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-3.10.1.tgz" - }, - "lodash._arraycopy": { - "version": "3.0.0", - "from": "lodash._arraycopy@>=3.0.0 <4.0.0", - "resolved": "https://registry.npmjs.org/lodash._arraycopy/-/lodash._arraycopy-3.0.0.tgz" - }, - "lodash._arrayeach": { - "version": "3.0.0", - "from": "lodash._arrayeach@>=3.0.0 <4.0.0", - "resolved": "https://registry.npmjs.org/lodash._arrayeach/-/lodash._arrayeach-3.0.0.tgz" - }, - "lodash._arraymap": { - "version": "3.0.0", - "from": "lodash._arraymap@>=3.0.0 <4.0.0", - "resolved": "https://registry.npmjs.org/lodash._arraymap/-/lodash._arraymap-3.0.0.tgz" - }, - "lodash._baseassign": { - "version": "3.2.0", - "from": "lodash._baseassign@>=3.0.0 <4.0.0", - "resolved": "https://registry.npmjs.org/lodash._baseassign/-/lodash._baseassign-3.2.0.tgz" - }, - "lodash._baseclone": { - "version": "3.3.0", - "from": "lodash._baseclone@>=3.0.0 <4.0.0", - "resolved": "https://registry.npmjs.org/lodash._baseclone/-/lodash._baseclone-3.3.0.tgz" - }, - "lodash._basecopy": { - "version": "3.0.1", - "from": "lodash._basecopy@>=3.0.0 <4.0.0", - "resolved": "https://registry.npmjs.org/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz" - }, - "lodash._basedifference": { - "version": "3.0.3", - "from": "lodash._basedifference@>=3.0.0 <4.0.0", - "resolved": "https://registry.npmjs.org/lodash._basedifference/-/lodash._basedifference-3.0.3.tgz" - }, - "lodash._baseflatten": { - "version": "3.1.4", - "from": "lodash._baseflatten@>=3.0.0 <4.0.0", - "resolved": "https://registry.npmjs.org/lodash._baseflatten/-/lodash._baseflatten-3.1.4.tgz" - }, - "lodash._basefor": { - "version": "3.0.3", - "from": "lodash._basefor@>=3.0.0 <4.0.0", - "resolved": "https://registry.npmjs.org/lodash._basefor/-/lodash._basefor-3.0.3.tgz" - }, - "lodash._baseindexof": { - "version": "3.1.0", - "from": "lodash._baseindexof@>=3.0.0 <4.0.0", - "resolved": "https://registry.npmjs.org/lodash._baseindexof/-/lodash._baseindexof-3.1.0.tgz" - }, - "lodash._bindcallback": { - "version": "3.0.1", - "from": "lodash._bindcallback@>=3.0.0 <4.0.0", - "resolved": "https://registry.npmjs.org/lodash._bindcallback/-/lodash._bindcallback-3.0.1.tgz" - }, - "lodash._cacheindexof": { - "version": "3.0.2", - "from": "lodash._cacheindexof@>=3.0.0 <4.0.0", - "resolved": "https://registry.npmjs.org/lodash._cacheindexof/-/lodash._cacheindexof-3.0.2.tgz" - }, - "lodash._createassigner": { - "version": "3.1.1", - "from": "lodash._createassigner@>=3.0.0 <4.0.0", - "resolved": "https://registry.npmjs.org/lodash._createassigner/-/lodash._createassigner-3.1.1.tgz" - }, - "lodash._createcache": { - "version": "3.1.2", - "from": "lodash._createcache@>=3.0.0 <4.0.0", - "resolved": "https://registry.npmjs.org/lodash._createcache/-/lodash._createcache-3.1.2.tgz" - }, - "lodash._getnative": { - "version": "3.9.1", - "from": "lodash._getnative@>=3.0.0 <4.0.0", - "resolved": "https://registry.npmjs.org/lodash._getnative/-/lodash._getnative-3.9.1.tgz" - }, - "lodash._isiterateecall": { - "version": "3.0.9", - "from": "lodash._isiterateecall@>=3.0.0 <4.0.0", - "resolved": "https://registry.npmjs.org/lodash._isiterateecall/-/lodash._isiterateecall-3.0.9.tgz" - }, - "lodash._pickbyarray": { - "version": "3.0.2", - "from": "lodash._pickbyarray@>=3.0.0 <4.0.0", - "resolved": "https://registry.npmjs.org/lodash._pickbyarray/-/lodash._pickbyarray-3.0.2.tgz" - }, - "lodash._pickbycallback": { - "version": "3.0.0", - "from": "lodash._pickbycallback@>=3.0.0 <4.0.0", - "resolved": "https://registry.npmjs.org/lodash._pickbycallback/-/lodash._pickbycallback-3.0.0.tgz" - }, - "lodash.assign": { - "version": "3.2.0", - "from": "lodash.assign@>=3.2.0 <4.0.0", - "resolved": "https://registry.npmjs.org/lodash.assign/-/lodash.assign-3.2.0.tgz" - }, - "lodash.clonedeep": { - "version": "3.0.2", - "from": "lodash.clonedeep@>=3.0.1 <4.0.0", - "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-3.0.2.tgz" - }, - "lodash.isarguments": { - "version": "3.0.5", - "from": "lodash.isarguments@>=3.0.0 <4.0.0", - "resolved": "https://registry.npmjs.org/lodash.isarguments/-/lodash.isarguments-3.0.5.tgz" - }, - "lodash.isarray": { - "version": "3.0.4", - "from": "lodash.isarray@>=3.0.0 <4.0.0", - "resolved": "https://registry.npmjs.org/lodash.isarray/-/lodash.isarray-3.0.4.tgz" - }, - "lodash.isplainobject": { - "version": "3.2.0", - "from": "lodash.isplainobject@>=3.0.0 <4.0.0", - "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-3.2.0.tgz" - }, - "lodash.istypedarray": { - "version": "3.0.3", - "from": "lodash.istypedarray@>=3.0.0 <4.0.0", - "resolved": "https://registry.npmjs.org/lodash.istypedarray/-/lodash.istypedarray-3.0.3.tgz" - }, - "lodash.keys": { - "version": "3.1.2", - "from": "lodash.keys@>=3.0.0 <4.0.0", - "resolved": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-3.1.2.tgz" - }, - "lodash.keysin": { - "version": "3.0.8", - "from": "lodash.keysin@>=3.0.0 <4.0.0", - "resolved": "https://registry.npmjs.org/lodash.keysin/-/lodash.keysin-3.0.8.tgz" - }, - "lodash.merge": { - "version": "3.3.2", - "from": "lodash.merge@>=3.3.2 <4.0.0", - "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-3.3.2.tgz" - }, - "lodash.omit": { - "version": "3.1.0", - "from": "lodash.omit@>=3.1.0 <4.0.0", - "resolved": "https://registry.npmjs.org/lodash.omit/-/lodash.omit-3.1.0.tgz" - }, - "lodash.pick": { - "version": "3.1.0", - "from": "lodash.pick@>=3.1.0 <4.0.0", - "resolved": "https://registry.npmjs.org/lodash.pick/-/lodash.pick-3.1.0.tgz" - }, - "lodash.restparam": { - "version": "3.6.1", - "from": "lodash.restparam@>=3.0.0 <4.0.0", - "resolved": "https://registry.npmjs.org/lodash.restparam/-/lodash.restparam-3.6.1.tgz" - }, - "lodash.toplainobject": { - "version": "3.0.0", - "from": "lodash.toplainobject@>=3.0.0 <4.0.0", - "resolved": "https://registry.npmjs.org/lodash.toplainobject/-/lodash.toplainobject-3.0.0.tgz" - }, - "longest": { - "version": "1.0.1", - "from": "longest@>=1.0.1 <2.0.0", - "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz" - }, - "loose-envify": { - "version": "1.1.0", - "from": "loose-envify@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.1.0.tgz" - }, - "minimatch": { - "version": "3.0.0", - "from": "minimatch@>=3.0.0 <4.0.0", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.0.tgz" - }, - "minimist": { - "version": "0.0.8", - "from": "minimist@0.0.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz" - }, - "mkdirp": { - "version": "0.5.1", - "from": "mkdirp@>=0.5.0 <0.6.0", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz" - }, - "ms": { - "version": "0.7.1", - "from": "ms@0.7.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz" - }, - "mute-stream": { - "version": "0.0.5", - "from": "mute-stream@0.0.5", - "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.5.tgz" - }, - "number-is-nan": { - "version": "1.0.0", - "from": "number-is-nan@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.0.tgz" - }, - "object-assign": { - "version": "4.0.1", - "from": "object-assign@>=4.0.1 <5.0.0", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.0.1.tgz" - }, - "once": { - "version": "1.3.3", - "from": "once@>=1.3.0 <2.0.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.3.3.tgz" - }, - "onetime": { - "version": "1.1.0", - "from": "onetime@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-1.1.0.tgz" - }, - "optimist": { - "version": "0.6.1", - "from": "optimist@>=0.6.1 <0.7.0", - "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz" - }, - "optionator": { - "version": "0.6.0", - "from": "optionator@>=0.6.0 <0.7.0", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.6.0.tgz" - }, - "os-homedir": { - "version": "1.0.1", - "from": "os-homedir@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.1.tgz" - }, - "path-is-absolute": { - "version": "1.0.0", - "from": "path-is-absolute@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.0.tgz" - }, - "path-is-inside": { - "version": "1.0.1", - "from": "path-is-inside@>=1.0.1 <2.0.0", - "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.1.tgz" - }, - "pify": { - "version": "2.3.0", - "from": "pify@>=2.0.0 <3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz" - }, - "pinkie": { - "version": "2.0.2", - "from": "pinkie@>=2.0.0 <3.0.0", - "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.2.tgz" - }, - "pinkie-promise": { - "version": "2.0.0", - "from": "pinkie-promise@>=2.0.0 <3.0.0", - "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.0.tgz" - }, - "prelude-ls": { - "version": "1.1.2", - "from": "prelude-ls@>=1.1.1 <1.2.0", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz" - }, - "process-nextick-args": { - "version": "1.0.6", - "from": "process-nextick-args@>=1.0.6 <1.1.0", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.6.tgz" - }, - "read-json-sync": { - "version": "1.1.1", - "from": "read-json-sync@>=1.1.0 <2.0.0", - "resolved": "https://registry.npmjs.org/read-json-sync/-/read-json-sync-1.1.1.tgz" - }, - "readable-stream": { - "version": "2.0.5", - "from": "readable-stream@>=2.0.0 <2.1.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.5.tgz" - }, - "readline2": { - "version": "1.0.1", - "from": "readline2@>=1.0.1 <2.0.0", - "resolved": "https://registry.npmjs.org/readline2/-/readline2-1.0.1.tgz" - }, - "repeat-string": { - "version": "1.5.2", - "from": "repeat-string@>=1.5.2 <2.0.0", - "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.5.2.tgz" - }, - "repeating": { - "version": "1.1.3", - "from": "repeating@>=1.1.3 <2.0.0", - "resolved": "https://registry.npmjs.org/repeating/-/repeating-1.1.3.tgz" - }, - "restore-cursor": { - "version": "1.0.1", - "from": "restore-cursor@>=1.0.1 <2.0.0", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-1.0.1.tgz" - }, - "right-align": { - "version": "0.1.3", - "from": "right-align@>=0.1.1 <0.2.0", - "resolved": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz" - }, - "rimraf": { - "version": "2.5.1", - "from": "rimraf@>=2.2.8 <3.0.0", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.5.1.tgz", - "dependencies": { - "glob": { - "version": "6.0.4", - "from": "glob@>=6.0.1 <7.0.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-6.0.4.tgz" - } - } - }, - "run-async": { - "version": "0.1.0", - "from": "run-async@>=0.1.0 <0.2.0", - "resolved": "https://registry.npmjs.org/run-async/-/run-async-0.1.0.tgz" - }, - "rx-lite": { - "version": "3.1.2", - "from": "rx-lite@>=3.1.2 <4.0.0", - "resolved": "https://registry.npmjs.org/rx-lite/-/rx-lite-3.1.2.tgz" - }, - "shelljs": { - "version": "0.5.3", - "from": "shelljs@>=0.5.3 <0.6.0", - "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.5.3.tgz" - }, - "source-map": { - "version": "0.4.4", - "from": "source-map@>=0.4.4 <0.5.0", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz" - }, - "sprintf-js": { - "version": "1.0.3", - "from": "sprintf-js@>=1.0.2 <1.1.0", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz" - }, - "string_decoder": { - "version": "0.10.31", - "from": "string_decoder@>=0.10.0 <0.11.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz" - }, - "string-width": { - "version": "1.0.1", - "from": "string-width@>=1.0.1 <2.0.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.1.tgz" - }, - "strip-ansi": { - "version": "3.0.0", - "from": "strip-ansi@>=3.0.0 <4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.0.tgz" - }, - "strip-json-comments": { - "version": "1.0.4", - "from": "strip-json-comments@>=1.0.1 <1.1.0", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-1.0.4.tgz" - }, - "supports-color": { - "version": "2.0.0", - "from": "supports-color@>=2.0.0 <3.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz" - }, - "text-table": { - "version": "0.2.0", - "from": "text-table@>=0.2.0 <0.3.0", - "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz" - }, - "through": { - "version": "2.3.8", - "from": "through@>=2.3.6 <3.0.0", - "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz" - }, - "to-fast-properties": { - "version": "1.0.1", - "from": "to-fast-properties@>=1.0.1 <2.0.0", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.1.tgz" - }, - "tryit": { - "version": "1.0.2", - "from": "tryit@>=1.0.1 <2.0.0", - "resolved": "https://registry.npmjs.org/tryit/-/tryit-1.0.2.tgz" - }, - "type-check": { - "version": "0.3.2", - "from": "type-check@>=0.3.1 <0.4.0", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz" - }, - "typedarray": { - "version": "0.0.6", - "from": "typedarray@>=0.0.5 <0.1.0", - "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz" - }, - "uglify-js": { - "version": "2.6.1", - "from": "uglify-js@>=2.6.0 <3.0.0", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.6.1.tgz", - "dependencies": { - "async": { - "version": "0.2.10", - "from": "async@>=0.2.6 <0.3.0", - "resolved": "https://registry.npmjs.org/async/-/async-0.2.10.tgz" - }, - "source-map": { - "version": "0.5.3", - "from": "source-map@>=0.5.1 <0.6.0", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.3.tgz" - } - } - }, - "uglify-to-browserify": { - "version": "1.0.2", - "from": "uglify-to-browserify@>=1.0.0 <1.1.0", - "resolved": "https://registry.npmjs.org/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz" - }, - "user-home": { - "version": "2.0.0", - "from": "user-home@>=2.0.0 <3.0.0", - "resolved": "https://registry.npmjs.org/user-home/-/user-home-2.0.0.tgz" - }, - "util-deprecate": { - "version": "1.0.2", - "from": "util-deprecate@>=1.0.1 <1.1.0", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz" - }, - "window-size": { - "version": "0.1.0", - "from": "window-size@0.1.0", - "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz" - }, - "wordwrap": { - "version": "0.0.3", - "from": "wordwrap@>=0.0.2 <0.1.0", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz" - }, - "wrappy": { - "version": "1.0.1", - "from": "wrappy@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.1.tgz" - }, - "write": { - "version": "0.2.1", - "from": "write@>=0.2.1 <0.3.0", - "resolved": "https://registry.npmjs.org/write/-/write-0.2.1.tgz" - }, - "xml-escape": { - "version": "1.0.0", - "from": "xml-escape@>=1.0.0 <1.1.0", - "resolved": "https://registry.npmjs.org/xml-escape/-/xml-escape-1.0.0.tgz" - }, - "xtend": { - "version": "4.0.1", - "from": "xtend@>=4.0.0 <5.0.0", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz" - }, - "yargs": { - "version": "3.10.0", - "from": "yargs@>=3.10.0 <3.11.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz" - } - } -} diff --git a/spec/dummy/package.json b/spec/dummy/package.json index 177ff7c88..c2f52a7ca 100644 --- a/spec/dummy/package.json +++ b/spec/dummy/package.json @@ -37,9 +37,7 @@ "url": "https://github.com/shakacode/react_on_rails/issues" }, "devDependencies": { - "babel-eslint": "^5.0.0-beta6", - "eslint": "^1.10.3", - "eslint-config-airbnb": "^3.1.0", - "eslint-config-shakacode": "0.0.1" + }, + "dependencies": { } } diff --git a/spec/dummy/spec/features/integration_spec.rb b/spec/dummy/spec/features/integration_spec.rb index ba89efadc..87b1eb230 100644 --- a/spec/dummy/spec/features/integration_spec.rb +++ b/spec/dummy/spec/features/integration_spec.rb @@ -183,7 +183,7 @@ def change_text_expect_dom_selector(dom_selector) scenario "Type in one component changes the other component" do expect(current_path).to eq(url) new_text = "John Doe" - new_text_2 = "Jane Smith" + new_text2 = "Jane Smith" within("#ReduxSharedStoreApp-react-component-0") do find("input").set new_text within("h3") do @@ -194,11 +194,11 @@ def change_text_expect_dom_selector(dom_selector) within("h3") do is_expected.to have_content new_text end - find("input").set new_text_2 + find("input").set new_text2 end within("#ReduxSharedStoreApp-react-component-0") do within("h3") do - is_expected.to have_content new_text_2 + is_expected.to have_content new_text2 end end end diff --git a/spec/react_on_rails/support/generator_spec_helper.rb b/spec/react_on_rails/support/generator_spec_helper.rb index 9623e8f31..5d026f55b 100644 --- a/spec/react_on_rails/support/generator_spec_helper.rb +++ b/spec/react_on_rails/support/generator_spec_helper.rb @@ -23,11 +23,12 @@ def simulate_existing_rails_files(options) simulate_existing_file("config/routes.rb", "Rails.application.routes.draw do\nend\n") simulate_existing_file("config/application.rb", "module Gentest\nclass Application < Rails::Application\nend\nend)") - if options.fetch(:spec, true) - simulate_existing_dir("spec") - simulate_existing_file("spec/rails_helper.rb", - "RSpec.configure do |config|\nend\n") - end + + return unless options.fetch(:spec, true) + + simulate_existing_dir("spec") + simulate_existing_file("spec/rails_helper.rb", + "RSpec.configure do |config|\nend\n") end def simulate_existing_assets_files(options)