auto-space 0.0.3 → 0.0.4
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 +4 -4
 - data/README.md +5 -0
 - data/lib/auto-space.rb +12 -7
 - metadata +2 -3
 - data/lib/auto-space/correct_words.rb +0 -18
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA1:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 74608e73db4f1dfbe8092db911abccb897048dae
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 9abac2ef490456892e5d846f0cb465a98bcf6e0e
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 6a044934afdbbb9c6f6e647a21feb66ed3535f4b788960b53b3e2b7eb1c84b28b27e01c7c7dfc2e32bee1da2daadfe5b7e337d0d9289306fd336efd2f084ad60
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: 1c605053a45f992faf3aefa8a1e4a6d3877c7f9f2c452797549fd72ec7419e36dccf73c0c9c0746723018d8b89c2a574c1b69a47482cf0ebb5610a0e9904f64c
         
     | 
    
        data/README.md
    CHANGED
    
    
    
        data/lib/auto-space.rb
    CHANGED
    
    | 
         @@ -1,18 +1,23 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            # coding: utf-8
         
     | 
| 
       2 
     | 
    
         
            -
            class String 
     | 
| 
      
 2 
     | 
    
         
            +
            class String
         
     | 
| 
       3 
3 
     | 
    
         
             
              def auto_space!
         
     | 
| 
       4 
     | 
    
         
            -
                self.gsub! /((?![年月日号])\p{Han})([a-zA-Z0-9+$@#\[\( 
     | 
| 
      
 4 
     | 
    
         
            +
                self.gsub! /((?![年月日号])\p{Han})([a-zA-Z0-9+$@#\[\(\/‘“])/u do
         
     | 
| 
       5 
5 
     | 
    
         
             
                  "#$1 #$2"
         
     | 
| 
       6 
6 
     | 
    
         
             
                end
         
     | 
| 
       7 
7 
     | 
    
         | 
| 
       8 
     | 
    
         
            -
                self.gsub! /([a-zA-Z0-9 
     | 
| 
      
 8 
     | 
    
         
            +
                self.gsub! /([a-zA-Z0-9+$’”\]\)@#!\/]|[\d[年月日]]{2,})((?![年月日号])\p{Han})/u do
         
     | 
| 
       9 
9 
     | 
    
         
             
                  "#$1 #$2"
         
     | 
| 
       10 
10 
     | 
    
         
             
                end
         
     | 
| 
       11 
11 
     | 
    
         | 
| 
       12 
     | 
    
         
            -
                 
     | 
| 
       13 
     | 
    
         
            -
             
     | 
| 
       14 
     | 
    
         
            -
             
     | 
| 
       15 
     | 
    
         
            -
             
     | 
| 
      
 12 
     | 
    
         
            +
                # Fix () [] near the English and number
         
     | 
| 
      
 13 
     | 
    
         
            +
                self.gsub! /([a-zA-Z0-9]+)([\[\(‘“])/u do
         
     | 
| 
      
 14 
     | 
    
         
            +
                  "#$1 #$2"
         
     | 
| 
      
 15 
     | 
    
         
            +
                end
         
     | 
| 
       16 
16 
     | 
    
         | 
| 
      
 17 
     | 
    
         
            +
                self.gsub! /([\)\]’”])([a-zA-Z0-9]+)/u do
         
     | 
| 
      
 18 
     | 
    
         
            +
                  "#$1 #$2"
         
     | 
| 
      
 19 
     | 
    
         
            +
                end
         
     | 
| 
      
 20 
     | 
    
         
            +
                
         
     | 
| 
      
 21 
     | 
    
         
            +
                self
         
     | 
| 
       17 
22 
     | 
    
         
             
              end
         
     | 
| 
       18 
23 
     | 
    
         
             
            end
         
     | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: auto-space
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 0.0. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 0.0.4
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Luikore
         
     | 
| 
         @@ -9,7 +9,7 @@ authors: 
     | 
|
| 
       9 
9 
     | 
    
         
             
            autorequire: 
         
     | 
| 
       10 
10 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       11 
11 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       12 
     | 
    
         
            -
            date: 2014-07- 
     | 
| 
      
 12 
     | 
    
         
            +
            date: 2014-07-14 00:00:00.000000000 Z
         
     | 
| 
       13 
13 
     | 
    
         
             
            dependencies:
         
     | 
| 
       14 
14 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       15 
15 
     | 
    
         
             
              name: activesupport
         
     | 
| 
         @@ -35,7 +35,6 @@ extra_rdoc_files: [] 
     | 
|
| 
       35 
35 
     | 
    
         
             
            files:
         
     | 
| 
       36 
36 
     | 
    
         
             
            - README.md
         
     | 
| 
       37 
37 
     | 
    
         
             
            - lib/auto-space.rb
         
     | 
| 
       38 
     | 
    
         
            -
            - lib/auto-space/correct_words.rb
         
     | 
| 
       39 
38 
     | 
    
         
             
            homepage: https://github.com/huacnlee/auto-space
         
     | 
| 
       40 
39 
     | 
    
         
             
            licenses: []
         
     | 
| 
       41 
40 
     | 
    
         
             
            metadata: {}
         
     | 
| 
         @@ -1,18 +0,0 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            module AutoSpace
         
     | 
| 
       2 
     | 
    
         
            -
              class CorrectWords
         
     | 
| 
       3 
     | 
    
         
            -
                class << self
         
     | 
| 
       4 
     | 
    
         
            -
                  def keywords
         
     | 
| 
       5 
     | 
    
         
            -
                    @keywords ||= %W(
         
     | 
| 
       6 
     | 
    
         
            -
                      GitHub MongoDB VIM Emacs MySQL PostgreSQL NoSQL MRI IT HR ENV GitLab API CNAME SQLite Git
         
     | 
| 
       7 
     | 
    
         
            -
                      Rails Ruby Assets Pipeline Bootstrap 
         
     | 
| 
       8 
     | 
    
         
            -
                      JS JavaScript Ajax HTML CSS HTML5 CSS3 jQuery Node.js CoffeeScript SASS SCSS AngularJS
         
     | 
| 
       9 
     | 
    
         
            -
                      ActiveRecord ActiveSupport ActiveModel ActiveResource ActionController ActionView ERB
         
     | 
| 
       10 
     | 
    
         
            -
                      OAuth OAuth2 OpenSSL SSL
         
     | 
| 
       11 
     | 
    
         
            -
                      RubyMine RSpec mRuby RubyTuesday TextMate EventMachine RVM rbenv
         
     | 
| 
       12 
     | 
    
         
            -
                      CentOS RHEL UCloud 
         
     | 
| 
       13 
     | 
    
         
            -
                      RubyConf RailsConf
         
     | 
| 
       14 
     | 
    
         
            -
                    )
         
     | 
| 
       15 
     | 
    
         
            -
                  end
         
     | 
| 
       16 
     | 
    
         
            -
                end
         
     | 
| 
       17 
     | 
    
         
            -
              end
         
     | 
| 
       18 
     | 
    
         
            -
            end
         
     |