File: schema-location.patch

package info (click to toggle)
libtest-json-schema-acceptance-perl 1.003%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 652 kB
  • sloc: perl: 521; makefile: 2
file content (268 lines) | stat: -rw-r--r-- 9,187 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
Description: Removing the need to use Perl's ShareDir, using schema files from
 JSON-Schema-Test-Suite package.
Forwarded: not-needed
Author: Andrius Merkys <merkys@debian.org>
Reviewed-by: gregor herrmann <gregoa@debian.org>
Last-Update: 2020-12-07

--- a/lib/Test/JSON/Schema/Acceptance.pm
+++ b/lib/Test/JSON/Schema/Acceptance.pm
@@ -14,7 +14,7 @@
 use Try::Tiny;
 use JSON::MaybeXS 1.004001;
 use Storable 3.00 ();
-use File::ShareDir 'dist_dir';
+# use File::ShareDir 'dist_dir'; # not needed in Debian-based distributions
 use Moo;
 use MooX::TypeTiny 0.002002;
 use Types::Standard 1.010002 qw(Str InstanceOf ArrayRef HashRef Dict Any HasMethods Bool Optional);
@@ -36,7 +36,7 @@
   isa => InstanceOf['Path::Tiny'],
   coerce => sub { path($_[0])->absolute('.') },
   lazy => 1,
-  default => sub { path(dist_dir('Test-JSON-Schema-Acceptance'), 'tests', $_[0]->specification) },
+  default => sub { path('/usr/share/json-schema-test-suite', 'tests', $_[0]->specification) },
 );
 
 has additional_resources => (
@@ -170,7 +170,7 @@
 
   $ctx->$diag("\n\n".'Results using '.ref($self).' '.$self->VERSION);
 
-  my $submodule_status = path(dist_dir('Test-JSON-Schema-Acceptance'), 'submodule_status');
+  my $submodule_status = path('/usr/share/json-schema-test-suite', 'submodule_status');
   if ($submodule_status->exists and $submodule_status->parent->subsumes($self->test_dir)) {
     chomp(my ($commit, $url) = $submodule_status->lines);
     $ctx->$diag('with commit '.$commit);
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -6,10 +6,10 @@
 
 use ExtUtils::MakeMaker;
 
-use File::ShareDir::Install;
-$File::ShareDir::Install::INCLUDE_DOTFILES = 1;
-$File::ShareDir::Install::INCLUDE_DOTDIRS = 1;
-install_share dist => "share";
+# use File::ShareDir::Install;
+# $File::ShareDir::Install::INCLUDE_DOTFILES = 1;
+# $File::ShareDir::Install::INCLUDE_DOTDIRS = 1;
+# install_share dist => "share";
 
 
 my %WriteMakefileArgs = (
@@ -17,14 +17,14 @@
   "AUTHOR" => "Ben Hutton (\@relequestual) <relequest\@cpan.org>",
   "CONFIGURE_REQUIRES" => {
     "ExtUtils::MakeMaker" => 0,
-    "File::ShareDir::Install" => "0.06"
+    # "File::ShareDir::Install" => "0.06"
   },
   "DISTNAME" => "Test-JSON-Schema-Acceptance",
   "LICENSE" => "mit",
   "MIN_PERL_VERSION" => "5.014",
   "NAME" => "Test::JSON::Schema::Acceptance",
   "PREREQ_PM" => {
-    "File::ShareDir" => 0,
+    # "File::ShareDir" => 0,
     "JSON::MaybeXS" => "1.004001",
     "List::Util" => "1.33",
     "Moo" => 0,
@@ -49,7 +49,7 @@
     "Test2::Suite" => "0.000131",
     "Test::Deep" => 0,
     "Test::Fatal" => 0,
-    "Test::File::ShareDir" => 0,
+    # "Test::File::ShareDir" => 0,
     "Test::More" => "0.88",
     "Test::Simple" => "1.302176",
     "Test::Warnings" => 0,
@@ -67,7 +67,7 @@
 
 my %FallbackPrereqs = (
   "ExtUtils::MakeMaker" => 0,
-  "File::ShareDir" => 0,
+  # "File::ShareDir" => 0,
   "File::Spec" => 0,
   "JSON::MaybeXS" => "1.004001",
   "JSON::PP" => 0,
@@ -82,7 +82,7 @@
   "Test2::Tools::Compare" => 0,
   "Test::Deep" => 0,
   "Test::Fatal" => 0,
-  "Test::File::ShareDir" => 0,
+  # "Test::File::ShareDir" => 0,
   "Test::More" => "0.88",
   "Test::Simple" => "1.302176",
   "Test::Warnings" => 0,
@@ -114,5 +114,5 @@
 {
 package
 MY;
-use File::ShareDir::Install qw(postamble);
+# use File::ShareDir::Install qw(postamble);
 }
--- a/t/99-sanity.t
+++ b/t/99-sanity.t
@@ -5,13 +5,13 @@
 
 use Test::More 0.88;
 use if $ENV{AUTHOR_TESTING}, 'Test::Warnings';
-use Test::File::ShareDir -share => { -dist => { 'Test-JSON-Schema-Acceptance' => 'share' } };
-use File::ShareDir 'dist_dir';
+# use Test::File::ShareDir -share => { -dist => { 'Test-JSON-Schema-Acceptance' => 'share' } };
+# use File::ShareDir 'dist_dir';
 use Path::Tiny;
 use Test::Fatal;
 use Test::JSON::Schema::Acceptance;
 
-foreach my $draft (path(dist_dir('Test-JSON-Schema-Acceptance'), 'tests')->children) {
+foreach my $draft (path('/usr/share/json-schema-test-suite', 'tests')->children) {
   $draft = $draft->basename;
   my $accepter = Test::JSON::Schema::Acceptance->new(specification => $draft, include_optional => 1);
   is(
--- a/t/01-basic.t
+++ b/t/01-basic.t
@@ -8,7 +8,7 @@
 use if $ENV{AUTHOR_TESTING}, 'Test::Warnings';
 use Test::Deep;
 
-use Test::File::ShareDir -share => { -dist => { 'Test-JSON-Schema-Acceptance' => 'share' } };
+# use Test::File::ShareDir -share => { -dist => { 'Test-JSON-Schema-Acceptance' => 'share' } };
 use Test::JSON::Schema::Acceptance;
 use lib 't/lib';
 use SchemaParser;
--- a/t/02-constructor.t
+++ b/t/02-constructor.t
@@ -6,7 +6,7 @@
 use Test::More 0.88;
 use if $ENV{AUTHOR_TESTING}, 'Test::Warnings';
 use Test::Fatal;
-use Test::File::ShareDir -share => { -dist => { 'Test-JSON-Schema-Acceptance' => 'share' } };
+# use Test::File::ShareDir -share => { -dist => { 'Test-JSON-Schema-Acceptance' => 'share' } };
 use Test::JSON::Schema::Acceptance;
 
 # is(
--- a/t/03-validate_data.t
+++ b/t/03-validate_data.t
@@ -8,7 +8,7 @@
 use if $ENV{AUTHOR_TESTING}, 'Test::Warnings';
 use Test::Deep;
 
-use Test::File::ShareDir -share => { -dist => { 'Test-JSON-Schema-Acceptance' => 'share' } };
+# use Test::File::ShareDir -share => { -dist => { 'Test-JSON-Schema-Acceptance' => 'share' } };
 use Test::JSON::Schema::Acceptance;
 use lib 't/lib';
 use SchemaParser;
--- a/t/04-validate_json_string.t
+++ b/t/04-validate_json_string.t
@@ -8,7 +8,7 @@
 use if $ENV{AUTHOR_TESTING}, 'Test::Warnings';
 use Test::Deep;
 
-use Test::File::ShareDir -share => { -dist => { 'Test-JSON-Schema-Acceptance' => 'share' } };
+# use Test::File::ShareDir -share => { -dist => { 'Test-JSON-Schema-Acceptance' => 'share' } };
 use Test::JSON::Schema::Acceptance;
 use lib 't/lib';
 use SchemaParser;
--- a/META.json
+++ b/META.json
@@ -26,7 +26,6 @@
       "configure" : {
          "requires" : {
             "ExtUtils::MakeMaker" : "0",
-            "File::ShareDir::Install" : "0.06",
             "perl" : "5.014"
          }
       },
@@ -46,7 +45,6 @@
             "Test::CPAN::Meta" : "0",
             "Test::CleanNamespaces" : "0.15",
             "Test::EOL" : "0",
-            "Test::File::ShareDir" : "0",
             "Test::Kwalitee" : "1.21",
             "Test::MinimumVersion" : "0",
             "Test::Mojibake" : "0",
@@ -62,7 +60,6 @@
       },
       "runtime" : {
          "requires" : {
-            "File::ShareDir" : "0",
             "JSON::MaybeXS" : "1.004001",
             "List::Util" : "1.33",
             "Moo" : "0",
@@ -97,7 +94,6 @@
             "Test2::Suite" : "0.000131",
             "Test::Deep" : "0",
             "Test::Fatal" : "0",
-            "Test::File::ShareDir" : "0",
             "Test::More" : "0.88",
             "Test::Simple" : "1.302176",
             "Test::Warnings" : "0",
--- a/META.yml
+++ b/META.yml
@@ -9,7 +9,6 @@
   Test2::Suite: '0.000131'
   Test::Deep: '0'
   Test::Fatal: '0'
-  Test::File::ShareDir: '0'
   Test::More: '0.88'
   Test::Simple: '1.302176'
   Test::Warnings: '0'
@@ -20,7 +19,6 @@
   utf8: '0'
 configure_requires:
   ExtUtils::MakeMaker: '0'
-  File::ShareDir::Install: '0.06'
   perl: '5.014'
 dynamic_config: 0
 generated_by: 'Dist::Zilla version 6.017, CPAN::Meta::Converter version 2.150010'
@@ -41,7 +39,6 @@
     file: lib/Test/JSON/Schema/Acceptance.pm
     version: '1.003'
 requires:
-  File::ShareDir: '0'
   JSON::MaybeXS: '1.004001'
   List::Util: '1.33'
   Moo: '0'
--- a/t/00-report-prereqs.dd
+++ b/t/00-report-prereqs.dd
@@ -2,7 +2,6 @@
        'configure' => {
                         'requires' => {
                                         'ExtUtils::MakeMaker' => '0',
-                                        'File::ShareDir::Install' => '0.06',
                                         'perl' => '5.014'
                                       }
                       },
@@ -22,7 +21,6 @@
                                       'Test::CPAN::Meta' => '0',
                                       'Test::CleanNamespaces' => '0.15',
                                       'Test::EOL' => '0',
-                                      'Test::File::ShareDir' => '0',
                                       'Test::Kwalitee' => '1.21',
                                       'Test::MinimumVersion' => '0',
                                       'Test::Mojibake' => '0',
@@ -38,7 +36,6 @@
                     },
        'runtime' => {
                       'requires' => {
-                                      'File::ShareDir' => '0',
                                       'JSON::MaybeXS' => '1.004001',
                                       'List::Util' => '1.33',
                                       'Moo' => '0',
@@ -73,7 +70,6 @@
                                    'Test2::Suite' => '0.000131',
                                    'Test::Deep' => '0',
                                    'Test::Fatal' => '0',
-                                   'Test::File::ShareDir' => '0',
                                    'Test::More' => '0.88',
                                    'Test::Simple' => '1.302176',
                                    'Test::Warnings' => '0',
@@ -166,4 +162,4 @@
                          }
      };
   $x;
- }
\ No newline at end of file
+ }