govuk_admin_template 1.1.3 → 1.1.4

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ # 1.1.4
2
+
3
+ * Fix missing assets in production Rails 4 apps, both our own (header-crown.png)
4
+ and Bootstrap's glyphicon font-using bits
5
+
1
6
  # 1.1.3
2
7
 
3
8
  * Fix GillSans font stack for IE and Chrome on Windows
@@ -1,4 +1,5 @@
1
1
  @import 'govuk_admin_template/bootstrap_colour_overrides'; //Needs to be set before Bootstrap import
2
+ @import 'bootstrap-sprockets';
2
3
  @import 'bootstrap';
3
4
  @import 'govuk_admin_template/theme';
4
5
  @import 'govuk_admin_template/mixins';
@@ -4,7 +4,7 @@
4
4
 
5
5
  .navbar .container .navbar-brand,
6
6
  .navbar .container-fluid .navbar-brand {
7
- background: url("/assets/govuk_admin_template/header-crown.png") 0 0.67em no-repeat;
7
+ background: image-url("/assets/govuk_admin_template/header-crown.png") 0 0.67em no-repeat;
8
8
  color: #fff;
9
9
  font-family: $font-family-gill-sans;
10
10
  font-size: 20px;
@@ -1,3 +1,3 @@
1
1
  module GovukAdminTemplate
2
- VERSION = "1.1.3"
2
+ VERSION = "1.1.4"
3
3
  end
@@ -0,0 +1,7 @@
1
+ require "gem_publisher"
2
+
3
+ desc "Publish gem to RubyGems.org"
4
+ task :publish_gem do |t|
5
+ gem = GemPublisher.publish_if_updated("govuk_admin_template.gemspec", :rubygems)
6
+ puts "Published #{gem}" if gem
7
+ end
@@ -0,0 +1,32 @@
1
+ UNGUARDED_URL_USAGE = /\surl\(/
2
+
3
+ namespace :sass do
4
+ desc 'Check all SCSS for unguarded url() usages'
5
+ task :check do
6
+ scss_files = File.expand_path(
7
+ '../../../../app/assets/stylesheets/**/*.scss', __FILE__)
8
+
9
+ matching_lines = Dir[scss_files].inject([]) do |matching, scss_file|
10
+ File.readlines(scss_file).each_with_index do |line, number|
11
+ matching << "#{scss_file}:#{number + 1}" if line =~ UNGUARDED_URL_USAGE
12
+ end
13
+ matching
14
+ end
15
+
16
+ if matching_lines.any?
17
+ raise <<-MSG
18
+
19
+ Do not use instances of url(...) to refer to images within this gem.
20
+ Prefer the SASS function image-url. Unguarded url references won't work in
21
+ Rails 4 and up due to MD5 hashes in asset filenames. Your asset will 404 in
22
+ production Rails 4 apps.
23
+
24
+ Lines that use url(...) to refer to images within this gem:
25
+
26
+ #{matching_lines.join("\n ")}
27
+
28
+ MSG
29
+ end
30
+
31
+ end
32
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: govuk_admin_template
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.3
4
+ version: 1.1.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-10-06 00:00:00.000000000 Z
12
+ date: 2014-10-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -32,23 +32,23 @@ dependencies:
32
32
  requirement: !ruby/object:Gem::Requirement
33
33
  none: false
34
34
  requirements:
35
- - - '='
35
+ - - ~>
36
36
  - !ruby/object:Gem::Version
37
- version: 3.2.0.0
37
+ version: 3.2.0.2
38
38
  type: :runtime
39
39
  prerelease: false
40
40
  version_requirements: !ruby/object:Gem::Requirement
41
41
  none: false
42
42
  requirements:
43
- - - '='
43
+ - - ~>
44
44
  - !ruby/object:Gem::Version
45
- version: 3.2.0.0
45
+ version: 3.2.0.2
46
46
  - !ruby/object:Gem::Dependency
47
47
  name: jquery-rails
48
48
  requirement: !ruby/object:Gem::Requirement
49
49
  none: false
50
50
  requirements:
51
- - - '='
51
+ - - ~>
52
52
  - !ruby/object:Gem::Version
53
53
  version: 3.1.1
54
54
  type: :runtime
@@ -56,25 +56,9 @@ dependencies:
56
56
  version_requirements: !ruby/object:Gem::Requirement
57
57
  none: false
58
58
  requirements:
59
- - - '='
59
+ - - ~>
60
60
  - !ruby/object:Gem::Version
61
61
  version: 3.1.1
62
- - !ruby/object:Gem::Dependency
63
- name: rails
64
- requirement: !ruby/object:Gem::Requirement
65
- none: false
66
- requirements:
67
- - - '='
68
- - !ruby/object:Gem::Version
69
- version: 3.2.18
70
- type: :development
71
- prerelease: false
72
- version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
- requirements:
75
- - - '='
76
- - !ruby/object:Gem::Version
77
- version: 3.2.18
78
62
  - !ruby/object:Gem::Dependency
79
63
  name: sass-rails
80
64
  requirement: !ruby/object:Gem::Requirement
@@ -199,6 +183,8 @@ files:
199
183
  - config/routes.rb
200
184
  - lib/govuk_admin_template/engine.rb
201
185
  - lib/govuk_admin_template/version.rb
186
+ - lib/tasks/sass/check.rake
187
+ - lib/tasks/publish_gem.rake
202
188
  - lib/govuk_admin_template.rb
203
189
  - JAVASCRIPT.md
204
190
  - CSS.md
@@ -216,10 +202,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
216
202
  requirements:
217
203
  - - ! '>='
218
204
  - !ruby/object:Gem::Version
219
- version: '0'
220
- segments:
221
- - 0
222
- hash: 1831054243054669970
205
+ version: 1.9.3
223
206
  required_rubygems_version: !ruby/object:Gem::Requirement
224
207
  none: false
225
208
  requirements:
@@ -228,10 +211,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
228
211
  version: '0'
229
212
  segments:
230
213
  - 0
231
- hash: 1831054243054669970
214
+ hash: 4404839665835030650
232
215
  requirements: []
233
216
  rubyforge_project:
234
- rubygems_version: 1.8.23
217
+ rubygems_version: 1.8.23.2
235
218
  signing_key:
236
219
  specification_version: 3
237
220
  summary: Styles, scripts and templates for GOV.UK admin applications