Skip to content

Commit

Permalink
Add dependabot configuation (#104)
Browse files Browse the repository at this point in the history
  • Loading branch information
ebeagusamuel authored Oct 6, 2023
1 parent 6e1f1bc commit ae403a9
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 6 deletions.
42 changes: 42 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
version: 2
registries:
toptal-github:
type: "git"
url: "https://github.com"
username: "x-access-token"
password: "${{secrets.DEPENDABOT_GITHUB_TOKEN}}"

updates:
- package-ecosystem: bundler
directory: "/"
schedule:
interval: "weekly"
day: "wednesday"
time: "07:00"
pull-request-branch-name:
separator: "-"
labels:
- "no-jira"
- "ruby"
- "dependencies"
reviewers:
- "toptal/devx"
registries:
- toptal-github
insecure-external-code-execution: allow
open-pull-requests-limit: 2
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
day: "wednesday"
time: "07:00"
pull-request-branch-name:
separator: "-"
labels:
- "no-jira"
- "dependencies"
- "gha"
reviewers:
- "toptal/devx"
open-pull-requests-limit: 2
5 changes: 5 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,11 @@ RSpec/SubjectStub:
RSpec/VerifiedDoubles:
Enabled: true

RSpec/SpecFilePathSuffix:
Enabled: true
Exclude:
- 'spec/fixtures/*'

Style/CommentedKeyword:
Enabled: false

Expand Down
12 changes: 6 additions & 6 deletions spec/lib/granite/action/performer_spec.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
RSpec.describe Granite::Action::Performer do
let(:performer1) { instance_double(User, id: 5) }
let(:performer2) { instance_double(User, id: 10) }
let(:first_performer) { instance_double(User, id: 5) }
let(:second_performer) { instance_double(User, id: 10) }

before do
stub_class(:projector, Granite::Projector)
Expand All @@ -16,7 +16,7 @@ def self.batch(count)
describe '#ctx' do
specify { expect(Action.new.ctx).to be_nil }
specify { expect(Action.with(performer: :value).new.ctx).to have_attributes(performer: :value) }
specify { expect(Action.as(performer1).new.ctx).to have_attributes(performer: performer1) }
specify { expect(Action.as(first_performer).new.ctx).to have_attributes(performer: first_performer) }

specify 'proxy works for deeper initialization' do
expect(Action.with(performer: :value).batch(2).map(&:ctx))
Expand All @@ -26,15 +26,15 @@ def self.batch(count)

describe '#performer' do
specify { expect(Action.new.performer).to be_nil }
specify { expect(Action.as(performer1).new.performer).to eq(performer1) }
specify { expect(Action.as(first_performer).new.performer).to eq(first_performer) }

specify 'proxy works for deeper initialization' do
expect(Action.as(performer1).batch(2).map(&:performer)).to eq([performer1, performer1])
expect(Action.as(first_performer).batch(2).map(&:performer)).to eq([first_performer, first_performer])
end
end

describe '#performer_id' do
specify { expect(Action.new.performer_id).to be_nil }
specify { expect(Action.as(performer1).new.performer_id).to eq(performer1.id) }
specify { expect(Action.as(first_performer).new.performer_id).to eq(first_performer.id) }
end
end

0 comments on commit ae403a9

Please sign in to comment.