responsalizr 1.0.1 → 1.0.2

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.
@@ -1,5 +1,7 @@
1
- Responsalizr
2
- - Test HTTP Response Codes in Ruby
1
+ =Responsalizr
2
+ Test HTTP Response Codes in Ruby
3
+
4
+ Written by Nat Ritmeyer (http://www.natontesting.com)
3
5
 
4
6
  I'll update this readme soon. For now, take a look at:
5
7
 
data/Rakefile CHANGED
@@ -8,14 +8,14 @@ require 'spec/rake/spectask'
8
8
 
9
9
  spec = Gem::Specification.new do |s|
10
10
  s.name = 'responsalizr'
11
- s.version = '1.0.1'
11
+ s.version = '1.0.2'
12
12
  s.has_rdoc = false
13
- s.extra_rdoc_files = ['README', 'LICENSE']
13
+ s.extra_rdoc_files = ['README.rdoc', 'LICENSE']
14
14
  s.summary = 'Test HTTP responses in ruby'
15
15
  s.description = s.summary
16
16
  s.author = 'Nat Ritmeyer'
17
17
  s.email = 'nat@natontesting.com'
18
- s.files = %w(LICENSE README Rakefile) + Dir.glob("{bin,lib,spec}/**/*")
18
+ s.files = %w(LICENSE README.rdoc Rakefile) + Dir.glob("{bin,lib,spec}/**/*")
19
19
  s.require_path = "lib"
20
20
  s.bindir = "bin"
21
21
  end
@@ -26,14 +26,14 @@ Rake::GemPackageTask.new(spec) do |p|
26
26
  p.need_zip = true
27
27
  end
28
28
 
29
- #Rake::RDocTask.new do |rdoc|
30
- # files =['README', 'LICENSE', 'lib/**/*.rb']
31
- # rdoc.rdoc_files.add(files)
32
- # rdoc.main = "README" # page to start on
33
- # rdoc.title = "responsalizr Docs"
34
- # rdoc.rdoc_dir = 'doc/rdoc' # rdoc output folder
35
- # rdoc.options << '--line-numbers'
36
- #end
29
+ Rake::RDocTask.new do |rdoc|
30
+ files =['README.rdoc', 'LICENSE', 'lib/**/*.rb']
31
+ rdoc.rdoc_files.add(files)
32
+ rdoc.main = "README.rdoc" # page to start on
33
+ rdoc.title = "responsalizr Docs"
34
+ rdoc.rdoc_dir = 'doc/rdoc' # rdoc output folder
35
+ rdoc.options << '--line-numbers'
36
+ end
37
37
 
38
38
  Rake::TestTask.new do |t|
39
39
  t.test_files = FileList['test/**/*.rb']
@@ -1,11 +1,15 @@
1
1
  #Copyright (c) 2010, Nathaniel Ritmeyer. All rights reserved.
2
2
 
3
- require 'rubygems'
4
3
  require 'net/http'
5
4
  require 'active_support/core_ext/string/inflections'
6
5
 
6
+ #Extends Net::HTTPResponse to include methods that allow for idiomatic
7
+ #testing of response codes and response names. Don't expect much from
8
+ #the rdoc, it's all quite meta...
7
9
  module Responsalizr
8
10
  class Response
11
+ #Takes a URL as a string along with optional proxy details. Returns
12
+ #a Net::HTTPResponse of some kind.
9
13
  def self.from(url_string = nil, proxy = {:proxy_host => nil, :port => nil})
10
14
  raise ArgumentError if url_string.nil?
11
15
  Net::HTTP.Proxy(proxy[:proxy_host], proxy[:port]).get_response(URI.parse(url_string))
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: responsalizr
3
3
  version: !ruby/object:Gem::Version
4
- hash: 21
4
+ hash: 19
5
5
  prerelease: false
6
6
  segments:
7
7
  - 1
8
8
  - 0
9
- - 1
10
- version: 1.0.1
9
+ - 2
10
+ version: 1.0.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Nat Ritmeyer
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-09-11 00:00:00 +01:00
18
+ date: 2010-09-12 00:00:00 +01:00
19
19
  default_executable:
20
20
  dependencies: []
21
21
 
@@ -26,11 +26,11 @@ executables: []
26
26
  extensions: []
27
27
 
28
28
  extra_rdoc_files:
29
- - README
29
+ - README.rdoc
30
30
  - LICENSE
31
31
  files:
32
32
  - LICENSE
33
- - README
33
+ - README.rdoc
34
34
  - Rakefile
35
35
  - lib/responsalizr.rb
36
36
  - spec/responsalizr_tests.rb