skeleton-ui 0.1.19 → 0.1.20

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: 443f258481163209fe410525db0df482e41d245d2cd448b2804e984e3d482dc9
4
- data.tar.gz: 0dd4da705df506ecc7e2cd7aa79a23b6c04ef6a4ab46ed4e0b8b299c71ff5d04
3
+ metadata.gz: f8411e8ab89319ff1f7cadcbcbfee6a78fff3ab68e4c24c836548ae1a39876a8
4
+ data.tar.gz: 3c52ab6c73a22f68723d0f85df5403977c97662545421a7efaf7c2d2208a2e43
5
5
  SHA512:
6
- metadata.gz: 4eec08807c6123de9b7dd102c19e178c80e29e69b5535604220c649444e105985d271ce5e96a30b282b12b861a7f22fcd822ae6e15f56652608daa1aa893388c
7
- data.tar.gz: f69d791dee2edeb4b18b4e338e6340634e1b70677e565eae2e68bbf93318ba6a8b13d9b6df8fd222e4dcf2bb756bb26e9963ceb8199cbac996cb4c90559b0c8f
6
+ metadata.gz: 6a43b0ecd405473f7fc5e2e480ca1f91735bd3edd43a13c83911c32f2998bb3898eb78a2037a91485684026f0bc3833e44db36c0542fa10a1f8a96fc1af5f316
7
+ data.tar.gz: a344e392ede8ba0d813e65df938dc8da52270fb1b88b3b68839b5a5cceda11d32c224d60da0938a9e0cbcd1d841edd5b904b0675e92860bc3663655f89beefa9
@@ -0,0 +1,5 @@
1
+ speedups:
2
+ each_with_index_vs_while: false
3
+
4
+ exclude_paths:
5
+ - 'vendor/**/*.rb'
@@ -0,0 +1,9 @@
1
+ # Changes
2
+
3
+ ## References
4
+ - https://github.com/forqa/skeleton/issues/XXX
5
+
6
+ ## Risks
7
+ - [ ] None
8
+ - [ ] Low
9
+ - [ ] High
@@ -0,0 +1,31 @@
1
+ name: Test
2
+
3
+ on:
4
+ pull_request:
5
+ types: [opened, synchronize]
6
+
7
+ jobs:
8
+ chat:
9
+ name: Checks
10
+ timeout-minutes: 15
11
+ runs-on: [macos-latest]
12
+ if: |
13
+ (github.event.pull_request.commits == 1 && !contains(github.event.pull_request.title, '[skip ci]')) ||
14
+ contains(github.event.pull_request.title, '[run ci]')
15
+ steps:
16
+ - uses: actions/checkout@v2
17
+ with:
18
+ fetch-depth: '0'
19
+ - name: Gitleaks
20
+ run: |
21
+ brew install gitleaks
22
+ gitleaks --redact --verbose --pretty --repo-path=.
23
+ - name: Bundler
24
+ run: |
25
+ gem install bundler
26
+ bundle config path vendor/bundle
27
+ bundle check || bundle install --jobs 4 --retry 3
28
+ - name: Rubocop
29
+ run: bundle exec rubocop
30
+ - name: Fasterer
31
+ run: bundle exec fasterer
data/.gitignore CHANGED
@@ -10,4 +10,5 @@
10
10
  *.png
11
11
  *.html
12
12
  !skeleton.html
13
- port
13
+ port
14
+ /vendor/
@@ -1,26 +1,186 @@
1
+ ---
2
+ Style/MultipleComparison:
3
+ Enabled: false
1
4
  Style/Tab:
2
5
  Enabled: false
3
-
4
- Layout/IndentationWidth:
6
+ Style/PercentLiteralDelimiters:
5
7
  Enabled: false
6
-
7
- Metrics/MethodLength:
8
+ Style/ClassCheck:
9
+ EnforcedStyle: kind_of?
10
+ Style/FrozenStringLiteralComment:
8
11
  Enabled: false
9
-
10
- Metrics/ClassLength:
12
+ Style/SafeNavigation:
13
+ Enabled: false
14
+ Performance/RegexpMatch:
15
+ Enabled: false
16
+ Performance/StringReplacement:
17
+ Enabled: false
18
+ Style/RegexpLiteral:
19
+ Enabled: false
20
+ Style/NumericPredicate:
21
+ Enabled: false
22
+ Metrics/BlockLength:
23
+ Enabled: false
24
+ Metrics/ModuleLength:
25
+ Enabled: false
26
+ Style/VariableNumber:
27
+ Enabled: false
28
+ Style/MethodMissing:
29
+ Enabled: false
30
+ MultilineBlockChain:
31
+ Enabled: false
32
+ Style/NumericLiteralPrefix:
33
+ Enabled: false
34
+ Style/TernaryParentheses:
35
+ Enabled: false
36
+ Style/EmptyMethod:
37
+ Enabled: false
38
+ Style/BracesAroundHashParameters:
39
+ Enabled: false
40
+ Lint/Debugger:
41
+ Enabled: false
42
+ Lint/UselessAssignment:
43
+ Exclude:
44
+ - "**/spec/**/*"
45
+ Layout/IndentationWidth:
11
46
  Enabled: false
12
-
13
47
  Layout/IndentationConsistency:
14
48
  Enabled: false
15
-
49
+ Layout/IndentHash:
50
+ Enabled: false
16
51
  Layout/AlignHash:
17
52
  Enabled: false
18
-
53
+ Layout/DotPosition:
54
+ Enabled: false
55
+ Style/DoubleNegation:
56
+ Enabled: false
57
+ Style/SymbolArray:
58
+ Enabled: false
59
+ Layout/IndentHeredoc:
60
+ Enabled: false
61
+ Style/MixinGrouping:
62
+ Exclude:
63
+ - "**/spec/**/*"
64
+ Lint/HandleExceptions:
65
+ Enabled: false
66
+ Lint/UnusedBlockArgument:
67
+ Enabled: false
68
+ Lint/AmbiguousBlockAssociation:
69
+ Enabled: false
70
+ Style/GlobalVars:
71
+ Enabled: false
72
+ Style/ClassAndModuleChildren:
73
+ Enabled: false
74
+ Style/SpecialGlobalVars:
75
+ Enabled: false
19
76
  Metrics/AbcSize:
20
77
  Enabled: false
21
-
22
- Layout/AlignParameters:
78
+ Metrics/MethodLength:
79
+ Enabled: false
80
+ Metrics/CyclomaticComplexity:
81
+ Enabled: false
82
+ Style/WordArray:
83
+ MinSize: 19
84
+ Style/SignalException:
85
+ Enabled: false
86
+ Style/RedundantReturn:
87
+ Enabled: false
88
+ Style/IfUnlessModifier:
23
89
  Enabled: false
24
-
90
+ Style/AndOr:
91
+ Enabled: true
92
+ EnforcedStyle: conditionals
93
+ Metrics/ClassLength:
94
+ Max: 320
95
+ Metrics/LineLength:
96
+ Max: 370
97
+ Metrics/ParameterLists:
98
+ Max: 17
99
+ Metrics/PerceivedComplexity:
100
+ Max: 18
101
+ Style/GuardClause:
102
+ Enabled: false
103
+ Style/StringLiterals:
104
+ Enabled: false
105
+ Style/ConditionalAssignment:
106
+ Enabled: false
107
+ Style/RedundantSelf:
108
+ Enabled: false
109
+ Lint/UnusedMethodArgument:
110
+ Enabled: false
111
+ Lint/ParenthesesAsGroupedExpression:
112
+ Exclude:
113
+ - "**/spec/**/*"
114
+ Style/PredicateName:
115
+ Enabled: false
116
+ Style/PerlBackrefs:
117
+ Enabled: false
118
+ Layout/SpaceAroundOperators:
119
+ Exclude:
120
+ - "**/spec/actions_specs/xcodebuild_spec.rb"
121
+ AllCops:
122
+ TargetRubyVersion: 2.4
123
+ Include:
124
+ - "*/lib/assets/*Template"
125
+ - "*/lib/assets/*TemplateAndroid"
126
+ Exclude:
127
+ - "**/lib/assets/custom_action_template.rb"
128
+ - "./vendor/**/*"
129
+ - "**/lib/assets/DefaultFastfileTemplate"
130
+ - "**/lib/assets/MatchfileTemplate"
131
+ - "**/spec/fixtures/broken_files/broken_file.rb"
132
+ - "**/Rakefile"
133
+ Style/FileName:
134
+ Exclude:
135
+ - "**/Dangerfile"
136
+ - "**/Brewfile"
137
+ - "**/Gemfile"
138
+ - "**/Podfile"
139
+ - "**/Rakefile"
140
+ - "**/Fastfile"
141
+ - "**/Deliverfile"
142
+ - "**/Snapfile"
143
+ - "**/*.gemspec"
25
144
  Style/Documentation:
26
145
  Enabled: false
146
+ Style/MutableConstant:
147
+ Enabled: false
148
+ Style/ZeroLengthPredicate:
149
+ Enabled: false
150
+ Style/IfInsideElse:
151
+ Enabled: false
152
+ Style/CollectionMethods:
153
+ Enabled: false
154
+ Style/MethodCallWithArgsParentheses:
155
+ Enabled: true
156
+ IgnoredMethods:
157
+ - require
158
+ - require_relative
159
+ - fastlane_require
160
+ - gem
161
+ - program
162
+ - command
163
+ - raise
164
+ - attr_accessor
165
+ - attr_reader
166
+ - desc
167
+ - lane
168
+ - private_lane
169
+ - platform
170
+ - to
171
+ - describe
172
+ - it
173
+ - be
174
+ - context
175
+ - before
176
+ - after
177
+ - puts
178
+ - get
179
+ - post
180
+ - set
181
+ - redirect
182
+ - send_file
183
+ - example
184
+ - option
185
+ - task
186
+ - source
data/Gemfile CHANGED
@@ -1,6 +1,6 @@
1
1
  source "https://rubygems.org"
2
2
 
3
- git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
3
+ git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
4
4
 
5
5
  # Specify your gem's dependencies in skeleton.gemspec
6
6
  gemspec
@@ -36,16 +36,16 @@ module Skeleton
36
36
  open_url
37
37
  end
38
38
 
39
- def fill_html
39
+ def fill_html
40
40
  languages = ios? ? Language.all : Language.all - ['swift']
41
41
  languages.each_with_index do |lang, index|
42
42
  attach_image
43
43
  type = Language.domain(lang)
44
44
  folder = Base::PAGE_OBJECTS_FOLDER
45
45
  begin
46
- @screen_objects = File.read(Dir["#{folder}/*.#{type}"].first)
46
+ @screen_objects = File.read(Dir["#{folder}/*.#{type}"].first)
47
47
  rescue TypeError
48
- Log.warn('Failed to find any screen objects 💩') if index.zero?
48
+ Log.warn('Failed to find any screen objects 💩') if index.zero?
49
49
  end
50
50
  @elements_tree = File.read(Dir["#{folder}/*.xml"].first)
51
51
  @build_version = "v#{VERSION}"
@@ -66,19 +66,18 @@ module Skeleton
66
66
  image.rotate(90) if image.width > image.height
67
67
  rescue MiniMagick::Error => err
68
68
  Log.warn(err)
69
- ensure
70
- FileUtils.cp_r(screenshot, "#{Base::ROOT_DIR}/server/screenshot.png")
69
+ ensure
70
+ FileUtils.cp_r(screenshot, "#{Base::ROOT_DIR}/server/screenshot.png")
71
71
  end
72
72
 
73
- def open_url
73
+ def open_url
74
74
  port = File.read("#{Base::ROOT_DIR}/server/port")
75
- url = "http://localhost:#{port}/skeleton"
76
- `open #{url}` if @browser
77
- Log.info("Take a peek on #{url} 😍")
75
+ url = "http://localhost:#{port}/skeleton"
76
+ `open #{url}` if @browser
77
+ Log.info("Take a peek on #{url} 😍")
78
78
  rescue Errno::ENOENT
79
- Log.warn('Something went wrong with skeleton server 💩' \
80
- "\nTry to rerun it (:")
81
- end
79
+ Log.warn("Something went wrong with skeleton server 💩 \nTry to rerun it (:")
80
+ end
82
81
 
83
82
  def ios?
84
83
  @platform == 'ios'
@@ -173,11 +173,9 @@ class IOS < Base
173
173
 
174
174
  def check_bundle
175
175
  if @simulator
176
- return if `xcrun simctl appinfo #{@udid} #{@bundle_id}`
177
- .include?("CFBundleName")
176
+ return if `xcrun simctl appinfo #{@udid} #{@bundle_id}`.include?("CFBundleName")
178
177
  else
179
- return if `ideviceinstaller -u #{@udid} -l`
180
- .include?("#{@bundle_id},")
178
+ return if `ideviceinstaller -u #{@udid} -l`.include?("#{@bundle_id},")
181
179
  end
182
180
  Log.error("No such apps with bundle_id: #{@bundle_id}")
183
181
  end
@@ -157,4 +157,4 @@ class XCUIElement
157
157
  StatusItem: "statusItems"
158
158
  }
159
159
  end
160
- end
160
+ end
@@ -11,4 +11,4 @@ class Log
11
11
  puts "[ERROR] #{Time.now}: #{message}".colorize(:light_red)
12
12
  Process.exit(1)
13
13
  end
14
- end
14
+ end
@@ -3,4 +3,4 @@ require_relative 'version'
3
3
  class Base
4
4
  ROOT_DIR = "#{`gem environment gemdir`.strip}" \
5
5
  "/gems/#{Skeleton::GEM_NAME}-#{Skeleton::VERSION}".freeze
6
- end
6
+ end
@@ -1,4 +1,4 @@
1
1
  module Skeleton
2
- VERSION ||= '0.1.19'.freeze
2
+ VERSION ||= '0.1.20'.freeze
3
3
  GEM_NAME ||= 'skeleton-ui'.freeze
4
4
  end
@@ -6,10 +6,10 @@ require "skeleton/version"
6
6
  Gem::Specification.new do |spec|
7
7
  spec.name = Skeleton::GEM_NAME
8
8
  spec.version = Skeleton::VERSION
9
- spec.authors = ["a.alterpesotskiy"]
10
- spec.email = ["33gri@bk.ru"]
9
+ spec.authors = ["Alexey Alter-Pesotskiy", "Dmitry Shcherbakov"]
10
+ spec.email = ["a.alterpesotskiy@mail.ru"]
11
11
 
12
- spec.summary = %q{Tool for fast generating multi language page objects from iOS (device/simulator) and Android (devices/emulator) screens.}
12
+ spec.summary = "Tool for fast generating multi language page objects from iOS (device/simulator) and Android (devices/emulator) screens."
13
13
  spec.homepage = "https://github.com/forqa/skeleton"
14
14
  spec.license = "MIT"
15
15
 
@@ -24,13 +24,15 @@ Gem::Specification.new do |spec|
24
24
  spec.executables = ["skeleton"]
25
25
  spec.require_paths = ["lib"]
26
26
 
27
- spec.add_development_dependency "bundler", "~> 1.16"
28
- spec.add_development_dependency "rake", "~> 12.3.0"
29
- spec.add_development_dependency "rspec", "~> 3.7"
30
- spec.add_dependency "colorize", "~> 0.8.1"
31
- spec.add_dependency "mini_magick", "~> 4.8.0"
32
- spec.add_dependency "nokogiri", "~> 1.8.2"
33
- spec.add_dependency "sinatra", "~> 2.0.3"
34
- spec.add_dependency "fileutils"
35
- spec.add_dependency "commander"
27
+ spec.add_development_dependency("bundler")
28
+ spec.add_development_dependency("rake")
29
+ spec.add_development_dependency('fasterer', '0.8.3')
30
+ spec.add_development_dependency('rubocop', '0.49.1')
31
+ spec.add_development_dependency('rubocop-require_tools')
32
+ spec.add_dependency("colorize", "~> 0.8.1")
33
+ spec.add_dependency("mini_magick", "~> 4.9.4")
34
+ spec.add_dependency("nokogiri", "~> 1.10.8")
35
+ spec.add_dependency("sinatra", "~> 2.0.3")
36
+ spec.add_dependency("fileutils")
37
+ spec.add_dependency("commander")
36
38
  end
metadata CHANGED
@@ -1,57 +1,86 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: skeleton-ui
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.19
4
+ version: 0.1.20
5
5
  platform: ruby
6
6
  authors:
7
- - a.alterpesotskiy
7
+ - Alexey Alter-Pesotskiy
8
+ - Dmitry Shcherbakov
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
- date: 2019-10-30 00:00:00.000000000 Z
12
+ date: 2020-07-24 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: bundler
15
16
  requirement: !ruby/object:Gem::Requirement
16
17
  requirements:
17
- - - "~>"
18
+ - - ">="
18
19
  - !ruby/object:Gem::Version
19
- version: '1.16'
20
+ version: '0'
20
21
  type: :development
21
22
  prerelease: false
22
23
  version_requirements: !ruby/object:Gem::Requirement
23
24
  requirements:
24
- - - "~>"
25
+ - - ">="
25
26
  - !ruby/object:Gem::Version
26
- version: '1.16'
27
+ version: '0'
27
28
  - !ruby/object:Gem::Dependency
28
29
  name: rake
29
30
  requirement: !ruby/object:Gem::Requirement
30
31
  requirements:
31
- - - "~>"
32
+ - - ">="
32
33
  - !ruby/object:Gem::Version
33
- version: 12.3.0
34
+ version: '0'
34
35
  type: :development
35
36
  prerelease: false
36
37
  version_requirements: !ruby/object:Gem::Requirement
37
38
  requirements:
38
- - - "~>"
39
+ - - ">="
39
40
  - !ruby/object:Gem::Version
40
- version: 12.3.0
41
+ version: '0'
41
42
  - !ruby/object:Gem::Dependency
42
- name: rspec
43
+ name: fasterer
43
44
  requirement: !ruby/object:Gem::Requirement
44
45
  requirements:
45
- - - "~>"
46
+ - - '='
46
47
  - !ruby/object:Gem::Version
47
- version: '3.7'
48
+ version: 0.8.3
48
49
  type: :development
49
50
  prerelease: false
50
51
  version_requirements: !ruby/object:Gem::Requirement
51
52
  requirements:
52
- - - "~>"
53
+ - - '='
54
+ - !ruby/object:Gem::Version
55
+ version: 0.8.3
56
+ - !ruby/object:Gem::Dependency
57
+ name: rubocop
58
+ requirement: !ruby/object:Gem::Requirement
59
+ requirements:
60
+ - - '='
53
61
  - !ruby/object:Gem::Version
54
- version: '3.7'
62
+ version: 0.49.1
63
+ type: :development
64
+ prerelease: false
65
+ version_requirements: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - '='
68
+ - !ruby/object:Gem::Version
69
+ version: 0.49.1
70
+ - !ruby/object:Gem::Dependency
71
+ name: rubocop-require_tools
72
+ requirement: !ruby/object:Gem::Requirement
73
+ requirements:
74
+ - - ">="
75
+ - !ruby/object:Gem::Version
76
+ version: '0'
77
+ type: :development
78
+ prerelease: false
79
+ version_requirements: !ruby/object:Gem::Requirement
80
+ requirements:
81
+ - - ">="
82
+ - !ruby/object:Gem::Version
83
+ version: '0'
55
84
  - !ruby/object:Gem::Dependency
56
85
  name: colorize
57
86
  requirement: !ruby/object:Gem::Requirement
@@ -72,28 +101,28 @@ dependencies:
72
101
  requirements:
73
102
  - - "~>"
74
103
  - !ruby/object:Gem::Version
75
- version: 4.8.0
104
+ version: 4.9.4
76
105
  type: :runtime
77
106
  prerelease: false
78
107
  version_requirements: !ruby/object:Gem::Requirement
79
108
  requirements:
80
109
  - - "~>"
81
110
  - !ruby/object:Gem::Version
82
- version: 4.8.0
111
+ version: 4.9.4
83
112
  - !ruby/object:Gem::Dependency
84
113
  name: nokogiri
85
114
  requirement: !ruby/object:Gem::Requirement
86
115
  requirements:
87
116
  - - "~>"
88
117
  - !ruby/object:Gem::Version
89
- version: 1.8.2
118
+ version: 1.10.8
90
119
  type: :runtime
91
120
  prerelease: false
92
121
  version_requirements: !ruby/object:Gem::Requirement
93
122
  requirements:
94
123
  - - "~>"
95
124
  - !ruby/object:Gem::Version
96
- version: 1.8.2
125
+ version: 1.10.8
97
126
  - !ruby/object:Gem::Dependency
98
127
  name: sinatra
99
128
  requirement: !ruby/object:Gem::Requirement
@@ -138,13 +167,16 @@ dependencies:
138
167
  version: '0'
139
168
  description:
140
169
  email:
141
- - 33gri@bk.ru
170
+ - a.alterpesotskiy@mail.ru
142
171
  executables:
143
172
  - skeleton
144
173
  extensions: []
145
174
  extra_rdoc_files: []
146
175
  files:
176
+ - ".fasterer.yml"
147
177
  - ".githooks/commit-msg"
178
+ - ".github/pull_request_template.md"
179
+ - ".github/workflows/Test.yml"
148
180
  - ".gitignore"
149
181
  - ".rspec"
150
182
  - ".rubocop.yml"
@@ -206,7 +238,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
206
238
  - !ruby/object:Gem::Version
207
239
  version: '0'
208
240
  requirements: []
209
- rubygems_version: 3.0.4
241
+ rubygems_version: 3.0.3
210
242
  signing_key:
211
243
  specification_version: 4
212
244
  summary: Tool for fast generating multi language page objects from iOS (device/simulator)