buff-ignore 1.1.0 → 1.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 +7 -0
- data/.travis.yml +0 -2
- data/CHANGELOG.md +6 -0
- data/Gemfile +1 -10
- data/Rakefile +6 -17
- data/lib/buff/ignore/ignore_file.rb +2 -2
- data/lib/buff/ignore/version.rb +1 -1
- data/spec/lib/errors_spec.rb +6 -2
- data/spec/lib/ignore_file_spec.rb +8 -0
- metadata +9 -22
- data/Guardfile +0 -25
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 0f856a03553dadb86d93d2fec36b5d8d8831c4f9
|
4
|
+
data.tar.gz: aec38fe3c1bb61055ebd5216e1dea626d949d57e
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 1f6a020052cf1a01482ed65d069f1ee6e9196a9322b004a75f8d5096b406416a560e87aae018232e792c19f973e8f713db04f2b181f862d04b3af4b9f4b7cd3e
|
7
|
+
data.tar.gz: 951a1eacb54c9c6aae8d593114b4224d873121b29de75aac4beb7de3a60e51486186302df7fa94712e93ed5b0c39364437819c20759bb406324652b49647157e
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
data/Gemfile
CHANGED
@@ -2,15 +2,6 @@ source 'https://rubygems.org'
|
|
2
2
|
gemspec
|
3
3
|
|
4
4
|
group :workstation do
|
5
|
-
gem 'fuubar', '~> 1.1'
|
6
|
-
|
7
|
-
gem 'guard', '~> 1.8'
|
8
|
-
gem 'guard-cane', '~> 0.1'
|
9
|
-
gem 'guard-bundler', '~> 1.0'
|
10
|
-
gem 'guard-rspec', '~> 3.0'
|
11
|
-
gem 'guard-spork', '~> 1.5'
|
12
|
-
gem 'guard-yard', '~> 2.1'
|
13
|
-
|
14
5
|
gem 'yard', '~> 0.8'
|
15
|
-
gem 'redcarpet', '~>
|
6
|
+
gem 'redcarpet', '~> 3.0'
|
16
7
|
end
|
data/Rakefile
CHANGED
@@ -1,21 +1,10 @@
|
|
1
1
|
require 'bundler/gem_tasks'
|
2
|
-
|
3
2
|
require 'rspec/core/rake_task'
|
4
|
-
require 'cane/rake_task'
|
5
|
-
|
6
|
-
namespace :test do
|
7
|
-
desc 'Run quality tests'
|
8
|
-
Cane::RakeTask.new(:quality)
|
9
|
-
|
10
|
-
desc 'Run unit tests'
|
11
|
-
RSpec::Core::RakeTask.new(:unit) do |t|
|
12
|
-
t.rspec_opts = '--color --format documentation'
|
13
|
-
end
|
14
3
|
|
15
|
-
|
4
|
+
RSpec::Core::RakeTask.new do |t|
|
5
|
+
t.rspec_opts = [
|
6
|
+
'--color',
|
7
|
+
'--format progress',
|
8
|
+
].join(' ')
|
16
9
|
end
|
17
|
-
|
18
|
-
desc 'Run all tests'
|
19
|
-
task :test => 'test:all'
|
20
|
-
|
21
|
-
task :default => :test
|
10
|
+
task default: :spec
|
@@ -25,10 +25,10 @@ module Buff
|
|
25
25
|
# @option [#to_s] options :base
|
26
26
|
# the base directory to apply ignores from
|
27
27
|
def initialize(filepath, options = {})
|
28
|
+
raise IgnoreFileNotFound.new(filepath) unless filepath && File.exists?(filepath)
|
29
|
+
|
28
30
|
@filepath = File.expand_path(filepath)
|
29
31
|
@options = options
|
30
|
-
|
31
|
-
raise IgnoreFileNotFound.new(filepath) unless File.exists?(filepath)
|
32
32
|
end
|
33
33
|
|
34
34
|
# Apply the ignore to the list, returning a new list of filtered files
|
data/lib/buff/ignore/version.rb
CHANGED
data/spec/lib/errors_spec.rb
CHANGED
@@ -16,7 +16,11 @@ describe Buff::Ignore::IgnoreFileNotFound do
|
|
16
16
|
}.to_not raise_error
|
17
17
|
end
|
18
18
|
|
19
|
-
|
20
|
-
|
19
|
+
context 'when path is nil' do
|
20
|
+
let(:path) { nil }
|
21
|
+
|
22
|
+
it 'has the correct message' do
|
23
|
+
expect(subject.message).to eq("No ignore file found at ''!")
|
24
|
+
end
|
21
25
|
end
|
22
26
|
end
|
@@ -12,6 +12,14 @@ describe Buff::Ignore::IgnoreFile do
|
|
12
12
|
subject { described_class.new(path) }
|
13
13
|
|
14
14
|
describe '.initialize' do
|
15
|
+
context 'when the filepath is nil' do
|
16
|
+
it 'raises an exception' do
|
17
|
+
expect {
|
18
|
+
described_class.new(nil)
|
19
|
+
}.to raise_error(Buff::Ignore::IgnoreFileNotFound)
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
15
23
|
context 'when the filepath does not exist' do
|
16
24
|
before { File.stub(:exists?).and_return(false) }
|
17
25
|
|
metadata
CHANGED
@@ -1,20 +1,18 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: buff-ignore
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
5
|
-
prerelease:
|
4
|
+
version: 1.1.1
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Seth Vargo
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date: 2013-
|
11
|
+
date: 2013-11-22 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: bundler
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
17
|
- - ~>
|
20
18
|
- !ruby/object:Gem::Version
|
@@ -22,7 +20,6 @@ dependencies:
|
|
22
20
|
type: :development
|
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
|
@@ -30,7 +27,6 @@ dependencies:
|
|
30
27
|
- !ruby/object:Gem::Dependency
|
31
28
|
name: cane
|
32
29
|
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
30
|
requirements:
|
35
31
|
- - ~>
|
36
32
|
- !ruby/object:Gem::Version
|
@@ -38,7 +34,6 @@ dependencies:
|
|
38
34
|
type: :development
|
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
|
@@ -46,23 +41,20 @@ dependencies:
|
|
46
41
|
- !ruby/object:Gem::Dependency
|
47
42
|
name: rake
|
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: :development
|
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
|
- !ruby/object:Gem::Dependency
|
63
56
|
name: rspec
|
64
57
|
requirement: !ruby/object:Gem::Requirement
|
65
|
-
none: false
|
66
58
|
requirements:
|
67
59
|
- - ~>
|
68
60
|
- !ruby/object:Gem::Version
|
@@ -70,7 +62,6 @@ dependencies:
|
|
70
62
|
type: :development
|
71
63
|
prerelease: false
|
72
64
|
version_requirements: !ruby/object:Gem::Requirement
|
73
|
-
none: false
|
74
65
|
requirements:
|
75
66
|
- - ~>
|
76
67
|
- !ruby/object:Gem::Version
|
@@ -78,7 +69,6 @@ dependencies:
|
|
78
69
|
- !ruby/object:Gem::Dependency
|
79
70
|
name: spork
|
80
71
|
requirement: !ruby/object:Gem::Requirement
|
81
|
-
none: false
|
82
72
|
requirements:
|
83
73
|
- - ~>
|
84
74
|
- !ruby/object:Gem::Version
|
@@ -86,7 +76,6 @@ dependencies:
|
|
86
76
|
type: :development
|
87
77
|
prerelease: false
|
88
78
|
version_requirements: !ruby/object:Gem::Requirement
|
89
|
-
none: false
|
90
79
|
requirements:
|
91
80
|
- - ~>
|
92
81
|
- !ruby/object:Gem::Version
|
@@ -102,7 +91,6 @@ files:
|
|
102
91
|
- .travis.yml
|
103
92
|
- CHANGELOG.md
|
104
93
|
- Gemfile
|
105
|
-
- Guardfile
|
106
94
|
- LICENSE
|
107
95
|
- README.md
|
108
96
|
- Rakefile
|
@@ -118,27 +106,26 @@ files:
|
|
118
106
|
homepage: https://github.com/sethvargo/buff-ignore
|
119
107
|
licenses:
|
120
108
|
- Apache 2.0
|
109
|
+
metadata: {}
|
121
110
|
post_install_message:
|
122
111
|
rdoc_options: []
|
123
112
|
require_paths:
|
124
113
|
- lib
|
125
114
|
required_ruby_version: !ruby/object:Gem::Requirement
|
126
|
-
none: false
|
127
115
|
requirements:
|
128
|
-
- -
|
116
|
+
- - '>='
|
129
117
|
- !ruby/object:Gem::Version
|
130
118
|
version: '0'
|
131
119
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
132
|
-
none: false
|
133
120
|
requirements:
|
134
|
-
- -
|
121
|
+
- - '>='
|
135
122
|
- !ruby/object:Gem::Version
|
136
123
|
version: '0'
|
137
124
|
requirements: []
|
138
125
|
rubyforge_project:
|
139
|
-
rubygems_version: 1.
|
126
|
+
rubygems_version: 2.1.10
|
140
127
|
signing_key:
|
141
|
-
specification_version:
|
128
|
+
specification_version: 4
|
142
129
|
summary: A Ruby library for parsing lists of files and applying pattern matching exclusion
|
143
130
|
(such as .gitignore)
|
144
131
|
test_files:
|
data/Guardfile
DELETED
@@ -1,25 +0,0 @@
|
|
1
|
-
guard :bundler do
|
2
|
-
watch('Gemfile')
|
3
|
-
watch('Gemfile.lock')
|
4
|
-
watch(%r{^.+\.gemspec})
|
5
|
-
end
|
6
|
-
|
7
|
-
guard :cane do
|
8
|
-
watch(%r{^lib/(.+)\.rb$})
|
9
|
-
end
|
10
|
-
|
11
|
-
guard :rspec, cli: '--color --drb --format Fuubar' do
|
12
|
-
watch(%r{^spec/.+_spec\.rb$})
|
13
|
-
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" }
|
14
|
-
watch('spec/spec_helper.rb') { 'spec' }
|
15
|
-
end
|
16
|
-
|
17
|
-
guard :spork do
|
18
|
-
watch('Gemfile')
|
19
|
-
watch('Gemfile.lock')
|
20
|
-
watch('spec/spec_helper.rb') { :rspec }
|
21
|
-
end
|
22
|
-
|
23
|
-
guard :yard do
|
24
|
-
watch(%r{lib/.+\.rb})
|
25
|
-
end
|