forked from hacketyhack/hacketyhack
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Application checks the site for upgrades.
- Loading branch information
1 parent
b47d87a
commit fa81dce
Showing
5 changed files
with
35 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
require 'app/boot' | ||
|
||
require 'json' | ||
|
||
# methods for the main app | ||
module HH::App | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
require 'lib/web/hacker' | ||
require 'lib/web/web' | ||
require 'lib/web/version' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
require 'lib/web/yaml' | ||
|
||
module Upgrade | ||
class << self | ||
include HH::YAML | ||
|
||
def check_latest_version &blk | ||
http('GET', "/version.json") do |result| | ||
response = JSON.parse(result.response.body) | ||
blk[response] | ||
end | ||
end | ||
end | ||
end |