This repository has been archived by the owner on Jun 3, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remake dkan_starter/dkan 1.13.5.2 (#384)
* Add new config.yml param stage_file_proxy_files: REF CIVIC-6610 defaul/stage_file_porxy_files: holds a list of files that we may want to move from production site into the testing environment in order to ensure tests pass. * remake dkan with patch. 1.13.5 + 2018 * Use ahoy dkan server.
- Loading branch information
1 parent
4e09b6b
commit 316f7ad
Showing
29 changed files
with
367 additions
and
134 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
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
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
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
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
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,42 @@ | ||
<?php | ||
|
||
/** | ||
* @file | ||
* Routing-script for the built-in PHP web server. | ||
* | ||
* The built-in webserver should only be used for development and testing as it | ||
* has a number of limitations that makes running Drupal on it highly insecure | ||
* and somewhat limited. | ||
* | ||
* In particular be aware that: | ||
* - The server is single-threaded, any requests made during the execution of | ||
* the main request will hang until the main request has been completed. | ||
* - The webserver does not enforce any of the settings in .htaccess in | ||
* particular a remote user will be able to download files that normally | ||
* would be protected from direct access such as .module files. | ||
* | ||
* Usage: | ||
* php -S localhost:8888 .ht.router.php | ||
* | ||
* @see http://php.net/manual/en/features.commandline.webserver.php | ||
*/ | ||
|
||
$url = parse_url($_SERVER['REQUEST_URI']); | ||
if (file_exists('.' . $url['path'])) { | ||
// Serve the requested resource as-is. | ||
return FALSE; | ||
} | ||
// The use of a router-script means that a number of $_SERVER variables has to | ||
// be updated to point to the index-file. | ||
$index_file_absolute = $_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . 'index.php'; | ||
$index_file_relative = DIRECTORY_SEPARATOR . 'index.php'; | ||
// SCRIPT_FILENAME will point to the router-script itself, it should point to | ||
// the full path to index.php. | ||
$_SERVER['SCRIPT_FILENAME'] = $index_file_absolute; | ||
// SCRIPT_NAME and PHP_SELF will either point to /index.php or contain the full | ||
// virtual path being requested depending on the url being requested. They | ||
// should always point to index.php relative to document root. | ||
$_SERVER['SCRIPT_NAME'] = $index_file_relative; | ||
$_SERVER['PHP_SELF'] = $index_file_relative; | ||
// Require the main index-file and let core take over. | ||
require $index_file_absolute; |
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 |
---|---|---|
@@ -1,11 +1,28 @@ | ||
require 'yaml' | ||
|
||
# Deep merge only available in ruby >= 3.0 | ||
# TODO: replace defaults with custom deep_merge | ||
|
||
begin | ||
CONFIG = YAML.load_file("config/config.yml") | ||
rescue Exception => msg | ||
puts "Loading of Configuration errored out with: #{msg}." | ||
puts "Using default CONFIG instead." | ||
CONFIG = {"circle" => {"skip_features" => []}} | ||
CONFIG = {} | ||
end | ||
|
||
if not CONFIG.has_key? "circle" | ||
CONFIG["circle"] = {} | ||
end | ||
|
||
if not CONFIG["circle"].has_key? "skip_features" | ||
CONFIG["circle"]["skip_features"] = [] | ||
end | ||
|
||
if not CONFIG.has_key? "default" | ||
CONFIG["default"] = {} | ||
end | ||
|
||
if not CONFIG["default"].has_key? "https_everywhere" | ||
CONFIG["default"]["https_everywhere"] = false | ||
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,16 @@ | ||
require "./dkan/.ahoy/.scripts/config.rb" | ||
|
||
if CONFIG["default"]["https_everywhere"] | ||
url="surl" | ||
else | ||
url="url" | ||
end | ||
|
||
url=`ahoy drush --uri="$(ahoy docker #{url})" uli` | ||
os =`uname` | ||
|
||
if os =~ /Darwin/ | ||
`open #{url}` | ||
else | ||
puts url | ||
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
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 @@ | ||
|
||
if [ "$HOSTNAME" = "cli" ]; then | ||
HOST=cli | ||
else | ||
HOST=localhost | ||
fi | ||
|
||
cp ./dkan/.ahoy/.scripts/.ht.router.php ./docroot/ | ||
cd ./docroot | ||
|
||
echo $HOST | ||
php -S $HOST:8888 .ht.router.php |
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
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
Oops, something went wrong.