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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f767a489b1dd0865beb06885c80b95f1d363aaa2
4
- data.tar.gz: 2c2acff7f9ee5b80e42826000ab44d81f0d0a616
3
+ metadata.gz: 419996fc429bcb446747cc4ecd7516c33b32df32
4
+ data.tar.gz: bdf1e0c7c6c93392ca14d05dee06cf4aeeac5642
5
5
  SHA512:
6
- metadata.gz: b800bc3090a46b3f2c56950e21ce2b0589669e320f836003f9704c4a0fdda3846bad13102f047c1ca7bda6c6c4649ea1fb617ad2230e2ad6705df6bec6882cd6
7
- data.tar.gz: b1b399f43e22c1d7d07a9a4d350a678658a90293aa8fef49f204b53a2bdce4491c26064af8923ceafed98f4568ba38bef0dd7e8d9942359e73df53e4af35e274
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 << 'lib' << 'test'
7
- t.pattern = 'test/*.rb'
6
+ t.libs.push("lib", "test")
7
+ t.pattern = "test/**/*.rb"
8
8
  end
9
- task :default => [:test]
10
- task :default => [:test]
11
- task :default => [:test]
12
- task :default => [:test]
9
+
13
10
  task :default => [:test]
14
11
  task :default => [:test]
@@ -1,9 +1,6 @@
1
1
  # -*- coding: utf-8 -*-
2
- require "minitest/autorun"
3
- require "simplecov"
4
- SimpleCov.start
5
-
6
- require "sixarm_ruby_to_id"
2
+ require "sixarm_ruby_to_id_test"
3
+ require "sixarm_ruby_to_id/array"
7
4
 
8
5
  describe Array do
9
6
 
@@ -1,9 +1,6 @@
1
1
  # -*- coding: utf-8 -*-
2
- require "minitest/autorun"
3
- require "simplecov"
4
- SimpleCov.start
5
-
6
- require "sixarm_ruby_to_id"
2
+ require "sixarm_ruby_to_id_test"
3
+ require "sixarm_ruby_to_id/date"
7
4
 
8
5
  describe Date do
9
6
 
@@ -1,9 +1,6 @@
1
1
  # -*- coding: utf-8 -*-
2
- require "minitest/autorun"
3
- require "simplecov"
4
- SimpleCov.start
5
-
6
- require "sixarm_ruby_to_id"
2
+ require "sixarm_ruby_to_id_test"
3
+ require "sixarm_ruby_to_id/hash"
7
4
 
8
5
  describe Hash do
9
6
 
@@ -1,9 +1,6 @@
1
1
  # -*- coding: utf-8 -*-
2
- require "minitest/autorun"
3
- require "simplecov"
4
- SimpleCov.start
5
-
6
- require "sixarm_ruby_to_id"
2
+ require "sixarm_ruby_to_id_test"
3
+ require "sixarm_ruby_to_id/nil"
7
4
 
8
5
  describe NilClass do
9
6
 
@@ -1,9 +1,6 @@
1
1
  # -*- coding: utf-8 -*-
2
- require "minitest/autorun"
3
- require "simplecov"
4
- SimpleCov.start
5
-
6
- require "sixarm_ruby_to_id"
2
+ require "sixarm_ruby_to_id_test"
3
+ require "sixarm_ruby_to_id/numeric"
7
4
 
8
5
  describe Numeric do
9
6
 
@@ -1,9 +1,6 @@
1
1
  # -*- coding: utf-8 -*-
2
- require "minitest/autorun"
3
- require "simplecov"
4
- SimpleCov.start
5
-
6
- require "sixarm_ruby_to_id"
2
+ require "sixarm_ruby_to_id_test"
3
+ require "sixarm_ruby_to_id/object"
7
4
 
8
5
  class Mock
9
6
  def object_id
@@ -1,9 +1,6 @@
1
1
  # -*- coding: utf-8 -*-
2
- require "minitest/autorun"
3
- require "simplecov"
4
- SimpleCov.start
5
-
6
- require "sixarm_ruby_to_id"
2
+ require "sixarm_ruby_to_id_test"
3
+ require "sixarm_ruby_to_id/string"
7
4
 
8
5
  describe String do
9
6
 
@@ -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.9
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-10 00:00:00.000000000 Z
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
@@ -1,6 +0,0 @@
1
- # Changes
2
-
3
- * 2015-07-07 1.0.9 Update gemspec to use file manifest
4
- * 2012-09-21 1.0.8 Change stint format to use range dots like "x..y"
5
- * 2012-08-21 1.0.7 Add Hash#to_date_id
6
- * 2012-08-11 1.0.0 Publish
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
- [![Code Climate](https://codeclimate.com/github/SixArm/sixarm_ruby_to_id.png)](https://codeclimate.com/github/SixArm/sixarm_ruby_to_id)
4
- [![Build Status](https://travis-ci.org/SixArm/sixarm_ruby_to_id.png)](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