Class: Symfony
- Inherits:
-
Object
- Object
- Symfony
- Defined in:
- lib/symfony/symfony.rb
Class Method Summary collapse
- .cache_clear(environment) ⇒ Object
- .cache_warm(environment) ⇒ Object
- .code_sniffer ⇒ Object
- .doctrine ⇒ Object
- .fos_oauth ⇒ Object
- .install_assets ⇒ Object
- .security_check ⇒ Object
- .start_server ⇒ Object
- .stop_server ⇒ Object
Class Method Details
.cache_clear(environment) ⇒ Object
28 29 30 31 |
# File 'lib/symfony/symfony.rb', line 28 def self.cache_clear(environment) puts '---- Warming the Symfony Cache' fail 'Failed to warm the Symfony Cache' unless system "app/console cache:clear -e #{environment}" end |
.cache_warm(environment) ⇒ Object
23 24 25 26 |
# File 'lib/symfony/symfony.rb', line 23 def self.cache_warm(environment) puts '---- Warming the Symfony Cache' fail 'Failed to warm the Symfony Cache' unless system "app/console cache:warm -e #{environment}" end |
.code_sniffer ⇒ Object
16 17 18 19 20 21 |
# File 'lib/symfony/symfony.rb', line 16 def self.code_sniffer puts '---- Getting latest SensioLabs Code Sniffer' fail 'Failed fetching the code sniffer!' unless system 'curl http://get.sensiolabs.org/php-cs-fixer.phar -o php-cs-fixer' fail 'Coding standards failed!' unless system 'php php-cs-fixer fix src/ --dry-run' fail 'Clean up failed!' unless system 'rm php-cs-fixer' end |
.doctrine ⇒ Object
3 4 5 |
# File 'lib/symfony/symfony.rb', line 3 def self.doctrine Doctrine end |
.fos_oauth ⇒ Object
7 8 9 |
# File 'lib/symfony/symfony.rb', line 7 def self.fos_oauth FosOAuth end |
.install_assets ⇒ Object
33 34 35 36 |
# File 'lib/symfony/symfony.rb', line 33 def self.install_assets puts '---- Installing Assets' fail 'Failed to install assets' unless system 'app/console assets:install' end |
.security_check ⇒ Object
11 12 13 14 |
# File 'lib/symfony/symfony.rb', line 11 def self.security_check puts '---- Running SensioLabs bundle security checker' fail 'Security check failed!' unless system 'app/console security:check' end |
.start_server ⇒ Object
38 39 40 41 |
# File 'lib/symfony/symfony.rb', line 38 def self.start_server puts '---- Starting PHP Server' fail 'Failed to start server' unless system 'app/console server:start' end |
.stop_server ⇒ Object
43 44 45 46 |
# File 'lib/symfony/symfony.rb', line 43 def self.stop_server puts '---- Stopping PHP Server' fail 'Failed to stop server' unless system 'app/console server:stop' end |