aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorNicolas Lœuillet <nicolas.loeuillet@smile.fr>2016-01-15 16:07:57 +0100
committerNicolas Lœuillet <nicolas.loeuillet@smile.fr>2016-01-15 16:07:57 +0100
commit160e2d8f0b1e4c3e9fe7f89300de22c5ef334833 (patch)
treef47c30889471bab2c4a9549c7bce8d21886ecf44
parent1930c19d8214c05ceefac5ac011a6b6e7e4a983d (diff)
downloadwallabag-160e2d8f0b1e4c3e9fe7f89300de22c5ef334833.tar.gz
wallabag-160e2d8f0b1e4c3e9fe7f89300de22c5ef334833.tar.zst
wallabag-160e2d8f0b1e4c3e9fe7f89300de22c5ef334833.zip
some cleanup:
* move capistrano config files * remove useless files
-rw-r--r--.scrutinizer.yml1
-rw-r--r--CREDITS.md4
-rw-r--r--Capfile22
-rw-r--r--GUIDELINES.md53
-rw-r--r--TRANSLATION.md67
-rw-r--r--Vagrantfile71
-rw-r--r--app/config/capistrano/deploy.rb (renamed from config/deploy.rb)0
-rw-r--r--app/config/capistrano/deploy/production.rb0
-rw-r--r--app/config/capistrano/deploy/staging.rb (renamed from config/deploy/staging.rb)0
-rw-r--r--config/deploy/production.rb61
10 files changed, 5 insertions, 274 deletions
diff --git a/.scrutinizer.yml b/.scrutinizer.yml
index 8fbd8265..dee92922 100644
--- a/.scrutinizer.yml
+++ b/.scrutinizer.yml
@@ -4,6 +4,7 @@ filter:
4 excluded_paths: 4 excluded_paths:
5 - 'vendor/*' 5 - 'vendor/*'
6 - 'app/*' 6 - 'app/*'
7 - 'var/*'
7 - 'web/*' 8 - 'web/*'
8 - 'src/Wallabag/*Bundle/Tests/*' 9 - 'src/Wallabag/*Bundle/Tests/*'
9 - '*Test.php' 10 - '*Test.php'
diff --git a/CREDITS.md b/CREDITS.md
index eb2096e0..c85924d0 100644
--- a/CREDITS.md
+++ b/CREDITS.md
@@ -1,5 +1,3 @@
1wallabag is mainly developed by [Nicolas Lœuillet](https://github.com/nicosomb) under the MIT License. 1wallabag is mainly developed by [Nicolas Lœuillet](https://github.com/nicosomb), [@j0k3r](https://github.com/j0k3r) and [@tcitworld](https://github.com/tcitworld) under the MIT License.
2
3Thank you so much to [@tcitworld](https://github.com/tcitworld) and [@j0k3r](https://github.com/j0k3r).
4 2
5Thank you [to others contributors](https://github.com/wallabag/wallabag/graphs/contributors). 3Thank you [to others contributors](https://github.com/wallabag/wallabag/graphs/contributors).
diff --git a/Capfile b/Capfile
index d3273469..b80a5646 100644
--- a/Capfile
+++ b/Capfile
@@ -1,3 +1,6 @@
1set :deploy_config_path, 'app/config/capistrano/deploy.rb'
2set :stage_config_path, 'app/config/capistrano/deploy'
3
1# Load DSL and set up stages 4# Load DSL and set up stages
2require 'capistrano/setup' 5require 'capistrano/setup'
3 6
@@ -6,24 +9,5 @@ require 'capistrano/deploy'
6 9
7require 'capistrano/symfony' 10require 'capistrano/symfony'
8 11
9# Include tasks from other gems included in your Gemfile
10#
11# For documentation on these, see for example:
12#
13# https://github.com/capistrano/rvm
14# https://github.com/capistrano/rbenv
15# https://github.com/capistrano/chruby
16# https://github.com/capistrano/bundler
17# https://github.com/capistrano/rails
18# https://github.com/capistrano/passenger
19#
20# require 'capistrano/rvm'
21# require 'capistrano/rbenv'
22# require 'capistrano/chruby'
23# require 'capistrano/bundler'
24# require 'capistrano/rails/assets'
25# require 'capistrano/rails/migrations'
26# require 'capistrano/passenger'
27
28# Load custom tasks from `lib/capistrano/tasks` if you have any defined 12# Load custom tasks from `lib/capistrano/tasks` if you have any defined
29Dir.glob('lib/capistrano/tasks/*.rake').each { |r| import r } 13Dir.glob('lib/capistrano/tasks/*.rake').each { |r| import r }
diff --git a/GUIDELINES.md b/GUIDELINES.md
deleted file mode 100644
index 51e0de93..00000000
--- a/GUIDELINES.md
+++ /dev/null
@@ -1,53 +0,0 @@
1# Guidelines for wallabag
2
3If you want to contribute to wallabag, you have some rules to respect. These rules were defined by [PHP Framework Interop Group](http://www.php-fig.org).
4
5## Basic Coding Standard (PSR-1)
6
7This section of the standard comprises what should be considered the standard coding elements that are required to ensure a high level of technical interoperability between shared PHP code.
8
9* Files MUST use only `<?php` and `<?=` tags.
10
11* Files MUST use only UTF-8 without BOM for PHP code.
12
13* Files SHOULD either declare symbols (classes, functions, constants, etc.) or cause side-effects (e.g. generate output, change .ini settings, etc.) but SHOULD NOT do both.
14
15* Namespaces and classes MUST follow [PSR-0](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.md).
16
17* Class names MUST be declared in `StudlyCaps`.
18
19* Class constants MUST be declared in all upper case with underscore separators.
20
21* Method names MUST be declared in `camelCase`.
22
23You can read details on [PHP FIG website](http://www.php-fig.org/psr/psr-1/).
24
25## Coding Style Guide (PSR-2)
26
27This guide extends and expands on PSR-1, the basic coding standard.
28
29The intent of this guide is to reduce cognitive friction when scanning code from different authors. It does so by enumerating a shared set of rules and expectations about how to format PHP code.
30
31The style rules herein are derived from commonalities among the various member projects. When various authors collaborate across multiple projects, it helps to have one set of guidelines to be used among all those projects. Thus, the benefit of this guide is not in the rules themselves, but in the sharing of those rules.
32
33* Code MUST follow PSR-1.
34
35* Code MUST use 4 spaces for indenting, not tabs.
36
37* There MUST NOT be a hard limit on line length; the soft limit MUST be 120 characters; lines SHOULD be 80 characters or less.
38
39* There MUST be one blank line after the `namespace` declaration, and there MUST be one blank line after the block of `use` declarations.
40
41* Opening braces for classes MUST go on the next line, and closing braces MUST go on the next line after the body.
42
43* Opening braces for methods MUST go on the next line, and closing braces MUST go on the next line after the body.
44
45* Visibility MUST be declared on all properties and methods; `abstract` and `final` MUST be declared before the visibility; `static` MUST be declared after the visibility.
46
47* Control structure keywords MUST have one space after them; method and function calls MUST NOT.
48
49* Opening braces for control structures MUST go on the same line, and closing braces MUST go on the next line after the body.
50
51* Opening parentheses for control structures MUST NOT have a space after them, and closing parentheses for control structures MUST NOT have a space before.
52
53You can read details on [PHP FIG website](http://www.php-fig.org/psr/psr-2/). \ No newline at end of file
diff --git a/TRANSLATION.md b/TRANSLATION.md
deleted file mode 100644
index a033662c..00000000
--- a/TRANSLATION.md
+++ /dev/null
@@ -1,67 +0,0 @@
1# How to manage translations for wallabag
2
3This guide will describe the procedure of translation management of the wallabag web application.
4
5All translations are made using [gettext](http://en.wikipedia.org/wiki/Gettext) system and tools.
6
7You will need the [Poedit](http://www.poedit.net/download.php) editor to update, edit and create your translation files easily. However, you can also handle translations also without it: all can be done using gettext tools and your favorite plain text editor only. This guide, however, describes editing with Poedit. If you want to use gettext only, please refer to the xgettext manual page to update po files from sources (see also how it is used by Poedit below) and use msgunfmt tool to compile .mo files manually.
8
9You need to know, that translation phrases are stored in **".po"** files (for example: `locale/pl_PL.utf8/LC_MESSAGES/pl_PL.utf8.po`), which are then complied in **".mo"** files using **msgfmt** gettext tool or by Poedit, which will run msgfmt for you in background.
10
11**It's assumed, that you have wallabag installed locally on your computer or on the server you have access to.**
12
13## To change existing translation you will need to do:
14
15### 1. Clear cache
16You can do this using **http://your-wallabag-host.com/?empty-cache** link (replace http://your-wallabag-host.com/ with real url of your wallabag application)
17
18OR
19
20from command line:
21go to root of your installation of wallabag project and run next command:
22
23`rm -rf ./cache/*`
24
25(this may require root privileges if you run, for example Apache web server with mod_php)
26
27### 2. Generate php files from all twig templates
28Do this using next command:
29
30`php ./locale/tools/fillCache.php`
31
32OR
33
34from your browser: **http://your-wallabag-host.com/locale/tools/fillCache.php** (this may require removal of .htaccess file in locale/ directory).
35
36### 3. Configure your Poedit
37Open Poedit editor, open Edit->Preferences. Go to "Parsers" tab, click on PHP and press "Edit" button. Make sure your "Parser command:" looks like
38
39`xgettext --no-location --force-po -o %o %C %K %F`
40
41Usually it is required to add "--no-location" to default value.
42
43### 4. Open .po file you want to edit in Poedit and change its settings
44Open, for example `locale/pl_PL.utf8/LC_MESSAGES/pl_PL.utf8.po` file in your Poedit.
45
46Go to "Catalog"->"Settings..." menu. Then go to "Path" tab and add path to wallabag installation in your local file system. This step can't be omitted as you will not be able to update phrases otherwise.
47
48You can also check "project into" tab to be sure, that "Language" is set correctly (this will allow you to spell check your translation).
49
50### 5. Update opened .po file from sources
51Once you have set your path correctly, you are able to update phrases from sources. Press "Update catalog - synchronize it with sources" button or go to "Catalog"->"Update from sources" menu.
52
53As a result you will see confirmation popup with two tabs: "New strings" and "Obsolete strings". Please review and accept changes (or press "Undo" if you see too many obsolete strings, as Poedit will remove them all - in this case please make sure all previous steps are performed w/o errors).
54
55### 6. Translate and save your .po file
56If you have any difficulties on this step, please consult with Poedit manual.
57Every time you save your .po file, Poedit will also compile appropriate .mo file by default (of course, if not disabled in preferences).
58
59You are now almost done.
60
61### 7. Clear cache again
62This step may be required if your web server runs php scripts in name of, say, www user (i.e. Apache with mod_php, not cgi).
63
64
65##To create new translation
66You just have to copy the folder corresponding to the language you want to translate from, change language in the project settings and for the folder and files names. Then start replacing all existing translations with your own.
67
diff --git a/Vagrantfile b/Vagrantfile
deleted file mode 100644
index 221ad6db..00000000
--- a/Vagrantfile
+++ /dev/null
@@ -1,71 +0,0 @@
1
2$script_sqlite = <<SCRIPT
3apt-get update
4apt-get install -y apache2 php5 php5-sqlite php5-xdebug
5apt-get clean -y
6echo "ServerName localhost" >> /etc/apache2/apache2.conf
7service apache2 restart
8rm -f /var/www/html/index.html
9date > /etc/vagrant_provisioned_at
10SCRIPT
11
12$script_mysql = <<SCRIPT
13export DEBIAN_FRONTEND=noninteractive
14apt-get update
15apt-get install -y apache2 php5 php5-mysql php5-xdebug mysql-server mysql-client
16apt-get clean -y
17echo "ServerName localhost" >> /etc/apache2/apache2.conf
18service apache2 restart
19service mysql restart
20echo "create database wallabag;" | mysql -u root
21rm -f /var/www/html/index.html
22date > /etc/vagrant_provisioned_at
23SCRIPT
24
25$script_postgres = <<SCRIPT
26export DEBIAN_FRONTEND=noninteractive
27apt-get update
28apt-get install -y apache2 php5 php5-pgsql php5-xdebug postgresql postgresql-contrib
29apt-get clean -y
30echo "ServerName localhost" >> /etc/apache2/apache2.conf
31service apache2 restart
32service postgresql restart
33rm -f /var/www/html/index.html
34date > /etc/vagrant_provisioned_at
35SCRIPT
36
37Vagrant.configure("2") do |config|
38
39 config.vm.define "sqlite" do |m|
40 m.vm.box = "ubuntu/trusty64"
41 m.vm.provision "shell", inline: $script_sqlite
42 m.vm.synced_folder ".", "/var/www/html", owner: "www-data", group: "www-data"
43 end
44
45 config.vm.define "mysql" do |m|
46 m.vm.box = "ubuntu/trusty64"
47 m.vm.provision "shell", inline: $script_mysql
48 m.vm.synced_folder ".", "/var/www/html", owner: "www-data", group: "www-data"
49 end
50
51 config.vm.define "postgres" do |m|
52 m.vm.box = "ubuntu/trusty64"
53 m.vm.provision "shell", inline: $script_postgres
54 m.vm.synced_folder ".", "/var/www/html", owner: "www-data", group: "www-data"
55 end
56
57 config.vm.define "debian7" do |m|
58 m.vm.box = "chef/debian-7.6"
59 m.vm.provision "shell", inline: $script_sqlite
60 m.vm.synced_folder ".", "/var/www", owner: "www-data", group: "www-data"
61 end
62
63 config.vm.define "debian6" do |m|
64 m.vm.box = "chef/debian-6.0.10"
65 m.vm.provision "shell", inline: $script_sqlite
66 m.vm.synced_folder ".", "/var/www", owner: "www-data", group: "www-data"
67 end
68
69 config.vm.network :forwarded_port, guest: 80, host: 8003
70 #config.vm.network "public_network", :bridge => "en0: Wi-Fi (AirPort)"
71end
diff --git a/config/deploy.rb b/app/config/capistrano/deploy.rb
index c2562965..c2562965 100644
--- a/config/deploy.rb
+++ b/app/config/capistrano/deploy.rb
diff --git a/app/config/capistrano/deploy/production.rb b/app/config/capistrano/deploy/production.rb
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/app/config/capistrano/deploy/production.rb
diff --git a/config/deploy/staging.rb b/app/config/capistrano/deploy/staging.rb
index ccd05b4d..ccd05b4d 100644
--- a/config/deploy/staging.rb
+++ b/app/config/capistrano/deploy/staging.rb
diff --git a/config/deploy/production.rb b/config/deploy/production.rb
deleted file mode 100644
index 4fc06fa9..00000000
--- a/config/deploy/production.rb
+++ /dev/null
@@ -1,61 +0,0 @@
1# server-based syntax
2# ======================
3# Defines a single server with a list of roles and multiple properties.
4# You can define all roles on a single server, or split them:
5
6# server 'example.com', user: 'deploy', roles: %w{app db web}, my_property: :my_value
7# server 'example.com', user: 'deploy', roles: %w{app web}, other_property: :other_value
8# server 'db.example.com', user: 'deploy', roles: %w{db}
9
10
11
12# role-based syntax
13# ==================
14
15# Defines a role with one or multiple servers. The primary server in each
16# group is considered to be the first unless any hosts have the primary
17# property set. Specify the username and a domain or IP for the server.
18# Don't use `:all`, it's a meta role.
19
20# role :app, %w{deploy@example.com}, my_property: :my_value
21# role :web, %w{user1@primary.com user2@additional.com}, other_property: :other_value
22# role :db, %w{deploy@example.com}
23
24
25
26# Configuration
27# =============
28# You can set any configuration variable like in config/deploy.rb
29# These variables are then only loaded and set in this stage.
30# For available Capistrano configuration variables see the documentation page.
31# http://capistranorb.com/documentation/getting-started/configuration/
32# Feel free to add new variables to customise your setup.
33
34
35
36# Custom SSH Options
37# ==================
38# You may pass any option but keep in mind that net/ssh understands a
39# limited set of options, consult the Net::SSH documentation.
40# http://net-ssh.github.io/net-ssh/classes/Net/SSH.html#method-c-start
41#
42# Global options
43# --------------
44# set :ssh_options, {
45# keys: %w(/home/rlisowski/.ssh/id_rsa),
46# forward_agent: false,
47# auth_methods: %w(password)
48# }
49#
50# The server-based syntax can be used to override options:
51# ------------------------------------
52# server 'example.com',
53# user: 'user_name',
54# roles: %w{web app},
55# ssh_options: {
56# user: 'user_name', # overrides user setting above
57# keys: %w(/home/user_name/.ssh/id_rsa),
58# forward_agent: false,
59# auth_methods: %w(publickey password)
60# # password: 'please use keys'
61# }