moj_tribunals_config 0.8.0 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.ruby-version +1 -0
- data/Gemfile +6 -1
- data/Gemfile.lock +22 -0
- data/README.rdoc +4 -1
- data/Rakefile +10 -8
- data/VERSION +1 -1
- data/config/tribunals/care-standards.yml +112 -113
- data/config/tribunals/eat.yml +78 -79
- data/config/tribunals/ftt-tax.yml +98 -99
- data/config/tribunals/utiac.yml +118 -119
- data/lib/moj/tribunals/config_loader.rb +10 -5
- data/moj_tribunals_config.gemspec +13 -6
- data/spec/lib/moj/tribunals/config_loader_spec.rb +90 -0
- data/spec/spec_helper.rb +4 -0
- metadata +34 -5
- data/test/helper.rb +0 -34
- data/test/test_moj_tribunals_config.rb +0 -7
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 1233d2f0e695bc9ade2a8cf697017068fcf9ea32
|
|
4
|
+
data.tar.gz: be82f47ed17884dbc5182197da556f95098675cc
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b6d4d277011b5c155f564091c370962f46e5aeb91130065a56e851f37b196cea3b466c59fbf8201bb12fd4c1df635a7301d94cece6f83e7c68cf046f15a51fe0
|
|
7
|
+
data.tar.gz: 375aa81fa53ac6d44bcaaeafff2668c824bd5664e00a96a32480fdbbb6fb19a2e2a56e288b4bfa2d1bb4718e0e1991283faf58bc4dd795e3f9e3162cdad29f5f
|
data/.ruby-version
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
2.1.5@moj_tribunals_config
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
|
@@ -9,8 +9,15 @@ GEM
|
|
|
9
9
|
tzinfo (~> 1.1)
|
|
10
10
|
addressable (2.3.6)
|
|
11
11
|
builder (3.2.2)
|
|
12
|
+
byebug (3.5.1)
|
|
13
|
+
columnize (~> 0.8)
|
|
14
|
+
debugger-linecache (~> 1.2)
|
|
15
|
+
slop (~> 3.6)
|
|
16
|
+
columnize (0.9.0)
|
|
17
|
+
debugger-linecache (1.2.0)
|
|
12
18
|
descendants_tracker (0.0.4)
|
|
13
19
|
thread_safe (~> 0.3, >= 0.3.1)
|
|
20
|
+
diff-lcs (1.2.5)
|
|
14
21
|
docile (1.1.5)
|
|
15
22
|
faraday (0.9.1)
|
|
16
23
|
multipart-post (>= 1.2, < 3)
|
|
@@ -54,6 +61,18 @@ GEM
|
|
|
54
61
|
rake (10.4.2)
|
|
55
62
|
rdoc (3.12.2)
|
|
56
63
|
json (~> 1.4)
|
|
64
|
+
rspec (3.1.0)
|
|
65
|
+
rspec-core (~> 3.1.0)
|
|
66
|
+
rspec-expectations (~> 3.1.0)
|
|
67
|
+
rspec-mocks (~> 3.1.0)
|
|
68
|
+
rspec-core (3.1.7)
|
|
69
|
+
rspec-support (~> 3.1.0)
|
|
70
|
+
rspec-expectations (3.1.2)
|
|
71
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
|
72
|
+
rspec-support (~> 3.1.0)
|
|
73
|
+
rspec-mocks (3.1.3)
|
|
74
|
+
rspec-support (~> 3.1.0)
|
|
75
|
+
rspec-support (3.1.2)
|
|
57
76
|
shoulda (3.5.0)
|
|
58
77
|
shoulda-context (~> 1.0, >= 1.0.1)
|
|
59
78
|
shoulda-matchers (>= 1.4.1, < 3.0)
|
|
@@ -65,6 +84,7 @@ GEM
|
|
|
65
84
|
multi_json (~> 1.0)
|
|
66
85
|
simplecov-html (~> 0.8.0)
|
|
67
86
|
simplecov-html (0.8.0)
|
|
87
|
+
slop (3.6.0)
|
|
68
88
|
thread_safe (0.3.4)
|
|
69
89
|
tzinfo (1.2.2)
|
|
70
90
|
thread_safe (~> 0.1)
|
|
@@ -74,7 +94,9 @@ PLATFORMS
|
|
|
74
94
|
|
|
75
95
|
DEPENDENCIES
|
|
76
96
|
bundler (~> 1.0)
|
|
97
|
+
byebug
|
|
77
98
|
jeweler (~> 2.0.1)
|
|
78
99
|
rdoc (~> 3.12)
|
|
100
|
+
rspec
|
|
79
101
|
shoulda
|
|
80
102
|
simplecov
|
data/README.rdoc
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
= moj_tribunals_config
|
|
2
2
|
|
|
3
|
+
{<img src="https://codeclimate.com/github/ministryofjustice/moj_tribunals_config/badges/gpa.svg" />}[https://codeclimate.com/github/ministryofjustice/moj_tribunals_config]
|
|
4
|
+
{<img src="https://codeclimate.com/github/ministryofjustice/moj_tribunals_config/badges/coverage.svg" />}[https://codeclimate.com/github/ministryofjustice/moj_tribunals_config]
|
|
5
|
+
|
|
3
6
|
== To use:
|
|
4
7
|
|
|
5
8
|
# add this line to your Gemfile:
|
|
@@ -24,7 +27,7 @@ To just load config for a specific tribunal, you can do:
|
|
|
24
27
|
|
|
25
28
|
config_loader = Moj::Tribunals::ConfigLoader.new
|
|
26
29
|
config_file = config_loader.config_file_for('utiac')
|
|
27
|
-
config_loader.
|
|
30
|
+
config_loader.load_file( config_file )
|
|
28
31
|
|
|
29
32
|
== RailsConfig integration
|
|
30
33
|
|
data/Rakefile
CHANGED
|
@@ -40,7 +40,7 @@ Jeweler::Tasks.new do |gem|
|
|
|
40
40
|
|
|
41
41
|
config_loader = Moj::Tribunals::ConfigLoader.new
|
|
42
42
|
config_file = config_loader.config_file_for('utiac')
|
|
43
|
-
config_loader.
|
|
43
|
+
config_loader.load_file( config_file )
|
|
44
44
|
|
|
45
45
|
RailsConfig integration
|
|
46
46
|
=======================
|
|
@@ -57,20 +57,22 @@ Jeweler::Tasks.new do |gem|
|
|
|
57
57
|
end
|
|
58
58
|
Jeweler::RubygemsDotOrgTasks.new
|
|
59
59
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
60
|
+
|
|
61
|
+
begin
|
|
62
|
+
require 'rspec/core/rake_task'
|
|
63
|
+
RSpec::Core::RakeTask.new(:spec)
|
|
64
|
+
rescue LoadError => e
|
|
65
|
+
puts e.inspect
|
|
65
66
|
end
|
|
66
67
|
|
|
68
|
+
|
|
67
69
|
desc "Code coverage detail"
|
|
68
70
|
task :simplecov do
|
|
69
71
|
ENV['COVERAGE'] = "true"
|
|
70
|
-
Rake::Task['
|
|
72
|
+
Rake::Task['spec'].execute
|
|
71
73
|
end
|
|
72
74
|
|
|
73
|
-
task :default => :
|
|
75
|
+
task :default => :spec
|
|
74
76
|
|
|
75
77
|
require 'rdoc/task'
|
|
76
78
|
Rake::RDocTask.new do |rdoc|
|
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.
|
|
1
|
+
1.0.0
|
|
@@ -1,113 +1,112 @@
|
|
|
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
|
-
appeal_number
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
fetch
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
fetch
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
fetch
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
fetch
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
to_date
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
strftime
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
appeal_number
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
to_date
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
strftime
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
notes
|
|
112
|
-
|
|
113
|
-
text: Notes
|
|
1
|
+
name: care-standards
|
|
2
|
+
title: Care Standards Tribunal
|
|
3
|
+
search_params:
|
|
4
|
+
- query
|
|
5
|
+
- search_field
|
|
6
|
+
- reported
|
|
7
|
+
- unreported
|
|
8
|
+
- country_guidance
|
|
9
|
+
- page
|
|
10
|
+
- sort_by
|
|
11
|
+
- judge_ids
|
|
12
|
+
- country_ids
|
|
13
|
+
- category_ids
|
|
14
|
+
- date_from
|
|
15
|
+
- date_to
|
|
16
|
+
allowed_snippet_tags:
|
|
17
|
+
- mark
|
|
18
|
+
- br
|
|
19
|
+
sort_columns:
|
|
20
|
+
promulgated_on:
|
|
21
|
+
directions:
|
|
22
|
+
desc:
|
|
23
|
+
text: Newest first
|
|
24
|
+
_score:
|
|
25
|
+
directions:
|
|
26
|
+
desc:
|
|
27
|
+
text: Relevance
|
|
28
|
+
date_facet_help_text: A judgement can be used as case law from the promulgation date.
|
|
29
|
+
facets:
|
|
30
|
+
category:
|
|
31
|
+
text: Schedule
|
|
32
|
+
collection: categories
|
|
33
|
+
ids: category_ids
|
|
34
|
+
all_link_text: All Schedules
|
|
35
|
+
help_text:
|
|
36
|
+
judge:
|
|
37
|
+
text: Chairman
|
|
38
|
+
collection: judges
|
|
39
|
+
ids: judge_ids
|
|
40
|
+
all_link_text: All Chairman
|
|
41
|
+
help_text:
|
|
42
|
+
table_view_properties:
|
|
43
|
+
appeal_number:
|
|
44
|
+
property: appeal_number
|
|
45
|
+
text: Appeal number
|
|
46
|
+
chairman:
|
|
47
|
+
property: judges
|
|
48
|
+
text: Chairman
|
|
49
|
+
formatters:
|
|
50
|
+
fetch:
|
|
51
|
+
method_name: fetch
|
|
52
|
+
args: "name"
|
|
53
|
+
applicant:
|
|
54
|
+
property: appellants
|
|
55
|
+
text: Applicant names
|
|
56
|
+
formatters:
|
|
57
|
+
fetch:
|
|
58
|
+
method_name: fetch
|
|
59
|
+
args: "name"
|
|
60
|
+
respondent:
|
|
61
|
+
property: respondents
|
|
62
|
+
text: Respondent names
|
|
63
|
+
formatters:
|
|
64
|
+
fetch:
|
|
65
|
+
method_name: fetch
|
|
66
|
+
args: "name"
|
|
67
|
+
category:
|
|
68
|
+
property: categories
|
|
69
|
+
text: Schedule
|
|
70
|
+
formatters:
|
|
71
|
+
fetch:
|
|
72
|
+
method_name: fetch
|
|
73
|
+
args: "name"
|
|
74
|
+
decision_date:
|
|
75
|
+
property: promulgated_on
|
|
76
|
+
text: Promulgation date
|
|
77
|
+
formatters:
|
|
78
|
+
to_date:
|
|
79
|
+
method_name: to_date
|
|
80
|
+
args:
|
|
81
|
+
strftime:
|
|
82
|
+
method_name: strftime
|
|
83
|
+
args: "%d/%m/%Y"
|
|
84
|
+
detail_view_properties:
|
|
85
|
+
appeal_number:
|
|
86
|
+
property: appeal_number
|
|
87
|
+
text: Appeal number
|
|
88
|
+
chairman:
|
|
89
|
+
property: judge_names
|
|
90
|
+
text: Chairman
|
|
91
|
+
applicant:
|
|
92
|
+
property: appellant_names
|
|
93
|
+
text: Applicant names
|
|
94
|
+
respondent:
|
|
95
|
+
property: respondent_names
|
|
96
|
+
text: Respondent names
|
|
97
|
+
category:
|
|
98
|
+
property: category_names
|
|
99
|
+
text: Schedule
|
|
100
|
+
decision_date:
|
|
101
|
+
property: promulgated_on
|
|
102
|
+
text: Promulgation date
|
|
103
|
+
formatters:
|
|
104
|
+
to_date:
|
|
105
|
+
method_name: to_date
|
|
106
|
+
args:
|
|
107
|
+
strftime:
|
|
108
|
+
method_name: strftime
|
|
109
|
+
args: "%d/%m/%Y"
|
|
110
|
+
notes:
|
|
111
|
+
property: notes
|
|
112
|
+
text: Notes
|
data/config/tribunals/eat.yml
CHANGED
|
@@ -1,79 +1,78 @@
|
|
|
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
|
-
case_title
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
keywords
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
promulgated_on
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
to_date
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
strftime
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
country_name
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
keywords
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
case_title
|
|
78
|
-
|
|
79
|
-
text: Case title
|
|
1
|
+
name: eat
|
|
2
|
+
title: Employment Access Tribunal
|
|
3
|
+
search_params:
|
|
4
|
+
- query
|
|
5
|
+
- search_field
|
|
6
|
+
- reported
|
|
7
|
+
- unreported
|
|
8
|
+
- country_guidance
|
|
9
|
+
- page
|
|
10
|
+
- sort_by
|
|
11
|
+
- judge_ids
|
|
12
|
+
- country_ids
|
|
13
|
+
- category_ids
|
|
14
|
+
- date_from
|
|
15
|
+
- date_to
|
|
16
|
+
allowed_snippet_tags:
|
|
17
|
+
- mark
|
|
18
|
+
- br
|
|
19
|
+
sort_columns:
|
|
20
|
+
promulgated_on:
|
|
21
|
+
directions:
|
|
22
|
+
desc:
|
|
23
|
+
text: Newest first
|
|
24
|
+
_score:
|
|
25
|
+
directions:
|
|
26
|
+
desc:
|
|
27
|
+
text: Relevance
|
|
28
|
+
facets:
|
|
29
|
+
country:
|
|
30
|
+
text: Country
|
|
31
|
+
collection: countries
|
|
32
|
+
ids: country_ids
|
|
33
|
+
all_link_text: All Countries
|
|
34
|
+
judge:
|
|
35
|
+
text: Judge
|
|
36
|
+
collection: judges
|
|
37
|
+
ids: judge_ids
|
|
38
|
+
all_link_text: All Judges
|
|
39
|
+
tabs:
|
|
40
|
+
reported:
|
|
41
|
+
text: Reported
|
|
42
|
+
count_method: reported_count
|
|
43
|
+
default: true
|
|
44
|
+
country_guidance:
|
|
45
|
+
text: Country Guidance
|
|
46
|
+
count_method: country_guidance_count
|
|
47
|
+
default: false
|
|
48
|
+
unreported:
|
|
49
|
+
text: Unreported
|
|
50
|
+
count_method: unreported_count
|
|
51
|
+
default: false
|
|
52
|
+
table_view_properties:
|
|
53
|
+
case_title:
|
|
54
|
+
property: case_title
|
|
55
|
+
text: Case title
|
|
56
|
+
keywords:
|
|
57
|
+
property: keywords
|
|
58
|
+
text: Keywords
|
|
59
|
+
promulgated_on:
|
|
60
|
+
property: promulgated_on
|
|
61
|
+
text: Promulgation date
|
|
62
|
+
formatters:
|
|
63
|
+
to_date:
|
|
64
|
+
method_name: to_date
|
|
65
|
+
args:
|
|
66
|
+
strftime:
|
|
67
|
+
method_name: strftime
|
|
68
|
+
args: "%d/%m/%Y"
|
|
69
|
+
country_name:
|
|
70
|
+
property: country_name
|
|
71
|
+
text: Country of Appellant
|
|
72
|
+
keywords:
|
|
73
|
+
property: keywords
|
|
74
|
+
text: keywords
|
|
75
|
+
detail_view_properties:
|
|
76
|
+
case_title:
|
|
77
|
+
property: case_title
|
|
78
|
+
text: Case title
|
|
@@ -1,99 +1,98 @@
|
|
|
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
|
-
case_title
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
promulgated_on
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
to_date
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
strftime
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
appeal_number
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
promulgated_on
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
to_date
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
strftime
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
notes
|
|
98
|
-
|
|
99
|
-
text: Notes
|
|
1
|
+
name: ftt-tax
|
|
2
|
+
title: Finance and Tax Tribunals
|
|
3
|
+
search_params:
|
|
4
|
+
- query
|
|
5
|
+
- search_field
|
|
6
|
+
- reported
|
|
7
|
+
- unreported
|
|
8
|
+
- country_guidance
|
|
9
|
+
- page
|
|
10
|
+
- sort_by
|
|
11
|
+
- judge_ids
|
|
12
|
+
- category_ids
|
|
13
|
+
- date_from
|
|
14
|
+
- date_to
|
|
15
|
+
allowed_snippet_tags:
|
|
16
|
+
- mark
|
|
17
|
+
- br
|
|
18
|
+
sort_columns:
|
|
19
|
+
promulgated_on:
|
|
20
|
+
directions:
|
|
21
|
+
desc:
|
|
22
|
+
text: Newest first
|
|
23
|
+
_score:
|
|
24
|
+
directions:
|
|
25
|
+
desc:
|
|
26
|
+
text: Relevance
|
|
27
|
+
date_facet_help_text: A judgement can be used as case law from the promulgation date.
|
|
28
|
+
facets:
|
|
29
|
+
category:
|
|
30
|
+
text: Category
|
|
31
|
+
collection: categories
|
|
32
|
+
ids: category_ids
|
|
33
|
+
all_link_text: All Categories
|
|
34
|
+
help_text:
|
|
35
|
+
judge:
|
|
36
|
+
text: Judge
|
|
37
|
+
collection: judges
|
|
38
|
+
ids: judge_ids
|
|
39
|
+
all_link_text: All Judges
|
|
40
|
+
help_text:
|
|
41
|
+
table_view_properties:
|
|
42
|
+
case_title:
|
|
43
|
+
property: case_title
|
|
44
|
+
text: Case title
|
|
45
|
+
file_number:
|
|
46
|
+
property: decision_number
|
|
47
|
+
text: File number
|
|
48
|
+
category:
|
|
49
|
+
property: category_names
|
|
50
|
+
text: Category
|
|
51
|
+
sub_category:
|
|
52
|
+
property: subcategory_names
|
|
53
|
+
text: Sub-category
|
|
54
|
+
promulgated_on:
|
|
55
|
+
property: promulgated_on
|
|
56
|
+
text: Promulgation date
|
|
57
|
+
formatters:
|
|
58
|
+
to_date:
|
|
59
|
+
method_name: to_date
|
|
60
|
+
args:
|
|
61
|
+
strftime:
|
|
62
|
+
method_name: strftime
|
|
63
|
+
args: "%d/%m/%Y"
|
|
64
|
+
detail_view_properties:
|
|
65
|
+
judges:
|
|
66
|
+
property: judge_names
|
|
67
|
+
text: Judges
|
|
68
|
+
appellants:
|
|
69
|
+
property: appellant_names
|
|
70
|
+
text: Appellants
|
|
71
|
+
respondents:
|
|
72
|
+
property: respondent_names
|
|
73
|
+
text: Respondents
|
|
74
|
+
category:
|
|
75
|
+
property: category_names
|
|
76
|
+
text: Category
|
|
77
|
+
sub_category:
|
|
78
|
+
property: subcategory_names
|
|
79
|
+
text: Sub-category
|
|
80
|
+
appeal_number:
|
|
81
|
+
property: appeal_number
|
|
82
|
+
text: Appeal number
|
|
83
|
+
file_number:
|
|
84
|
+
property: decision_number
|
|
85
|
+
text: File number
|
|
86
|
+
promulgated_on:
|
|
87
|
+
property: promulgated_on
|
|
88
|
+
text: Promulgation date
|
|
89
|
+
formatters:
|
|
90
|
+
to_date:
|
|
91
|
+
method_name: to_date
|
|
92
|
+
args:
|
|
93
|
+
strftime:
|
|
94
|
+
method_name: strftime
|
|
95
|
+
args: "%d/%m/%Y"
|
|
96
|
+
notes:
|
|
97
|
+
property: notes
|
|
98
|
+
text: Notes
|
data/config/tribunals/utiac.yml
CHANGED
|
@@ -1,119 +1,118 @@
|
|
|
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
|
-
case_title
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
keywords
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
promulgated_on
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
to_date
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
strftime
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
country_name
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
keywords
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
appeal_number
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
ncn
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
country_name
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
country_guidance
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
present
|
|
98
|
-
|
|
99
|
-
humanize
|
|
100
|
-
|
|
101
|
-
keywords
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
hearing_date
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
promulgated_on
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
to_date
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
strftime
|
|
118
|
-
|
|
119
|
-
args: "%d/%m/%Y"
|
|
1
|
+
name: utiac
|
|
2
|
+
title: Upper Tribunal Immigration and Asylum Chamber
|
|
3
|
+
search_params:
|
|
4
|
+
- query
|
|
5
|
+
- search_field
|
|
6
|
+
- reported
|
|
7
|
+
- unreported
|
|
8
|
+
- country_guidance
|
|
9
|
+
- page
|
|
10
|
+
- sort_by
|
|
11
|
+
- judge_ids
|
|
12
|
+
- country_ids
|
|
13
|
+
- date_from
|
|
14
|
+
- date_to
|
|
15
|
+
allowed_snippet_tags:
|
|
16
|
+
- mark
|
|
17
|
+
- br
|
|
18
|
+
sort_columns:
|
|
19
|
+
promulgated_on:
|
|
20
|
+
directions:
|
|
21
|
+
desc:
|
|
22
|
+
text: Newest first
|
|
23
|
+
_score:
|
|
24
|
+
directions:
|
|
25
|
+
desc:
|
|
26
|
+
text: Relevance
|
|
27
|
+
date_facet_help_text: A judgement can be used as case law from the promulgation date.
|
|
28
|
+
facets:
|
|
29
|
+
country:
|
|
30
|
+
text: Country
|
|
31
|
+
collection: countries
|
|
32
|
+
ids: country_ids
|
|
33
|
+
all_link_text: All Countries
|
|
34
|
+
help_text:
|
|
35
|
+
judge:
|
|
36
|
+
text: Judge
|
|
37
|
+
collection: judges
|
|
38
|
+
ids: judge_ids
|
|
39
|
+
all_link_text: All Judges
|
|
40
|
+
tabs:
|
|
41
|
+
reported:
|
|
42
|
+
text: Reported
|
|
43
|
+
count_method: reported_count
|
|
44
|
+
default: true
|
|
45
|
+
help_text:
|
|
46
|
+
country_guidance:
|
|
47
|
+
text: Country Guidance
|
|
48
|
+
count_method: country_guidance_count
|
|
49
|
+
default: false
|
|
50
|
+
help_text:
|
|
51
|
+
unreported:
|
|
52
|
+
text: Unreported
|
|
53
|
+
count_method: unreported_count
|
|
54
|
+
default: false
|
|
55
|
+
help_text:
|
|
56
|
+
table_view_properties:
|
|
57
|
+
case_title:
|
|
58
|
+
property: case_title
|
|
59
|
+
text: Case title
|
|
60
|
+
keywords:
|
|
61
|
+
property: keywords
|
|
62
|
+
text: Keywords
|
|
63
|
+
promulgated_on:
|
|
64
|
+
property: promulgated_on
|
|
65
|
+
text: Promulgation date
|
|
66
|
+
formatters:
|
|
67
|
+
to_date:
|
|
68
|
+
method_name: to_date
|
|
69
|
+
args:
|
|
70
|
+
strftime:
|
|
71
|
+
method_name: strftime
|
|
72
|
+
args: "%d/%m/%Y"
|
|
73
|
+
country_name:
|
|
74
|
+
property: country_name
|
|
75
|
+
text: Country of Appellant
|
|
76
|
+
keywords:
|
|
77
|
+
property: keywords
|
|
78
|
+
text: Keywords
|
|
79
|
+
detail_view_properties:
|
|
80
|
+
appeal_number:
|
|
81
|
+
property: appeal_number
|
|
82
|
+
text: Appeal number
|
|
83
|
+
ncn:
|
|
84
|
+
property: ncn
|
|
85
|
+
text: Neutral Citation Number
|
|
86
|
+
Status:
|
|
87
|
+
property: status
|
|
88
|
+
text: Status
|
|
89
|
+
country_name:
|
|
90
|
+
property: country_name
|
|
91
|
+
text: Country
|
|
92
|
+
country_guidance:
|
|
93
|
+
property: country_guidance
|
|
94
|
+
text: Used as country guidance
|
|
95
|
+
formatters:
|
|
96
|
+
present?:
|
|
97
|
+
method_name: present?
|
|
98
|
+
humanize:
|
|
99
|
+
method_name: humanize
|
|
100
|
+
keywords:
|
|
101
|
+
property: keywords
|
|
102
|
+
text: Keywords
|
|
103
|
+
judges:
|
|
104
|
+
property: judge_names
|
|
105
|
+
text: Judges
|
|
106
|
+
hearing_date:
|
|
107
|
+
property: hearing_date
|
|
108
|
+
text: Hearing Date
|
|
109
|
+
promulgated_on:
|
|
110
|
+
property: promulgated_on
|
|
111
|
+
text: Promulgation date
|
|
112
|
+
formatters:
|
|
113
|
+
to_date:
|
|
114
|
+
method_name: to_date
|
|
115
|
+
args:
|
|
116
|
+
strftime:
|
|
117
|
+
method_name: strftime
|
|
118
|
+
args: "%d/%m/%Y"
|
|
@@ -27,14 +27,19 @@ module Moj
|
|
|
27
27
|
Dir.glob(File.join(config_path, '*.yml'))
|
|
28
28
|
end
|
|
29
29
|
|
|
30
|
-
|
|
30
|
+
def load_file(file)
|
|
31
|
+
YAML.load_file(file)
|
|
32
|
+
end
|
|
31
33
|
|
|
32
|
-
|
|
33
|
-
YAML.load_file(file)
|
|
34
|
-
end
|
|
34
|
+
private
|
|
35
35
|
|
|
36
36
|
def default_config_path
|
|
37
|
-
File.
|
|
37
|
+
File.expand_path(
|
|
38
|
+
File.join(
|
|
39
|
+
File.dirname(__FILE__),
|
|
40
|
+
'..', '..', '..', 'config', 'tribunals'
|
|
41
|
+
)
|
|
42
|
+
)
|
|
38
43
|
end
|
|
39
44
|
end
|
|
40
45
|
end
|
|
@@ -2,17 +2,17 @@
|
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
|
3
3
|
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
|
4
4
|
# -*- encoding: utf-8 -*-
|
|
5
|
-
# stub: moj_tribunals_config 0.
|
|
5
|
+
# stub: moj_tribunals_config 1.0.0 ruby lib
|
|
6
6
|
|
|
7
7
|
Gem::Specification.new do |s|
|
|
8
8
|
s.name = "moj_tribunals_config"
|
|
9
|
-
s.version = "0.
|
|
9
|
+
s.version = "1.0.0"
|
|
10
10
|
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
|
12
12
|
s.require_paths = ["lib"]
|
|
13
13
|
s.authors = ["Al Davidson"]
|
|
14
|
-
s.date = "2015-02-
|
|
15
|
-
s.description = "Used by tribunals_frontend and tribunals_api to share configuration.\n To use:\n\n 1) add \"gem 'moj_tribunals_config'\" to your Gemfile\n 2) in an initializer, add the following code:\n\n require 'moj_tribunals_config'\n\n my_config = Moj::Tribunals::ConfigLoader.new.load\n\n This will load the default config files from the gem.\n\n\n To load different files, you can provide an alternative path \n to the ConfigLoader.new method, e.g.\n\n my_config = Moj::Tribunals::ConfigLoader.new('/my/alternative/config/path').load\n\n To just load config for a specific tribunal, you can do:\n\n config_loader = Moj::Tribunals::ConfigLoader.new\n config_file = config_loader.config_file_for('utiac')\n config_loader.
|
|
14
|
+
s.date = "2015-02-03"
|
|
15
|
+
s.description = "Used by tribunals_frontend and tribunals_api to share configuration.\n To use:\n\n 1) add \"gem 'moj_tribunals_config'\" to your Gemfile\n 2) in an initializer, add the following code:\n\n require 'moj_tribunals_config'\n\n my_config = Moj::Tribunals::ConfigLoader.new.load\n\n This will load the default config files from the gem.\n\n\n To load different files, you can provide an alternative path \n to the ConfigLoader.new method, e.g.\n\n my_config = Moj::Tribunals::ConfigLoader.new('/my/alternative/config/path').load\n\n To just load config for a specific tribunal, you can do:\n\n config_loader = Moj::Tribunals::ConfigLoader.new\n config_file = config_loader.config_file_for('utiac')\n config_loader.load_file( config_file )\n\n RailsConfig integration\n =======================\n\n If you're using the RailsConfig gem, your intializer can just do something like:\n\n files = Moj::Tribunals::ConfigLoader.new.config_files\n files.each{ |f| Settings.add_source!( f ) }\n Settings.reload!\n "
|
|
16
16
|
s.email = "apdavidson@gmail.com"
|
|
17
17
|
s.extra_rdoc_files = [
|
|
18
18
|
"LICENSE.txt",
|
|
@@ -20,6 +20,7 @@ Gem::Specification.new do |s|
|
|
|
20
20
|
]
|
|
21
21
|
s.files = [
|
|
22
22
|
".document",
|
|
23
|
+
".ruby-version",
|
|
23
24
|
"Gemfile",
|
|
24
25
|
"Gemfile.lock",
|
|
25
26
|
"LICENSE.txt",
|
|
@@ -33,8 +34,8 @@ Gem::Specification.new do |s|
|
|
|
33
34
|
"lib/moj/tribunals/config_loader.rb",
|
|
34
35
|
"lib/moj_tribunals_config.rb",
|
|
35
36
|
"moj_tribunals_config.gemspec",
|
|
36
|
-
"
|
|
37
|
-
"
|
|
37
|
+
"spec/lib/moj/tribunals/config_loader_spec.rb",
|
|
38
|
+
"spec/spec_helper.rb"
|
|
38
39
|
]
|
|
39
40
|
s.homepage = "http://github.com/aldavidson/moj_tribunals_config"
|
|
40
41
|
s.licenses = ["MIT"]
|
|
@@ -49,12 +50,16 @@ Gem::Specification.new do |s|
|
|
|
49
50
|
s.add_development_dependency(%q<rdoc>, ["~> 3.12"])
|
|
50
51
|
s.add_development_dependency(%q<bundler>, ["~> 1.0"])
|
|
51
52
|
s.add_development_dependency(%q<jeweler>, ["~> 2.0.1"])
|
|
53
|
+
s.add_development_dependency(%q<byebug>, [">= 0"])
|
|
54
|
+
s.add_development_dependency(%q<rspec>, [">= 0"])
|
|
52
55
|
s.add_development_dependency(%q<simplecov>, [">= 0"])
|
|
53
56
|
else
|
|
54
57
|
s.add_dependency(%q<shoulda>, [">= 0"])
|
|
55
58
|
s.add_dependency(%q<rdoc>, ["~> 3.12"])
|
|
56
59
|
s.add_dependency(%q<bundler>, ["~> 1.0"])
|
|
57
60
|
s.add_dependency(%q<jeweler>, ["~> 2.0.1"])
|
|
61
|
+
s.add_dependency(%q<byebug>, [">= 0"])
|
|
62
|
+
s.add_dependency(%q<rspec>, [">= 0"])
|
|
58
63
|
s.add_dependency(%q<simplecov>, [">= 0"])
|
|
59
64
|
end
|
|
60
65
|
else
|
|
@@ -62,6 +67,8 @@ Gem::Specification.new do |s|
|
|
|
62
67
|
s.add_dependency(%q<rdoc>, ["~> 3.12"])
|
|
63
68
|
s.add_dependency(%q<bundler>, ["~> 1.0"])
|
|
64
69
|
s.add_dependency(%q<jeweler>, ["~> 2.0.1"])
|
|
70
|
+
s.add_dependency(%q<byebug>, [">= 0"])
|
|
71
|
+
s.add_dependency(%q<rspec>, [">= 0"])
|
|
65
72
|
s.add_dependency(%q<simplecov>, [">= 0"])
|
|
66
73
|
end
|
|
67
74
|
end
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
require 'spec_helper'
|
|
2
|
+
require 'moj/tribunals/config_loader'
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
describe Moj::Tribunals::ConfigLoader do
|
|
6
|
+
describe '#initialize' do
|
|
7
|
+
context 'with no arguments' do
|
|
8
|
+
it 'defaults the config_path to default_config_path' do
|
|
9
|
+
expect(subject.config_path).to eq(subject.send(:default_config_path))
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
context 'given a config_path' do
|
|
13
|
+
let(:config_path){ '/my/config_path' }
|
|
14
|
+
subject{ Moj::Tribunals::ConfigLoader.new(config_path) }
|
|
15
|
+
|
|
16
|
+
it 'stores the given config_path' do
|
|
17
|
+
expect( subject.config_path ).to eq(config_path)
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
describe '#default_config_path' do
|
|
23
|
+
let(:path_to_config){ File.join(File.dirname(__FILE__), '..', '..', '..', '..', 'config', 'tribunals') }
|
|
24
|
+
let(:resolved_path_to_config){ File.expand_path( path_to_config ) }
|
|
25
|
+
|
|
26
|
+
it 'is the full path to the config/tribunals folder' do
|
|
27
|
+
expect(subject.send(:default_config_path)).to eq(resolved_path_to_config)
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
describe '#load_file' do
|
|
32
|
+
it 'loads the given file as YAML' do
|
|
33
|
+
expect(YAML).to receive(:load_file).with('/my/file')
|
|
34
|
+
subject.send(:load_file, '/my/file')
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
it 'returns the result of parsing the given file as YAML' do
|
|
38
|
+
allow(YAML).to receive(:load_file).with('/my/file').and_return( {key: 'value'} )
|
|
39
|
+
expect(subject.send(:load_file, '/my/file')).to eq({key: 'value'})
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
describe '#config_files' do
|
|
44
|
+
it 'returns all YAML files in the config folder' do
|
|
45
|
+
expect(subject.config_files.sort.map{|f| File.basename(f) } ).to eq(['care-standards.yml', 'eat.yml', 'ftt-tax.yml', 'utiac.yml'])
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
describe '#config_file_for' do
|
|
50
|
+
context 'given a tribunal name that exists as a config file' do
|
|
51
|
+
let(:tribunal){ 'ftt-tax' }
|
|
52
|
+
|
|
53
|
+
it 'returns the full path to the corresponding config file' do
|
|
54
|
+
expect(subject.config_file_for(tribunal)).to eq(File.join(subject.send(:config_path), "#{tribunal}.yml"))
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
context 'given a tribunal name that exists as a config file' do
|
|
59
|
+
let(:tribunal){ 'non_existent_tribunal' }
|
|
60
|
+
|
|
61
|
+
it 'returns the full path to the corresponding config file' do
|
|
62
|
+
expect(subject.config_file_for(tribunal)).to be_nil
|
|
63
|
+
end
|
|
64
|
+
end
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
describe '#load' do
|
|
68
|
+
it 'returns a hash' do
|
|
69
|
+
expect(subject.load).to be_a(Hash)
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
describe 'the returned Hash' do
|
|
73
|
+
let(:result){ subject.load }
|
|
74
|
+
|
|
75
|
+
describe 'each tribunal' do
|
|
76
|
+
let(:tribunals){ [:'care-standards', :eat, :'ftt-tax', :utiac] }
|
|
77
|
+
|
|
78
|
+
it 'has a top-level key' do
|
|
79
|
+
expect(result.keys).to eq( tribunals )
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
it 'has second-level keys for each value in the YAML file' do
|
|
83
|
+
tribunals.each do |tribunal|
|
|
84
|
+
expect(result[tribunal].keys.map(&:to_sym)).to include( :name, :title, :search_params )
|
|
85
|
+
end
|
|
86
|
+
end
|
|
87
|
+
end
|
|
88
|
+
end
|
|
89
|
+
end
|
|
90
|
+
end
|
data/spec/spec_helper.rb
ADDED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: moj_tribunals_config
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 1.0.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Al Davidson
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2015-02-
|
|
11
|
+
date: 2015-02-03 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: shoulda
|
|
@@ -66,6 +66,34 @@ dependencies:
|
|
|
66
66
|
- - "~>"
|
|
67
67
|
- !ruby/object:Gem::Version
|
|
68
68
|
version: 2.0.1
|
|
69
|
+
- !ruby/object:Gem::Dependency
|
|
70
|
+
name: byebug
|
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
|
72
|
+
requirements:
|
|
73
|
+
- - ">="
|
|
74
|
+
- !ruby/object:Gem::Version
|
|
75
|
+
version: '0'
|
|
76
|
+
type: :development
|
|
77
|
+
prerelease: false
|
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
79
|
+
requirements:
|
|
80
|
+
- - ">="
|
|
81
|
+
- !ruby/object:Gem::Version
|
|
82
|
+
version: '0'
|
|
83
|
+
- !ruby/object:Gem::Dependency
|
|
84
|
+
name: rspec
|
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
|
86
|
+
requirements:
|
|
87
|
+
- - ">="
|
|
88
|
+
- !ruby/object:Gem::Version
|
|
89
|
+
version: '0'
|
|
90
|
+
type: :development
|
|
91
|
+
prerelease: false
|
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
93
|
+
requirements:
|
|
94
|
+
- - ">="
|
|
95
|
+
- !ruby/object:Gem::Version
|
|
96
|
+
version: '0'
|
|
69
97
|
- !ruby/object:Gem::Dependency
|
|
70
98
|
name: simplecov
|
|
71
99
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -88,7 +116,7 @@ description: "Used by tribunals_frontend and tribunals_api to share configuratio
|
|
|
88
116
|
an alternative path \n to the ConfigLoader.new method, e.g.\n\n my_config
|
|
89
117
|
= Moj::Tribunals::ConfigLoader.new('/my/alternative/config/path').load\n\n To
|
|
90
118
|
just load config for a specific tribunal, you can do:\n\n config_loader = Moj::Tribunals::ConfigLoader.new\n
|
|
91
|
-
\ config_file = config_loader.config_file_for('utiac')\n config_loader.
|
|
119
|
+
\ config_file = config_loader.config_file_for('utiac')\n config_loader.load_file(
|
|
92
120
|
config_file )\n\n RailsConfig integration\n =======================\n\n If
|
|
93
121
|
you're using the RailsConfig gem, your intializer can just do something like:\n\n
|
|
94
122
|
\ files = Moj::Tribunals::ConfigLoader.new.config_files\n files.each{ |f| Settings.add_source!(
|
|
@@ -101,6 +129,7 @@ extra_rdoc_files:
|
|
|
101
129
|
- README.rdoc
|
|
102
130
|
files:
|
|
103
131
|
- ".document"
|
|
132
|
+
- ".ruby-version"
|
|
104
133
|
- Gemfile
|
|
105
134
|
- Gemfile.lock
|
|
106
135
|
- LICENSE.txt
|
|
@@ -114,8 +143,8 @@ files:
|
|
|
114
143
|
- lib/moj/tribunals/config_loader.rb
|
|
115
144
|
- lib/moj_tribunals_config.rb
|
|
116
145
|
- moj_tribunals_config.gemspec
|
|
117
|
-
-
|
|
118
|
-
-
|
|
146
|
+
- spec/lib/moj/tribunals/config_loader_spec.rb
|
|
147
|
+
- spec/spec_helper.rb
|
|
119
148
|
homepage: http://github.com/aldavidson/moj_tribunals_config
|
|
120
149
|
licenses:
|
|
121
150
|
- MIT
|
data/test/helper.rb
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
require 'simplecov'
|
|
2
|
-
|
|
3
|
-
module SimpleCov::Configuration
|
|
4
|
-
def clean_filters
|
|
5
|
-
@filters = []
|
|
6
|
-
end
|
|
7
|
-
end
|
|
8
|
-
|
|
9
|
-
SimpleCov.configure do
|
|
10
|
-
clean_filters
|
|
11
|
-
load_adapter 'test_frameworks'
|
|
12
|
-
end
|
|
13
|
-
|
|
14
|
-
ENV["COVERAGE"] && SimpleCov.start do
|
|
15
|
-
add_filter "/.rvm/"
|
|
16
|
-
end
|
|
17
|
-
require 'rubygems'
|
|
18
|
-
require 'bundler'
|
|
19
|
-
begin
|
|
20
|
-
Bundler.setup(:default, :development)
|
|
21
|
-
rescue Bundler::BundlerError => e
|
|
22
|
-
$stderr.puts e.message
|
|
23
|
-
$stderr.puts "Run `bundle install` to install missing gems"
|
|
24
|
-
exit e.status_code
|
|
25
|
-
end
|
|
26
|
-
require 'test/unit'
|
|
27
|
-
require 'shoulda'
|
|
28
|
-
|
|
29
|
-
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
|
30
|
-
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
|
31
|
-
require 'moj_tribunals_config'
|
|
32
|
-
|
|
33
|
-
class Test::Unit::TestCase
|
|
34
|
-
end
|