tdd 2.0.6 → 2.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 368f3daf06021715572401b871159494120b9318
4
+ data.tar.gz: ab3d9e08925f88bc210a6251c5377aa8e5a97231
5
+ SHA512:
6
+ metadata.gz: edb70357deb6fea4f7e4674e9ecc54153682461d33c20602bf4b1e3c1342c9591399ddd5d3332fc8ac1ce16c283080b8ae1bf78584ea1bff35a7b3df5f429474
7
+ data.tar.gz: f0d008a084a7c111f50b6a62b0f5cc388716786945fe453bdde30bce13e586760a354b9ef35d3ff69ceaf2fee0f4925aa06dbca47802babeefd6200f19b84de0
data/bin/tdd CHANGED
@@ -7,6 +7,7 @@ require 'ruby_gntp'
7
7
  # You can find the source here: http://github.com/ahoward/rego.
8
8
 
9
9
  Main {
10
+ version Tdd::VERSION
10
11
 
11
12
  name <<-__
12
13
 
@@ -112,6 +113,12 @@ In Growl's preferences you can enable/disable both 'passed' and 'failed' notifs.
112
113
  description "Don't watch files/dirs if they are ignored by git. Defaults to true."
113
114
  }
114
115
 
116
+ option('no-bundle'){
117
+ default false
118
+ cast :boolean
119
+ description "Skip running tests with `bundle exec` if Gemfile found in current directory"
120
+ }
121
+
115
122
  def run
116
123
  print_usage_and_exit if ARGV.empty?
117
124
  parse_options
@@ -139,11 +146,12 @@ In Growl's preferences you can enable/disable both 'passed' and 'failed' notifs.
139
146
  def parse_options
140
147
  @gitignore = params['gitignore'].value
141
148
  @use_growl = params['growl'].value
149
+ @no_bundle = params['no-bundle'].value
142
150
  ARGV.delete_if{|arg| arg =~ /--gitignore.*|--growl.*/}
143
151
  end
144
152
 
145
153
  def parse_the_command_line
146
- @paths, @command = Tdd::CommandLineParser.parse
154
+ @paths, @command = Tdd::CommandLineParser.parse(@no_bundle)
147
155
  @paths = %w[.] if @paths.empty?
148
156
  expand_all_file_paths_in_array(@paths)
149
157
 
@@ -1,12 +1,13 @@
1
1
  class Tdd::CommandLineParser
2
- def self.parse
3
- parser = self.new
2
+ def self.parse(no_bundle=false)
3
+ parser = self.new(no_bundle)
4
4
  [parser.paths.flatten, parser.test_command]
5
5
  end
6
6
 
7
7
  attr_accessor :paths, :test_framework
8
8
 
9
- def initialize
9
+ def initialize(no_bundle=false)
10
+ @no_bundle = no_bundle
10
11
  pos = ARGV.index('--')
11
12
  if pos
12
13
  @paths = ARGV[0 ... pos]
@@ -23,7 +24,9 @@ class Tdd::CommandLineParser
23
24
  end
24
25
 
25
26
  def test_command
26
- "#{@test_framework} #{@test_args}"
27
+ command = "#{@test_framework} #{@test_args}"
28
+ command.prepend("bundle exec ") if bundle_exec?
29
+ command
27
30
  end
28
31
 
29
32
  private
@@ -69,4 +72,9 @@ class Tdd::CommandLineParser
69
72
  exit_if_no_test_framework
70
73
  end
71
74
  end
75
+
76
+ def bundle_exec?
77
+ return false if @no_bundle
78
+ Dir.glob("Gemfile*").any?
79
+ end
72
80
  end
@@ -1,3 +1,3 @@
1
1
  module Tdd
2
- VERSION = "2.0.6"
2
+ VERSION = "2.1.0"
3
3
  end
metadata CHANGED
@@ -1,62 +1,55 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tdd
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.6
5
- prerelease:
4
+ version: 2.1.0
6
5
  platform: ruby
7
6
  authors:
8
7
  - Tyler Montgomery
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2014-04-15 00:00:00.000000000 Z
11
+ date: 2015-03-02 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: main
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ~>
17
+ - - "~>"
20
18
  - !ruby/object:Gem::Version
21
19
  version: '5.0'
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
- - - ~>
24
+ - - "~>"
28
25
  - !ruby/object:Gem::Version
29
26
  version: '5.0'
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: rb-fsevent
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
- - - ~>
31
+ - - "~>"
36
32
  - !ruby/object:Gem::Version
37
33
  version: '0.9'
38
34
  type: :runtime
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
- - - ~>
38
+ - - "~>"
44
39
  - !ruby/object:Gem::Version
45
40
  version: '0.9'
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: ruby_gntp
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
- - - ! '>='
45
+ - - ">="
52
46
  - !ruby/object:Gem::Version
53
47
  version: '0'
54
48
  type: :runtime
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
51
  requirements:
59
- - - ! '>='
52
+ - - ">="
60
53
  - !ruby/object:Gem::Version
61
54
  version: '0'
62
55
  description: Fire up that tdd loop
@@ -67,8 +60,8 @@ executables:
67
60
  extensions: []
68
61
  extra_rdoc_files: []
69
62
  files:
70
- - .gitignore
71
- - .rvmrc
63
+ - ".gitignore"
64
+ - ".rvmrc"
72
65
  - Gemfile
73
66
  - LICENSE
74
67
  - README.md
@@ -80,26 +73,25 @@ files:
80
73
  - tdd.gemspec
81
74
  homepage: ''
82
75
  licenses: []
76
+ metadata: {}
83
77
  post_install_message:
84
78
  rdoc_options: []
85
79
  require_paths:
86
80
  - lib
87
81
  required_ruby_version: !ruby/object:Gem::Requirement
88
- none: false
89
82
  requirements:
90
- - - ! '>='
83
+ - - ">="
91
84
  - !ruby/object:Gem::Version
92
85
  version: '0'
93
86
  required_rubygems_version: !ruby/object:Gem::Requirement
94
- none: false
95
87
  requirements:
96
- - - ! '>='
88
+ - - ">="
97
89
  - !ruby/object:Gem::Version
98
90
  version: '0'
99
91
  requirements: []
100
92
  rubyforge_project:
101
- rubygems_version: 1.8.23
93
+ rubygems_version: 2.2.2
102
94
  signing_key:
103
- specification_version: 3
95
+ specification_version: 4
104
96
  summary: ''
105
97
  test_files: []