govuk_publishing_components 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 432ddfb59f2de355daa87fff722615967a079003
4
- data.tar.gz: 32114064077b71fdbd54f49eac7834aa2a7d30e4
3
+ metadata.gz: dbb83256986e4545e64248565b7cba15736e7a32
4
+ data.tar.gz: 1ff9fb3cacb3adb715aa8af6e6d16330ddacf5f2
5
5
  SHA512:
6
- metadata.gz: 21daca8cce1cfa9a037e0a6018e067b8567983d2b383834f42a9496d49e095b72477226b07997cad2c173cad25b73ef0063ce7e8c8f3b860128eca80609be220
7
- data.tar.gz: 8054b5dddc794c7a5de79ca31ba855a1b6f97bd37d0187489106b7bb038d5677eb9e25d09dcf5a1702f705ee25c6a25eade34328ddf72001d3fcc4fa4d5cb687
6
+ metadata.gz: 8405daba61f51141903fcae33350c808b136dec08e85e4ad4ad8c03c6ba006d13ed2cf328adbfbf5a89064f8bfd6e2f54cd430420025f61135ad3c7c5104a720
7
+ data.tar.gz: 87809be46cbb2ba31c581d7e01c408632dc4951c3086c975f7ce909cee5282b46403d8714c4c80c2e24ed6a85049af5213a7d097948d84022ea02f5a931020c2
data/README.md CHANGED
@@ -22,7 +22,7 @@ Mount the component guide in your application:
22
22
  ```ruby
23
23
  # config/routes.rb
24
24
  unless Rails.env.production?
25
- mount GovukPublishingComponents::Engine, at: "/component-guide"
25
+ mount GovukPublishingComponents::Engine, at: "/component-guide" if defined?(GovukPublishingComponents)
26
26
  end
27
27
  ```
28
28
 
@@ -76,11 +76,13 @@ Configure the gem with a config block in an initializer:
76
76
 
77
77
  ```ruby
78
78
  # config/initializers/govuk_publishing_components.rb
79
- GovukPublishingComponents.configure do |c|
80
- c.component_guide_title = "My component guide"
79
+ if defined?(GovukPublishingComponents)
80
+ GovukPublishingComponents.configure do |c|
81
+ c.component_guide_title = "My component guide"
81
82
 
82
- c.application_stylesheet = "custom_stylesheet" # defaults to "application"
83
- c.application_javascript = "custom_javascript" # default to "application"
83
+ c.application_stylesheet = "custom_stylesheet" # defaults to "application"
84
+ c.application_javascript = "custom_javascript" # default to "application"
85
+ end
84
86
  end
85
87
  ```
86
88
 
@@ -1,5 +1,6 @@
1
1
  module GovukPublishingComponents
2
2
  class ApplicationController < ActionController::Base
3
+ helper ::Rails.application.helpers
3
4
  include Slimmer::GovukComponents
4
5
  include Slimmer::Headers
5
6
  protect_from_forgery with: :exception
@@ -1,3 +1,3 @@
1
1
  module GovukPublishingComponents
2
- VERSION = '0.1.0'.freeze
2
+ VERSION = '0.2.0'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: govuk_publishing_components
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - GOV.UK Dev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-07-21 00:00:00.000000000 Z
11
+ date: 2017-07-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails