cadre 0.2.3 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +6 -14
- data/default_files/templates/rspec3-config +12 -0
- data/doc/vim-coverage.png +0 -0
- data/lib/cadre/command-line.rb +21 -2
- data/spec/simplecov/formatter.rb +9 -8
- metadata +17 -11
checksums.yaml
CHANGED
@@ -1,15 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
metadata.gz: !binary |-
|
9
|
-
OGE3ZDA3MTg1MDMxMzAzMDQ0MmQ1NzQ5MjVmMjU5ZmE2ZmFmNzA1ZDYyMTQ1
|
10
|
-
OTViNzcwMDU0Yjc4NmExNDQ5YWM5MjU4YWVmMWZlYmU3MzM0NTY5ZDEzMjE4
|
11
|
-
NzJjMzZiOWUwYThhNTA2Y2EwYzhlYTAzOThhNDQ4N2YwNGI2OGM=
|
12
|
-
data.tar.gz: !binary |-
|
13
|
-
MjBjZGQwZWU0NGQwMjAzZTdjMDMwNTg1ZTQxYTFiNjE5Mjc2NjRlNDAyMTQ0
|
14
|
-
MGZjNDIxNTRkM2FjNDZjZjRhODY1ZjFhYTc4ODBkYWRhYjk5OGI2MThlODNl
|
15
|
-
YmYzZTk5ZDYxMDkyMzIzNzNkMzM1NTIxMjVmOTA5YmU4M2VkODM=
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: a9e2122d49a1283dd0fb1b8689e442a7aadd5295
|
4
|
+
data.tar.gz: 135da7249f117d1ac890d667345174ed9d8141a8
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: b3850022b7425a780e6909c8424fb01eb0678afdae67d2f23d23de816c1c837a0c031b0fc61b8bc8bb3096760a6c6fa0bdba67936194b5d76c9a97f5898da2d8
|
7
|
+
data.tar.gz: 6e3ef88ff40578b282457560312d48824a0d80ca82ed44aa7b9a26b28a7a15efa0494f06677c39d6c1bcaad0970fde55d7ae775a9a42364ab716fb014b8489fa
|
@@ -0,0 +1,12 @@
|
|
1
|
+
require 'cadre/rspec3'
|
2
|
+
|
3
|
+
RSpec.configure do |config|
|
4
|
+
config.run_all_when_everything_filtered = true
|
5
|
+
if config.formatters.empty?
|
6
|
+
config.add_formatter(:progress)
|
7
|
+
#but do consider:
|
8
|
+
#config.add_formatter(Cadre::RSpec3::TrueFeelingsFormatter)
|
9
|
+
end
|
10
|
+
config.add_formatter(Cadre::RSpec3::NotifyOnCompleteFormatter)
|
11
|
+
config.add_formatter(Cadre::RSpec3::QuickfixFormatter)
|
12
|
+
end
|
Binary file
|
data/lib/cadre/command-line.rb
CHANGED
@@ -5,16 +5,23 @@ module Cadre
|
|
5
5
|
class CommandLine < Thor
|
6
6
|
desc "how_to", "Short guide on usage"
|
7
7
|
def how_to
|
8
|
+
indent= " "
|
8
9
|
command_name = File::basename($0)
|
9
|
-
|
10
|
+
help_text = <<-EOH
|
10
11
|
This is a set of tools for aiding development - to integrate testing and
|
11
12
|
metrics with editors and notifications.
|
12
13
|
|
13
14
|
Try:
|
14
15
|
#{command_name} vim_plugin > ~/.vim/plugin/cadre.vim
|
16
|
+
|
15
17
|
#{command_name} rspec_config >> spec/spec_helper.rb
|
18
|
+
or
|
19
|
+
#{command_name} rspec3_config >> spec/spec_helper.rb
|
20
|
+
|
16
21
|
#{command_name} simplecov_config >> .simplecov
|
22
|
+
|
17
23
|
echo errors.err >> .gitignore
|
24
|
+
|
18
25
|
echo .cadre >> .gitignore
|
19
26
|
|
20
27
|
Yeah, that's five commands, and you have to do the redirects yourself,
|
@@ -22,8 +29,10 @@ module Cadre
|
|
22
29
|
somewhere else if that's what you want. (I'm considering a single command for all of it...)
|
23
30
|
|
24
31
|
Configuration (including tool config templates) is sourced from:
|
25
|
-
#{Valise.to_s("\n
|
32
|
+
#{Valise.to_s("\n#{indent} ")}
|
26
33
|
EOH
|
34
|
+
|
35
|
+
puts help_text.gsub(/^#{indent}/, "")
|
27
36
|
end
|
28
37
|
|
29
38
|
desc "vim_plugin", "Outputs plugin for vim"
|
@@ -36,6 +45,16 @@ module Cadre
|
|
36
45
|
puts Valise.find("templates/rspec-config").contents
|
37
46
|
end
|
38
47
|
|
48
|
+
desc "rspec2_config","Outputs RSpec config"
|
49
|
+
def rspec2_config
|
50
|
+
puts Valise.find("templates/rspec-config").contents
|
51
|
+
end
|
52
|
+
|
53
|
+
desc "rspec3_config","Outputs RSpec 3.0 config"
|
54
|
+
def rspec3_config
|
55
|
+
puts Valise.find("templates/rspec3-config").contents
|
56
|
+
end
|
57
|
+
|
39
58
|
desc "simplecov_config", "Outputs Simplecov config"
|
40
59
|
def simplecov_config
|
41
60
|
puts Valise.find("templates/simplecov-config").contents
|
data/spec/simplecov/formatter.rb
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
require 'simplecov'
|
2
|
-
require '
|
2
|
+
require 'file-sandbox'
|
3
|
+
require 'cadre/simplecov/vim-formatter'
|
3
4
|
|
4
|
-
describe SimpleCov::
|
5
|
+
describe Cadre::SimpleCov::VimFormatter do
|
5
6
|
include FileSandbox
|
6
7
|
|
7
8
|
let :files do
|
@@ -20,7 +21,7 @@ describe SimpleCov::Formatter::VimFormatter do
|
|
20
21
|
end
|
21
22
|
|
22
23
|
let :formatter do
|
23
|
-
|
24
|
+
described_class.new
|
24
25
|
end
|
25
26
|
|
26
27
|
it "should have an original result with absolute paths" do
|
@@ -31,13 +32,13 @@ describe SimpleCov::Formatter::VimFormatter do
|
|
31
32
|
|
32
33
|
it "should produce a vimscript" do
|
33
34
|
formatter.format(result)
|
34
|
-
File::exists?("coverage.vim").should be_true
|
35
|
+
File::exists?(".cadre/coverage.vim").should be_true
|
35
36
|
|
36
|
-
|
37
|
-
|
38
|
-
|
37
|
+
File::open(".cadre/coverage.vim") do |scriptfile|
|
38
|
+
lines = scriptfile.each_line
|
39
|
+
lines.grep(/(['"])pretend_file\1/).should_not == []
|
39
40
|
scriptfile.rewind
|
40
|
-
|
41
|
+
lines.grep(%r[(['"])nested/pretend_file\1]).should_not == []
|
41
42
|
end
|
42
43
|
end
|
43
44
|
end
|
metadata
CHANGED
@@ -1,20 +1,20 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cadre
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Judson Lester
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-06-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - '>='
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: 0.18.1
|
20
20
|
- - <
|
@@ -24,7 +24,7 @@ dependencies:
|
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
26
26
|
requirements:
|
27
|
-
- -
|
27
|
+
- - '>='
|
28
28
|
- !ruby/object:Gem::Version
|
29
29
|
version: 0.18.1
|
30
30
|
- - <
|
@@ -58,15 +58,19 @@ dependencies:
|
|
58
58
|
- - ~>
|
59
59
|
- !ruby/object:Gem::Version
|
60
60
|
version: '1.0'
|
61
|
-
description:
|
62
|
-
|
63
|
-
|
61
|
+
description: |2
|
62
|
+
Three things:
|
63
|
+
|
64
|
+
An rspec formatter that triggers libnotify on completion.
|
65
|
+
An rspec formatter that outputs to vim quickfix
|
66
|
+
A simplecov formatter that produces vim markers (+ a vim plugin to load them)
|
64
67
|
email:
|
65
68
|
- nyarly@gmail.com
|
66
69
|
executables:
|
67
70
|
- cadre
|
68
71
|
extensions: []
|
69
|
-
extra_rdoc_files:
|
72
|
+
extra_rdoc_files:
|
73
|
+
- doc/vim-coverage.png
|
70
74
|
files:
|
71
75
|
- default_files/config.yaml
|
72
76
|
- default_files/sounds/error
|
@@ -76,6 +80,7 @@ files:
|
|
76
80
|
- default_files/templates/coverage-results.vim.erb
|
77
81
|
- default_files/templates/simplecov-config
|
78
82
|
- default_files/templates/rspec-config
|
83
|
+
- default_files/templates/rspec3-config
|
79
84
|
- lib/cadre/libnotify/notifier.rb
|
80
85
|
- lib/cadre/growl/notifier.rb
|
81
86
|
- lib/cadre/rspec.rb
|
@@ -91,6 +96,7 @@ files:
|
|
91
96
|
- bin/cadre
|
92
97
|
- spec/simplecov/formatter.rb
|
93
98
|
- spec_help/gem_test_suite.rb
|
99
|
+
- doc/vim-coverage.png
|
94
100
|
homepage: http://nyarly.github.com/cadre
|
95
101
|
licenses:
|
96
102
|
- MIT
|
@@ -101,17 +107,17 @@ rdoc_options:
|
|
101
107
|
- --main
|
102
108
|
- doc/README
|
103
109
|
- --title
|
104
|
-
- cadre-0.
|
110
|
+
- cadre-0.3.0 Documentation
|
105
111
|
require_paths:
|
106
112
|
- lib/
|
107
113
|
required_ruby_version: !ruby/object:Gem::Requirement
|
108
114
|
requirements:
|
109
|
-
- -
|
115
|
+
- - '>='
|
110
116
|
- !ruby/object:Gem::Version
|
111
117
|
version: '0'
|
112
118
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
113
119
|
requirements:
|
114
|
-
- -
|
120
|
+
- - '>='
|
115
121
|
- !ruby/object:Gem::Version
|
116
122
|
version: '0'
|
117
123
|
requirements: []
|