-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 6b4b43a
Showing
308 changed files
with
45,030 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# phpstorm project files | ||
.idea | ||
|
||
# netbeans project files | ||
nbproject | ||
|
||
# zend studio for eclipse project files | ||
.buildpath | ||
.project | ||
.settings | ||
|
||
# windows thumbnail cache | ||
Thumbs.db | ||
|
||
# composer vendor dir | ||
/vendor | ||
|
||
# composer itself is not needed | ||
composer.phar | ||
|
||
# Mac DS_Store Files | ||
.DS_Store | ||
|
||
# phpunit itself is not needed | ||
phpunit.phar | ||
# local phpunit config | ||
/phpunit.xml | ||
|
||
tests/_output/* | ||
tests/_support/_generated | ||
|
||
#vagrant folder | ||
/.vagrant | ||
!/vendor/zxbodya/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
php_value max_execution_time 600 | ||
|
||
Options +FollowSymLinks | ||
IndexIgnore */* | ||
RewriteEngine On | ||
|
||
RewriteCond %{REQUEST_URI} !^/(web) | ||
RewriteRule ^assets/(.*)$ /web/assets/$1 [L] | ||
RewriteRule ^css/(.*)$ web/css/$1 [L] | ||
RewriteRule ^js/(.*)$ web/js/$1 [L] | ||
RewriteRule ^images/(.*)$ web/images/$1 [L] | ||
RewriteRule (.*) /web/$1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
Copyright © 2008 by Yii Software LLC (http://www.yiisoft.com) | ||
All rights reserved. | ||
|
||
Redistribution and use in source and binary forms, with or without | ||
modification, are permitted provided that the following conditions | ||
are met: | ||
|
||
* Redistributions of source code must retain the above copyright | ||
notice, this list of conditions and the following disclaimer. | ||
* Redistributions in binary form must reproduce the above copyright | ||
notice, this list of conditions and the following disclaimer in | ||
the documentation and/or other materials provided with the | ||
distribution. | ||
* Neither the name of Yii Software LLC nor the names of its | ||
contributors may be used to endorse or promote products derived | ||
from this software without specific prior written permission. | ||
|
||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | ||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS | ||
FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE | ||
COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, | ||
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, | ||
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER | ||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN | ||
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||
POSSIBILITY OF SUCH DAMAGE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
require 'yaml' | ||
require 'fileutils' | ||
|
||
required_plugins = %w( vagrant-hostmanager vagrant-vbguest ) | ||
required_plugins.each do |plugin| | ||
exec "vagrant plugin install #{plugin}" unless Vagrant.has_plugin? plugin | ||
end | ||
|
||
domains = { | ||
app: 'yii2basic.test' | ||
} | ||
|
||
vagrantfile_dir_path = File.dirname(__FILE__) | ||
|
||
config = { | ||
local: vagrantfile_dir_path + '/vagrant/config/vagrant-local.yml', | ||
example: vagrantfile_dir_path + '/vagrant/config/vagrant-local.example.yml' | ||
} | ||
|
||
# copy config from example if local config not exists | ||
FileUtils.cp config[:example], config[:local] unless File.exist?(config[:local]) | ||
# read config | ||
options = YAML.load_file config[:local] | ||
|
||
# check github token | ||
if options['github_token'].nil? || options['github_token'].to_s.length != 40 | ||
puts "You must place REAL GitHub token into configuration:\n/yii2-app-basic/vagrant/config/vagrant-local.yml" | ||
exit | ||
end | ||
|
||
# vagrant configurate | ||
Vagrant.configure(2) do |config| | ||
# select the box | ||
config.vm.box = 'bento/ubuntu-16.04' | ||
|
||
# should we ask about box updates? | ||
config.vm.box_check_update = options['box_check_update'] | ||
|
||
config.vm.provider 'virtualbox' do |vb| | ||
# machine cpus count | ||
vb.cpus = options['cpus'] | ||
# machine memory size | ||
vb.memory = options['memory'] | ||
# machine name (for VirtualBox UI) | ||
vb.name = options['machine_name'] | ||
end | ||
|
||
# machine name (for vagrant console) | ||
config.vm.define options['machine_name'] | ||
|
||
# machine name (for guest machine console) | ||
config.vm.hostname = options['machine_name'] | ||
|
||
# network settings | ||
config.vm.network 'private_network', ip: options['ip'] | ||
|
||
# sync: folder 'yii2-app-advanced' (host machine) -> folder '/app' (guest machine) | ||
config.vm.synced_folder './', '/app', owner: 'vagrant', group: 'vagrant' | ||
|
||
# disable folder '/vagrant' (guest machine) | ||
config.vm.synced_folder '.', '/vagrant', disabled: true | ||
|
||
# hosts settings (host machine) | ||
config.vm.provision :hostmanager | ||
config.hostmanager.enabled = true | ||
config.hostmanager.manage_host = true | ||
config.hostmanager.ignore_private_ip = false | ||
config.hostmanager.include_offline = true | ||
config.hostmanager.aliases = domains.values | ||
|
||
# quick fix for failed guest additions installations | ||
# config.vbguest.auto_update = false | ||
|
||
# provisioners | ||
config.vm.provision 'shell', path: './vagrant/provision/once-as-root.sh', args: [options['timezone']] | ||
config.vm.provision 'shell', path: './vagrant/provision/once-as-vagrant.sh', args: [options['github_token']], privileged: false | ||
config.vm.provision 'shell', path: './vagrant/provision/always-as-root.sh', run: 'always' | ||
|
||
# post-install message (vagrant console) | ||
config.vm.post_up_message = "App URL: http://#{domains[:app]}" | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?php | ||
/** | ||
* @link http://www.yiiframework.com/ | ||
* @copyright Copyright (c) 2008 Yii Software LLC | ||
* @license http://www.yiiframework.com/license/ | ||
*/ | ||
|
||
namespace app\assets; | ||
|
||
use yii\web\AssetBundle; | ||
|
||
/** | ||
* Main application asset bundle. | ||
* | ||
* @author Qiang Xue <[email protected]> | ||
* @since 2.0 | ||
*/ | ||
class AppAsset extends AssetBundle | ||
{ | ||
public $basePath = '@webroot'; | ||
public $baseUrl = '@web'; | ||
public $css = [ | ||
'css/site.css', | ||
'css/customStyle.css', | ||
]; | ||
public $js = [ | ||
]; | ||
public $depends = [ | ||
'yii\web\YiiAsset', | ||
'yii\bootstrap\BootstrapAsset', | ||
]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<?php | ||
|
||
namespace app\assets; | ||
|
||
use yii\web\AssetBundle; | ||
|
||
class SiteAsset extends AssetBundle | ||
{ | ||
public $basePath = '@webroot'; | ||
public $baseUrl = '@web'; | ||
public $jsOptions = ['position' => \yii\web\View::POS_HEAD]; | ||
public $css = [ | ||
'css/animate.css', | ||
'css/icomoon.css', | ||
'css/magnific-popup.css', | ||
'css/owl.carousel.min.css', | ||
'css/owl.theme.default.min.css', | ||
'css/style.css', | ||
]; | ||
public $js = [ | ||
'//ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js',//'js/jquery.min.js', | ||
'js/jquery.easing.1.3.js', | ||
'js/jquery.countTo.js', | ||
'js/jquery.stellar.min.js', | ||
'js/jquery.magnific-popup.min.js', | ||
'js/jquery.waypoints.min.js', | ||
'js/modernizr-2.6.2.min.js', | ||
'js/respond.min.js', | ||
'js/owl.carousel.min.js', | ||
'js/magnific-popup-options.js', | ||
'js/main.js', | ||
'js/simplyCountdown.js', | ||
'js/simplyCountup.js', | ||
]; | ||
public $depends = [ | ||
'yii\web\YiiAsset', | ||
'yii\bootstrap\BootstrapAsset', | ||
]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
actor: Tester | ||
paths: | ||
tests: tests | ||
log: tests/_output | ||
data: tests/_data | ||
helpers: tests/_support | ||
settings: | ||
bootstrap: _bootstrap.php | ||
memory_limit: 1024M | ||
colors: true | ||
modules: | ||
config: | ||
Yii2: | ||
configFile: 'config/test.php' | ||
|
||
# To enable code coverage: | ||
#coverage: | ||
# #c3_url: http://localhost:8080/index-test.php/ | ||
# enabled: true | ||
# #remote: true | ||
# #remote_config: '../codeception.yml' | ||
# whitelist: | ||
# include: | ||
# - models/* | ||
# - controllers/* | ||
# - commands/* | ||
# - mail/* | ||
# blacklist: | ||
# include: | ||
# - assets/* | ||
# - config/* | ||
# - runtime/* | ||
# - vendor/* | ||
# - views/* | ||
# - web/* | ||
# - tests/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<?php | ||
/** | ||
* @link http://www.yiiframework.com/ | ||
* @copyright Copyright (c) 2008 Yii Software LLC | ||
* @license http://www.yiiframework.com/license/ | ||
*/ | ||
|
||
namespace app\commands; | ||
|
||
use yii\console\Controller; | ||
use yii\console\ExitCode; | ||
|
||
/** | ||
* This command echoes the first argument that you have entered. | ||
* | ||
* This command is provided as an example for you to learn how to create console commands. | ||
* | ||
* @author Qiang Xue <[email protected]> | ||
* @since 2.0 | ||
*/ | ||
class HelloController extends Controller | ||
{ | ||
/** | ||
* This command echoes what you have entered as the message. | ||
* @param string $message the message to be echoed. | ||
* @return int Exit code | ||
*/ | ||
public function actionIndex($message = 'hello world') | ||
{ | ||
echo $message . "\n"; | ||
|
||
return ExitCode::OK; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
{ | ||
"name": "yiisoft/yii2-app-basic", | ||
"description": "Yii 2 Basic Project Template", | ||
"keywords": ["yii2", "framework", "basic", "project template"], | ||
"homepage": "http://www.yiiframework.com/", | ||
"type": "project", | ||
"license": "BSD-3-Clause", | ||
"support": { | ||
"issues": "https://github.com/yiisoft/yii2/issues?state=open", | ||
"forum": "http://www.yiiframework.com/forum/", | ||
"wiki": "http://www.yiiframework.com/wiki/", | ||
"irc": "irc://irc.freenode.net/yii", | ||
"source": "https://github.com/yiisoft/yii2" | ||
}, | ||
"minimum-stability": "stable", | ||
"require": { | ||
"php": ">=5.4.0", | ||
"yiisoft/yii2": "~2.0.14", | ||
"yiisoft/yii2-bootstrap": "~2.0.0", | ||
"yiisoft/yii2-swiftmailer": "~2.0.0 || ~2.1.0", | ||
"metalguardian/yii2-fotorama-widget": "^1.0", | ||
"himiklab/yii2-sortable-grid-view-widget": "*", | ||
"loveorigami/yii2-modal-ajax": "@dev", | ||
"kartik-v/yii2-widgets": "@dev", | ||
"yii2mod/yii2-settings": "*", | ||
"yiisoft/yii2-imagine": "^2.2", | ||
"elisevgeniy/yii2-gallery-manager": "*@dev", | ||
"conquer/codemirror": "*", | ||
"msvdev/yii2-widget-mappicker": "*" | ||
}, | ||
"require-dev": { | ||
"yiisoft/yii2-debug": "~2.1.0", | ||
"yiisoft/yii2-gii": "~2.1.0", | ||
"yiisoft/yii2-faker": "~2.0.0", | ||
|
||
"codeception/base": "~2.3.0", | ||
"codeception/verify": "~0.4.0", | ||
"codeception/specify": "~0.4.6", | ||
"symfony/browser-kit": ">=2.7 <=4.2.4" | ||
}, | ||
"config": { | ||
"process-timeout": 1800, | ||
"fxp-asset": { | ||
"enabled": false | ||
} | ||
}, | ||
"scripts": { | ||
"post-install-cmd": [ | ||
"yii\\composer\\Installer::postInstall" | ||
], | ||
"post-create-project-cmd": [ | ||
"yii\\composer\\Installer::postCreateProject", | ||
"yii\\composer\\Installer::postInstall" | ||
] | ||
}, | ||
"extra": { | ||
"yii\\composer\\Installer::postCreateProject": { | ||
"setPermission": [ | ||
{ | ||
"runtime": "0777", | ||
"web/assets": "0777", | ||
"yii": "0755" | ||
} | ||
] | ||
}, | ||
"yii\\composer\\Installer::postInstall": { | ||
"generateCookieValidationKey": [ | ||
"config/web.php" | ||
] | ||
} | ||
}, | ||
"repositories": [ | ||
{ | ||
"type": "composer", | ||
"url": "https://asset-packagist.org" | ||
} | ||
] | ||
} |
Oops, something went wrong.