Skip to content

Commit

Permalink
Merge branch 'master' into dependabot/bundler/capybara-3.13.2
Browse files Browse the repository at this point in the history
  • Loading branch information
digitaltom committed Feb 10, 2019
2 parents 9d600d7 + 8255c04 commit 46f9801
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions app/models/gpio_port.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,15 @@ class << self

def on(num)
return unless defined?(PiPiper)

unexport(num)
pin = PiPiper::Pin.new(pin: num, direction: :out)
pin.on
end

def off(num)
return unless defined?(PiPiper)

unexport(num)
pin = PiPiper::Pin.new(pin: num, direction: :out)
pin.off
Expand Down
1 change: 1 addition & 0 deletions app/models/picture_set.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ def find(date)
all_sets = PictureSet.all
ps = all_sets.detect { |set| set.date == date }
raise 'PictureSet not found' unless ps

ps.next = all_sets[all_sets.index(ps) - 1] if all_sets.size > 1
ps.last = all_sets[all_sets.index(ps) + 1] if all_sets.index(ps) < all_sets.size
ps
Expand Down
1 change: 0 additions & 1 deletion db/schema.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

# frozen_string_literal: true

# This file is auto-generated from the current state of the database. Instead
Expand Down

0 comments on commit 46f9801

Please sign in to comment.