-
-
Notifications
You must be signed in to change notification settings - Fork 493
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add missing kit rspecs, DRY up kit base items and report service #4665
Open
jimmyli97
wants to merge
16
commits into
rubyforgood:main
Choose a base branch
from
jimmyli97:cleanup-typos-kit-rspecs
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
f8b85d3
REFACTOR clean up unused line item trait introduced in #4163
jimmyli97 a4d1164
FIX typo in params in donation and purchase controllers
jimmyli97 8ee83ee
DOCS add comment clarifying itemizable works with line items
jimmyli97 7f776ab
REFACTOR rename Item:kits scope to :housing_a_kit, add rspecs
jimmyli97 48c1835
REFACTOR DRY up kit base_item, seed_base_items, prevent kit base_item…
jimmyli97 dd4ce7b
Add rspec for item.is_in_kit?
jimmyli97 dd2b556
Fix lint
jimmyli97 b59975a
rename findorcreatebaseitem to add !
jimmyli97 64e5a52
REFACTOR remove unused code childrenservedreportservice
jimmyli97 240a32e
Fix bin/setup so it's working with seed_base_item move
jimmyli97 a74dcc9
Base Item linting
jimmyli97 8fde086
REFACTOR move seed_base_items into lib util file
jimmyli97 7d25b3a
REFACTOR use specify -> instead of it -> in test descriptions in item…
jimmyli97 94c1d91
Merge branch 'main' into cleanup-typos-kit-rspecs
jimmyli97 94030f7
FIX typos, move to Seeds module
jimmyli97 44c42be
FIX clarify org admins can't view or edit base items in specs
jimmyli97 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,4 +29,3 @@ def to_h | |
{ partner_key: partner_key, name: name } | ||
end | ||
end | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
module Seeds | ||
def self.seed_base_items | ||
# Initial starting qty for our test organizations | ||
base_items = File.read(Rails.root.join("db", "base_items.json")) | ||
items_by_category = JSON.parse(base_items) | ||
|
||
items_by_category.each do |category, entries| | ||
entries.each do |entry| | ||
BaseItem.find_or_create_by!( | ||
name: entry["name"], | ||
category: category, | ||
partner_key: entry["key"], | ||
updated_at: Time.zone.now, | ||
created_at: Time.zone.now | ||
) | ||
end | ||
end | ||
# Create global 'Kit' base item | ||
KitCreateService.find_or_create_kit_base_item! | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(continuing conversation from #4585)
these lines were removed because they're unused in this service and duplicated in AcquisitionReportService (probably the author copied AcquisitionReportService as a template when creating this service and forgot to delete them)