cukestep 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3ffcdbafa813ddd9c787be768ab2a345968d5050
4
- data.tar.gz: 753c807017518a30ce63fb4e6077307ed9082dc9
3
+ metadata.gz: 050001db29943db7e0052fa04624f6deec16eb8a
4
+ data.tar.gz: 3eee80a7f09c0933c5e454d63e6b16cff3227b29
5
5
  SHA512:
6
- metadata.gz: e6d8aa6d17915a892aac3e6f4a5f8becb61d764483855173c97489b976cc4ef0b61a4468534e4568f306011f66dae424d0120a759574d098cdcf66a76590f025
7
- data.tar.gz: bf165a6e8fcb56e3383fe1f58b18c5a7da6b87e33fbfc660f8b7a1110198ce7915be94289bf2baa02d7b8ffe794f7d07db5f31a4fc94b02765f449189b6da637
6
+ metadata.gz: f6cd1f42c88463c8d36d1d8f8b04a064946dae7d7aaba2d3129343777a7a12f9c947e735a1bf801fd3d5c1024ef8b1cd22af4dfc8fdbf654ff3827d11ddd0ec9
7
+ data.tar.gz: a11bdc45f140c8c7d0977245fc91ea853abe4c9f7d640f4a13536ae97bd24659a87f3004ee10da52047c7c7f228a489aea3793f82005e6b3ae62ec3a2659946e
data/README.md CHANGED
@@ -33,17 +33,13 @@ At this point - you should be seeing a JSON output of your Gherkin steps.
33
33
 
34
34
  *Rails*
35
35
 
36
- To exclude a support file from the autoload path, create an initializer class and redefine `excluded_code_file_paths`.
36
+ To exclude a support file from the autoload path, create an initializer class and tell Cukestep which files to exclude.
37
37
 
38
38
  ```ruby
39
39
  # #{Rails.root}/config/initializers/cukestep_config.rb
40
- class CukestepConfig < Cukestep::Configuration
41
- def excluded_code_file_paths
42
- ['features/support/extranet.rb']
43
- end
40
+ Cukestep.configure do |c|
41
+ c.excluded_code_file_paths = ['features/support/extranet.rb']
44
42
  end
45
-
46
- Cukestep.config = CukestepConfig.new
47
43
  ```
48
44
 
49
45
  *Browser*
data/lib/cukestep.rb CHANGED
@@ -7,10 +7,14 @@ module Cukestep
7
7
  autoload :VERSION, "cukestep/version"
8
8
 
9
9
  def self.config
10
- @config ||= Configuration.new
10
+ @config ||= Configuration.default_configuration
11
11
  end
12
12
 
13
13
  def self.config=(config)
14
14
  @config = config
15
15
  end
16
+
17
+ def self.configure
18
+ yield config if block_given?
19
+ end
16
20
  end
@@ -1,3 +1,5 @@
1
+ require 'capybara'
2
+
1
3
  module Cukestep
2
4
  class Capybara
3
5
 
@@ -1,16 +1,16 @@
1
1
  module Cukestep
2
2
  class Configuration
3
3
 
4
- def autoload_code_paths
5
- ['features/support', 'features/step_definitions']
6
- end
7
-
8
- def default_excluded_file_paths
9
- ['features/support/env.rb']
10
- end
4
+ attr_accessor :autoload_code_paths
5
+ attr_accessor :default_excluded_file_paths
6
+ attr_accessor :excluded_code_file_paths
11
7
 
12
- def excluded_code_file_paths
13
- []
8
+ def self.default_configuration
9
+ Configuration.new.tap do |c|
10
+ c.autoload_code_paths = ['features/support', 'features/step_definitions']
11
+ c.default_excluded_file_paths = ['features/support/env.rb']
12
+ c.excluded_code_file_paths = []
13
+ end
14
14
  end
15
15
 
16
16
  def cucumber_load_paths
@@ -1,3 +1,5 @@
1
+ require 'cucumber'
2
+
1
3
  module Cukestep
2
4
  class Cucumber
3
5
 
@@ -1,3 +1,3 @@
1
1
  module Cukestep
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cukestep
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adrian CB