friendly_code 1.0.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.
Files changed (3) hide show
  1. checksums.yaml +15 -0
  2. data/lib/friendly_code.rb +10 -0
  3. metadata +79 -0
checksums.yaml ADDED
@@ -0,0 +1,15 @@
1
+ ---
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ OGI3OTYwOTc2YTdkMjA4ODNlNjdmZDUyM2M4MTVjN2Y1YzBiM2EyOA==
5
+ data.tar.gz: !binary |-
6
+ M2Y4NWM1YTU2ODc4NzIxYTAxYzJiMzg1NTcyYWRkNGRmOWUwYWNmOQ==
7
+ SHA512:
8
+ metadata.gz: !binary |-
9
+ MzkyZjE5NDkwZTBjNGNmNWE3MTRiNGQ5NDUyYTE4ZjYxMmZhZTQ1MTBkZTE0
10
+ ZTg3YzZhNWRiZmQxM2ZlZmQ3NDA5ZTM4MTU4OTRmOTcyMGM1NmMyZDIzNTdm
11
+ NWM2NzU4MjkxNGEyMzNjZTgwNmVhMjIzYTczNGI2ZDAyNDIzNzM=
12
+ data.tar.gz: !binary |-
13
+ MTc1NzUzNWRlZjU4MTAwZmU5MDE2OGIwNmE1ZWJmMGQwMzBjZjg2ZTIxOGYy
14
+ MTFhYmI1NjMzN2JmOGM3ZjkxYzBhYzViNDZiNzRjYjIwN2U5MDZjZWZkYzU5
15
+ ZGNlNDBmNzczNzAzZGE1Mzk2ZjRiOTA5NTNmNDUyM2NkZGY1YzY=
@@ -0,0 +1,10 @@
1
+ class FriendlyCode
2
+ VERSION = '1.0.0'
3
+
4
+ CHARACTER_SET = %w{ 3 6 7 C D F G H J K M N P R T W X }
5
+ DEFAULT_SIZE = 6
6
+
7
+ def self.generate(size = DEFAULT_SIZE)
8
+ size.times.map{|_| CHARACTER_SET.sample }.join
9
+ end
10
+ end
metadata ADDED
@@ -0,0 +1,79 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: friendly_code
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Matt Swanson
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-11-17 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: minitest
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ~>
18
+ - !ruby/object:Gem::Version
19
+ version: '5.8'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ~>
25
+ - !ruby/object:Gem::Version
26
+ version: '5.8'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ~>
32
+ - !ruby/object:Gem::Version
33
+ version: '10.4'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ~>
39
+ - !ruby/object:Gem::Version
40
+ version: '10.4'
41
+ description: ! " Generate user-friendly, pseudo-random codes without ambiguous
42
+ letters\n or numbers (e.g. 0 vs O vs o).\n\n For scenarios where only computers
43
+ will be interacting, this is probably \n the way to go. But when the interaction
44
+ involves a human, we want to remove\n ambigouity to improve accessibility and
45
+ ease of reading and entering data.\n\n Use cases:\n * Entering code sent via
46
+ SMS into a web page or app\n * Entering code from printed material into a web
47
+ page or app\n"
48
+ email: matt@mdswanson.com
49
+ executables: []
50
+ extensions: []
51
+ extra_rdoc_files: []
52
+ files:
53
+ - lib/friendly_code.rb
54
+ homepage: https://github.com/swanson/friendly_code
55
+ licenses:
56
+ - MIT
57
+ metadata: {}
58
+ post_install_message:
59
+ rdoc_options: []
60
+ require_paths:
61
+ - lib
62
+ required_ruby_version: !ruby/object:Gem::Requirement
63
+ requirements:
64
+ - - ! '>='
65
+ - !ruby/object:Gem::Version
66
+ version: '0'
67
+ required_rubygems_version: !ruby/object:Gem::Requirement
68
+ requirements:
69
+ - - ! '>='
70
+ - !ruby/object:Gem::Version
71
+ version: '0'
72
+ requirements: []
73
+ rubyforge_project:
74
+ rubygems_version: 2.2.0
75
+ signing_key:
76
+ specification_version: 4
77
+ summary: Generate user-friendly, pseudo-random codes without ambiguous letters or
78
+ numbers (e.g. 0 vs O vs o).
79
+ test_files: []