saikoro 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 7440539180cdcac208ba10b16b46a4201f4568bf
4
+ data.tar.gz: 1405691f9d716859907961fa429d22777a88bfe3
5
+ SHA512:
6
+ metadata.gz: 8bf48214acaf78491f3c6f5b1a7bed50e500b14404de60621cf8820c0904810929280ca445df7c29502de336da98b9c79c3dfb0527b29a533aeb497ace93f474
7
+ data.tar.gz: 4a6658e1cf4dbc6b8194b694fb5190d5567da79a03a47329684185ae9bd9b93af0f2556f7bf92b1677b01865f050dc56294e1342494fd8992dcb5a9e6706119d
data/.gitignore ADDED
@@ -0,0 +1,10 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
10
+ /vendor/bundle/
data/.travis.yml ADDED
@@ -0,0 +1,4 @@
1
+ language: ruby
2
+ rvm:
3
+ - 2.2.2
4
+ before_install: gem install bundler -v 1.10.6
data/Gemfile ADDED
@@ -0,0 +1,16 @@
1
+ source 'https://rubygems.org'
2
+
3
+ group :development, :test do
4
+ gem 'pry'
5
+ gem 'pry-doc'
6
+ gem 'pry-byebug'
7
+ gem 'binding_of_caller'
8
+ gem 'awesome_print'
9
+ end
10
+
11
+ group :test do
12
+ gem "minitest"
13
+ gem "minitest-power_assert"
14
+ end
15
+
16
+ gemspec
data/README.md ADDED
@@ -0,0 +1,42 @@
1
+ # Saikoro
2
+
3
+ [![Gem Version](https://badge.fury.io/rb/saikoro.svg)](http://badge.fury.io/rb/saikoro)
4
+ [![Build Status](https://travis-ci.org/ttanimichi/saikoro.svg)](https://travis-ci.org/ttanimichi/saikoro)
5
+
6
+ Random String generator.
7
+
8
+ ## Installation
9
+
10
+ Add this line to your application's Gemfile:
11
+
12
+ ```ruby
13
+ gem 'saikoro'
14
+ ```
15
+
16
+ And then execute:
17
+
18
+ $ bundle
19
+
20
+ Or install it yourself as:
21
+
22
+ $ gem install saikoro
23
+
24
+ ## Usage
25
+
26
+ ```ruby
27
+ Saikoro.alphanumerics
28
+ #=> "YMbx24GE"
29
+
30
+ Saikoro.alphanumerics(length: 16)
31
+ #=> "fAZHtI8bxifylKJf"
32
+ ```
33
+
34
+ ## Development
35
+
36
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
37
+
38
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
39
+
40
+ ## Contributing
41
+
42
+ Bug reports and pull requests are welcome on GitHub at https://github.com/ttanimichi/saikoro.
data/Rakefile ADDED
@@ -0,0 +1,10 @@
1
+ require "bundler/gem_tasks"
2
+ require "rake/testtask"
3
+
4
+ Rake::TestTask.new(:test) do |t|
5
+ t.libs << "test"
6
+ t.libs << "lib"
7
+ t.test_files = FileList['test/**/*_test.rb']
8
+ end
9
+
10
+ task :default => :test
data/bin/console ADDED
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "saikoro"
5
+
6
+ # You can add fixtures and/or initialization code here to make experimenting
7
+ # with your gem easier. You can also use a different console, if you like.
8
+
9
+ # (If you use this, don't forget to add pry to your Gemfile!)
10
+ # require "pry"
11
+ # Pry.start
12
+
13
+ require "irb"
14
+ IRB.start
data/bin/setup ADDED
@@ -0,0 +1,7 @@
1
+ #!/bin/bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+
5
+ bundle install
6
+
7
+ # Do any other automated setup that you need to do here
data/lib/saikoro.rb ADDED
@@ -0,0 +1,15 @@
1
+ require "saikoro/version"
2
+
3
+ module Saikoro
4
+ class << self
5
+ def alphanumerics(length: 8)
6
+ Array.new(length).map { candidates.sample }.join
7
+ end
8
+
9
+ private
10
+
11
+ def candidates
12
+ @candidates ||= ['0'..'9', 'a'..'z', 'A'..'Z'].map(&:to_a).flatten
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,3 @@
1
+ module Saikoro
2
+ VERSION = "0.1.0"
3
+ end
data/saikoro.gemspec ADDED
@@ -0,0 +1,21 @@
1
+ lib = File.expand_path('../lib', __FILE__)
2
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
+ require 'saikoro/version'
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = "saikoro"
7
+ spec.version = Saikoro::VERSION
8
+ spec.authors = ["Tsukuru Tanimichi"]
9
+ spec.email = ["ttanimichi@hotmail.com"]
10
+
11
+ spec.summary = %q{Random String generator}
12
+ spec.homepage = "https://github.com/ttanimichi/saikoro"
13
+
14
+ spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
15
+ spec.bindir = "exe"
16
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
17
+ spec.require_paths = ["lib"]
18
+
19
+ spec.add_development_dependency "bundler", "~> 1.10"
20
+ spec.add_development_dependency "rake", "~> 10.0"
21
+ end
metadata ADDED
@@ -0,0 +1,82 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: saikoro
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Tsukuru Tanimichi
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2015-09-09 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.10'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.10'
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.0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '10.0'
41
+ description:
42
+ email:
43
+ - ttanimichi@hotmail.com
44
+ executables: []
45
+ extensions: []
46
+ extra_rdoc_files: []
47
+ files:
48
+ - ".gitignore"
49
+ - ".travis.yml"
50
+ - Gemfile
51
+ - README.md
52
+ - Rakefile
53
+ - bin/console
54
+ - bin/setup
55
+ - lib/saikoro.rb
56
+ - lib/saikoro/version.rb
57
+ - saikoro.gemspec
58
+ homepage: https://github.com/ttanimichi/saikoro
59
+ licenses: []
60
+ metadata: {}
61
+ post_install_message:
62
+ rdoc_options: []
63
+ require_paths:
64
+ - lib
65
+ required_ruby_version: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - ">="
68
+ - !ruby/object:Gem::Version
69
+ version: '0'
70
+ required_rubygems_version: !ruby/object:Gem::Requirement
71
+ requirements:
72
+ - - ">="
73
+ - !ruby/object:Gem::Version
74
+ version: '0'
75
+ requirements: []
76
+ rubyforge_project:
77
+ rubygems_version: 2.4.5
78
+ signing_key:
79
+ specification_version: 4
80
+ summary: Random String generator
81
+ test_files: []
82
+ has_rdoc: