diff options
-rw-r--r-- | docs/en/user/errors_during_fetching.rst | 4 | ||||
-rw-r--r-- | docs/en/user/installation.rst | 5 | ||||
-rw-r--r-- | docs/fr/user/errors_during_fetching.rst | 4 | ||||
-rw-r--r-- | docs/fr/user/installation.rst | 6 | ||||
-rw-r--r-- | src/Wallabag/CoreBundle/Command/InstallCommand.php | 19 | ||||
-rw-r--r-- | src/Wallabag/CoreBundle/Tests/Command/InstallCommandTest.php | 54 |
6 files changed, 53 insertions, 39 deletions
diff --git a/docs/en/user/errors_during_fetching.rst b/docs/en/user/errors_during_fetching.rst index d3efc848..da6ee745 100644 --- a/docs/en/user/errors_during_fetching.rst +++ b/docs/en/user/errors_during_fetching.rst | |||
@@ -12,9 +12,9 @@ There may be several reasons: | |||
12 | How can I help to fix that? | 12 | How can I help to fix that? |
13 | --------------------------- | 13 | --------------------------- |
14 | 14 | ||
15 | - `by sending us an email with the article's URL <mailto:hello@wallabag.org>`_ | 15 | - `by sending us an email with the article's URL <mailto:hello\@wallabag.org>`_ |
16 | - by trying to fix this article by yourself :) by creating a file for the article. | 16 | - by trying to fix this article by yourself :) by creating a file for the article. |
17 | You can use this tool http://siteconfig.fivefilters.org/. | 17 | You can use `this tool <http://siteconfig.fivefilters.org/>`__. |
18 | 18 | ||
19 | How can I try to re-fetch this article? | 19 | How can I try to re-fetch this article? |
20 | --------------------------------------- | 20 | --------------------------------------- |
diff --git a/docs/en/user/installation.rst b/docs/en/user/installation.rst index 2c6b0331..216a8607 100644 --- a/docs/en/user/installation.rst +++ b/docs/en/user/installation.rst | |||
@@ -42,7 +42,7 @@ Install Composer: | |||
42 | 42 | ||
43 | curl -s http://getcomposer.org/installer | php | 43 | curl -s http://getcomposer.org/installer | php |
44 | 44 | ||
45 | You can find specific instructions here : __ https://getcomposer.org/doc/00-intro.md | 45 | You can find specific instructions `here <https://getcomposer.org/doc/00-intro.md>`__: |
46 | 46 | ||
47 | To install wallabag itself, you must run these two commands: | 47 | To install wallabag itself, you must run these two commands: |
48 | 48 | ||
@@ -64,8 +64,7 @@ And access wallabag at http://yourserverip:8000 | |||
64 | 64 | ||
65 | .. note:: | 65 | .. note:: |
66 | 66 | ||
67 | To define parameters with environment variables, you have to set these variables with ``SYMFONY__`` prefix. For example, ``SYMFONY__DATABASE_DRIVER``. You can have a look to the `Symfony documentation | 67 | To define parameters with environment variables, you have to set these variables with ``SYMFONY__`` prefix. For example, ``SYMFONY__DATABASE_DRIVER``. You can have a look to the `Symfony documentation <http://symfony.com/doc/current/cookbook/configuration/external_parameters.html>`__. |
68 | <http://symfony.com/doc/current/cookbook/configuration/external_parameters.html>`__. | ||
69 | 68 | ||
70 | Installing on Apache | 69 | Installing on Apache |
71 | -------------------- | 70 | -------------------- |
diff --git a/docs/fr/user/errors_during_fetching.rst b/docs/fr/user/errors_during_fetching.rst index 34a6ce18..0f26fbc8 100644 --- a/docs/fr/user/errors_during_fetching.rst +++ b/docs/fr/user/errors_during_fetching.rst | |||
@@ -12,9 +12,9 @@ Il peut y avoir plusieurs raisons : | |||
12 | Comment puis-je aider pour réparer ça ? | 12 | Comment puis-je aider pour réparer ça ? |
13 | --------------------------------------- | 13 | --------------------------------------- |
14 | 14 | ||
15 | - `en nous envoyant un email avec l'URL de l'article <mailto:hello@wallabag.org>`_ | 15 | - `en nous envoyant un email avec l'URL de l'article <mailto:hello\@wallabag.org>`_ |
16 | - en essayant de réparer cet article par vous-même :) en créant un fichier pour l'article. | 16 | - en essayant de réparer cet article par vous-même :) en créant un fichier pour l'article. |
17 | Vous pouvez utiliser cet outil http://siteconfig.fivefilters.org/. | 17 | Vous pouvez utiliser `cet outil <http://siteconfig.fivefilters.org/>`__. |
18 | 18 | ||
19 | Comment puis-je réessayer de récupérer le contenu ? | 19 | Comment puis-je réessayer de récupérer le contenu ? |
20 | --------------------------------------------------- | 20 | --------------------------------------------------- |
diff --git a/docs/fr/user/installation.rst b/docs/fr/user/installation.rst index 0a1da6c8..3c647aac 100644 --- a/docs/fr/user/installation.rst +++ b/docs/fr/user/installation.rst | |||
@@ -40,7 +40,7 @@ Installation de Composer : | |||
40 | 40 | ||
41 | curl -s http://getcomposer.org/installer | php | 41 | curl -s http://getcomposer.org/installer | php |
42 | 42 | ||
43 | Vous pouvez trouver des instructions spécifiques ici (en anglais) : __ https://getcomposer.org/doc/00-intro.md | 43 | Vous pouvez trouver des instructions spécifiques `ici (en anglais) <https://getcomposer.org/doc/00-intro.md>`__ : |
44 | 44 | ||
45 | Pour installer wallabag, vous devez exécuter ces deux commandes : | 45 | Pour installer wallabag, vous devez exécuter ces deux commandes : |
46 | 46 | ||
@@ -61,9 +61,7 @@ Pour démarrer le serveur interne à php et vérifier que tout s'est installé c | |||
61 | Et accéder wallabag à l'adresse http://lipdevotreserveur:8000 | 61 | Et accéder wallabag à l'adresse http://lipdevotreserveur:8000 |
62 | 62 | ||
63 | .. note:: | 63 | .. note:: |
64 | 64 | Pour définir des paramètres via des variables d'environnement, vous pouvez les spécifier avec le préfixe ``SYMFONY__``. Par exemple, ``SYMFONY__DATABASE_DRIVER``. Vous pouvez lire `documentation Symfony <http://symfony.com/doc/current/cookbook/configuration/external_parameters.html>`__ pour en savoir plus. | |
65 | Pour définir des paramètres via des variables d'environnement, vous pouvez les spécifier avec le préfixe ``SYMFONY__``. Par exemple, ``SYMFONY__DATABASE_DRIVER``. Vous pouvez lire `documentation Symfony | ||
66 | <http://symfony.com/doc/current/cookbook/configuration/external_parameters.html>`__ pour en savoir plus. | ||
67 | 65 | ||
68 | Installation avec Apache | 66 | Installation avec Apache |
69 | ------------------------ | 67 | ------------------------ |
diff --git a/src/Wallabag/CoreBundle/Command/InstallCommand.php b/src/Wallabag/CoreBundle/Command/InstallCommand.php index 2e4a59df..e56ee4af 100644 --- a/src/Wallabag/CoreBundle/Command/InstallCommand.php +++ b/src/Wallabag/CoreBundle/Command/InstallCommand.php | |||
@@ -60,6 +60,7 @@ class InstallCommand extends ContainerAwareCommand | |||
60 | ->checkRequirements() | 60 | ->checkRequirements() |
61 | ->setupDatabase() | 61 | ->setupDatabase() |
62 | ->setupAdmin() | 62 | ->setupAdmin() |
63 | ->setupConfig() | ||
63 | ->setupAsset() | 64 | ->setupAsset() |
64 | ; | 65 | ; |
65 | 66 | ||
@@ -69,7 +70,7 @@ class InstallCommand extends ContainerAwareCommand | |||
69 | 70 | ||
70 | protected function checkRequirements() | 71 | protected function checkRequirements() |
71 | { | 72 | { |
72 | $this->defaultOutput->writeln('<info><comment>Step 1 of 4.</comment> Checking system requirements.</info>'); | 73 | $this->defaultOutput->writeln('<info><comment>Step 1 of 5.</comment> Checking system requirements.</info>'); |
73 | 74 | ||
74 | $fulfilled = true; | 75 | $fulfilled = true; |
75 | 76 | ||
@@ -119,7 +120,7 @@ class InstallCommand extends ContainerAwareCommand | |||
119 | 120 | ||
120 | protected function setupDatabase() | 121 | protected function setupDatabase() |
121 | { | 122 | { |
122 | $this->defaultOutput->writeln('<info><comment>Step 2 of 4.</comment> Setting up database.</info>'); | 123 | $this->defaultOutput->writeln('<info><comment>Step 2 of 5.</comment> Setting up database.</info>'); |
123 | 124 | ||
124 | // user want to reset everything? Don't care about what is already here | 125 | // user want to reset everything? Don't care about what is already here |
125 | if (true === $this->defaultInput->getOption('reset')) { | 126 | if (true === $this->defaultInput->getOption('reset')) { |
@@ -190,7 +191,7 @@ class InstallCommand extends ContainerAwareCommand | |||
190 | 191 | ||
191 | protected function setupAdmin() | 192 | protected function setupAdmin() |
192 | { | 193 | { |
193 | $this->defaultOutput->writeln('<info><comment>Step 3 of 4.</comment> Administration setup.</info>'); | 194 | $this->defaultOutput->writeln('<info><comment>Step 3 of 5.</comment> Administration setup.</info>'); |
194 | 195 | ||
195 | $questionHelper = $this->getHelperSet()->get('question'); | 196 | $questionHelper = $this->getHelperSet()->get('question'); |
196 | $question = new ConfirmationQuestion('Would you like to create a new admin user (recommended) ? (Y/n)', true); | 197 | $question = new ConfirmationQuestion('Would you like to create a new admin user (recommended) ? (Y/n)', true); |
@@ -227,6 +228,16 @@ class InstallCommand extends ContainerAwareCommand | |||
227 | 228 | ||
228 | $em->persist($config); | 229 | $em->persist($config); |
229 | 230 | ||
231 | $this->defaultOutput->writeln(''); | ||
232 | |||
233 | return $this; | ||
234 | } | ||
235 | |||
236 | protected function setupConfig() | ||
237 | { | ||
238 | $this->defaultOutput->writeln('<info><comment>Step 4 of 5.</comment> Config setup.</info>'); | ||
239 | $em = $this->getContainer()->get('doctrine.orm.entity_manager'); | ||
240 | |||
230 | // cleanup before insert new stuff | 241 | // cleanup before insert new stuff |
231 | $em->createQuery('DELETE FROM CraueConfigBundle:Setting')->execute(); | 242 | $em->createQuery('DELETE FROM CraueConfigBundle:Setting')->execute(); |
232 | 243 | ||
@@ -365,7 +376,7 @@ class InstallCommand extends ContainerAwareCommand | |||
365 | 376 | ||
366 | protected function setupAsset() | 377 | protected function setupAsset() |
367 | { | 378 | { |
368 | $this->defaultOutput->writeln('<info><comment>Step 4 of 4.</comment> Installing assets.</info>'); | 379 | $this->defaultOutput->writeln('<info><comment>Step 5 of 5.</comment> Installing assets.</info>'); |
369 | 380 | ||
370 | $this | 381 | $this |
371 | ->runCommand('assets:install') | 382 | ->runCommand('assets:install') |
diff --git a/src/Wallabag/CoreBundle/Tests/Command/InstallCommandTest.php b/src/Wallabag/CoreBundle/Tests/Command/InstallCommandTest.php index bb8fb888..bd61f750 100644 --- a/src/Wallabag/CoreBundle/Tests/Command/InstallCommandTest.php +++ b/src/Wallabag/CoreBundle/Tests/Command/InstallCommandTest.php | |||
@@ -67,10 +67,11 @@ class InstallCommandTest extends WallabagCoreTestCase | |||
67 | 'command' => $command->getName(), | 67 | 'command' => $command->getName(), |
68 | )); | 68 | )); |
69 | 69 | ||
70 | $this->assertContains('Step 1 of 4. Checking system requirements.', $tester->getDisplay()); | 70 | $this->assertContains('Checking system requirements.', $tester->getDisplay()); |
71 | $this->assertContains('Step 2 of 4. Setting up database.', $tester->getDisplay()); | 71 | $this->assertContains('Setting up database.', $tester->getDisplay()); |
72 | $this->assertContains('Step 3 of 4. Administration setup.', $tester->getDisplay()); | 72 | $this->assertContains('Administration setup.', $tester->getDisplay()); |
73 | $this->assertContains('Step 4 of 4. Installing assets.', $tester->getDisplay()); | 73 | $this->assertContains('Config setup.', $tester->getDisplay()); |
74 | $this->assertContains('Installing assets.', $tester->getDisplay()); | ||
74 | } | 75 | } |
75 | 76 | ||
76 | public function testRunInstallCommandWithReset() | 77 | public function testRunInstallCommandWithReset() |
@@ -97,11 +98,12 @@ class InstallCommandTest extends WallabagCoreTestCase | |||
97 | '--reset' => true, | 98 | '--reset' => true, |
98 | )); | 99 | )); |
99 | 100 | ||
100 | $this->assertContains('Step 1 of 4. Checking system requirements.', $tester->getDisplay()); | 101 | $this->assertContains('Checking system requirements.', $tester->getDisplay()); |
101 | $this->assertContains('Step 2 of 4. Setting up database.', $tester->getDisplay()); | 102 | $this->assertContains('Setting up database.', $tester->getDisplay()); |
102 | $this->assertContains('Droping database, creating database and schema, clearing the cache', $tester->getDisplay()); | 103 | $this->assertContains('Droping database, creating database and schema, clearing the cache', $tester->getDisplay()); |
103 | $this->assertContains('Step 3 of 4. Administration setup.', $tester->getDisplay()); | 104 | $this->assertContains('Administration setup.', $tester->getDisplay()); |
104 | $this->assertContains('Step 4 of 4. Installing assets.', $tester->getDisplay()); | 105 | $this->assertContains('Config setup.', $tester->getDisplay()); |
106 | $this->assertContains('Installing assets.', $tester->getDisplay()); | ||
105 | 107 | ||
106 | // we force to reset everything | 108 | // we force to reset everything |
107 | $this->assertContains('Droping database, creating database and schema, clearing the cache', $tester->getDisplay()); | 109 | $this->assertContains('Droping database, creating database and schema, clearing the cache', $tester->getDisplay()); |
@@ -142,10 +144,11 @@ class InstallCommandTest extends WallabagCoreTestCase | |||
142 | 'command' => $command->getName(), | 144 | 'command' => $command->getName(), |
143 | )); | 145 | )); |
144 | 146 | ||
145 | $this->assertContains('Step 1 of 4. Checking system requirements.', $tester->getDisplay()); | 147 | $this->assertContains('Checking system requirements.', $tester->getDisplay()); |
146 | $this->assertContains('Step 2 of 4. Setting up database.', $tester->getDisplay()); | 148 | $this->assertContains('Setting up database.', $tester->getDisplay()); |
147 | $this->assertContains('Step 3 of 4. Administration setup.', $tester->getDisplay()); | 149 | $this->assertContains('Administration setup.', $tester->getDisplay()); |
148 | $this->assertContains('Step 4 of 4. Installing assets.', $tester->getDisplay()); | 150 | $this->assertContains('Config setup.', $tester->getDisplay()); |
151 | $this->assertContains('Installing assets.', $tester->getDisplay()); | ||
149 | 152 | ||
150 | // the current database doesn't already exist | 153 | // the current database doesn't already exist |
151 | $this->assertContains('Creating database and schema, clearing the cache', $tester->getDisplay()); | 154 | $this->assertContains('Creating database and schema, clearing the cache', $tester->getDisplay()); |
@@ -179,10 +182,11 @@ class InstallCommandTest extends WallabagCoreTestCase | |||
179 | 'command' => $command->getName(), | 182 | 'command' => $command->getName(), |
180 | )); | 183 | )); |
181 | 184 | ||
182 | $this->assertContains('Step 1 of 4. Checking system requirements.', $tester->getDisplay()); | 185 | $this->assertContains('Checking system requirements.', $tester->getDisplay()); |
183 | $this->assertContains('Step 2 of 4. Setting up database.', $tester->getDisplay()); | 186 | $this->assertContains('Setting up database.', $tester->getDisplay()); |
184 | $this->assertContains('Step 3 of 4. Administration setup.', $tester->getDisplay()); | 187 | $this->assertContains('Administration setup.', $tester->getDisplay()); |
185 | $this->assertContains('Step 4 of 4. Installing assets.', $tester->getDisplay()); | 188 | $this->assertContains('Config setup.', $tester->getDisplay()); |
189 | $this->assertContains('Installing assets.', $tester->getDisplay()); | ||
186 | 190 | ||
187 | $this->assertContains('Droping schema and creating schema', $tester->getDisplay()); | 191 | $this->assertContains('Droping schema and creating schema', $tester->getDisplay()); |
188 | } | 192 | } |
@@ -233,10 +237,11 @@ class InstallCommandTest extends WallabagCoreTestCase | |||
233 | 'command' => $command->getName(), | 237 | 'command' => $command->getName(), |
234 | )); | 238 | )); |
235 | 239 | ||
236 | $this->assertContains('Step 1 of 4. Checking system requirements.', $tester->getDisplay()); | 240 | $this->assertContains('Checking system requirements.', $tester->getDisplay()); |
237 | $this->assertContains('Step 2 of 4. Setting up database.', $tester->getDisplay()); | 241 | $this->assertContains('Setting up database.', $tester->getDisplay()); |
238 | $this->assertContains('Step 3 of 4. Administration setup.', $tester->getDisplay()); | 242 | $this->assertContains('Administration setup.', $tester->getDisplay()); |
239 | $this->assertContains('Step 4 of 4. Installing assets.', $tester->getDisplay()); | 243 | $this->assertContains('Config setup.', $tester->getDisplay()); |
244 | $this->assertContains('Installing assets.', $tester->getDisplay()); | ||
240 | 245 | ||
241 | $this->assertContains('Creating schema', $tester->getDisplay()); | 246 | $this->assertContains('Creating schema', $tester->getDisplay()); |
242 | } | 247 | } |
@@ -265,9 +270,10 @@ class InstallCommandTest extends WallabagCoreTestCase | |||
265 | '--no-interaction' => true, | 270 | '--no-interaction' => true, |
266 | )); | 271 | )); |
267 | 272 | ||
268 | $this->assertContains('Step 1 of 4. Checking system requirements.', $tester->getDisplay()); | 273 | $this->assertContains('Checking system requirements.', $tester->getDisplay()); |
269 | $this->assertContains('Step 2 of 4. Setting up database.', $tester->getDisplay()); | 274 | $this->assertContains('Setting up database.', $tester->getDisplay()); |
270 | $this->assertContains('Step 3 of 4. Administration setup.', $tester->getDisplay()); | 275 | $this->assertContains('Administration setup.', $tester->getDisplay()); |
271 | $this->assertContains('Step 4 of 4. Installing assets.', $tester->getDisplay()); | 276 | $this->assertContains('Config setup.', $tester->getDisplay()); |
277 | $this->assertContains('Installing assets.', $tester->getDisplay()); | ||
272 | } | 278 | } |
273 | } | 279 | } |