multi_string_replace 0.1.0 → 1.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/.gitignore +1 -0
 - data/Gemfile.lock +4 -14
 - data/LICENSE.txt +1 -1
 - data/README.md +40 -3
 - data/bin/benchmark.rb +4 -3
 - data/ext/multi_string_replace/aho_trie.c +58 -73
 - data/ext/multi_string_replace/aho_trie.h +3 -0
 - data/ext/multi_string_replace/ahocorasick.c +28 -4
 - data/ext/multi_string_replace/ahocorasick.h +15 -1
 - data/ext/multi_string_replace/multi_string_replace.c +37 -9
 - data/lib/multi_string_replace.rb +11 -1
 - data/lib/multi_string_replace/version.rb +1 -1
 - data/multi_string_replace.gemspec +4 -5
 - data/replaced.txt +651 -0
 - data/replaced2.txt +651 -0
 - metadata +10 -20
 
    
        metadata
    CHANGED
    
    | 
         @@ -1,14 +1,14 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: multi_string_replace
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version:  
     | 
| 
      
 4 
     | 
    
         
            +
              version: 1.0.4
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Joseph Dayo
         
     | 
| 
       8 
8 
     | 
    
         
             
            autorequire: 
         
     | 
| 
       9 
9 
     | 
    
         
             
            bindir: exe
         
     | 
| 
       10 
10 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       11 
     | 
    
         
            -
            date:  
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2020-12-15 00:00:00.000000000 Z
         
     | 
| 
       12 
12 
     | 
    
         
             
            dependencies:
         
     | 
| 
       13 
13 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       14 
14 
     | 
    
         
             
              name: bundler
         
     | 
| 
         @@ -25,7 +25,7 @@ dependencies: 
     | 
|
| 
       25 
25 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       26 
26 
     | 
    
         
             
                    version: '1.16'
         
     | 
| 
       27 
27 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       28 
     | 
    
         
            -
              name:  
     | 
| 
      
 28 
     | 
    
         
            +
              name: rake
         
     | 
| 
       29 
29 
     | 
    
         
             
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
       30 
30 
     | 
    
         
             
                requirements:
         
     | 
| 
       31 
31 
     | 
    
         
             
                - - ">="
         
     | 
| 
         @@ -38,20 +38,6 @@ dependencies: 
     | 
|
| 
       38 
38 
     | 
    
         
             
                - - ">="
         
     | 
| 
       39 
39 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       40 
40 
     | 
    
         
             
                    version: '0'
         
     | 
| 
       41 
     | 
    
         
            -
            - !ruby/object:Gem::Dependency
         
     | 
| 
       42 
     | 
    
         
            -
              name: rake
         
     | 
| 
       43 
     | 
    
         
            -
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
       44 
     | 
    
         
            -
                requirements:
         
     | 
| 
       45 
     | 
    
         
            -
                - - "~>"
         
     | 
| 
       46 
     | 
    
         
            -
                  - !ruby/object:Gem::Version
         
     | 
| 
       47 
     | 
    
         
            -
                    version: '10.0'
         
     | 
| 
       48 
     | 
    
         
            -
              type: :development
         
     | 
| 
       49 
     | 
    
         
            -
              prerelease: false
         
     | 
| 
       50 
     | 
    
         
            -
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
       51 
     | 
    
         
            -
                requirements:
         
     | 
| 
       52 
     | 
    
         
            -
                - - "~>"
         
     | 
| 
       53 
     | 
    
         
            -
                  - !ruby/object:Gem::Version
         
     | 
| 
       54 
     | 
    
         
            -
                    version: '10.0'
         
     | 
| 
       55 
41 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       56 
42 
     | 
    
         
             
              name: rspec
         
     | 
| 
       57 
43 
     | 
    
         
             
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
         @@ -80,7 +66,8 @@ dependencies: 
     | 
|
| 
       80 
66 
     | 
    
         
             
                - - ">="
         
     | 
| 
       81 
67 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       82 
68 
     | 
    
         
             
                    version: '0'
         
     | 
| 
       83 
     | 
    
         
            -
            description:  
     | 
| 
      
 69 
     | 
    
         
            +
            description: A fast multiple string replace library for ruby. Uses a C implementation
         
     | 
| 
      
 70 
     | 
    
         
            +
              of the Aho–Corasick Algorithm
         
     | 
| 
       84 
71 
     | 
    
         
             
            email:
         
     | 
| 
       85 
72 
     | 
    
         
             
            - joseph.dayo@gmail.com
         
     | 
| 
       86 
73 
     | 
    
         
             
            executables: []
         
     | 
| 
         @@ -112,7 +99,9 @@ files: 
     | 
|
| 
       112 
99 
     | 
    
         
             
            - lib/multi_string_replace.rb
         
     | 
| 
       113 
100 
     | 
    
         
             
            - lib/multi_string_replace/version.rb
         
     | 
| 
       114 
101 
     | 
    
         
             
            - multi_string_replace.gemspec
         
     | 
| 
       115 
     | 
    
         
            -
             
     | 
| 
      
 102 
     | 
    
         
            +
            - replaced.txt
         
     | 
| 
      
 103 
     | 
    
         
            +
            - replaced2.txt
         
     | 
| 
      
 104 
     | 
    
         
            +
            homepage: https://github.com/jedld/multi_string_replace
         
     | 
| 
       116 
105 
     | 
    
         
             
            licenses:
         
     | 
| 
       117 
106 
     | 
    
         
             
            - MIT
         
     | 
| 
       118 
107 
     | 
    
         
             
            metadata:
         
     | 
| 
         @@ -136,5 +125,6 @@ rubyforge_project: 
     | 
|
| 
       136 
125 
     | 
    
         
             
            rubygems_version: 2.7.7
         
     | 
| 
       137 
126 
     | 
    
         
             
            signing_key: 
         
     | 
| 
       138 
127 
     | 
    
         
             
            specification_version: 4
         
     | 
| 
       139 
     | 
    
         
            -
            summary:  
     | 
| 
      
 128 
     | 
    
         
            +
            summary: A fast multiple string replace library for ruby. Uses a C implementation
         
     | 
| 
      
 129 
     | 
    
         
            +
              of the Aho–Corasick Algorithm
         
     | 
| 
       140 
130 
     | 
    
         
             
            test_files: []
         
     |