lopata 0.1.12 → 0.1.13

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: 65f89b815ebe8514f78c803eab2bd2ece867e9fcdc9c28c178a721d717fd0341
4
- data.tar.gz: c418371982133703b0b97921fd870937052854e6975b4bb47f664105c56ed6b6
3
+ metadata.gz: 19371c76dcc39807c50470e95f365a09c1c33a8193a25b9d98d4d5648f5eaa59
4
+ data.tar.gz: 25c3b8ea2efe44f5cf31f51cea04aa05f2ea35f364ed2167f9cdd466fa6a5e46
5
5
  SHA512:
6
- metadata.gz: d54572c90bfdaea0aa91747541016d0d0b1ac1710a9d9a54c8278861643a07f5a8ea7157206a85cbaf3f3986c0dbabd14bfa741a5ce7eb7deb6bd2917d2d6b89
7
- data.tar.gz: 3d82e45bd0fd6c2901c65a4a07437a27df8b8367e1682a67b191f4829bb6bf2a11b583f319804e560e08774f806c675d82547bdb87fec623a1d6fb143d9d2b72
6
+ metadata.gz: 7b7378f73bd4fe3c7ce18bcd7e7a0d5f45b05cafac689d764ad3030f879ad1e0c1843e67ddd886ba68643632c33eea9824efbe0b370dea76fe911e03d95fc355
7
+ data.tar.gz: af7ba11d74022ab03a11a62bec31291edba71e6b5c93f1229b765a159e2ce3d14813af5f2967c1d054d7f5e2fc656b593bdce876fbcb9a03cade19a0fbcb3753
data/lib/lopata/loader.rb CHANGED
@@ -5,24 +5,28 @@ module Lopata::Loader
5
5
  # Loads scenarios for running in current session
6
6
  #
7
7
  # @param args [Array<String>] files to be load.
8
+ # Mask (e. g. 'scenarios/**/*.rb') is can be passed as well.
8
9
  # All files from default location to be loaded if empty.
9
10
  def load_scenarios(*args)
10
11
  if args.empty?
11
12
  load_all_scenarios
12
13
  else
13
- args.each do |file|
14
- load File.expand_path(file)
15
- end
14
+ args.each(&method(:load_by_mask))
16
15
  end
17
16
  end
18
17
 
19
18
  # Loads all scenarios from predefined paths
20
19
  def load_all_scenarios
21
- Dir["scenarios/**/*.rb"].each { |f| load File.expand_path(f) }
20
+ load_by_mask "scenarios/**/*.rb"
22
21
  end
23
22
 
24
23
  # Loads all shared steps from predefined paths
25
24
  def load_shared_steps
26
- Dir["shared_steps/**/*rb"].each { |f| load File.expand_path(f) }
25
+ load_by_mask "shared_steps/**/*rb"
26
+ end
27
+
28
+ # @private
29
+ def load_by_mask(mask)
30
+ Dir[mask].each { |f| load File.expand_path(f) }
27
31
  end
28
32
  end
@@ -1,6 +1,6 @@
1
1
  module Lopata
2
2
  # @private
3
3
  module Version
4
- STRING = '0.1.12'
4
+ STRING = '0.1.13'
5
5
  end
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lopata
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.12
4
+ version: 0.1.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexey Volochnev
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-01-23 00:00:00.000000000 Z
11
+ date: 2021-03-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty
@@ -138,5 +138,5 @@ requirements: []
138
138
  rubygems_version: 3.0.3
139
139
  signing_key:
140
140
  specification_version: 4
141
- summary: lopata-0.1.12
141
+ summary: lopata-0.1.13
142
142
  test_files: []