approvals 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- data/.travis.yml +2 -0
- data/approvals.gemspec +4 -1
- data/lib/approvals.rb +2 -0
- data/lib/approvals/rspec.rb +2 -1
- data/lib/approvals/utilities/cli.rb +2 -2
- data/lib/approvals/utilities/executable.rb +4 -0
- data/lib/approvals/version.rb +3 -0
- data/lib/approvals/writers/json_writer.rb +0 -2
- data/spec/approvals_spec.rb +4 -1
- data/spec/extensions/rspec_approvals_spec.rb +0 -1
- data/spec/namers/default_namer_spec.rb +1 -1
- data/spec/namers/directory_namer_spec.rb +1 -0
- data/spec/namers_spec.rb +1 -0
- metadata +20 -8
data/.travis.yml
CHANGED
data/approvals.gemspec
CHANGED
@@ -1,9 +1,11 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
2
|
$:.push File.expand_path("../lib", __FILE__)
|
3
3
|
|
4
|
+
require 'approvals/version'
|
5
|
+
|
4
6
|
Gem::Specification.new do |s|
|
5
7
|
s.name = "approvals"
|
6
|
-
s.version =
|
8
|
+
s.version = Approvals::VERSION
|
7
9
|
s.authors = ["Katrina Owen"]
|
8
10
|
s.email = ["katrina.owen@gmail.com"]
|
9
11
|
s.homepage = ""
|
@@ -18,6 +20,7 @@ Gem::Specification.new do |s|
|
|
18
20
|
s.require_paths = ["lib"]
|
19
21
|
|
20
22
|
s.add_development_dependency 'rspec', '~> 2.9'
|
23
|
+
s.add_development_dependency 'json'
|
21
24
|
s.add_dependency 'thor'
|
22
25
|
s.add_dependency 'nokogiri'
|
23
26
|
end
|
data/lib/approvals.rb
CHANGED
data/lib/approvals/rspec.rb
CHANGED
@@ -4,8 +4,8 @@ module Approvals
|
|
4
4
|
class CLI < Thor
|
5
5
|
|
6
6
|
desc "verify", "Go through all failing approvals with a diff tool"
|
7
|
-
method_option :diff, :type => :string, :default => '
|
8
|
-
method_option :ask, :type => :boolean, :default =>
|
7
|
+
method_option :diff, :type => :string, :default => 'diff', :aliases => '-d', :desc => 'The difftool to use. e.g. opendiff, vimdiff, etc.'
|
8
|
+
method_option :ask, :type => :boolean, :default => true, :aliases => "-a", :desc => 'Offer to approve the received file for you.'
|
9
9
|
def verify
|
10
10
|
approvals = File.read('.approvals').split("\n")
|
11
11
|
|
data/spec/approvals_spec.rb
CHANGED
@@ -6,7 +6,10 @@ describe Approvals do
|
|
6
6
|
let(:namer) { Approvals::Namers::RSpecNamer.new(self.example) }
|
7
7
|
|
8
8
|
it "fails" do
|
9
|
-
|
9
|
+
Approvals::Dotfile.stub(:path => '/dev/null')
|
10
|
+
lambda {
|
11
|
+
Approvals.verify "this one doesn't exist", :namer => namer
|
12
|
+
}.should raise_error Approvals::ApprovalError
|
10
13
|
end
|
11
14
|
|
12
15
|
it "verifies a string" do
|
@@ -29,7 +29,7 @@ describe Approvals::Namers::DefaultNamer do
|
|
29
29
|
end
|
30
30
|
|
31
31
|
it "must have a name" do
|
32
|
-
|
32
|
+
lambda { Approvals::Namers::DefaultNamer.new(nil) }.should raise_error(ArgumentError)
|
33
33
|
end
|
34
34
|
|
35
35
|
end
|
data/spec/namers_spec.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: approvals
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-08-29 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rspec
|
16
|
-
requirement: &
|
16
|
+
requirement: &70197693976720 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
@@ -21,10 +21,21 @@ dependencies:
|
|
21
21
|
version: '2.9'
|
22
22
|
type: :development
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70197693976720
|
25
|
+
- !ruby/object:Gem::Dependency
|
26
|
+
name: json
|
27
|
+
requirement: &70197693976000 !ruby/object:Gem::Requirement
|
28
|
+
none: false
|
29
|
+
requirements:
|
30
|
+
- - ! '>='
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '0'
|
33
|
+
type: :development
|
34
|
+
prerelease: false
|
35
|
+
version_requirements: *70197693976000
|
25
36
|
- !ruby/object:Gem::Dependency
|
26
37
|
name: thor
|
27
|
-
requirement: &
|
38
|
+
requirement: &70197693975480 !ruby/object:Gem::Requirement
|
28
39
|
none: false
|
29
40
|
requirements:
|
30
41
|
- - ! '>='
|
@@ -32,10 +43,10 @@ dependencies:
|
|
32
43
|
version: '0'
|
33
44
|
type: :runtime
|
34
45
|
prerelease: false
|
35
|
-
version_requirements: *
|
46
|
+
version_requirements: *70197693975480
|
36
47
|
- !ruby/object:Gem::Dependency
|
37
48
|
name: nokogiri
|
38
|
-
requirement: &
|
49
|
+
requirement: &70197693975040 !ruby/object:Gem::Requirement
|
39
50
|
none: false
|
40
51
|
requirements:
|
41
52
|
- - ! '>='
|
@@ -43,7 +54,7 @@ dependencies:
|
|
43
54
|
version: '0'
|
44
55
|
type: :runtime
|
45
56
|
prerelease: false
|
46
|
-
version_requirements: *
|
57
|
+
version_requirements: *70197693975040
|
47
58
|
description: Approval Tests for Ruby
|
48
59
|
email:
|
49
60
|
- katrina.owen@gmail.com
|
@@ -89,6 +100,7 @@ files:
|
|
89
100
|
- lib/approvals/utilities/executable.rb
|
90
101
|
- lib/approvals/utilities/scrubber.rb
|
91
102
|
- lib/approvals/utilities/system_command.rb
|
103
|
+
- lib/approvals/version.rb
|
92
104
|
- lib/approvals/writer.rb
|
93
105
|
- lib/approvals/writers/array_writer.rb
|
94
106
|
- lib/approvals/writers/hash_writer.rb
|