react_on_rails 12.0.2 → 12.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (101) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +12 -2
  3. data/.eslintrc +2 -1
  4. data/.github/workflows/lint-js-and-ruby.yml +53 -0
  5. data/.github/workflows/main.yml +178 -0
  6. data/.github/workflows/package-js-tests.yml +35 -0
  7. data/.github/workflows/rspec-package-specs.yml +45 -0
  8. data/.prettierrc +0 -3
  9. data/.rubocop.yml +46 -38
  10. data/CHANGELOG.md +35 -12
  11. data/CONTRIBUTING.md +4 -3
  12. data/Gemfile +1 -33
  13. data/Gemfile.development_dependencies +51 -0
  14. data/README.md +63 -55
  15. data/docs/{basics → additional-details}/generator-details.md +1 -6
  16. data/docs/{outdated → additional-details}/manual-installation-overview.md +6 -6
  17. data/docs/{basics → additional-details}/migrating-from-react-rails.md +0 -0
  18. data/docs/{additional-reading → additional-details}/recommended-project-structure.md +0 -0
  19. data/docs/{additional-reading → additional-details}/updating-dependencies.md +0 -0
  20. data/docs/additional-details/upgrade-webpacker-v3-to-v4.md +10 -0
  21. data/docs/api/javascript-api.md +2 -2
  22. data/docs/api/redux-store-api.md +3 -3
  23. data/docs/api/view-helpers-api.md +7 -8
  24. data/docs/basics/client-vs-server-rendering.md +3 -3
  25. data/docs/basics/configuration.md +42 -25
  26. data/docs/basics/deployment.md +2 -2
  27. data/docs/basics/hmr-and-hot-reloading-with-the-webpack-dev-server.md +16 -14
  28. data/docs/{outdated → basics}/how-react-on-rails-works.md +8 -9
  29. data/docs/basics/installation-into-an-existing-rails-app.md +13 -6
  30. data/docs/basics/react-server-rendering.md +3 -3
  31. data/docs/basics/rspec-configuration.md +10 -10
  32. data/docs/{tutorial.md → basics/tutorial.md} +23 -31
  33. data/docs/basics/upgrading-react-on-rails.md +32 -12
  34. data/docs/basics/webpack-configuration.md +4 -6
  35. data/docs/contributor-info/linters.md +5 -6
  36. data/docs/contributor-info/pull-requests.md +2 -4
  37. data/docs/contributor-info/releasing.md +1 -1
  38. data/docs/{additional-reading → deployment}/elastic-beanstalk.md +0 -0
  39. data/docs/{basics → deployment}/heroku-deployment.md +0 -0
  40. data/docs/home.md +382 -0
  41. data/docs/{additional-reading → javascript}/angular-js-integration-migration.md +0 -0
  42. data/docs/{additional-reading → javascript}/asset-pipeline.md +0 -0
  43. data/docs/{additional-reading → javascript}/capistrano-deployment.md +0 -0
  44. data/docs/{outdated → javascript}/code-splitting.md +5 -5
  45. data/docs/{additional-reading → javascript}/converting-from-custom-webpack-config-to-rails-webpacker-config.md +3 -3
  46. data/docs/{additional-reading → javascript}/credits.md +0 -0
  47. data/docs/{additional-reading → javascript}/foreman-issues.md +0 -0
  48. data/docs/{additional-reading → javascript}/images.md +5 -6
  49. data/docs/{additional-reading → javascript}/node-dependencies-and-npm.md +0 -0
  50. data/docs/{additional-reading → javascript}/react-and-redux.md +0 -0
  51. data/docs/{additional-reading → javascript}/react-helmet.md +0 -0
  52. data/docs/{additional-reading → javascript}/react-router.md +0 -0
  53. data/docs/{additional-reading → javascript}/server-rendering-tips.md +0 -0
  54. data/docs/{additional-reading → javascript}/troubleshooting-when-using-webpacker.md +0 -0
  55. data/docs/{additional-reading → javascript}/webpack-v1-notes.md +0 -0
  56. data/docs/{additional-reading → javascript}/webpack.md +0 -0
  57. data/docs/{articles.md → misc/articles.md} +1 -1
  58. data/docs/misc/doctrine.md +5 -5
  59. data/docs/{coding-style → misc}/style.md +0 -0
  60. data/docs/{additional-reading → misc}/tips.md +0 -0
  61. data/docs/outdated/deferred-rendering.md +39 -0
  62. data/docs/outdated/rails-assets-relative-paths.md +3 -3
  63. data/docs/outdated/rails-assets.md +8 -8
  64. data/docs/outdated/rails3.md +2 -2
  65. data/docs/rails-webpacker-react-integration-options.md +182 -0
  66. data/docs/{additional-reading → rails}/convert-rails-5-api-only-app.md +1 -1
  67. data/docs/{additional-reading → rails}/rails-engine-integration.md +0 -0
  68. data/docs/{additional-reading → rails}/rails_view_rendering_from_inline_javascript.md +0 -0
  69. data/docs/{additional-reading → rails}/turbolinks.md +0 -0
  70. data/docs/testimonials/testimonials.md +6 -6
  71. data/lib/generators/react_on_rails/base_generator.rb +8 -1
  72. data/lib/generators/react_on_rails/dev_tests_generator.rb +1 -1
  73. data/lib/generators/react_on_rails/templates/dev_tests/spec/rails_helper.rb +8 -2
  74. data/lib/generators/react_on_rails/templates/dev_tests/spec/simplecov_helper.rb +1 -1
  75. data/lib/generators/react_on_rails/templates/dev_tests/spec/{features → system}/hello_world_spec.rb +2 -2
  76. data/lib/react_on_rails/configuration.rb +2 -0
  77. data/lib/react_on_rails/git_utils.rb +3 -3
  78. data/lib/react_on_rails/helper.rb +15 -9
  79. data/lib/react_on_rails/locales/base.rb +3 -3
  80. data/lib/react_on_rails/locales/to_js.rb +0 -4
  81. data/lib/react_on_rails/locales/to_json.rb +0 -4
  82. data/lib/react_on_rails/prerender_error.rb +1 -1
  83. data/lib/react_on_rails/server_rendering_pool/ruby_embedded_java_script.rb +6 -6
  84. data/lib/react_on_rails/test_helper.rb +2 -0
  85. data/lib/react_on_rails/test_helper/webpack_assets_compiler.rb +1 -1
  86. data/lib/react_on_rails/utils.rb +19 -3
  87. data/lib/react_on_rails/version.rb +1 -1
  88. data/lib/react_on_rails/webpacker_utils.rb +5 -1
  89. data/lib/tasks/assets.rake +20 -11
  90. data/package.json +24 -29
  91. data/rakelib/docker.rake +0 -5
  92. data/rakelib/lint.rake +3 -9
  93. data/rakelib/release.rake +27 -13
  94. data/rakelib/run_rspec.rake +10 -11
  95. data/rakelib/task_helpers.rb +16 -4
  96. data/react_on_rails.gemspec +3 -17
  97. data/yarn.lock +2272 -4960
  98. metadata +50 -225
  99. data/docs/additional-reading/upgrade-webpacker-v3-to-v4.md +0 -10
  100. data/docs/additional-reading/webpack-dev-server.md +0 -15
  101. data/ruby-lint.yml +0 -25
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2dacb7734da108abf8cf2a71bef68ba0b3049c2ef9d97aa46afc2ff9d53d4931
4
- data.tar.gz: 66074b4e21e05482d185560c5dda2541b6fe48c65888d7ac20706b4fb1fdc97a
3
+ metadata.gz: 1ff3b26eb01a206fc2f0a4e3a623463d88a4216c95a36c90b2fa55c5717a308c
4
+ data.tar.gz: 28b373978a8eb7502c018e03aeec17058ba65d6ced76a50aa932894c76f835df
5
5
  SHA512:
6
- metadata.gz: b8a29d39338fe7d8c79ec80c4b2cb95ddc3ecd280f2d2d70de9aa9fca92c01a1e5986c4c916580fd329ebcbce00ba25c3a9493d3e95d97167d3b49f66476b5da
7
- data.tar.gz: 684c86dc869ee2c7453ed6f9c551c976efbbe817159cc1ef2ea0ec75369018a814e478eca896c9e8d4a23f44e4ba5a8875868fcddab3db31428457226423cdc0
6
+ metadata.gz: ccb1f3c3d34b9ddbca43e8fe349a2cb3ee27892a1b52d9fe938070f2947ed402fef03d7328041f4f02a7d0b5401b90cdcdc1141230d96efd2ced6da2bc0668b7
7
+ data.tar.gz: 488f77190eee0fb0ca008535d7fbb8f5a43c380c31c9d4bdacf8d563383a0dc87b0e643eafde37a7d9ffc36e093d8a648c3c95f6b238bf567dcf76caf078027b
data/.circleci/config.yml CHANGED
@@ -2,7 +2,7 @@ version: 2
2
2
 
3
3
  aliases:
4
4
  - &docker-image
5
- - image: circleci/ruby:2.6-node-browsers
5
+ - image: circleci/ruby:2.7-node-browsers
6
6
 
7
7
  # Print critical data and executables versions.
8
8
  - &print-system-info
@@ -31,9 +31,9 @@ aliases:
31
31
  - &install-package-node-modules
32
32
  name: Install Node modules with Yarn for renderer package
33
33
  command: |
34
+ sudo yarn global add yalc
34
35
  yarn install --no-progress --no-emoji
35
36
  yarn run eslint -v
36
- sudo yarn global add yalc
37
37
 
38
38
  # Install/update Node modules for dummy app unless existing set of modules is satisfying Yarn.
39
39
  - &install-dummy-app-node-modules
@@ -274,6 +274,16 @@ jobs:
274
274
  # TODO -- need to leverage Circle CI containers
275
275
  command: |
276
276
  bundle exec rake run_rspec:all_dummy
277
+ # The following step will run only if the main job is finished successfully.
278
+ # Build hook is triggered by curl command described here https://docs.netlify.com/configure-builds/build-hooks/
279
+ # NETLIFY_HOOK is an environment variable on CircleCI to keep sensitive data outside the repo
280
+ - run:
281
+ name: Deploy SC website
282
+ command: |
283
+ if [ $CIRCLE_BRANCH = "master" ]; then
284
+ curl -X POST -d '{}' ${NETLIFY_HOOK}
285
+ fi
286
+ when: on_success
277
287
  - store_test_results:
278
288
  path: ~/rspec
279
289
  - store_artifacts:
data/.eslintrc CHANGED
@@ -1,4 +1,3 @@
1
- ---
2
1
  extends:
3
2
  - eslint-config-shakacode
4
3
  - prettier
@@ -32,8 +31,10 @@ overrides:
32
31
  - "@typescript-eslint"
33
32
  rules:
34
33
  "@typescript-eslint/no-namespace": 0
34
+ "@typescript-eslint/no-shadow": ["error"]
35
35
 
36
36
  rules:
37
+ no-shadow: 0
37
38
  no-console: 0
38
39
  function-paren-newline: 0
39
40
  object-curly-newline: 0
@@ -0,0 +1,53 @@
1
+ name: Lint JS and Ruby
2
+
3
+ on: [push, pull_request]
4
+
5
+ jobs:
6
+ build:
7
+ strategy:
8
+ matrix:
9
+ ruby: [2.7]
10
+ node: [14]
11
+ runs-on: ubuntu-latest
12
+ steps:
13
+ - uses: actions/checkout@v2
14
+ - name: Setup Ruby
15
+ uses: ruby/setup-ruby@v1
16
+ with:
17
+ ruby-version: ${{ matrix.ruby }}
18
+ - name: Setup Node
19
+ uses: actions/setup-node@v2-beta
20
+ with:
21
+ node-version: ${{ matrix.node }}
22
+ - name: Print system information
23
+ run: |
24
+ echo "Linux release: "; cat /etc/issue
25
+ echo "Current user: "; whoami
26
+ echo "Current directory: "; pwd
27
+ echo "Ruby version: "; ruby -v
28
+ echo "Node version: "; node -v
29
+ echo "Yarn version: "; yarn --version
30
+ echo "Bundler version: "; bundle --version
31
+ - name: Save root node_modules to cache
32
+ uses: actions/cache@v2
33
+ with:
34
+ path: node_modules
35
+ key: v4-package-node-modules-cache-${{ hashFiles('yarn.lock') }}
36
+ - name: Save root ruby gems to cache
37
+ uses: actions/cache@v2
38
+ with:
39
+ path: vendor/bundle
40
+ key: v4-package-app-gem-cache-${{ hashFiles('react_on_rails.gemspec') }}
41
+ - name: Install Node modules with Yarn for renderer package
42
+ run: |
43
+ yarn install --no-progress --no-emoji
44
+ yarn run eslint -v
45
+ sudo yarn global add yalc
46
+ - name: Install Ruby Gems for package
47
+ run: bundle check --path=vendor/bundle || bundle install --path=vendor/bundle --jobs=4 --retry=3
48
+ - name: Linting of Ruby
49
+ run: bundle exec rubocop
50
+ - name: Linting of JS
51
+ run: yarn start lint
52
+ - name: Check formatting
53
+ run: yarn start format.listDifferent
@@ -0,0 +1,178 @@
1
+ name: Main test
2
+
3
+ on: [push, pull_request]
4
+
5
+ jobs:
6
+ build-dummy-app-webpack-test-bundles:
7
+ strategy:
8
+ matrix:
9
+ ruby: [2.7]
10
+ node: [14]
11
+ runs-on: ubuntu-latest
12
+ steps:
13
+ - uses: actions/checkout@v2
14
+ - name: Setup Ruby
15
+ uses: ruby/setup-ruby@v1
16
+ with:
17
+ ruby-version: ${{ matrix.ruby }}
18
+ - name: Setup Node
19
+ uses: actions/setup-node@v2-beta
20
+ with:
21
+ node-version: ${{ matrix.node }}
22
+ - name: Print system information
23
+ run: |
24
+ echo "Linux release: "; cat /etc/issue
25
+ echo "Current user: "; whoami
26
+ echo "Current directory: "; pwd
27
+ echo "Ruby version: "; ruby -v
28
+ echo "Node version: "; node -v
29
+ echo "Yarn version: "; yarn --version
30
+ echo "Bundler version: "; bundle --version
31
+ - name: Save root node_modules to cache
32
+ uses: actions/cache@v2
33
+ with:
34
+ path: node_modules
35
+ key: v4-package-node-modules-cache-${{ hashFiles('yarn.lock') }}
36
+ - name: Install Node modules with Yarn for renderer package
37
+ run: |
38
+ yarn install --no-progress --no-emoji
39
+ yarn run eslint -v
40
+ sudo yarn global add yalc
41
+ - name: yalc publish for react-on-rails
42
+ run: yalc publish
43
+ - name: Save spec/dummy/node_modules to cache
44
+ uses: actions/cache@v2
45
+ with:
46
+ path: spec/dummy/node_modules
47
+ key: v4-dummy-app-node-modules-cache-${{ hashFiles('spec/dummy/yarn.lock') }}
48
+ - name: yalc add react-on-rails
49
+ run: cd spec/dummy && yalc add react-on-rails
50
+ - name: Install Node modules with Yarn for dummy app
51
+ run: cd spec/dummy && yarn install --no-progress --no-emoji
52
+ - name: Save dummy app ruby gems to cache
53
+ uses: actions/cache@v2
54
+ with:
55
+ path: spec/dummy/vendor/bundle
56
+ key: v4-dummy-app-gem-cache-${{ hashFiles('spec/dummy/Gemfile.lock') }}
57
+ - name: Install Ruby Gems for dummy app
58
+ run: cd spec/dummy && bundle check --path=vendor/bundle || bundle install --path=vendor/bundle --jobs=4 --retry=3
59
+ - name: Build test bundles for dummy app
60
+ run: cd spec/dummy && yarn run build:test
61
+ - id: get-sha
62
+ run: echo "::set-output name=sha::$(git rev-parse HEAD)"
63
+ - name: Save test webpack bundles to cache (for build number checksum used by rspec job)
64
+ uses: actions/cache@v2
65
+ with:
66
+ path: spec/dummy/public/webpack
67
+ key: v4-dummy-app-webpack-bundle-${{ steps.get-sha.outputs.sha }}
68
+
69
+ main:
70
+ needs: build-dummy-app-webpack-test-bundles
71
+ strategy:
72
+ matrix:
73
+ ruby: [2.7]
74
+ node: [14]
75
+ rake_task: ['run_rspec:all_dummy', 'run_rspec:all_but_examples', 'run_rspec:examples']
76
+ runs-on: ubuntu-latest
77
+ steps:
78
+ - uses: actions/checkout@v2
79
+ - name: Setup Ruby
80
+ uses: ruby/setup-ruby@v1
81
+ with:
82
+ ruby-version: ${{ matrix.ruby }}
83
+ - name: Setup Node
84
+ uses: actions/setup-node@v2-beta
85
+ with:
86
+ node-version: ${{ matrix.node }}
87
+ - name: Print system information
88
+ run: |
89
+ echo "Linux release: "; cat /etc/issue
90
+ echo "Current user: "; whoami
91
+ echo "Current directory: "; pwd
92
+ echo "Ruby version: "; ruby -v
93
+ echo "Node version: "; node -v
94
+ echo "Yarn version: "; yarn --version
95
+ echo "Bundler version: "; bundle --version
96
+ - name: Save root node_modules to cache
97
+ uses: actions/cache@v2
98
+ with:
99
+ path: node_modules
100
+ key: v4-package-node-modules-cache-${{ hashFiles('yarn.lock') }}
101
+ - name: Save root ruby gems to cache
102
+ uses: actions/cache@v2
103
+ with:
104
+ path: vendor/bundle
105
+ key: v4-package-app-gem-cache-${{ hashFiles('react_on_rails.gemspec') }}
106
+ - name: Save dummy app ruby gems to cache
107
+ uses: actions/cache@v2
108
+ with:
109
+ path: spec/dummy/vendor/bundle
110
+ key: v4-dummy-app-gem-cache-${{ hashFiles('spec/dummy/Gemfile.lock') }}
111
+ - name: Save spec/dummy/node_modules to cache
112
+ uses: actions/cache@v2
113
+ with:
114
+ path: spec/dummy/node_modules
115
+ key: v4-dummy-app-node-modules-cache-${{ hashFiles('spec/dummy/yarn.lock') }}
116
+ - id: get-sha
117
+ run: echo "::set-output name=sha::$(git rev-parse HEAD)"
118
+ - name: Save test webpack bundles to cache (for build number checksum used by rspec job)
119
+ uses: actions/cache@v2
120
+ with:
121
+ path: spec/dummy/public/webpack
122
+ key: v4-dummy-app-webpack-bundle-${{ steps.get-sha.outputs.sha }}
123
+
124
+ - name: Install Node modules with Yarn for renderer package
125
+ run: |
126
+ yarn install --no-progress --no-emoji
127
+ yarn run eslint -v
128
+ sudo yarn global add yalc
129
+ - name: yalc publish for react-on-rails
130
+ run: yalc publish
131
+ - name: yalc add react-on-rails
132
+ run: cd spec/dummy && yalc add react-on-rails
133
+ - name: Install Ruby Gems for package
134
+ run: bundle check --path=vendor/bundle || bundle install --path=vendor/bundle --jobs=4 --retry=3
135
+ - name: Install Ruby Gems for dummy app
136
+ run: cd spec/dummy && bundle check --path=vendor/bundle || bundle install --path=vendor/bundle --jobs=4 --retry=3
137
+ - name: Ensure minimum required Chrome version
138
+ run: |
139
+ echo -e "Already installed $(google-chrome --version)\n"
140
+ MINIMUM_REQUIRED_CHROME_VERSION=75
141
+ INSTALLED_CHROME_MAJOR_VERSION="$(google-chrome --version | tr ' .' '\t' | cut -f3)"
142
+ if [[ $INSTALLED_CHROME_MAJOR_VERSION < $MINIMUM_REQUIRED_CHROME_VERSION ]]; then
143
+ wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
144
+ sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list'
145
+ sudo apt-get update
146
+ sudo apt-get install google-chrome-stable
147
+ echo -e "\nInstalled $(google-chrome --version)"
148
+ fi
149
+ - name: Touch webpack bundles
150
+ run: touch spec/dummy/public/webpack/test/*
151
+ - name: Install yalc globally
152
+ run: sudo yarn global add yalc
153
+ - name: Increase the amount of inotify watchers
154
+ run: echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
155
+ - name: Prep for CI
156
+ run: bundle exec rake prepare_for_ci
157
+ - name: Main CI
158
+ run: bundle exec rake ${{ matrix.rake_task }}
159
+ - name: Store test results
160
+ uses: actions/upload-artifact@v2
161
+ with:
162
+ name: main-rspec
163
+ path: ~/rspec
164
+ - name: Store artifacts
165
+ uses: actions/upload-artifact@v2
166
+ with:
167
+ name: dummy-app-capybara
168
+ path: spec/dummy/tmp/capybara
169
+ - name: Store artifacts
170
+ uses: actions/upload-artifact@v2
171
+ with:
172
+ name: dummy-app-test-log
173
+ path: spec/dummy/log/test.log
174
+ - name: Store artifacts
175
+ uses: actions/upload-artifact@v2
176
+ with:
177
+ name: dummy-app-yarn-log
178
+ path: spec/dummy/yarn-error.log
@@ -0,0 +1,35 @@
1
+ name: JS unit tests for Renderer package
2
+
3
+ on: [push, pull_request]
4
+
5
+ jobs:
6
+ build:
7
+ strategy:
8
+ matrix:
9
+ node: [12, 14]
10
+ runs-on: ubuntu-latest
11
+ steps:
12
+ - uses: actions/checkout@v2
13
+ - name: Setup Node
14
+ uses: actions/setup-node@v2-beta
15
+ with:
16
+ node-version: ${{ matrix.node }}
17
+ - name: Print system information
18
+ run: |
19
+ echo "Linux release: "; cat /etc/issue
20
+ echo "Current user: "; whoami
21
+ echo "Current directory: "; pwd
22
+ echo "Node version: "; node -v
23
+ echo "Yarn version: "; yarn --version
24
+ - name: Save root node_modules to cache
25
+ uses: actions/cache@v2
26
+ with:
27
+ path: node_modules
28
+ key: v4-package-node-modules-cache-${{ hashFiles('yarn.lock') }}
29
+ - name: Install Node modules with Yarn for renderer package
30
+ run: |
31
+ yarn install --no-progress --no-emoji
32
+ yarn run eslint -v
33
+ sudo yarn global add yalc
34
+ - name: Run JS unit tests for Renderer package
35
+ run: yarn test
@@ -0,0 +1,45 @@
1
+ name: Rspec test for gem
2
+
3
+ on: [push, pull_request]
4
+
5
+ jobs:
6
+ build:
7
+ strategy:
8
+ matrix:
9
+ ruby: [2.7]
10
+ node: [14]
11
+ runs-on: ubuntu-latest
12
+ steps:
13
+ - uses: actions/checkout@v2
14
+ - name: Setup Ruby
15
+ uses: ruby/setup-ruby@v1
16
+ with:
17
+ ruby-version: ${{ matrix.ruby }}
18
+ - name: Print system information
19
+ run: |
20
+ echo "Linux release: "; cat /etc/issue
21
+ echo "Current user: "; whoami
22
+ echo "Current directory: "; pwd
23
+ echo "Ruby version: "; ruby -v
24
+ echo "Node version: "; node -v
25
+ echo "Yarn version: "; yarn --version
26
+ echo "Bundler version: "; bundle --version
27
+ - name: Save root ruby gems to cache
28
+ uses: actions/cache@v2
29
+ with:
30
+ path: vendor/bundle
31
+ key: v4-package-app-gem-cache-${{ hashFiles('react_on_rails.gemspec') }}
32
+ - name: Install Ruby Gems for package
33
+ run: bundle check --path=vendor/bundle || bundle install --path=vendor/bundle --jobs=4 --retry=3
34
+ - name: Run rspec tests
35
+ run: bundle exec rspec spec/react_on_rails
36
+ - name: Store test results
37
+ uses: actions/upload-artifact@v2
38
+ with:
39
+ name: main-rspec
40
+ path: ~/rspec
41
+ - name: Store artifacts
42
+ uses: actions/upload-artifact@v2
43
+ with:
44
+ name: main-test-log
45
+ path: log/test.log
data/.prettierrc CHANGED
@@ -8,9 +8,6 @@ bracketSpacing: true
8
8
  jsxBracketSameLine: false
9
9
  parser: flow
10
10
 
11
- extends:
12
- - tslint-config-prettier
13
-
14
11
  overrides:
15
12
  - files: "*.@(css|scss)"
16
13
  options:
data/.rubocop.yml CHANGED
@@ -1,7 +1,11 @@
1
1
  # This is the configuration used to check the rubocop source code.
2
2
  # Check out: https://github.com/bbatsov/rubocop
3
+ require:
4
+ - rubocop-performance
5
+ - rubocop-rspec
3
6
 
4
7
  AllCops:
8
+ NewCops: enable
5
9
  DisplayCopNames: true
6
10
  TargetRubyVersion: 2.5
7
11
 
@@ -13,34 +17,25 @@ AllCops:
13
17
  - '**/*.rake'
14
18
 
15
19
  Exclude:
16
- - 'vendor/**/*'
17
- - 'spec/fixtures/**/*'
18
- - 'node_modules/**/.*'
19
- - 'node_modules/**/*'
20
+ <% `git status --ignored --porcelain`.lines.grep(/^!! /).each do |path| %>
21
+ - <%= path.sub(/^!! /, '') %>
22
+ <% end %>
23
+ - '**/*.js'
24
+ - '**/node_modules/**/*'
25
+ - '**/public/**/*'
26
+ - '**/tmp/**/*'
20
27
  - 'coverage/**/*'
21
- - 'db/**/*'
22
- - 'db/schema.rb'
23
- - 'db/seeds.rb'
24
- - 'client/node_modules/**/*.*'
25
- - 'client/node_modules/**/.*'
26
- - 'bin/**/*'
27
- - !ruby/regexp /old_and_unused\.rb$/
28
- - 'spec/react_on_rails/dummy-for-generators/**/*'
29
- - 'spec/dummy/Procfile.*'
30
- - 'spec/dummy/bin/**/*'
31
- - 'spec/dummy/node_modules/**/*'
32
- - 'spec/dummy/node_modules/**/.*'
33
- - 'gen-examples/examples/**/.*'
34
28
  - 'gen-examples/examples/**/*'
29
+ - 'node_modules/**/*'
30
+ - 'spec/dummy/bin/*'
31
+ - 'spec/fixtures/**/*'
32
+ - 'spec/react_on_rails/dummy-for-generators/**/*'
33
+ - 'tmp/**/*'
34
+ - 'vendor/**/*'
35
35
 
36
36
  Naming/FileName:
37
37
  Exclude:
38
38
  - 'Gemfile'
39
- - 'spec/dummy/Gemfile'
40
-
41
- # Turn off until we require 2.3 ruby
42
- Style/SafeNavigation:
43
- Enabled: false
44
39
 
45
40
  Layout/LineLength:
46
41
  Max: 120
@@ -94,28 +89,41 @@ Metrics/ModuleLength:
94
89
  Naming/RescuedExceptionsVariableName:
95
90
  Enabled: false
96
91
 
97
- Style/GlobalVars:
92
+ RSpec/AnyInstance:
98
93
  Exclude:
99
- - 'spec/dummy/config/environments/development.rb'
94
+ - 'spec/react_on_rails/git_utils_spec.rb'
95
+ - 'spec/react_on_rails/locales_to_js_spec.rb'
100
96
 
101
- Style/FrozenStringLiteralComment:
102
- EnforcedStyle: always
97
+ RSpec/DescribeClass:
98
+ Enabled: false
103
99
 
104
- Layout/EmptyLinesAroundAttributeAccessor:
105
- Enabled: true
100
+ RSpec/ExampleLength:
101
+ Enabled: false
106
102
 
107
- Layout/SpaceAroundMethodCallOperator:
108
- Enabled: true
103
+ RSpec/MessageSpies:
104
+ Enabled: false
109
105
 
110
- Lint/RaiseException:
111
- Enabled: true
106
+ RSpec/NestedGroups:
107
+ Max: 4
112
108
 
113
- Lint/StructNewOverride:
114
- Enabled: true
109
+ RSpec/BeforeAfterAll:
110
+ Exclude:
111
+ - 'spec/react_on_rails/generators/dev_tests_generator_spec.rb'
112
+ - 'spec/react_on_rails/generators/install_generator_spec.rb'
115
113
 
116
- Style/ExponentialNotation:
117
- Enabled: true
114
+ RSpec/MessageChain:
115
+ Enabled: false
118
116
 
119
- Style/SlicingWithRange:
120
- Enabled: true
117
+ RSpec/MultipleExpectations:
118
+ Enabled: false
119
+
120
+ RSpec/MultipleDescribes:
121
+ Exclude:
122
+ - 'spec/dummy/spec/system/integration_spec.rb'
123
+
124
+ RSpec/MultipleMemoizedHelpers:
125
+ Max: 12
121
126
 
127
+ Style/GlobalVars:
128
+ Exclude:
129
+ - 'spec/dummy/config/environments/development.rb'