cipher_word 1.0.2 → 1.0.3

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: c7d05abcefdd1f3b84a364eb0e6175344d4e5d68
4
- data.tar.gz: e3033aae698a9add853644f244132d809c76c5ab
3
+ metadata.gz: 86f8cd352f9a16a82e5d6989314aaea1fe2750bc
4
+ data.tar.gz: 515172e204deb1d2c994d70854023d720220a611
5
5
  SHA512:
6
- metadata.gz: c64aafd03c524161659eb14354b2b17740c4a6e68aec0f4f451dfb7297694d94faa7bf2f842a026023c4dc49a8c4989768a844e55c0dfdd8c8f8f8444540871e
7
- data.tar.gz: 130a005da23e7c3cbc722083f3fc5d1f95df90a800c7583be3d2019dd96d11d67ad4bc55bc3410a9f1338699bc8c415ac2c78777bb280103f1b35b76bd7d1634
6
+ metadata.gz: ee625c290bad2475495409742f9c33f42100840930370ba2b5d3925c9f20f5980f97876263da1c9d4744fb7d8822b2e713c72f3f3bba53387bcc723aa6868ab7
7
+ data.tar.gz: 5e35b575945a8f24093378c943f95dbfa24b25633ce87c8bd86cb91a41a368869c7b73df2af49eda27091ec4a1966b0f5b8d4538b525fda8f34d4438441b560a
data/README.md CHANGED
@@ -20,8 +20,10 @@ Or install it yourself as:
20
20
 
21
21
  ## Usage
22
22
 
23
- cipher : Convert Caesar cipher arguments
24
- decoding : Decipher the Caesar cipher
23
+ ```ruby
24
+ CipherWord.cipher 'yutainoue' => "zvubjopvf"
25
+ CipherWord.decoding 'zvubjopvf' => "yutainoue"
26
+ ```
25
27
 
26
28
  ## Contributing
27
29
 
data/Rakefile CHANGED
@@ -1,2 +1,8 @@
1
1
  require "bundler/gem_tasks"
2
+ require 'rake/testtask'
2
3
 
4
+ Rake::TestTask.new do |t|
5
+ t.pattern = 'test/test_*.rb'
6
+ end
7
+
8
+ task default: :test
data/cipher_word.gemspec CHANGED
@@ -20,4 +20,5 @@ Gem::Specification.new do |spec|
20
20
 
21
21
  spec.add_development_dependency "bundler", "~> 1.6"
22
22
  spec.add_development_dependency "rake", "~> 10.0"
23
+ spec.add_development_dependency "minitest"
23
24
  end
@@ -1,3 +1,3 @@
1
1
  module CipherWord
2
- VERSION = "1.0.2"
2
+ VERSION = "1.0.3"
3
3
  end
@@ -0,0 +1,18 @@
1
+ # encoding: utf-8
2
+ require 'minitest/autorun'
3
+ require 'minitest/unit'
4
+ require_relative '../lib/cipher_word'
5
+
6
+ class TestCipherWord < MiniTest::Test
7
+ def test_cipher
8
+ assert_equal CipherWord.cipher('Jean Valjean'), 'Kfbo!Wbmkfbo'
9
+ assert_equal CipherWord.cipher('Bishop Myriel'), 'Cjtipq!Nzsjfm'
10
+ assert_equal CipherWord.cipher('Cosette'), 'Dptfuuf'
11
+ end
12
+
13
+ def test_decoding
14
+ assert_equal CipherWord.decoding('Kfbo!Wbmkfbo'), 'Jean Valjean'
15
+ assert_equal CipherWord.decoding('Cjtipq!Nzsjfm'), 'Bishop Myriel'
16
+ assert_equal CipherWord.decoding('Dptfuuf'), 'Cosette'
17
+ end
18
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cipher_word
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - yutainoue
@@ -38,6 +38,20 @@ dependencies:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '10.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: minitest
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
41
55
  description: For decryption and encryption of the word
42
56
  email:
43
57
  - yutainoue009@gmail.com
@@ -53,6 +67,7 @@ files:
53
67
  - cipher_word.gemspec
54
68
  - lib/cipher_word.rb
55
69
  - lib/cipher_word/version.rb
70
+ - test/test_cipher_word.rb
56
71
  homepage: https://github.com/yutainoue0077/cipher_word
57
72
  licenses:
58
73
  - MIT
@@ -77,4 +92,5 @@ rubygems_version: 2.4.1
77
92
  signing_key:
78
93
  specification_version: 4
79
94
  summary: For decryption and encryption of the word
80
- test_files: []
95
+ test_files:
96
+ - test/test_cipher_word.rb