plek 1.9.0 → 1.10.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/lib/plek/version.rb +1 -1
  2. data/lib/plek.rb +10 -1
  3. metadata +8 -8
data/lib/plek/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  class Plek
2
- VERSION = '1.9.0'
2
+ VERSION = '1.10.0'
3
3
  end
data/lib/plek.rb CHANGED
@@ -12,7 +12,7 @@ class Plek
12
12
  self.parent_domain = domain_to_use || env_var_or_dev_fallback("GOVUK_APP_DOMAIN", DEV_DOMAIN)
13
13
  end
14
14
 
15
- # Find the URI for a service/application.
15
+ # Find the URI for a service/application. Return the URI as a string.
16
16
  def find(service, options = {})
17
17
  name = name_for(service)
18
18
  if service_uri = defined_service_uri_for(name)
@@ -30,6 +30,11 @@ class Plek
30
30
  end
31
31
  end
32
32
 
33
+ # Find the URI for a service/application. Return a URI object.
34
+ def find_uri(*args)
35
+ URI(find(*args))
36
+ end
37
+
33
38
  def asset_root
34
39
  env_var_or_dev_fallback("GOVUK_ASSET_ROOT") { find("static") }
35
40
  end
@@ -64,6 +69,10 @@ class Plek
64
69
  def find(*args)
65
70
  new.find(*args)
66
71
  end
72
+
73
+ def find_uri(*args)
74
+ new.find_uri(*args)
75
+ end
67
76
  end
68
77
 
69
78
  private
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: plek
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.9.0
4
+ version: 1.10.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-09-08 00:00:00.000000000 Z
12
+ date: 2015-01-06 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake
16
- requirement: &21071240 !ruby/object:Gem::Requirement
16
+ requirement: &16095960 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :development
23
23
  prerelease: false
24
- version_requirements: *21071240
24
+ version_requirements: *16095960
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: gem_publisher
27
- requirement: &21089680 !ruby/object:Gem::Requirement
27
+ requirement: &16095460 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,7 +32,7 @@ dependencies:
32
32
  version: 1.1.1
33
33
  type: :development
34
34
  prerelease: false
35
- version_requirements: *21089680
35
+ version_requirements: *16095460
36
36
  description: Find the right hostname for each service in an environment-dependent
37
37
  manner
38
38
  email:
@@ -58,7 +58,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
58
58
  version: '0'
59
59
  segments:
60
60
  - 0
61
- hash: 3691232646913469979
61
+ hash: 3983394480355850721
62
62
  required_rubygems_version: !ruby/object:Gem::Requirement
63
63
  none: false
64
64
  requirements:
@@ -67,7 +67,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
67
67
  version: '0'
68
68
  segments:
69
69
  - 0
70
- hash: 3691232646913469979
70
+ hash: 3983394480355850721
71
71
  requirements: []
72
72
  rubyforge_project:
73
73
  rubygems_version: 1.8.11