coaster 1.3.29 → 1.3.30
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/coaster +13 -0
- data/lib/coaster/git/repository.rb +10 -2
- data/lib/coaster/version.rb +1 -1
- metadata +7 -3
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA256:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: aac619d5b87a41007fed3589618ba253e33307659e17aa689d06898e9a11042b
         | 
| 4 | 
            +
              data.tar.gz: 362d24aedcb8cd9c462a50b059bb51ec7ba65dfee97d8a26dab85a3a2ab46035
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: c19b75ef110edf238f8423add0213c37f3f88a9d3f3442a6fc9b368acfa48603d6c7beed391ac5802983b9e0d92e930d69014847dd6c8e7e082e73d34f9c73e2
         | 
| 7 | 
            +
              data.tar.gz: 6a756b8db4c72bb2aa6b91a59fe94e98acc895c8263bf751a08661da0abf1d92bf1b68602ead812fcacfd751a13654c7672d681a6a360cb29d871de8ff22b43b
         | 
    
        data/bin/coaster
    ADDED
    
    | @@ -0,0 +1,13 @@ | |
| 1 | 
            +
            #!/usr/bin/env ruby
         | 
| 2 | 
            +
             | 
| 3 | 
            +
            require 'coaster'
         | 
| 4 | 
            +
            require 'coaster/git'
         | 
| 5 | 
            +
             | 
| 6 | 
            +
            command = ARGV.shift
         | 
| 7 | 
            +
            if command == 'git'
         | 
| 8 | 
            +
              repo = Git::Repository.new(Dir.pwd)
         | 
| 9 | 
            +
              subcommand = ARGV.shift
         | 
| 10 | 
            +
              repo.send(subcommand, *ARGV)
         | 
| 11 | 
            +
            else
         | 
| 12 | 
            +
              puts "Unknown command: #{command}"
         | 
| 13 | 
            +
            end
         | 
| @@ -3,6 +3,14 @@ module Coaster | |
| 3 3 | 
             
                class Repository
         | 
| 4 4 | 
             
                  class << self
         | 
| 5 5 | 
             
                    def option_parser(options)
         | 
| 6 | 
            +
                      case options
         | 
| 7 | 
            +
                      when Hash then hash_option_parser(options)
         | 
| 8 | 
            +
                      when Array, Set then options.map{|o| option_parser(o)}.join(' ')
         | 
| 9 | 
            +
                      else options
         | 
| 10 | 
            +
                      end
         | 
| 11 | 
            +
                    end
         | 
| 12 | 
            +
             | 
| 13 | 
            +
                    def hash_option_parser(options)
         | 
| 6 14 | 
             
                      opts = []
         | 
| 7 15 |  | 
| 8 16 | 
             
                      # multiple options can be passed by set
         | 
| @@ -18,7 +26,7 @@ module Coaster | |
| 18 26 | 
             
                        v = case v
         | 
| 19 27 | 
             
                        when Hash then v.map{|vk,vv| "#{vk}=#{vv}"}.join(',')
         | 
| 20 28 | 
             
                        when Array then v.join(',')
         | 
| 21 | 
            -
                        else v
         | 
| 29 | 
            +
                        else v || ''
         | 
| 22 30 | 
             
                        end
         | 
| 23 31 | 
             
                        v = v.strip
         | 
| 24 32 | 
             
                        if k.start_with?('--')
         | 
| @@ -60,7 +68,7 @@ module Coaster | |
| 60 68 | 
             
                    self.class.run_cmd(path, command)
         | 
| 61 69 | 
             
                  end
         | 
| 62 70 |  | 
| 63 | 
            -
                  def run_git_cmd(command,  | 
| 71 | 
            +
                  def run_git_cmd(command, *options)
         | 
| 64 72 | 
             
                    cmd = "git #{self.class.option_parser(options)} #{command}"
         | 
| 65 73 | 
             
                    run_cmd(cmd)
         | 
| 66 74 | 
             
                  end
         | 
    
        data/lib/coaster/version.rb
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: coaster
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 1.3. | 
| 4 | 
            +
              version: 1.3.30
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - buzz jung
         | 
| @@ -180,13 +180,15 @@ dependencies: | |
| 180 180 | 
             
                    version: '0'
         | 
| 181 181 | 
             
            description: Ruby Core Extensions
         | 
| 182 182 | 
             
            email: buzz@frograms.com
         | 
| 183 | 
            -
            executables: | 
| 183 | 
            +
            executables:
         | 
| 184 | 
            +
            - coaster
         | 
| 184 185 | 
             
            extensions: []
         | 
| 185 186 | 
             
            extra_rdoc_files: []
         | 
| 186 187 | 
             
            files:
         | 
| 187 188 | 
             
            - LICENSE
         | 
| 188 189 | 
             
            - README.md
         | 
| 189 190 | 
             
            - Rakefile
         | 
| 191 | 
            +
            - bin/coaster
         | 
| 190 192 | 
             
            - lib/coaster.rb
         | 
| 191 193 | 
             
            - lib/coaster/core_ext.rb
         | 
| 192 194 | 
             
            - lib/coaster/core_ext/array.rb
         | 
| @@ -219,7 +221,9 @@ files: | |
| 219 221 | 
             
            homepage: http://github.com/frograms/coaster
         | 
| 220 222 | 
             
            licenses:
         | 
| 221 223 | 
             
            - MIT
         | 
| 222 | 
            -
            metadata: | 
| 224 | 
            +
            metadata:
         | 
| 225 | 
            +
              source_code_uri: https://github.com/frograms/coaster
         | 
| 226 | 
            +
              bug_tracker_uri: https://github.com/frograms/coaster/issues
         | 
| 223 227 | 
             
            post_install_message: 
         | 
| 224 228 | 
             
            rdoc_options: []
         | 
| 225 229 | 
             
            require_paths:
         |