Skip to content

Commit f5c25d9

Browse files
authored
Merge pull request #220 from ydah/fix-typos
Add CodeSpell workflow for spell checking in pull requests
2 parents aec43b4 + 19c2eea commit f5c25d9

File tree

6 files changed

+30
-12
lines changed

6 files changed

+30
-12
lines changed

.codespellignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
COO
2+
NotIn
3+
xdescribe

.github/workflows/codespell.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: CodeSpell
2+
on:
3+
- pull_request
4+
jobs:
5+
codespell:
6+
name: CodeSpell
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
10+
- name: CodeSpell
11+
uses: codespell-project/actions-codespell@406322ec52dd7b488e48c1c4b82e2a8b3a1bf630 # v2.1
12+
with:
13+
check_filenames: true
14+
check_hidden: true
15+
ignore_words_file: .codespellignore

CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
- [Add a note to the README that PostgreSQL is required to run the tests. #188](https://github.com/kufu/activerecord-bitemporal/pull/188)
2828
- [Remove specs for Rails 5.x #191](https://github.com/kufu/activerecord-bitemporal/pull/191)
29-
- [Update auto assgin member #193](https://github.com/kufu/activerecord-bitemporal/pull/193)
29+
- [Update auto assign member #193](https://github.com/kufu/activerecord-bitemporal/pull/193)
3030
- [Pin GitHub Actions dependencies to specific commit hashes #194](https://github.com/kufu/activerecord-bitemporal/pull/194)
3131
- [Bump ruby/setup-ruby from 1.227.0 to 1.229.0 #195](https://github.com/kufu/activerecord-bitemporal/pull/195)
3232
- [Bump ruby/setup-ruby from 1.229.0 to 1.233.0 #197](https://github.com/kufu/activerecord-bitemporal/pull/197)
@@ -35,7 +35,7 @@
3535
- [Bump ruby/setup-ruby from 1.237.0 to 1.238.0 #201](https://github.com/kufu/activerecord-bitemporal/pull/201)
3636
- [Bump ruby/setup-ruby from 1.238.0 to 1.242.0 #202](https://github.com/kufu/activerecord-bitemporal/pull/202)
3737
- [Bump ruby/setup-ruby from 1.242.0 to 1.244.0 #203](https://github.com/kufu/activerecord-bitemporal/pull/203)
38-
- [Update auto assgin member #204](https://github.com/kufu/activerecord-bitemporal/pull/204)
38+
- [Update auto assign member #204](https://github.com/kufu/activerecord-bitemporal/pull/204)
3939

4040
## 5.3.0
4141

spec/activerecord-bitemporal/bitemporal_scope_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -974,7 +974,7 @@ class Article < ActiveRecord::Base
974974
it { is_expected.to have_bitemporal_at(time_current, table: "blogs") }
975975
it { is_expected.to have_bitemporal_at(time_current, table: "articles") }
976976

977-
# Not suppoted call to_sql outside unscoped
977+
# Not supported call to_sql outside unscoped
978978
xcontext "with call to_sql outside `Article.unscoped`" do
979979
let(:sql) { Article.unscoped { Blog.joins(:articles) }.to_sql }
980980
it { is_expected.to have_bitemporal_at(time_current, table: "blogs") }
@@ -1024,7 +1024,7 @@ class Article < ActiveRecord::Base
10241024
let(:sql) { Article.unscoped { Blog.joins(:articles).merge(Article.valid_at("2019/01/01")).to_sql } }
10251025
it { is_expected.to have_bitemporal_at(time_current, table: "blogs") }
10261026
it { is_expected.to have_valid_at("2019/01/01".in_time_zone, table: "articles") }
1027-
# Not suppoted merge
1027+
# Not supported merge
10281028
# `Article.valid_at("2019/01/01")` without `default_scope` in `Article.unscoped`
10291029
xit { is_expected.to have_transaction_at(time_current, table: "articles") }
10301030

spec/activerecord-bitemporal/bitemporal_spec.rb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1181,7 +1181,7 @@ class EmployeeWithUniquness < Employee
11811181
it_behaves_like "return false and #destroyed? to be false"
11821182
end
11831183

1184-
context "with `destory!`" do
1184+
context "with `destroy!`" do
11851185
subject { Timecop.freeze(destroyed_time) { employee.destroy! } }
11861186

11871187
before { allow_any_instance_of(Employee).to receive('save!').and_raise(ActiveRecord::RecordNotSaved.new("failed")) }
@@ -2353,7 +2353,7 @@ class EmployeeWithUniquness < Employee
23532353
}
23542354
end
23552355

2356-
context "nexted call `.valid_at`" do
2356+
context "nested call `.valid_at`" do
23572357
before { Employee.create(valid_from: "2019/1/1") }
23582358
it do
23592359
ActiveRecord::Bitemporal.ignore_valid_datetime {
@@ -2368,7 +2368,7 @@ class EmployeeWithUniquness < Employee
23682368
end
23692369
end
23702370

2371-
context "nexted call `.valid_at!`" do
2371+
context "nested call `.valid_at!`" do
23722372
before { Employee.create(valid_from: "2019/1/1") }
23732373
it do
23742374
ActiveRecord::Bitemporal.ignore_valid_datetime {
@@ -2513,7 +2513,7 @@ class EmployeeWithUniquness < Employee
25132513
}
25142514
end
25152515

2516-
context "nexted call `.transaction_at`" do
2516+
context "nested call `.transaction_at`" do
25172517
before { Employee.create(transaction_from: "2019/1/1") }
25182518
it do
25192519
ActiveRecord::Bitemporal.ignore_transaction_datetime {
@@ -2528,7 +2528,7 @@ class EmployeeWithUniquness < Employee
25282528
end
25292529
end
25302530

2531-
context "nexted call `.transaction_at!`" do
2531+
context "nested call `.transaction_at!`" do
25322532
before { Employee.create(transaction_from: "2019/1/1") }
25332533
it do
25342534
ActiveRecord::Bitemporal.ignore_transaction_datetime {
@@ -2720,7 +2720,7 @@ class EmployeeWithUniquness < Employee
27202720
company.employees.third.address = Address.create(city: "Saitama")
27212721
end
27222722

2723-
# MEMO: `belongs_to :comany` is alos included.
2723+
# MEMO: `belongs_to :company` is also included.
27242724
it { expect(company.each_association(deep: true).count).to eq 7 }
27252725
it { expect(company.employees.includes(:address).first.each_association(deep: true).count).to eq 7 }
27262726
it { expect(Company.find(company.id).employees.first.each_association(deep: true).count).to eq 7 }

spec/activerecord-bitemporal/date_type_valid_time_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -821,7 +821,7 @@ def self.name
821821
end
822822

823823
describe "Association" do
824-
describe "Date type valid time has many Date type vaild time" do
824+
describe "Date type valid time has many Date type valid time" do
825825
describe "sync valid_from in create" do
826826
let!(:cop1) { department.cops.new(name: "Jane") }
827827
let!(:cop2) { department.cops.new(name: "Homu") }
@@ -897,7 +897,7 @@ def self.name
897897
end
898898
end
899899

900-
describe "Date type valid time has many Datetime(timestamp) type vaild time" do
900+
describe "Date type valid time has many Datetime(timestamp) type valid time" do
901901
describe "sync valid_from in create" do
902902
let!(:manager1) { department.managers.new(name: "Jane") }
903903
let!(:manager2) { department.managers.new(name: "Homu") }

0 commit comments

Comments
 (0)