raheui 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,7 @@
1
1
  ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- ZDU3ZTkwN2FmMzdiN2UyMDhhYzMzODAzZDk5M2QyNjBiY2ZlYzA4Yg==
5
- data.tar.gz: !binary |-
6
- MmUwMzM0MmFjZjM1YWE3OGY0ZjZmMzQ3YzY4MWQxY2E4NTQ2ZTUyNw==
2
+ SHA1:
3
+ metadata.gz: 581e586d5ff682536275cb9ef04f4ab11aa12301
4
+ data.tar.gz: 07e843cb59fe5de5caa9e94c1b3ec5b96525f5de
7
5
  SHA512:
8
- metadata.gz: !binary |-
9
- YWE3M2EzNzgwZGZhY2M3YTViZTk1NDM2NGJjN2Q3NDI3YzMxZGFlODE4Njk4
10
- MzhmY2MxZWMwNzM4OWUxY2I0OTZiNmI5MDU3NzcxMzFlOGRmNTI3ODlhZTE2
11
- ZDE2N2JmNGFhMTg3OTAyZWNlY2FlMWU2YzE0NTg3ZjBkMjdiOGU=
12
- data.tar.gz: !binary |-
13
- ODFiMGFiM2JkOWFhM2U3MTgwZTc0MDdkNTA0NjQ5YjZlMTkzOGVmZmJiYmZl
14
- YThhYjcwNzcxOTU1YjJjODAyMDc4NGMwNzA3MjA1ZDg4ZGY3YzZhOGQ3NDBk
15
- ZDYzYzc5N2EzZDU4OTNmNDAwYzQxZjFlZjc1MjJjNjY4MWM3MjI=
6
+ metadata.gz: d8bc571645db7369416ad9f80015d97ba61cf5523fd347be21f6ab5a346ec1d4bf6c9654cca2059fd3f1e8cd0c5d5946ceb61a84fab97df683072b288b6b47dc
7
+ data.tar.gz: 39ae310c94eb6cc0466f79094973bce74ed5d4b8608c2e5068763399abf26157b7ff125f021a7ee4f68a03bc41e84b592895de1d2e3f0f0b3105a333fa3c3ce2
data/.rubocop.yml CHANGED
@@ -12,3 +12,6 @@ Style/AsciiComments:
12
12
  - 'lib/raheui/code.rb'
13
13
  - 'lib/raheui/runner.rb'
14
14
  - 'spec/raheui/code_spec.rb'
15
+
16
+ Style/Encoding:
17
+ Enabled: true
data/.rubocop_todo.yml CHANGED
@@ -1,5 +1,5 @@
1
1
  # This configuration was generated by `rubocop --auto-gen-config`
2
- # on 2014-08-25 21:02:20 +0900 using RuboCop version 0.25.0.
2
+ # on 2014-09-07 02:19:23 +0900 using RuboCop version 0.26.0.
3
3
  # The point is for the user to remove these configuration records
4
4
  # one by one as the offenses are removed from the code base.
5
5
  # Note that changes in the inspected code, or installation of new
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.0.1 (2014-09-09)
4
+
5
+ - Improve performance of `Code#consonants`
6
+
3
7
  ## 1.0.0 (2014-08-26)
4
8
 
5
9
  - First release
data/Gemfile CHANGED
@@ -1,4 +1,5 @@
1
1
  # encoding: utf-8
2
+
2
3
  source 'https://rubygems.org'
3
4
 
4
5
  gemspec
data/README.md CHANGED
@@ -1,5 +1,6 @@
1
1
  # Raheui
2
2
 
3
+ [![Gem Version](https://badge.fury.io/rb/raheui.svg)](http://badge.fury.io/rb/raheui)
3
4
  [![Build Status](https://travis-ci.org/yous/raheui.svg?branch=master)](https://travis-ci.org/yous/raheui)
4
5
  [![Dependency Status](https://gemnasium.com/yous/raheui.svg)](https://gemnasium.com/yous/raheui)
5
6
  [![Code Climate](https://codeclimate.com/github/yous/raheui/badges/gpa.svg)](https://codeclimate.com/github/yous/raheui)
@@ -37,7 +38,7 @@ raheui -h
37
38
  ```
38
39
 
39
40
  Command flag | Description
40
- -------------------------------------
41
+ ----------------|--------------------
41
42
  `-h, --help` | Print this message.
42
43
  `-v, --version` | Print version.
43
44
 
data/Rakefile CHANGED
@@ -1,4 +1,5 @@
1
1
  # encoding: utf-8
2
+
2
3
  require 'bundler/gem_tasks'
3
4
 
4
5
  require 'rspec/core/rake_task'
data/lib/raheui/cli.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  # encoding: utf-8
2
+
2
3
  module Raheui
3
4
  # Handle command line interfaces logic.
4
5
  class CLI
data/lib/raheui/code.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  # encoding: utf-8
2
+
2
3
  module Raheui
3
4
  # Store code object.
4
5
  class Code
@@ -92,9 +93,9 @@ module Raheui
92
93
  # Returns an Array of index of consonants or empty Array if the character is
93
94
  # not an Korean alphabet.
94
95
  def consonants(ch)
95
- case ch
96
- when '가'..'힣'
97
- index = ch.ord - ''.ord
96
+ case ch.ord
97
+ when 44_032..55_203 # '가'..'힣'
98
+ index = ch.ord - 44_032 #
98
99
  [index / (MEDIAL_CONSONANTS * FINAL_CONSONANTS),
99
100
  (index / FINAL_CONSONANTS) % MEDIAL_CONSONANTS,
100
101
  index % FINAL_CONSONANTS]
data/lib/raheui/io.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  # encoding: utf-8
2
+
2
3
  module Raheui
3
4
  # IO methods for user input and output.
4
5
  module IO
data/lib/raheui/option.rb CHANGED
@@ -1,4 +1,7 @@
1
1
  # encoding: utf-8
2
+
3
+ require 'optparse'
4
+
2
5
  module Raheui
3
6
  # Handle command line options.
4
7
  class Option
data/lib/raheui/port.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  # encoding: utf-8
2
+
2
3
  module Raheui
3
4
  # Port class for Aheui.
4
5
  class Port < Store
data/lib/raheui/queue.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  # encoding: utf-8
2
+
2
3
  module Raheui
3
4
  # Queue class for Aheui.
4
5
  class Queue < Store
data/lib/raheui/runner.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  # encoding: utf-8
2
+
2
3
  module Raheui
3
4
  # Run Aheui code.
4
5
  class Runner
data/lib/raheui/stack.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  # encoding: utf-8
2
+
2
3
  module Raheui
3
4
  # Stack class for Aheui.
4
5
  class Stack < Store
data/lib/raheui/store.rb CHANGED
@@ -1,4 +1,7 @@
1
1
  # encoding: utf-8
2
+
3
+ require 'forwardable'
4
+
2
5
  module Raheui
3
6
  # Base Store class for Aheui. Every child classes should implement push, pop
4
7
  # and swap method.
@@ -1,7 +1,8 @@
1
1
  # encoding: utf-8
2
+
2
3
  module Raheui
3
4
  # Holds the Raheui version information.
4
5
  module Version
5
- STRING = '1.0.0'
6
+ STRING = '1.0.1'
6
7
  end
7
8
  end
data/lib/raheui.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  # encoding: utf-8
2
+
2
3
  require 'raheui/version'
3
4
 
4
- require 'forwardable'
5
5
  require 'raheui/store'
6
6
  require 'raheui/stack'
7
7
  require 'raheui/queue'
@@ -11,6 +11,5 @@ require 'raheui/io'
11
11
  require 'raheui/code'
12
12
  require 'raheui/runner'
13
13
 
14
- require 'optparse'
15
14
  require 'raheui/option'
16
15
  require 'raheui/cli'
data/raheui.gemspec CHANGED
@@ -1,4 +1,5 @@
1
1
  # coding: utf-8
2
+
2
3
  lib = File.expand_path('../lib', __FILE__)
3
4
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
5
  require 'raheui/version'
@@ -21,6 +22,6 @@ Gem::Specification.new do |spec|
21
22
  spec.add_development_dependency 'bundler', '~> 1.6'
22
23
  spec.add_development_dependency 'rake', '~> 10.0'
23
24
  spec.add_development_dependency 'rspec', '~> 3.0'
24
- spec.add_development_dependency 'rubocop', '~> 0.25.0'
25
+ spec.add_development_dependency 'rubocop', '~> 0.26.0'
25
26
  spec.add_development_dependency 'simplecov', '~> 0.9'
26
27
  end
@@ -1,4 +1,5 @@
1
1
  # encoding: utf-8
2
+
2
3
  require 'spec_helper'
3
4
 
4
5
  describe Raheui::CLI do
@@ -1,4 +1,5 @@
1
1
  # encoding: utf-8
2
+
2
3
  require 'spec_helper'
3
4
 
4
5
  describe Raheui::Code do
@@ -1,4 +1,5 @@
1
1
  # encoding: utf-8
2
+
2
3
  require 'spec_helper'
3
4
 
4
5
  describe Raheui::IO do
@@ -1,4 +1,5 @@
1
1
  # encoding: utf-8
2
+
2
3
  require 'spec_helper'
3
4
 
4
5
  describe Raheui::Option do
@@ -1,4 +1,5 @@
1
1
  # encoding: utf-8
2
+
2
3
  require 'spec_helper'
3
4
 
4
5
  describe Raheui::Port do
@@ -1,4 +1,5 @@
1
1
  # encoding: utf-8
2
+
2
3
  require 'spec_helper'
3
4
 
4
5
  describe Raheui::Queue do
@@ -1,4 +1,5 @@
1
1
  # encoding: utf-8
2
+
2
3
  require 'spec_helper'
3
4
 
4
5
  shared_examples 'a runner' do
@@ -1,4 +1,5 @@
1
1
  # encoding: utf-8
2
+
2
3
  require 'spec_helper'
3
4
 
4
5
  describe Raheui::Stack do
@@ -1,4 +1,5 @@
1
1
  # encoding: utf-8
2
+
2
3
  require 'spec_helper'
3
4
 
4
5
  describe Raheui::Store do
@@ -1,4 +1,5 @@
1
1
  # encoding: utf-8
2
+
2
3
  require 'spec_helper'
3
4
 
4
5
  describe Raheui::Version do
data/spec/spec_helper.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  # encoding: utf-8
2
+
2
3
  if ENV['TRAVIS'] || ENV['COVERAGE']
3
4
  require 'simplecov'
4
5
 
@@ -1,4 +1,5 @@
1
1
  # encoding: utf-8
2
+
2
3
  require 'fileutils'
3
4
 
4
5
  # Util methods for processing file.
@@ -1,4 +1,5 @@
1
1
  # encoding: utf-8
2
+
2
3
  require 'tmpdir'
3
4
 
4
5
  shared_context 'isolated environment' do
@@ -1,4 +1,5 @@
1
1
  # encoding: utf-8
2
+
2
3
  require 'spec_helper'
3
4
 
4
5
  shared_examples 'a store' do
metadata CHANGED
@@ -1,83 +1,83 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: raheui
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - ChaYoung You
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-08-26 00:00:00.000000000 Z
11
+ date: 2014-09-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: '1.6'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ~>
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '1.6'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ~>
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
33
  version: '10.0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ~>
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '10.0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rspec
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ~>
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
47
  version: '3.0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ~>
52
+ - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '3.0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rubocop
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ~>
59
+ - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: 0.25.0
61
+ version: 0.26.0
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ~>
66
+ - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: 0.25.0
68
+ version: 0.26.0
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: simplecov
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - ~>
73
+ - - "~>"
74
74
  - !ruby/object:Gem::Version
75
75
  version: '0.9'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - ~>
80
+ - - "~>"
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0.9'
83
83
  description: Aheui interpreter in Ruby.
@@ -88,11 +88,11 @@ executables:
88
88
  extensions: []
89
89
  extra_rdoc_files: []
90
90
  files:
91
- - .gitignore
92
- - .rspec
93
- - .rubocop.yml
94
- - .rubocop_todo.yml
95
- - .travis.yml
91
+ - ".gitignore"
92
+ - ".rspec"
93
+ - ".rubocop.yml"
94
+ - ".rubocop_todo.yml"
95
+ - ".travis.yml"
96
96
  - CHANGELOG.md
97
97
  - Gemfile
98
98
  - LICENSE.txt
@@ -136,12 +136,12 @@ require_paths:
136
136
  - lib
137
137
  required_ruby_version: !ruby/object:Gem::Requirement
138
138
  requirements:
139
- - - ! '>='
139
+ - - ">="
140
140
  - !ruby/object:Gem::Version
141
141
  version: '0'
142
142
  required_rubygems_version: !ruby/object:Gem::Requirement
143
143
  requirements:
144
- - - ! '>='
144
+ - - ">="
145
145
  - !ruby/object:Gem::Version
146
146
  version: '0'
147
147
  requirements: []