font-awesome-rails-4.7.0.2/0000755000004100000410000000000013123340771015427 5ustar www-datawww-datafont-awesome-rails-4.7.0.2/Rakefile0000644000004100000410000000034113123340771017072 0ustar www-datawww-data#!/usr/bin/env rake require "bundler/gem_tasks" require "rake/testtask" Rake::TestTask.new(:test) do |t| t.libs << "lib" t.libs << "test" t.pattern = "test/**/*_test.rb" t.verbose = false end task :default => :test font-awesome-rails-4.7.0.2/font-awesome-rails.gemspec0000644000004100000410000000635113123340771022515 0ustar www-datawww-data######################################################### # This file has been automatically generated by gem2tgz # ######################################################### # -*- encoding: utf-8 -*- Gem::Specification.new do |s| s.name = "font-awesome-rails" s.version = "4.7.0.2" s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version= s.authors = ["bokmann"] s.date = "2017-05-01" s.description = "I like font-awesome. I like the asset pipeline. I like semantic versioning. If you do too, you're welcome." s.email = ["dbock@codesherpas.com"] s.files = ["LICENSE", "README.md", "Rakefile", "app/assets/fonts/FontAwesome.otf", "app/assets/fonts/fontawesome-webfont.eot", "app/assets/fonts/fontawesome-webfont.svg", "app/assets/fonts/fontawesome-webfont.ttf", "app/assets/fonts/fontawesome-webfont.woff", "app/assets/fonts/fontawesome-webfont.woff2", "app/assets/stylesheets/font-awesome.css.erb", "app/helpers/font_awesome/rails/icon_helper.rb", "lib/font-awesome-rails.rb", "lib/font-awesome-rails/engine.rb", "lib/font-awesome-rails/version.rb", "test/dummy/.gitignore", "test/dummy/app/assets/stylesheets/sass-import.css.sass", "test/dummy/app/assets/stylesheets/scss-import.css.scss", "test/dummy/app/assets/stylesheets/sprockets-require.css", "test/dummy/app/controllers/pages_controller.rb", "test/dummy/app/views/pages/icons.html.erb", "test/dummy/config.ru", "test/dummy/config/application.rb", "test/dummy/config/boot.rb", "test/dummy/config/environment.rb", "test/dummy/config/initializers/secret_token.rb", "test/dummy/config/routes.rb", "test/font_awesome_rails_test.rb", "test/icon_helper_test.rb", "test/test_helper.rb"] s.homepage = "https://github.com/bokmann/font-awesome-rails" s.licenses = ["MIT", "SIL Open Font License"] s.require_paths = ["lib"] s.required_ruby_version = Gem::Requirement.new(">= 1.9.3") s.rubygems_version = "1.8.23" s.summary = "an asset gemification of the font-awesome icon font library" s.test_files = ["test/dummy/.gitignore", "test/dummy/app/assets/stylesheets/sass-import.css.sass", "test/dummy/app/assets/stylesheets/scss-import.css.scss", "test/dummy/app/assets/stylesheets/sprockets-require.css", "test/dummy/app/controllers/pages_controller.rb", "test/dummy/app/views/pages/icons.html.erb", "test/dummy/config.ru", "test/dummy/config/application.rb", "test/dummy/config/boot.rb", "test/dummy/config/environment.rb", "test/dummy/config/initializers/secret_token.rb", "test/dummy/config/routes.rb", "test/font_awesome_rails_test.rb", "test/icon_helper_test.rb", "test/test_helper.rb"] if s.respond_to? :specification_version then s.specification_version = 4 if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then s.add_development_dependency(%q, [">= 0"]) s.add_runtime_dependency(%q, ["< 5.2", ">= 3.2"]) s.add_development_dependency(%q, [">= 0"]) else s.add_dependency(%q, [">= 0"]) s.add_dependency(%q, ["< 5.2", ">= 3.2"]) s.add_dependency(%q, [">= 0"]) end else s.add_dependency(%q, [">= 0"]) s.add_dependency(%q, ["< 5.2", ">= 3.2"]) s.add_dependency(%q, [">= 0"]) end end font-awesome-rails-4.7.0.2/lib/0000755000004100000410000000000013123340771016175 5ustar www-datawww-datafont-awesome-rails-4.7.0.2/lib/font-awesome-rails.rb0000644000004100000410000000013613123340771022236 0ustar www-datawww-datarequire "font-awesome-rails/version" require "font-awesome-rails/engine" if defined?(::Rails) font-awesome-rails-4.7.0.2/lib/font-awesome-rails/0000755000004100000410000000000013123340771021711 5ustar www-datawww-datafont-awesome-rails-4.7.0.2/lib/font-awesome-rails/engine.rb0000644000004100000410000000012713123340771023503 0ustar www-datawww-datamodule FontAwesome module Rails class Engine < ::Rails::Engine end end end font-awesome-rails-4.7.0.2/lib/font-awesome-rails/version.rb0000644000004100000410000000013513123340771023722 0ustar www-datawww-datamodule FontAwesome module Rails FA_VERSION = "4.7.0" VERSION = "4.7.0.2" end end font-awesome-rails-4.7.0.2/test/0000755000004100000410000000000013123340771016406 5ustar www-datawww-datafont-awesome-rails-4.7.0.2/test/icon_helper_test.rb0000644000004100000410000001460613123340771022270 0ustar www-datawww-datarequire 'test_helper' class FontAwesome::Rails::IconHelperTest < ActionView::TestCase test "#fa_icon with no args should render a flag icon" do assert_icon i("fa fa-flag") end test "#fa_icon should render different individual icons" do assert_icon i("fa fa-flag"), "flag" assert_icon i("fa fa-camera-retro"), "camera-retro" assert_icon i("fa fa-cog"), "cog" assert_icon i("fa fa-github"), "github" end test "#fa_icon should render icons with multiple modifiers" do assert_icon i("fa fa-pencil fa-fixed-width"), "pencil fixed-width" assert_icon i("fa fa-flag fa-4x"), "flag 4x" assert_icon i("fa fa-refresh fa-2x fa-spin"), "refresh 2x spin" end test "#fa_icon should render icons with array modifiers" do assert_icon i("fa fa-flag"), ["flag"] assert_icon i("fa fa-check fa-li"), ["check", "li"] assert_icon i("fa fa-flag fa-4x"), ["flag", "4x"] assert_icon i("fa fa-refresh fa-2x fa-spin"), ["refresh", "2x", "spin"] end test "#fa_icon should incorporate additional class styles" do assert_icon i("fa fa-flag pull-right"), "flag", :class => "pull-right" assert_icon i("fa fa-flag fa-2x pull-right"), ["flag", "2x"], :class => ["pull-right"] assert_icon i("fa fa-check fa-li pull-right special"), "check li", :class => "pull-right special" assert_icon i("fa fa-check pull-right special"), "check", :class => ["pull-right", "special"] end test "#fa_icon should incorporate a text suffix" do assert_icon "#{i("fa fa-camera-retro")} Take a photo", "camera-retro", :text => "Take a photo" end test "#fa_icon should be able to put the icon on the right" do assert_icon "Submit #{i("fa fa-chevron-right")}", "chevron-right", :text => "Submit", :right => true end test "#fa_icon should html escape text" do assert_icon "#{i("fa fa-camera-retro")} <script></script>", "camera-retro", :text => "" end test "#fa_icon should not html escape safe text" do assert_icon "#{i("fa fa-camera-retro")} ", "camera-retro", :text => "".html_safe end test "#fa_icon should pull it all together" do assert_icon "#{i("fa fa-camera-retro pull-right")} Take a photo", "camera-retro", :text => "Take a photo", :class => "pull-right" end test "#fa_icon should pass all other options through" do assert_icon %(), "user", :data => { :id => 123 } end test '#fa_icon does not modify options' do icon_options = { :class => 'foo', :data => { :id => 123 }, :text => 'bar' } assert_icon %( bar), "user", icon_options assert_includes icon_options, :class assert_includes icon_options, :text assert_includes icon_options, :data end test "#fa_stacked_icon with no args should render a flag icon" do expected = %(#{i("fa fa-square-o fa-stack-2x")}#{i("fa fa-flag fa-stack-1x")}) assert_stacked_icon expected end test "#fa_stacked_icon should render a stacked icon" do expected = %(#{i("fa fa-square-o fa-stack-2x")}#{i("fa fa-twitter fa-stack-1x")}) assert_stacked_icon expected, "twitter", :base => "square-o" expected = %(#{i("fa fa-square fa-stack-2x")}#{i("fa fa-terminal fa-inverse fa-stack-1x")}) assert_stacked_icon expected, ["terminal", "inverse"], :base => ["square"] end test "#fa_stacked_icon should incorporate additional class styles" do expected = %(#{i("fa fa-square-o fa-stack-2x")}#{i("fa fa-twitter fa-stack-1x")}) assert_stacked_icon expected, "twitter", :base => "square-o", :class => "pull-right" end test "#fa_stacked_icon should reverse the stack" do expected = %(#{i("fa fa-facebook fa-stack-1x")}#{i("fa fa-ban fa-stack-2x")}) assert_stacked_icon expected, "facebook", :base => "ban", :reverse => "true" end test "#fa_stacked_icon should be able to put the icon on the right" do expected = %(Go #{i("fa fa-square-o fa-stack-2x")}#{i("fa fa-exclamation fa-stack-1x")}) assert_stacked_icon expected, "exclamation", :text => "Go", :right => true end test "#fa_stacked_icon should html escape text" do expected = %(#{i("fa fa-check-empty fa-stack-2x")}#{i("fa fa-twitter fa-stack-1x")} <script>) assert_stacked_icon expected, "twitter", :base => "check-empty", :text => "