Skip to content

Commit

Permalink
nori snakecase update
Browse files Browse the repository at this point in the history
  • Loading branch information
pcai committed Aug 2, 2024
1 parent 167ec06 commit 6812a5b
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/winrm/psrp/message_data/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def clixml
parser = Nori.new(
parser: :rexml,
advanced_typecasting: false,
convert_tags_to: ->(tag) { tag.snakecase.to_sym },
convert_tags_to: ->(tag) { Nori::StringUtils.snakecase(tag).to_sym },
strip_namespaces: true
)
parser.parse(raw)[:obj][:ms]
Expand Down
2 changes: 1 addition & 1 deletion lib/winrm/wsmv/wql_pull.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def process_response(response)
parser = Nori.new(
parser: :rexml,
advanced_typecasting: false,
convert_tags_to: ->(tag) { tag.snakecase.to_sym },
convert_tags_to: ->(tag) { Nori::StringUtils.snakecase(tag).to_sym },
strip_namespaces: true
)
parser.parse(response.to_s)[:envelope][:body]
Expand Down
2 changes: 1 addition & 1 deletion lib/winrm/wsmv/wql_query.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def process_response(response, &block)
parser = Nori.new(
parser: :rexml,
advanced_typecasting: false,
convert_tags_to: ->(tag) { tag.snakecase.to_sym },
convert_tags_to: ->(tag) { Nori::StringUtils.snakecase(tag).to_sym },
strip_namespaces: true
)
@items = Hash.new { |h, k| h[k] = [] }
Expand Down
2 changes: 1 addition & 1 deletion winrm.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Gem::Specification.new do |s|
s.add_runtime_dependency 'gyoku', '~> 1.0'
s.add_runtime_dependency 'httpclient', '~> 2.2', '>= 2.2.0.2'
s.add_runtime_dependency 'logging', ['>= 1.6.1', '< 3.0']
s.add_runtime_dependency 'nori', '~> 2.0'
s.add_runtime_dependency 'nori', '~> 2.7.1'
s.add_runtime_dependency 'rexml', '~> 3.0'
s.add_development_dependency 'pry'
s.add_development_dependency 'rake', '>= 10.3', '< 13'
Expand Down

0 comments on commit 6812a5b

Please sign in to comment.