Skip to content

Commit f2e1d3d

Browse files
dafederjanette
authored andcommitted
1530032847: Proposed release for 7.x-1.15.2 (#68)
* Update dkan to 7.x-1.15.2 release
1 parent 9fc535c commit f2e1d3d

File tree

1,027 files changed

+31287
-12558
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,027 files changed

+31287
-12558
lines changed

profiles/dkan/.ahoy/.docker/etc/php5/php-cli.ini

-15
This file was deleted.

profiles/dkan/.ahoy/.scripts/circle-behat.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
composer = ""
3030

3131
files[CIRCLE_NODE_INDEX].each_index do |i|
32-
file = Pathname(files[CIRCLE_NODE_INDEX][i]).realpath.to_s
32+
file = Pathname('/var/www').join(files[CIRCLE_NODE_INDEX][i]).to_s
3333
suite = behat_parse_suite(file)
3434
testCmd = "ahoy dkan test #{file} --suite=#{suite} --format=pretty --out=std --format=junit --out='#{CIRCLE_ARTIFACTS}/junit' #{params} --colors"
3535
if i > 1
+52
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
require 'json'
2+
require 'uri'
3+
require 'net/http'
4+
require 'fileutils'
5+
require 'git'
6+
7+
include FileUtils
8+
include Git
9+
10+
# Get the list of files from a PR
11+
def get_pr_files(user, repo, pr)
12+
uri = URI.parse("https://api.github.com/repos/#{user}/#{repo}/pulls/#{pr}/files")
13+
14+
http = Net::HTTP.new(uri.host, uri.port)
15+
request = Net::HTTP::Get.new(uri.request_uri)
16+
http.use_ssl = true
17+
response = http.request(request)
18+
result = JSON.parse(response.body)
19+
files = Array.new
20+
21+
result.each do |i|
22+
files.push(i['filename'])
23+
end
24+
25+
return files
26+
end
27+
28+
if 1==1
29+
user = 'GetDKAN'
30+
repo = 'dkan'
31+
pr = '2454'
32+
files = get_pr_files(user, repo, pr)
33+
elsif ARGV.any?
34+
files = ARGV
35+
else
36+
FileUtils.cd 'dkan'
37+
g = Git.open('.')
38+
files = g.diff.name_status.select{|k,v| v != "D"}.keys
39+
FileUtils.cd '..'
40+
end
41+
42+
if files.any?
43+
# Filter file list for approved file types
44+
files.select!{ |i| i[/\.*(\.php|\.inc|\.module|\.install|\.profile|\.info)$/] }
45+
if files.any?
46+
files.map! {|item| 'dkan/' + item}
47+
puts "Linting files:\n" + files.join("\n")
48+
puts `dkan/test/bin/phpcs --standard=Drupal,DrupalPractice -n --ignore=test/dkanextension/*,patches/* #{files.join(" ")}`
49+
else
50+
puts "No files available to lint; ending."
51+
end
52+
end

profiles/dkan/.ahoy/.scripts/dkan-lint.sh

-26
This file was deleted.

profiles/dkan/.ahoy/.scripts/dkan-test.rb

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
require "base64"
66
require "./dkan/.ahoy/.scripts/behat-parse-params"
77

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

1313
if File.exists? "#{BEHAT_FOLDER}/#{ALT_CONFIG_FILE}"

profiles/dkan/.ahoy/dkan.ahoy.yml

+7-3
Original file line numberDiff line numberDiff line change
@@ -151,16 +151,20 @@ commands:
151151
fi
152152
153153
b64=`echo "payload: $input" | base64 $wrap 0`
154-
ahoy cmd-proxy ruby dkan/.ahoy/.scripts/dkan-test.rb "$b64"
154+
ahoy cmd-proxy BEHAT_FOLDER=$BEHAT_FOLDER ALT_CONFIG_FILE="ALT_CONFIG_FILE" ruby dkan/.ahoy/.scripts/dkan-test.rb "$b64"
155155
156156
unittests:
157157
usage: Run phpunit tests
158158
cmd: ahoy cmd-proxy bash dkan/.ahoy/.scripts/dkan-unittests.sh "{{args}}"
159159

160160
lint:
161-
usage: Run linter on code
161+
usage: Run linter on DKAN code
162162
hidden: true
163-
cmd: ahoy cmd-proxy bash dkan/.ahoy/.scripts/dkan-lint.sh "{{args}}"
163+
cmd: |
164+
ahoy cmd-proxy gem install git
165+
ahoy cmd-proxy bash dkan/.ahoy/.scripts/composer-install.sh dkan/test
166+
ahoy cmd-proxy dkan/test/bin/phpcs --config-set installed_paths dkan/test/vendor/drupal/coder/coder_sniffer
167+
ahoy cmd-proxy ruby dkan/.ahoy/.scripts/dkan-lint.rb {{args}}
164168
165169
create-qa-users:
166170
usage: Create users for each core role for QA purposes

profiles/dkan/.ahoy/docker-compose.common.yml

+1-5
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ services:
5151
# Used for all console commands and tools.
5252
cli:
5353
hostname: cli
54-
image: nuams/drupal-cli:2016-10-16
54+
image: getdkan/dkan-docker:php5-cli
5555
environment:
5656
- XDEBUG_CONFIG=idekey=PHPSTORM
5757
env_file:
@@ -66,10 +66,6 @@ services:
6666
ports:
6767
- "8888"
6868
volumes:
69-
# PHP configuration overrides
70-
- "./.docker/etc/php5/php-cli.ini:/etc/php5/cli/conf.d/z_php.ini"
71-
- "./.docker/etc/php5/xdebug-linux.ini:/etc/php5/xdebug-linux.ini"
72-
- "./.docker/etc/php5/xdebug-macos.ini:/etc/php5/xdebug-macos.ini"
7369
# Host SSH keys mapping. Uncomment one of the lines below based on your setup.
7470
- ~/.ssh:/.ssh
7571
labels:

profiles/dkan/.ahoy/docker.ahoy.yml

+6-8
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ commands:
4242
4343
if [ -z "$matches_in_hosts" ];then
4444
echo "Adding new hosts entry."
45-
echo "$host_entry" | sudo tee -a /etc/hosts > /dev/null
45+
echo "$host_entry" | tee -a /etc/hosts > /dev/null
4646
fi
4747
up:
4848
cmd: |
@@ -82,11 +82,7 @@ commands:
8282
if [ "$(ahoy docker proxy-running)" = "1" ]; then
8383
echo "$(ahoy docker get-slug).$(ahoy docker get-proxy-domain)"
8484
else
85-
if [ -z "$DOCKER_MACHINE_NAME" ]; then
86-
echo "`ahoy docker web-host`"
87-
else
88-
echo "`docker-machine ip default`"
89-
fi
85+
echo "`ahoy docker web-host`"
9086
fi
9187
9288
proxy-up:
@@ -340,13 +336,15 @@ commands:
340336
case $args in
341337
start)
342338
ahoy docker exec web cp -f ${XDEBUG_FILE} /etc/php5/mods-available/xdebug.ini
343-
ahoy docker exec cli cp -f ${XDEBUG_FILE} /etc/php5/mods-available/xdebug.ini
339+
ahoy docker exec cli phpenmod xdebug
340+
ahoy docker exec cli cp -f ${XDEBUG_FILE} /etc/php/5.6/cli/conf.d/${XDEBUG_FILE}
344341
ahoy docker compose restart web
345342
ahoy docker compose restart cli
346343
;;
347344
stop)
348345
ahoy docker exec web rm -f /etc/php5/mods-available/xdebug.ini
349-
ahoy docker exec cli rm -f /etc/php5/mods-available/xdebug.ini
346+
ahoy docker exec cli phpdismod xdebug
347+
ahoy docker exec cli rm -f /etc/php5/mods-available/${XDEBUG_FILE}
350348
ahoy docker compose restart web
351349
ahoy docker compose restart cli
352350
;;

0 commit comments

Comments
 (0)