plek 1.11.0 → 1.12.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. checksums.yaml +7 -0
  2. data/README.md +22 -0
  3. data/lib/plek.rb +7 -0
  4. data/lib/plek/version.rb +1 -1
  5. metadata +51 -25
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: e1314ffc3512610c4d3b415b260286a96e21219f
4
+ data.tar.gz: 6c93d8d7b008a5c3c33e5dbfb0e04d748a086bca
5
+ SHA512:
6
+ metadata.gz: 38c576ef1e98d8d05a9e74e95f0475f5ca72409b93c30b32c6d656f4df14f0c9851c64fe073e48c425576802406425157c6828a92efbf1487179169df2d2406c
7
+ data.tar.gz: d93efae49515bc45665f2a57953c156f523f46cc4c2e4bf44af89a6083361f817bf977dc039c7ff68033d0bd50ede418283eb17ed47b18a644f366d76d520412
data/README.md CHANGED
@@ -20,6 +20,28 @@ See the [API docs](http://www.rubydoc.info/gems/plek) for full details of the AP
20
20
 
21
21
  `bundle exec rake`
22
22
 
23
+ ### Environment variables
24
+
25
+ #### For base URLs
26
+
27
+ The base URL Plek uses for each service can be set using environment variables.
28
+
29
+ Plek will use any variables set matching this pattern:
30
+
31
+ `PLEK_SERVICE_` + the service name, uppercased with any hyphens converted to underscores + `_URI`.
32
+
33
+ For example, the variable for `static` would be `PLEK_SERVICE_STATIC_URI`.
34
+
35
+ #### Others
36
+
37
+ To override the development environment base domain, set `DEV_DOMAIN`. The default is `dev.gov.uk`. The environment can be set using either `RAILS_ENV` or `RACK_ENV`.
38
+
39
+ You can prepend strings to the hostnames generated using: `PLEK_HOSTNAME_PREFIX`.
40
+
41
+ Override the asset URL with: `GOVUK_ASSET_ROOT`. The default is to generate a URL for the `static` service.
42
+
43
+ Override the website root with `GOVUK_WEBSITE_ROOT`. The default is to generate a URL for the `www` service.
44
+
23
45
  ## Licence
24
46
 
25
47
  [MIT License](LICENCE)
data/lib/plek.rb CHANGED
@@ -92,6 +92,13 @@ class Plek
92
92
  env_var_or_dev_fallback("GOVUK_ASSET_ROOT") { find("static") }
93
93
  end
94
94
 
95
+ # Find the asset host used to serve assets to the public
96
+ #
97
+ # @return [String] The public-facing asset base URL
98
+ def public_asset_host
99
+ env_var_or_dev_fallback("GOVUK_ASSET_HOST") { find("static") }
100
+ end
101
+
95
102
  # Find the base URL for the public website frontend.
96
103
  #
97
104
  # @return [String] The website base URL.
data/lib/plek/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  class Plek
2
- VERSION = '1.11.0'
2
+ VERSION = '1.12.0'
3
3
  end
metadata CHANGED
@@ -1,38 +1,71 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: plek
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.11.0
5
- prerelease:
4
+ version: 1.12.0
6
5
  platform: ruby
7
6
  authors:
8
7
  - Craig R Webster
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2015-07-03 00:00:00.000000000 Z
11
+ date: 2016-02-04 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: rake
16
- requirement: &15585020 !ruby/object:Gem::Requirement
17
- none: false
15
+ requirement: !ruby/object:Gem::Requirement
18
16
  requirements:
19
- - - ! '>='
17
+ - - ">="
20
18
  - !ruby/object:Gem::Version
21
19
  version: '0'
22
20
  type: :development
23
21
  prerelease: false
24
- version_requirements: *15585020
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
25
27
  - !ruby/object:Gem::Dependency
26
28
  name: gem_publisher
27
- requirement: &15584460 !ruby/object:Gem::Requirement
28
- none: false
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: 1.1.1
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
29
37
  requirements:
30
- - - ~>
38
+ - - "~>"
31
39
  - !ruby/object:Gem::Version
32
40
  version: 1.1.1
41
+ - !ruby/object:Gem::Dependency
42
+ name: minitest
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: climate_control
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
33
62
  type: :development
34
63
  prerelease: false
35
- version_requirements: *15584460
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
36
69
  description: Find the right hostname for each service in an environment-dependent
37
70
  manner
38
71
  email:
@@ -41,39 +74,32 @@ executables: []
41
74
  extensions: []
42
75
  extra_rdoc_files: []
43
76
  files:
44
- - lib/plek/version.rb
45
- - lib/plek.rb
46
77
  - LICENCE
47
78
  - README.md
79
+ - lib/plek.rb
80
+ - lib/plek/version.rb
48
81
  homepage:
49
82
  licenses:
50
83
  - MIT
84
+ metadata: {}
51
85
  post_install_message:
52
86
  rdoc_options: []
53
87
  require_paths:
54
88
  - lib
55
89
  required_ruby_version: !ruby/object:Gem::Requirement
56
- none: false
57
90
  requirements:
58
- - - ! '>='
91
+ - - ">="
59
92
  - !ruby/object:Gem::Version
60
93
  version: '0'
61
- segments:
62
- - 0
63
- hash: -276749319035868702
64
94
  required_rubygems_version: !ruby/object:Gem::Requirement
65
- none: false
66
95
  requirements:
67
- - - ! '>='
96
+ - - ">="
68
97
  - !ruby/object:Gem::Version
69
98
  version: '0'
70
- segments:
71
- - 0
72
- hash: -276749319035868702
73
99
  requirements: []
74
100
  rubyforge_project:
75
- rubygems_version: 1.8.11
101
+ rubygems_version: 2.4.5.1
76
102
  signing_key:
77
- specification_version: 3
103
+ specification_version: 4
78
104
  summary: Locations for services
79
105
  test_files: []