mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-08-05 16:58:59 +00:00
Merge branch 'master' into saved_stories
* master: Adding cryptography dependency. Adding cutoff_timestamp and direction to API docs for marking a feed as read. Meant to address #542. Showing all feeds in feed chooser. Gunicorn x-forwarded-for Adding RealIP to nginx/gunicorn. Make sure all folders are visible in the feed chooser dialog Make single-story context actions always appear above multiple-story actions. (#541) fix to compatible with Python2.6 Add support for SNI and update requests.
This commit is contained in:
commit
d073971b8a
10 changed files with 37 additions and 11 deletions
|
@ -1506,7 +1506,7 @@ class Feed(models.Model):
|
||||||
|
|
||||||
self.min_to_decay = total
|
self.min_to_decay = total
|
||||||
delta = self.next_scheduled_update - datetime.datetime.now()
|
delta = self.next_scheduled_update - datetime.datetime.now()
|
||||||
minutes_to_next_fetch = delta.total_seconds() / 60
|
minutes_to_next_fetch = (delta.seconds + (delta.days * 24 * 3600)) / 60
|
||||||
if minutes_to_next_fetch > self.min_to_decay or not skip_scheduling:
|
if minutes_to_next_fetch > self.min_to_decay or not skip_scheduling:
|
||||||
self.next_scheduled_update = next_scheduled_update
|
self.next_scheduled_update = next_scheduled_update
|
||||||
if self.active_subscribers >= 1:
|
if self.active_subscribers >= 1:
|
||||||
|
|
|
@ -4,15 +4,15 @@
|
||||||
<item android:id="@+id/menu_shared"
|
<item android:id="@+id/menu_shared"
|
||||||
android:title="@string/menu_share"/>
|
android:title="@string/menu_share"/>
|
||||||
|
|
||||||
|
<item android:id="@+id/menu_mark_story_as_unread"
|
||||||
|
android:title="@string/menu_mark_unread" />
|
||||||
|
|
||||||
<item android:id="@+id/menu_mark_story_as_read"
|
<item android:id="@+id/menu_mark_story_as_read"
|
||||||
android:title="@string/menu_mark_story_as_read" />
|
android:title="@string/menu_mark_story_as_read" />
|
||||||
|
|
||||||
<item android:id="@+id/menu_mark_previous_stories_as_read"
|
<item android:id="@+id/menu_mark_previous_stories_as_read"
|
||||||
android:title="@string/menu_mark_previous_stories_as_read" />
|
android:title="@string/menu_mark_previous_stories_as_read" />
|
||||||
|
|
||||||
<item android:id="@+id/menu_mark_story_as_unread"
|
|
||||||
android:title="@string/menu_mark_unread" />
|
|
||||||
|
|
||||||
<item android:id="@+id/menu_save_story"
|
<item android:id="@+id/menu_save_story"
|
||||||
android:title="@string/menu_save_story" />
|
android:title="@string/menu_save_story" />
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,8 @@ loglevel = "debug"
|
||||||
name = "newsblur"
|
name = "newsblur"
|
||||||
timeout = 120
|
timeout = 120
|
||||||
max_requests = 1000
|
max_requests = 1000
|
||||||
x_forwarded_for_header = "X-Forwarded-For"
|
x_forwarded_for_header = "X-FORWARDED-FOR"
|
||||||
|
forwarded_allow_ips = "*"
|
||||||
|
|
||||||
if GIGS_OF_MEMORY > NUM_CPUS:
|
if GIGS_OF_MEMORY > NUM_CPUS:
|
||||||
workers = NUM_CPUS
|
workers = NUM_CPUS
|
||||||
|
|
|
@ -19,6 +19,10 @@ http {
|
||||||
keepalive_timeout 2;
|
keepalive_timeout 2;
|
||||||
client_max_body_size 4M;
|
client_max_body_size 4M;
|
||||||
|
|
||||||
|
set_real_ip_from 0.0.0.0/0;
|
||||||
|
real_ip_header X-Forwarded-For;
|
||||||
|
# real_ip_recursive on;
|
||||||
|
|
||||||
gzip on;
|
gzip on;
|
||||||
gzip_static on;
|
gzip_static on;
|
||||||
gzip_comp_level 2;
|
gzip_comp_level 2;
|
||||||
|
|
|
@ -20,6 +20,10 @@ server {
|
||||||
server_name www.newsblur.com newsblur.com dev.newsblur.com *.newsblur.com circularapp.com *.circularapp.com;
|
server_name www.newsblur.com newsblur.com dev.newsblur.com *.newsblur.com circularapp.com *.circularapp.com;
|
||||||
add_header X-nginx-server nginx_none;
|
add_header X-nginx-server nginx_none;
|
||||||
|
|
||||||
|
set_real_ip_from 0.0.0.0/0;
|
||||||
|
real_ip_header X-Forwarded-For;
|
||||||
|
real_ip_recursive on;
|
||||||
|
|
||||||
# if ($host = 'newsblur.com') {
|
# if ($host = 'newsblur.com') {
|
||||||
# rewrite ^/(.*)$ https://www.newsblur.com/$1 permanent;
|
# rewrite ^/(.*)$ https://www.newsblur.com/$1 permanent;
|
||||||
# }
|
# }
|
||||||
|
|
|
@ -37,9 +37,12 @@ raven==3.1.17
|
||||||
readline==6.2.4.1
|
readline==6.2.4.1
|
||||||
redis==2.8.0
|
redis==2.8.0
|
||||||
hiredis==0.1.1
|
hiredis==0.1.1
|
||||||
requests==1.1.0
|
requests==2.2.1
|
||||||
seacucumber==1.5
|
seacucumber==1.5
|
||||||
South==0.7.6
|
South==0.7.6
|
||||||
stripe==1.12.2
|
stripe==1.12.2
|
||||||
django-oauth-toolkit==0.5.0
|
django-oauth-toolkit==0.5.0
|
||||||
django-cors-headers==0.12
|
django-cors-headers==0.12
|
||||||
|
pyOpenSSL==0.14
|
||||||
|
pyasn1==0.1.7
|
||||||
|
ndg-httpsclient==0.3.2
|
||||||
|
|
3
fabfile.py
vendored
3
fabfile.py
vendored
|
@ -313,6 +313,7 @@ def setup_installs():
|
||||||
'libncurses5-dev',
|
'libncurses5-dev',
|
||||||
'libdbd-pg-perl',
|
'libdbd-pg-perl',
|
||||||
'libssl-dev',
|
'libssl-dev',
|
||||||
|
'libffi-dev',
|
||||||
'make',
|
'make',
|
||||||
'pgbouncer',
|
'pgbouncer',
|
||||||
'python-setuptools',
|
'python-setuptools',
|
||||||
|
@ -596,7 +597,7 @@ def setup_nginx():
|
||||||
run('tar -xzf nginx-%s.tar.gz' % NGINX_VERSION)
|
run('tar -xzf nginx-%s.tar.gz' % NGINX_VERSION)
|
||||||
run('rm nginx-%s.tar.gz' % NGINX_VERSION)
|
run('rm nginx-%s.tar.gz' % NGINX_VERSION)
|
||||||
with cd('nginx-%s' % NGINX_VERSION):
|
with cd('nginx-%s' % NGINX_VERSION):
|
||||||
run('./configure --with-http_ssl_module --with-http_stub_status_module --with-http_gzip_static_module')
|
run('./configure --with-http_ssl_module --with-http_stub_status_module --with-http_gzip_static_module --with-http_realip_module ')
|
||||||
run('make')
|
run('make')
|
||||||
sudo('make install')
|
sudo('make install')
|
||||||
config_nginx()
|
config_nginx()
|
||||||
|
|
|
@ -8127,7 +8127,9 @@ form.opml_import_form input {
|
||||||
width: auto;
|
width: auto;
|
||||||
border: 1px solid #909090;
|
border: 1px solid #909090;
|
||||||
}
|
}
|
||||||
|
.NB-modal-feedchooser .NB-feedchooser .NB-hidden {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
.NB-modal-feedchooser .NB-modal-submit.NB-modal-submit-paypal {
|
.NB-modal-feedchooser .NB-modal-submit.NB-modal-submit-paypal {
|
||||||
border-radius: 12px;
|
border-radius: 12px;
|
||||||
border: 1px solid #F6BD44;
|
border: 1px solid #F6BD44;
|
||||||
|
|
|
@ -206,6 +206,9 @@ NEWSBLUR.ReaderFeedchooser.prototype = {
|
||||||
// Pretend unfetched feeds are fine
|
// Pretend unfetched feeds are fine
|
||||||
$('.NB-feed-unfetched', $feeds).removeClass('NB-feed-unfetched');
|
$('.NB-feed-unfetched', $feeds).removeClass('NB-feed-unfetched');
|
||||||
|
|
||||||
|
// Make sure all folders are visible
|
||||||
|
$('.NB-folder.NB-hidden', $feeds).removeClass('NB-hidden');
|
||||||
|
|
||||||
$('.unread_count_positive', $feeds).text('On');
|
$('.unread_count_positive', $feeds).text('On');
|
||||||
$('.unread_count_negative', $feeds).text('Off');
|
$('.unread_count_negative', $feeds).text('Off');
|
||||||
|
|
||||||
|
|
|
@ -458,6 +458,14 @@
|
||||||
desc: "List of feed ids to mark as read."
|
desc: "List of feed ids to mark as read."
|
||||||
required: true
|
required: true
|
||||||
example: "feed_id=12&feed_id=24"
|
example: "feed_id=12&feed_id=24"
|
||||||
|
- key: cutoff_timestamp
|
||||||
|
desc: "Timestamp for older/newer cutoff."
|
||||||
|
optional: true
|
||||||
|
example: "1400777921"
|
||||||
|
- key: direction
|
||||||
|
desc: "Older or newer stories should be marked as read. Use with `cutoff_timestamp`"
|
||||||
|
optional: true
|
||||||
|
example: "older"
|
||||||
tips:
|
tips:
|
||||||
- "To mark a folder as read, send the ids of each feed inside the folder."
|
- "To mark a folder as read, send the ids of each feed inside the folder."
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue