greed-summary 0.1.3 → 0.1.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/Gemfile +1 -0
 - data/README.md +1 -1
 - data/exe/greed-summary +1 -1
 - data/lib/greed/summary.rb +12 -3
 - data/lib/greed/summary/version.rb +1 -1
 - metadata +3 -3
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA1:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: f701defe3d8c72e24bfdc009e581569f858cbc8c
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 0b0e3c491cd11a77f6ffdb47c6ea1b635935a988
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 21d7343bf679a778c0e049196ebcc6b22dfc01d5dcbff15a19c872370e624401c3fee4a20c62d652ecb78c9b0d225c4bafbcd691e8a51b7caa0cc97ad8e81a34
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: d2c333c0156566f4e83ad60195bb40d022d8848e0dd17d8f6296e8cf38cafbcc6037c3740974621181c2030203ff03627b7ac2725f7aa2bbf582a50e9998bed9
         
     | 
    
        data/Gemfile
    CHANGED
    
    
    
        data/README.md
    CHANGED
    
    | 
         @@ -42,7 +42,7 @@ greed-summary [OPTION] 
     | 
|
| 
       42 
42 
     | 
    
         
             
               output style ,could be 'github' or 'gitbook', default 'github'
         
     | 
| 
       43 
43 
     | 
    
         | 
| 
       44 
44 
     | 
    
         
             
            -a, --autotitle:
         
     | 
| 
       45 
     | 
    
         
            -
               auto set title  
     | 
| 
      
 45 
     | 
    
         
            +
               auto set file title from file content, set directory title from readme.md file content
         
     | 
| 
       46 
46 
     | 
    
         | 
| 
       47 
47 
     | 
    
         
             
            -e, --encode:
         
     | 
| 
       48 
48 
     | 
    
         
             
               url encode
         
     | 
    
        data/exe/greed-summary
    CHANGED
    
    | 
         @@ -67,7 +67,7 @@ greed-summary [OPTION] 
     | 
|
| 
       67 
67 
     | 
    
         
             
               output style ,could be 'github' or 'gitbook', default 'github'
         
     | 
| 
       68 
68 
     | 
    
         | 
| 
       69 
69 
     | 
    
         
             
            -a, --autotitle:
         
     | 
| 
       70 
     | 
    
         
            -
               auto set title  
     | 
| 
      
 70 
     | 
    
         
            +
               auto set file title from file content, set directory title from readme.md file content
         
     | 
| 
       71 
71 
     | 
    
         | 
| 
       72 
72 
     | 
    
         
             
            -e, --encode:
         
     | 
| 
       73 
73 
     | 
    
         
             
               url encode
         
     | 
    
        data/lib/greed/summary.rb
    CHANGED
    
    | 
         @@ -92,8 +92,17 @@ module Greed 
     | 
|
| 
       92 
92 
     | 
    
         
             
                          end
         
     | 
| 
       93 
93 
     | 
    
         | 
| 
       94 
94 
     | 
    
         
             
                          string = "    " * deep
         
     | 
| 
      
 95 
     | 
    
         
            +
             
     | 
| 
      
 96 
     | 
    
         
            +
                          readme = get_readme(fullPath)
         
     | 
| 
      
 97 
     | 
    
         
            +
             
     | 
| 
      
 98 
     | 
    
         
            +
                          if @autotitle && readme
         
     | 
| 
      
 99 
     | 
    
         
            +
                            title = get_title(fullPath + "/" + readme)
         
     | 
| 
      
 100 
     | 
    
         
            +
                          end
         
     | 
| 
      
 101 
     | 
    
         
            +
                          if !title || title.length == 0
         
     | 
| 
      
 102 
     | 
    
         
            +
                            title = file
         
     | 
| 
      
 103 
     | 
    
         
            +
                          end
         
     | 
| 
      
 104 
     | 
    
         
            +
             
     | 
| 
       95 
105 
     | 
    
         
             
                          if @style == "gitbook"
         
     | 
| 
       96 
     | 
    
         
            -
                            readme = get_readme(fullPath)
         
     | 
| 
       97 
106 
     | 
    
         
             
                            if readme
         
     | 
| 
       98 
107 
     | 
    
         
             
                              relativePath = relativePath + "/" + readme
         
     | 
| 
       99 
108 
     | 
    
         
             
                            else
         
     | 
| 
         @@ -106,9 +115,9 @@ module Greed 
     | 
|
| 
       106 
115 
     | 
    
         
             
                              relativePath = URI::encode(relativePath)
         
     | 
| 
       107 
116 
     | 
    
         
             
                            end
         
     | 
| 
       108 
117 
     | 
    
         
             
                            # puts("debug" + readme)
         
     | 
| 
       109 
     | 
    
         
            -
                            string = string + "* [" +  
     | 
| 
      
 118 
     | 
    
         
            +
                            string = string + "* [" + title + "](" + relativePath + ")"
         
     | 
| 
       110 
119 
     | 
    
         
             
                          else
         
     | 
| 
       111 
     | 
    
         
            -
                            string = string + "* " +  
     | 
| 
      
 120 
     | 
    
         
            +
                            string = string + "* " + title
         
     | 
| 
       112 
121 
     | 
    
         
             
                          end
         
     | 
| 
       113 
122 
     | 
    
         | 
| 
       114 
123 
     | 
    
         
             
                          summary.syswrite(string + "\n")
         
     | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,14 +1,14 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: greed-summary
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 0.1. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 0.1.4
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Bell
         
     | 
| 
       8 
8 
     | 
    
         
             
            autorequire: 
         
     | 
| 
       9 
9 
     | 
    
         
             
            bindir: exe
         
     | 
| 
       10 
10 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       11 
     | 
    
         
            -
            date: 2016-05- 
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2016-05-18 00:00:00.000000000 Z
         
     | 
| 
       12 
12 
     | 
    
         
             
            dependencies:
         
     | 
| 
       13 
13 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       14 
14 
     | 
    
         
             
              name: bundler
         
     | 
| 
         @@ -77,7 +77,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement 
     | 
|
| 
       77 
77 
     | 
    
         
             
                  version: '0'
         
     | 
| 
       78 
78 
     | 
    
         
             
            requirements: []
         
     | 
| 
       79 
79 
     | 
    
         
             
            rubyforge_project: 
         
     | 
| 
       80 
     | 
    
         
            -
            rubygems_version: 2.5.1
         
     | 
| 
      
 80 
     | 
    
         
            +
            rubygems_version: 2.4.5.1
         
     | 
| 
       81 
81 
     | 
    
         
             
            signing_key: 
         
     | 
| 
       82 
82 
     | 
    
         
             
            specification_version: 4
         
     | 
| 
       83 
83 
     | 
    
         
             
            summary: generate summary for markdown.
         
     |