namespace :firmware do

desc "Turn cellular connectivity on or off for a device. Turning cellular on is rake firmware:cellular[on].  Turning it off is rake firmware:cellular[off]."
task :cellular, [:state] => [:environment] do |task, args|
  states = ["on", "off"]
  unless states.include?(args[:state])
    puts "#{args[:state]} is not a supported option.  The supported options are: #{states.to_s}"
  else
    Apiotics::Hardware.cellular(args[:state])
  end
end

end