mirror of
https://github.com/Screenly/Anthias.git
synced 2025-12-23 22:38:05 -05:00
Renames Screenly references to Anthias (#1946)
This commit is contained in:
2
LICENSE
2
LICENSE
@@ -1,5 +1,5 @@
|
||||
Project is licensed under dual license: GPLv2 and Commercial License
|
||||
(see screenlyapp.com for more information).
|
||||
(see anthias.screenly.io for more information).
|
||||
|
||||
GPLv2 text follows.
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ analytics_opt_out = False
|
||||
; Player name
|
||||
player_name =
|
||||
|
||||
; Show Screenly splash screen
|
||||
; Show Anthias splash screen
|
||||
show_splash = True
|
||||
;resolution = 1920x1080
|
||||
|
||||
|
||||
@@ -50,15 +50,22 @@
|
||||
state: absent
|
||||
user: "{{ lookup('env', 'USER') }}"
|
||||
|
||||
- name: Download upgrade_screenly.sh from github repository
|
||||
- name: Download upgrade script from github repository
|
||||
ansible.builtin.get_url:
|
||||
url: https://raw.githubusercontent.com/Screenly/screenly-ose/master/bin/install.sh
|
||||
dest: /usr/local/sbin/upgrade_screenly.sh
|
||||
url: https://raw.githubusercontent.com/Screenly/Anthias/master/bin/install.sh
|
||||
dest: /usr/local/sbin/upgrade_anthias.sh
|
||||
mode: "0700"
|
||||
owner: root
|
||||
group: root
|
||||
force: true
|
||||
|
||||
- name: Remove the old upgrade script
|
||||
ansible.builtin.file:
|
||||
state: absent
|
||||
path: /usr/local/sbin/upgrade_screenly.sh
|
||||
owner: root
|
||||
group: root
|
||||
|
||||
- name: Copy screenly_overrides
|
||||
ansible.builtin.copy:
|
||||
src: screenly_overrides
|
||||
|
||||
@@ -190,7 +190,7 @@
|
||||
update_cache: true
|
||||
when: not cdefs_exist
|
||||
|
||||
- name: Install Screenly dependencies
|
||||
- name: Install Anthias dependencies
|
||||
ansible.builtin.apt:
|
||||
name:
|
||||
- rpi-update
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
- name: Install Screenly
|
||||
- name: Install Anthias
|
||||
hosts: all
|
||||
user: "{{ lookup('env', 'USER') }}"
|
||||
become: true
|
||||
|
||||
@@ -4,7 +4,7 @@ cd ~/screenly/ansible
|
||||
sudo -E ansible-playbook -t enable-ssl site.yml
|
||||
|
||||
set +x
|
||||
echo "You should be all set. You should be able to access Screenly's management interface at https://<your IP>"
|
||||
echo "You should be all set. You should be able to access Anthias' management interface at https://<your IP>"
|
||||
|
||||
echo "NOTE: If you have the firewall enabled, make sure to open it up for HTTPS (port 443)."
|
||||
echo "Assuming you're running UFW, the command is:"
|
||||
|
||||
@@ -12,7 +12,7 @@ cp -n /usr/src/app/ansible/roles/screenly/files/default_assets.yml /data/.screen
|
||||
cp -n /usr/src/app/ansible/roles/screenly/files/screenly.db /data/.screenly/screenly.db
|
||||
|
||||
if [ -n "${OVERWRITE_CONFIG}" ]; then
|
||||
echo "Requested to overwrite Screenly config file."
|
||||
echo "Requested to overwrite Anthias config file."
|
||||
cp /usr/src/app/ansible/roles/screenly/files/screenly.conf "/data/.screenly/screenly.conf"
|
||||
fi
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ chmod -f g+rwX /dev/vchiq
|
||||
|
||||
# Set permission for sha file
|
||||
chown -f viewer /dev/snd/*
|
||||
chown -f viewer /data/.screenly/latest_screenly_sha
|
||||
chown -f viewer /data/.screenly/latest_anthias_sha
|
||||
|
||||
# Fixes caching in QTWebEngine
|
||||
mkdir -p /data/.local/share/ScreenlyWebview/QtWebEngine \
|
||||
|
||||
@@ -118,7 +118,7 @@ class BasicAuth(Auth):
|
||||
return 'auth_basic.html', {'user': self.settings['user']}
|
||||
|
||||
def authenticate(self):
|
||||
realm = "Screenly OSE {}".format(self.settings['player_name'])
|
||||
realm = "Anthias OSE {}".format(self.settings['player_name'])
|
||||
return Response("Access denied", 401, {"WWW-Authenticate": 'Basic realm="{}"'.format(realm)})
|
||||
|
||||
def update_settings(self, current_pass_correct):
|
||||
|
||||
@@ -6,7 +6,7 @@ from datetime import datetime
|
||||
from os import path, getenv, makedirs, remove
|
||||
|
||||
directories = ['.screenly', 'screenly_assets']
|
||||
default_archive_name = "screenly-backup"
|
||||
default_archive_name = "anthias-backup"
|
||||
static_dir = "screenly/static"
|
||||
|
||||
|
||||
|
||||
@@ -48,10 +48,10 @@ def get_uptime():
|
||||
|
||||
|
||||
def get_playlist():
|
||||
screenly_db = os.path.join(os.getenv('HOME'), '.screenly/screenly.db')
|
||||
anthias_db = os.path.join(os.getenv('HOME'), '.screenly/screenly.db')
|
||||
playlist = []
|
||||
if os.path.isfile(screenly_db):
|
||||
conn = sqlite3.connect(screenly_db)
|
||||
if os.path.isfile(anthias_db):
|
||||
conn = sqlite3.connect(anthias_db)
|
||||
c = conn.cursor()
|
||||
for row in c.execute('SELECT * FROM assets;'):
|
||||
playlist.append(row)
|
||||
|
||||
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,11 +1,11 @@
|
||||
{
|
||||
"name": "screenly-ose",
|
||||
"name": "anthias",
|
||||
"version": "1.0.0",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "screenly-ose",
|
||||
"name": "anthias",
|
||||
"version": "1.0.0",
|
||||
"dependencies": {
|
||||
"bootstrap": "^4.3.1",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "screenly-ose",
|
||||
"name": "anthias",
|
||||
"version": "1.0.0",
|
||||
"scripts": {
|
||||
"coffee-dev": "coffee --compile --map --watch static/js/*.coffee",
|
||||
|
||||
19
server.py
19
server.py
@@ -74,7 +74,7 @@ HOME = getenv('HOME')
|
||||
app = Flask(__name__)
|
||||
|
||||
CORS(app)
|
||||
api = Api(app, api_version="v1", title="Screenly OSE API")
|
||||
api = Api(app, api_version="v1", title="Anthias API")
|
||||
|
||||
r = connect_to_redis()
|
||||
|
||||
@@ -96,7 +96,8 @@ def api_error(error):
|
||||
|
||||
|
||||
def template(template_name, **context):
|
||||
"""Screenly template response generator. Shares the
|
||||
"""
|
||||
This is a template response wrapper that shares the
|
||||
same function signature as Flask's render_template() method
|
||||
but also injects some global context."""
|
||||
|
||||
@@ -1127,7 +1128,7 @@ class Recover(Resource):
|
||||
publisher.send_to_viewer('play')
|
||||
|
||||
|
||||
class RebootScreenly(Resource):
|
||||
class Reboot(Resource):
|
||||
method_decorators = [api_response, authorized]
|
||||
|
||||
@swagger.doc({
|
||||
@@ -1142,7 +1143,7 @@ class RebootScreenly(Resource):
|
||||
return '', 200
|
||||
|
||||
|
||||
class ShutdownScreenly(Resource):
|
||||
class Shutdown(Resource):
|
||||
method_decorators = [api_response, authorized]
|
||||
|
||||
@swagger.doc({
|
||||
@@ -1307,8 +1308,8 @@ api.add_resource(Backup, '/api/v1/backup')
|
||||
api.add_resource(Recover, '/api/v1/recover')
|
||||
api.add_resource(AssetsControl, '/api/v1/assets/control/<command>')
|
||||
api.add_resource(Info, '/api/v1/info')
|
||||
api.add_resource(RebootScreenly, '/api/v1/reboot')
|
||||
api.add_resource(ShutdownScreenly, '/api/v1/shutdown')
|
||||
api.add_resource(Reboot, '/api/v1/reboot')
|
||||
api.add_resource(Shutdown, '/api/v1/shutdown')
|
||||
api.add_resource(ViewerCurrentAsset, '/api/v1/viewer_current_asset')
|
||||
|
||||
try:
|
||||
@@ -1330,7 +1331,7 @@ else:
|
||||
SWAGGER_URL,
|
||||
API_URL,
|
||||
config={
|
||||
'app_name': "Screenly OSE API"
|
||||
'app_name': "Anthias API"
|
||||
}
|
||||
)
|
||||
app.register_blueprint(swaggerui_blueprint, url_prefix=SWAGGER_URL)
|
||||
@@ -1483,7 +1484,7 @@ def system_info():
|
||||
|
||||
raspberry_pi_model = raspberry_pi_helper.parse_cpu_info().get('model', "Unknown")
|
||||
|
||||
screenly_version = '{}@{}'.format(
|
||||
version = '{}@{}'.format(
|
||||
diagnostics.get_git_branch(),
|
||||
diagnostics.get_git_short_hash()
|
||||
)
|
||||
@@ -1499,7 +1500,7 @@ def system_info():
|
||||
display_info=display_info,
|
||||
display_power=display_power,
|
||||
raspberry_pi_model=raspberry_pi_model,
|
||||
screenly_version=screenly_version,
|
||||
version=version,
|
||||
mac_address=get_node_mac_address(),
|
||||
is_balena=is_balena_app(),
|
||||
)
|
||||
|
||||
@@ -65,8 +65,8 @@ requests_log.setLevel(logging.WARNING)
|
||||
logging.debug('Starting viewer.py')
|
||||
|
||||
|
||||
class ScreenlySettings(UserDict):
|
||||
"""Screenly OSE's Settings."""
|
||||
class AnthiasSettings(UserDict):
|
||||
"""Anthias' Settings."""
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
UserDict.__init__(self, *args, **kwargs)
|
||||
@@ -146,7 +146,7 @@ class ScreenlySettings(UserDict):
|
||||
return self.auth_backends[self['auth_backend']]
|
||||
|
||||
|
||||
settings = ScreenlySettings()
|
||||
settings = AnthiasSettings()
|
||||
|
||||
|
||||
class ZmqPublisher(object):
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
|
||||
describe "Screenly Open Source", ->
|
||||
describe "Anthias", ->
|
||||
|
||||
it "should have a Screenly object at its root", ->
|
||||
expect(Screenly).toBeDefined()
|
||||
it "should have a Anthias object at its root", ->
|
||||
expect(Anthias).toBeDefined()
|
||||
|
||||
|
||||
describe "date_to", ->
|
||||
|
||||
test_date = new Date(2014, 5, 6, 14, 20, 0, 0);
|
||||
a_date = Screenly.date_to(test_date);
|
||||
a_date = Anthias.date_to(test_date);
|
||||
|
||||
it "should format date and time as 'MM/DD/YYYY hh:mm:ss A'", ->
|
||||
expect(a_date.string()).toBe '06/06/2014 02:20:00 PM'
|
||||
@@ -24,12 +24,12 @@ describe "Screenly Open Source", ->
|
||||
|
||||
describe "Asset model", ->
|
||||
it "should exist", ->
|
||||
expect(Screenly.Asset).toBeDefined()
|
||||
expect(Anthias.Asset).toBeDefined()
|
||||
|
||||
start_date = new Date(2014, 4, 6, 14, 20, 0, 0);
|
||||
end_date = new Date();
|
||||
end_date.setMonth(end_date.getMonth() + 2)
|
||||
asset = new Screenly.Asset({
|
||||
asset = new Anthias.Asset({
|
||||
asset_id: 2
|
||||
duration: "8"
|
||||
end_date: end_date
|
||||
@@ -37,7 +37,7 @@ describe "Screenly Open Source", ->
|
||||
mimetype: 'webpage'
|
||||
name: 'Test'
|
||||
start_date: start_date
|
||||
uri: 'http://www.screenlyapp.com'
|
||||
uri: 'https://anthias.screenly.io'
|
||||
})
|
||||
|
||||
it "should be active if enabled and date is in range", ->
|
||||
@@ -71,7 +71,7 @@ describe "Screenly Open Source", ->
|
||||
expect(asset.get 'is_enabled').toBe true
|
||||
expect(asset.get 'name').toBe 'Test'
|
||||
expect(asset.get 'start_date').toBe start_date
|
||||
expect(asset.get 'uri').toBe "http://www.screenlyapp.com"
|
||||
expect(asset.get 'uri').toBe "https://anthias.screenly.io"
|
||||
|
||||
it "should erase backup date after rollback", ->
|
||||
asset.set({
|
||||
@@ -94,33 +94,33 @@ describe "Screenly Open Source", ->
|
||||
|
||||
describe "Assets", ->
|
||||
it "should exist", ->
|
||||
expect(Screenly.Assets).toBeDefined()
|
||||
expect(Anthias.Assets).toBeDefined()
|
||||
|
||||
it "should use the Asset model", ->
|
||||
assets = new Screenly.Assets()
|
||||
expect(assets.model).toBe Screenly.Asset
|
||||
assets = new Anthias.Assets()
|
||||
expect(assets.model).toBe Anthias.Asset
|
||||
|
||||
it "should keep play order of assets", ->
|
||||
assets = new Screenly.Assets()
|
||||
asset1 = new Screenly.Asset({
|
||||
assets = new Anthias.Assets()
|
||||
asset1 = new Anthias.Asset({
|
||||
asset_id: 1
|
||||
is_enabled: true
|
||||
name: 'AAA'
|
||||
uri: 'http://www.screenlyapp.com',
|
||||
uri: 'https://anthias.screenly.io',
|
||||
play_order: 2
|
||||
})
|
||||
asset2 = new Screenly.Asset({
|
||||
asset2 = new Anthias.Asset({
|
||||
asset_id: 2
|
||||
is_enabled: true
|
||||
name: 'BBB'
|
||||
uri: 'http://www.screenlyapp.com',
|
||||
uri: 'https://anthias.screenly.io',
|
||||
play_order: 1
|
||||
})
|
||||
asset3 = new Screenly.Asset({
|
||||
asset3 = new Anthias.Asset({
|
||||
asset_id: 3
|
||||
is_enabled: true
|
||||
name: 'CCC'
|
||||
uri: 'http://www.screenlyapp.com',
|
||||
uri: 'https://anthias.screenly.io',
|
||||
play_order: 0
|
||||
})
|
||||
|
||||
@@ -141,13 +141,13 @@ describe "Screenly Open Source", ->
|
||||
describe "Views", ->
|
||||
|
||||
it "should have AddAssetView", ->
|
||||
expect(Screenly.View.AddAssetView).toBeDefined()
|
||||
expect(Anthias.View.AddAssetView).toBeDefined()
|
||||
|
||||
it "should have EditAssetView", ->
|
||||
expect(Screenly.View.EditAssetView).toBeDefined()
|
||||
expect(Anthias.View.EditAssetView).toBeDefined()
|
||||
|
||||
it "should have AssetRowView", ->
|
||||
expect(Screenly.View.AssetRowView).toBeDefined()
|
||||
expect(Anthias.View.AssetRowView).toBeDefined()
|
||||
|
||||
it "should have AssetsView", ->
|
||||
expect(Screenly.View.AssetsView).toBeDefined()
|
||||
expect(Anthias.View.AssetsView).toBeDefined()
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
### screenly-ose ui ###
|
||||
### anthias ui ###
|
||||
|
||||
$().ready ->
|
||||
$('#subsribe-form-container').popover content: get_template 'subscribe-form'
|
||||
|
||||
|
||||
API = (window.Screenly ||= {}) # exports
|
||||
API = (window.Anthias ||= {}) # exports
|
||||
|
||||
dateSettings = {}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Generated by CoffeeScript 1.12.7
|
||||
|
||||
/* screenly-ose ui */
|
||||
/* anthias ui */
|
||||
|
||||
(function() {
|
||||
var API, AddAssetView, App, Asset, AssetRowView, Assets, AssetsView, EditAssetView, dateSettings, date_to, delay, domains, durationSecondsToHumanReadable, getMimetype, get_filename, get_template, insertWbr, mimetypes, now, truncate_str, url_test, viduris,
|
||||
@@ -16,7 +16,7 @@
|
||||
});
|
||||
});
|
||||
|
||||
API = (window.Screenly || (window.Screenly = {}));
|
||||
API = (window.Anthias || (window.Anthias = {}));
|
||||
|
||||
dateSettings = {};
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -1,5 +1,5 @@
|
||||
jQuery(function() {
|
||||
Screenly.app = new Screenly.App({
|
||||
Anthias.app = new Anthias.App({
|
||||
el: $('body')
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
// Generated by CoffeeScript 1.12.5
|
||||
(function() {
|
||||
describe("Screenly Open Source", function() {
|
||||
it("should have a Screenly object at its root", function() {
|
||||
return expect(Screenly).toBeDefined();
|
||||
describe("Anthias Open Source", function() {
|
||||
it("should have a Anthias object at its root", function() {
|
||||
return expect(Anthias).toBeDefined();
|
||||
});
|
||||
describe("date_to", function() {
|
||||
var a_date, test_date;
|
||||
test_date = new Date(2014, 5, 6, 14, 20, 0, 0);
|
||||
a_date = Screenly.date_to(test_date);
|
||||
a_date = Anthias.date_to(test_date);
|
||||
it("should format date and time as 'MM/DD/YYYY hh:mm:ss A'", function() {
|
||||
return expect(a_date.string()).toBe('06/06/2014 02:20:00 PM');
|
||||
});
|
||||
@@ -22,12 +22,12 @@
|
||||
return describe("Asset model", function() {
|
||||
var asset, end_date, start_date;
|
||||
it("should exist", function() {
|
||||
return expect(Screenly.Asset).toBeDefined();
|
||||
return expect(Anthias.Asset).toBeDefined();
|
||||
});
|
||||
start_date = new Date(2014, 4, 6, 14, 20, 0, 0);
|
||||
end_date = new Date();
|
||||
end_date.setMonth(end_date.getMonth() + 2);
|
||||
asset = new Screenly.Asset({
|
||||
asset = new Anthias.Asset({
|
||||
asset_id: 2,
|
||||
duration: "8",
|
||||
end_date: end_date,
|
||||
@@ -35,7 +35,7 @@
|
||||
mimetype: 'webpage',
|
||||
name: 'Test',
|
||||
start_date: start_date,
|
||||
uri: 'http://www.screenlyapp.com'
|
||||
uri: 'https://anthias.screenly.io'
|
||||
});
|
||||
it("should be active if enabled and date is in range", function() {
|
||||
return expect(asset.active()).toBe(true);
|
||||
@@ -64,7 +64,7 @@
|
||||
expect(asset.get('is_enabled')).toBe(true);
|
||||
expect(asset.get('name')).toBe('Test');
|
||||
expect(asset.get('start_date')).toBe(start_date);
|
||||
return expect(asset.get('uri')).toBe("http://www.screenlyapp.com");
|
||||
return expect(asset.get('uri')).toBe("https://anthias.screenly.io");
|
||||
});
|
||||
return it("should erase backup date after rollback", function() {
|
||||
asset.set({
|
||||
@@ -85,35 +85,35 @@
|
||||
describe("Collections", function() {
|
||||
return describe("Assets", function() {
|
||||
it("should exist", function() {
|
||||
return expect(Screenly.Assets).toBeDefined();
|
||||
return expect(Anthias.Assets).toBeDefined();
|
||||
});
|
||||
it("should use the Asset model", function() {
|
||||
var assets;
|
||||
assets = new Screenly.Assets();
|
||||
return expect(assets.model).toBe(Screenly.Asset);
|
||||
assets = new Anthias.Assets();
|
||||
return expect(assets.model).toBe(Anthias.Asset);
|
||||
});
|
||||
return it("should keep play order of assets", function() {
|
||||
var asset1, asset2, asset3, assets;
|
||||
assets = new Screenly.Assets();
|
||||
asset1 = new Screenly.Asset({
|
||||
assets = new Anthias.Assets();
|
||||
asset1 = new Anthias.Asset({
|
||||
asset_id: 1,
|
||||
is_enabled: true,
|
||||
name: 'AAA',
|
||||
uri: 'http://www.screenlyapp.com',
|
||||
uri: 'https://anthias.screenly.io',
|
||||
play_order: 2
|
||||
});
|
||||
asset2 = new Screenly.Asset({
|
||||
asset2 = new Anthias.Asset({
|
||||
asset_id: 2,
|
||||
is_enabled: true,
|
||||
name: 'BBB',
|
||||
uri: 'http://www.screenlyapp.com',
|
||||
uri: 'https://anthias.screenly.io',
|
||||
play_order: 1
|
||||
});
|
||||
asset3 = new Screenly.Asset({
|
||||
asset3 = new Anthias.Asset({
|
||||
asset_id: 3,
|
||||
is_enabled: true,
|
||||
name: 'CCC',
|
||||
uri: 'http://www.screenlyapp.com',
|
||||
uri: 'https://anthias.screenly.io',
|
||||
play_order: 0
|
||||
});
|
||||
assets.add([asset1, asset2, asset3]);
|
||||
@@ -131,16 +131,16 @@
|
||||
});
|
||||
return describe("Views", function() {
|
||||
it("should have AddAssetView", function() {
|
||||
return expect(Screenly.View.AddAssetView).toBeDefined();
|
||||
return expect(Anthias.View.AddAssetView).toBeDefined();
|
||||
});
|
||||
it("should have EditAssetView", function() {
|
||||
return expect(Screenly.View.EditAssetView).toBeDefined();
|
||||
return expect(Anthias.View.EditAssetView).toBeDefined();
|
||||
});
|
||||
it("should have AssetRowView", function() {
|
||||
return expect(Screenly.View.AssetRowView).toBeDefined();
|
||||
return expect(Anthias.View.AssetRowView).toBeDefined();
|
||||
});
|
||||
return it("should have AssetsView", function() {
|
||||
return expect(Screenly.View.AssetsView).toBeDefined();
|
||||
return expect(Anthias.View.AssetsView).toBeDefined();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
<link href="/static/favicons/favicon-128.png" rel="icon" sizes="128x128" type="image/png"/>
|
||||
<link href="https://fonts.googleapis.com/css?family=Plus Jakarta Sans" rel="stylesheet">
|
||||
<link rel="icon" href="/static/favicons/favicon.ico">
|
||||
<meta content="screenly-ose;" name="application-name"/>
|
||||
<meta content="anthias;" name="application-name"/>
|
||||
<meta content="#FFFFFF" name="msapplication-TileColor"/>
|
||||
<meta content="/static/favicons/mstile-144x144.png" name="msapplication-TileImage"/>
|
||||
<meta content="/static/favicons/mstile-70x70.png" name="msapplication-square70x70logo"/>
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">Anthias Version</th>
|
||||
<td>{{ context.screenly_version }}</td>
|
||||
<td>{{ context.version }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">MAC Address</th>
|
||||
|
||||
@@ -11,7 +11,7 @@ home = getenv('HOME')
|
||||
class BackupHelperTest(unittest.TestCase):
|
||||
def setUp(self):
|
||||
self.dt = datetime(2016, 7, 19, 12, 42, 12)
|
||||
self.expected_archive_name = 'screenly-backup-2016-07-19T12-42-12.tar.gz'
|
||||
self.expected_archive_name = 'anthias-backup-2016-07-19T12-42-12.tar.gz'
|
||||
self.assertFalse(path.isdir(path.join(home, static_dir)))
|
||||
|
||||
def tearDown(self):
|
||||
|
||||
@@ -77,7 +77,7 @@ class SettingsTest(unittest.TestCase):
|
||||
shutil.rmtree(CONFIG_DIR)
|
||||
os.getenv = self.orig_getenv
|
||||
|
||||
def test_screenly_should_exit_if_no_settings_file_found(self):
|
||||
def test_anthias_should_exit_if_no_settings_file_found(self):
|
||||
new_env = os.environ.copy()
|
||||
new_env["HOME"] = "/tmp"
|
||||
project_dir = os.path.dirname(__file__)
|
||||
|
||||
@@ -13,10 +13,10 @@ fancy_sha = 'deadbeaf'
|
||||
|
||||
class UpdateTest(unittest.TestCase):
|
||||
def setUp(self):
|
||||
self.get_configdir_m = mock.patch('settings.ScreenlySettings.get_configdir', mock.MagicMock(return_value='/tmp/.screenly/'))
|
||||
self.get_configdir_m = mock.patch('settings.AnthiasSettings.get_configdir', mock.MagicMock(return_value='/tmp/.screenly/'))
|
||||
self.get_configdir_m.start()
|
||||
|
||||
self.sha_file = settings.get_configdir() + 'latest_screenly_sha'
|
||||
self.sha_file = settings.get_configdir() + 'latest_anthias_sha'
|
||||
|
||||
if not os.path.exists(settings.get_configdir()):
|
||||
os.mkdir(settings.get_configdir())
|
||||
|
||||
@@ -27,7 +27,7 @@ class WebSocketTranslator(object):
|
||||
ws.close()
|
||||
|
||||
|
||||
class ScreenlyServerListener(Thread):
|
||||
class AnthiasServerListener(Thread):
|
||||
def __init__(self, context):
|
||||
Thread.__init__(self)
|
||||
self.context = context
|
||||
@@ -47,7 +47,7 @@ class ScreenlyServerListener(Thread):
|
||||
|
||||
if __name__ == "__main__":
|
||||
context = zmq.Context()
|
||||
listener = ScreenlyServerListener(context)
|
||||
listener = AnthiasServerListener(context)
|
||||
listener.start()
|
||||
|
||||
port = int(settings['websocket_port'])
|
||||
|
||||
Reference in New Issue
Block a user