moj_tribunals_config 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: c5f6584256f59e97b0fb29846d76c78bbde5edea
4
+ data.tar.gz: 4c1cdc203d96d67c3986e325fec6bf9df5c7c0a6
5
+ SHA512:
6
+ metadata.gz: 5f5d38db5b49e7cf88a9019698cc81b329fbcc1abdf5c29f20396ccf410ae6302ea875eafcfd03f9c266332a2eb3390ab2cffaf2f70ad3b816446ccc7516f934
7
+ data.tar.gz: 2aa7144c5fc8038c049909bb4b7697d7a0c70360aeacd6a840fc41dd6b61f8059deb7946359358375ef4abe6367453b38c7f7678cce6ba9941c49037382e999e
data/.document ADDED
@@ -0,0 +1,5 @@
1
+ lib/**/*.rb
2
+ bin/*
3
+ -
4
+ features/**/*.feature
5
+ LICENSE.txt
data/Gemfile ADDED
@@ -0,0 +1,14 @@
1
+ source "http://rubygems.org"
2
+ # Add dependencies required to use your gem here.
3
+ # Example:
4
+ # gem "activesupport", ">= 2.3.5"
5
+
6
+ # Add dependencies to develop your gem here.
7
+ # Include everything needed to run rake, tests, features, etc.
8
+ group :development do
9
+ gem "shoulda", ">= 0"
10
+ gem "rdoc", "~> 3.12"
11
+ gem "bundler", "~> 1.0"
12
+ gem "jeweler", "~> 2.0.1"
13
+ gem "simplecov", ">= 0"
14
+ end
data/Gemfile.lock ADDED
@@ -0,0 +1,80 @@
1
+ GEM
2
+ remote: http://rubygems.org/
3
+ specs:
4
+ activesupport (4.2.0)
5
+ i18n (~> 0.7)
6
+ json (~> 1.7, >= 1.7.7)
7
+ minitest (~> 5.1)
8
+ thread_safe (~> 0.3, >= 0.3.4)
9
+ tzinfo (~> 1.1)
10
+ addressable (2.3.6)
11
+ builder (3.2.2)
12
+ descendants_tracker (0.0.4)
13
+ thread_safe (~> 0.3, >= 0.3.1)
14
+ docile (1.1.5)
15
+ faraday (0.9.1)
16
+ multipart-post (>= 1.2, < 3)
17
+ git (1.2.9.1)
18
+ github_api (0.12.2)
19
+ addressable (~> 2.3)
20
+ descendants_tracker (~> 0.0.4)
21
+ faraday (~> 0.8, < 0.10)
22
+ hashie (>= 3.3)
23
+ multi_json (>= 1.7.5, < 2.0)
24
+ nokogiri (~> 1.6.3)
25
+ oauth2
26
+ hashie (3.3.2)
27
+ highline (1.6.21)
28
+ i18n (0.7.0)
29
+ jeweler (2.0.1)
30
+ builder
31
+ bundler (>= 1.0)
32
+ git (>= 1.2.5)
33
+ github_api
34
+ highline (>= 1.6.15)
35
+ nokogiri (>= 1.5.10)
36
+ rake
37
+ rdoc
38
+ json (1.8.2)
39
+ jwt (1.2.1)
40
+ mini_portile (0.6.2)
41
+ minitest (5.5.1)
42
+ multi_json (1.10.1)
43
+ multi_xml (0.5.5)
44
+ multipart-post (2.0.0)
45
+ nokogiri (1.6.6.2)
46
+ mini_portile (~> 0.6.0)
47
+ oauth2 (1.0.0)
48
+ faraday (>= 0.8, < 0.10)
49
+ jwt (~> 1.0)
50
+ multi_json (~> 1.3)
51
+ multi_xml (~> 0.5)
52
+ rack (~> 1.2)
53
+ rack (1.6.0)
54
+ rake (10.4.2)
55
+ rdoc (3.12.2)
56
+ json (~> 1.4)
57
+ shoulda (3.5.0)
58
+ shoulda-context (~> 1.0, >= 1.0.1)
59
+ shoulda-matchers (>= 1.4.1, < 3.0)
60
+ shoulda-context (1.2.1)
61
+ shoulda-matchers (2.8.0)
62
+ activesupport (>= 3.0.0)
63
+ simplecov (0.9.1)
64
+ docile (~> 1.1.0)
65
+ multi_json (~> 1.0)
66
+ simplecov-html (~> 0.8.0)
67
+ simplecov-html (0.8.0)
68
+ thread_safe (0.3.4)
69
+ tzinfo (1.2.2)
70
+ thread_safe (~> 0.1)
71
+
72
+ PLATFORMS
73
+ ruby
74
+
75
+ DEPENDENCIES
76
+ bundler (~> 1.0)
77
+ jeweler (~> 2.0.1)
78
+ rdoc (~> 3.12)
79
+ shoulda
80
+ simplecov
data/LICENSE.txt ADDED
@@ -0,0 +1,7 @@
1
+ © Crown copyright (Ministry of Justice - Digital Services)
2
+
3
+ This software is licensed under the Open Government Licence v2.0. To
4
+ view this licence, visit
5
+ www.nationalarchives.gov.uk/doc/open-government-licence/version/2 or
6
+ write to the Information Policy Team, The National Archives, Kew,
7
+ Richmond, Surrey, TW9 4DU.
data/README.rdoc ADDED
@@ -0,0 +1,51 @@
1
+ = moj_tribunals_config
2
+
3
+ == To use:
4
+
5
+ # add this line to your Gemfile:
6
+
7
+ gem 'moj_tribunals_config'
8
+
9
+ # in an initializer, add the following code:
10
+
11
+ require 'moj_tribunals_config'
12
+
13
+ my_config = Moj::Tribunals::ConfigLoader.new.load
14
+
15
+ This will load the default config files from the gem.
16
+
17
+
18
+ To load different files, you can provide an alternative path
19
+ to the ConfigLoader.new method, e.g.
20
+
21
+ my_config = Moj::Tribunals::ConfigLoader.new('/my/alternative/config/path').load
22
+
23
+ To just load config for a specific tribunal, you can do:
24
+
25
+ config_loader = Moj::Tribunals::ConfigLoader.new
26
+ config_file = config_loader.config_file_for('utiac')
27
+ config_loader.load( config_file )
28
+
29
+ == RailsConfig integration
30
+
31
+ If you're using the RailsConfig gem, your intializer can just do something like:
32
+
33
+ files = Moj::Tribunals::ConfigLoader.new.config_files
34
+ files.each{ |f| Settings.add_source!( f ) }
35
+ Settings.reload!
36
+
37
+ == Contributing to moj_tribunals_config
38
+
39
+ * Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.
40
+ * Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it.
41
+ * Fork the project.
42
+ * Start a feature/bugfix branch.
43
+ * Commit and push until you are happy with your contribution.
44
+ * Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
45
+ * Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
46
+
47
+ == Copyright
48
+
49
+ © Crown copyright (Ministry of Justice - Digital Services). See LICENSE.txt for
50
+ further details.
51
+
data/Rakefile ADDED
@@ -0,0 +1,83 @@
1
+ # encoding: utf-8
2
+
3
+ require 'rubygems'
4
+ require 'bundler'
5
+ begin
6
+ Bundler.setup(:default, :development)
7
+ rescue Bundler::BundlerError => e
8
+ $stderr.puts e.message
9
+ $stderr.puts "Run `bundle install` to install missing gems"
10
+ exit e.status_code
11
+ end
12
+ require 'rake'
13
+
14
+ require 'jeweler'
15
+ Jeweler::Tasks.new do |gem|
16
+ # gem is a Gem::Specification... see http://guides.rubygems.org/specification-reference/ for more options
17
+ gem.name = "moj_tribunals_config"
18
+ gem.homepage = "http://github.com/aldavidson/moj_tribunals_config"
19
+ gem.license = "MIT"
20
+ gem.summary = %Q{Provides a single source of truth about configuration for MoJ Tribunals.}
21
+ gem.description = %Q{Used by tribunals_frontend and tribunals_api to share configuration.
22
+ To use:
23
+
24
+ 1) add "gem 'moj_tribunals_config'" to your Gemfile
25
+ 2) in an initializer, add the following code:
26
+
27
+ require 'moj_tribunals_config'
28
+
29
+ my_config = Moj::Tribunals::ConfigLoader.new.load
30
+
31
+ This will load the default config files from the gem.
32
+
33
+
34
+ To load different files, you can provide an alternative path
35
+ to the ConfigLoader.new method, e.g.
36
+
37
+ my_config = Moj::Tribunals::ConfigLoader.new('/my/alternative/config/path').load
38
+
39
+ To just load config for a specific tribunal, you can do:
40
+
41
+ config_loader = Moj::Tribunals::ConfigLoader.new
42
+ config_file = config_loader.config_file_for('utiac')
43
+ config_loader.load( config_file )
44
+
45
+ RailsConfig integration
46
+ =======================
47
+
48
+ If you're using the RailsConfig gem, your intializer can just do something like:
49
+
50
+ files = Moj::Tribunals::ConfigLoader.new.config_files
51
+ files.each{ |f| Settings.add_source!( f ) }
52
+ Settings.reload!
53
+ }
54
+ gem.email = "apdavidson@gmail.com"
55
+ gem.authors = ["Al Davidson"]
56
+ # dependencies defined in Gemfile
57
+ end
58
+ Jeweler::RubygemsDotOrgTasks.new
59
+
60
+ require 'rake/testtask'
61
+ Rake::TestTask.new(:test) do |test|
62
+ test.libs << 'lib' << 'test'
63
+ test.pattern = 'test/**/test_*.rb'
64
+ test.verbose = true
65
+ end
66
+
67
+ desc "Code coverage detail"
68
+ task :simplecov do
69
+ ENV['COVERAGE'] = "true"
70
+ Rake::Task['test'].execute
71
+ end
72
+
73
+ task :default => :test
74
+
75
+ require 'rdoc/task'
76
+ Rake::RDocTask.new do |rdoc|
77
+ version = File.exist?('VERSION') ? File.read('VERSION') : ""
78
+
79
+ rdoc.rdoc_dir = 'rdoc'
80
+ rdoc.title = "moj_tribunals_config #{version}"
81
+ rdoc.rdoc_files.include('README*')
82
+ rdoc.rdoc_files.include('lib/**/*.rb')
83
+ end
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 0.8.0
@@ -0,0 +1,113 @@
1
+ tribunal:
2
+ name: care-standards
3
+ title: Care Standards Tribunal
4
+ search_params:
5
+ - query
6
+ - search_field
7
+ - reported
8
+ - unreported
9
+ - country_guidance
10
+ - page
11
+ - sort_by
12
+ - judge_ids
13
+ - country_ids
14
+ - category_ids
15
+ - date_from
16
+ - date_to
17
+ allowed_snippet_tags:
18
+ - mark
19
+ - br
20
+ sort_columns:
21
+ promulgated_on:
22
+ directions:
23
+ desc:
24
+ text: Newest first
25
+ _score:
26
+ directions:
27
+ desc:
28
+ text: Relevance
29
+ date_facet_help_text: A judgement can be used as case law from the promulgation date.
30
+ facets:
31
+ category:
32
+ text: Schedule
33
+ collection: categories
34
+ ids: category_ids
35
+ all_link_text: All Schedules
36
+ help_text:
37
+ judge:
38
+ text: Chairman
39
+ collection: judges
40
+ ids: judge_ids
41
+ all_link_text: All Chairman
42
+ help_text:
43
+ table_view_properties:
44
+ appeal_number:
45
+ property: appeal_number
46
+ text: Appeal number
47
+ chairman:
48
+ property: judges
49
+ text: Chairman
50
+ formatters:
51
+ fetch:
52
+ method_name: fetch
53
+ args: "name"
54
+ applicant:
55
+ property: appellants
56
+ text: Applicant names
57
+ formatters:
58
+ fetch:
59
+ method_name: fetch
60
+ args: "name"
61
+ respondent:
62
+ property: respondents
63
+ text: Respondent names
64
+ formatters:
65
+ fetch:
66
+ method_name: fetch
67
+ args: "name"
68
+ category:
69
+ property: categories
70
+ text: Schedule
71
+ formatters:
72
+ fetch:
73
+ method_name: fetch
74
+ args: "name"
75
+ decision_date:
76
+ property: promulgated_on
77
+ text: Promulgation date
78
+ formatters:
79
+ to_date:
80
+ method_name: to_date
81
+ args:
82
+ strftime:
83
+ method_name: strftime
84
+ args: "%d/%m/%Y"
85
+ detail_view_properties:
86
+ appeal_number:
87
+ property: appeal_number
88
+ text: Appeal number
89
+ chairman:
90
+ property: judge_names
91
+ text: Chairman
92
+ applicant:
93
+ property: appellant_names
94
+ text: Applicant names
95
+ respondent:
96
+ property: respondent_names
97
+ text: Respondent names
98
+ category:
99
+ property: category_names
100
+ text: Schedule
101
+ decision_date:
102
+ property: promulgated_on
103
+ text: Promulgation date
104
+ formatters:
105
+ to_date:
106
+ method_name: to_date
107
+ args:
108
+ strftime:
109
+ method_name: strftime
110
+ args: "%d/%m/%Y"
111
+ notes:
112
+ property: notes
113
+ text: Notes
@@ -0,0 +1,79 @@
1
+ tribunal:
2
+ name: eat
3
+ title: Employment Access Tribunal
4
+ search_params:
5
+ - query
6
+ - search_field
7
+ - reported
8
+ - unreported
9
+ - country_guidance
10
+ - page
11
+ - sort_by
12
+ - judge_ids
13
+ - country_ids
14
+ - category_ids
15
+ - date_from
16
+ - date_to
17
+ allowed_snippet_tags:
18
+ - mark
19
+ - br
20
+ sort_columns:
21
+ promulgated_on:
22
+ directions:
23
+ desc:
24
+ text: Newest first
25
+ _score:
26
+ directions:
27
+ desc:
28
+ text: Relevance
29
+ facets:
30
+ country:
31
+ text: Country
32
+ collection: countries
33
+ ids: country_ids
34
+ all_link_text: All Countries
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
+ country_guidance:
46
+ text: Country Guidance
47
+ count_method: country_guidance_count
48
+ default: false
49
+ unreported:
50
+ text: Unreported
51
+ count_method: unreported_count
52
+ default: false
53
+ table_view_properties:
54
+ case_title:
55
+ property: case_title
56
+ text: Case title
57
+ keywords:
58
+ property: keywords
59
+ text: Keywords
60
+ promulgated_on:
61
+ property: promulgated_on
62
+ text: Promulgation date
63
+ formatters:
64
+ to_date:
65
+ method_name: to_date
66
+ args:
67
+ strftime:
68
+ method_name: strftime
69
+ args: "%d/%m/%Y"
70
+ country_name:
71
+ property: country_name
72
+ text: Country of Appellant
73
+ keywords:
74
+ property: keywords
75
+ text: keywords
76
+ detail_view_properties:
77
+ case_title:
78
+ property: case_title
79
+ text: Case title
@@ -0,0 +1,99 @@
1
+ tribunal:
2
+ name: ftt-tax
3
+ title: Finance and Tax Tribunals
4
+ search_params:
5
+ - query
6
+ - search_field
7
+ - reported
8
+ - unreported
9
+ - country_guidance
10
+ - page
11
+ - sort_by
12
+ - judge_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: Category
32
+ collection: categories
33
+ ids: category_ids
34
+ all_link_text: All Categories
35
+ help_text:
36
+ judge:
37
+ text: Judge
38
+ collection: judges
39
+ ids: judge_ids
40
+ all_link_text: All Judges
41
+ help_text:
42
+ table_view_properties:
43
+ case_title:
44
+ property: case_title
45
+ text: Case title
46
+ file_number:
47
+ property: decision_number
48
+ text: File number
49
+ category:
50
+ property: category_names
51
+ text: Category
52
+ sub_category:
53
+ property: subcategory_names
54
+ text: Sub-category
55
+ promulgated_on:
56
+ property: promulgated_on
57
+ text: Promulgation date
58
+ formatters:
59
+ to_date:
60
+ method_name: to_date
61
+ args:
62
+ strftime:
63
+ method_name: strftime
64
+ args: "%d/%m/%Y"
65
+ detail_view_properties:
66
+ judges:
67
+ property: judge_names
68
+ text: Judges
69
+ appellants:
70
+ property: appellant_names
71
+ text: Appellants
72
+ respondents:
73
+ property: respondent_names
74
+ text: Respondents
75
+ category:
76
+ property: category_names
77
+ text: Category
78
+ sub_category:
79
+ property: subcategory_names
80
+ text: Sub-category
81
+ appeal_number:
82
+ property: appeal_number
83
+ text: Appeal number
84
+ file_number:
85
+ property: decision_number
86
+ text: File number
87
+ promulgated_on:
88
+ property: promulgated_on
89
+ text: Promulgation date
90
+ formatters:
91
+ to_date:
92
+ method_name: to_date
93
+ args:
94
+ strftime:
95
+ method_name: strftime
96
+ args: "%d/%m/%Y"
97
+ notes:
98
+ property: notes
99
+ text: Notes
@@ -0,0 +1,119 @@
1
+ tribunal:
2
+ name: utiac
3
+ title: Upper Tribunal Immigration and Asylum Chamber
4
+ search_params:
5
+ - query
6
+ - search_field
7
+ - reported
8
+ - unreported
9
+ - country_guidance
10
+ - page
11
+ - sort_by
12
+ - judge_ids
13
+ - country_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
+ country:
31
+ text: Country
32
+ collection: countries
33
+ ids: country_ids
34
+ all_link_text: All Countries
35
+ help_text:
36
+ judge:
37
+ text: Judge
38
+ collection: judges
39
+ ids: judge_ids
40
+ all_link_text: All Judges
41
+ tabs:
42
+ reported:
43
+ text: Reported
44
+ count_method: reported_count
45
+ default: true
46
+ help_text:
47
+ country_guidance:
48
+ text: Country Guidance
49
+ count_method: country_guidance_count
50
+ default: false
51
+ help_text:
52
+ unreported:
53
+ text: Unreported
54
+ count_method: unreported_count
55
+ default: false
56
+ help_text:
57
+ table_view_properties:
58
+ case_title:
59
+ property: case_title
60
+ text: Case title
61
+ keywords:
62
+ property: keywords
63
+ text: Keywords
64
+ promulgated_on:
65
+ property: promulgated_on
66
+ text: Promulgation date
67
+ formatters:
68
+ to_date:
69
+ method_name: to_date
70
+ args:
71
+ strftime:
72
+ method_name: strftime
73
+ args: "%d/%m/%Y"
74
+ country_name:
75
+ property: country_name
76
+ text: Country of Appellant
77
+ keywords:
78
+ property: keywords
79
+ text: Keywords
80
+ detail_view_properties:
81
+ appeal_number:
82
+ property: appeal_number
83
+ text: Appeal number
84
+ ncn:
85
+ property: ncn
86
+ text: Neutral Citation Number
87
+ Status:
88
+ property: status
89
+ text: Status
90
+ country_name:
91
+ property: country_name
92
+ text: Country
93
+ country_guidance:
94
+ property: country_guidance
95
+ text: Used as country guidance
96
+ formatters:
97
+ present?:
98
+ method_name: present?
99
+ humanize:
100
+ method_name: humanize
101
+ keywords:
102
+ property: keywords
103
+ text: Keywords
104
+ judges:
105
+ property: judge_names
106
+ text: Judges
107
+ hearing_date:
108
+ property: hearing_date
109
+ text: Hearing Date
110
+ promulgated_on:
111
+ property: promulgated_on
112
+ text: Promulgation date
113
+ formatters:
114
+ to_date:
115
+ method_name: to_date
116
+ args:
117
+ strftime:
118
+ method_name: strftime
119
+ args: "%d/%m/%Y"
@@ -0,0 +1,41 @@
1
+ require 'yaml'
2
+
3
+ module Moj
4
+ module Tribunals
5
+ class ConfigLoader
6
+ attr_accessor :config_path
7
+
8
+ def initialize(config_path=default_config_path)
9
+ self.config_path = config_path
10
+ end
11
+
12
+ def load
13
+ data = {}
14
+ config_files.each do |file|
15
+ name = File.basename(file).split('.').first.to_sym
16
+
17
+ data[name] = load_file(file)
18
+ end
19
+ data
20
+ end
21
+
22
+ def config_file_for(tribunal_name)
23
+ config_files.find{|f| File.basename(f) == tribunal_name.to_s + '.yml'}
24
+ end
25
+
26
+ def config_files
27
+ Dir.glob(File.join(config_path, '*.yml'))
28
+ end
29
+
30
+ private
31
+
32
+ def load_file(file)
33
+ YAML.load_file(file)
34
+ end
35
+
36
+ def default_config_path
37
+ File.join( File.dirname(__FILE__), '..', '..', '..', 'config', 'tribunals' )
38
+ end
39
+ end
40
+ end
41
+ end
@@ -0,0 +1 @@
1
+ require 'moj/tribunals/config_loader'
@@ -0,0 +1,68 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
+ # -*- encoding: utf-8 -*-
5
+ # stub: moj_tribunals_config 0.8.0 ruby lib
6
+
7
+ Gem::Specification.new do |s|
8
+ s.name = "moj_tribunals_config"
9
+ s.version = "0.8.0"
10
+
11
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
+ s.require_paths = ["lib"]
13
+ s.authors = ["Al Davidson"]
14
+ s.date = "2015-02-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.load( 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
+ s.email = "apdavidson@gmail.com"
17
+ s.extra_rdoc_files = [
18
+ "LICENSE.txt",
19
+ "README.rdoc"
20
+ ]
21
+ s.files = [
22
+ ".document",
23
+ "Gemfile",
24
+ "Gemfile.lock",
25
+ "LICENSE.txt",
26
+ "README.rdoc",
27
+ "Rakefile",
28
+ "VERSION",
29
+ "config/tribunals/care-standards.yml",
30
+ "config/tribunals/eat.yml",
31
+ "config/tribunals/ftt-tax.yml",
32
+ "config/tribunals/utiac.yml",
33
+ "lib/moj/tribunals/config_loader.rb",
34
+ "lib/moj_tribunals_config.rb",
35
+ "moj_tribunals_config.gemspec",
36
+ "test/helper.rb",
37
+ "test/test_moj_tribunals_config.rb"
38
+ ]
39
+ s.homepage = "http://github.com/aldavidson/moj_tribunals_config"
40
+ s.licenses = ["MIT"]
41
+ s.rubygems_version = "2.4.3"
42
+ s.summary = "Provides a single source of truth about configuration for MoJ Tribunals."
43
+
44
+ if s.respond_to? :specification_version then
45
+ s.specification_version = 4
46
+
47
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
48
+ s.add_development_dependency(%q<shoulda>, [">= 0"])
49
+ s.add_development_dependency(%q<rdoc>, ["~> 3.12"])
50
+ s.add_development_dependency(%q<bundler>, ["~> 1.0"])
51
+ s.add_development_dependency(%q<jeweler>, ["~> 2.0.1"])
52
+ s.add_development_dependency(%q<simplecov>, [">= 0"])
53
+ else
54
+ s.add_dependency(%q<shoulda>, [">= 0"])
55
+ s.add_dependency(%q<rdoc>, ["~> 3.12"])
56
+ s.add_dependency(%q<bundler>, ["~> 1.0"])
57
+ s.add_dependency(%q<jeweler>, ["~> 2.0.1"])
58
+ s.add_dependency(%q<simplecov>, [">= 0"])
59
+ end
60
+ else
61
+ s.add_dependency(%q<shoulda>, [">= 0"])
62
+ s.add_dependency(%q<rdoc>, ["~> 3.12"])
63
+ s.add_dependency(%q<bundler>, ["~> 1.0"])
64
+ s.add_dependency(%q<jeweler>, ["~> 2.0.1"])
65
+ s.add_dependency(%q<simplecov>, [">= 0"])
66
+ end
67
+ end
68
+
data/test/helper.rb ADDED
@@ -0,0 +1,34 @@
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
@@ -0,0 +1,7 @@
1
+ require 'helper'
2
+
3
+ class TestMojTribunalsConfig < Test::Unit::TestCase
4
+ should "probably rename this file and start testing for real" do
5
+ flunk "hey buddy, you should probably rename this file and start testing for real"
6
+ end
7
+ end
metadata ADDED
@@ -0,0 +1,143 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: moj_tribunals_config
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.8.0
5
+ platform: ruby
6
+ authors:
7
+ - Al Davidson
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-02-02 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: shoulda
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rdoc
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '3.12'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '3.12'
41
+ - !ruby/object:Gem::Dependency
42
+ name: bundler
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '1.0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '1.0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: jeweler
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: 2.0.1
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: 2.0.1
69
+ - !ruby/object:Gem::Dependency
70
+ name: simplecov
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
+ description: "Used by tribunals_frontend and tribunals_api to share configuration.\n
84
+ \ To use:\n\n 1) add \"gem 'moj_tribunals_config'\" to your Gemfile\n 2)
85
+ in an initializer, add the following code:\n\n require 'moj_tribunals_config'\n\n
86
+ \ my_config = Moj::Tribunals::ConfigLoader.new.load\n\n This will load the
87
+ default config files from the gem.\n\n\n To load different files, you can provide
88
+ an alternative path \n to the ConfigLoader.new method, e.g.\n\n my_config
89
+ = Moj::Tribunals::ConfigLoader.new('/my/alternative/config/path').load\n\n To
90
+ 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.load(
92
+ config_file )\n\n RailsConfig integration\n =======================\n\n If
93
+ you're using the RailsConfig gem, your intializer can just do something like:\n\n
94
+ \ files = Moj::Tribunals::ConfigLoader.new.config_files\n files.each{ |f| Settings.add_source!(
95
+ f ) }\n Settings.reload!\n "
96
+ email: apdavidson@gmail.com
97
+ executables: []
98
+ extensions: []
99
+ extra_rdoc_files:
100
+ - LICENSE.txt
101
+ - README.rdoc
102
+ files:
103
+ - ".document"
104
+ - Gemfile
105
+ - Gemfile.lock
106
+ - LICENSE.txt
107
+ - README.rdoc
108
+ - Rakefile
109
+ - VERSION
110
+ - config/tribunals/care-standards.yml
111
+ - config/tribunals/eat.yml
112
+ - config/tribunals/ftt-tax.yml
113
+ - config/tribunals/utiac.yml
114
+ - lib/moj/tribunals/config_loader.rb
115
+ - lib/moj_tribunals_config.rb
116
+ - moj_tribunals_config.gemspec
117
+ - test/helper.rb
118
+ - test/test_moj_tribunals_config.rb
119
+ homepage: http://github.com/aldavidson/moj_tribunals_config
120
+ licenses:
121
+ - MIT
122
+ metadata: {}
123
+ post_install_message:
124
+ rdoc_options: []
125
+ require_paths:
126
+ - lib
127
+ required_ruby_version: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - ">="
130
+ - !ruby/object:Gem::Version
131
+ version: '0'
132
+ required_rubygems_version: !ruby/object:Gem::Requirement
133
+ requirements:
134
+ - - ">="
135
+ - !ruby/object:Gem::Version
136
+ version: '0'
137
+ requirements: []
138
+ rubyforge_project:
139
+ rubygems_version: 2.4.3
140
+ signing_key:
141
+ specification_version: 4
142
+ summary: Provides a single source of truth about configuration for MoJ Tribunals.
143
+ test_files: []