sliver 0.2.0 → 0.2.1
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.
- checksums.yaml +4 -4
- data/README.md +3 -1
- data/lib/sliver/path.rb +10 -2
- data/lib/sliver/runner.rb +1 -0
- data/sliver.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a60f68bd365f418ada42e9e99afdfd0c68687628
|
4
|
+
data.tar.gz: 0dc49aa25e7da640a73a94b883c2a39c0c0d4b50
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
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
data/sliver.gemspec
CHANGED
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.
|
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-
|
11
|
+
date: 2015-04-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rack
|