strelka 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
data.tar.gz.sig CHANGED
Binary file
data/History.rdoc CHANGED
@@ -1,3 +1,9 @@
1
+ == v0.0.2 [2012-10-17] Michael Granger <ged@FaerieMUD.org>
2
+
3
+ - Fix a bug in HTTPRequest#uri when running under versions of Mongrel2
4
+ equal or earlier than 1.8.0.
5
+
6
+
1
7
  == v0.0.1 [2012-10-17] Michael Granger <ged@FaerieMUD.org>
2
8
 
3
9
  Initial release.
data/Rakefile CHANGED
@@ -27,7 +27,7 @@ hoespec = Hoe.spec 'strelka' do
27
27
  self.dependency 'highline', '~> 1.6'
28
28
  self.dependency 'inversion', '~> 0.11'
29
29
  self.dependency 'loggability', '~> 0.4'
30
- self.dependency 'mongrel2', '~> 0.33'
30
+ self.dependency 'mongrel2', '~> 0.34'
31
31
  self.dependency 'pluginfactory', '~> 1.0'
32
32
  self.dependency 'sysexits', '~> 1.1'
33
33
  self.dependency 'trollop', '~> 2.0'
@@ -42,7 +42,7 @@ hoespec = Hoe.spec 'strelka' do
42
42
  '-t', 'Strelka Web Application Toolkit',
43
43
  '-w', '4',
44
44
  ]
45
- self.require_ruby_version( '>=1.9.2' )
45
+ self.require_ruby_version( '>=1.9.3' )
46
46
  self.hg_sign_tags = true if self.respond_to?( :hg_sign_tags= )
47
47
  self.check_history_on_release = true if self.respond_to?( :check_history_on_release= )
48
48
 
@@ -1,18 +1,13 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  # <%= XIF %> (top-level documentation)
4
- #
5
- # == Author/s
6
- #
7
- # * Michael Granger <ged@FaerieMUD.org>
8
- #
9
4
  module <%= klass %>
10
5
 
11
6
  # Library version constant
12
- VERSION = '0.0.1'
7
+ VERS<%# this is just here so Hoe doesn't see this constant %>ION = '0.0.1'
13
8
 
14
9
  # Version-control revision constant
15
- REVISION = %q$Revision: c21afe9776d3 $
10
+ REVISION = %q$Revision: 485638c9ec10 $
16
11
 
17
12
  end # module <%= klass %>
18
13
 
data/lib/strelka.rb CHANGED
@@ -24,10 +24,10 @@ module Strelka
24
24
  log_as :strelka
25
25
 
26
26
  # Library version constant
27
- VERSION = '0.0.1'
27
+ VERSION = '0.0.2'
28
28
 
29
29
  # Version-control revision constant
30
- REVISION = %q$Revision: 3c639d92e751 $
30
+ REVISION = %q$Revision: 4a75dc02587a $
31
31
 
32
32
  require 'strelka/constants'
33
33
  require 'strelka/exceptions'
@@ -72,10 +72,8 @@ class Strelka::HTTPRequest < Mongrel2::HTTPRequest
72
72
  ### # => #<URI::HTTP:0x007fe34d16b2e0 URL:http://localhost:8080/user/1/profile>
73
73
  def uri
74
74
  unless @uri
75
- # :TODO: Make this detect https scheme once I figure out how to
76
- # detect it.
77
75
  uri = "%s://%s%s" % [
78
- self.headers.url_scheme.downcase,
76
+ self.scheme,
79
77
  self.headers.host,
80
78
  self.headers.uri
81
79
  ]
@@ -48,6 +48,13 @@ describe Strelka::HTTPRequest do
48
48
  @req.uri.to_s.should == 'https://localhost:8080/directory/userinfo/ged'
49
49
  end
50
50
 
51
+ it "doesn't error when run under earlier versions of Mongrel that didn't set the " +
52
+ "url-scheme header" do
53
+ @req.headers.url_scheme = nil
54
+ @req.uri.should be_a( URI )
55
+ @req.uri.to_s.should == 'http://localhost:8080/directory/userinfo/ged'
56
+ end
57
+
51
58
  it "knows what Mongrel2 route it followed" do
52
59
  @req.pattern.should == '/directory'
53
60
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: strelka
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -36,7 +36,7 @@ cert_chain:
36
36
  YUhDS0xaZFNLai9SSHVUT3QrZ2JsUmV4OEZBaDhOZUEKY21saFhlNDZwWk5K
37
37
  Z1dLYnhaYWg4NWpJang5NWhSOHZPSStOQU01aUg5a09xSzEzRHJ4YWNUS1Bo
38
38
  cWo1UGp3RgotLS0tLUVORCBDRVJUSUZJQ0FURS0tLS0tCg==
39
- date: 2012-10-17 00:00:00.000000000 Z
39
+ date: 2012-10-18 00:00:00.000000000 Z
40
40
  dependencies:
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: configurability
@@ -141,7 +141,7 @@ dependencies:
141
141
  requirements:
142
142
  - - ~>
143
143
  - !ruby/object:Gem::Version
144
- version: '0.33'
144
+ version: '0.34'
145
145
  type: :runtime
146
146
  prerelease: false
147
147
  version_requirements: !ruby/object:Gem::Requirement
@@ -149,7 +149,7 @@ dependencies:
149
149
  requirements:
150
150
  - - ~>
151
151
  - !ruby/object:Gem::Version
152
- version: '0.33'
152
+ version: '0.34'
153
153
  - !ruby/object:Gem::Dependency
154
154
  name: pluginfactory
155
155
  requirement: !ruby/object:Gem::Requirement
@@ -481,7 +481,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
481
481
  requirements:
482
482
  - - ! '>='
483
483
  - !ruby/object:Gem::Version
484
- version: 1.9.2
484
+ version: 1.9.3
485
485
  required_rubygems_version: !ruby/object:Gem::Requirement
486
486
  none: false
487
487
  requirements:
metadata.gz.sig CHANGED
@@ -1,2 +1,2 @@
1
- N�%�^]����uw3n&�wE7ds�g3Yp���
2
- �K��` �=v���!�z�ue-�1{Ie"#ϗ�xOi�4�uC/E˶`-�y^������>���o�X ��*���n
1
+ ga��he63o�ɢ�ks�?�,OrV��+UGf;-mŧ������"BS^�l�в�!�g, �?��X�O���G& }GSy���2C�g�=; �e8 �;v�����`0*���1k�/�g�J7�]nh43�|�g��0͝Q��uq��8��u�����ڵ���#)"f&�O8N��0�+�K���^��c�\uOo6� H
2
+ sѴ����vu} + J�=}ŧ�!��^�^�{�Ե����;u��c��=��VWm