rails_material_design_icons 0.6.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 +7 -0
- data/.github/workflows/main.yml +33 -0
- data/.gitignore +11 -0
- data/CHANGELOG.md +16 -0
- data/FONT_LICENSE +20 -0
- data/Gemfile +11 -0
- data/Gemfile.lock +123 -0
- data/Guardfile +11 -0
- data/LICENSE +22 -0
- data/README.md +105 -0
- data/Rakefile +14 -0
- data/app/assets/fonts/materialdesignicons-webfont.eot +0 -0
- data/app/assets/fonts/materialdesignicons-webfont.ttf +0 -0
- data/app/assets/fonts/materialdesignicons-webfont.woff +0 -0
- data/app/assets/fonts/materialdesignicons-webfont.woff2 +0 -0
- data/app/assets/stylesheets/materialdesignicons.css.erb +24096 -0
- data/gemfiles/rails-4.2.gemfile +7 -0
- data/gemfiles/rails-5.2.gemfile +6 -0
- data/gemfiles/rails-6.0.gemfile +6 -0
- data/gemfiles/rails-6.1.gemfile +6 -0
- data/gemfiles/rails-master.gemfile +7 -0
- data/gemfiles/sprockets-backport.gemfile +15 -0
- data/lib/rails_material_design_icons/engine.rb +17 -0
- data/lib/rails_material_design_icons/icon_helper.rb +44 -0
- data/lib/rails_material_design_icons/railtie.rb +14 -0
- data/lib/rails_material_design_icons/version.rb +8 -0
- data/lib/rails_material_design_icons.rb +5 -0
- data/rails_material_design_icons.gemspec +27 -0
- data/test/dummy/.gitignore +2 -0
- data/test/dummy/app/assets/config/manifest.js +3 -0
- data/test/dummy/app/assets/stylesheets/sass-import.css.sass +1 -0
- data/test/dummy/app/assets/stylesheets/scss-import.css.scss +1 -0
- data/test/dummy/app/assets/stylesheets/sprockets-require.css +3 -0
- data/test/dummy/app/controllers/pages_controller.rb +4 -0
- data/test/dummy/app/views/pages/icons.html.erb +1 -0
- data/test/dummy/config/application.rb +25 -0
- data/test/dummy/config/boot.rb +12 -0
- data/test/dummy/config/environment.rb +7 -0
- data/test/dummy/config/initializers/secret_token.rb +23 -0
- data/test/dummy/config/routes.rb +5 -0
- data/test/dummy/config.ru +6 -0
- data/test/icon_helper_test.rb +29 -0
- data/test/material_design_icons_test.rb +68 -0
- data/test/test_helper.rb +9 -0
- metadata +150 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 8f449688fb9d28989ceec676f02e1e88cc8de1cbce3d2bf7132561d7288b938f
|
4
|
+
data.tar.gz: 4cb36b0b9055c00b9a3d3722946100489496b20a4e5b81bce2cdcc40b4b3af49
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 4bf75122a25ae6d2da78555d6ba95b90f65fba41db59fe9c0893128b72fe84f3d284a104708d41dd29f88e43c7ccbcf4dbfdbb49809a3b4a4f3858d395eced77
|
7
|
+
data.tar.gz: da6fc1d25cb6753b21a73fa4523dd0c8db0deb901f06d731c44fb7d8907def18c90fd61fbd2ccda99c3b8a34bf21b2039b6f0d60c335d8d88f7fe66801d13d60
|
@@ -0,0 +1,33 @@
|
|
1
|
+
name: CI
|
2
|
+
on: [push, pull_request]
|
3
|
+
|
4
|
+
jobs:
|
5
|
+
test:
|
6
|
+
runs-on: ubuntu-latest
|
7
|
+
strategy:
|
8
|
+
matrix:
|
9
|
+
ruby: [2.5, 2.6, 2.7]
|
10
|
+
bundler: [default]
|
11
|
+
gemfile:
|
12
|
+
- rails-5.2
|
13
|
+
- rails-6.0
|
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
|
+
|
20
|
+
env:
|
21
|
+
BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile
|
22
|
+
steps:
|
23
|
+
# https://github.com/marketplace/actions/checkout
|
24
|
+
- uses: actions/checkout@v2
|
25
|
+
# https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
|
26
|
+
- name: Set up Ruby
|
27
|
+
uses: ruby/setup-ruby@v1
|
28
|
+
with:
|
29
|
+
ruby-version: ${{ matrix.ruby }}
|
30
|
+
bundler: ${{ matrix.bundler }}
|
31
|
+
bundler-cache: true # runs `bundle install` and caches gems automatically
|
32
|
+
- name: Run tests
|
33
|
+
run: bundle exec rake
|
data/.gitignore
ADDED
data/CHANGELOG.md
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
## Changes
|
2
|
+
|
3
|
+
# Version 0.1
|
4
|
+
-The first test release. Material Design Icons version 5.4.55.
|
5
|
+
|
6
|
+
# Version 0.2
|
7
|
+
-Second version, helpers were not working, so fixed that. Also the name Material Design Icons Rails was already in use on RubyGems, so Rails Material Design Icons it is.
|
8
|
+
|
9
|
+
# Version 0.3
|
10
|
+
-Fix Github address and order of version numbers for gem bump command.
|
11
|
+
|
12
|
+
# Version 0.4.0
|
13
|
+
-Fix license on Rubygems
|
14
|
+
|
15
|
+
# Version 0.5.0
|
16
|
+
-Fix CSS not being found.
|
data/FONT_LICENSE
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Pictogrammers Free License
|
2
|
+
--------------------------
|
3
|
+
|
4
|
+
This icon collection is released as free, open source, and GPL friendly by
|
5
|
+
the [Pictogrammers](http://pictogrammers.com/) icon group. You may use it
|
6
|
+
for commercial projects, open source projects, or anything really.
|
7
|
+
|
8
|
+
# Icons: Apache 2.0 (https://www.apache.org/licenses/LICENSE-2.0)
|
9
|
+
Some of the icons are redistributed under the Apache 2.0 license. All other
|
10
|
+
icons are either redistributed under their respective licenses or are
|
11
|
+
distributed under the Apache 2.0 license.
|
12
|
+
|
13
|
+
# Fonts: Apache 2.0 (https://www.apache.org/licenses/LICENSE-2.0)
|
14
|
+
All web and desktop fonts are distributed under the Apache 2.0 license. Web
|
15
|
+
and desktop fonts contain some icons that are redistributed under the Apache
|
16
|
+
2.0 license. All other icons are either redistributed under their respective
|
17
|
+
licenses or are distributed under the Apache 2.0 license.
|
18
|
+
|
19
|
+
# Code: MIT (https://opensource.org/licenses/MIT)
|
20
|
+
The MIT license applies to all non-font and non-icon files.
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,123 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
rails_material_design_icons (0.2)
|
5
|
+
railties (>= 3.2, < 7)
|
6
|
+
|
7
|
+
GEM
|
8
|
+
remote: https://rubygems.org/
|
9
|
+
specs:
|
10
|
+
actionpack (6.1.3.1)
|
11
|
+
actionview (= 6.1.3.1)
|
12
|
+
activesupport (= 6.1.3.1)
|
13
|
+
rack (~> 2.0, >= 2.0.9)
|
14
|
+
rack-test (>= 0.6.3)
|
15
|
+
rails-dom-testing (~> 2.0)
|
16
|
+
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
17
|
+
actionview (6.1.3.1)
|
18
|
+
activesupport (= 6.1.3.1)
|
19
|
+
builder (~> 3.1)
|
20
|
+
erubi (~> 1.4)
|
21
|
+
rails-dom-testing (~> 2.0)
|
22
|
+
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
23
|
+
activesupport (6.1.3.1)
|
24
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
25
|
+
i18n (>= 1.6, < 2)
|
26
|
+
minitest (>= 5.1)
|
27
|
+
tzinfo (~> 2.0)
|
28
|
+
zeitwerk (~> 2.3)
|
29
|
+
builder (3.2.4)
|
30
|
+
byebug (11.1.3)
|
31
|
+
coderay (1.1.3)
|
32
|
+
concurrent-ruby (1.1.8)
|
33
|
+
crass (1.0.6)
|
34
|
+
erubi (1.10.0)
|
35
|
+
ffi (1.15.0)
|
36
|
+
formatador (0.2.5)
|
37
|
+
guard (2.16.2)
|
38
|
+
formatador (>= 0.2.4)
|
39
|
+
listen (>= 2.7, < 4.0)
|
40
|
+
lumberjack (>= 1.0.12, < 2.0)
|
41
|
+
nenv (~> 0.1)
|
42
|
+
notiffany (~> 0.0)
|
43
|
+
pry (>= 0.9.12)
|
44
|
+
shellany (~> 0.0)
|
45
|
+
thor (>= 0.18.1)
|
46
|
+
guard-compat (1.2.1)
|
47
|
+
guard-minitest (2.4.6)
|
48
|
+
guard-compat (~> 1.2)
|
49
|
+
minitest (>= 3.0)
|
50
|
+
i18n (1.8.10)
|
51
|
+
concurrent-ruby (~> 1.0)
|
52
|
+
listen (3.5.1)
|
53
|
+
rb-fsevent (~> 0.10, >= 0.10.3)
|
54
|
+
rb-inotify (~> 0.9, >= 0.9.10)
|
55
|
+
loofah (2.9.1)
|
56
|
+
crass (~> 1.0.2)
|
57
|
+
nokogiri (>= 1.5.9)
|
58
|
+
lumberjack (1.2.8)
|
59
|
+
method_source (1.0.0)
|
60
|
+
minitest (5.14.4)
|
61
|
+
nenv (0.3.0)
|
62
|
+
nokogiri (1.11.3-x86_64-linux)
|
63
|
+
racc (~> 1.4)
|
64
|
+
notiffany (0.1.3)
|
65
|
+
nenv (~> 0.1)
|
66
|
+
shellany (~> 0.0)
|
67
|
+
pry (0.14.1)
|
68
|
+
coderay (~> 1.1)
|
69
|
+
method_source (~> 1.0)
|
70
|
+
racc (1.5.2)
|
71
|
+
rack (2.2.3)
|
72
|
+
rack-test (1.1.0)
|
73
|
+
rack (>= 1.0, < 3)
|
74
|
+
rails-dom-testing (2.0.3)
|
75
|
+
activesupport (>= 4.2.0)
|
76
|
+
nokogiri (>= 1.6)
|
77
|
+
rails-html-sanitizer (1.3.0)
|
78
|
+
loofah (~> 2.3)
|
79
|
+
railties (6.1.3.1)
|
80
|
+
actionpack (= 6.1.3.1)
|
81
|
+
activesupport (= 6.1.3.1)
|
82
|
+
method_source
|
83
|
+
rake (>= 0.8.7)
|
84
|
+
thor (~> 1.0)
|
85
|
+
rake (13.0.3)
|
86
|
+
rb-fsevent (0.10.4)
|
87
|
+
rb-inotify (0.10.1)
|
88
|
+
ffi (~> 1.0)
|
89
|
+
sassc (2.4.0)
|
90
|
+
ffi (~> 1.9)
|
91
|
+
sassc-rails (2.1.2)
|
92
|
+
railties (>= 4.0.0)
|
93
|
+
sassc (>= 2.0)
|
94
|
+
sprockets (> 3.0)
|
95
|
+
sprockets-rails
|
96
|
+
tilt
|
97
|
+
shellany (0.0.1)
|
98
|
+
sprockets (4.0.2)
|
99
|
+
concurrent-ruby (~> 1.0)
|
100
|
+
rack (> 1, < 3)
|
101
|
+
sprockets-rails (3.2.2)
|
102
|
+
actionpack (>= 4.0)
|
103
|
+
activesupport (>= 4.0)
|
104
|
+
sprockets (>= 3.0.0)
|
105
|
+
thor (1.1.0)
|
106
|
+
tilt (2.0.10)
|
107
|
+
tzinfo (2.0.4)
|
108
|
+
concurrent-ruby (~> 1.0)
|
109
|
+
zeitwerk (2.4.2)
|
110
|
+
|
111
|
+
PLATFORMS
|
112
|
+
x86_64-linux
|
113
|
+
|
114
|
+
DEPENDENCIES
|
115
|
+
activesupport
|
116
|
+
byebug
|
117
|
+
guard (>= 2.9)
|
118
|
+
guard-minitest
|
119
|
+
rails_material_design_icons!
|
120
|
+
sassc-rails
|
121
|
+
|
122
|
+
BUNDLED WITH
|
123
|
+
2.2.15
|
data/Guardfile
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# More info at https://github.com/guard/guard#readme
|
4
|
+
|
5
|
+
directories %w[app lib test]
|
6
|
+
|
7
|
+
guard :minitest, bundler: true do
|
8
|
+
watch(%r{^app/(.+)\.rb$}) { 'test' }
|
9
|
+
watch(%r{^lib/(.+)\.rb$}) { 'test' }
|
10
|
+
watch(%r{^test/(.+)\.rb$}) { 'test' }
|
11
|
+
end
|
data/LICENSE
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2021 sampokuokkanen
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,105 @@
|
|
1
|
+
# rails_material_design_icons
|
2
|
+
|
3
|
+
[](https://rubygems.org/gems/rails_material_design_icons)
|
4
|
+
[](https://github.com/sampokuokkanen/rails_material_design_icons/actions?query=workflow%3ACI)
|
5
|
+
[](https://rubygems.org/gems/rails_material_design_icons)
|
6
|
+
|
7
|
+
rails_material_design_icons provides the
|
8
|
+
[Material Design Icons](https://materialdesignicons.com/) web fonts and
|
9
|
+
stylesheets as a Rails engine for use with the asset pipeline.
|
10
|
+
|
11
|
+
Most of the work was done in Font Awesome gem, this just changes the files to Material Design Icons.
|
12
|
+
[Font Awesome Rails](https://github.com/bokmann/font-awesome-rails)
|
13
|
+
|
14
|
+
## Installation
|
15
|
+
|
16
|
+
Add this to your Gemfile:
|
17
|
+
|
18
|
+
```ruby
|
19
|
+
gem "rails_material_design_icons"
|
20
|
+
```
|
21
|
+
|
22
|
+
and run `bundle install`.
|
23
|
+
|
24
|
+
## Usage
|
25
|
+
|
26
|
+
In your `application.css`, include the css file:
|
27
|
+
|
28
|
+
```css
|
29
|
+
/*
|
30
|
+
*= require materialdesignicons
|
31
|
+
*/
|
32
|
+
```
|
33
|
+
Then restart your webserver if it was previously running.
|
34
|
+
|
35
|
+
Congrats! You now have scalable vector icon support. Pick an icon and check out the official website for the icons available.
|
36
|
+
[https://materialdesignicons.com/](https://materialdesignicons.com/).
|
37
|
+
|
38
|
+
### Sass Support
|
39
|
+
|
40
|
+
If you prefer [SCSS](http://sass-lang.com/documentation/file.SASS_REFERENCE.html), add this to your
|
41
|
+
`application.css.scss` file:
|
42
|
+
|
43
|
+
```scss
|
44
|
+
@import "materialdesignicons";
|
45
|
+
```
|
46
|
+
|
47
|
+
If you use the
|
48
|
+
[Sass indented syntax](http://sass-lang.com/docs/yardoc/file.INDENTED_SYNTAX.html),
|
49
|
+
add this to your `application.css.sass` file:
|
50
|
+
|
51
|
+
```sass
|
52
|
+
@import materialdesignicons
|
53
|
+
```
|
54
|
+
|
55
|
+
### Helpers
|
56
|
+
|
57
|
+
There are also some helpers (`fa_icon` and `fa_stacked_icon`) that make your
|
58
|
+
views _icontastic!_
|
59
|
+
|
60
|
+
```ruby
|
61
|
+
md_icon "sheep"
|
62
|
+
# => <i class="mdi md-sheep"></i>
|
63
|
+
|
64
|
+
### Deploying to sub-folders
|
65
|
+
|
66
|
+
It is sometimes the case that deploying a Rails application to a production
|
67
|
+
environment requires the application to be hosted at a sub-folder on the server.
|
68
|
+
This may be the case, for example, if Apache HTTPD or Nginx is being used as a
|
69
|
+
front-end proxy server, with Rails handling only requests that come in to a sub-folder
|
70
|
+
such as `http://example.com/myrailsapp`. In this case, the
|
71
|
+
FontAwesome gem (and other asset-serving engines) needs to know the sub-folder,
|
72
|
+
otherwise you can experience a problem roughly described as ["my app works
|
73
|
+
fine in development, but fails when I deploy
|
74
|
+
it"](https://github.com/bokmann/font-awesome-rails/issues/74).
|
75
|
+
|
76
|
+
To fix this, set the *relative URL root* for the application. In the
|
77
|
+
environment file for the deployed version of the app, for example
|
78
|
+
`config/environments/production.rb`,
|
79
|
+
set the config option `action_controller.relative_url_root`:
|
80
|
+
|
81
|
+
MyApp::Application.configure do
|
82
|
+
...
|
83
|
+
|
84
|
+
# set the relative root, because we're deploying to /myrailsapp
|
85
|
+
config.action_controller.relative_url_root = "/myrailsapp"
|
86
|
+
|
87
|
+
...
|
88
|
+
end
|
89
|
+
|
90
|
+
The default value of this variable is taken from `ENV['RAILS_RELATIVE_URL_ROOT']`,
|
91
|
+
so configuring the environment to define `RAILS_RELATIVE_URL_ROOT` is an alternative strategy.
|
92
|
+
|
93
|
+
In addition you need to indicate the subfolder when you *precompile* the assets:
|
94
|
+
|
95
|
+
RAILS_ENV=production bundle exec rake assets:precompile RAILS_RELATIVE_URL_ROOT=/myrailsapp
|
96
|
+
|
97
|
+
## License
|
98
|
+
|
99
|
+
* The [Material Design](https://materialdesignicons.com/) font is
|
100
|
+
licensed under the Apache 2.0 (https://www.apache.org/licenses/LICENSE-2.0)
|
101
|
+
* [Material Design](http://fortawesome.github.com/Font-Awesome) CSS files are
|
102
|
+
licensed under the
|
103
|
+
[MIT License](http://opensource.org/licenses/mit-license.html).
|
104
|
+
* The remainder of the rails_material_design_icons project is licensed under the
|
105
|
+
[MIT License](http://opensource.org/licenses/mit-license.html).
|
data/Rakefile
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env rake
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
require 'bundler/gem_tasks'
|
5
|
+
require 'rake/testtask'
|
6
|
+
|
7
|
+
Rake::TestTask.new(:test) do |t|
|
8
|
+
t.libs << 'lib'
|
9
|
+
t.libs << 'test'
|
10
|
+
t.pattern = 'test/**/*_test.rb'
|
11
|
+
t.verbose = false
|
12
|
+
end
|
13
|
+
|
14
|
+
task default: :test
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|