rails_material_design_icons 0.6.0 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/main.yml +0 -4
- data/.gitignore +3 -2
- data/.rubocop.yml +20 -0
- data/CHANGELOG.md +10 -1
- data/README.md +1 -0
- data/lib/rails_material_design_icons/engine.rb +2 -2
- data/lib/rails_material_design_icons/icon_helper.rb +1 -0
- data/lib/rails_material_design_icons/version.rb +1 -1
- data/rails_material_design_icons.gemspec +5 -5
- metadata +8 -25
- data/gemfiles/rails-4.2.gemfile +0 -7
- data/gemfiles/sprockets-backport.gemfile +0 -15
- data/test/dummy/.gitignore +0 -2
- data/test/dummy/app/assets/config/manifest.js +0 -3
- data/test/dummy/app/assets/stylesheets/sass-import.css.sass +0 -1
- data/test/dummy/app/assets/stylesheets/scss-import.css.scss +0 -1
- data/test/dummy/app/assets/stylesheets/sprockets-require.css +0 -3
- data/test/dummy/app/controllers/pages_controller.rb +0 -4
- data/test/dummy/app/views/pages/icons.html.erb +0 -1
- data/test/dummy/config.ru +0 -6
- data/test/dummy/config/application.rb +0 -25
- data/test/dummy/config/boot.rb +0 -12
- data/test/dummy/config/environment.rb +0 -7
- data/test/dummy/config/initializers/secret_token.rb +0 -23
- data/test/dummy/config/routes.rb +0 -5
- data/test/icon_helper_test.rb +0 -29
- data/test/material_design_icons_test.rb +0 -68
- data/test/test_helper.rb +0 -9
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: cecf7e58383db95ce119314b6d2abf1eff80b1e1fe47062ffb5b4e654fb8ef7a
|
|
4
|
+
data.tar.gz: 49a5c71ca06b30bc4a84870949dfb13ba9bc60e3cf05f828a27079e2188e2c38
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b202702da334a7cd5f8844f5230935ebe24ba2de1eb644a41e3cfc59c86486bc6efaf5ca06f211012fb05fb71624c31d7b7251a61d9e8c10ad651b412ef90064
|
|
7
|
+
data.tar.gz: 14d02bfd2fd74e0603ae0e9c53e09a395f6f74c7c74d7950679676667910ebf1d9ce0660a46c64a8d888986ac63fc16f59ce12909c0f49dbf62b38d949f78819
|
data/.github/workflows/main.yml
CHANGED
|
@@ -12,10 +12,6 @@ jobs:
|
|
|
12
12
|
- rails-5.2
|
|
13
13
|
- rails-6.0
|
|
14
14
|
- rails-6.1
|
|
15
|
-
include:
|
|
16
|
-
- { ruby: "2.3", gemfile: "rails-4.2", bundler: "1" }
|
|
17
|
-
- { ruby: "2.4", gemfile: "rails-4.2", bundler: "1" }
|
|
18
|
-
- { ruby: "3.0", gemfile: "rails-6.1", bundler: "default" }
|
|
19
15
|
|
|
20
16
|
env:
|
|
21
17
|
BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile
|
data/.gitignore
CHANGED
data/.rubocop.yml
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
AllCops:
|
|
2
|
+
TargetRubyVersion: 2.5
|
|
3
|
+
NewCops: enable
|
|
4
|
+
|
|
5
|
+
Style/StringLiterals:
|
|
6
|
+
Enabled: true
|
|
7
|
+
EnforcedStyle: single_quotes
|
|
8
|
+
|
|
9
|
+
Style/StringLiteralsInInterpolation:
|
|
10
|
+
Enabled: true
|
|
11
|
+
EnforcedStyle: double_quotes
|
|
12
|
+
|
|
13
|
+
Style/FrozenStringLiteralComment:
|
|
14
|
+
Enabled: false
|
|
15
|
+
|
|
16
|
+
Layout/LineLength:
|
|
17
|
+
Max: 120
|
|
18
|
+
|
|
19
|
+
Style/AsciiComments:
|
|
20
|
+
Enabled: false
|
data/CHANGELOG.md
CHANGED
|
@@ -13,4 +13,13 @@
|
|
|
13
13
|
-Fix license on Rubygems
|
|
14
14
|
|
|
15
15
|
# Version 0.5.0
|
|
16
|
-
-Fix CSS not being found.
|
|
16
|
+
-Fix CSS not being found.
|
|
17
|
+
|
|
18
|
+
# Version 0.6.0
|
|
19
|
+
-Actually fix CSS not being found.
|
|
20
|
+
|
|
21
|
+
## Note that versions before 0.6.0 don't actually contain the fonts unless you use this gem from git.
|
|
22
|
+
|
|
23
|
+
## [0.7.0] - 2021-06-08
|
|
24
|
+
|
|
25
|
+
- Was including some unnecessary files in the gem package. So the size of this gem should be a bit smaller now.
|
data/README.md
CHANGED
|
@@ -4,11 +4,11 @@ module MaterialDesignIcons
|
|
|
4
4
|
module Rails
|
|
5
5
|
class Engine < ::Rails::Engine
|
|
6
6
|
initializer 'material_design_icons.assets.precompile', group: :all do |app|
|
|
7
|
-
%w
|
|
7
|
+
%w[stylesheets fonts images].each do |sub|
|
|
8
8
|
app.config.assets.paths << root.join('assets', sub).to_s
|
|
9
9
|
end
|
|
10
10
|
|
|
11
|
-
%w
|
|
11
|
+
%w[eot ttf woff woff2].each do |ext|
|
|
12
12
|
app.config.assets.precompile << "materialdesignicons-webfont.#{ext}"
|
|
13
13
|
end
|
|
14
14
|
end
|
|
@@ -5,15 +5,15 @@ require File.expand_path('lib/rails_material_design_icons/version', __dir__)
|
|
|
5
5
|
Gem::Specification.new do |gem|
|
|
6
6
|
gem.authors = ['sampokuokkanen']
|
|
7
7
|
gem.email = ['sampo.kuokkanen@gmail.com']
|
|
8
|
+
gem.name = 'rails_material_design_icons'
|
|
8
9
|
gem.description = 'Rails Material Design Icons provides the web fonts and stylesheets as a Rails engine for use with the asset pipeline.'
|
|
9
10
|
gem.summary = 'an asset gemification of the Material Icons font library'
|
|
10
11
|
gem.homepage = 'https://github.com/sampokuokkanen/rails_material_design_icons'
|
|
11
12
|
gem.licenses = ['MIT', 'Apache 2.0']
|
|
12
13
|
|
|
13
|
-
gem.files
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
gem.files = Dir.chdir(File.expand_path(__dir__)) do
|
|
15
|
+
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{\A(?:test|spec|features)/}) }
|
|
16
|
+
end
|
|
17
17
|
gem.require_paths = ['lib']
|
|
18
18
|
gem.version = MaterialDesignIcons::Rails::VERSION
|
|
19
19
|
|
|
@@ -23,5 +23,5 @@ Gem::Specification.new do |gem|
|
|
|
23
23
|
gem.add_development_dependency 'byebug'
|
|
24
24
|
gem.add_development_dependency 'sassc-rails'
|
|
25
25
|
|
|
26
|
-
gem.required_ruby_version = '>=
|
|
26
|
+
gem.required_ruby_version = '>= 2.5'
|
|
27
27
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rails_material_design_icons
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.7.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- sampokuokkanen
|
|
8
|
-
autorequire:
|
|
8
|
+
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2021-
|
|
11
|
+
date: 2021-06-08 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: railties
|
|
@@ -82,6 +82,7 @@ extra_rdoc_files: []
|
|
|
82
82
|
files:
|
|
83
83
|
- ".github/workflows/main.yml"
|
|
84
84
|
- ".gitignore"
|
|
85
|
+
- ".rubocop.yml"
|
|
85
86
|
- CHANGELOG.md
|
|
86
87
|
- FONT_LICENSE
|
|
87
88
|
- Gemfile
|
|
@@ -95,40 +96,22 @@ files:
|
|
|
95
96
|
- app/assets/fonts/materialdesignicons-webfont.woff
|
|
96
97
|
- app/assets/fonts/materialdesignicons-webfont.woff2
|
|
97
98
|
- app/assets/stylesheets/materialdesignicons.css.erb
|
|
98
|
-
- gemfiles/rails-4.2.gemfile
|
|
99
99
|
- gemfiles/rails-5.2.gemfile
|
|
100
100
|
- gemfiles/rails-6.0.gemfile
|
|
101
101
|
- gemfiles/rails-6.1.gemfile
|
|
102
102
|
- gemfiles/rails-master.gemfile
|
|
103
|
-
- gemfiles/sprockets-backport.gemfile
|
|
104
103
|
- lib/rails_material_design_icons.rb
|
|
105
104
|
- lib/rails_material_design_icons/engine.rb
|
|
106
105
|
- lib/rails_material_design_icons/icon_helper.rb
|
|
107
106
|
- lib/rails_material_design_icons/railtie.rb
|
|
108
107
|
- lib/rails_material_design_icons/version.rb
|
|
109
108
|
- rails_material_design_icons.gemspec
|
|
110
|
-
- test/dummy/.gitignore
|
|
111
|
-
- test/dummy/app/assets/config/manifest.js
|
|
112
|
-
- test/dummy/app/assets/stylesheets/sass-import.css.sass
|
|
113
|
-
- test/dummy/app/assets/stylesheets/scss-import.css.scss
|
|
114
|
-
- test/dummy/app/assets/stylesheets/sprockets-require.css
|
|
115
|
-
- test/dummy/app/controllers/pages_controller.rb
|
|
116
|
-
- test/dummy/app/views/pages/icons.html.erb
|
|
117
|
-
- test/dummy/config.ru
|
|
118
|
-
- test/dummy/config/application.rb
|
|
119
|
-
- test/dummy/config/boot.rb
|
|
120
|
-
- test/dummy/config/environment.rb
|
|
121
|
-
- test/dummy/config/initializers/secret_token.rb
|
|
122
|
-
- test/dummy/config/routes.rb
|
|
123
|
-
- test/icon_helper_test.rb
|
|
124
|
-
- test/material_design_icons_test.rb
|
|
125
|
-
- test/test_helper.rb
|
|
126
109
|
homepage: https://github.com/sampokuokkanen/rails_material_design_icons
|
|
127
110
|
licenses:
|
|
128
111
|
- MIT
|
|
129
112
|
- Apache 2.0
|
|
130
113
|
metadata: {}
|
|
131
|
-
post_install_message:
|
|
114
|
+
post_install_message:
|
|
132
115
|
rdoc_options: []
|
|
133
116
|
require_paths:
|
|
134
117
|
- lib
|
|
@@ -136,15 +119,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
136
119
|
requirements:
|
|
137
120
|
- - ">="
|
|
138
121
|
- !ruby/object:Gem::Version
|
|
139
|
-
version:
|
|
122
|
+
version: '2.5'
|
|
140
123
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
141
124
|
requirements:
|
|
142
125
|
- - ">="
|
|
143
126
|
- !ruby/object:Gem::Version
|
|
144
127
|
version: '0'
|
|
145
128
|
requirements: []
|
|
146
|
-
rubygems_version: 3.
|
|
147
|
-
signing_key:
|
|
129
|
+
rubygems_version: 3.2.15
|
|
130
|
+
signing_key:
|
|
148
131
|
specification_version: 4
|
|
149
132
|
summary: an asset gemification of the Material Icons font library
|
|
150
133
|
test_files: []
|
data/gemfiles/rails-4.2.gemfile
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
source 'https://rubygems.org'
|
|
4
|
-
|
|
5
|
-
# See:
|
|
6
|
-
# http://blog.logdown.com/posts/171593-using-rails-4-asset-pipeline-on-rails-3-for-faster-deploy
|
|
7
|
-
# https://github.com/rails/sprockets-rails/issues/98
|
|
8
|
-
# https://discussion.heroku.com/t/using-the-rails-4-asset-pipeline-in-rails-3-apps-for-faster-deploys/205
|
|
9
|
-
|
|
10
|
-
gemspec path: '../'
|
|
11
|
-
gem 'railties', github: 'rails/rails', branch: '3-2-stable'
|
|
12
|
-
gem 'sass-rails', github: 'guilleiguaran/sass-rails', branch: 'backport'
|
|
13
|
-
gem 'sprockets', '2.2.2.backport2'
|
|
14
|
-
gem 'sprockets-rails', '2.0.0.backport1'
|
|
15
|
-
gem 'tzinfo'
|
data/test/dummy/.gitignore
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
@import materialdesignicons
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
@import "materialdesignicons";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<%= mdi_icon "sheep" %>
|
data/test/dummy/config.ru
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
require File.expand_path('boot', __dir__)
|
|
4
|
-
|
|
5
|
-
# require "rails/all"
|
|
6
|
-
require 'sprockets/railtie'
|
|
7
|
-
|
|
8
|
-
Bundler.require(:default, :development)
|
|
9
|
-
|
|
10
|
-
module Dummy
|
|
11
|
-
class Application < Rails::Application
|
|
12
|
-
config.encoding = 'utf-8'
|
|
13
|
-
config.assets.enabled = true
|
|
14
|
-
config.assets.version = '1.0'
|
|
15
|
-
|
|
16
|
-
# replacement for environments/*.rb
|
|
17
|
-
config.active_support.deprecation = :stderr
|
|
18
|
-
config.eager_load = false
|
|
19
|
-
config.active_support.test_order = begin
|
|
20
|
-
:random
|
|
21
|
-
rescue StandardError
|
|
22
|
-
nil
|
|
23
|
-
end
|
|
24
|
-
end
|
|
25
|
-
end
|
data/test/dummy/config/boot.rb
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
require 'rubygems'
|
|
4
|
-
gemfile = File.expand_path('../../../Gemfile', __dir__)
|
|
5
|
-
|
|
6
|
-
if File.exist?(gemfile)
|
|
7
|
-
ENV['BUNDLE_GEMFILE'] = gemfile
|
|
8
|
-
require 'bundler'
|
|
9
|
-
Bundler.setup
|
|
10
|
-
end
|
|
11
|
-
|
|
12
|
-
$LOAD_PATH.unshift File.expand_path('../../../lib', __dir__)
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
# Be sure to restart your server when you modify this file.
|
|
4
|
-
|
|
5
|
-
# Your secret key for verifying the integrity of signed cookies.
|
|
6
|
-
# If you change this key, all old signed cookies will become invalid!
|
|
7
|
-
# Make sure the secret is at least 30 characters and all random,
|
|
8
|
-
# no regular words or you'll be exposed to dictionary attacks.
|
|
9
|
-
#
|
|
10
|
-
# avoid deprecation warnings if building against older versions of Rails
|
|
11
|
-
|
|
12
|
-
# secret_token migrated to secret_key_base in Rails 4
|
|
13
|
-
SKB_VERSION = Gem::Version.new('4.0.0')
|
|
14
|
-
|
|
15
|
-
# Get the current Rails version.
|
|
16
|
-
RAILS_VERSION = Rails.respond_to?(:version) ? Gem::Version.new(Rails.version) : Gem::Version.new('3.22')
|
|
17
|
-
|
|
18
|
-
# if we're running an old version of Rails
|
|
19
|
-
if RAILS_VERSION < SKB_VERSION
|
|
20
|
-
Dummy::Application.config.secret_token = 'deadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef'
|
|
21
|
-
elsif Dummy::Application.config.respond_to?(:secret_key_base)
|
|
22
|
-
Dummy::Application.config.secret_key_base = 'deadbeef'
|
|
23
|
-
end
|
data/test/dummy/config/routes.rb
DELETED
data/test/icon_helper_test.rb
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
require 'test_helper'
|
|
4
|
-
|
|
5
|
-
module MaterialDesignIcons
|
|
6
|
-
class IconHelperTest < ActionView::TestCase
|
|
7
|
-
test '#md_icon with no args should render a sheep icon' do
|
|
8
|
-
assert_icon i('mdi mdi-sheep')
|
|
9
|
-
end
|
|
10
|
-
|
|
11
|
-
test '#md_icon should render different individual icons' do
|
|
12
|
-
assert_icon i('mdi mdi-flag'), 'flag'
|
|
13
|
-
assert_icon i('mdi mdi-camera-retro'), 'camera-retro'
|
|
14
|
-
assert_icon i('mdi mdi-cog'), 'cog'
|
|
15
|
-
assert_icon i('mdi mdi-github'), 'github'
|
|
16
|
-
end
|
|
17
|
-
|
|
18
|
-
private
|
|
19
|
-
|
|
20
|
-
def assert_icon(expected, *args)
|
|
21
|
-
message = "`mdi_icon(#{args.inspect[1...-1]})` should return `#{expected}`"
|
|
22
|
-
assert_dom_equal expected, mdi_icon(*args), message
|
|
23
|
-
end
|
|
24
|
-
|
|
25
|
-
def i(classes)
|
|
26
|
-
%(<i class="#{classes}"></i>)
|
|
27
|
-
end
|
|
28
|
-
end
|
|
29
|
-
end
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
require 'test_helper'
|
|
4
|
-
|
|
5
|
-
class MaterialDesignIconsTest < ActionDispatch::IntegrationTest
|
|
6
|
-
teardown { clean_sprockets_cache }
|
|
7
|
-
|
|
8
|
-
test 'engine is loaded' do
|
|
9
|
-
assert_equal ::Rails::Engine, MaterialDesignIcons::Rails::Engine.superclass
|
|
10
|
-
end
|
|
11
|
-
|
|
12
|
-
test 'fonts are served' do
|
|
13
|
-
get '/assets/materialdesignicons-webfont.eot'
|
|
14
|
-
assert_response :success
|
|
15
|
-
get '/assets/materialdesignicons-webfont.woff2'
|
|
16
|
-
assert_response :success
|
|
17
|
-
get '/assets/materialdesignicons-webfont.woff'
|
|
18
|
-
assert_response :success
|
|
19
|
-
get '/assets/materialdesignicons-webfont.ttf'
|
|
20
|
-
assert_response :success
|
|
21
|
-
end
|
|
22
|
-
|
|
23
|
-
test 'stylesheets are served' do
|
|
24
|
-
get '/assets/materialdesignicons.css'
|
|
25
|
-
assert_material_icons(response)
|
|
26
|
-
end
|
|
27
|
-
|
|
28
|
-
test 'stylesheets contain asset pipeline references to fonts' do
|
|
29
|
-
get '/assets/materialdesignicons.css'
|
|
30
|
-
assert_match %r{/assets/materialdesignicons-webfont(-\w+)?\.eot}, response.body
|
|
31
|
-
assert_match %r{/assets/materialdesignicons-webfont(-\w+)?\.eot\?#iefix}, response.body
|
|
32
|
-
assert_match %r{/assets/materialdesignicons-webfont(-\w+)?\.woff2}, response.body
|
|
33
|
-
assert_match %r{/assets/materialdesignicons-webfont(-\w+)?\.woff}, response.body
|
|
34
|
-
assert_match %r{/assets/materialdesignicons-webfont(-\w+)?\.ttf}, response.body
|
|
35
|
-
end
|
|
36
|
-
|
|
37
|
-
test 'stylesheet is available in a css sprockets require' do
|
|
38
|
-
get '/assets/sprockets-require.css'
|
|
39
|
-
assert_material_icons(response)
|
|
40
|
-
end
|
|
41
|
-
|
|
42
|
-
test 'stylesheet is available in a sass import' do
|
|
43
|
-
get '/assets/sass-import.css'
|
|
44
|
-
assert_material_icons(response)
|
|
45
|
-
end
|
|
46
|
-
|
|
47
|
-
test 'stylesheet is available in a scss import' do
|
|
48
|
-
get '/assets/scss-import.css'
|
|
49
|
-
assert_material_icons(response)
|
|
50
|
-
end
|
|
51
|
-
|
|
52
|
-
test 'helpers should be available in the view' do
|
|
53
|
-
get '/icons'
|
|
54
|
-
assert_response :success
|
|
55
|
-
assert_select 'i.mdi.mdi-sheep'
|
|
56
|
-
end
|
|
57
|
-
|
|
58
|
-
private
|
|
59
|
-
|
|
60
|
-
def clean_sprockets_cache
|
|
61
|
-
FileUtils.rm_rf File.expand_path('dummy/tmp', __dir__)
|
|
62
|
-
end
|
|
63
|
-
|
|
64
|
-
def assert_material_icons(response)
|
|
65
|
-
assert_response :success
|
|
66
|
-
assert_match(/font-family:\s*"Material Design Icons";/, response.body)
|
|
67
|
-
end
|
|
68
|
-
end
|
data/test/test_helper.rb
DELETED