govuk_admin_template 1.1.4 → 1.1.5
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +5 -0
- data/lib/govuk_admin_template/version.rb +1 -1
- metadata +2 -4
- data/lib/tasks/publish_gem.rake +0 -7
- data/lib/tasks/sass/check.rake +0 -32
data/CHANGELOG.md
CHANGED
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.
|
4
|
+
version: 1.1.5
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -183,8 +183,6 @@ files:
|
|
183
183
|
- config/routes.rb
|
184
184
|
- lib/govuk_admin_template/engine.rb
|
185
185
|
- lib/govuk_admin_template/version.rb
|
186
|
-
- lib/tasks/sass/check.rake
|
187
|
-
- lib/tasks/publish_gem.rake
|
188
186
|
- lib/govuk_admin_template.rb
|
189
187
|
- JAVASCRIPT.md
|
190
188
|
- CSS.md
|
@@ -211,7 +209,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
211
209
|
version: '0'
|
212
210
|
segments:
|
213
211
|
- 0
|
214
|
-
hash:
|
212
|
+
hash: 3308546805691035388
|
215
213
|
requirements: []
|
216
214
|
rubyforge_project:
|
217
215
|
rubygems_version: 1.8.23.2
|
data/lib/tasks/publish_gem.rake
DELETED
data/lib/tasks/sass/check.rake
DELETED
@@ -1,32 +0,0 @@
|
|
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
|