bucky-core 0.10.2 → 0.10.3

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
  SHA1:
3
- metadata.gz: 488cb057c7c81d889aa5becb0b468ebd3238744f
4
- data.tar.gz: 52cf15eb38fbef4ac22d041ff0f6c449f024f26c
3
+ metadata.gz: eda7db7faa59516a397a5ab8ef5069f5f6dc574a
4
+ data.tar.gz: cfdb479deafb017814723644260b96b8e2be4eb1
5
5
  SHA512:
6
- metadata.gz: e08b2f6a2250463640fcf55a0448d84af4700d2ed9d244be618c795c77c6a443d296b3cbad8461b09739168bb477f16f2ce768f8169a0d3c60b1727edca51447
7
- data.tar.gz: db5bf6f19bbddc2b3011a639702f28c3d46e7a19ba319e18118c3c210df74775c01fbc86659302c1a93bbf92c273a087ccba5992b527094cf0d0f8959953ce91
6
+ metadata.gz: 6e2b86dc4ae619db0e399dfef1ab33dbe4e1f97c99072f63ec09f269c7b9747f95478b450fe7fb89be1ee173eae832ba80811a064566d607515181df53b30b62
7
+ data.tar.gz: e210b63591de2d6c54e04a03241db675033371d24eea499c5a5eb3350af165329fa7a3e3175b8a98f26f3c62ab465bb69a0d519d46beede4bf2eb4a4117b1f22
data/.circleci/config.yml CHANGED
@@ -5,7 +5,7 @@ jobs:
5
5
  steps:
6
6
  - checkout
7
7
  - restore_cache:
8
- key: docker-{{ checksum ".circleci/config.yml" }}-{{ checksum "docker-compose.system-test.yml" }}-{{ checksum "Dockerfile.system-test" }}-{{ checksum "bucky-core.gemspec" }}-{{ checksum ".dockerignore" }}
8
+ key: docker-{{ checksum ".circleci/config.yml" }}-{{ checksum "docker-compose.system-test.yml" }}-{{ checksum "Dockerfile.system-test" }}-{{ checksum "bucky-core.gemspec" }}-{{ checksum ".dockerignore" }}-{{ checksum "Gemfile.lock" }}
9
9
  - run:
10
10
  command: |
11
11
  if [ ! -f ~/caches/images.tar ]; then
@@ -14,7 +14,7 @@ jobs:
14
14
  docker save $(docker images | awk 'NR>=2 && ! /^<none>/{print $1}') -o ~/caches/images.tar
15
15
  fi
16
16
  - save_cache:
17
- key: docker-{{ checksum ".circleci/config.yml" }}-{{ checksum "docker-compose.system-test.yml" }}-{{ checksum "Dockerfile.system-test" }}-{{ checksum "bucky-core.gemspec" }}-{{ checksum ".dockerignore" }}
17
+ key: docker-{{ checksum ".circleci/config.yml" }}-{{ checksum "docker-compose.system-test.yml" }}-{{ checksum "Dockerfile.system-test" }}-{{ checksum "bucky-core.gemspec" }}-{{ checksum ".dockerignore" }}-{{ checksum "Gemfile.lock" }}
18
18
  paths: ~/caches/images.tar
19
19
  system_test:
20
20
  machine: true
@@ -22,7 +22,7 @@ jobs:
22
22
  steps:
23
23
  - checkout
24
24
  - restore_cache:
25
- key: docker-{{ checksum ".circleci/config.yml" }}-{{ checksum "docker-compose.system-test.yml" }}-{{ checksum "Dockerfile.system-test" }}-{{ checksum "bucky-core.gemspec" }}-{{ checksum ".dockerignore" }}
25
+ key: docker-{{ checksum ".circleci/config.yml" }}-{{ checksum "docker-compose.system-test.yml" }}-{{ checksum "Dockerfile.system-test" }}-{{ checksum "bucky-core.gemspec" }}-{{ checksum ".dockerignore" }}-{{ checksum "Gemfile.lock" }}
26
26
  - run:
27
27
  command: docker load -q -i ~/caches/images.tar
28
28
  - run:
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- bucky-core (0.10.1)
4
+ bucky-core (0.10.2)
5
5
  addressable (~> 2.5)
6
6
  color_echo (~> 3.1)
7
7
  json (~> 2.1)
@@ -51,7 +51,7 @@ GEM
51
51
  pry (>= 0.9.11)
52
52
  public_suffix (4.0.3)
53
53
  rainbow (3.0.0)
54
- rake (12.3.0)
54
+ rake (13.0.1)
55
55
  rspec (3.7.0)
56
56
  rspec-core (~> 3.7.0)
57
57
  rspec-expectations (~> 3.7.0)
@@ -105,7 +105,7 @@ DEPENDENCIES
105
105
  pry (~> 0.10)
106
106
  pry-byebug (~> 3.4)
107
107
  pry-stack_explorer (~> 0.4)
108
- rake (~> 12)
108
+ rake (~> 13)
109
109
  rspec (~> 3.6)
110
110
  rspec_junit_formatter (~> 0.3)
111
111
  rubocop (~> 0.63)
data/bucky-core.gemspec CHANGED
@@ -33,7 +33,7 @@ Gem::Specification.new do |spec|
33
33
  spec.add_development_dependency 'pry', '~> 0.10'
34
34
  spec.add_development_dependency 'pry-byebug', '~> 3.4'
35
35
  spec.add_development_dependency 'pry-stack_explorer', '~> 0.4'
36
- spec.add_development_dependency 'rake', '~> 12'
36
+ spec.add_development_dependency 'rake', '~> 13'
37
37
  spec.add_development_dependency 'rspec', '~> 3.6'
38
38
  spec.add_development_dependency 'rspec_junit_formatter', '~> 0.3'
39
39
  spec.add_development_dependency 'rubocop', '~> 0.63'
@@ -11,8 +11,7 @@ module Bucky
11
11
  class << self
12
12
  # Error handling on bucky framework
13
13
  # @param [Object] err exception object
14
- # @param [String] proc_name
15
- def handle(err, _proc_name)
14
+ def handle(err)
16
15
  Bucky::Utils::BuckyLogger.write(Bucky::Utils::Config.instance[:bucky_error], err)
17
16
  end
18
17
  end
@@ -20,17 +19,20 @@ module Bucky
20
19
 
21
20
  class DbConnectorException < Bucky::Core::Exception::BuckyException
22
21
  class << self
23
- def handle(err, proc_name = nil)
22
+ def handle(err)
24
23
  super
25
24
  raise err
26
25
  end
27
26
  end
28
27
  end
29
28
 
29
+ # Error handling on webdriver
30
+ # @param [Object] err exception object
31
+ # @param [String] proc_name
30
32
  class WebdriverException < Bucky::Core::Exception::BuckyException
31
33
  class << self
32
34
  def handle(err, proc_name = nil)
33
- super
35
+ super(err)
34
36
  raise err if proc_name.nil?
35
37
 
36
38
  raise(err.class, "#{err.message}\nFail in proc: ##{proc_name}")
@@ -14,11 +14,11 @@ module Bucky
14
14
  private
15
15
 
16
16
  def add_test_procedure(procedures)
17
- procedures.each.with_index(1) do |procedure, index|
17
+ procedures.each.with_index(1) do |procedure, step_number|
18
18
  procedure[:proc] ||= ''.dup
19
- puts procedure[:proc].insert(0, " #{index}:") if procedure.key?(:proc)
19
+ puts " #{step_number}:#{procedure[:proc]}"
20
20
  method = procedure[:exec].key?(:operate) ? :operate : :verify
21
- send(method, procedure)
21
+ send(method, exec: procedure[:exec], step_number: step_number)
22
22
  end
23
23
  end
24
24
 
@@ -37,13 +37,13 @@ module Bucky
37
37
  end
38
38
 
39
39
  # Call mothod of verification
40
- # @param [Hash] verify_args e.g.) {:proc=>"proc discretion", :exec=>{verify: "assert_title", expect: "page title"}}
40
+ # @param [Hash] verify_args e.g.) {:exec=>{verify: "assert_title", expect: "page title"}, :step_number=> 1}
41
41
  def verify(**verify_args)
42
42
  @service_verifications.send(verify_args[:exec][:verify], verify_args)
43
43
  end
44
44
 
45
45
  # Call method of user operation
46
- # @param [Hash] op_args e.g.){:proc=>"proc discretion", :exec=>{page: 'top_page', part: 'fizz_button', operation: 'click'}}
46
+ # @param [Hash] op_args e.g.) {:exec=>{:operate=>"click", :page=>"top_page", :part=>"fizz_button"}, :step_number=> 1}
47
47
  def operate(**op_args)
48
48
  @user_operator.send(op_args[:exec][:operate], method_name, op_args)
49
49
  end
@@ -34,7 +34,7 @@ module Bucky
34
34
  # Call method of part
35
35
  part_mothod(args[:exec]) if args[:exec].key?(:part)
36
36
  rescue StandardError => e
37
- Bucky::Core::Exception::WebdriverException.handle(e, args[:proc].strip)
37
+ Bucky::Core::Exception::WebdriverException.handle(e, "#{args[:step_number]}:#{args[:exec][:proc]}")
38
38
  end
39
39
 
40
40
  private
@@ -33,7 +33,7 @@ module Bucky
33
33
  raise StandardError, "Undefined verification method or invalid arguments. #{verification},#{args[:exec]}"
34
34
  end
35
35
  rescue StandardError => e
36
- Bucky::Core::Exception::WebdriverException.handle(e, args[:proc].strip)
36
+ Bucky::Core::Exception::WebdriverException.handle(e, "#{args[:step_number]}:#{args[:exec][:proc]}")
37
37
  end
38
38
 
39
39
  private
data/lib/bucky/version.rb CHANGED
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Bucky
4
4
  module Version
5
- VERSION = '0.10.2'
5
+ VERSION = '0.10.3'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bucky-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.2
4
+ version: 0.10.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - NaotoKishino
@@ -13,7 +13,7 @@ authors:
13
13
  autorequire:
14
14
  bindir: exe
15
15
  cert_chain: []
16
- date: 2020-02-20 00:00:00.000000000 Z
16
+ date: 2020-03-12 00:00:00.000000000 Z
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency
19
19
  name: awesome_print
@@ -105,14 +105,14 @@ dependencies:
105
105
  requirements:
106
106
  - - "~>"
107
107
  - !ruby/object:Gem::Version
108
- version: '12'
108
+ version: '13'
109
109
  type: :development
110
110
  prerelease: false
111
111
  version_requirements: !ruby/object:Gem::Requirement
112
112
  requirements:
113
113
  - - "~>"
114
114
  - !ruby/object:Gem::Version
115
- version: '12'
115
+ version: '13'
116
116
  - !ruby/object:Gem::Dependency
117
117
  name: rspec
118
118
  requirement: !ruby/object:Gem::Requirement