mindwords 0.5.6 → 0.5.7
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
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/lib/mindwords.rb +44 -3
- metadata +2 -2
- metadata.gz.sig +0 -0
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA256:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 4766e91a6c371e9d2e8849bafdd77cea548cf43d76630a9400f0ec3b2b778953
         | 
| 4 | 
            +
              data.tar.gz: 3f17f99a76ea226ca636f7c8c3ecf24e0e1b8c79571fd299d5dfa00bc10f9d63
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 55c7625e72007789f37b6968271655a772d3d1696991b05f112a39f2ca4b437da71ce5795375887b0b908074bdbd3d2104f0a602aa37f46b518263e2eb2d07e7
         | 
| 7 | 
            +
              data.tar.gz: 4d5174c595015db117857d1e9db0b8d211d541136f83cf27e08d84bd86768f0b34e53692579f6d12a5a0931fcf3cc9939ff4deac689276cbedc8c095c8a3bf55
         | 
    
        checksums.yaml.gz.sig
    CHANGED
    
    | Binary file | 
    
        data.tar.gz.sig
    CHANGED
    
    | Binary file | 
    
        data/lib/mindwords.rb
    CHANGED
    
    | @@ -121,8 +121,28 @@ class MindWords | |
| 121 121 | 
             
                e = element(keyword.downcase.gsub(/ +/,'-'))
         | 
| 122 122 |  | 
| 123 123 | 
             
                return nil if e.nil?
         | 
| 124 | 
            +
             | 
| 125 | 
            +
                # find and add any linkage support lines
         | 
| 126 | 
            +
                #
         | 
| 127 | 
            +
                
         | 
| 128 | 
            +
                a3 = []
         | 
| 129 | 
            +
             | 
| 130 | 
            +
                a2.each do |line|
         | 
| 131 | 
            +
                  
         | 
| 132 | 
            +
                  line.chomp.scan(/#[^ ]+/).each do |hashtag|
         | 
| 133 | 
            +
                    
         | 
| 134 | 
            +
                    puts 'hashtag: ' + hashtag.inspect  if @debug
         | 
| 135 | 
            +
                    r2 = @lines.grep(/^#{hashtag[1..-1]} #/)
         | 
| 136 | 
            +
                    a3 << r2.first if r2        
         | 
| 137 | 
            +
                    
         | 
| 138 | 
            +
                  end
         | 
| 139 | 
            +
                end
         | 
| 140 | 
            +
             | 
| 141 | 
            +
                puts 'a2: ' + a2.inspect if @debug
         | 
| 142 | 
            +
                a2.concat a3
         | 
| 124 143 |  | 
| 125 | 
            -
                MindWords.new(a2.join, parent: e, debug: @debug)
         | 
| 144 | 
            +
                MindWords.new(a2.uniq.join, parent: e, debug: @debug)
         | 
| 145 | 
            +
                #MindWords.new(a2.uniq.join,  debug: @debug)
         | 
| 126 146 |  | 
| 127 147 | 
             
              end
         | 
| 128 148 |  | 
| @@ -283,10 +303,9 @@ class MindWords | |
| 283 303 |  | 
| 284 304 | 
             
                redundants.compact.each {|x| doc.element(x).delete }
         | 
| 285 305 |  | 
| 286 | 
            -
                
         | 
| 287 306 | 
             
                node = if @parent then
         | 
| 288 307 | 
             
                  found = doc.root.element('//' + @parent.name)
         | 
| 289 | 
            -
                  found ? found : doc.root
         | 
| 308 | 
            +
                  found ? found.parent : doc.root
         | 
| 290 309 | 
             
                else
         | 
| 291 310 | 
             
                  doc.root
         | 
| 292 311 | 
             
                end
         | 
| @@ -399,3 +418,25 @@ class MindWords | |
| 399 418 |  | 
| 400 419 | 
             
            end
         | 
| 401 420 |  | 
| 421 | 
            +
            class MindWordsWidget
         | 
| 422 | 
            +
             | 
| 423 | 
            +
              def initialize()
         | 
| 424 | 
            +
             | 
| 425 | 
            +
              end
         | 
| 426 | 
            +
             | 
| 427 | 
            +
              
         | 
| 428 | 
            +
              # can be used for main entries or a words list
         | 
| 429 | 
            +
              #
         | 
| 430 | 
            +
              def input(content: '', action: 'mwupdate', target: 'icontent')
         | 
| 431 | 
            +
             | 
| 432 | 
            +
            <<EOF
         | 
| 433 | 
            +
            <form action='#{action}' method='post' target='#{target}'>
         | 
| 434 | 
            +
              <textarea name='content' cols='30' rows='19'>
         | 
| 435 | 
            +
            #{content}
         | 
| 436 | 
            +
              </textarea>
         | 
| 437 | 
            +
              <input type='submit' value='Submit'/>
         | 
| 438 | 
            +
            </form>
         | 
| 439 | 
            +
            EOF
         | 
| 440 | 
            +
              end
         | 
| 441 | 
            +
             | 
| 442 | 
            +
            end
         | 
    
        metadata
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: mindwords
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 0.5. | 
| 4 | 
            +
              version: 0.5.7
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - James Robertson
         | 
| @@ -35,7 +35,7 @@ cert_chain: | |
| 35 35 | 
             
              aWH7D2AmhOpqNwWnPHzWR/yzpigAVTrvpHfRxZleQj6Z/090nIH2KR0RdioMmPFq
         | 
| 36 36 | 
             
              3+574KQzs/gR9Y5a+iMcvHRN
         | 
| 37 37 | 
             
              -----END CERTIFICATE-----
         | 
| 38 | 
            -
            date: 2021- | 
| 38 | 
            +
            date: 2021-04-07 00:00:00.000000000 Z
         | 
| 39 39 | 
             
            dependencies:
         | 
| 40 40 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 41 41 | 
             
              name: line-tree
         | 
    
        metadata.gz.sig
    CHANGED
    
    | Binary file |