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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8f449688fb9d28989ceec676f02e1e88cc8de1cbce3d2bf7132561d7288b938f
4
- data.tar.gz: 4cb36b0b9055c00b9a3d3722946100489496b20a4e5b81bce2cdcc40b4b3af49
3
+ metadata.gz: cecf7e58383db95ce119314b6d2abf1eff80b1e1fe47062ffb5b4e654fb8ef7a
4
+ data.tar.gz: 49a5c71ca06b30bc4a84870949dfb13ba9bc60e3cf05f828a27079e2188e2c38
5
5
  SHA512:
6
- metadata.gz: 4bf75122a25ae6d2da78555d6ba95b90f65fba41db59fe9c0893128b72fe84f3d284a104708d41dd29f88e43c7ccbcf4dbfdbb49809a3b4a4f3858d395eced77
7
- data.tar.gz: da6fc1d25cb6753b21a73fa4523dd0c8db0deb901f06d731c44fb7d8907def18c90fd61fbd2ccda99c3b8a34bf21b2039b6f0d60c335d8d88f7fe66801d13d60
6
+ metadata.gz: b202702da334a7cd5f8844f5230935ebe24ba2de1eb644a41e3cfc59c86486bc6efaf5ca06f211012fb05fb71624c31d7b7251a61d9e8c10ad651b412ef90064
7
+ data.tar.gz: 14d02bfd2fd74e0603ae0e9c53e09a395f6f74c7c74d7950679676667910ebf1d9ce0660a46c64a8d888986ac63fc16f59ce12909c0f49dbf62b38d949f78819
@@ -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
@@ -5,7 +5,8 @@ gemfiles/*.lock
5
5
  pkg/*
6
6
  bin
7
7
  vendor/ruby
8
- gemfiles/vendor/ruby
8
+ ../gems/ActiveTranslateSelf/gemfiles/vendor/ruby
9
9
  .rbenv-version
10
10
  .sass-cache
11
- .byebug_history
11
+ .byebug_history
12
+ /.idea
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
@@ -60,6 +60,7 @@ views _icontastic!_
60
60
  ```ruby
61
61
  md_icon "sheep"
62
62
  # => <i class="mdi md-sheep"></i>
63
+ ```
63
64
 
64
65
  ### Deploying to sub-folders
65
66
 
@@ -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(stylesheets fonts images).each do |sub|
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(eot ttf woff woff2).each do |ext|
11
+ %w[eot ttf woff woff2].each do |ext|
12
12
  app.config.assets.precompile << "materialdesignicons-webfont.#{ext}"
13
13
  end
14
14
  end
@@ -1,5 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ # Icon helpers for MaterialDesignIcons
3
4
  module MaterialDesignIcons
4
5
  module IconHelper
5
6
  # Creates an icon tag given an icon name and possible icon
@@ -2,7 +2,7 @@
2
2
 
3
3
  module MaterialDesignIcons
4
4
  module Rails
5
- VERSION = '0.6.0'
5
+ VERSION = '0.7.0'
6
6
  MATERIAL_DESIGN_ICON_VERSION = '5.4.55'
7
7
  end
8
8
  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 = `git ls-files`.split("\n")
14
- gem.test_files = `git ls-files -- {test,spec}/*`.split("\n")
15
- gem.name = 'rails_material_design_icons'
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 = '>= 1.9.3'
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.6.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-04-14 00:00:00.000000000 Z
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: 1.9.3
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.1.4
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: []
@@ -1,7 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- source 'https://rubygems.org'
4
-
5
- gemspec path: '../'
6
- gem 'railties', '~> 4.2.0'
7
- gem 'sass-rails', '~> 5.0.0'
@@ -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'
@@ -1,2 +0,0 @@
1
- /log
2
- /tmp
@@ -1,3 +0,0 @@
1
- //= link_tree ../images
2
- //= link_directory ../javascripts .js
3
- //= link_directory ../stylesheets .css
@@ -1 +0,0 @@
1
- @import materialdesignicons
@@ -1 +0,0 @@
1
- @import "materialdesignicons";
@@ -1,3 +0,0 @@
1
- /*
2
- *= require materialdesignicons
3
- */
@@ -1,4 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- class PagesController < ActionController::Base
4
- end
@@ -1 +0,0 @@
1
- <%= mdi_icon "sheep" %>
data/test/dummy/config.ru DELETED
@@ -1,6 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- # This file is used by Rack-based servers to start the application.
4
-
5
- require ::File.expand_path('config/environment', __dir__)
6
- run Dummy::Application
@@ -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
@@ -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,7 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- # Load the rails application
4
- require File.expand_path('application', __dir__)
5
-
6
- # Initialize the rails application
7
- Dummy::Application.initialize!
@@ -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
@@ -1,5 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- Dummy::Application.routes.draw do
4
- get '/icons', to: 'pages#icons'
5
- end
@@ -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
@@ -1,9 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- # Configure Rails Environment
4
- ENV['RAILS_ENV'] = 'test'
5
-
6
- require File.expand_path('dummy/config/environment.rb', __dir__)
7
- require 'rails/test_help'
8
-
9
- Rails.backtrace_cleaner.remove_silencers!