Skip to content

Commit 3504fad

Browse files
committed
linting
1 parent dd91bde commit 3504fad

File tree

3 files changed

+74
-73
lines changed

3 files changed

+74
-73
lines changed

temporalio/lib/temporalio.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# frozen_string_literal: true
22

3+
require 'temporalio/envconfig'
34
require 'temporalio/version'
45
require 'temporalio/versioning_override'
5-
require 'temporalio/envconfig'
66

77
# Temporal Ruby SDK. See the README at https://github.com/temporalio/sdk-ruby.
88
module Temporalio

temporalio/lib/temporalio/envconfig.rb

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
require 'temporalio/internal/bridge'
55

66
module Temporalio
7+
# Environment and file-based configuration for Temporal clients
78
module EnvConfig
89
# This module provides utilities to load Temporal client configuration from TOML files
910
# and environment variables.
@@ -12,7 +13,7 @@ module EnvConfig
1213
# - Pathname: Path to a configuration file
1314
# - String: TOML configuration content
1415
# - nil: No configuration source
15-
16+
1617
# Convert a data source to path and data parameters for the bridge
1718
# @param source [Pathname, String, nil] Configuration source
1819
# @return [Array<String?, Array<Integer>?>] Tuple of [path, data_bytes]
@@ -64,15 +65,13 @@ def self.from_hash(hash)
6465
# @return [Pathname, String, nil] Data source
6566
def self.hash_to_source(hash)
6667
return nil if hash.nil?
67-
68+
6869
# Always expect a hash with path or data
6970
if hash[:path] || hash['path']
7071
# Return path as string to match old behavior
7172
hash[:path] || hash['path']
7273
elsif hash[:data] || hash['data']
7374
hash[:data] || hash['data']
74-
else
75-
nil
7675
end
7776
end
7877

@@ -190,7 +189,7 @@ def self.from_hash(hash)
190189
# Load a single client profile from given sources, applying env overrides.
191190
#
192191
# @param profile [String, nil] Profile to load from the config
193-
# @param config_source [Pathname, String, nil] Configuration source -
192+
# @param config_source [Pathname, String, nil] Configuration source -
194193
# Pathname for file path, String for TOML content
195194
# @param disable_file [Boolean] If true, file loading is disabled
196195
# @param disable_env [Boolean] If true, environment variable loading and overriding is disabled
@@ -333,7 +332,6 @@ def self.load_client_connect_config(
333332
config_file_strict: false,
334333
override_env_vars: nil
335334
)
336-
337335
prof = ClientConfigProfile.load(
338336
profile: profile,
339337
config_source: config_source,

0 commit comments

Comments
 (0)