fomantic-ui-sass 2.6.4 → 2.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (127) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -0
  3. data/.rubocop.yml +1 -0
  4. data/.rubocop_todo.yml +102 -0
  5. data/.travis.yml +9 -3
  6. data/README.md +4 -2
  7. data/Rakefile +25 -3
  8. data/app/assets/fonts/semantic-ui/brand-icons.eot +0 -0
  9. data/app/assets/fonts/semantic-ui/brand-icons.svg +178 -11
  10. data/app/assets/fonts/semantic-ui/brand-icons.ttf +0 -0
  11. data/app/assets/fonts/semantic-ui/brand-icons.woff +0 -0
  12. data/app/assets/fonts/semantic-ui/brand-icons.woff2 +0 -0
  13. data/app/assets/fonts/semantic-ui/icons.eot +0 -0
  14. data/app/assets/fonts/semantic-ui/icons.svg +1138 -92
  15. data/app/assets/fonts/semantic-ui/icons.ttf +0 -0
  16. data/app/assets/fonts/semantic-ui/icons.woff +0 -0
  17. data/app/assets/fonts/semantic-ui/icons.woff2 +0 -0
  18. data/app/assets/fonts/semantic-ui/outline-icons.eot +0 -0
  19. data/app/assets/fonts/semantic-ui/outline-icons.svg +127 -26
  20. data/app/assets/fonts/semantic-ui/outline-icons.ttf +0 -0
  21. data/app/assets/fonts/semantic-ui/outline-icons.woff +0 -0
  22. data/app/assets/fonts/semantic-ui/outline-icons.woff2 +0 -0
  23. data/app/assets/javascripts/semantic-ui.js +1 -1
  24. data/app/assets/javascripts/semantic-ui/accordion.js +5 -1
  25. data/app/assets/javascripts/semantic-ui/api.js +9 -2
  26. data/app/assets/javascripts/semantic-ui/calendar.js +25 -12
  27. data/app/assets/javascripts/semantic-ui/checkbox.js +39 -2
  28. data/app/assets/javascripts/semantic-ui/dimmer.js +25 -5
  29. data/app/assets/javascripts/semantic-ui/dropdown.js +130 -47
  30. data/app/assets/javascripts/semantic-ui/embed.js +5 -1
  31. data/app/assets/javascripts/semantic-ui/form.js +24 -19
  32. data/app/assets/javascripts/semantic-ui/modal.js +33 -17
  33. data/app/assets/javascripts/semantic-ui/nag.js +5 -1
  34. data/app/assets/javascripts/semantic-ui/popup.js +10 -5
  35. data/app/assets/javascripts/semantic-ui/progress.js +5 -1
  36. data/app/assets/javascripts/semantic-ui/rating.js +21 -6
  37. data/app/assets/javascripts/semantic-ui/search.js +43 -27
  38. data/app/assets/javascripts/semantic-ui/shape.js +5 -1
  39. data/app/assets/javascripts/semantic-ui/sidebar.js +7 -3
  40. data/app/assets/javascripts/semantic-ui/site.js +6 -2
  41. data/app/assets/javascripts/semantic-ui/slider.js +1216 -0
  42. data/app/assets/javascripts/semantic-ui/state.js +5 -1
  43. data/app/assets/javascripts/semantic-ui/sticky.js +5 -1
  44. data/app/assets/javascripts/semantic-ui/tab.js +10 -3
  45. data/app/assets/javascripts/semantic-ui/toast.js +6 -2
  46. data/app/assets/javascripts/semantic-ui/transition.js +6 -2
  47. data/app/assets/javascripts/semantic-ui/visibility.js +6 -2
  48. data/app/assets/stylesheets/semantic-ui/collections/_breadcrumb.scss +7 -7
  49. data/app/assets/stylesheets/semantic-ui/collections/_form.scss +59 -83
  50. data/app/assets/stylesheets/semantic-ui/collections/_grid.scss +110 -124
  51. data/app/assets/stylesheets/semantic-ui/collections/_menu.scss +262 -237
  52. data/app/assets/stylesheets/semantic-ui/collections/_message.scss +155 -118
  53. data/app/assets/stylesheets/semantic-ui/collections/_table.scss +332 -145
  54. data/app/assets/stylesheets/semantic-ui/elements/_button.scss +2281 -2415
  55. data/app/assets/stylesheets/semantic-ui/elements/_container.scss +1 -1
  56. data/app/assets/stylesheets/semantic-ui/elements/_divider.scss +10 -10
  57. data/app/assets/stylesheets/semantic-ui/elements/_flag.scss +81 -81
  58. data/app/assets/stylesheets/semantic-ui/elements/_header.scss +178 -191
  59. data/app/assets/stylesheets/semantic-ui/elements/_icon.scss +71 -103
  60. data/app/assets/stylesheets/semantic-ui/elements/_image.scss +8 -8
  61. data/app/assets/stylesheets/semantic-ui/elements/_input.scss +61 -40
  62. data/app/assets/stylesheets/semantic-ui/elements/_label.scss +1087 -444
  63. data/app/assets/stylesheets/semantic-ui/elements/_list.scss +69 -69
  64. data/app/assets/stylesheets/semantic-ui/elements/_loader.scss +510 -155
  65. data/app/assets/stylesheets/semantic-ui/elements/_placeholder.scss +20 -14
  66. data/app/assets/stylesheets/semantic-ui/elements/_rail.scss +26 -26
  67. data/app/assets/stylesheets/semantic-ui/elements/_reveal.scss +8 -8
  68. data/app/assets/stylesheets/semantic-ui/elements/_segment.scss +180 -216
  69. data/app/assets/stylesheets/semantic-ui/elements/_step.scss +34 -39
  70. data/app/assets/stylesheets/semantic-ui/elements/_text.scss +114 -0
  71. data/app/assets/stylesheets/semantic-ui/globals/_reset.scss +1 -1
  72. data/app/assets/stylesheets/semantic-ui/globals/_site.scss +11 -20
  73. data/app/assets/stylesheets/semantic-ui/modules/_accordion.scss +16 -16
  74. data/app/assets/stylesheets/semantic-ui/modules/_all.scss +1 -1
  75. data/app/assets/stylesheets/semantic-ui/modules/_calendar.scss +1 -1
  76. data/app/assets/stylesheets/semantic-ui/modules/_checkbox.scss +23 -23
  77. data/app/assets/stylesheets/semantic-ui/modules/_dimmer.scss +32 -32
  78. data/app/assets/stylesheets/semantic-ui/modules/_dropdown.scss +128 -155
  79. data/app/assets/stylesheets/semantic-ui/modules/_embed.scss +13 -13
  80. data/app/assets/stylesheets/semantic-ui/modules/_modal.scss +50 -48
  81. data/app/assets/stylesheets/semantic-ui/modules/_nag.scss +15 -15
  82. data/app/assets/stylesheets/semantic-ui/modules/_popup.scss +50 -50
  83. data/app/assets/stylesheets/semantic-ui/modules/_progress.scss +30 -44
  84. data/app/assets/stylesheets/semantic-ui/modules/_rating.scss +137 -111
  85. data/app/assets/stylesheets/semantic-ui/modules/_search.scss +24 -28
  86. data/app/assets/stylesheets/semantic-ui/modules/_shape.scss +6 -6
  87. data/app/assets/stylesheets/semantic-ui/modules/_sidebar.scss +29 -29
  88. data/app/assets/stylesheets/semantic-ui/modules/_slider.scss +768 -0
  89. data/app/assets/stylesheets/semantic-ui/modules/_sticky.scss +3 -3
  90. data/app/assets/stylesheets/semantic-ui/modules/_tab.scss +10 -14
  91. data/app/assets/stylesheets/semantic-ui/modules/_toast.scss +27 -16
  92. data/app/assets/stylesheets/semantic-ui/modules/_transition.scss +1 -1
  93. data/app/assets/stylesheets/semantic-ui/views/_ad.scss +6 -6
  94. data/app/assets/stylesheets/semantic-ui/views/_card.scss +103 -133
  95. data/app/assets/stylesheets/semantic-ui/views/_comment.scss +26 -26
  96. data/app/assets/stylesheets/semantic-ui/views/_feed.scss +27 -27
  97. data/app/assets/stylesheets/semantic-ui/views/_item.scss +54 -54
  98. data/app/assets/stylesheets/semantic-ui/views/_statistic.scss +138 -108
  99. data/app/helpers/semantic_breadcrumbs_helper.rb +1 -1
  100. data/app/helpers/semantic_flash_helper.rb +4 -2
  101. data/app/helpers/semantic_icon_helper.rb +1 -1
  102. data/fomantic-ui-sass.gemspec +20 -19
  103. data/gemfiles/rails_5.0.gemfile +5 -0
  104. data/gemfiles/rails_5.1.gemfile +5 -0
  105. data/gemfiles/rails_5.2.gemfile +5 -0
  106. data/lib/fomantic-ui-sass.rb +3 -4
  107. data/lib/fomantic/ui/sass/breadcrumbs.rb +2 -4
  108. data/lib/fomantic/ui/sass/engine.rb +3 -3
  109. data/lib/fomantic/ui/sass/version.rb +2 -2
  110. data/spec/dummy/Rakefile +1 -1
  111. data/spec/dummy/bin/bundle +1 -1
  112. data/spec/dummy/bin/rails +1 -1
  113. data/spec/dummy/bin/rake +0 -0
  114. data/spec/dummy/config.ru +1 -1
  115. data/spec/dummy/config/application.rb +5 -6
  116. data/spec/dummy/config/boot.rb +3 -3
  117. data/spec/dummy/config/environment.rb +1 -1
  118. data/spec/dummy/config/environments/test.rb +1 -1
  119. data/spec/helpers/semantic_breadcrumbs_helper_spec.rb +30 -32
  120. data/spec/helpers/semantic_flash_helper_spec.rb +15 -16
  121. data/spec/helpers/semantic_icon_helper_spec.rb +10 -10
  122. data/spec/spec_helper.rb +4 -6
  123. data/tasks/converter.rb +61 -73
  124. data/templates/project/manifest.rb +1 -2
  125. metadata +45 -23
  126. data/app/assets/javascripts/semantic-ui/range.js +0 -278
  127. data/app/assets/stylesheets/semantic-ui/modules/_range.scss +0 -192
@@ -1,6 +1,6 @@
1
1
  module SemanticBreadcrumbsHelper
2
2
  def semantic_breadcrumbs(divider = '/', &block)
3
- content = render :partial => 'semantic/breadcrumbs', :layout => false, :locals => { :divider => divider }
3
+ content = render partial: 'semantic/breadcrumbs', layout: false, locals: { divider: divider }
4
4
  if block_given?
5
5
  capture(content, &block)
6
6
  else
@@ -1,13 +1,15 @@
1
1
  module SemanticFlashHelper
2
- ALERT_TYPES = [:error, :info, :success, :warning]
2
+ ALERT_TYPES = %i[error info success warning].freeze
3
3
 
4
4
  def semantic_flash
5
5
  output = ''
6
6
  flash.each do |type, message|
7
7
  next if message.blank?
8
+
8
9
  type = :success if type.to_sym == :notice
9
10
  type = :error if type.to_sym == :alert
10
11
  next unless ALERT_TYPES.include?(type.to_sym)
12
+
11
13
  output += flash_container(type, message)
12
14
  end
13
15
 
@@ -16,7 +18,7 @@ module SemanticFlashHelper
16
18
 
17
19
  def flash_container(type, message)
18
20
  content_tag(:div, class: "ui #{type} message") do
19
- content_tag(:i, '', class: "close icon") + message
21
+ content_tag(:i, '', class: 'close icon') + message
20
22
  end
21
23
  end
22
24
  end
@@ -1,7 +1,7 @@
1
1
  module SemanticIconHelper
2
2
  def semantic_icon(*names)
3
3
  opts = names[-1].is_a?(Hash) ? names.delete_at(-1) : {}
4
- icon_classes = names.map{|name| "#{name.to_s.gsub('_','-')}" } << 'icon'
4
+ icon_classes = names.map { |name| name.to_s.tr('_', '-').to_s } << 'icon'
5
5
  opts[:class] = [opts[:class], icon_classes].flatten.reject(&:nil?)
6
6
  content_tag :i, nil, opts
7
7
  end
@@ -1,31 +1,32 @@
1
- # coding: utf-8
2
- lib = File.expand_path('../lib', __FILE__)
1
+ lib = File.expand_path('lib', __dir__)
3
2
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
3
  require 'fomantic/ui/sass/version'
5
4
 
6
5
  Gem::Specification.new do |spec|
7
- spec.name = "fomantic-ui-sass"
6
+ spec.name = 'fomantic-ui-sass'
8
7
  spec.version = Fomantic::Ui::Sass::VERSION
9
- spec.authors = ["doabit"]
10
- spec.email = ["doinsist@gmail.com"]
11
- spec.description = %q{Fomantic UI, converted to Sass and ready to drop into Rails, Compass, or Sprockets.}
12
- spec.summary = %q{Fomantic UI, converted to Sass and ready to drop into Rails, Compass, or Sprockets.}
13
- spec.homepage = "http://github.com/shanecav84/fomantic-ui-sass"
14
- spec.license = "MIT"
8
+ spec.authors = %w[doabit shanecav84]
9
+ spec.email = ['doinsist@gmail.com', 'shane@shanecav.net']
10
+ spec.description = 'Fomantic UI, converted to Sass and ready to drop into Rails, Compass, or Sprockets.'
11
+ spec.summary = 'Fomantic UI, converted to Sass and ready to drop into Rails, Compass, or Sprockets.'
12
+ spec.homepage = 'http://github.com/shanecav84/fomantic-ui-sass'
13
+ spec.license = 'MIT'
15
14
 
16
- spec.files = `git ls-files`.split($/)
15
+ spec.files = `git ls-files`.split($INPUT_RECORD_SEPARATOR)
17
16
  spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
17
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
- spec.require_paths = ["lib"]
18
+ spec.require_paths = ['lib']
20
19
 
21
- spec.add_development_dependency "bundler", ">= 1.3"
22
- spec.add_development_dependency "rake"
23
- spec.add_runtime_dependency 'sass', '>= 3.2'
24
- spec.add_development_dependency 'sass-rails', '>= 3.2'
25
- spec.add_development_dependency 'sprockets-rails', '>= 2.1.3'
26
- spec.add_development_dependency 'pry'
20
+ spec.add_runtime_dependency 'autoprefixer-rails'
21
+ spec.add_runtime_dependency 'rails', '>= 3.2.0'
22
+ spec.add_runtime_dependency 'sass', '>= 3.2'
23
+ spec.add_runtime_dependency 'sass-rails', '>= 3.2'
24
+ spec.add_runtime_dependency 'sprockets-rails', '>= 2.1.3'
25
+
26
+ spec.add_development_dependency 'bundler', '>= 1.3'
27
27
  spec.add_development_dependency 'dotenv'
28
+ spec.add_development_dependency 'pry'
29
+ spec.add_development_dependency 'rake'
28
30
  spec.add_development_dependency 'rspec-rails', '>= 3.0'
29
- spec.add_development_dependency "rails", '>= 3.2.0'
30
- spec.add_development_dependency "autoprefixer-rails"
31
+ spec.add_development_dependency 'rubocop'
31
32
  end
@@ -0,0 +1,5 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec path: '../'
4
+
5
+ gem 'rails', '~> 5.0.0'
@@ -0,0 +1,5 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec path: '../'
4
+
5
+ gem 'rails', '~> 5.1.0'
@@ -0,0 +1,5 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec path: '../'
4
+
5
+ gem 'rails', '~> 5.2.0'
@@ -7,7 +7,7 @@ module Fomantic
7
7
  if defined?(::Rails)
8
8
  require 'fomantic/ui/sass/engine'
9
9
  elsif defined?(::Compass)
10
- ::Compass::Frameworks.register('fomantic-ui', :path => base, :stylesheets_directory => stylesheets_path, :templates_directory => templates_path)
10
+ ::Compass::Frameworks.register('fomantic-ui', path: base, stylesheets_directory: stylesheets_path, templates_directory: templates_path)
11
11
  elsif defined?(::Sprockets)
12
12
  Sprockets.append_path(stylesheets_path)
13
13
  Sprockets.append_path(fonts_path)
@@ -16,8 +16,8 @@ module Fomantic
16
16
  end
17
17
 
18
18
  configure_sass
19
- if !(defined?(::Rails) || defined?(::Compass) || defined?(::Sprockets))
20
- raise Fomantic::Ui::Sass::FrameworkNotFound, "fomantic-ui-sass requires either Rails > 3.1 or Compass, or Sprockets, none of which are loaded"
19
+ unless defined?(::Rails) || defined?(::Compass) || defined?(::Sprockets)
20
+ raise Fomantic::Ui::Sass::FrameworkNotFound, 'fomantic-ui-sass requires either Rails > 3.1 or Compass, or Sprockets, none of which are loaded'
21
21
  end
22
22
  end
23
23
 
@@ -54,7 +54,6 @@ module Fomantic
54
54
  require 'sass'
55
55
  ::Sass.load_paths << stylesheets_path
56
56
  end
57
-
58
57
  end
59
58
  end
60
59
  end
@@ -1,7 +1,6 @@
1
1
  module Fomantic
2
2
  module Ui
3
3
  module Sass
4
-
5
4
  module BreadCrumbs
6
5
  def self.included(base)
7
6
  base.extend(ClassMethods)
@@ -23,7 +22,7 @@ module Fomantic
23
22
  @breadcrumbs ||= []
24
23
  name = translate_semantic_breadcrumb(name, self.class.name) if name.is_a?(Symbol)
25
24
  url = eval(url.to_s) if url =~ /_path|_url|@/
26
- @breadcrumbs << {:name => name, :url => url, :options => options}
25
+ @breadcrumbs << { name: name, url: url, options: options }
27
26
  end
28
27
 
29
28
  def translate_semantic_breadcrumb(name, class_name)
@@ -32,10 +31,9 @@ module Fomantic
32
31
  namespace.last.sub!('_controller', '')
33
32
  scope += namespace
34
33
 
35
- I18n.t name, :scope => scope
34
+ I18n.t name, scope: scope
36
35
  end
37
36
  end
38
-
39
37
  end
40
38
  end
41
39
  end
@@ -4,11 +4,11 @@ module Fomantic
4
4
  module Sass
5
5
  module Rails
6
6
  class Engine < ::Rails::Engine
7
- initializer "fomantic-ui-sass.assets.precompile" do |app|
7
+ initializer 'fomantic-ui-sass.assets.precompile' do |app|
8
8
  if ::Rails.version >= '5' || ::Sprockets::VERSION.start_with?('4')
9
- ::Rails.application.config.assets.precompile += %w{ semantic-ui/*icons.* }
9
+ ::Rails.application.config.assets.precompile += %w[semantic-ui/*icons.*]
10
10
  else
11
- app.config.assets.precompile << %r(semantic-ui\/(basic\.)*icons\.(?:eot|svg|ttf|woff)$)
11
+ app.config.assets.precompile << %r{semantic-ui\/(basic\.)*icons\.(?:eot|svg|ttf|woff)$}
12
12
  end
13
13
  end
14
14
  initializer 'fomantic-ui-sass.setup_helpers' do |app|
@@ -1,8 +1,8 @@
1
1
  module Fomantic
2
2
  module Ui
3
3
  module Sass
4
- VERSION = "2.6.4"
5
- SEMANTIC_UI_SHA = 'e69d8dff1c3db460bb232b9539a0d1d6cf7ff7cc'
4
+ VERSION = '2.7.0'.freeze
5
+ SEMANTIC_UI_SHA = '634f32fbbd8ed69f94c3f197ecca0bc10ec588d3'.freeze
6
6
  end
7
7
  end
8
8
  end
@@ -1,6 +1,6 @@
1
1
  # Add your own tasks in files placed in lib/tasks ending in .rake,
2
2
  # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
3
3
 
4
- require File.expand_path('../config/application', __FILE__)
4
+ require File.expand_path('config/application', __dir__)
5
5
 
6
6
  Dummy::Application.load_tasks
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env ruby
2
- ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
2
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__)
3
3
  load Gem.bin_path('bundler', 'bundle')
@@ -1,4 +1,4 @@
1
1
  #!/usr/bin/env ruby
2
- APP_PATH = File.expand_path('../../config/application', __FILE__)
2
+ APP_PATH = File.expand_path('../config/application', __dir__)
3
3
  require_relative '../config/boot'
4
4
  require 'rails/commands'
File without changes
@@ -1,4 +1,4 @@
1
1
  # This file is used by Rack-based servers to start the application.
2
2
 
3
- require ::File.expand_path('../config/environment', __FILE__)
3
+ require ::File.expand_path('../config/environment', __FILE__)
4
4
  run Rails.application
@@ -1,14 +1,14 @@
1
- require File.expand_path('../boot', __FILE__)
1
+ require File.expand_path('boot', __dir__)
2
2
 
3
3
  # Pick the frameworks you want:
4
4
  # require "active_record/railtie"
5
- require "action_controller/railtie"
6
- require "action_mailer/railtie"
7
- require "sprockets/railtie"
5
+ require 'action_controller/railtie'
6
+ require 'action_mailer/railtie'
7
+ require 'sprockets/railtie'
8
8
  # require "rails/test_unit/railtie"
9
9
 
10
10
  Bundler.require(*Rails.groups)
11
- require "fomantic-ui-sass"
11
+ require 'fomantic-ui-sass'
12
12
 
13
13
  module Dummy
14
14
  class Application < Rails::Application
@@ -25,4 +25,3 @@ module Dummy
25
25
  # config.i18n.default_locale = :de
26
26
  end
27
27
  end
28
-
@@ -1,5 +1,5 @@
1
1
  # Set up gems listed in the Gemfile.
2
- ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../../../Gemfile', __FILE__)
2
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../../Gemfile', __dir__)
3
3
 
4
- require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE'])
5
- $LOAD_PATH.unshift File.expand_path('../../../../lib', __FILE__)
4
+ require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE'])
5
+ $LOAD_PATH.unshift File.expand_path('../../../lib', __dir__)
@@ -1,5 +1,5 @@
1
1
  # Load the Rails application.
2
- require File.expand_path('../application', __FILE__)
2
+ require File.expand_path('application', __dir__)
3
3
 
4
4
  # Initialize the Rails application.
5
5
  Dummy::Application.initialize!
@@ -13,7 +13,7 @@ Dummy::Application.configure do
13
13
  config.eager_load = false
14
14
 
15
15
  # Configure static asset server for tests with Cache-Control for performance.
16
- config.serve_static_assets = true
16
+ config.serve_static_assets = true
17
17
  config.public_file_server.headers = { 'Cache-Control' => 'public, max-age=3600' }
18
18
 
19
19
  # Show full error reports and disable caching.
@@ -1,38 +1,36 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  describe SemanticBreadcrumbsHelper do
4
- describe "semantic_breadcrumbs" do
4
+ describe 'semantic_breadcrumbs' do
5
+ it 'should return breadcrumbs' do
6
+ controller.instance_variable_set('@breadcrumbs', [{ name: 'Home', url: '/' }])
7
+ expect(semantic_breadcrumbs).to like_of %(
8
+ <div class="ui breadcrumb">
9
+ <div class="active section">Home</div>
10
+ </div>
11
+ )
12
+ end
5
13
 
6
- it "should return breadcrumbs" do
7
- controller.instance_variable_set("@breadcrumbs", [{name: 'Home', url:'/'}])
8
- expect(semantic_breadcrumbs).to like_of %Q{
9
- <div class="ui breadcrumb">
10
- <div class="active section">Home</div>
11
- </div>
12
- }
13
- end
14
+ it 'should return breadcrumbs with multi params' do
15
+ controller.instance_variable_set('@breadcrumbs', [{ name: 'Home', url: '/' }, { name: 'Posts', url: '/posts' }])
16
+ expect(semantic_breadcrumbs).to like_of %(
17
+ <div class="ui breadcrumb">
18
+ <a href="/">Home</a>
19
+ <div class="divider">/</div>
20
+ <div class="active section">Posts</div>
21
+ </div>
22
+ )
23
+ end
14
24
 
15
- it "should return breadcrumbs with multi params" do
16
- controller.instance_variable_set("@breadcrumbs", [{name: 'Home', url:'/'}, {name: 'Posts', url: '/posts'}])
17
- expect(semantic_breadcrumbs).to like_of %Q{
18
- <div class="ui breadcrumb">
19
- <a href="/">Home</a>
20
- <div class="divider">/</div>
21
- <div class="active section">Posts</div>
22
- </div>
23
- }
24
- end
25
-
26
- it "should return breadcrumbs with divider" do
27
- controller.instance_variable_set("@breadcrumbs", [{name: 'Home', url:'/'}, {name: 'Posts', url: '/posts'}])
28
- expect(semantic_breadcrumbs('>')).to like_of %Q{
29
- <div class="ui breadcrumb">
30
- <a href="/">Home</a>
31
- <div class="divider">&gt;</div>
32
- <div class="active section">Posts</div>
33
- </div>
34
- }
35
- end
36
-
37
- end
25
+ it 'should return breadcrumbs with divider' do
26
+ controller.instance_variable_set('@breadcrumbs', [{ name: 'Home', url: '/' }, { name: 'Posts', url: '/posts' }])
27
+ expect(semantic_breadcrumbs('>')).to like_of %(
28
+ <div class="ui breadcrumb">
29
+ <a href="/">Home</a>
30
+ <div class="divider">&gt;</div>
31
+ <div class="active section">Posts</div>
32
+ </div>
33
+ )
34
+ end
35
+ end
38
36
  end
@@ -1,36 +1,35 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  describe SemanticFlashHelper do
4
- describe "semantic_flash" do
5
-
6
- it "should return warning flash message" do
7
- @request.flash[:warning] = "Update Warning!"
4
+ describe 'semantic_flash' do
5
+ it 'should return warning flash message' do
6
+ @request.flash[:warning] = 'Update Warning!'
8
7
  expect(semantic_flash).to eq '<div class="ui warning message"><i class="close icon"></i>Update Warning!</div>'
9
8
  end
10
9
 
11
- it "should return alert-success message when using notice message" do
12
- @request.flash[:notice] = "Update Success!"
10
+ it 'should return alert-success message when using notice message' do
11
+ @request.flash[:notice] = 'Update Success!'
13
12
  expect(semantic_flash).to eq '<div class="ui success message"><i class="close icon"></i>Update Success!</div>'
14
13
  end
15
14
 
16
- it "should return error message when using notice alert" do
17
- @request.flash[:alert] = "Update Failed!"
15
+ it 'should return error message when using notice alert' do
16
+ @request.flash[:alert] = 'Update Failed!'
18
17
  expect(semantic_flash).to eq '<div class="ui error message"><i class="close icon"></i>Update Failed!</div>'
19
18
  end
20
19
 
21
- it "should return alert-error message when using notice error" do
22
- @request.flash[:error] = "Update Failed!"
20
+ it 'should return alert-error message when using notice error' do
21
+ @request.flash[:error] = 'Update Failed!'
23
22
  expect(semantic_flash).to eq '<div class="ui error message"><i class="close icon"></i>Update Failed!</div>'
24
23
  end
25
24
 
26
- it "should return no message when using an undefined message" do
27
- @request.flash[:undefined] = "Update Undefined!"
28
- expect(semantic_flash).to eq ""
25
+ it 'should return no message when using an undefined message' do
26
+ @request.flash[:undefined] = 'Update Undefined!'
27
+ expect(semantic_flash).to eq ''
29
28
  end
30
29
 
31
- it "should return no message when the message is blank" do
32
- @request.flash[:notice] = ""
33
- expect(semantic_flash).to eq ""
30
+ it 'should return no message when the message is blank' do
31
+ @request.flash[:notice] = ''
32
+ expect(semantic_flash).to eq ''
34
33
  end
35
34
  end
36
35
  end
@@ -1,47 +1,47 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  describe SemanticIconHelper do
4
- it "render icon with name" do
4
+ it 'render icon with name' do
5
5
  render plain: semantic_icon('add')
6
6
  assert_select 'i[class="add icon"]'
7
7
  end
8
8
 
9
- it "render icon with names with string" do
9
+ it 'render icon with names with string' do
10
10
  render plain: semantic_icon('add sign')
11
11
  assert_select 'i[class="add sign icon"]'
12
12
  end
13
13
 
14
- it "render icon with names with params" do
14
+ it 'render icon with names with params' do
15
15
  render plain: semantic_icon('add', 'sign')
16
16
  assert_select 'i[class="add sign icon"]'
17
17
  end
18
18
 
19
- it "render icon with names with sym params" do
19
+ it 'render icon with names with sym params' do
20
20
  render plain: semantic_icon(:add, :sign)
21
21
  assert_select 'i[class="add sign icon"]'
22
22
  end
23
23
 
24
- it "render icon with name and id" do
24
+ it 'render icon with name and id' do
25
25
  render plain: semantic_icon('add', id: 'id')
26
26
  assert_select 'i[class="add icon"][id="id"]'
27
27
  end
28
28
 
29
- it "render icon with arbitrary attributes" do
30
- render plain: semantic_icon('add', id: 'id', data: {foo: 'bar'})
29
+ it 'render icon with arbitrary attributes' do
30
+ render plain: semantic_icon('add', id: 'id', data: { foo: 'bar' })
31
31
  assert_select 'i[class="add icon"][id="id"][data-foo="bar"]'
32
32
  end
33
33
 
34
- it "render icon with names with string and id" do
34
+ it 'render icon with names with string and id' do
35
35
  render plain: semantic_icon('add sign', id: 'id')
36
36
  assert_select 'i[class="add sign icon"][id="id"]'
37
37
  end
38
38
 
39
- it "render icon with names with params and id" do
39
+ it 'render icon with names with params and id' do
40
40
  render plain: semantic_icon('add', 'sign', id: 'id')
41
41
  assert_select 'i[class="add sign icon"][id="id"]'
42
42
  end
43
43
 
44
- it "render icon with names with sym params and id" do
44
+ it 'render icon with names with sym params and id' do
45
45
  render plain: semantic_icon(:add, :sign, id: 'id')
46
46
  assert_select 'i[class="add sign icon"][id="id"]'
47
47
  end