Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit5b8d4b1

Browse files
committed
Simple type fixes and method change
1. aws.rb Instead of !array.include?() we can use exclude more readable. Benchmarked these methods. The result is same almost.2. customizer.rb Since shape_name is not used we can use each_value.3. parse.rb This can be initialized to empty array and hash. Does setting nil in method call make some memory manipulation. Rest all files are simple typo fixes.
1 parenta258474 commit5b8d4b1

File tree

8 files changed

+9
-11
lines changed

8 files changed

+9
-11
lines changed

‎aws-sdk-core/bin/aws.rb‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
defenv_boolkey,default
1111
ifENV.key?(key)
12-
!['0','false','no','off'].include?(ENV[key].downcase)
12+
['0','false','no','off'].exclude?(ENV[key].downcase)
1313
else
1414
default
1515
end

‎aws-sdk-core/lib/aws-sdk-core/api/customizer.rb‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def reshape_members(member_regex, modifications)
4747
ifmember_regex.is_a?(String)
4848
member_regex=/^#{member_regex}$/
4949
end
50-
@client_class.api.definition['shapes'].eachdo |shape_name,shape|
50+
@client_class.api.definition['shapes'].each_valuedo |shape|
5151
ifshape['members']
5252
shape['members'].eachdo |member_name,member_ref|
5353
ifmember_name.match(member_regex)

‎aws-sdk-core/lib/aws-sdk-core/json/parser.rb‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,17 +34,15 @@ def structure(structure, values, target = nil)
3434
# @param [Array] values
3535
# @param [Array, nil] target
3636
# @return [Array]
37-
deflist(list,values,target=nil)
38-
target=[]iftarget.nil?
37+
deflist(list,values,target=[])
3938
values.each{ |value|target <<parse_shape(list.member,value)}
4039
target
4140
end
4241

4342
# @param [Seahorse::Model::Shapes::Map] map
4443
# @param [Hash] values
4544
# @return [Hash]
46-
defmap(map,values,target=nil)
47-
target={}iftarget.nil?
45+
defmap(map,values,target={})
4846
values.eachdo |key,value|
4947
target[key]=parse_shape(map.value,value)
5048
end

‎aws-sdk-core/lib/aws-sdk-core/plugins/glacier_checksums.rb‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ module Plugins
1111
# * `:upload_multipart_part`
1212
#
1313
# The `:upload_archive` and `:upload_multipart_part` operations
14-
# accept a `:checksum` requestparamter. If this param
14+
# accept a `:checksum` requestparameter. If this param
1515
# is present, then the checksum is assumed to be the proper
1616
# tree hash of the file to be uploaded. If this param is
1717
# not present, then the required tree hash checksum will

‎aws-sdk-core/lib/seahorse/client/http/headers.rb‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ module Http
1111
# headers[:Authorization] = 'Abc'
1212
#
1313
# headers.keys
14-
# #=> ['content-length', 'authorization']]
14+
# #=> ['content-length', 'authorization']
1515
#
1616
# headers.values
1717
# #=> ['100', 'Abc']

‎aws-sdk-core/lib/seahorse/client/logging/formatter.rb‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ module Client
55
moduleLogging
66

77
# A log formatter receives a {Response} object and return
8-
# a log message as a string.. When you construct a {Formatter}, you provide
8+
# a log message as a string. When you construct a {Formatter}, you provide
99
# a pattern string with substitutions.
1010
#
1111
# pattern = ':operation :http_response_status_code :time'

‎aws-sdk-core/lib/seahorse/client/net_http/handler.rb‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def initialize(bytes_expected, bytes_received)
2424
# @api private
2525
DNS_ERROR_MESSAGE='getaddrinfo: nodename nor servname provided, or not known'
2626

27-
# Raised when a {Handler}can not construct a `Net::HTTP::Request`
27+
# Raised when a {Handler}cannot construct a `Net::HTTP::Request`
2828
# from the given http verb.
2929
classInvalidHttpVerbError <StandardError;end
3030

‎aws-sdk-core/lib/seahorse/model/shapes.rb‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def shape_class(type)
3434
if@types.key?(type)
3535
@types[type]
3636
else
37-
raiseArgumentError,"unregisterd type `#{type}'"
37+
raiseArgumentError,"unregistered type `#{type}'"
3838
end
3939
end
4040

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp