skeleton-ui 0.0.11 → 0.0.12

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b8e930dd05e6074689110df5bff385366e8c0d08b413b2b8e969caf8d5ff1c27
4
- data.tar.gz: 713fbc8b1a8c40c1dc306edf483144231ec9ea5cb9953ddc2a0cbc2a9fca277c
3
+ metadata.gz: 891bf63615193ce8ef6a14233e71b66072cd40a5a02d24f91317449801cf4d21
4
+ data.tar.gz: de19f4da0622a3b4327e6e7082ccf0d157eaff2c10cea7c9dd7afe929a71dff9
5
5
  SHA512:
6
- metadata.gz: 4369d405afa137fc1e6be6d115d17bc4ee9e61654d60e25374bc857b2abeb130e1ba7540678bb3c4c8d8189cafd4ace65b4236827bf2458ae2a6f760c4e5105c
7
- data.tar.gz: 5e7f1fe493a271dfe245da09e16e5f649e25aa01c0807e6153048b41aec4bced318a1f9f1fcb44847148ce63f5e903234838c2df08b4bbe496294458a7e5194f
6
+ metadata.gz: 49de780e374009f06e032f10f015210291f4e1f429843b74bf6a5b0546be5d704d3e64cade330ddf1a04da0bc7550d795930e722cb98379e3754b7d21c798090
7
+ data.tar.gz: 99d89de858907df493d88b90132f7cb917a4bf85ab77117af425b6990e736fb65c5f4c8d55ccfef54d58a33ff06abbe815111e689831722a472f3ebd4f8fc539
data/README.md CHANGED
@@ -13,7 +13,7 @@ Prerequisites:
13
13
  #### iOS
14
14
  - Install [Xcode](https://developer.apple.com/xcode/download/).
15
15
  - Install [Xcode Command Line Tools](http://railsapps.github.io/xcode-command-line-tools.html).
16
- - For real devices you need to sign skeleton in xcodeproj ([like appium](https://github.com/appium/appium-xcuitest-driver/blob/master/docs/real-device-config.md)).
16
+ - [Setting up Skeleton for working with iOS real devices](https://github.com/forqa/skeleton/blob/master/docs/real-ios-device-config.md)
17
17
 
18
18
  Installation:
19
19
  ------
@@ -65,11 +65,6 @@ Usage:
65
65
  EXAMPLES:
66
66
 
67
67
  skeleton clear
68
-
69
- Docs:
70
- ------
71
-
72
- - [Setting up Skeleton for working with iOS real devices](https://github.com/forqa/skeleton/blob/master/docs/real-ios-device-config.md)
73
68
 
74
69
  ## License
75
70
 
@@ -40,40 +40,25 @@ class Base
40
40
  end
41
41
 
42
42
  def snake_style(method_name)
43
- method_name.each_char.with_index do |char, char_i|
44
- method_name[char_i] =
45
- if /[ -!$%^&*()+|~=`{}\[\]:";'<>?,.\/]/.match(method_name[char_i])
46
- '_'
47
- elsif /[A-Z]/.match(method_name[char_i])
48
- if method_name[char_i - 1] != '_'
49
- "_#{method_name[char_i]}"
50
- else
51
- method_name[char_i]
52
- end
53
- else
54
- method_name[char_i]
55
- end
56
- end
57
- method_name.squeeze('_').downcase
43
+ method_name.tr("@()[]'\"*!?{}:;#$^.,\/\\", '').
44
+ tr('-', '_').
45
+ gsub(/([A-Z]+)([A-Z][a-z])/, '\1_\2').
46
+ gsub(/([a-z\d])([A-Z])/, '\1_\2').
47
+ gsub(/\s/, '_').
48
+ gsub(/__+/, '_').
49
+ downcase
58
50
  end
59
51
 
60
52
  def camel_style(method_name)
61
- space_i = 0
62
- method_name.each_char.with_index do |char, char_i|
63
- if /[ -!@#$%^&*()_+|~=`{}\[\]:";'<>?,.\/]/.match(char)
64
- method_name[char_i - space_i] = ''
65
- unless method_name[char_i - space_i].nil?
66
- method_name[char_i - space_i] =
67
- method_name[char_i - space_i].capitalize
68
- space_i += 1
69
- end
70
- end
71
- end
72
- if method_name == method_name.upcase
73
- method_name.downcase
53
+ method_name.tr!("@()[]'\"*!?{}:;#$^.,\/\\", '')
54
+ camel = method_name.split(/_|-|\ /).inject([]) do |buffer, e|
55
+ buffer.push(buffer.empty? ? e : e.capitalize)
56
+ end.join
57
+ if camel == camel.upcase
58
+ camel.downcase
74
59
  else
75
- method_name[0] = method_name[0].downcase
76
- method_name
60
+ camel[0] = camel[0].downcase
61
+ camel
77
62
  end
78
63
  end
79
64
 
@@ -106,8 +106,8 @@ class IOS < Base
106
106
  @page_source.slice!(start_grep)
107
107
  @page_source.slice!(end_grep)
108
108
  if @page_source.empty?
109
- log.fatal('Something went wrong. Try to sign Skeleton ' \
110
- 'and to trust it in the iOS settings.')
109
+ log.fatal("Something went wrong. Try to sign Skeleton " \
110
+ "in #{XCODEPROJ_FOLDER} and to trust it in the iOS settings.")
111
111
  raise
112
112
  end
113
113
  log.info('Successfully getting Screen Source Tree 🔥')
@@ -1,4 +1,4 @@
1
1
  module Skeleton
2
- VERSION = '0.0.11'
2
+ VERSION = '0.0.12'
3
3
  GEM_NAME = 'skeleton-ui'
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: skeleton-ui
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.11
4
+ version: 0.0.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - a.alterpesotskiy
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-04-18 00:00:00.000000000 Z
11
+ date: 2018-04-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler