svelte-on-rails 3.0.1 → 3.0.2

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: 0c5b4e8cde1b19cfbe2d91c9a8867b159344cd9381e99b0147886e7c949bd46c
4
- data.tar.gz: 020dca3c6ad3c0eb45fc0062f9479034ab4fad9b914a8231c1f0d8833347ab6c
3
+ metadata.gz: 7518879d67853e702698f52f1902f446c0bf9df43b114224a33e9694aceed6bf
4
+ data.tar.gz: 4ccff30dedb40d90adaa4607bb178440c5b3b71fca1b4be8b160f81c171d4807
5
5
  SHA512:
6
- metadata.gz: 87b31439e3f82ed5add160503902440572c18aa450d0e9d8efd0c9750048402a07460cea9eeb357ca6494bacce24898528695ee008990c5a9136efff0886efae
7
- data.tar.gz: 85259b03fc1a231b72b3e4ac5d2984ef1079d568e7e5abad67107a47c2b514cf47ce712af94112bf3a1071a2088f7c503accdf829160d6a83f35dee94a6afb6d
6
+ metadata.gz: d29316e7b0d08cbd6eef1381427a505e3dc999066def86555bdef0b724261c470fa4e7685c192f134804c7ce9af82f779be71d529715e0b3eb28d4a698a005b4
7
+ data.tar.gz: 442b33f3fcea5f640bbc32eff4f9a810040c7b668f997e2171805370d758581ff02bd44a595c9903efed28a2b2810be1de018c7231e327fe2b05c79da04cbf8f
@@ -118,25 +118,23 @@ module SvelteOnRails
118
118
 
119
119
  end
120
120
 
121
+ # Defining methods to log errors and warnings using Rails logger
121
122
  def self.puts_error(text)
122
- red_background = "\033[97;41m"
123
- clear_colors = "\033[0m"
124
- # Get the caller method name from the call stack
123
+ # Using Rails logger to log error with custom formatting
125
124
  caller_info = caller[1] =~ /`([^']*)'/ ? $1 : "unknown"
126
- puts "#{red_background} [svelte-on-rails] #{caller_info} ERROR #{clear_colors}"
125
+ Rails.logger.error(" => [svelte-on-rails] #{caller_info} ERROR")
127
126
  text.split("\n").each do |line|
128
- puts "#{red_background} #{clear_colors} #{line}"
127
+ Rails.logger.error(" => #{line}")
129
128
  end
130
129
  end
131
130
 
131
+ # Defining method to log warnings using Rails logger
132
132
  def self.puts_warning(text)
133
- black_background = "\033[97;40m"
134
- clear_colors = "\033[0m"
135
- # Get the caller method name from the call stack
133
+ # Using Rails logger to log warning with custom formatting
136
134
  caller_info = caller[1] =~ /`([^']*)'/ ? $1 : "unknown"
137
- puts "#{black_background} [svelte-on-rails] #{caller_info} WARNING #{clear_colors}"
135
+ Rails.logger.warn(" => [svelte-on-rails] #{caller_info} WARNING \e[0m")
138
136
  text.split("\n").each do |line|
139
- puts "#{black_background} #{clear_colors} #{line}"
137
+ Rails.logger.warn(" => #{line}")
140
138
  end
141
139
  end
142
140
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: svelte-on-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.1
4
+ version: 3.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Christian Sedlmair