apirunner 0.4.8 → 0.4.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/VERSION +1 -1
  2. data/apirunner.gemspec +1 -1
  3. data/lib/api_runner.rb +11 -1
  4. metadata +3 -3
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.8
1
+ 0.4.9
data/apirunner.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{apirunner}
8
- s.version = "0.4.8"
8
+ s.version = "0.4.9"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["jan@moviepilot.com"]
data/lib/api_runner.rb CHANGED
@@ -83,16 +83,26 @@ class ApiRunner
83
83
  !@http_client.send_request(:get, "#{@configuration.protocol}://#{@configuration.host}:#{@configuration.port}", nil, {:timeout => 5}).nil?
84
84
  end
85
85
 
86
+ def load_spec?( dir_entry )
87
+ return false if File.directory?( dir_entry )
88
+ return false if dir_entry.match(/^\./)
89
+ return false if dir_entry.match(/excludes/)
90
+ return false if ENV['ONLY'] && !(ENV['ONLY'].split(',').detect{|x| dir_entry.match(/#{x}/)})
91
+
92
+ return true
93
+ end
94
+
86
95
  # loads spec cases from yaml files
87
96
  def load_url_spec
88
97
  path = self.class.spec_path
89
98
  specs = []
90
99
  Dir.new(path).entries.sort.each do |dir_entry|
91
- specs.push *YAML.load_file(path+dir_entry) if not (File.directory? dir_entry or dir_entry.match(/^\./) or dir_entry.match(/excludes/))
100
+ specs.push *YAML.load_file(path+dir_entry) if load_spec?( dir_entry )
92
101
  end
93
102
  @spec = Testcase.expand_specs(specs, @configuration)
94
103
  end
95
104
 
105
+
96
106
  # loads and parses items that need to be excluded from the checks in certain environments
97
107
  def load_excludes(env)
98
108
  excludes_file = self.class.excludes_file
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 4
8
- - 8
9
- version: 0.4.8
8
+ - 9
9
+ version: 0.4.9
10
10
  platform: ruby
11
11
  authors:
12
12
  - jan@moviepilot.com
@@ -291,7 +291,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
291
291
  requirements:
292
292
  - - ">="
293
293
  - !ruby/object:Gem::Version
294
- hash: 2277206951597192754
294
+ hash: 4590717876218024260
295
295
  segments:
296
296
  - 0
297
297
  version: "0"