lib/vite_ruby/build.rb in vite_ruby-3.9.0 vs lib/vite_ruby/build.rb in vite_ruby-3.9.1
- old
+ new
@@ -1,9 +1,9 @@
# frozen_string_literal: true
-require 'json'
-require 'time'
+require "json"
+require "time"
# Internal: Value object with information about the last build.
ViteRuby::Build = Struct.new(:success, :timestamp, :vite_ruby, :digest, :current_digest, :last_build_path, :errors, keyword_init: true) do
class << self
# Internal: Combines information from a previous build with the current digest.
@@ -26,11 +26,11 @@
default_metadata
end
# Internal: To make it evident that there's no last build in error messages.
def default_metadata
- { timestamp: 'never', digest: 'none' }
+ {timestamp: "never", digest: "none"}
end
end
# Internal: A build is considered stale when watched files have changed since
# the last build, or when a certain time has ellapsed in case of failure.
@@ -54,10 +54,10 @@
# Internal: Returns a new build with the specified result.
def with_result(**attrs)
self.class.new(
**attrs,
- timestamp: Time.now.strftime('%F %T'),
+ timestamp: Time.now.strftime("%F %T"),
vite_ruby: ViteRuby::VERSION,
digest: current_digest,
current_digest: current_digest,
last_build_path: last_build_path,
)