pain 0.2.0 → 0.3.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: f552d25b184c1963e158d8122d6bbf723ded5894540ede5c1a9e67de15fae8d6
4
- data.tar.gz: 993afeaac56795a0cfecaa1ac1335f549aa77b1cec6d10333b56be5b9ac4ad21
3
+ metadata.gz: 9defadd91e897af88cf90af8b8e2333fff015796d191d14769ba973eea2da532
4
+ data.tar.gz: 3c4e61b02597107fa5f28f31c30899324ea3903bbec222e81a5f4fb62cc6f628
5
5
  SHA512:
6
- metadata.gz: 300dc6d6f4fd5e2f926761a63db59d2419d2664cb30c4b396a0429a9b2b20229f8c62185ee7ee1d63b6516ddadc110ae0dd8371404e5af2e1061a87a5687eed8
7
- data.tar.gz: 46e9c1aa2cda46a74ec9775dba46b3c683670d23a22bf2f7a3f2d76933f49ef3378ada8b53df8b4a795395dc2051a233650e881b7e7876ae7242f69e6d0d1e4a
6
+ metadata.gz: 8e47d11926fec9d042971e1fa6013b06551b74b83e419fa42c9c70d644b2530c5a03854bf61e1d819b7c84f537b8faf8a087d85a66162f337b9e1db7a2a06adc
7
+ data.tar.gz: ff184c7acd4009d4b88cd1dea76d2c3a13cd41509b80c7833589fe9257d3241fab942354f5b09f3fafddc2c66bc754824943a47a419ec033ff6f497f14a0f997
@@ -7,7 +7,7 @@ module Pain
7
7
  refine String do
8
8
  Term::ANSIColor.public_instance_methods.each do |method|
9
9
  define_method(method) do |*args|
10
- Term::ANSIColor.send(method, *args).to_s
10
+ Term::ANSIColor.send(method, *args, self).to_s
11
11
  end
12
12
  end
13
13
  end
data/lib/pain/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Pain
4
- VERSION = '0.2.0'
4
+ VERSION = '0.3.0'
5
5
  end
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'spec_helper'
4
+
5
+ module Pain
6
+ RSpec.describe ColorStrings do
7
+ using Pain::ColorStrings
8
+
9
+ describe 'color refinement' do
10
+ it 'preserves the decorated string' do
11
+ expect('visible prompt'.color(Term::ANSIColor::Attribute[40])).to include('visible prompt')
12
+ end
13
+ end
14
+ end
15
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pain
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andy Nicholson
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-11-04 00:00:00.000000000 Z
11
+ date: 2026-07-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: term-ansicolor
@@ -145,6 +145,7 @@ files:
145
145
  - lib/pain/model.rb
146
146
  - lib/pain/version.rb
147
147
  - pain.gemspec
148
+ - spec/color_strings_spec.rb
148
149
  - spec/model_spec.rb
149
150
  - spec/spec_helper.rb
150
151
  homepage: http://github.com/anicholson/pain.git
@@ -171,5 +172,6 @@ signing_key:
171
172
  specification_version: 4
172
173
  summary: Quickly calculate User Pain for a bug
173
174
  test_files:
175
+ - spec/color_strings_spec.rb
174
176
  - spec/model_spec.rb
175
177
  - spec/spec_helper.rb