gemfile_beautify 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/bin/gemfile_beautify +2 -2
- data/lib/gemfile_beautify.rb +9 -2
- metadata +1 -1
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA1:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: fb580fdfaa2c8ae409071fd4a4e795f868077fc9
         | 
| 4 | 
            +
              data.tar.gz: aeb9c207bee95de5429a80cc91882d98b849b7d2
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: d9cc301f58db56ab9e6ad0441812c6e369ed9d2620c5831573425742364b96e73155b461f8c7bfb8b380278bf01ce125a39ecfdfff455df7792de00ae6340691
         | 
| 7 | 
            +
              data.tar.gz: 90ff389156a1354cd8e36396c35e8b52312d9f51595b49a0bdc340bf60b7be1e0836fbe3a171cd22b21a4aa99cb913989ad6fbfa2130c37ca9d7af2fa458ccb1
         | 
    
        data/bin/gemfile_beautify
    CHANGED
    
    
    
        data/lib/gemfile_beautify.rb
    CHANGED
    
    | @@ -1,5 +1,12 @@ | |
| 1 1 | 
             
            class GemFileBeautify
         | 
| 2 | 
            -
              def self. | 
| 3 | 
            -
                 | 
| 2 | 
            +
              def self.process
         | 
| 3 | 
            +
                current_project = `pwd`
         | 
| 4 | 
            +
                output = current_project.gsub(/\n/,"")
         | 
| 5 | 
            +
                content = File.read(output + "/Gemfile")
         | 
| 6 | 
            +
                content = content.gsub(/\#\s.*\s*/,"")
         | 
| 7 | 
            +
                content = content.gsub(/'/, '"')
         | 
| 8 | 
            +
                content = content.gsub(/\s*^group/, "\n\ngroup")
         | 
| 9 | 
            +
                content = content.gsub(/\s*^\s+^gem/, "\n\ngem")
         | 
| 10 | 
            +
                File.open(output + "/a", 'w') {|file| file.puts content}
         | 
| 4 11 | 
             
              end
         | 
| 5 12 | 
             
            end
         |