cosme 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5c0a868eae57159db0661c677f25c4ad43a3060f
4
- data.tar.gz: 2c13fd13c5c6e8d580d08413552f7dc3acaf8a20
3
+ metadata.gz: 51875f3ea020ecbc27f978b01a612059c1e80f09
4
+ data.tar.gz: f66b21d7e52740da386ced272fcaf0f3bfd33dfc
5
5
  SHA512:
6
- metadata.gz: b05cd5de35d6efecc32da9c1f41507433475e579efd7d2fd724c52ad981b8239ebdbeb9617c1160eaf313254ffde731e57f2152cf939a4ec57ce2cc3b852cc4b
7
- data.tar.gz: 28219543ff89679d31340d03d04d482870bf1d719c1f5628eb1b7c30aa2c6fb780c1e0f6d3967fe93dbaeec23daa52a50ebbe1c52d67f5368b7fb0862cf5ea2f
6
+ metadata.gz: 7f622aa7472068f6dff8f28e08b1020b7800ddc6223dd16c56d86bb6b60a094b46254be269a4501026bd2c089ced9aa59aefdc788c6ebb0395a498305686748d
7
+ data.tar.gz: ebb6ced1c50d55ebf5668431a009345651271833837f7f7237d7458ebd0d8a290499daf8618ac62f20ba86623a813fd1f3519699446c220d4d1aa18dc6f4d293
data/lib/cosme.rb CHANGED
@@ -10,9 +10,7 @@ module Cosme
10
10
  def define(cosmetic)
11
11
  caller_path = caller_locations(1, 1)[0].path
12
12
 
13
- render_options = cosmetic[:render] || {}
14
- render_options[:file] ||= default_file_path_for(caller_path) if render_options
15
- cosmetic[:render] = render_options
13
+ cosmetic[:render] = { file: default_file_path_for(caller_path) } unless cosmetic[:render]
16
14
 
17
15
  @cosmetics ||= {}
18
16
  @cosmetics[caller_path] = cosmetic
data/lib/cosme/helpers.rb CHANGED
@@ -3,7 +3,7 @@ module Cosme
3
3
  def cosmeticize
4
4
  Cosme.all.map do |cosmetic|
5
5
  content = cosmetic[:render] ? render(cosmetic[:render]) : render
6
- content_tag(:div, nil, class: 'cosmetic', data: cosmetic.except(:render).merge(content: content))
6
+ content_tag(:div, nil, class: 'cosmetic', data: cosmetic.except(:render).merge(content: "#{content}"))
7
7
  end.join.html_safe
8
8
  end
9
9
  end
data/lib/cosme/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Cosme
2
- VERSION = '0.1.0'
2
+ VERSION = '0.1.1'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cosme
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - YOSHIDA Hiroki