Skip to content

Commit 3bc3b37

Browse files
authored
Remove redundant code (#109)
* remove unused code * update changelog
1 parent 4ee5ddb commit 3bc3b37

File tree

2 files changed

+1
-10
lines changed

2 files changed

+1
-10
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ All notable changes to this project will be documented in this file.
88
- Available packages over HTTP [#106](https://github.com/appium/ruby_lib_core/issues/106)
99

1010
### Deprecations
11+
- Remove warning of camelCase capability for W3C format
1112

1213
## [1.8.1] - 2018-07-13
1314
### Enhancements

lib/appium_lib_core/common/base/bridge.rb

-10
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,6 @@ def add_appium_prefix(capabilities)
122122

123123
capabilities = capabilities.__send__(:capabilities) unless capabilities.is_a?(Hash)
124124

125-
warn_if_camel_case(capabilities)
126-
127125
capabilities.each do |name, value|
128126
next if value.nil?
129127
next if value.is_a?(String) && value.empty?
@@ -139,14 +137,6 @@ def add_appium_prefix(capabilities)
139137

140138
private
141139

142-
def warn_if_camel_case(caps)
143-
warn_caps = caps.collect { |key, _value| key =~ /_([a-z])/ ? key : nil }.compact
144-
return if warn_caps.empty?
145-
146-
warn_message = warn_caps.join(', ')
147-
::Appium::Logger.warn("Please define capability key names: #{warn_message} as camelCase for W3C Appium Server")
148-
end
149-
150140
def camel_case(str)
151141
str.gsub(/_([a-z])/) { Regexp.last_match(1).upcase }
152142
end

0 commit comments

Comments
 (0)