flunk 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/flunk.gemspec +1 -1
  2. data/lib/flunk.rb +9 -1
  3. metadata +1 -1
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "flunk"
3
- s.version = "0.0.5"
3
+ s.version = "0.0.6"
4
4
  s.platform = Gem::Platform::RUBY
5
5
  s.authors = ["Adam Kirk"]
6
6
  s.email = %q{atomkirk@gmail.com}
@@ -16,15 +16,23 @@ class Flunk < ActionDispatch::IntegrationTest
16
16
  test("FLUNKED: #{action} (#{failure_reason})", &block)
17
17
  end
18
18
 
19
+ def self.base_url=(base_url)
20
+ @@base_url = base_url
21
+ end
22
+
19
23
  def result
20
24
  if !@result_fetched
21
25
  @result_fetched = true
22
26
 
23
- if (@username || @password)
27
+ if @username || @password
24
28
  @headers ||= {}
25
29
  @headers["HTTP_AUTHORIZATION"] = "Basic #{Base64.encode64(@username.to_s + ":" + @password.to_s)}".strip
26
30
  end
27
31
 
32
+ if @@base_url
33
+ @path = File.join(@@base_url, @path)
34
+ end
35
+
28
36
  send @method, @path, @body, @headers
29
37
 
30
38
  @response = response
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: flunk
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: