sixarm_ruby_to_id 1.0.9 → 1.1.0
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
- checksums.yaml.gz.sig +0 -0
- data/Rakefile +3 -6
- data/test/sixarm_ruby_to_id_test/array_test.rb +2 -5
- data/test/sixarm_ruby_to_id_test/date_test.rb +2 -5
- data/test/sixarm_ruby_to_id_test/hash_test.rb +2 -5
- data/test/sixarm_ruby_to_id_test/nil_test.rb +2 -5
- data/test/sixarm_ruby_to_id_test/numeric_test.rb +2 -5
- data/test/sixarm_ruby_to_id_test/object_test.rb +2 -5
- data/test/sixarm_ruby_to_id_test/string_test.rb +2 -5
- data/test/sixarm_ruby_to_id_test.rb +6 -5
- data.tar.gz.sig +0 -0
- metadata +2 -8
- metadata.gz.sig +0 -0
- data/.gemtest +0 -0
- data/CHANGES.md +0 -6
- data/CONTRIBUTING.md +0 -28
- data/LICENSE.md +0 -28
- data/README.md +0 -66
- data/VERSION +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 419996fc429bcb446747cc4ecd7516c33b32df32
|
4
|
+
data.tar.gz: bdf1e0c7c6c93392ca14d05dee06cf4aeeac5642
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ea73c90d0917eea8013a41a2ba815274edd47eb734630613462b11d774c164c01b3ef0ee228295f54b526e4024f52c58e47d7e8c46428d06cf656901dd3f6fb0
|
7
|
+
data.tar.gz: 49e2219eef5ab9f359cd97104fd29c0151c77de250a5e7c2851812c787fbb5d7b1ff9b3ecbb958e2155858d95821b149b7088a4e656380d0885a65dfb0ef505b
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/Rakefile
CHANGED
@@ -3,12 +3,9 @@ require "rake"
|
|
3
3
|
require "rake/testtask"
|
4
4
|
|
5
5
|
Rake::TestTask.new(:test) do |t|
|
6
|
-
t.libs
|
7
|
-
t.pattern =
|
6
|
+
t.libs.push("lib", "test")
|
7
|
+
t.pattern = "test/**/*.rb"
|
8
8
|
end
|
9
|
-
|
10
|
-
task :default => [:test]
|
11
|
-
task :default => [:test]
|
12
|
-
task :default => [:test]
|
9
|
+
|
13
10
|
task :default => [:test]
|
14
11
|
task :default => [:test]
|
@@ -1,10 +1,11 @@
|
|
1
1
|
# -*- coding: utf-8 -*-
|
2
2
|
require "minitest/autorun"
|
3
|
+
require "coveralls"
|
3
4
|
require "simplecov"
|
5
|
+
Coveralls.wear!
|
6
|
+
SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
|
7
|
+
SimpleCov::Formatter::HTMLFormatter,
|
8
|
+
Coveralls::SimpleCov::Formatter
|
9
|
+
]
|
4
10
|
SimpleCov.start
|
5
11
|
|
6
|
-
['array','date','hash','nil','numeric','object','string'].map{|x|
|
7
|
-
require "sixarm_ruby_to_id_test/#{x}_test.rb"
|
8
|
-
}
|
9
|
-
|
10
|
-
|
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sixarm_ruby_to_id
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- SixArm
|
@@ -44,7 +44,7 @@ cert_chain:
|
|
44
44
|
2AC9FOGkybW6DJEFSFFMlNk0IILsa/gNp8ufGuTVLWF9FUUdMNK+TMbghnifT8/1
|
45
45
|
n+ES/gQPOnvmVkLDGw==
|
46
46
|
-----END CERTIFICATE-----
|
47
|
-
date: 2015-07-
|
47
|
+
date: 2015-07-19 00:00:00.000000000 Z
|
48
48
|
dependencies:
|
49
49
|
- !ruby/object:Gem::Dependency
|
50
50
|
name: minitest
|
@@ -132,13 +132,7 @@ executables: []
|
|
132
132
|
extensions: []
|
133
133
|
extra_rdoc_files: []
|
134
134
|
files:
|
135
|
-
- ".gemtest"
|
136
|
-
- CHANGES.md
|
137
|
-
- CONTRIBUTING.md
|
138
|
-
- LICENSE.md
|
139
|
-
- README.md
|
140
135
|
- Rakefile
|
141
|
-
- VERSION
|
142
136
|
- lib/sixarm_ruby_to_id.rb
|
143
137
|
- lib/sixarm_ruby_to_id/array.rb
|
144
138
|
- lib/sixarm_ruby_to_id/date.rb
|
metadata.gz.sig
CHANGED
Binary file
|
data/.gemtest
DELETED
File without changes
|
data/CHANGES.md
DELETED
data/CONTRIBUTING.md
DELETED
@@ -1,28 +0,0 @@
|
|
1
|
-
# Contributing
|
2
|
-
|
3
|
-
Thank you for contributing!
|
4
|
-
|
5
|
-
If you would like to contribute a donation, an easy way is to use PayPal to sixarm@sixarm.com.
|
6
|
-
|
7
|
-
If you would like to contribute help, the next section is for you.
|
8
|
-
|
9
|
-
|
10
|
-
## Contributing to the source
|
11
|
-
|
12
|
-
We love pull requests for improvments to the source code and documentation.
|
13
|
-
|
14
|
-
There are three easy steps:
|
15
|
-
|
16
|
-
1. Fork the repo.
|
17
|
-
|
18
|
-
* Before you do any work please run our existing tests to make sure the code runs cleanly.
|
19
|
-
|
20
|
-
2. Work as you like.
|
21
|
-
|
22
|
-
* Please create tests. This helps us know that all your code runs cleanly.
|
23
|
-
|
24
|
-
3. Push to your fork and submit a pull request.
|
25
|
-
|
26
|
-
* We'll take a look as soon as we can; this is typically within a business day.
|
27
|
-
|
28
|
-
Thank you again!
|
data/LICENSE.md
DELETED
@@ -1,28 +0,0 @@
|
|
1
|
-
# License
|
2
|
-
|
3
|
-
You may choose any of these open source licenses:
|
4
|
-
|
5
|
-
* Apache License
|
6
|
-
* BSD License
|
7
|
-
* CreativeCommons License, Non-commercial Share Alike
|
8
|
-
* GNU Affero General Public License (AGPL)
|
9
|
-
* GNU General Public License Version (GPL)
|
10
|
-
* GNU Lesser General Public License (LGPL)
|
11
|
-
* MIT License
|
12
|
-
* Perl Artistic License
|
13
|
-
* Ruby License
|
14
|
-
|
15
|
-
The software is provided "as is", without warranty of any kind,
|
16
|
-
express or implied, including but not limited to the warranties of
|
17
|
-
merchantability, fitness for a particular purpose and noninfringement.
|
18
|
-
|
19
|
-
In no event shall the authors or copyright holders be liable for any
|
20
|
-
claim, damages or other liability, whether in an action of contract,
|
21
|
-
tort or otherwise, arising from, out of or in connection with the
|
22
|
-
software or the use or other dealings in the software.
|
23
|
-
|
24
|
-
This license is for the included software that is created by SixArm.
|
25
|
-
Some of the included software may have its own licenses, copyrights,
|
26
|
-
authors, etc. and these may take precedence over the SixArm license.
|
27
|
-
|
28
|
-
Copyright (c) Joel Parker Henderson
|
data/README.md
DELETED
@@ -1,66 +0,0 @@
|
|
1
|
-
# SixArm.com » Ruby » <br> ToId parses an object to id
|
2
|
-
|
3
|
-
[](https://codeclimate.com/github/SixArm/sixarm_ruby_to_id)
|
4
|
-
[](https://travis-ci.org/SixArm/sixarm_ruby_to_id)
|
5
|
-
|
6
|
-
* Doc: <http://sixarm.com/sixarm_ruby_to_id/doc>
|
7
|
-
* Gem: <http://rubygems.org/gems/sixarm_ruby_to_id>
|
8
|
-
* Repo: <http://github.com/sixarm/sixarm_ruby_to_id>
|
9
|
-
* Email: Joel Parker Henderson, <joel@sixarm.com>
|
10
|
-
|
11
|
-
## Introduction
|
12
|
-
|
13
|
-
Convert strings to various kinds of id types and uuid types.
|
14
|
-
|
15
|
-
For docs go to <http://sixarm.com/sixarm_ruby_to_id/doc>
|
16
|
-
|
17
|
-
We use this gem to help santize web application inputs, for example HTTP query strings and form input controls.
|
18
|
-
|
19
|
-
Want to help? We're happy to get pull requests.
|
20
|
-
|
21
|
-
|
22
|
-
## Install quickstart
|
23
|
-
|
24
|
-
Install:
|
25
|
-
|
26
|
-
gem install sixarm_ruby_to_id
|
27
|
-
|
28
|
-
Bundler:
|
29
|
-
|
30
|
-
gem "sixarm_ruby_to_id", ">=1.0.9", "<2"
|
31
|
-
|
32
|
-
Require:
|
33
|
-
|
34
|
-
require "sixarm_ruby_to_id"
|
35
|
-
|
36
|
-
|
37
|
-
## Install with security (optional)
|
38
|
-
|
39
|
-
To enable high security for all our gems:
|
40
|
-
|
41
|
-
wget http://sixarm.com/sixarm.pem
|
42
|
-
gem cert --add sixarm.pem
|
43
|
-
gem sources --add http://sixarm.com
|
44
|
-
|
45
|
-
To install with high security:
|
46
|
-
|
47
|
-
gem install sixarm_ruby_to_id --trust-policy HighSecurity
|
48
|
-
|
49
|
-
|
50
|
-
## Examples
|
51
|
-
|
52
|
-
Cast a string to an integer id:
|
53
|
-
|
54
|
-
"100".to_i_id #=> 100
|
55
|
-
|
56
|
-
Cast a string to a string UUID and ensure it has the right hex characters and dash locations:
|
57
|
-
|
58
|
-
"bbd98640-4c2a-4343-ab6b-0ebd2fec6362".to_uuid
|
59
|
-
|
60
|
-
Cast a comma-separated list to string ids:
|
61
|
-
|
62
|
-
"a,b,c".to_s_ids #=> ["a", "b", "c"]
|
63
|
-
|
64
|
-
Cast a hash of year, month, day to a date id YYYY-MM-DD:
|
65
|
-
|
66
|
-
{year: "2000", month: "12", day: "31"}.to_date_id #=> "2000-12-31"
|
data/VERSION
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
1.0.9
|