onceover 3.6.1 → 3.6.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: 72849f6db8421ffb02b6f6cab2c2b504d6ce8d76
4
- data.tar.gz: 1b346dbcc0e3d8100fb202520524918b5dd90d9e
3
+ metadata.gz: 3501fd8dde92afe105bfb781833c11ad0f9af9b3
4
+ data.tar.gz: 8addce042747183bd513ccf2e1f1154aa402ef74
5
5
  SHA512:
6
- metadata.gz: 1d72703e6f6012edce69f3a5521764a0a6536496a0ca2dbb4de29e204715b600df34c3a70e98bba5264563a5fac2b9507a6652393ca516b4eb699318501d86ac
7
- data.tar.gz: 50ed94b9ff2619c7434570ffdc1d1d0652d498936e03e849c3457ca98aa111eec5b1c55d55578bdec5cb26c94557b6180fa39ba967cbb19b1bd1414cc43c9e32
6
+ metadata.gz: 168a12c8a6cb6f92fb33e865e8bc263dd7a6daf0ed844a5512e47ff25557e5c0a2f2d95125d575a0e9f3909b96f342f8fdea57897077065cccf0efebd3d10084
7
+ data.tar.gz: a40da28af989ac7a26a89cf963c0fc509cbfb1f5666d7d7f195da53bdac1d5cfb432a3204940327d634c027b6fa449b1a058c302c47ff9a645520fac53231c8a
data/.gitignore CHANGED
@@ -1,6 +1,7 @@
1
1
  .DS_Store
2
2
  *.gem
3
3
  Gemfile.lock
4
+ Gemfile.local
4
5
 
5
6
  # Bundler / Rbenv
6
7
  /.bundle
@@ -691,3 +691,7 @@ Style/ZeroLengthPredicate:
691
691
 
692
692
  Bundler/OrderedGems:
693
693
  Enabled: false
694
+
695
+ # Enforce LF line endings, even when on Windows
696
+ Layout/EndOfLine:
697
+ EnforcedStyle: lf
data/Gemfile CHANGED
@@ -1,3 +1,13 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
3
  gemspec
4
+
5
+ # Evaluate Gemfile.local if it exists
6
+ if File.exists? "#{__FILE__}.local"
7
+ eval(File.read("#{__FILE__}.local"), binding)
8
+ end
9
+
10
+ # Evaluate ~/.gemfile if it exists
11
+ if File.exists?(File.join(Dir.home, '.gemfile'))
12
+ eval(File.read(File.join(Dir.home, '.gemfile')), binding)
13
+ end
data/Rakefile CHANGED
@@ -3,6 +3,12 @@ require 'rspec/core/rake_task'
3
3
  require 'cucumber/rake/task'
4
4
  Gem::Tasks.new
5
5
 
6
+ def windows?
7
+ # Ruby only sets File::ALT_SEPARATOR on Windows and the Ruby standard
8
+ # library uses that to test what platform it's on.
9
+ !!File::ALT_SEPARATOR
10
+ end
11
+
6
12
  RSpec::Core::RakeTask.new(:spec) do |t|
7
13
  t.rspec_opts = '--pattern spec/onceover/**/*_spec.rb'
8
14
  end
@@ -30,7 +36,11 @@ task :syntax do
30
36
  require 'find'
31
37
  Find.find(*paths) do |path|
32
38
  next unless path =~ /\.rb$/
33
- sh "ruby -cw #{path} > /dev/null"
39
+ if windows?
40
+ sh "ruby -cw #{path} > NUL"
41
+ else
42
+ sh "ruby -cw #{path} > /dev/null"
43
+ end
34
44
  end
35
45
  end
36
46
 
@@ -126,9 +126,13 @@ class Onceover
126
126
  # { 'include' => 'somegroup'
127
127
  # 'exclude' => 'other'}
128
128
  # and return a list of classes/nodes
129
- include_list = Onceover::TestConfig.find_list(subtractive_hash['include']).flatten
130
- exclude_list = Onceover::TestConfig.find_list(subtractive_hash['exclude']).flatten
131
- include_list - exclude_list
129
+ if subtractive_hash.has_key?('include') && subtractive_hash.has_key?('exclude')
130
+ include_list = Onceover::TestConfig.find_list(subtractive_hash['include']).flatten
131
+ exclude_list = Onceover::TestConfig.find_list(subtractive_hash['exclude']).flatten
132
+ include_list - exclude_list
133
+ else
134
+ raise "The classes/nodes hash must have an `exclude` if using an `include`"
135
+ end
132
136
  end
133
137
 
134
138
  def verify_spec_test(controlrepo, test)
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift File.expand_path("../lib", __FILE__)
4
4
 
5
5
  Gem::Specification.new do |s|
6
6
  s.name = "onceover"
7
- s.version = "3.6.1"
7
+ s.version = "3.6.2"
8
8
  s.authors = ["Dylan Ratcliffe"]
9
9
  s.email = ["dylan.ratcliffe@puppet.com"]
10
10
  s.homepage = "https://github.com/dylanratcliffe/onceover"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: onceover
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.6.1
4
+ version: 3.6.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dylan Ratcliffe
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-04-05 00:00:00.000000000 Z
11
+ date: 2018-05-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake