bdd 0.1.1 → 0.1.2

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: 96d62523ba2f4a925f77edff4755ecdd65366fa4
4
- data.tar.gz: 4656f0db02a88c730e831fc9c47a9b37ad5c4d75
3
+ metadata.gz: 34bb713fe3b685eddfc7cb24e8b81e984d5d0024
4
+ data.tar.gz: 075cce69b3f4dbf565853f8401e245c1e926f7f2
5
5
  SHA512:
6
- metadata.gz: c75e32f3ac7a622da627bee46fc2e7c8db0925dcc282875d98235e775a59836dd9e1b7ce40d5423770414a8175087c86d2742a4c32062c5af51e8d2fcb5c1f5b
7
- data.tar.gz: 760b7ffd65cad16f9cc88f9c3ed929e8ac55da0ae404ee26ddbca67fb3eb67eedf6854f4141574520870461d66f7f2b86c5c7eba2e68db5e0b01d286340ef02b
6
+ metadata.gz: 87f7b39fcb22fd64328c885a98e9d4905709247031ef628c836d02f0d372cb8179602bc9788bea54ced0244278a2aa3aab522f9f3d36fb0cb263e4a8a082b3c6
7
+ data.tar.gz: 4157780c2d473570bb3b0775abb4a8e9be4f1e9885c86fe0ac967cf1380f8890bfb8117fdf0872d7faf1b40f4bcf8b6a48020c8a27cf6f9b21772a728d2ebb35
data/lib/bdd.rb CHANGED
@@ -3,10 +3,15 @@ module Bdd
3
3
  autoload :Colors, 'bdd/colors'
4
4
  autoload :StringBuilder, 'bdd/string_builder'
5
5
  autoload :Title, 'bdd/title'
6
- autoload :Check, 'bdd/check'
7
6
  end
8
7
 
9
8
  require "bdd/version"
10
9
  require "bdd/class_methods"
11
10
 
12
- Bdd::Check.new
11
+ if defined?(::RSpec) && not defined?(Bdd::RSpec)
12
+ require 'bdd/rspec'
13
+ end
14
+
15
+ if defined?(::Minitest) && not defined?(Bdd::Minitest)
16
+ require 'bdd/minitest'
17
+ end
@@ -1,3 +1,3 @@
1
1
  module Bdd
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bdd
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Pinto
@@ -83,7 +83,6 @@ files:
83
83
  - lib/bdd/adapters/base.rb
84
84
  - lib/bdd/adapters/minitest_adapter.rb
85
85
  - lib/bdd/adapters/rspec_adapter.rb
86
- - lib/bdd/check.rb
87
86
  - lib/bdd/class_methods.rb
88
87
  - lib/bdd/colors.rb
89
88
  - lib/bdd/minitest.rb
@@ -1,50 +0,0 @@
1
- module Bdd
2
- class Check
3
-
4
- def initialize
5
- if not $SKIP_BDD_CHECK === true
6
- if not has_loaded_with_a_test_framework?
7
- print_out
8
- fail SyntaxError, "Update your Gemfile"
9
- end
10
- end
11
- end
12
-
13
- private
14
-
15
- def has_loaded_with_a_test_framework?
16
- rspec? || minitest?
17
- end
18
-
19
- def rspec?
20
- defined? Bdd::RSpec
21
- end
22
-
23
- def minitest?
24
- defined? Bdd::Minitest
25
- end
26
-
27
- def print_out
28
- 5.times { puts }
29
-
30
- print Colors.add("Please edit your ", :red)
31
- print Colors.add("Gemfile ", :yellow)
32
- puts Colors.add("to", :red)
33
- puts
34
- if rspec?
35
- puts Colors.add("gem 'bdd', require: 'bdd/rspec' ", :light_white)
36
- elsif minitest?
37
- puts Colors.add("gem 'bdd', require: 'bdd/minitest' ", :light_white)
38
- else
39
- fail "This was not supposed to happen"
40
- end
41
- puts
42
-
43
- print Colors.add("LEARN MORE AT ", :red)
44
- puts Colors.add("https://github.com/thejamespinto/bdd", :light_green)
45
-
46
- 5.times { puts }
47
- end
48
-
49
- end
50
- end