sliver 0.2.0 → 0.2.1

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: b4cafe27f4c73054d56b959d387c2ad112317a91
4
- data.tar.gz: 7ef015ae4473548c4191b4d6bea1d7e5813a4f31
3
+ metadata.gz: a60f68bd365f418ada42e9e99afdfd0c68687628
4
+ data.tar.gz: 0dc49aa25e7da640a73a94b883c2a39c0c0d4b50
5
5
  SHA512:
6
- metadata.gz: 6a58eb401484aa99d444765a5b1cf6c66d1b8fbd6bcafeff5dd16ff0b54b26018369467df73096bedccb2cc728e0b22aa5552e4f1a34b7b8962664b6f0debd1a
7
- data.tar.gz: 9ff0a07cf83cd4e73dcac29a6706d7e9b4881aca903f3ff46ca463cb35136c031ad16f47b9f27f785bae3687d19eb6806a150e381539d3059fd4d2917c1467d5
6
+ metadata.gz: 0139f2e011b65fa3fea1405bc6ded129da80b42450c2b2e464ab30ae2f5d850aa85fe7be41a236b0f981222498178c1169c33ce24354f55c7b34c50290b52628
7
+ data.tar.gz: de84f54e7202e0bcd4c2c75000b23f847a2aa7ed7703a997948d3aaf45b0e9d800e36633f9bc0dd56e55ca0f0f5a5d55a530206e6f2c4984954bd17956b19e95
data/README.md CHANGED
@@ -13,7 +13,7 @@ Early days of development, so things may change dramatically. Or not. Who knows.
13
13
  Add it to your Gemfile like any other gem, or install it manually.
14
14
 
15
15
  ```ruby
16
- gem 'sliver', '~> 0.2.0'
16
+ gem 'sliver', '~> 0.2.1'
17
17
  ```
18
18
 
19
19
  ## Usage
@@ -106,6 +106,8 @@ end
106
106
 
107
107
  ## Contributing
108
108
 
109
+ Please note that this project now has a [Contributor Code of Conduct](http://contributor-covenant.org/version/1/0/0/). By participating in this project you agree to abide by its terms.
110
+
109
111
  1. Fork it ( https://github.com/pat/sliver/fork )
110
112
  2. Create your feature branch (`git checkout -b my-new-feature`)
111
113
  3. Commit your changes (`git commit -am 'Add some feature'`)
data/lib/sliver/path.rb CHANGED
@@ -1,9 +1,19 @@
1
1
  class Sliver::Path
2
+ attr_reader :http_method, :string
3
+
2
4
  def initialize(http_method, string)
3
5
  @http_method = http_method.to_s.upcase
4
6
  @string = normalised_path string
5
7
  end
6
8
 
9
+ def eql?(other)
10
+ http_method == other.http_method && string == other.string
11
+ end
12
+
13
+ def hash
14
+ "#{http_method} #{string}".hash
15
+ end
16
+
7
17
  def matches?(environment)
8
18
  method = environment['REQUEST_METHOD']
9
19
  path = normalised_path environment['PATH_INFO']
@@ -25,8 +35,6 @@ class Sliver::Path
25
35
 
26
36
  private
27
37
 
28
- attr_reader :http_method, :string
29
-
30
38
  def normalised_path(string)
31
39
  string == '' ? '/' : string
32
40
  end
data/lib/sliver/runner.rb CHANGED
@@ -40,6 +40,7 @@ class Sliver::Runner
40
40
 
41
41
  guard.respond
42
42
  guarded!
43
+ break
43
44
  end
44
45
  end
45
46
 
data/sliver.gemspec CHANGED
@@ -1,7 +1,7 @@
1
1
  # coding: utf-8
2
2
  Gem::Specification.new do |spec|
3
3
  spec.name = 'sliver'
4
- spec.version = '0.2.0'
4
+ spec.version = '0.2.1'
5
5
  spec.authors = ['Pat Allan']
6
6
  spec.email = ['pat@freelancing-gods.com']
7
7
  spec.summary = %q{Lightweight, simple Rack APIs}
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sliver
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pat Allan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-13 00:00:00.000000000 Z
11
+ date: 2015-04-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rack