1
0
mirror of https://git.cloudron.io/cloudron/freshrss-app synced 2025-09-17 02:39:06 +00:00

Compare commits

..

9 Commits

Author SHA1 Message Date
Dennis Schwerdel
9ebdd87f37 Version 0.4.1 2017-05-24 20:29:08 +02:00
Dennis Schwerdel
4b4560e178 Added --wait for reconfigure in test 2017-05-24 20:28:54 +02:00
dswd
45f13f695f Merge branch 'test_api_config' into 'master'
Add test for api configuration

See merge request !4
2017-05-24 18:25:13 +00:00
Girish Ramakrishnan
7691695423 Add test for api configuration
https://github.com/FreshRSS/FreshRSS/issues/443#issuecomment-36666133
2017-05-24 11:19:30 -07:00
dswd
083b4fd832 Merge branch 'master' into 'master'
Update description

See merge request !3
2017-05-24 18:13:35 +00:00
dswd
fe944c9238 Merge branch 'FixApacheConf' into 'master'
Add parameter to allow for encoded slashes

See merge request !2
2017-05-24 18:11:31 +00:00
Girish Ramakrishnan
e26b11a102 Update description 2017-05-12 10:40:17 -07:00
Richard
91367404fe Add parameter to allow for 2%F in URLs 2017-04-27 10:14:07 +00:00
Dennis Schwerdel
497199febd Updated to 1.6.3, removed custom patches 2017-03-12 10:45:14 +01:00
9 changed files with 38 additions and 58 deletions

View File

@@ -10,3 +10,11 @@
* Using cli scripts * Using cli scripts
* Using scheduler for periodic task * Using scheduler for periodic task
* Removed update menu item * Removed update menu item
[0.4.0]
* Updated to FreshRSS 1.6.3
* Removed most custom patches (FreshRSS includes those now)
[0.4.1]
* Add parameter to allow for encoded slashes (thanks @Richard)
* Updated description (thanks @Girish)

View File

@@ -5,7 +5,7 @@
"description": "file://DESCRIPTION.md", "description": "file://DESCRIPTION.md",
"changelog": "file://CHANGELOG", "changelog": "file://CHANGELOG",
"tagline": "RSS feed reader", "tagline": "RSS feed reader",
"version": "0.3.0", "version": "0.4.1",
"healthCheckPath": "/", "healthCheckPath": "/",
"httpPort": 8000, "httpPort": 8000,
"addons": { "addons": {

View File

@@ -1,4 +1,4 @@
This app packages FreshRSS 1.6.2. This app packages FreshRSS 1.6.3.
FreshRSS is a self-hosted RSS feed aggregator such as Leed or Kriss Feed. FreshRSS is a self-hosted RSS feed aggregator such as Leed or Kriss Feed.

View File

@@ -7,7 +7,7 @@ RUN apt-get update \
&& apt-get -y install php php-curl php-gmp php-intl php-mbstring php-xml php-zip \ && apt-get -y install php php-curl php-gmp php-intl php-mbstring php-xml php-zip \
libapache2-mod-php mysql-client php-mysql libapache2-mod-php mysql-client php-mysql
ENV VERSION 1.6.2 ENV VERSION 1.6.3
ENV EXTENSIONS_VERSION eac4b749775c3e1b584c1a6b4a4487e4a4b8b159 ENV EXTENSIONS_VERSION eac4b749775c3e1b584c1a6b4a4487e4a4b8b159
RUN mkdir -p /app/code RUN mkdir -p /app/code
@@ -42,10 +42,6 @@ RUN rm /etc/apache2/sites-enabled/* \
RUN rm -rf /var/lib/php \ RUN rm -rf /var/lib/php \
&& ln -s /run/php /var/lib/php && ln -s /run/php /var/lib/php
ADD remove-update-menu.patch /app/code/remove-update-menu.patch
RUN patch -p0 -d /app/code < /app/code/remove-update-menu.patch
ADD start.sh /app/code/start.sh ADD start.sh /app/code/start.sh
ADD set_config.php /app/code/set_config.php
CMD [ "/app/code/start.sh" ] CMD [ "/app/code/start.sh" ]

View File

@@ -1,5 +1,6 @@
<VirtualHost *:8000> <VirtualHost *:8000>
DocumentRoot /app/code DocumentRoot /app/code
AllowEncodedSlashes On
ErrorLog /dev/stderr ErrorLog /dev/stderr
CustomLog /dev/stdout combined CustomLog /dev/stdout combined

View File

@@ -1,24 +0,0 @@
diff -Naru app-orig/layout/aside_configure.phtml app/layout/aside_configure.phtml
--- app-orig/layout/aside_configure.phtml 2016-12-26 15:33:47.000000000 +0000
+++ app/layout/aside_configure.phtml 2017-02-23 14:48:10.214072522 +0000
@@ -41,9 +41,5 @@
Minz_Request::actionName() === 'checkInstall' ? ' active' : ''; ?>">
<a href="<?php echo _url('update', 'checkInstall'); ?>"><?php echo _t('gen.menu.check_install'); ?></a>
</li>
- <li class="item<?php echo Minz_Request::controllerName() === 'update' &&
- Minz_Request::actionName() === 'index' ? ' active' : ''; ?>">
- <a href="<?php echo _url('update', 'index'); ?>"><?php echo _t('gen.menu.update'); ?></a>
- </li>
<?php } ?>
</ul>
diff -Naru app-orig/layout/header.phtml app/layout/header.phtml
--- app-orig/layout/header.phtml 2016-12-26 15:33:47.000000000 +0000
+++ app/layout/header.phtml 2017-02-23 14:48:31.430114487 +0000
@@ -71,7 +71,6 @@
<li class="item"><a href="<?php echo _url('user', 'manage'); ?>"><?php echo _t('gen.menu.user_management'); ?></a></li>
<li class="item"><a href="<?php echo _url('auth', 'index'); ?>"><?php echo _t('gen.menu.authentication'); ?></a></li>
<li class="item"><a href="<?php echo _url('update', 'checkInstall'); ?>"><?php echo _t('gen.menu.check_install'); ?></a></li>
- <li class="item"><a href="<?php echo _url('update', 'index'); ?>"><?php echo _t('gen.menu.update'); ?></a></li>
<?php } ?>
<li class="separator"></li>
<li class="item"><a href="<?php echo _url('stats', 'index'); ?>"><?php echo _t('gen.menu.stats'); ?></a></li>

View File

@@ -1,22 +0,0 @@
<?php
$config = include("/app/data/config.php");
$config["default_user"] = "admin";
$config["base_url"] = "https://".getenv('APP_DOMAIN')."/p";
$config["db"] = array (
"type" => "mysql",
"host" => getenv('MYSQL_HOST'),
"user" => getenv('MYSQL_USERNAME'),
"password" => getenv('MYSQL_PASSWORD'),
"base" => getenv('MYSQL_DATABASE'),
"prefix" => "",
"pdo_options" =>
array (
)
);
$config_str = var_export($config, TRUE);
file_put_contents("/app/data/config.php", "<?php return $config_str;");
?>

View File

@@ -11,8 +11,8 @@ if ! [ -f /app/data/.installed ]; then
--environment production --default_user admin \ --environment production --default_user admin \
--db-type mysql --db-host "${MYSQL_HOST}:${MYSQL_PORT}" \ --db-type mysql --db-host "${MYSQL_HOST}:${MYSQL_PORT}" \
--db-user "${MYSQL_USERNAME}" --db-password "${MYSQL_PASSWORD}" \ --db-user "${MYSQL_USERNAME}" --db-password "${MYSQL_PASSWORD}" \
--db-base "${MYSQL_DATABASE}" --db-prefix "" --db-base "${MYSQL_DATABASE}" --db-prefix "" \
php set_config.php # --db-prefix "" seems to be ignored --disable_update
php cli/create-user.php --user admin --password password --language en php cli/create-user.php --user admin --password password --language en
php cli/actualize-user.php --user admin php cli/actualize-user.php --user admin
touch /app/data/.installed touch /app/data/.installed
@@ -27,8 +27,12 @@ for f in $(ls /app/code/extensions-orig); do
done done
echo "Creating config file" echo "Updating config file"
php set_config.php php cli/reconfigure.php --default_user admin --base_url "https://${APP_DOMAIN}/p" \
--db-type mysql --db-host "${MYSQL_HOST}:${MYSQL_PORT}" \
--db-user "${MYSQL_USERNAME}" --db-password "${MYSQL_PASSWORD}" \
--db-base "${MYSQL_DATABASE}" --db-prefix "" \
--disable_update
echo "Setting permissions" echo "Setting permissions"

View File

@@ -118,6 +118,19 @@ describe('Application life cycle test', function () {
}); });
} }
function enableApi(callback) {
browser.get('https://' + app.fqdn + '/p/i/?c=auth').then(function () {
return browser.findElement(by.id('api_enabled')).click();
}).then(function () {
return browser.findElement(by.xpath('//form[@action=".?c=auth"]')).submit();
}).then(callback);
}
function checkApiConfiguration(callback) {
browser.get('https://' + app.fqdn + '/p/api/greader.php/check%2Fcompatibility').then(function () {
exists(by.xpath('//pre[text()="PASS"]'), callback);
});
}
xit('build app', function () { xit('build app', function () {
execSync('cloudron build', { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' }); execSync('cloudron build', { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
@@ -138,6 +151,8 @@ describe('Application life cycle test', function () {
it('can login', login); it('can login', login);
it('can subscribe', addSubscription); it('can subscribe', addSubscription);
it('can add users', addUser); it('can add users', addUser);
it('can enable API', enableApi);
it('can check configuration', checkApiConfiguration);
it('can logout', logout); it('can logout', logout);
it('backup app', function () { it('backup app', function () {
@@ -149,17 +164,19 @@ describe('Application life cycle test', function () {
}); });
it('can login', login); it('can login', login);
it('can check configuration', checkApiConfiguration);
it('can logout', logout); it('can logout', logout);
it('move to different location', function () { it('move to different location', function () {
browser.manage().deleteAllCookies(); browser.manage().deleteAllCookies();
execSync('cloudron configure --location ' + LOCATION + '2', { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' }); execSync('cloudron configure --wait --location ' + LOCATION + '2', { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
var inspect = JSON.parse(execSync('cloudron inspect')); var inspect = JSON.parse(execSync('cloudron inspect'));
app = inspect.apps.filter(function (a) { return a.location === LOCATION + '2'; })[0]; app = inspect.apps.filter(function (a) { return a.location === LOCATION + '2'; })[0];
expect(app).to.be.an('object'); expect(app).to.be.an('object');
}); });
it('can login', login); it('can login', login);
it('can check configuration', checkApiConfiguration);
it('can logout', logout); it('can logout', logout);
it('uninstall app', function () { it('uninstall app', function () {