fix minor spelling errors

pull/1170/head^2
gabrielburnworth 2019-04-23 11:42:11 -07:00
parent 922d088c70
commit ac5c14780b
5 changed files with 9 additions and 9 deletions

View File

@ -20,7 +20,7 @@ module CeleryScriptSettingsBag
"BoxLed3" => BoxLed,
"BoxLed4" => BoxLed }
ALLOWED_AXIS = %w(x y z all)
ALLOWED_CHAGES = %w(add remove update)
ALLOWED_CHANGES = %w(add remove update)
ALLOWED_CHANNEL_NAMES = %w(ticker toast email espeak)
ALLOWED_LHS_STRINGS = [*(0..69)].map { |x| "pin#{x}" }.concat(%w(x y z))
ALLOWED_LHS_TYPES = [String, :named_pin]
@ -94,7 +94,7 @@ module CeleryScriptSettingsBag
ALLOWED_PIN_MODES: [ALLOWED_PIN_MODES, BAD_ALLOWED_PIN_MODES],
AllowedPinTypes: [ALLOWED_PIN_TYPES, BAD_PIN_TYPE],
Color: [Sequence::COLORS, MISC_ENUM_ERR],
DataChangeType: [ALLOWED_CHAGES, MISC_ENUM_ERR],
DataChangeType: [ALLOWED_CHANGES, MISC_ENUM_ERR],
LegalSequenceKind: [ALLOWED_RPC_NODES.sort, MISC_ENUM_ERR],
lhs: [ALLOWED_LHS_STRINGS, BAD_LHS],
PlantStage: [PLANT_STAGES, MISC_ENUM_ERR],
@ -211,7 +211,7 @@ module CeleryScriptSettingsBag
blk: ->(node) do
x = [ALLOWED_LHS_STRINGS, node, BAD_LHS]
# This would never have happened if we hadn't allowed
# heterogenus args :(
# heterogenous args :(
manual_enum(*x) unless node.is_a?(CeleryScript::AstNode)
end,
},

View File

@ -7,10 +7,10 @@ class FarmwareEnv < ApplicationRecord
PRIMITIVES_ONLY = "`value` must be a string, number or boolean"
def primitives_only
errors.add(:value, PRIMITIVES_ONLY) unless is_primitve
errors.add(:value, PRIMITIVES_ONLY) unless is_primitive
end
def is_primitve
def is_primitive
[String, Integer, Float, TrueClass, FalseClass].include?(value.class)
end
end

View File

@ -115,7 +115,7 @@ namespace :api do
(pair.head > current_version) && (pair.tail < cutoff)
end
.sort_by { |p| p.tail } # Sort by release date
.last(2) # Grab 2 latest versions (closest to cuttof)
.last(2) # Grab 2 latest versions (closest to cutoff)
.first # Give 'em some leeway, grabbing the 2nd most outdated version.
.try(:head) # We might already be up-to-date?
if data # ...or not

View File

@ -51,7 +51,7 @@ def prompt(query)
output.length == 0 ? nil : output
end
def mutliline_prompt(query)
def multiline_prompt(query)
puts "=== #{query}"
puts "TYPE @@@ TO FINISH"
buffer = []
@ -71,7 +71,7 @@ namespace :broadcast do
href: prompt("(optional) Enter href"),
href_label: prompt("(optional) Enter href label"),
title: prompt("Enter title"),
content: mutliline_prompt("Enter content"))
content: multiline_prompt("Enter content"))
puts "DONE"
end
end

View File

@ -31,7 +31,7 @@ def fetch_available_upgrades()
return latest_versions
end
# Install depdendency updates.
# Install dependency updates.
def install_updates
sh "sudo docker-compose run web npm install"
end