pixelchart 1.3.0 → 1.5.0

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
  SHA256:
3
- metadata.gz: 440b0c81f31b5c145c9c8d273a69b095010f55eebf3ca1c4b85933112a97a7ad
4
- data.tar.gz: df1fb5945cb784e3c472818b984bc740d42ddefe92f70c0d38363e5aaba6da6b
3
+ metadata.gz: 532a1ce23efd196f8140a2a1e3fcbb076b05790a4128f650b6f7e38922caf4c2
4
+ data.tar.gz: e837734db99853b2aae214b49363cdb76e1233637420fbe875bbabab3200b4b8
5
5
  SHA512:
6
- metadata.gz: ebca2e204052cadfef19f9bcee9a76179781c9b5303346bc9fe8584574d84a21e703177b1b89229162cd13ba3dced9eea2ca13e8b3a936b5cbdced9b0520dceb
7
- data.tar.gz: 30716436d69b3651e72c653c27b8b5c35a553dedd85d06a8d30d0a2ad90db05a1616e71dd0564b3ac648b48a3d819575c17b937f8cd1b621bfdd6ef4ef3ad9fc
6
+ metadata.gz: c60c121af1324cd9091edd76f75fa1b6ddd98b5b98e22971a6907e422e36883bca716d804902580676094a8c95c32e13fe9436b720a5137057679bed14cd8df2
7
+ data.tar.gz: 11e90d5a837e9dbb034bee620cacda4d1c3f042899520d46f9e6764aa0a8a3e009767445b2716483e942fdc37642f73474f90bd9d8db24980f22624a33af0296
data/LICENSE.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2019-2025 Alexandre ZANNI
3
+ Copyright (c) 2019-2026 Alexandre ZANNI
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- module Version
4
- VERSION = '1.3.0'
3
+ class PixelChart
4
+ VERSION = '1.5.0'
5
5
  end
data/lib/pixelchart.rb CHANGED
@@ -1,7 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # Ruby internal
4
- require 'set'
5
4
  # Project internal
6
5
  require 'pixelchart/version'
7
6
  # External
@@ -10,9 +9,6 @@ require 'vips'
10
9
 
11
10
  # PixelChart class
12
11
  class PixelChart
13
- # Constants
14
- include Version
15
-
16
12
  # A new instance of PixelChart
17
13
  # @param data [Array<Boolean>] An array containing values
18
14
  # (0, 1) used to generate the image.
@@ -77,7 +73,8 @@ class PixelChart
77
73
  # be 0, 1, true, false and separated by commas.
78
74
  # @return [Array<Integer>] Array of 0, 1. Can be directly passed to initialize
79
75
  def self.load_file(filename)
80
- content = File.read(filename).gsub(/\s+/, '')
76
+ # inline multi-lines CSV and strip all spaces
77
+ content = File.read(filename).gsub("\n", ',').gsub(/\s+/, '')
81
78
  data = content.split(',')
82
79
  data.each_with_index do |x, i|
83
80
  data[i] = 0 if x == '0' || x.downcase == 'false'
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pixelchart
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexandre ZANNI
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-03-30 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: docopt
@@ -41,16 +41,22 @@ dependencies:
41
41
  name: rmagick
42
42
  requirement: !ruby/object:Gem::Requirement
43
43
  requirements:
44
- - - "~>"
44
+ - - ">="
45
+ - !ruby/object:Gem::Version
46
+ version: '6'
47
+ - - "<"
45
48
  - !ruby/object:Gem::Version
46
- version: '6.0'
49
+ version: '8'
47
50
  type: :runtime
48
51
  prerelease: false
49
52
  version_requirements: !ruby/object:Gem::Requirement
50
53
  requirements:
51
- - - "~>"
54
+ - - ">="
55
+ - !ruby/object:Gem::Version
56
+ version: '6'
57
+ - - "<"
52
58
  - !ruby/object:Gem::Version
53
- version: '6.0'
59
+ version: '8'
54
60
  - !ruby/object:Gem::Dependency
55
61
  name: ruby-vips
56
62
  requirement: !ruby/object:Gem::Requirement
@@ -95,17 +101,17 @@ required_ruby_version: !ruby/object:Gem::Requirement
95
101
  requirements:
96
102
  - - ">="
97
103
  - !ruby/object:Gem::Version
98
- version: 3.1.0
104
+ version: 3.3.0
99
105
  - - "<"
100
106
  - !ruby/object:Gem::Version
101
- version: '4.0'
107
+ version: '5.0'
102
108
  required_rubygems_version: !ruby/object:Gem::Requirement
103
109
  requirements:
104
110
  - - ">="
105
111
  - !ruby/object:Gem::Version
106
112
  version: '0'
107
113
  requirements: []
108
- rubygems_version: 3.6.2
114
+ rubygems_version: 4.0.10
109
115
  specification_version: 4
110
116
  summary: Create a binary pixel map
111
117
  test_files: []