geo_pattern 1.1.1 → 1.1.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -8,25 +8,25 @@ module GeoPattern
8
8
  :base_color => '#933c3c'
9
9
  }
10
10
 
11
- PATTERNS = [
12
- :octogons,
13
- :overlapping_circles,
14
- :plus_signs,
15
- :xes,
16
- :sine_waves,
17
- :hexagons,
18
- :overlapping_rings,
19
- :plaid,
20
- :triangles,
21
- :squares,
22
- :concentric_circles,
23
- :diamonds,
24
- :tessellation,
25
- :nested_squares,
26
- :mosaic_squares,
27
- :triangles_rotated,
28
- :chevrons
29
- ]
11
+ PATTERNS = %w[
12
+ octogons
13
+ overlapping_circles
14
+ plus_signs
15
+ xes
16
+ sine_waves
17
+ hexagons
18
+ overlapping_rings
19
+ plaid
20
+ triangles
21
+ squares
22
+ concentric_circles
23
+ diamonds
24
+ tessellation
25
+ nested_squares
26
+ mosaic_squares
27
+ triangles_rotated
28
+ chevrons
29
+ ].freeze
30
30
 
31
31
  FILL_COLOR_DARK = "#222"
32
32
  FILL_COLOR_LIGHT = "#ddd"
@@ -81,7 +81,7 @@ module GeoPattern
81
81
 
82
82
  def generate_pattern
83
83
  if opts[:generator]
84
- if PATTERNS.include?(opts[:generator].to_sym)
84
+ if PATTERNS.include?(opts[:generator])
85
85
  send("geo_#{opts[:generator]}")
86
86
  else
87
87
  abort("Error: the requested generator is invalid.")
@@ -431,7 +431,7 @@ module GeoPattern
431
431
  }
432
432
  })
433
433
 
434
- val = hex_val(40-i, 1)
434
+ val = hex_val(39-i, 1)
435
435
  opacity = opacity(val)
436
436
  fill = fill_color(val)
437
437
 
@@ -654,7 +654,7 @@ module GeoPattern
654
654
  y*square_size + y*block_size*2 + block_size/2,
655
655
  square_size, square_size, styles)
656
656
 
657
- val = hex_val(40-i, 1)
657
+ val = hex_val(39-i, 1)
658
658
  opacity = opacity(val)
659
659
  fill = fill_color(val)
660
660
 
@@ -1,3 +1,3 @@
1
1
  module GeoPattern
2
- VERSION = "1.1.1"
2
+ VERSION = "1.1.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: geo_pattern
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.1.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: