Skip to content
This repository was archived by the owner on Nov 19, 2021. It is now read-only.

Commit 5290bc7

Browse files
committed
Merge branch 'dev'
Conflicts: dist.ini
2 parents 1876a5b + ba4f5ee commit 5290bc7

Some content is hidden

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

43 files changed

+1103
-134
lines changed

Gruntfile.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,8 @@ module.exports = function(grunt) {
209209
* revert the version number in package.json
210210
*/
211211
exec: {
212-
revert: "./script/revert_pkg_version.pl"
212+
revert: "./script/revert_pkg_version.pl",
213+
revert_release: "./script/revert_pkg_version.pl release"
213214
},
214215

215216
/*
@@ -255,6 +256,8 @@ module.exports = function(grunt) {
255256

256257
grunt.registerTask('revert', ['exec:revert']);
257258

259+
grunt.registerTask('revert-release', ['exec:revert_release']);
260+
258261
// add modules here
259262
grunt.loadNpmTasks('grunt-contrib-concat');
260263
grunt.loadNpmTasks('grunt-contrib-handlebars');

dist.ini

+3-3
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,7 @@ exclude_filename=script/ddgc_release.sh
3434
[ExecDir]
3535
[ShareDir]
3636
[MakeMaker]
37-
;[MakeMaker::SkipInstall]
38-
[EOLTests]
37+
[Test::EOL]
3938
trailing_whitespace = 0
4039
[Manifest]
4140
[TestRelease]
@@ -54,8 +53,9 @@ directory = inc/
5453
version_regexp = ^(.+)$
5554
[PkgVersion]
5655
[PodSyntaxTests]
57-
;[GithubMeta]
5856
[Repository]
57+
homepage = https://duck.co/
58+
issues = 1
5959

6060
[Git::ExcludeUntracked]
6161

lib/DDGC/Web/Controller/InstantAnswer.pm

+14-13
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,14 @@ sub index :Chained('base') :PathPart('') :Args() {
3131
my $rs = $c->d->rs('Topic');
3232

3333
my @topics = $rs->search(
34-
{},
34+
{'name' => { '!=' => 'test' }},
3535
{
3636
columns => [ qw/ name id /],
3737
result_class => 'DBIx::Class::ResultClass::HashRefInflator',
3838
}
3939
)->all;
4040

41+
$c->stash->{title} = "Index: Instant Answers";
4142
$c->stash->{topic_list} = \@topics;
4243
$c->add_bc('Instant Answers', $c->chained_uri('InstantAnswer','index'));
4344

@@ -56,7 +57,7 @@ sub ialist_json :Chained('base') :PathPart('json') :Args() {
5657
}
5758

5859
my @ial = $rs->search(
59-
{},
60+
{'topic.name' => { '!=' => 'test' }},
6061
{
6162
columns => [ qw/ name id repo src_name dev_milestone description template / ],
6263
prefetch => { instant_answer_topics => 'topic' },
@@ -142,9 +143,19 @@ sub ia_base :Chained('base') :PathPart('view') :CaptureArgs(1) { # /ia/view/cal
142143
}
143144
}
144145

146+
$c->stash->{title} = $c->stash->{ia}->name;
145147
$c->stash->{edit_class} = $edit_class;
146148
$c->stash->{commit_class} = $commit_class;
147149

150+
my @topics = $c->d->rs('Topic')->search(
151+
{'name' => { '!=' => 'test' }},
152+
{
153+
columns => [ qw/ name id /],
154+
result_class => 'DBIx::Class::ResultClass::HashRefInflator',
155+
}
156+
)->all;
157+
158+
$c->stash->{topic_list} = \@topics;
148159
$c->add_bc('Instant Answers', $c->chained_uri('InstantAnswer','index'));
149160
$c->add_bc($c->stash->{ia}->name);
150161
}
@@ -153,19 +164,10 @@ sub ia_json :Chained('ia_base') :PathPart('json') :Args(0) {
153164
my ( $self, $c) = @_;
154165

155166
my $ia = $c->stash->{ia};
156-
my @topics_list = $c->d->rs('Topic')->all();
157167
my @topics = map { $_->name} $ia->topics;
158-
my @allowed;
159168

160169
my @issues = $c->d->rs('InstantAnswer::Issues')->find({instant_answer_id => $ia->id});
161-
my @ia_issues;
162-
163-
for my $topic (@topics_list) {
164-
push (@allowed, {
165-
id => $topic->id,
166-
name => $topic->name
167-
});
168-
}
170+
my @ia_issues;
169171

170172
for my $issue (@issues) {
171173
if ($issue) {
@@ -192,7 +194,6 @@ sub ia_json :Chained('ia_base') :PathPart('json') :Args(0) {
192194
code => $ia->code? decode_json($ia->code) : undef,
193195
topic => \@topics,
194196
attribution => $ia->attribution? decode_json($ia->attribution) : undef,
195-
allowed_topics => \@allowed,
196197
issues => \@ia_issues,
197198
template => $ia->template,
198199
};

lib/DDGC/Web/Controller/Root.pm

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ sub base :Chained('/') :PathPart('') :CaptureArgs(0) {
7777
$c->wiz_check;
7878

7979
$c->response->header( 'X-Frame-Options' => 'DENY' );
80-
$c->response->header( 'Content-Security-Policy' => "default-src 'self' ; img-src 'self' https://*.duckduckgo.com ; script-src 'self' 'unsafe-inline' ; style-src 'self' 'unsafe-inline' ;" );
80+
$c->response->header( 'Content-Security-Policy' => "default-src 'self' ; img-src 'self' https://*.duckduckgo.com https://duckduckgo.com ; script-src 'self' 'unsafe-inline' ; style-src 'self' 'unsafe-inline' ;" );
8181

8282
# Should not be necessary, is not harmful
8383
$c->response->header( 'X-Permitted-Cross-Domain-Policies' => 'master-only' );

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ddg_community_platform",
3-
"version": "0.45.0",
3+
"version": "0.49.0",
44
"engines": {
55
"node": ">=0.10.0"
66
},

root/static/css/ddgc0.45.0.css

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

root/static/css/ddgc0.46.0.css

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

root/static/css/ddgc0.47.0.css

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

root/static/css/ddgc0.48.0.css

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

root/static/css/ia0.45.0.css

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)