mirror of
https://code.mensbeam.com/MensBeam/Arsse.git
synced 2024-12-22 21:22:40 +00:00
Added Composer file and re-arranged dependent libs
This commit is contained in:
parent
3a9753fd22
commit
9491d082ed
5 changed files with 41 additions and 22 deletions
7
.gitignore
vendored
7
.gitignore
vendored
|
@ -1,8 +1,7 @@
|
||||||
#dependencies
|
#dependencies
|
||||||
vendor/simplepie
|
vendor
|
||||||
vendor/JKingWeb/DrUUID
|
!vendor/jkingweb/newssync
|
||||||
vendor/org
|
composer.lock
|
||||||
vendor/Webmozart
|
|
||||||
|
|
||||||
#temp files
|
#temp files
|
||||||
cache/*
|
cache/*
|
||||||
|
|
|
@ -7,15 +7,7 @@ const NS_BASE = __NAMESPACE__."\\";
|
||||||
|
|
||||||
if(!defined(NS_BASE."INSTALL")) define(NS_BASE."INSTALL", false);
|
if(!defined(NS_BASE."INSTALL")) define(NS_BASE."INSTALL", false);
|
||||||
|
|
||||||
spl_autoload_register(function ($class) {
|
require_once BASE."vendor".DIRECTORY_SEPARATOR."autoload.php";
|
||||||
if($class=="SimplePie") return;
|
|
||||||
$file = str_replace("\\", DIRECTORY_SEPARATOR, $class);
|
|
||||||
$file = BASE."vendor".DIRECTORY_SEPARATOR.$file.".php";
|
|
||||||
if (file_exists($file)) {
|
|
||||||
require_once $file;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
ignore_user_abort(true);
|
ignore_user_abort(true);
|
||||||
|
|
||||||
$data = new RuntimeData(new Conf());
|
$data = new RuntimeData(new Conf());
|
35
composer.json
Normal file
35
composer.json
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
{
|
||||||
|
"name": "jkingweb/arsse",
|
||||||
|
"type": "library",
|
||||||
|
"description": "TODO",
|
||||||
|
"keywords": ["rss"],
|
||||||
|
"license": "MIT",
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "J. King",
|
||||||
|
"email": "jking@jkingweb.ca",
|
||||||
|
"homepage": "https://jkingweb.ca/"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Dustin Wilson",
|
||||||
|
"email": "dustin@dustinwilson.com",
|
||||||
|
"homepage": "https://dustinwilson.com/"
|
||||||
|
}
|
||||||
|
|
||||||
|
],
|
||||||
|
"require": {
|
||||||
|
"php": "^7.0.0",
|
||||||
|
"simplepie/simplepie": "^1.4.3",
|
||||||
|
"jkingweb/druuid": "^3.0.0",
|
||||||
|
"phpseclib/phpseclib": "^2.0.4",
|
||||||
|
"webmozart/glob": "^4.1.0"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"mikey179/vfsStream": "^1.6.4"
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"JKingWeb\\NewsSync\\": "vendor/jkingweb/newssync/"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -19,11 +19,11 @@ class TestLang extends \PHPUnit\Framework\TestCase {
|
||||||
'en-us.php' => '<?php return ["Test.presentText" => "and the Sorcerer\'s Stone"];',
|
'en-us.php' => '<?php return ["Test.presentText" => "and the Sorcerer\'s Stone"];',
|
||||||
'fr.php' => '<?php return ["Test.presentText" => "à l\'école des sorciers"];',
|
'fr.php' => '<?php return ["Test.presentText" => "à l\'école des sorciers"];',
|
||||||
'ja.php' => '<?php return ["Test.absentText" => "賢者の石"];',
|
'ja.php' => '<?php return ["Test.absentText" => "賢者の石"];',
|
||||||
|
'de.php' => '<?php return ["Test.presentText" => "und der Stein der Weisen"];',
|
||||||
// corrupt files
|
// corrupt files
|
||||||
'it.php' => '<?php return 0;',
|
'it.php' => '<?php return 0;',
|
||||||
'zh.php' => '<?php return 0',
|
'zh.php' => '<?php return 0',
|
||||||
'ko.php' => 'DEAD BEEF',
|
'ko.php' => 'DEAD BEEF',
|
||||||
// empty file
|
|
||||||
'fr-ca.php' => '',
|
'fr-ca.php' => '',
|
||||||
// unreadable file
|
// unreadable file
|
||||||
'ru.php' => '',
|
'ru.php' => '',
|
||||||
|
|
|
@ -5,14 +5,7 @@ namespace JKingWeb\NewsSync;
|
||||||
const BASE = __DIR__.DIRECTORY_SEPARATOR."..".DIRECTORY_SEPARATOR;
|
const BASE = __DIR__.DIRECTORY_SEPARATOR."..".DIRECTORY_SEPARATOR;
|
||||||
const NS_BASE = __NAMESPACE__."\\";
|
const NS_BASE = __NAMESPACE__."\\";
|
||||||
|
|
||||||
spl_autoload_register(function ($class) {
|
require_once BASE."vendor".DIRECTORY_SEPARATOR."autoload.php";
|
||||||
if($class=="SimplePie") return;
|
|
||||||
$file = str_replace("\\", DIRECTORY_SEPARATOR, $class);
|
|
||||||
$file = BASE."vendor".DIRECTORY_SEPARATOR.$file.".php";
|
|
||||||
if (file_exists($file)) {
|
|
||||||
require_once $file;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
trait TestingHelpers {
|
trait TestingHelpers {
|
||||||
function assertException(string $msg, string $prefix = "", string $type = "Exception") {
|
function assertException(string $msg, string $prefix = "", string $type = "Exception") {
|
||||||
|
|
Loading…
Reference in a new issue