virtus-uri 0.0.1 → 0.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.
- checksums.yaml +4 -4
- data/README.md +34 -0
- data/lib/virtus/uri/version.rb +7 -0
- data/lib/virtus/uri.rb +12 -0
- metadata +7 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6292eb179879256c6cfad567323a8dd988f812c2
|
4
|
+
data.tar.gz: 0545fd3c2455a3b42c1938b6bec6e575cca28fb6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f2947703930ba5045ba7705e512635584b3e37723828e47809f2da51356a1e91dc597cddf286c443790c1f2cb52c7cb3a78e850b0c61f59c86190c28719f2090
|
7
|
+
data.tar.gz: 7b04cf85f2a4d503fe6fe83760e0d9fde6dd2e028bd7b00309f0cf73da282e5b6af4de027bc9042e5924e8c693c505cc709877704100769754e41a1ccfd4a22c
|
data/README.md
ADDED
@@ -0,0 +1,34 @@
|
|
1
|
+
# Virtus URI
|
2
|
+
|
3
|
+
Provides a URI attribute for Virtus.
|
4
|
+
|
5
|
+
## Getting Started
|
6
|
+
|
7
|
+
1. Add to your Gemfile
|
8
|
+
|
9
|
+
```ruby
|
10
|
+
gem 'virtus-uri', require: false
|
11
|
+
```
|
12
|
+
|
13
|
+
2. Require it when you'd like to work with URIs:
|
14
|
+
|
15
|
+
```ruby
|
16
|
+
require 'virtus'
|
17
|
+
require 'virtus/uri'
|
18
|
+
|
19
|
+
class Request
|
20
|
+
include Virtus
|
21
|
+
|
22
|
+
attribute :url, URI
|
23
|
+
end
|
24
|
+
```
|
25
|
+
|
26
|
+
3. Work with URIs:
|
27
|
+
|
28
|
+
```ruby
|
29
|
+
Request.new(url: 'http://example.com').url == URI('http://example.com')
|
30
|
+
```
|
31
|
+
|
32
|
+
## License
|
33
|
+
|
34
|
+
MIT
|
data/lib/virtus/uri.rb
ADDED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: virtus-uri
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brian Cobb
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-10-
|
11
|
+
date: 2013-10-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -73,6 +73,9 @@ executables: []
|
|
73
73
|
extensions: []
|
74
74
|
extra_rdoc_files: []
|
75
75
|
files:
|
76
|
+
- lib/virtus/uri/version.rb
|
77
|
+
- lib/virtus/uri.rb
|
78
|
+
- README.md
|
76
79
|
- spec/virtus/uri_spec.rb
|
77
80
|
homepage: https://github.com/bcobb/virtus-uri
|
78
81
|
licenses:
|
@@ -98,4 +101,5 @@ rubygems_version: 2.0.6
|
|
98
101
|
signing_key:
|
99
102
|
specification_version: 4
|
100
103
|
summary: Add a URI attribute type to Virtus.
|
101
|
-
test_files:
|
104
|
+
test_files:
|
105
|
+
- spec/virtus/uri_spec.rb
|