Skip to content
Merged
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 Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ source "https://rubygems.org"
ruby "~> 4.0.1"

gem "rails", "~> 8"
gem "sprockets-rails"
gem "active_model_serializers"
gem "bunny"
gem "delayed_job_active_record"
Expand Down Expand Up @@ -34,7 +33,6 @@ gem "bigdecimal"
gem "mutex_m"
gem "tsort"
gem "irb"
gem "image_processing", "~> 1.2"

group :development, :test do
gem "climate_control"
Expand Down
20 changes: 0 additions & 20 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,6 @@ GEM
faraday (>= 1, < 3)
faraday-net_http (3.4.2)
net-http (~> 0.5)
ffi (1.17.3-aarch64-linux-gnu)
ffi (1.17.3-x86_64-linux-gnu)
globalid (1.3.0)
activesupport (>= 6.1)
google-apis-core (1.0.2)
Expand Down Expand Up @@ -192,9 +190,6 @@ GEM
logger
i18n (1.14.8)
concurrent-ruby (~> 1.0)
image_processing (1.14.0)
mini_magick (>= 4.9.5, < 6)
ruby-vips (>= 2.0.17, < 3)
io-console (0.8.2)
irb (1.17.0)
pp (>= 0.6.0)
Expand Down Expand Up @@ -234,8 +229,6 @@ GEM
net-smtp
marcel (1.1.0)
method_source (1.1.0)
mini_magick (5.3.1)
logger
mini_mime (1.1.5)
minitest (6.0.2)
drb (~> 2.0)
Expand Down Expand Up @@ -378,9 +371,6 @@ GEM
rspec-support (3.13.7)
rspec_junit_formatter (0.6.0)
rspec-core (>= 2, < 4, != 2.12.0)
ruby-vips (2.3.0)
ffi (~> 1.12)
logger
scenic (1.9.0)
activerecord (>= 4.0.0)
railties (>= 4.0.0)
Expand All @@ -403,14 +393,6 @@ GEM
simplecov_json_formatter (0.1.4)
sorted_set (1.1.0)
rbtree
sprockets (4.2.2)
concurrent-ruby (~> 1.0)
logger
rack (>= 2.2.4, < 4)
sprockets-rails (3.5.2)
actionpack (>= 6.1)
activesupport (>= 6.1)
sprockets (>= 3.0.0)
stringio (3.2.0)
thor (1.5.0)
thwait (0.2.0)
Expand Down Expand Up @@ -457,7 +439,6 @@ DEPENDENCIES
faker
google-cloud-storage (~> 1.11)
hashdiff
image_processing (~> 1.2)
irb
jwt
kaminari
Expand All @@ -484,7 +465,6 @@ DEPENDENCIES
secure_headers
simplecov
simplecov-cobertura
sprockets-rails
thwait
tsort
tzinfo
Expand Down
1 change: 0 additions & 1 deletion app/assets/config/manifest.js

This file was deleted.

1 change: 0 additions & 1 deletion app/config/manifest.js

This file was deleted.

2 changes: 0 additions & 2 deletions app/controllers/api/abstract_controller.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
require "./app/lib/celery_script/checker"

module Api
# A controller that contains all of the helper methods and shared logic for
# all API endpoints.
Expand Down
2 changes: 0 additions & 2 deletions app/controllers/api/points_controller.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
require_relative "../../lib/mutations/hstore_filter"

module Api
class PointsController < Api::AbstractController
# NOTE: Soft deleted points will be destroyed
Expand Down
2 changes: 0 additions & 2 deletions app/lib/celery_script/checker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
module CeleryScript
UNBOUND_VAR = "Unbound variable: %s"

class TypeCheckError < StandardError; end

class Checker
MISSING_ARG = "Expected node '%s' to have a '%s', but got: %s."
EXTRA_ARGS = "'%s' has unexpected arguments: %s. Allowed arguments: %s"
Expand Down
2 changes: 0 additions & 2 deletions app/lib/celery_script/first_pass.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
require_relative "./cs_heap"

# ABOUT THIS CLASS:
# CsHeap creates an in memory representation of a Flat IR tree using array
# indexes (HeapAddress instances, really). This class takes a flat IR tree
Expand Down
1 change: 0 additions & 1 deletion app/lib/celery_script/slicer.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
require_relative "./cs_heap.rb"
# ORIGINAL IMPLEMENTATION HERE: https://github.com/FarmBot-Labs/Celery-Slicer
# Take a nested ("canonical") representation of a CeleryScript sequence and
# transforms it to a flat/homogenous intermediate representation which is better
Expand Down
3 changes: 3 additions & 0 deletions app/lib/celery_script/type_check_error.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module CeleryScript
class TypeCheckError < StandardError; end
end
2 changes: 0 additions & 2 deletions app/mutations/points/create.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
require_relative "../../lib/mutations/hstore_filter.rb"

module Points
class Create < Mutations::Command
include Points::Helpers
Expand Down
2 changes: 0 additions & 2 deletions app/mutations/points/query.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
require_relative "../../lib/mutations/hstore_filter"

module Points
class Query < Mutations::Command
H_QUERY = "meta -> :key = :value"
Expand Down
2 changes: 0 additions & 2 deletions app/mutations/points/update.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
require_relative "../../lib/mutations/hstore_filter"

module Points
class Update < Mutations::Command
include Points::Helpers
Expand Down
8 changes: 3 additions & 5 deletions app/mutations/sequences/show.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
require_relative "../../lib/celery_script/cs_heap"

# Service object that:
# 1. Pulls out all PrimaryNodes and EdgeNodes for a sequence node (AST Flat IR form)
# 2. Stitches the nodes back together in their "canonical" (nested) AST
Expand Down Expand Up @@ -65,8 +63,8 @@ def copyright
def sequence_publication
# Cache the association if it's already loaded
return @sequence_publication if defined?(@sequence_publication)
@sequence_publication = sequence.association(:sequence_publication).loaded? ?
sequence.sequence_publication :
@sequence_publication = sequence.association(:sequence_publication).loaded? ?
sequence.sequence_publication :
SequencePublication.find_by(author_sequence_id: sequence.id)
end

Expand All @@ -77,7 +75,7 @@ def description
def sequence_version
# Cache the association if it's already loaded
return @sequence_version if defined?(@sequence_version)
@sequence_version = sequence.association(:sequence_version).loaded? ?
@sequence_version = sequence.association(:sequence_version).loaded? ?
sequence.sequence_version :
SequenceVersion.find_by(id: sequence_version_id)
end
Expand Down
16 changes: 10 additions & 6 deletions config/application.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
require_relative "../app/models/transport.rb"
require_relative "boot"
require_relative "../app/lib/celery_script/cs_heap"
require "rails/all"
require "active_model/railtie"
require "active_job/railtie"
require "active_record/railtie"
require "active_storage/engine"
require "action_controller/railtie"
require "action_mailer/railtie"
require "action_view/railtie"
require "action_dispatch/railtie"
require "rails/test_unit/railtie"
require_relative "./config_helpers/active_storage"

# Require the gems listed in Gemfile, including any gems
Expand All @@ -21,8 +27,8 @@ class Application < Rails::Application
"Api::RmqUtilsController#topic_action",
]
config.load_defaults 8.1
config.add_autoload_paths_to_load_path = true
config.active_storage.service = ConfigHelpers::ActiveStorage.service
config.active_storage.variant_processor = :disabled
config.cache_store = :redis_cache_store, { url: REDIS_URL, ssl_params: { verify_mode: OpenSSL::SSL::VERIFY_NONE }, pool: false }
config.middleware.use Rack::Attack
config.active_record.schema_format = :sql
Expand All @@ -45,8 +51,6 @@ class Application < Rails::Application
g.helper_specs false
g.fixture_replacement :factory_bot, :dir => "spec/factories"
end
config.autoload_paths << Rails.root.join("lib")
config.autoload_paths << Rails.root.join("lib/sequence_migrations")
config.middleware.insert_before 0, Rack::Cors do
allow do
origins "*"
Expand Down
3 changes: 0 additions & 3 deletions config/environments/development.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@
port: 1025,
}
config.active_support.deprecation = :log
# config.assets.debug = true
# config.assets.digest = true
# config.assets.raise_runtime_errors = true
config.enable_reloading = true
config.consider_all_requests_local = true
config.eager_load = false
Expand Down
1 change: 0 additions & 1 deletion config/environments/production.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
config.log_level = :info
config.action_controller.perform_caching = false
config.public_file_server.enabled = false
config.assets.compile = false
config.active_record.dump_schema_after_migration = false
# HACK AHEAD! Here's why:
# 1. FarmBot Inc. Uses Sendgrid for email.
Expand Down
1 change: 0 additions & 1 deletion config/environments/test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
config.action_mailer.delivery_method = :test
config.active_job.queue_adapter = :inline
config.active_support.deprecation = :stderr
# config.assets.debug = true
config.enable_reloading = false
config.active_support.disallowed_deprecation = :raise
config.active_support.disallowed_deprecation_warnings = []
Expand Down
4 changes: 2 additions & 2 deletions frontend/devices/timezones/__tests__/tz_list_test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { list } from "../tz_list";
import list from "../tz_list.json";

test("TZ List presence", () => {
// Not the most useful test. Might catch accidental erasure, though.
expect(list.length).toBe(588);
expect(list.length).toBe(137);
});
2 changes: 1 addition & 1 deletion frontend/devices/timezones/timezone_selector.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from "react";
import { FBSelect, DropDownItem } from "../../ui";
import { list } from "./tz_list";
import list from "./tz_list.json";
import { inferTimezone } from "./guess_timezone";
import { isString } from "lodash";
import { getModifiedClassNameDefaultFalse } from "../../settings/default_values";
Expand Down
139 changes: 139 additions & 0 deletions frontend/devices/timezones/tz_list.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
[
"Africa/Algiers",
"Africa/Cairo",
"Africa/Casablanca",
"Africa/Harare",
"Africa/Johannesburg",
"Africa/Monrovia",
"Africa/Nairobi",
"America/Argentina/Buenos_Aires",
"America/Asuncion",
"America/Bogota",
"America/Caracas",
"America/Chicago",
"America/Chihuahua",
"America/Denver",
"America/Guatemala",
"America/Guyana",
"America/Halifax",
"America/Indiana/Indianapolis",
"America/Juneau",
"America/La_Paz",
"America/Lima",
"America/Los_Angeles",
"America/Mazatlan",
"America/Mexico_City",
"America/Monterrey",
"America/Montevideo",
"America/New_York",
"America/Nuuk",
"America/Phoenix",
"America/Puerto_Rico",
"America/Regina",
"America/Santiago",
"America/Sao_Paulo",
"America/St_Johns",
"America/Tijuana",
"Asia/Almaty",
"Asia/Baghdad",
"Asia/Baku",
"Asia/Bangkok",
"Asia/Chongqing",
"Asia/Colombo",
"Asia/Dhaka",
"Asia/Hong_Kong",
"Asia/Irkutsk",
"Asia/Jakarta",
"Asia/Jerusalem",
"Asia/Kabul",
"Asia/Kamchatka",
"Asia/Karachi",
"Asia/Kathmandu",
"Asia/Kolkata",
"Asia/Krasnoyarsk",
"Asia/Kuala_Lumpur",
"Asia/Kuwait",
"Asia/Magadan",
"Asia/Muscat",
"Asia/Novosibirsk",
"Asia/Rangoon",
"Asia/Riyadh",
"Asia/Seoul",
"Asia/Shanghai",
"Asia/Singapore",
"Asia/Srednekolymsk",
"Asia/Taipei",
"Asia/Tashkent",
"Asia/Tbilisi",
"Asia/Tehran",
"Asia/Tokyo",
"Asia/Ulaanbaatar",
"Asia/Urumqi",
"Asia/Vladivostok",
"Asia/Yakutsk",
"Asia/Yekaterinburg",
"Asia/Yerevan",
"Atlantic/Azores",
"Atlantic/Cape_Verde",
"Atlantic/South_Georgia",
"Australia/Adelaide",
"Australia/Brisbane",
"Australia/Canberra",
"Australia/Darwin",
"Australia/Hobart",
"Australia/Melbourne",
"Australia/Perth",
"Australia/Sydney",
"Etc/GMT+12",
"Etc/UTC",
"Europe/Amsterdam",
"Europe/Athens",
"Europe/Belgrade",
"Europe/Berlin",
"Europe/Bratislava",
"Europe/Brussels",
"Europe/Bucharest",
"Europe/Budapest",
"Europe/Copenhagen",
"Europe/Dublin",
"Europe/Helsinki",
"Europe/Istanbul",
"Europe/Kaliningrad",
"Europe/Kiev",
"Europe/Lisbon",
"Europe/Ljubljana",
"Europe/London",
"Europe/Madrid",
"Europe/Minsk",
"Europe/Moscow",
"Europe/Paris",
"Europe/Prague",
"Europe/Riga",
"Europe/Rome",
"Europe/Samara",
"Europe/Sarajevo",
"Europe/Skopje",
"Europe/Sofia",
"Europe/Stockholm",
"Europe/Tallinn",
"Europe/Vienna",
"Europe/Vilnius",
"Europe/Volgograd",
"Europe/Warsaw",
"Europe/Zagreb",
"Europe/Zurich",
"Pacific/Apia",
"Pacific/Auckland",
"Pacific/Chatham",
"Pacific/Fakaofo",
"Pacific/Fiji",
"Pacific/Guadalcanal",
"Pacific/Guam",
"Pacific/Honolulu",
"Pacific/Majuro",
"Pacific/Midway",
"Pacific/Noumea",
"Pacific/Pago_Pago",
"Pacific/Port_Moresby",
"Pacific/Tongatapu"
]
Loading
Loading