Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,6 @@ Rails/RedundantActiveRecordAllMethod:
- 'app/controllers/forums_controller.rb'
- 'app/controllers/plant_parts_controller.rb'
- 'app/controllers/scientific_names_controller.rb'
- 'app/services/openfarm_service.rb'
- 'spec/features/percy/percy_spec.rb'
- 'spec/models/harvest_spec.rb'

Expand Down Expand Up @@ -630,7 +629,6 @@ Style/GlobalStdStream:
Exclude:
- 'config/environments/production.rb'
- 'lib/tasks/gbif.rake'
- 'lib/tasks/openfarm.rake'

# Offense count: 1
# This cop supports unsafe autocorrection (--autocorrect-all).
Expand Down
1 change: 0 additions & 1 deletion app/models/ability.rb
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ def member_abilities(member)
can :manage, Crop
can :manage, ScientificName
can :manage, AlternateName
can :openfarm, Crop
can :gbif, Crop
end

Expand Down
72 changes: 0 additions & 72 deletions app/models/concerns/open_farm_data.rb

This file was deleted.

1 change: 0 additions & 1 deletion app/models/crop.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
class Crop < ApplicationRecord
extend FriendlyId
include PhotoCapable
include OpenFarmData
include GbifData
include SearchCrops

Expand Down
3 changes: 0 additions & 3 deletions app/services/gbif_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -126,12 +126,9 @@ def update_crop(crop)

gbif_record = fetch(gbif_usage_key)
if gbif_record.present?
# crop.update! openfarm_data: gbif_record.fetch('data', false)
# save_companions(crop, gbif_record)
save_photos(crop, gbif_usage_key)
else
Rails.logger.debug "\tcrop not found on GBIF"
# crop.update!(openfarm_data: false)
end
end

Expand Down
1 change: 0 additions & 1 deletion spec/helpers/photos_helper_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

describe PhotosHelper do
let(:crop) { FactoryBot.create(:crop) }
let(:crop_photo_of) { FactoryBot.create(:photo, source: 'openfarm') }
let(:crop_photo_flickr) { FactoryBot.create(:photo, source: 'flickr') }

let(:garden) { FactoryBot.create(:garden) }
Expand Down
Loading