Skip to content

Commit

Permalink
Merge branch 'development'
Browse files Browse the repository at this point in the history
  • Loading branch information
akbooer committed Feb 26, 2018
2 parents b108e6d + a5a8d05 commit 47cc8e6
Show file tree
Hide file tree
Showing 26 changed files with 1,696 additions and 749 deletions.
Binary file modified Documentation/openLuup User Guide.pdf
Binary file not shown.
6 changes: 5 additions & 1 deletion Utilities/openLuup_install.lua
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
-- first-time download and install of openLuup files from GitHub

-- 2018.02.17 add local ./www/ directory

local lua = "lua5.1" -- change this to "lua" if required

local x = os.execute
local p = print

p "openLuup_install 2016.06.08 @akbooer"
p "openLuup_install 2017.03.28 @akbooer"

local http = require "socket.http"
local https = require "ssl.https"
Expand Down Expand Up @@ -36,8 +38,10 @@ _, code = http.request{
assert (code == 200, "GitHub download failed with code " .. code)

p "creating required files and folders"
lfs.mkdir "www"
lfs.mkdir "files"
lfs.mkdir "icons"
lfs.mkdir "backup" -- thanks @a-lurker

local vfs = require "openLuup.virtualfilesystem"

Expand Down
40 changes: 34 additions & 6 deletions openLuup/L_AltAppStore.lua
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
ABOUT = {
NAME = "AltAppStore",
VERSION = "2016.11.23",
VERSION = "2018.02.24",
DESCRIPTION = "update plugins from Alternative App Store",
AUTHOR = "@akbooer / @amg0 / @vosmont",
COPYRIGHT = "(c) 2013-2016",
COPYRIGHT = "(c) 2013-2018",
DOCUMENTATION = "https://github.com/akbooer/AltAppStore",
}

Expand Down Expand Up @@ -43,8 +43,12 @@ and partially modelled on the InstalledPlugins2 structure in Vera user_data.
-- 2016.11.23 don't allow spaces in pathnames
-- see: http://forum.micasaverde.com/index.php/topic,40406.msg299810.html#msg299810

-- 2018.02.24 upgrade SSL encryption to tls v1.2 after GitHub deprecation of v1 protocol


local https = require "ssl.https"
local lfs = require "lfs"
local ltn12 = require "ltn12"

local json
local Vera = luup.attr_get "SvnVersion"
Expand Down Expand Up @@ -163,16 +167,40 @@ local _ = {
function GitHub (archive) -- global for access by other modules

-- get and decode GitHub url

local function git_request (request)
local decoded, errmsg
local response = https.request (request)
if response then
local decoded
local response = {}
local errmsg
local r, c, h, s = https.request {
url = request,
sink = ltn12.sink.table(response),
protocol = "tlsv1_2"
}
response = table.concat (response)
_log ("GitHub request: " .. request)
if r then
decoded, errmsg = json.decode (response)
else
errmsg = response
errmsg = c
_log ("ERROR: " .. (errmsg or "unknown"))
end
return decoded, errmsg
end

-- local function git_request (request)
-- local decoded
-- local response, errmsg = https.request (request)
-- _log ("GitHub request: " .. request)
-- if response then
-- decoded, errmsg = json.decode (response)
-- else
-- _log ("ERROR: " .. (errmsg or "unknown"))
-- errmsg = response
-- end
-- return decoded, errmsg
-- end


-- return a table of tagged releases, indexed by name,
-- with GitHub structure including commit info
Expand Down
Loading

0 comments on commit 47cc8e6

Please sign in to comment.