ruby_smart-support 1.4.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: 1775b5245ce4c9ca6de799fc00e1144c3b9025f75c1dc2ddbeea2aefc45e7d66
4
- data.tar.gz: 72749e09f012e15c978a50e03ecc2dc3c7a20bdefeda9b461b127174702e8802
3
+ metadata.gz: 1ab5e47e6138162f5f68e6f1433e208f8bcbef3ccca516c30b06f2bdb6ffbc76
4
+ data.tar.gz: 89c1e79af5aa755433b6160ab8af102ac47a596022989df5eb85f6f70c305009
5
5
  SHA512:
6
- metadata.gz: d5073cc0aac8b4a59b79fc3809b2319bac5dd9cba53b2bd0c73110f40ef6aaa280a352b9b393c29c7a6745a4960b58536cdb54a743f5c2029734454048b4e1d2
7
- data.tar.gz: bcc21095d341d019e833fe3bfb0fd39ed2bb0acaf18ac50a6a60a568a573349f465ab106dfe552e8f61e83685096b82fefd254bb4609ca0ad263a02e7ede6af2
6
+ metadata.gz: 3c0e045b0bd870da9f8995b1da17a449019ad477ad5a715c610905a1b8a07848b4ccab9c7cb47de34cb12468fed015582aa5e831ce4dc25651a42089f1790c02
7
+ data.tar.gz: cc4e5fe15bd1c24502cb2f3e4ae647e9c01c18faa0f4e7063ee24ac48b8878905da618234a802efe3b8ac818ea8d1c71b1ad78eedcd45b1302ed9f71c34ffba3
data/README.md CHANGED
@@ -32,8 +32,8 @@ Or install it yourself as:
32
32
  $ gem install ruby_smart-support
33
33
 
34
34
  ## Features
35
- * validate & check gems through GemInfo
36
- * resolve information about the current ruby's thread through ThreadInfo
35
+ * validate & check gems through **GemInfo**
36
+ * resolve information about the current ruby's thread through **ThreadInfo**
37
37
  * extensions for Ruby
38
38
  * *Array* `#only!`, `#only`
39
39
  * *Float* `#round_down`, `#round_up`
@@ -49,9 +49,6 @@ Or install it yourself as:
49
49
  * to `append` & `prepend` additional blocks
50
50
  * to check task-state with `#invoked?`, `#performed?` & `#running?`
51
51
 
52
-
53
-
54
-
55
52
  -----
56
53
 
57
54
  ## ThreadInfo module
@@ -88,6 +85,7 @@ ThreadInfo.info
88
85
  * .pry?
89
86
  * .sidekiq?
90
87
  * .server?
88
+ * .debugger?
91
89
  * .rails_console?
92
90
  * .io_console?
93
91
  * .thread?
data/docs/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # RubySmart::Support - CHANGELOG
2
2
 
3
+ ## [1.5.0] - 2024-07-03
4
+ * **[add]** `RubySmart::Support::ThreadInfo.debugger?`-detection to determinate if a **Debugger** gem is active
5
+ * **[fix]** `String#to_boolean`-method to detect false-values (which makes all other values become true - similar to `::ActiveRecord::Type::Boolean`)
6
+
3
7
  ## [1.4.0] - 2023-10-19
4
8
  * **[ref]** `RubySmart::Support::ThreadInfo.sidekiq?`-detection to determinate if the current thread is a sidekiq process
5
9
 
@@ -7,7 +7,7 @@ unless String.method_defined? "to_boolean"
7
7
  # converts a string to 'boolean'
8
8
  # @return [Boolean] bool
9
9
  def to_boolean
10
- ['true','1'].include? self.downcase
10
+ !["0", "f", "false", "off",''].include?(self.downcase)
11
11
  end
12
12
  end
13
13
  end
@@ -9,7 +9,7 @@ module RubySmart
9
9
 
10
10
  module VERSION
11
11
  MAJOR = 1
12
- MINOR = 4
12
+ MINOR = 5
13
13
  TINY = 0
14
14
  PRE = nil
15
15
 
@@ -52,6 +52,12 @@ module RubySmart
52
52
  !!defined?(Rails::Server)
53
53
  end
54
54
 
55
+ # returns true, if this runs in a debug environment (like: ruby-debug-ide / Device)
56
+ # @return [Boolean]
57
+ def self.debugger?
58
+ !!defined?(Debugger.handler)
59
+ end
60
+
55
61
  # returns true if this is a running rails console process
56
62
  # @return [Boolean]
57
63
  def self.rails_console?
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby_smart-support
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.0
4
+ version: 1.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tobias Gonsior
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-10-19 00:00:00.000000000 Z
11
+ date: 2024-07-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -130,7 +130,7 @@ files:
130
130
  - bin/setup
131
131
  - docs/CHANGELOG.md
132
132
  - docs/CODE_OF_CONDUCT.md
133
- - docs/LICENSE.txt
133
+ - docs/LICENSE
134
134
  - lib/gem_info.rb
135
135
  - lib/ruby_smart-support.rb
136
136
  - lib/ruby_smart/support.rb
@@ -174,7 +174,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
174
174
  - !ruby/object:Gem::Version
175
175
  version: '0'
176
176
  requirements: []
177
- rubygems_version: 3.4.10
177
+ rubygems_version: 3.5.14
178
178
  signing_key:
179
179
  specification_version: 4
180
180
  summary: A toolkit of support libraries including GemInfo, ThreadInfo, Ruby core extensions
File without changes