undraw 0.3.4 → 0.3.5

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
  SHA256:
3
- metadata.gz: 0c802e76ae03099a6136d0b75403e974979b142f44996e4f4f2c21b0f9926dad
4
- data.tar.gz: fb74b805974e42db9477db9e03f295ba02b6ef3a7b5d8731528c4d21e8e49af6
3
+ metadata.gz: b52688b98b807bf1c3849a9c570c5a04546f39d8aef8d0d3bd24f92d150a38ea
4
+ data.tar.gz: 9c5be8741beaac9e606a0d470073b3cb3603ed8e95a4e22ab96356e67b32e389
5
5
  SHA512:
6
- metadata.gz: '0297d27395d95e8bf3f5f1891f5dc45df854b4058f05736391cd9182241cbcb87f07e310ecedf624c682e6328fa816108b143d31e1b01bb80d30608561d73823'
7
- data.tar.gz: 2ba484fd3276cdeb30ca0152eabb439bb11eb61fe4d65eb8633bdda06267bc1cf7ddc9dfbfeb692a03d8a8ecfbdc96118e5565fad26c47014270c63f8bbbb1d6
6
+ metadata.gz: 116705151d9904f8d02c386b6140438251a928f9516f7b2ecc0fb188bb1ebbc00222a2cdfad7aa07e8a197133883807ece58a5230e5bc82307864c3c6adbc89d
7
+ data.tar.gz: 0db9810af88c5cf9d01d68b2b46a45d437b788727141229501a8d5f1fe6e19b3c36d18bdc95a55440f40f54a04002c2c48624ebe82ae0ccb9541e58fe7495bff
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- undraw (0.3.4)
4
+ undraw (0.3.5)
5
5
  inline_svg (~> 1.8.0)
6
6
 
7
7
  GEM
data/lib/undraw/helper.rb CHANGED
@@ -1,9 +1,9 @@
1
1
  module Undraw
2
2
  module Helper
3
3
  def undraw(filename, options = {})
4
- svg_file = read_svg(filename)
4
+ svg_file = read_undraw_svg(filename)
5
5
  color = options.delete(:color)
6
- output = recolor(svg_file, color)
6
+ output = recolor_undraw_svg(svg_file, color)
7
7
  InlineSvg::TransformPipeline.generate_html_from(output, options).html_safe
8
8
  rescue Errno::ENOENT => e
9
9
  raise Undraw::FileNotFound,
@@ -12,13 +12,13 @@ module Undraw
12
12
 
13
13
  private
14
14
 
15
- def read_svg(filename)
15
+ def read_undraw_svg(filename)
16
16
  asset_path = "#{Undraw.root}/vendor/assets/images/undraw/#{filename}.svg"
17
17
  vendor_path = "#{Rails.root}/vendor/assets/images/undraw/#{filename}.svg"
18
18
  File.read(File.exist?(vendor_path) ? vendor_path : asset_path)
19
19
  end
20
20
 
21
- def recolor(svg_file, color)
21
+ def recolor_undraw_svg(svg_file, color)
22
22
  if color.is_a?(Hash)
23
23
  # :todo:
24
24
  # = undraw("building", color: { primary: #ff6347, hair: black }, class: 'undraw-features', size: "350*150")
@@ -1,3 +1,3 @@
1
1
  module Undraw
2
- VERSION = "0.3.4"
2
+ VERSION = "0.3.5"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: undraw
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.4
4
+ version: 0.3.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - mkhairi
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-02-25 00:00:00.000000000 Z
11
+ date: 2022-03-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: inline_svg