Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into add-options-to-legacy
Browse files Browse the repository at this point in the history
# Conflicts:
#vite_plugin_legacy/lib/vite_plugin_legacy/tag_helpers.rb
  • Loading branch information
ElMassimo committed Nov 6, 2024
2 parents 3dce0f4 + b92ef4b commit f071257
Show file tree
Hide file tree
Showing 126 changed files with 1,599 additions and 1,311 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/crawl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@ jobs:
env:
API_KEY: ${{secrets.ALGOLIA_API_KEY}}
APPLICATION_ID: GERZE019PN
runs-on: ubuntu-latest
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
runs-on: ubuntu-24.04
container: algolia/docsearch-scraper
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- run: 'sudo apt-get install -y jq'
- run: 'echo "CONFIG=$(cat docs/.algolia/config.json | jq -r tostring)" >> $GITHUB_ENV'
- run: "cd /root && pipenv install"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
node: [18]
node: [20]

runs-on: ${{ matrix.os }}

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
matrix:
os: [ubuntu-latest]
ruby: [
3.1
3.3
]

steps:
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,17 @@ jobs:
"3.3",
]
gemfile: [
"Gemfile-rails.6.1.x",
"Gemfile-rails.7.0.x",
"Gemfile-rails.7.1.x"
"Gemfile-rails.7.1.x",
"Gemfile-rails.7.2.x",
]
experimental: [false]
include:
- ruby: "3.3"
- ruby: "3.4.0-preview2"
os: ubuntu-latest
gemfile: Gemfile-rails-edge
gemfile: "Gemfile-rails.8.0.x"
experimental: true
- ruby: "3.4.0-preview1"
- ruby: "3.4.0-preview2"
os: ubuntu-latest
gemfile: Gemfile-rails-edge
experimental: true
Expand All @@ -41,7 +41,7 @@ jobs:

- uses: actions/setup-node@v4
with:
node-version: '18'
node-version: '20'

- uses: ruby/setup-ruby@v1
with:
Expand Down
40 changes: 32 additions & 8 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
inherit_from: .rubocop_todo.yml

require:
- standard
- rubocop-performance
- rubocop-minitest

inherit_gem:
standard: config/ruby-3.0.yml

inherit_mode:
merge:
- Exclude

AllCops:
TargetRubyVersion: 3.0
SuggestExtensions: false
NewCops: enable
Exclude:
- "node_modules/**/*"
- "**/*/node_modules/**/*"
Expand All @@ -18,15 +25,10 @@ AllCops:
- "vendor/bundle"
- "tmp/**/*"
- "test/mounted_app/test/dummy/bin/*"
TargetRubyVersion: 2.5

Style/IfUnlessModifier:
Enabled: false

Lint/UnusedMethodArgument:
Exclude:
- "vite_rails/lib/vite_rails/tag_helpers.rb"

Style/RescueModifier:
Enabled: false

Expand All @@ -39,6 +41,12 @@ Style/GuardClause:
Style/MultilineBlockChain:
Enabled: false

Style/HashEachMethods:
Enabled: false

Layout/LineLength:
Enabled: false

Layout/ElseAlignment:
Enabled: false

Expand All @@ -51,6 +59,9 @@ Layout/IndentationWidth:
Gemspec/RequiredRubyVersion:
Enabled: false

Gemspec/DevelopmentDependencies:
Enabled: false

Layout/IndentationConsistency:
Enabled: false

Expand All @@ -69,9 +80,6 @@ Style/Documentation:
Naming/RescuedExceptionsVariableName:
PreferredName: error

Layout/SpaceInsideStringInterpolation:
EnforcedStyle: space

Layout/MultilineMethodCallIndentation:
EnforcedStyle: indented

Expand All @@ -93,6 +101,12 @@ Style/MissingRespondToMissing:
Style/ParallelAssignment:
Enabled: false

Style/FetchEnvVar:
Enabled: false

Style/SuperWithArgsParentheses:
Enabled: false

Style/TrailingCommaInArrayLiteral:
EnforcedStyleForMultiline: comma

Expand Down Expand Up @@ -149,3 +163,13 @@ Security/YAMLLoad:

Style/MutableConstant:
Enabled: false

Minitest/MultipleAssertions:
Enabled: false

Minitest/AssertRaisesWithRegexpArgument:
Enabled: false

Minitest/UselessAssertion:
Exclude:
- test/helper_test.rb
19 changes: 12 additions & 7 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
# This configuration was generated by
# `rubocop --auto-gen-config`
# on 2021-08-16 18:41:25 UTC using RuboCop version 1.13.0.
# on 2024-11-05 13:37:33 UTC using RuboCop version 1.66.1.
# The point is for the user to remove these configuration records
# one by one as the offenses are removed from the code base.
# Note that changes in the inspected code, or installation of new
# versions of RuboCop, may require this file to be generated again.

# Offense count: 40
# Cop supports --auto-correct.
# Configuration parameters: AutoCorrect, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
# URISchemes: http, https
Layout/LineLength:
Max: 250
# Offense count: 1
# Configuration parameters: AllowComments, AllowEmptyLambdas.
Lint/EmptyBlock:
Exclude:
- 'test/mounted_app/test/dummy/config/initializers/content_security_policy.rb'

# Offense count: 1
# Configuration parameters: AllowComments.
Lint/EmptyClass:
Exclude:
- 'test/test_app/config/application.rb'
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.1.1
3.3.5
61 changes: 54 additions & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,47 @@
## Setting Up a Development Environment
# Contributing

First, thanks for wanting to contribute. You’re awesome! :heart:

## Help

We’re not able to provide support through GitHub Issues. If you’re looking for
help with your code, try posting on [Stack Overflow](https://stackoverflow.com/).

All features should be documented. If you don’t see a feature in the docs,
assume it doesn’t exist.

## Bugs

Think you’ve discovered a bug?

1. Search existing issues to see if it’s been reported.
2. Try the `main` branch to make sure it hasn’t been fixed.

```rb
gem "vite_ruby", github: "ElMassimo/vite_ruby"
gem "vite_rails", github: "ElMassimo/vite_rails"
```

If the above steps don’t help, create an issue. Include:

- Detailed steps to reproduce
- Complete backtraces for exceptions

## New Features

If you’d like to discuss a new feature, [create a new Discussion](https://github.com/ElMassimo/vite_ruby/discussions/new?category=ideas).

## Pull Requests

Fork the project and create a pull request. A few tips:

- Keep changes to a minimum. If you have multiple features or fixes, submit multiple pull requests.
- Follow the existing style. The code should read like it’s written by a single person.

Please open a discussion to get feedback on your idea before spending too much time on it.


### Setting Up a Development Environment

1. Install [pnpm](https://pnpm.js.org/)

Expand All @@ -12,23 +55,27 @@ bundle install
pnpm install
```

## Making sure your changes pass all tests
#### Making sure your changes pass all tests

There are a number of automated checks which run on GitHub Actions when a pull request is created.
You can run those checks on your own locally to make sure that your changes would not break the CI build.

### 1. Check the code for JavaScript style violations
##### 1. Check the code for JavaScript style violations

```
pnpm lint
pnpm lint --fix
```

### 2. Check the code for Ruby style violations
##### 2. Check the code for Ruby style violations
```
bin/rubocop
bin/rubocop -A
```

### 3. Run the test suite
##### 3. Run the test suite
```
bin/m
```

---

This contributing guide is released under [CCO](https://creativecommons.org/publicdomain/zero/1.0/) (public domain). Use it for your own project without attribution.
19 changes: 10 additions & 9 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
# frozen_string_literal: true

source 'https://rubygems.org'
source "https://rubygems.org"

gem 'rails'
gem "rails"

gemspec path: './vite_ruby'
gemspec path: './vite_rails'
gemspec path: './vite_plugin_legacy'
gemspec path: "./vite_ruby"
gemspec path: "./vite_rails"
gemspec path: "./vite_plugin_legacy"

group :development, :test do
gem 'benchmark-ips'
gem 'rubocop', '~> 1.9'
gem 'rubocop-minitest', '~> 0.10'
gem 'rubocop-performance', '~> 1.9'
gem "benchmark-ips"
gem "rubocop"
gem "rubocop-minitest"
gem "rubocop-performance"
gem "standard", require: false
end
Loading

0 comments on commit f071257

Please sign in to comment.