Compare commits

..

1 Commits

Author SHA1 Message Date
Daniel O'Connor
c86d2ee7ce Explicitly bundle 2025-07-13 06:52:32 +00:00
19 changed files with 78 additions and 123 deletions

View File

@@ -83,6 +83,9 @@ jobs:
with:
bundler-cache: true
- name: Bundler install
run: bundle
- name: Install required JS packages
run: yarn install

View File

@@ -83,6 +83,9 @@ jobs:
with:
bundler-cache: true
- name: Bundler install
run: bundle
- name: Install required JS packages
run: yarn install

View File

@@ -83,6 +83,9 @@ jobs:
with:
bundler-cache: true
- name: Bundler install
run: bundle
- name: Install required JS packages
run: yarn install

View File

@@ -83,6 +83,9 @@ jobs:
with:
bundler-cache: true
- name: Bundler install
run: bundle
- name: Install required JS packages
run: yarn install

View File

@@ -83,6 +83,9 @@ jobs:
with:
bundler-cache: true
- name: Bundler install
run: bundle
- name: Install required JS packages
run: yarn install

View File

@@ -83,6 +83,9 @@ jobs:
with:
bundler-cache: true
- name: Bundler install
run: bundle
- name: Install required JS packages
run: yarn install

View File

@@ -83,6 +83,9 @@ jobs:
with:
bundler-cache: true
- name: Bundler install
run: bundle
- name: Install required JS packages
run: yarn install

View File

@@ -83,6 +83,9 @@ jobs:
with:
bundler-cache: true
- name: Bundler install
run: bundle
- name: Install required JS packages
run: yarn install

View File

@@ -83,6 +83,9 @@ jobs:
with:
bundler-cache: true
- name: Bundler install
run: bundle
- name: Install required JS packages
run: yarn install

View File

@@ -83,6 +83,9 @@ jobs:
with:
bundler-cache: true
- name: Bundler install
run: bundle
- name: Install required JS packages
run: yarn install

View File

@@ -98,6 +98,9 @@ jobs:
with:
bundler-cache: true
- name: Bundler install
run: bundle
- name: Install required JS packages
run: yarn install

View File

@@ -1 +1 @@
3.3.8
3.3.7

View File

@@ -175,7 +175,6 @@ group :development, :test do
gem 'rubocop-rspec_rails'
gem 'webrat' # provides HTML matchers for view tests
gem 'crowdin-cli' # for translations
gem 'dotenv-rails'
# cli utils

View File

@@ -200,14 +200,6 @@ GEM
concurrent-ruby (1.3.5)
connection_pool (2.5.3)
crass (1.0.6)
crowdin-api (1.12.0)
open-uri (>= 0.1.0, < 0.2.0)
rest-client (>= 2.0.0, < 2.2.0)
crowdin-cli (0.2.2)
crowdin-api (>= 0.2.0)
gli (>= 2.7.0)
i18n (>= 0.6.4)
rubyzip (>= 1.0.0)
csv (3.3.1)
csv_shaper (1.4.0)
activesupport (>= 3.0.0)
@@ -228,10 +220,10 @@ GEM
railties (>= 4.1.0)
responders
warden (~> 1.2.3)
diff-lcs (1.6.2)
diff-lcs (1.6.1)
discard (1.4.0)
activerecord (>= 4.2, < 9.0)
domain_name (0.6.20240107)
docile (1.1.5)
dotenv (3.1.8)
dotenv-rails (3.1.8)
dotenv (= 3.1.8)
@@ -257,18 +249,18 @@ GEM
excon (1.2.5)
logger
execjs (2.10.0)
factory_bot (6.5.4)
activesupport (>= 6.1.0)
factory_bot_rails (6.5.0)
factory_bot (6.5.0)
activesupport (>= 5.0.0)
factory_bot_rails (6.4.4)
factory_bot (~> 6.5)
railties (>= 6.1.0)
railties (>= 5.0.0)
faker (3.5.1)
i18n (>= 1.8.11, < 2)
faraday (2.13.2)
faraday (2.13.1)
faraday-net_http (>= 2.0, < 3.5)
json
logger
faraday-net_http (3.4.1)
faraday-net_http (3.4.0)
net-http (>= 0.5.0)
ffi (1.16.3)
flickraw (0.9.10)
@@ -283,8 +275,6 @@ GEM
gibbon (1.2.1)
httparty
multi_json (>= 1.9.0)
gli (2.22.2)
ostruct
globalid (1.2.1)
activesupport (>= 6.1)
gravatar-ultimate (2.0.0)
@@ -305,7 +295,7 @@ GEM
activesupport (>= 5.1)
haml (>= 4.0.6)
railties (>= 5.1)
haml_lint (0.66.0)
haml_lint (0.62.0)
haml (>= 5.0)
parallel (~> 1.10)
rainbow
@@ -321,9 +311,6 @@ GEM
webrick
highline (3.1.2)
reline
http-accept (1.7.0)
http-cookie (1.0.8)
domain_name (~> 0.5)
httparty (0.22.0)
csv
mini_mime (>= 1.0.0)
@@ -341,7 +328,7 @@ GEM
rainbow (>= 2.2.2, < 4.0)
ruby-progressbar (~> 1.8, >= 1.8.1)
terminal-table (>= 1.5.1)
icalendar (2.11.2)
icalendar (2.11.0)
base64
ice_cube (~> 0.16)
logger
@@ -360,7 +347,7 @@ GEM
rails-dom-testing (>= 1, < 3)
railties (>= 4.2.0)
thor (>= 0.14, < 2.0)
json (2.13.2)
json (2.12.2)
json-schema (5.1.0)
addressable (~> 2.8)
jsonapi-resources (0.10.7)
@@ -405,10 +392,6 @@ GEM
matrix (0.4.2)
memcachier (0.0.2)
method_source (1.1.0)
mime-types (3.7.0)
logger
mime-types-data (~> 3.2025, >= 3.2025.0507)
mime-types-data (3.2025.0805)
mimemagic (0.4.3)
nokogiri (~> 1)
rake
@@ -432,12 +415,11 @@ GEM
timeout
net-smtp (0.5.0)
net-protocol
netrc (0.11.0)
nio4r (2.7.4)
nokogiri (1.18.9)
nokogiri (1.18.8)
mini_portile2 (~> 2.8.2)
racc (~> 1.4)
nokogiri (1.18.9-x86_64-linux-gnu)
nokogiri (1.18.8-x86_64-linux-gnu)
racc (~> 1.4)
oauth (0.5.6)
oj (3.16.10)
@@ -455,17 +437,15 @@ GEM
omniauth-twitter (1.4.0)
omniauth-oauth (~> 1.1)
rack
open-uri (0.1.0)
orm_adapter (0.5.0)
ostruct (0.6.2)
ostruct (0.6.1)
parallel (1.27.0)
parser (3.3.9.0)
parser (3.3.8.0)
ast (~> 2.4.1)
racc
percy-capybara (5.0.0)
capybara (>= 3)
pg (1.6.1)
pg (1.6.1-x86_64-linux)
pg (1.5.9)
platform-api (3.8.0)
heroics (~> 0.1.1)
moneta (~> 1.0.0)
@@ -547,23 +527,18 @@ GEM
rb-fsevent (0.11.2)
rb-inotify (0.10.1)
ffi (~> 1.0)
rdoc (6.14.2)
rdoc (6.14.0)
erb
psych (>= 4.0.0)
recaptcha (5.19.0)
redis-client (0.23.2)
connection_pool
regexp_parser (2.11.0)
regexp_parser (2.10.0)
reline (0.6.1)
io-console (~> 0.5)
responders (3.1.1)
actionpack (>= 5.2)
railties (>= 5.2)
rest-client (2.1.0)
http-accept (>= 1.7.0, < 2.0)
http-cookie (>= 1.0.2, < 2.0)
mime-types (>= 1.16, < 4.0)
netrc (~> 0.8)
rexml (3.4.1)
rouge (4.1.2)
rspec (3.13.0)
@@ -574,15 +549,15 @@ GEM
activemodel (>= 3.0)
activesupport (>= 3.0)
rspec-mocks (>= 2.99, < 4.0)
rspec-core (3.13.5)
rspec-core (3.13.3)
rspec-support (~> 3.13.0)
rspec-expectations (3.13.5)
rspec-expectations (3.13.4)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.13.0)
rspec-mocks (3.13.5)
rspec-mocks (3.13.4)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.13.0)
rspec-rails (8.0.1)
rspec-rails (8.0.0)
actionpack (>= 7.2)
activesupport (>= 7.2)
railties (>= 7.2)
@@ -590,7 +565,7 @@ GEM
rspec-expectations (~> 3.13)
rspec-mocks (~> 3.13)
rspec-support (~> 3.13)
rspec-support (3.13.4)
rspec-support (3.13.3)
rspectre (0.2.0)
parser (>= 3.3.7.1)
prism (~> 1.3)
@@ -606,7 +581,7 @@ GEM
rswag-ui (2.16.0)
actionpack (>= 5.2, < 8.1)
railties (>= 5.2, < 8.1)
rubocop (1.79.1)
rubocop (1.76.0)
json (~> 2.3)
language_server-protocol (~> 3.17.0.2)
lint_roller (~> 1.1.0)
@@ -614,10 +589,10 @@ GEM
parser (>= 3.3.0.2)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 2.9.3, < 3.0)
rubocop-ast (>= 1.46.0, < 2.0)
rubocop-ast (>= 1.45.0, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 4.0)
rubocop-ast (1.46.0)
rubocop-ast (1.45.0)
parser (>= 3.3.7.2)
prism (~> 1.4)
rubocop-capybara (2.22.1)
@@ -666,7 +641,7 @@ GEM
activemodel (>= 6.1)
hashie
securerandom (0.4.1)
selenium-webdriver (4.34.0)
selenium-webdriver (4.32.0)
base64 (~> 0.2)
logger (~> 1.4)
rexml (~> 3.2, >= 3.2.5)
@@ -678,6 +653,11 @@ GEM
logger
rack (>= 2.2.4)
redis-client (>= 0.22.2)
simplecov (0.13.0)
docile (~> 1.1.0)
json (>= 1.8, < 3)
simplecov-html (~> 0.10.0)
simplecov-html (0.10.2)
sprockets (3.7.5)
base64
concurrent-ruby (~> 1.0)
@@ -689,14 +669,14 @@ GEM
ssrf_filter (1.1.2)
stringio (3.1.7)
sysexits (1.2.0)
temple (0.10.4)
temple (0.10.3)
terminal-table (4.0.0)
unicode-display_width (>= 1.1.1, < 4)
terser (1.2.5)
execjs (>= 0.3.0, < 3)
thor (1.4.0)
thor (1.3.2)
thread_safe (0.3.6)
tilt (2.6.1)
tilt (2.6.0)
timecop (0.9.10)
timeout (0.4.3)
trollop (1.16.2)
@@ -766,7 +746,6 @@ DEPENDENCIES
chartkick
coffee-rails
comfortable_mexican_sofa!
crowdin-cli
csv_shaper
dalli
database_cleaner
@@ -854,7 +833,7 @@ DEPENDENCIES
xmlrpc
RUBY VERSION
ruby 3.3.8p144
ruby 3.3.7p123
BUNDLED WITH
2.4.22

View File

@@ -1,22 +0,0 @@
# Hi there!
#
# This is a configuration file for the Crowdin CLI.
# You'll need to replace the placeholder project_id with your actual
# project ID from CrowdIn.
#
# For more information, see the Crowdin CLI documentation:
# https://support.crowdin.com/enterprise/cli-v3/
#
project_id: "your-project-id"
api_token_env: "CROWDIN_API_TOKEN"
base_path: "."
files:
- source: '/config/locales/en.yml'
translation: '/config/locales/%two_letters_code%.yml'
# The 'ignore' property is used to exclude files from processing.
# We are ignoring the existing Japanese translation file.
ignore:
- '/config/locales/ja.yml'
- source: '/config/locales/*.en.yml'
translation: '/config/locales/%file_name%.%two_letters_code%.yml'

View File

@@ -8,13 +8,4 @@ namespace :openfarm do
Rails.logger = Logger.new(STDOUT)
OpenfarmService.new.import!
end
desc "Delete all pictures with source OpenFarm"
task delete_pictures: :environment do
puts "Deleting pictures with source OpenFarm..."
photos_to_delete = Photo.where(source: 'openfarm')
count = photos_to_delete.count
photos_to_delete.destroy_all
puts "Deleted #{count} pictures."
end
end

View File

@@ -2,6 +2,11 @@
# This file is copied to spec/ when you run 'rails generate rspec:install'
ENV["RAILS_ENV"] ||= 'test'
require 'simplecov'
# output coverage locally AND send it to coveralls
SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter.new([SimpleCov::Formatter::HTMLFormatter])
require 'spec_helper'
require File.expand_path('../config/environment', __dir__)
require 'rspec/rails'

View File

@@ -16,6 +16,7 @@
# users commonly want.
#
# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
require 'simplecov'
require 'percy/capybara'
require 'vcr'
@@ -26,6 +27,8 @@ VCR.configure do |c|
c.configure_rspec_metadata!
end
SimpleCov.start
RSpec.configure do |config|
# rspec-expectations config goes here. You can use an alternate
# assertion/expectation library such as wrong or the stdlib/minitest

View File

@@ -1,33 +0,0 @@
# frozen_string_literal: true
require 'rails_helper'
require 'rake'
describe 'openfarm:delete_pictures' do
before(:all) do
Rails.application.load_tasks
end
# We need to do this because Rake tasks normally output to STDOUT, but we
# don't want to clutter up the test output.
before(:each) do
$stdout = StringIO.new
end
after(:each) do
$stdout = STDOUT
end
it 'deletes pictures with source OpenFarm' do
create(:photo, source: 'OpenFarm')
create(:photo, source: 'flickr')
expect(Photo.where(source: 'OpenFarm').count).to eq(1)
expect(Photo.where(source: 'flickr').count).to eq(1)
Rake::Task['openfarm:delete_pictures'].invoke
expect(Photo.where(source: 'OpenFarm').count).to eq(0)
expect(Photo.where(source: 'flickr').count).to eq(1)
end
end