rails_bootstrap_helper 1.6.0 → 1.6.1

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
  SHA1:
3
- metadata.gz: 9299b1880cfc055864e7f52d4c4a0c5464fd5fdd
4
- data.tar.gz: '0912ed92c2349058634d863a4190b817002767ed'
3
+ metadata.gz: 8ded8ac160ba5109fa3195a3646ae2d5672dc10f
4
+ data.tar.gz: 5e48dcb06b57b4370033ee7fa0517af5c6e04df6
5
5
  SHA512:
6
- metadata.gz: 42c1142ab86af10283f3df3717547b06e19c678a1b2d30563171895f4808ec1acf2de956377f8bb4dc88fc0fbc4970a799a5f48c0f5a8631f7194eb64c792573
7
- data.tar.gz: 29629e27f2b51eeef155692ddc81c0b0af576510f1fd27baa1379567781c44488e3260136ca22bd704f12351801d06b779e59fb936538b44bccf515fff4cb44c
6
+ metadata.gz: 4f3ad851287e818d538200191799b4ff4d168059e20ef773de3db9598232f6aaf54c25fb57eefe664c30317e43ccb8cdcd52b5aaf6d2ac7dbdc49916514c4f9b
7
+ data.tar.gz: 2657296cf0c86cdef64d96435b0727144b1617a785299c33655fe4c4fc2fe9161577a2d8a40fbad7a25656ea55e32e7bc56604e7fbe51025033a2bdf96924784
data/README.md CHANGED
@@ -2,7 +2,16 @@
2
2
 
3
3
  [![Build Status](https://semaphoreci.com/api/v1/olimart/rails_bootstrap_helper/branches/bs4/badge.svg)](https://semaphoreci.com/olimart/rails_bootstrap_helper)
4
4
 
5
- ** Run tests**
5
+ ## Publishing
6
+
7
+ - Update version number
8
+
9
+ ```
10
+ gem build rails_bootstrap_helper.gemspec
11
+ gem push rails_bootstrap_helper-1.6.0.gem
12
+ ```
13
+
14
+ ## Testing
6
15
 
7
16
  ```
8
17
  $ ruby -Itest test/dummy/test/helpers/rails_bootstrap_helper_test.rb
@@ -96,8 +96,11 @@ module RailsBootstrapHelper
96
96
  button_link_to (icon_tag + " #{text}").html_safe, url, options
97
97
  end
98
98
 
99
- def icon_tag(icon)
100
- content_tag(:span, '', class: "icon icon-#{icon}")
99
+ def icon_tag(icon, options = {})
100
+ klass = ["icon icon-#{icon}"]
101
+ klass << options[:class].strip.split(/\s+/) unless options[:class].blank?
102
+ options[:class] = klass.flatten.join(" ")
103
+ content_tag(:span, '', class: options[:class], style: options[:style])
101
104
  end
102
105
 
103
106
  def inline_svg(path)
@@ -1,3 +1,3 @@
1
1
  module RailsBootstrapHelper
2
- VERSION = "1.6.0"
2
+ VERSION = "1.6.1"
3
3
  end
@@ -23,4 +23,5 @@ Gem::Specification.new do |gem|
23
23
  gem.add_development_dependency "bundler", ">= 1.0.0"
24
24
  gem.add_development_dependency "rails", ">= 4.0.0"
25
25
  gem.add_development_dependency "sqlite3"
26
+ gem.add_development_dependency "nokogiri", "~> 1.8.2"
26
27
  end
@@ -55,6 +55,9 @@ class RailsBootstrapHelperTest < ActionView::TestCase
55
55
  end
56
56
 
57
57
  def test_icon_tag
58
- assert_equal icon_tag('star'), '<span class="icon icon-star"></span>'
58
+ assert_equal '<span class="icon icon-star"></span>', icon_tag('star')
59
+ assert_equal '<span class="icon icon-star text-success"></span>', icon_tag('star', class: 'text-success')
60
+ assert_equal '<span class="icon icon-star" style="color:white"></span>', icon_tag('star', style: 'color:white')
61
+ assert_equal '<span class="icon icon-star text-success" style="color:white"></span>', icon_tag('star', class: 'text-success', style: 'color:white')
59
62
  end
60
63
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_bootstrap_helper
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.0
4
+ version: 1.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hoang Nghiem
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-01-26 00:00:00.000000000 Z
11
+ date: 2018-03-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties
@@ -94,6 +94,20 @@ dependencies:
94
94
  - - ">="
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: nokogiri
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - "~>"
102
+ - !ruby/object:Gem::Version
103
+ version: 1.8.2
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - "~>"
109
+ - !ruby/object:Gem::Version
110
+ version: 1.8.2
97
111
  description: Bootstrap Helpers for Ruby on Rails
98
112
  email:
99
113
  - hoangnghiem1711@gmail.com
@@ -168,7 +182,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
168
182
  version: '0'
169
183
  requirements: []
170
184
  rubyforge_project:
171
- rubygems_version: 2.6.11
185
+ rubygems_version: 2.6.13
172
186
  signing_key:
173
187
  specification_version: 4
174
188
  summary: Bootstrap Helpers for Ruby on Rails