Fix typos
parent
86e404ef3e
commit
8cf89736e5
|
@ -11,7 +11,7 @@ module Api
|
|||
end
|
||||
|
||||
private
|
||||
# Dont proceed with login if they need to sign the EULA
|
||||
# Don't proceed with login if they need to sign the EULA
|
||||
def maybe_halt_login(result)
|
||||
result.result[:user].try(:require_consent!) if result.success?
|
||||
end
|
||||
|
|
|
@ -9,7 +9,7 @@ class DashboardController < ApplicationController
|
|||
render html: THE_FRONTEND_APP, layout: false
|
||||
end
|
||||
|
||||
# Hit by Certbot / Let's Encrypt when its time to verify control of domain.
|
||||
# Hit by Certbot / Let's Encrypt when it's time to verify control of domain.
|
||||
def lets_encrypt
|
||||
render plain: ACME_SECRET
|
||||
end
|
||||
|
|
|
@ -4,7 +4,7 @@ module CeleryScript
|
|||
# Don't use this on unverified data structures.
|
||||
class JSONClimber
|
||||
HASH_ONLY = "Expected a Hash."
|
||||
NOT_NODE = "Expected hash with atleast a `kind` and `args` prop."
|
||||
NOT_NODE = "Expected hash with at least a `kind` and `args` prop."
|
||||
|
||||
def self.climb(thing, &callable)
|
||||
raise HASH_ONLY unless thing.is_a?(Hash)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Describes the allowed arguments and body types of CeleryScript node.
|
||||
# Eg: Which arguments does it take? Whic nodes can be placed in the body field?
|
||||
# Eg: Which arguments does it take? Which nodes can be placed in the body field?
|
||||
module CeleryScript
|
||||
class NodeSpecification
|
||||
attr_reader :name, :allowed_args, :allowed_body_types
|
||||
|
|
|
@ -24,7 +24,7 @@ module CeleryScript
|
|||
private
|
||||
|
||||
def self.visit_node(node, callable)
|
||||
if node.is_a?(AstNode) # Keep recursing if its not a leaf.
|
||||
if node.is_a?(AstNode) # Keep recursing if it's not a leaf.
|
||||
callable.call(node)
|
||||
visit_each_arg(node, callable)
|
||||
visit_each_body_item(node, callable)
|
||||
|
|
|
@ -21,7 +21,7 @@ module SequenceMigration
|
|||
VERSION = "YOU MUST CHANGE THIS!!!"
|
||||
|
||||
# I shouldn't need to do this, as this method comes with ActiveSupport, but
|
||||
# its acting weird with autoloading right now :shipit:. TODO: See if there
|
||||
# it's acting weird with autoloading right now :shipit:. TODO: See if there
|
||||
# is a way to automatically infer all classes
|
||||
def self.descendants
|
||||
[
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
# A regimen takes a SEQUENCES and repeats them over a fixed amount of time slots
|
||||
class Regimen < ActiveRecord::Base
|
||||
# Regimen gets pluralized strangely by Rails.
|
||||
# Ocasionally to "regimans".
|
||||
# Occasionally to "regimans".
|
||||
# This is the workaround.
|
||||
self.table_name = "regimens"
|
||||
validates :name, presence: true
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
module FarmEvents
|
||||
# Used to calculate next 60ish occurences or so of a FarmEvent.
|
||||
# Used to calculate next 60ish occurrences or so of a FarmEvent.
|
||||
class GenerateCalendar < Mutations::Command
|
||||
NEVER = FarmEvent::NEVER.to_s
|
||||
TIME = { "minutely" => 60,
|
||||
|
@ -41,7 +41,7 @@ module FarmEvents
|
|||
return Montrose
|
||||
.every(every, options)
|
||||
.take(60)
|
||||
.reject { |x| end_time ? x > (end_time + 1.second) : false } # clear events beyon the end time
|
||||
.reject { |x| end_time ? x > (end_time + 1.second) : false } # clear events beyond the end time
|
||||
.reject { |x| x <= Time.now } # Clear past events
|
||||
end
|
||||
|
||||
|
|
|
@ -51,7 +51,7 @@ class CSNode
|
|||
def arg_names
|
||||
allowed_args
|
||||
.map{ |x| ARGS[x] }
|
||||
.each { |x| raise "NON EXISTANT ARG TYPE" unless x }
|
||||
.each { |x| raise "NON-EXISTENT ARG TYPE" unless x }
|
||||
.map(&:to_ts)
|
||||
.join("")
|
||||
end
|
||||
|
|
|
@ -96,7 +96,7 @@
|
|||
// var ordered = {};
|
||||
// var fileContent;
|
||||
// try {
|
||||
// //check the file can be openned
|
||||
// //check the file can be opened
|
||||
// var stats = fs.statSync(langFilePath);
|
||||
|
||||
// // load the file
|
||||
|
@ -139,7 +139,7 @@
|
|||
// delete result[key];
|
||||
// result[key] = ordered[key];
|
||||
// }
|
||||
// // if the tag doesnt exist but a translation exists,
|
||||
// // if the tag doesn't exist but a translation exists,
|
||||
// // put the key/value at the end of the json
|
||||
// else {
|
||||
// unexistingTag[key] = ordered[key];
|
||||
|
|
|
@ -57,7 +57,7 @@ describe CeleryScript::Checker do
|
|||
end
|
||||
|
||||
it 'handles wrong leaf types' do
|
||||
hash[:body][0][:args][:location][:args][:x] = "supposed to be a Integer"
|
||||
hash[:body][0][:args][:location][:args][:x] = "supposed to be an Integer"
|
||||
result = checker.run
|
||||
expect(result.message).to eq("Expected leaf 'x' within 'coordinate' to"\
|
||||
" be one of: [Integer] but got String")
|
||||
|
|
|
@ -9,7 +9,7 @@ describe Device do
|
|||
expect(user.device).to be_kind_of(Device)
|
||||
end
|
||||
|
||||
it 'destroys dependant devices' do
|
||||
it 'destroys dependent devices' do
|
||||
bot_id = device.id
|
||||
user_id = user.id
|
||||
user.destroy
|
||||
|
|
|
@ -14,7 +14,7 @@ interface AxisStatus {
|
|||
* If neither of these are enabled, FarmBot can do some pretty dangerous things,
|
||||
* such as smashing tools and ramming into tool bays.
|
||||
*
|
||||
* This function returns a 2 dimensional array describing wether or not a particular
|
||||
* This function returns a 2 dimensional array describing whether or not a particular
|
||||
* axis has at least one of the precautions in place. Useful for checking if it is safe
|
||||
* to proceed with certain actions that could damage the bot.
|
||||
*/
|
||||
|
|
|
@ -40,7 +40,7 @@ export function timezoneMismatch(botTime: string | undefined,
|
|||
if (_.isString(botTime) && _.isString(userTime)) {
|
||||
return botTime.toUpperCase() !== userTime.toUpperCase();
|
||||
} else {
|
||||
// Dont show warnings if TZ data is unavailable.
|
||||
// Don't show warnings if TZ data is unavailable.
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -35,7 +35,7 @@ import { maybeWarnAboutMissedTasks } from "./util";
|
|||
import { TzWarning } from "./tz_warning";
|
||||
|
||||
type FormEvent = React.SyntheticEvent<HTMLInputElement>;
|
||||
/** Seperate each of the form fields into their own interface. Recombined later
|
||||
/** Separate each of the form fields into their own interface. Recombined later
|
||||
* on save.
|
||||
*/
|
||||
interface FarmEventViewModel {
|
||||
|
|
|
@ -16,7 +16,7 @@ function getUserLang(langCode = "en_us") {
|
|||
|
||||
export function detectLanguage() {
|
||||
return getUserLang(navigator.language).then(function (lang) {
|
||||
// TODO: Possiblly requires optimization using Webpack chunking.
|
||||
// TODO: Possibly requires optimization using Webpack chunking.
|
||||
let langi = require("../public/app-resources/languages/" + lang + ".js");
|
||||
return {
|
||||
nsSeparator: "",
|
||||
|
|
|
@ -35,14 +35,14 @@ function inferUpdateId(url: string) {
|
|||
try {
|
||||
let ids = url
|
||||
.split("/")
|
||||
.filter(x => !x.includes(",")) // Dont allow batch endpoints to participate.
|
||||
.filter(x => !x.includes(",")) // Don't allow batch endpoints to participate.
|
||||
.map(x => parseInt(x, 10))
|
||||
.filter(x => !_.isNaN(x));
|
||||
let id: number | undefined = ids[0];
|
||||
let isNum = _.isNumber(id);
|
||||
let onlyOne = ids.length === 1;
|
||||
return (isNum && onlyOne) ? ("" + id) : "*";
|
||||
} catch (error) { // Dont crash- just keep moving along. This is a temp patch.
|
||||
} catch (error) { // Don't crash - just keep moving along. This is a temp patch.
|
||||
return "*";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,7 +19,7 @@ function prod() {
|
|||
|
||||
export function configureStore(options = {}) {
|
||||
let store: Store = (ENV === "production" ? prod() : dev());
|
||||
// Make store global in in case I need to probe it.
|
||||
// Make store global in case I need to probe it.
|
||||
(window as any)["store"] = store;
|
||||
registerSubscribers(store);
|
||||
return store;
|
||||
|
|
|
@ -13,7 +13,7 @@ export function groupRegimenItemsByWeek(weeks: Week[], OFFSET: number,
|
|||
|
||||
return weeks
|
||||
// Collect all of the true/false values in weekX.days. These indicate
|
||||
// wether we should add a sequence on that day or not.
|
||||
// whether we should add a sequence on that day or not.
|
||||
.map((week) =>
|
||||
keys.map((key) =>
|
||||
(week.days as { [day: string]: boolean })[key]))
|
||||
|
@ -29,7 +29,7 @@ export function groupRegimenItemsByWeek(weeks: Week[], OFFSET: number,
|
|||
// lol, In band signaling.
|
||||
});
|
||||
})// [[-1, 99999, -1, -1],[.....]]
|
||||
// "flatten" the array into a 1d structure (its an array of
|
||||
// "flatten" the array into a 1d structure (it's an array of
|
||||
// number arrays right now)
|
||||
.reduce((arr, acc) => acc.concat(arr))
|
||||
// Remove -1 values (days that don't execute a sequence).
|
||||
|
|
|
@ -34,7 +34,7 @@ function remove({ regimen, dispatch }: DeleteButtonProps) {
|
|||
regimen && dispatch(deleteRegimen(regimen.uuid));
|
||||
} else {
|
||||
// Technically unreachable, but I'll keep TS happy...
|
||||
throw new Error("Tried to delete non-existant regimen");
|
||||
throw new Error("Tried to delete non-existent regimen");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -197,7 +197,7 @@ export function hasKey<T>(base: (keyof T)[]) {
|
|||
};
|
||||
}
|
||||
|
||||
/** Usefull for calculating uploads and progress bars for Promise.all */
|
||||
/** Useful for calculating uploads and progress bars for Promise.all */
|
||||
export class Progress {
|
||||
constructor(public total: number,
|
||||
public cb: ProgressCallback,
|
||||
|
|
Loading…
Reference in New Issue