Skip to content

Commit

Permalink
1530032847: Proposed release for 7.x-1.15.2 (#68)
Browse files Browse the repository at this point in the history
* Update dkan to 7.x-1.15.2 release
  • Loading branch information
dafeder authored and janette committed Jun 26, 2018
1 parent 9fc535c commit f2e1d3d
Show file tree
Hide file tree
Showing 1,027 changed files with 31,287 additions and 12,558 deletions.
15 changes: 0 additions & 15 deletions profiles/dkan/.ahoy/.docker/etc/php5/php-cli.ini

This file was deleted.

2 changes: 1 addition & 1 deletion profiles/dkan/.ahoy/.scripts/circle-behat.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
composer = ""

files[CIRCLE_NODE_INDEX].each_index do |i|
file = Pathname(files[CIRCLE_NODE_INDEX][i]).realpath.to_s
file = Pathname('/var/www').join(files[CIRCLE_NODE_INDEX][i]).to_s
suite = behat_parse_suite(file)
testCmd = "ahoy dkan test #{file} --suite=#{suite} --format=pretty --out=std --format=junit --out='#{CIRCLE_ARTIFACTS}/junit' #{params} --colors"
if i > 1
Expand Down
52 changes: 52 additions & 0 deletions profiles/dkan/.ahoy/.scripts/dkan-lint.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
require 'json'
require 'uri'
require 'net/http'
require 'fileutils'
require 'git'

include FileUtils
include Git

# Get the list of files from a PR
def get_pr_files(user, repo, pr)
uri = URI.parse("https://api.github.com/repos/#{user}/#{repo}/pulls/#{pr}/files")

http = Net::HTTP.new(uri.host, uri.port)
request = Net::HTTP::Get.new(uri.request_uri)
http.use_ssl = true
response = http.request(request)
result = JSON.parse(response.body)
files = Array.new

result.each do |i|
files.push(i['filename'])
end

return files
end

if 1==1
user = 'GetDKAN'
repo = 'dkan'
pr = '2454'
files = get_pr_files(user, repo, pr)
elsif ARGV.any?
files = ARGV
else
FileUtils.cd 'dkan'
g = Git.open('.')
files = g.diff.name_status.select{|k,v| v != "D"}.keys
FileUtils.cd '..'
end

if files.any?
# Filter file list for approved file types
files.select!{ |i| i[/\.*(\.php|\.inc|\.module|\.install|\.profile|\.info)$/] }
if files.any?
files.map! {|item| 'dkan/' + item}
puts "Linting files:\n" + files.join("\n")
puts `dkan/test/bin/phpcs --standard=Drupal,DrupalPractice -n --ignore=test/dkanextension/*,patches/* #{files.join(" ")}`
else
puts "No files available to lint; ending."
end
end
26 changes: 0 additions & 26 deletions profiles/dkan/.ahoy/.scripts/dkan-lint.sh

This file was deleted.

6 changes: 3 additions & 3 deletions profiles/dkan/.ahoy/.scripts/dkan-test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
require "base64"
require "./dkan/.ahoy/.scripts/behat-parse-params"

BEHAT_FOLDER = ENV.has_key?("BEHAT_FOLDER") ? ENV["BEHAT_FOLDER"] : "docroot/profiles/dkan/test"
ALT_CONFIG_FILE = ENV.has_key?("ALT_CONFIG_FILE") ? ENV["ALT_CONFIG_FILE"] : "behat.local.yml"
BEHAT_ENV = ENV['HOSTNAME']
BEHAT_FOLDER = ENV.has_key?("BEHAT_FOLDER") && ENV["BEHAT_FOLDER"] != "" ? ENV["BEHAT_FOLDER"] : "docroot/profiles/dkan/test"
ALT_CONFIG_FILE = ENV.has_key?("ALT_CONFIG_FILE") && ENV["ALT_CONFIG_FILE"] != "" ? ENV["ALT_CONFIG_FILE"] : "behat.local.yml"
BEHAT_ENV = ENV.has_key?("HOSTNAME") && ENV["HOSTNAME"] != "" ? ENV["HOSTNAME"] : "cli"
SKIP_COMPOSER_FLAG="--skip-composer"

if File.exists? "#{BEHAT_FOLDER}/#{ALT_CONFIG_FILE}"
Expand Down
10 changes: 7 additions & 3 deletions profiles/dkan/.ahoy/dkan.ahoy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -151,16 +151,20 @@ commands:
fi
b64=`echo "payload: $input" | base64 $wrap 0`
ahoy cmd-proxy ruby dkan/.ahoy/.scripts/dkan-test.rb "$b64"
ahoy cmd-proxy BEHAT_FOLDER=$BEHAT_FOLDER ALT_CONFIG_FILE="ALT_CONFIG_FILE" ruby dkan/.ahoy/.scripts/dkan-test.rb "$b64"
unittests:
usage: Run phpunit tests
cmd: ahoy cmd-proxy bash dkan/.ahoy/.scripts/dkan-unittests.sh "{{args}}"

lint:
usage: Run linter on code
usage: Run linter on DKAN code
hidden: true
cmd: ahoy cmd-proxy bash dkan/.ahoy/.scripts/dkan-lint.sh "{{args}}"
cmd: |
ahoy cmd-proxy gem install git
ahoy cmd-proxy bash dkan/.ahoy/.scripts/composer-install.sh dkan/test
ahoy cmd-proxy dkan/test/bin/phpcs --config-set installed_paths dkan/test/vendor/drupal/coder/coder_sniffer
ahoy cmd-proxy ruby dkan/.ahoy/.scripts/dkan-lint.rb {{args}}
create-qa-users:
usage: Create users for each core role for QA purposes
Expand Down
6 changes: 1 addition & 5 deletions profiles/dkan/.ahoy/docker-compose.common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ services:
# Used for all console commands and tools.
cli:
hostname: cli
image: nuams/drupal-cli:2016-10-16
image: getdkan/dkan-docker:php5-cli
environment:
- XDEBUG_CONFIG=idekey=PHPSTORM
env_file:
Expand All @@ -66,10 +66,6 @@ services:
ports:
- "8888"
volumes:
# PHP configuration overrides
- "./.docker/etc/php5/php-cli.ini:/etc/php5/cli/conf.d/z_php.ini"
- "./.docker/etc/php5/xdebug-linux.ini:/etc/php5/xdebug-linux.ini"
- "./.docker/etc/php5/xdebug-macos.ini:/etc/php5/xdebug-macos.ini"
# Host SSH keys mapping. Uncomment one of the lines below based on your setup.
- ~/.ssh:/.ssh
labels:
Expand Down
14 changes: 6 additions & 8 deletions profiles/dkan/.ahoy/docker.ahoy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ commands:
if [ -z "$matches_in_hosts" ];then
echo "Adding new hosts entry."
echo "$host_entry" | sudo tee -a /etc/hosts > /dev/null
echo "$host_entry" | tee -a /etc/hosts > /dev/null
fi
up:
cmd: |
Expand Down Expand Up @@ -82,11 +82,7 @@ commands:
if [ "$(ahoy docker proxy-running)" = "1" ]; then
echo "$(ahoy docker get-slug).$(ahoy docker get-proxy-domain)"
else
if [ -z "$DOCKER_MACHINE_NAME" ]; then
echo "`ahoy docker web-host`"
else
echo "`docker-machine ip default`"
fi
echo "`ahoy docker web-host`"
fi
proxy-up:
Expand Down Expand Up @@ -340,13 +336,15 @@ commands:
case $args in
start)
ahoy docker exec web cp -f ${XDEBUG_FILE} /etc/php5/mods-available/xdebug.ini
ahoy docker exec cli cp -f ${XDEBUG_FILE} /etc/php5/mods-available/xdebug.ini
ahoy docker exec cli phpenmod xdebug
ahoy docker exec cli cp -f ${XDEBUG_FILE} /etc/php/5.6/cli/conf.d/${XDEBUG_FILE}
ahoy docker compose restart web
ahoy docker compose restart cli
;;
stop)
ahoy docker exec web rm -f /etc/php5/mods-available/xdebug.ini
ahoy docker exec cli rm -f /etc/php5/mods-available/xdebug.ini
ahoy docker exec cli phpdismod xdebug
ahoy docker exec cli rm -f /etc/php5/mods-available/${XDEBUG_FILE}
ahoy docker compose restart web
ahoy docker compose restart cli
;;
Expand Down
Loading

0 comments on commit f2e1d3d

Please sign in to comment.