pd_ruby 0.2.0 → 0.2.2

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: 31f3a7fc418f88db07cfcfc4e3161d6b15af66efeb9489b799e399ab421d1781
4
- data.tar.gz: ecf40e3de155995129a8489074875cad0fd0a412e345368b26f9918ea602cd8e
3
+ metadata.gz: 3c68d90b455eece12a684c47419679caf08c4a21eef5f814fbc7b41c82afa942
4
+ data.tar.gz: 7486fb8a0625fceac891663a4e557d5bfd64e90c422d9cf1c414fc96809b29c3
5
5
  SHA512:
6
- metadata.gz: 687b666bbd55b62e66ca12412df3ddb0ccbb642455a4b55a1ff9980fb680d37193728ff9aedb22d3dcfe4e7d0de9aba3f6a8c922f6ca90c044a95dd5cce15c4d
7
- data.tar.gz: 0d4bb556b9285d20059842bd843523b92a170ca73b367ff3ff90bfa7e40f2b61ba666bec000597d1415c0ebb43bd6171bc043ccb6e290b370852fd24f50010af
6
+ metadata.gz: c88209f837078dd387f6675d31e389f85d233d954a5e60199f082e721f64c28596b5d1f74ae6f6a8689a2e4d32047226c3205e70ce547be0422ecb29e8cab447
7
+ data.tar.gz: 976681a5c91a20f76864dba1a2e5683bf514127b8b8a1e80c9f5dbd751c842b3f10198af29d1f1c8cf27c495651b4a36eb28b70eee3fc0bdd8cad49cd3207d4f
data/.gitignore CHANGED
@@ -8,4 +8,4 @@
8
8
  /tmp/
9
9
 
10
10
  # rspec failure tracking
11
- .rspec_status
11
+ .rspec_status
@@ -0,0 +1 @@
1
+ 2.6.6
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- pd_ruby (0.2.0)
4
+ pd_ruby (0.2.2)
5
5
  colorize
6
6
 
7
7
  GEM
@@ -36,4 +36,4 @@ DEPENDENCIES
36
36
  rspec (~> 3.0)
37
37
 
38
38
  BUNDLED WITH
39
- 2.0.2
39
+ 2.1.4
@@ -6,15 +6,19 @@ require 'pd_ruby/version'
6
6
  require 'pd_ruby/helper_methods'
7
7
 
8
8
  module PDRuby
9
- def self.color_combinations
10
- @color_combinations ||= String.colors.permutation(2).map do |background, color|
11
- next if similar_colors?(background, color)
12
-
13
- {
14
- background: background,
15
- color: color
16
- }
17
- end.compact.shuffle
9
+ def self.color_combinations(contrast = true)
10
+ @color_combinations ||= if contrast
11
+ [{ background: :light_blue, color: :light_black }, { background: :light_yellow, color: :white }, { background: :red, color: :white }, { background: :green, color: :light_red }, { background: :default, color: :magenta }, { background: :light_white, color: :red }, { background: :light_yellow, color: :light_black }, { background: :black, color: :white }, { background: :light_white, color: :blue }, { background: :light_white, color: :default }, { background: :red, color: :light_black }, { background: :white, color: :light_magenta }, { background: :white, color: :cyan }, { background: :light_white, color: :cyan }, { background: :light_green, color: :white }, { background: :light_red, color: :black }, { background: :light_green, color: :light_white }, { background: :light_magenta, color: :light_black }, { background: :magenta, color: :light_black }, { background: :blue, color: :white }, { background: :light_white, color: :light_magenta }, { background: :light_white, color: :light_black }, { background: :light_yellow, color: :light_white }, { background: :white, color: :light_blue }, { background: :light_black, color: :blue }, { background: :green, color: :light_black }, { background: :light_black, color: :light_magenta }, { background: :white, color: :light_red }, { background: :light_magenta, color: :green }, { background: :light_green, color: :black }, { background: :default, color: :green }, { background: :light_cyan, color: :light_black }, { background: :black, color: :cyan }, { background: :light_cyan, color: :black }, { background: :cyan, color: :black }, { background: :white, color: :light_yellow }, { background: :blue, color: :light_black }, { background: :light_yellow, color: :black }, { background: :cyan, color: :white }, { background: :light_yellow, color: :green }, { background: :black, color: :light_blue }, { background: :light_white, color: :black }, { background: :light_red, color: :light_white }, { background: :light_cyan, color: :light_white }, { background: :light_blue, color: :black }, { background: :yellow, color: :white }, { background: :magenta, color: :black }, { background: :black, color: :yellow }, { background: :green, color: :light_magenta }, { background: :green, color: :red }, { background: :black, color: :blue }, { background: :light_white, color: :light_blue }, { background: :light_red, color: :green }, { background: :white, color: :light_green }, { background: :green, color: :blue }, { background: :light_green, color: :light_black }, { background: :white, color: :blue }, { background: :magenta, color: :green }, { background: :light_white, color: :light_green }, { background: :light_cyan, color: :white }, { background: :green, color: :black }, { background: :light_black, color: :magenta }, { background: :light_white, color: :light_red }, { background: :light_magenta, color: :default }, { background: :black, color: :light_white }, { background: :light_red, color: :white }, { background: :white, color: :light_black }, { background: :light_white, color: :light_yellow }, { background: :black, color: :light_red }, { background: :blue, color: :black }, { background: :light_green, color: :light_cyan }, { background: :magenta, color: :white }, { background: :magenta, color: :light_white }, { background: :black, color: :light_magenta }, { background: :red, color: :black }, { background: :black, color: :default }, { background: :light_red, color: :light_black }, { background: :default, color: :cyan }, { background: :light_blue, color: :light_white }, { background: :yellow, color: :black }, { background: :white, color: :yellow }, { background: :light_magenta, color: :light_white }, { background: :red, color: :green }, { background: :light_cyan, color: :light_red }, { background: :blue, color: :green }, { background: :white, color: :light_cyan }, { background: :light_magenta, color: :white }, { background: :light_blue, color: :white }, { background: :light_yellow, color: :default }, { background: :yellow, color: :light_black }, { background: :light_green, color: :default }, { background: :white, color: :red }, { background: :light_black, color: :cyan }, { background: :light_black, color: :green }, { background: :white, color: :magenta }, { background: :green, color: :light_white }, { background: :default, color: :light_magenta }, { background: :green, color: :light_yellow }, { background: :black, color: :light_yellow }, { background: :cyan, color: :light_black }, { background: :green, color: :magenta }, { background: :white, color: :black }, { background: :magenta, color: :default }, { background: :black, color: :green }, { background: :black, color: :magenta }, { background: :black, color: :light_cyan }, { background: :blue, color: :light_white }, { background: :light_red, color: :default }, { background: :light_white, color: :green }, { background: :light_white, color: :light_cyan }, { background: :light_white, color: :magenta }, { background: :default, color: :blue }, { background: :light_magenta, color: :black }, { background: :light_black, color: :red }, { background: :light_white, color: :yellow }, { background: :cyan, color: :light_white }, { background: :yellow, color: :light_white }, { background: :red, color: :light_white }, { background: :light_black, color: :light_red }, { background: :default, color: :yellow }, { background: :black, color: :red }]
12
+ else
13
+ String.colors.permutation(2).map do |background, color|
14
+ next if similar_colors?(background, color)
15
+
16
+ {
17
+ background: background,
18
+ color: color
19
+ }
20
+ end.compact.shuffle
21
+ end
18
22
  end
19
23
 
20
24
  def self.color_for(obj)
@@ -24,7 +28,7 @@ module PDRuby
24
28
 
25
29
  def self.next_color_combination
26
30
  @next_color_combination ||= color_combinations.dup
27
- if @next_color_combination.blank?
31
+ if @next_color_combination.nil?
28
32
  @next_color_combination = color_combinations.dup
29
33
  end
30
34
  @next_color_combination.shift
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PDRuby
4
- VERSION = '0.2.0'
4
+ VERSION = '0.2.2'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pd_ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Jackson
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-02-07 00:00:00.000000000 Z
11
+ date: 2020-04-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bump
@@ -89,6 +89,7 @@ extra_rdoc_files: []
89
89
  files:
90
90
  - ".gitignore"
91
91
  - ".rspec"
92
+ - ".ruby-version"
92
93
  - ".travis.yml"
93
94
  - CODE_OF_CONDUCT.md
94
95
  - Gemfile
@@ -125,7 +126,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
125
126
  - !ruby/object:Gem::Version
126
127
  version: '0'
127
128
  requirements: []
128
- rubygems_version: 3.0.4
129
+ rubygems_version: 3.0.3
129
130
  signing_key:
130
131
  specification_version: 4
131
132
  summary: Print debug statements with ease.