react_on_rails 13.3.5 → 14.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +100 -62
- data/Gemfile.development_dependencies +10 -9
- data/README.md +7 -2
- data/lib/generators/react_on_rails/adapt_for_older_shakapacker_generator.rb +41 -0
- data/lib/generators/react_on_rails/base_generator.rb +13 -49
- data/lib/generators/react_on_rails/dev_tests_generator.rb +1 -1
- data/lib/generators/react_on_rails/generator_messages.rb +40 -0
- data/lib/generators/react_on_rails/install_generator.rb +21 -0
- data/lib/generators/react_on_rails/templates/base/base/Procfile.dev +2 -2
- data/lib/generators/react_on_rails/templates/base/base/Procfile.dev-static +2 -2
- data/lib/generators/react_on_rails/templates/base/base/config/initializers/react_on_rails.rb +2 -2
- data/lib/generators/react_on_rails/templates/base/base/config/{webpacker.yml → shakapacker.yml} +3 -3
- data/lib/generators/react_on_rails/templates/base/base/config/webpack/commonWebpackConfig.js.tt +3 -1
- data/lib/generators/react_on_rails/templates/dev_tests/spec/rails_helper.rb +2 -2
- data/lib/generators/react_on_rails/templates/dev_tests/spec/system/hello_world_spec.rb +1 -1
- data/lib/react_on_rails/configuration.rb +39 -25
- data/lib/react_on_rails/git_utils.rb +3 -3
- data/lib/react_on_rails/helper.rb +25 -13
- data/lib/react_on_rails/json_output.rb +0 -17
- data/lib/react_on_rails/locales/base.rb +4 -4
- data/lib/react_on_rails/locales/to_js.rb +1 -1
- data/lib/react_on_rails/packs_generator.rb +4 -4
- data/lib/react_on_rails/react_component/render_options.rb +1 -1
- data/lib/react_on_rails/server_rendering_pool/ruby_embedded_java_script.rb +10 -12
- data/lib/react_on_rails/test_helper/webpack_assets_status_checker.rb +3 -3
- data/lib/react_on_rails/test_helper.rb +2 -2
- data/lib/react_on_rails/utils.rb +2 -8
- data/lib/react_on_rails/version.rb +1 -1
- data/lib/react_on_rails/version_checker.rb +2 -2
- data/lib/react_on_rails/webpacker_utils.rb +6 -0
- data/lib/tasks/assets.rake +1 -1
- data/react_on_rails.gemspec +4 -4
- metadata +6 -131
- data/.bookignore +0 -15
- data/.circleci/config.yml +0 -338
- data/.coveralls.yml +0 -1
- data/.dockerignore +0 -2
- data/.eslintignore +0 -17
- data/.eslintrc +0 -53
- data/.github/FUNDING.yml +0 -1
- data/.github/ISSUE_TEMPLATE/bug_report.md +0 -23
- data/.github/ISSUE_TEMPLATE/feature_request.md +0 -20
- data/.github/PULL_REQUEST_TEMPLATE.md +0 -19
- data/.github/workflows/lint-js-and-ruby.yml +0 -54
- data/.github/workflows/main.yml +0 -183
- data/.github/workflows/package-js-tests.yml +0 -35
- data/.github/workflows/rspec-package-specs.yml +0 -46
- data/.gitignore +0 -33
- data/.npmignore +0 -22
- data/.prettierignore +0 -14
- data/.prettierrc +0 -20
- data/.rspec +0 -2
- data/.rubocop.yml +0 -134
- data/.scss-lint.yml +0 -205
- data/.travis.yml +0 -61
- data/book.json +0 -18
- data/docs/additional-details/generator-details.md +0 -56
- data/docs/additional-details/manual-installation-overview.md +0 -30
- data/docs/additional-details/migrating-from-react-rails.md +0 -17
- data/docs/additional-details/recommended-project-structure.md +0 -69
- data/docs/additional-details/updating-dependencies.md +0 -31
- data/docs/additional-details/upgrade-webpacker-v3-to-v4.md +0 -10
- data/docs/api/javascript-api.md +0 -99
- data/docs/api/redux-store-api.md +0 -102
- data/docs/api/view-helpers-api.md +0 -133
- data/docs/contributor-info/errors-with-hooks.md +0 -45
- data/docs/contributor-info/generator-testing.md +0 -11
- data/docs/contributor-info/linters.md +0 -68
- data/docs/contributor-info/pull-requests.md +0 -42
- data/docs/contributor-info/releasing.md +0 -76
- data/docs/deployment/elastic-beanstalk.md +0 -63
- data/docs/deployment/heroku-deployment.md +0 -35
- data/docs/getting-started.md +0 -195
- data/docs/guides/client-vs-server-rendering.md +0 -27
- data/docs/guides/configuration.md +0 -289
- data/docs/guides/deployment.md +0 -5
- data/docs/guides/file-system-based-automated-bundle-generation.md +0 -205
- data/docs/guides/hmr-and-hot-reloading-with-the-webpack-dev-server.md +0 -104
- data/docs/guides/how-react-on-rails-works.md +0 -44
- data/docs/guides/how-to-conditionally-server-render-based-on-device-type.md +0 -40
- data/docs/guides/how-to-use-different-files-for-client-and-server-rendering.md +0 -98
- data/docs/guides/i18n.md +0 -87
- data/docs/guides/installation-into-an-existing-rails-app.md +0 -66
- data/docs/guides/minitest-configuration.md +0 -31
- data/docs/guides/rails-webpacker-react-integration-options.md +0 -213
- data/docs/guides/react-on-rails-overview.md +0 -30
- data/docs/guides/react-server-rendering.md +0 -32
- data/docs/guides/render-functions-and-railscontext.md +0 -205
- data/docs/guides/rspec-configuration.md +0 -73
- data/docs/guides/tutorial.md +0 -374
- data/docs/guides/upgrading-react-on-rails.md +0 -304
- data/docs/guides/webpack-configuration.md +0 -42
- data/docs/home.md +0 -23
- data/docs/javascript/angular-js-integration-migration.md +0 -28
- data/docs/javascript/asset-pipeline.md +0 -12
- data/docs/javascript/capistrano-deployment.md +0 -18
- data/docs/javascript/code-splitting.md +0 -165
- data/docs/javascript/converting-from-custom-webpack-config-to-rails-webpacker-config.md +0 -10
- data/docs/javascript/credits.md +0 -10
- data/docs/javascript/foreman-issues.md +0 -15
- data/docs/javascript/images.md +0 -57
- data/docs/javascript/node-dependencies-and-npm.md +0 -19
- data/docs/javascript/react-and-redux.md +0 -36
- data/docs/javascript/react-helmet.md +0 -100
- data/docs/javascript/react-router.md +0 -90
- data/docs/javascript/server-rendering-tips.md +0 -55
- data/docs/javascript/troubleshooting-when-using-webpacker.md +0 -90
- data/docs/javascript/webpack-v1-notes.md +0 -23
- data/docs/javascript/webpack.md +0 -22
- data/docs/misc/articles.md +0 -20
- data/docs/misc/code_of_conduct.md +0 -13
- data/docs/misc/doctrine.md +0 -77
- data/docs/misc/style.md +0 -33
- data/docs/misc/tips.md +0 -10
- data/docs/outdated/deferred-rendering.md +0 -39
- data/docs/outdated/rails-assets-relative-paths.md +0 -195
- data/docs/outdated/rails-assets.md +0 -77
- data/docs/outdated/rails3.md +0 -9
- data/docs/rails/convert-rails-5-api-only-app.md +0 -19
- data/docs/rails/rails-engine-integration.md +0 -32
- data/docs/rails/rails_view_rendering_from_inline_javascript.md +0 -36
- data/docs/rails/turbolinks.md +0 -124
- data/docs/react-on-rails-pro/react-on-rails-pro.md +0 -43
- data/docs/testimonials/hvmn.md +0 -25
- data/docs/testimonials/resortpass.md +0 -13
- data/docs/testimonials/testimonials.md +0 -28
- data/jest.config.js +0 -4
- data/package-scripts.yml +0 -49
- data/package.json +0 -96
- data/rakelib/docker.rake +0 -26
- data/rakelib/dummy_apps.rake +0 -30
- data/rakelib/example_type.rb +0 -96
- data/rakelib/examples.rake +0 -64
- data/rakelib/examples_config.yml +0 -14
- data/rakelib/lint.rake +0 -30
- data/rakelib/node_package.rake +0 -15
- data/rakelib/release.rake +0 -92
- data/rakelib/run_rspec.rake +0 -103
- data/rakelib/task_helpers.rb +0 -62
- data/script/bootstrap +0 -33
- data/script/release +0 -3
- data/script/setup +0 -23
- data/script/test +0 -38
- data/webpackConfigLoader.js +0 -71
- data/yarn.lock +0 -7010
@@ -1,23 +0,0 @@
|
|
1
|
-
---
|
2
|
-
name: Bug report
|
3
|
-
about: Create a report to help us improve
|
4
|
-
title: ''
|
5
|
-
labels: ''
|
6
|
-
assignees: ''
|
7
|
-
|
8
|
-
---
|
9
|
-
|
10
|
-
A bug is a crash or incorrect behavior. If you have a debugging or troubleshooting question, please open [a discussion](https://github.com/shakacode/react_on_rails/discussions).
|
11
|
-
|
12
|
-
## Environment
|
13
|
-
|
14
|
-
1. Ruby version:
|
15
|
-
2. Rails version:
|
16
|
-
3. Webpacker version:
|
17
|
-
4. React on Rails version:
|
18
|
-
|
19
|
-
## Expected behavior
|
20
|
-
|
21
|
-
## Actual behavior
|
22
|
-
|
23
|
-
## Small, reproducible repo
|
@@ -1,20 +0,0 @@
|
|
1
|
-
---
|
2
|
-
name: Feature request
|
3
|
-
about: Suggest an idea for this project
|
4
|
-
title: ''
|
5
|
-
labels: ''
|
6
|
-
assignees: ''
|
7
|
-
|
8
|
-
---
|
9
|
-
|
10
|
-
**Is your feature request related to a problem? Please describe.**
|
11
|
-
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
12
|
-
|
13
|
-
**Describe the solution you'd like**
|
14
|
-
A clear and concise description of what you want to happen.
|
15
|
-
|
16
|
-
**Describe alternatives you've considered**
|
17
|
-
A clear and concise description of any alternative solutions or features you've considered.
|
18
|
-
|
19
|
-
**Additional context**
|
20
|
-
Add any other context or screenshots about the feature request here.
|
@@ -1,19 +0,0 @@
|
|
1
|
-
### Summary
|
2
|
-
|
3
|
-
_Remove this paragraph and provide a general description of the code changes in your pull
|
4
|
-
request... were there any bugs you had fixed? If so, mention them. If
|
5
|
-
these bugs have open GitHub issues, be sure to tag them here as well,
|
6
|
-
to keep the conversation linked together._
|
7
|
-
|
8
|
-
### Pull Request checklist
|
9
|
-
_Remove this line after checking all the items here. If the item is not applicable to the PR, both check it out and wrap it by `~`._
|
10
|
-
|
11
|
-
- [ ] Add/update test to cover these changes
|
12
|
-
- [ ] Update documentation
|
13
|
-
- [ ] Update CHANGELOG file
|
14
|
-
_Add the CHANGELOG entry at the top of the file._
|
15
|
-
|
16
|
-
### Other Information
|
17
|
-
|
18
|
-
_Remove this paragraph and mention any other important and relevant information such as benchmarks._
|
19
|
-
|
@@ -1,54 +0,0 @@
|
|
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-22.04
|
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
|
-
bundler: 2.4.9
|
19
|
-
- name: Setup Node
|
20
|
-
uses: actions/setup-node@v2-beta
|
21
|
-
with:
|
22
|
-
node-version: ${{ matrix.node }}
|
23
|
-
- name: Print system information
|
24
|
-
run: |
|
25
|
-
echo "Linux release: "; cat /etc/issue
|
26
|
-
echo "Current user: "; whoami
|
27
|
-
echo "Current directory: "; pwd
|
28
|
-
echo "Ruby version: "; ruby -v
|
29
|
-
echo "Node version: "; node -v
|
30
|
-
echo "Yarn version: "; yarn --version
|
31
|
-
echo "Bundler version: "; bundle --version
|
32
|
-
- name: Save root node_modules to cache
|
33
|
-
uses: actions/cache@v2
|
34
|
-
with:
|
35
|
-
path: node_modules
|
36
|
-
key: v5-package-node-modules-cache-${{ hashFiles('yarn.lock') }}
|
37
|
-
- name: Save root ruby gems to cache
|
38
|
-
uses: actions/cache@v2
|
39
|
-
with:
|
40
|
-
path: vendor/bundle
|
41
|
-
key: v5-package-app-gem-cache-${{ hashFiles('react_on_rails.gemspec') }}
|
42
|
-
- name: Install Node modules with Yarn for renderer package
|
43
|
-
run: |
|
44
|
-
yarn install --no-progress --no-emoji
|
45
|
-
yarn run eslint -v
|
46
|
-
sudo yarn global add yalc
|
47
|
-
- name: Install Ruby Gems for package
|
48
|
-
run: bundle check --path=vendor/bundle || bundle _2.4.9_ install --path=vendor/bundle --jobs=4 --retry=3
|
49
|
-
- name: Linting of Ruby
|
50
|
-
run: bundle exec rubocop
|
51
|
-
- name: Linting of JS
|
52
|
-
run: yarn start lint
|
53
|
-
- name: Check formatting
|
54
|
-
run: yarn start format.listDifferent
|
data/.github/workflows/main.yml
DELETED
@@ -1,183 +0,0 @@
|
|
1
|
-
name: Main test
|
2
|
-
|
3
|
-
on: [push]
|
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-22.04
|
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
|
-
bundler: 2.4.9
|
19
|
-
# libyaml-dev is needed for psych v5
|
20
|
-
# this gem depends on sdoc which depends on rdoc which depends on psych
|
21
|
-
- name: Fix dependency for libyaml-dev
|
22
|
-
run: sudo apt install libyaml-dev
|
23
|
-
- name: Setup Node
|
24
|
-
uses: actions/setup-node@v2-beta
|
25
|
-
with:
|
26
|
-
node-version: ${{ matrix.node }}
|
27
|
-
- name: Print system information
|
28
|
-
run: |
|
29
|
-
echo "Linux release: "; cat /etc/issue
|
30
|
-
echo "Current user: "; whoami
|
31
|
-
echo "Current directory: "; pwd
|
32
|
-
echo "Ruby version: "; ruby -v
|
33
|
-
echo "Node version: "; node -v
|
34
|
-
echo "Yarn version: "; yarn --version
|
35
|
-
echo "Bundler version: "; bundle --version
|
36
|
-
- name: Save root node_modules to cache
|
37
|
-
uses: actions/cache@v3
|
38
|
-
with:
|
39
|
-
path: node_modules
|
40
|
-
key: v5-package-node-modules-cache-${{ hashFiles('yarn.lock') }}
|
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: yalc publish for react-on-rails
|
47
|
-
run: yalc publish
|
48
|
-
- name: Save spec/dummy/node_modules to cache
|
49
|
-
uses: actions/cache@v3
|
50
|
-
with:
|
51
|
-
path: spec/dummy/node_modules
|
52
|
-
key: v5-dummy-app-node-modules-cache-${{ hashFiles('spec/dummy/yarn.lock') }}
|
53
|
-
- name: yalc add react-on-rails
|
54
|
-
run: cd spec/dummy && yalc add react-on-rails
|
55
|
-
- name: Install Node modules with Yarn for dummy app
|
56
|
-
run: cd spec/dummy && yarn install --no-progress --no-emoji
|
57
|
-
- name: Save dummy app ruby gems to cache
|
58
|
-
uses: actions/cache@v3
|
59
|
-
with:
|
60
|
-
path: spec/dummy/vendor/bundle
|
61
|
-
key: v5-dummy-app-gem-cache-${{ hashFiles('spec/dummy/Gemfile.lock') }}
|
62
|
-
- name: Install Ruby Gems for dummy app
|
63
|
-
run: cd spec/dummy && bundle lock --add-platform 'x86_64-linux' && bundle check --path=vendor/bundle || bundle _2.4.9_ install --path=vendor/bundle --jobs=4 --retry=3
|
64
|
-
- name: generate file system-based packs
|
65
|
-
run: cd spec/dummy && RAILS_ENV=test bundle exec rake react_on_rails:generate_packs
|
66
|
-
- name: Build test bundles for dummy app
|
67
|
-
run: cd spec/dummy && yarn run build:test
|
68
|
-
- id: get-sha
|
69
|
-
run: echo "::set-output name=sha::$(git rev-parse HEAD)"
|
70
|
-
- name: Save test webpack bundles to cache (for build number checksum used by rspec job)
|
71
|
-
uses: actions/cache/save@v3
|
72
|
-
with:
|
73
|
-
path: spec/dummy/public/webpack
|
74
|
-
key: v5-dummy-app-webpack-bundle-${{ steps.get-sha.outputs.sha }}
|
75
|
-
|
76
|
-
main:
|
77
|
-
needs: build-dummy-app-webpack-test-bundles
|
78
|
-
strategy:
|
79
|
-
matrix:
|
80
|
-
ruby: [2.7]
|
81
|
-
node: [14]
|
82
|
-
rake_task: ['run_rspec:all_but_examples', 'run_rspec:examples']
|
83
|
-
runs-on: ubuntu-22.04
|
84
|
-
steps:
|
85
|
-
- uses: actions/checkout@v2
|
86
|
-
- name: Setup Ruby
|
87
|
-
uses: ruby/setup-ruby@v1
|
88
|
-
with:
|
89
|
-
ruby-version: ${{ matrix.ruby }}
|
90
|
-
bundler: 2.4.9
|
91
|
-
- name: Setup Node
|
92
|
-
uses: actions/setup-node@v2-beta
|
93
|
-
with:
|
94
|
-
node-version: ${{ matrix.node }}
|
95
|
-
- name: Print system information
|
96
|
-
run: |
|
97
|
-
echo "Linux release: "; cat /etc/issue
|
98
|
-
echo "Current user: "; whoami
|
99
|
-
echo "Current directory: "; pwd
|
100
|
-
echo "Ruby version: "; ruby -v
|
101
|
-
echo "Node version: "; node -v
|
102
|
-
echo "Yarn version: "; yarn --version
|
103
|
-
echo "Bundler version: "; bundle --version
|
104
|
-
- name: Save root node_modules to cache
|
105
|
-
uses: actions/cache@v3
|
106
|
-
with:
|
107
|
-
path: node_modules
|
108
|
-
key: v5-package-node-modules-cache-${{ hashFiles('yarn.lock') }}
|
109
|
-
- name: Save root ruby gems to cache
|
110
|
-
uses: actions/cache@v3
|
111
|
-
with:
|
112
|
-
path: vendor/bundle
|
113
|
-
key: v5-package-app-gem-cache-${{ hashFiles('react_on_rails.gemspec') }}
|
114
|
-
- name: Save dummy app ruby gems to cache
|
115
|
-
uses: actions/cache@v3
|
116
|
-
with:
|
117
|
-
path: spec/dummy/vendor/bundle
|
118
|
-
key: v5-dummy-app-gem-cache-${{ hashFiles('spec/dummy/Gemfile.lock') }}
|
119
|
-
- name: Save spec/dummy/node_modules to cache
|
120
|
-
uses: actions/cache@v3
|
121
|
-
with:
|
122
|
-
path: spec/dummy/node_modules
|
123
|
-
key: v5-dummy-app-node-modules-cache-${{ hashFiles('spec/dummy/yarn.lock') }}
|
124
|
-
- id: get-sha
|
125
|
-
run: echo "::set-output name=sha::$(git rev-parse HEAD)"
|
126
|
-
- name: Save test webpack bundles to cache (for build number checksum used by rspec job)
|
127
|
-
uses: actions/cache@v3
|
128
|
-
with:
|
129
|
-
path: spec/dummy/public/webpack
|
130
|
-
key: v5-dummy-app-webpack-bundle-${{ steps.get-sha.outputs.sha }}
|
131
|
-
- name: Install Node modules with Yarn for renderer package
|
132
|
-
run: |
|
133
|
-
yarn install --no-progress --no-emoji
|
134
|
-
yarn run eslint -v
|
135
|
-
sudo yarn global add yalc
|
136
|
-
- name: yalc publish for react-on-rails
|
137
|
-
run: yalc publish
|
138
|
-
- name: yalc add react-on-rails
|
139
|
-
run: cd spec/dummy && yalc add react-on-rails
|
140
|
-
- name: Install Ruby Gems for package
|
141
|
-
run: bundle lock --add-platform 'x86_64-linux' && bundle check --path=vendor/bundle || bundle install --path=vendor/bundle --jobs=4 --retry=3
|
142
|
-
- name: Install Ruby Gems for dummy app
|
143
|
-
run: cd spec/dummy && bundle lock --add-platform 'x86_64-linux' && bundle check --path=vendor/bundle || bundle _2.4.9_ install --path=vendor/bundle --jobs=4 --retry=3
|
144
|
-
- name: Ensure minimum required Chrome version
|
145
|
-
run: |
|
146
|
-
echo -e "Already installed $(google-chrome --version)\n"
|
147
|
-
MINIMUM_REQUIRED_CHROME_VERSION=75
|
148
|
-
INSTALLED_CHROME_MAJOR_VERSION="$(google-chrome --version | tr ' .' '\t' | cut -f3)"
|
149
|
-
if [[ $INSTALLED_CHROME_MAJOR_VERSION < $MINIMUM_REQUIRED_CHROME_VERSION ]]; then
|
150
|
-
wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
|
151
|
-
sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list'
|
152
|
-
sudo apt-get update
|
153
|
-
sudo apt-get install google-chrome-stable
|
154
|
-
echo -e "\nInstalled $(google-chrome --version)"
|
155
|
-
fi
|
156
|
-
- name: Install yalc globally
|
157
|
-
run: sudo yarn global add yalc
|
158
|
-
- name: Increase the amount of inotify watchers
|
159
|
-
run: echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
|
160
|
-
- name: generate file system-based packs
|
161
|
-
run: cd spec/dummy && RAILS_ENV=test bundle exec rake react_on_rails:generate_packs
|
162
|
-
- name: Main CI
|
163
|
-
run: bundle exec rake ${{ matrix.rake_task }}
|
164
|
-
- name: Store test results
|
165
|
-
uses: actions/upload-artifact@v2
|
166
|
-
with:
|
167
|
-
name: main-rspec
|
168
|
-
path: ~/rspec
|
169
|
-
- name: Store artifacts
|
170
|
-
uses: actions/upload-artifact@v2
|
171
|
-
with:
|
172
|
-
name: dummy-app-capybara
|
173
|
-
path: spec/dummy/tmp/capybara
|
174
|
-
- name: Store artifacts
|
175
|
-
uses: actions/upload-artifact@v2
|
176
|
-
with:
|
177
|
-
name: dummy-app-test-log
|
178
|
-
path: spec/dummy/log/test.log
|
179
|
-
- name: Store artifacts
|
180
|
-
uses: actions/upload-artifact@v2
|
181
|
-
with:
|
182
|
-
name: dummy-app-yarn-log
|
183
|
-
path: spec/dummy/yarn-error.log
|
@@ -1,35 +0,0 @@
|
|
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-22.04
|
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: v5-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
|
@@ -1,46 +0,0 @@
|
|
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-22.04
|
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
|
-
bundler: 2.4.9
|
19
|
-
- name: Print system information
|
20
|
-
run: |
|
21
|
-
echo "Linux release: "; cat /etc/issue
|
22
|
-
echo "Current user: "; whoami
|
23
|
-
echo "Current directory: "; pwd
|
24
|
-
echo "Ruby version: "; ruby -v
|
25
|
-
echo "Node version: "; node -v
|
26
|
-
echo "Yarn version: "; yarn --version
|
27
|
-
echo "Bundler version: "; bundle --version
|
28
|
-
- name: Save root ruby gems to cache
|
29
|
-
uses: actions/cache@v2
|
30
|
-
with:
|
31
|
-
path: vendor/bundle
|
32
|
-
key: v5-package-app-gem-cache-${{ hashFiles('react_on_rails.gemspec') }}
|
33
|
-
- name: Install Ruby Gems for package
|
34
|
-
run: bundle check --path=vendor/bundle || bundle install --path=vendor/bundle --jobs=4 --retry=3
|
35
|
-
- name: Run rspec tests
|
36
|
-
run: bundle exec rspec spec/react_on_rails
|
37
|
-
- name: Store test results
|
38
|
-
uses: actions/upload-artifact@v2
|
39
|
-
with:
|
40
|
-
name: main-rspec
|
41
|
-
path: ~/rspec
|
42
|
-
- name: Store artifacts
|
43
|
-
uses: actions/upload-artifact@v2
|
44
|
-
with:
|
45
|
-
name: main-test-log
|
46
|
-
path: log/test.log
|
data/.gitignore
DELETED
@@ -1,33 +0,0 @@
|
|
1
|
-
/.bundle/
|
2
|
-
/.yardoc
|
3
|
-
/Gemfile.lock
|
4
|
-
/_yardoc/
|
5
|
-
/coverage/
|
6
|
-
/doc/
|
7
|
-
/pkg/
|
8
|
-
/spec/reports/
|
9
|
-
/tmp/
|
10
|
-
*.gem
|
11
|
-
/vendor/
|
12
|
-
|
13
|
-
/spec/examples.txt
|
14
|
-
/spec/react_on_rails/dummy-for-generators/
|
15
|
-
|
16
|
-
# RVM
|
17
|
-
.ruby-version
|
18
|
-
.ruby-gemset
|
19
|
-
|
20
|
-
node_modules
|
21
|
-
|
22
|
-
/node_package/lib
|
23
|
-
|
24
|
-
yarn-debug.*
|
25
|
-
yarn-error.*
|
26
|
-
npm-debug.*
|
27
|
-
|
28
|
-
/gen-examples
|
29
|
-
|
30
|
-
.DS_Store
|
31
|
-
|
32
|
-
.yalc
|
33
|
-
yalc.lock
|
data/.npmignore
DELETED
@@ -1,22 +0,0 @@
|
|
1
|
-
CHANGELOG.md
|
2
|
-
Gemfile
|
3
|
-
README.md
|
4
|
-
app
|
5
|
-
coverage
|
6
|
-
docs
|
7
|
-
examples
|
8
|
-
node_modules
|
9
|
-
react_on_rails.gemspec
|
10
|
-
Dockerfile_tests
|
11
|
-
Gemfile.lock
|
12
|
-
Rakefile
|
13
|
-
bin
|
14
|
-
docker-compose.yml
|
15
|
-
etc
|
16
|
-
lib
|
17
|
-
rakelib
|
18
|
-
ruby-lint.yml
|
19
|
-
spec
|
20
|
-
node_modules
|
21
|
-
tmp
|
22
|
-
gen-examples
|
data/.prettierignore
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
node_modules/
|
2
|
-
package.json
|
3
|
-
tmp/
|
4
|
-
coverage/
|
5
|
-
**/app/assets/webpack/
|
6
|
-
gen-examples/examples/*
|
7
|
-
node_package/lib/*
|
8
|
-
spec/react_on_rails/dummy-for-generators/app/javascript/bundles/HelloWorld/*
|
9
|
-
bundle/
|
10
|
-
spec/dummy/lib/bs/**
|
11
|
-
spec/dummy/public
|
12
|
-
**/.yalc/**
|
13
|
-
**/generated/**
|
14
|
-
*.bs.js
|
data/.prettierrc
DELETED
@@ -1,20 +0,0 @@
|
|
1
|
-
printWidth: 110
|
2
|
-
tabWidth: 2
|
3
|
-
useTabs: false
|
4
|
-
semi: true
|
5
|
-
singleQuote: true
|
6
|
-
trailingComma: all
|
7
|
-
bracketSpacing: true
|
8
|
-
jsxBracketSameLine: false
|
9
|
-
parser: flow
|
10
|
-
|
11
|
-
overrides:
|
12
|
-
- files: "*.@(css|scss)"
|
13
|
-
options:
|
14
|
-
parser: css
|
15
|
-
singleQuote: false
|
16
|
-
printWidth: 120
|
17
|
-
- files: "*.@(json)"
|
18
|
-
options:
|
19
|
-
parser: json
|
20
|
-
printWidth: 100
|
data/.rspec
DELETED
data/.rubocop.yml
DELETED
@@ -1,134 +0,0 @@
|
|
1
|
-
# This is the configuration used to check the rubocop source code.
|
2
|
-
# Check out: https://github.com/bbatsov/rubocop
|
3
|
-
require:
|
4
|
-
- rubocop-performance
|
5
|
-
- rubocop-rspec
|
6
|
-
|
7
|
-
AllCops:
|
8
|
-
NewCops: enable
|
9
|
-
DisplayCopNames: true
|
10
|
-
TargetRubyVersion: 2.5
|
11
|
-
|
12
|
-
Include:
|
13
|
-
- '**/Rakefile'
|
14
|
-
- '**/config.ru'
|
15
|
-
- 'Gemfile'
|
16
|
-
- '**/*.rb'
|
17
|
-
- '**/*.rake'
|
18
|
-
|
19
|
-
Exclude:
|
20
|
-
<% `git status --ignored --porcelain`.lines.grep(/^!! /).each do |path| %>
|
21
|
-
- <%= path.sub(/^!! /, '') %>
|
22
|
-
<% end %>
|
23
|
-
- '**/*.js'
|
24
|
-
- '**/node_modules/**/*'
|
25
|
-
- '**/public/**/*'
|
26
|
-
- '**/tmp/**/*'
|
27
|
-
- 'coverage/**/*'
|
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
|
-
|
36
|
-
Naming/FileName:
|
37
|
-
Exclude:
|
38
|
-
- '**/Gemfile'
|
39
|
-
- '**/Rakefile'
|
40
|
-
|
41
|
-
Layout/LineLength:
|
42
|
-
Max: 120
|
43
|
-
|
44
|
-
Style/StringLiterals:
|
45
|
-
EnforcedStyle: double_quotes
|
46
|
-
|
47
|
-
Style/Documentation:
|
48
|
-
Enabled: false
|
49
|
-
|
50
|
-
Style/HashEachMethods:
|
51
|
-
Enabled: true
|
52
|
-
|
53
|
-
Style/HashTransformKeys:
|
54
|
-
Enabled: true
|
55
|
-
|
56
|
-
Style/HashTransformValues:
|
57
|
-
Enabled: true
|
58
|
-
|
59
|
-
Lint/AssignmentInCondition:
|
60
|
-
Exclude:
|
61
|
-
- 'spec/dummy/bin/spring'
|
62
|
-
|
63
|
-
Lint/SuppressedException:
|
64
|
-
Exclude:
|
65
|
-
- 'spec/dummy/bin/rails'
|
66
|
-
- 'spec/dummy/bin/rake'
|
67
|
-
|
68
|
-
Metrics/AbcSize:
|
69
|
-
Max: 28
|
70
|
-
|
71
|
-
Metrics/CyclomaticComplexity:
|
72
|
-
Max: 7
|
73
|
-
|
74
|
-
Metrics/PerceivedComplexity:
|
75
|
-
Max: 10
|
76
|
-
|
77
|
-
Metrics/ClassLength:
|
78
|
-
Max: 150
|
79
|
-
|
80
|
-
Metrics/ParameterLists:
|
81
|
-
Max: 5
|
82
|
-
CountKeywordArgs: false
|
83
|
-
|
84
|
-
Metrics/MethodLength:
|
85
|
-
Max: 41
|
86
|
-
|
87
|
-
Metrics/ModuleLength:
|
88
|
-
Max: 180
|
89
|
-
|
90
|
-
Naming/RescuedExceptionsVariableName:
|
91
|
-
Enabled: false
|
92
|
-
|
93
|
-
RSpec/AnyInstance:
|
94
|
-
Exclude:
|
95
|
-
- 'spec/react_on_rails/git_utils_spec.rb'
|
96
|
-
- 'spec/react_on_rails/locales_to_js_spec.rb'
|
97
|
-
- 'spec/react_on_rails/binstubs/dev_spec.rb'
|
98
|
-
- 'spec/react_on_rails/binstubs/dev_static_spec.rb'
|
99
|
-
|
100
|
-
RSpec/DescribeClass:
|
101
|
-
Enabled: false
|
102
|
-
|
103
|
-
RSpec/ExampleLength:
|
104
|
-
Enabled: false
|
105
|
-
|
106
|
-
RSpec/MessageSpies:
|
107
|
-
Enabled: false
|
108
|
-
|
109
|
-
RSpec/NestedGroups:
|
110
|
-
Max: 4
|
111
|
-
|
112
|
-
RSpec/BeforeAfterAll:
|
113
|
-
Exclude:
|
114
|
-
- 'spec/react_on_rails/generators/dev_tests_generator_spec.rb'
|
115
|
-
- 'spec/react_on_rails/generators/install_generator_spec.rb'
|
116
|
-
- 'spec/react_on_rails/binstubs/dev_spec.rb'
|
117
|
-
- 'spec/react_on_rails/binstubs/dev_static_spec.rb'
|
118
|
-
|
119
|
-
RSpec/MessageChain:
|
120
|
-
Enabled: false
|
121
|
-
|
122
|
-
RSpec/MultipleExpectations:
|
123
|
-
Enabled: false
|
124
|
-
|
125
|
-
RSpec/MultipleDescribes:
|
126
|
-
Exclude:
|
127
|
-
- 'spec/dummy/spec/system/integration_spec.rb'
|
128
|
-
|
129
|
-
RSpec/MultipleMemoizedHelpers:
|
130
|
-
Max: 12
|
131
|
-
|
132
|
-
Style/GlobalVars:
|
133
|
-
Exclude:
|
134
|
-
- 'spec/dummy/config/environments/development.rb'
|