gaudi 0.1.0 → 0.2.0
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/History.txt +4 -1
- data/lib/gaudi/scaffolding.rb +28 -3
- data/lib/gaudi/version.rb +1 -1
- 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: 07fe3e331a96390b606e5f234fb4f140eb3784f6
         | 
| 4 | 
            +
              data.tar.gz: 51ee4a1952c0a09117016226a0c96f11a2c0277a
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 1656259dd973fc60840d33ed00da68e8af9f6c33aaaf2e37040407750e3244589220eff346511311ef3f7741b154e5265fd733ef2dc5b03dd3782055509d6b60
         | 
| 7 | 
            +
              data.tar.gz: 1d87c0694518dee6421a741f6acf525ad8d6fdd25570aec7886f00276729aadefcf18beca5a8369fa358127f2d96b3af6be819d7cbc12489dac5e57c20fb9c79
         | 
    
        data/History.txt
    CHANGED
    
    
    
        data/lib/gaudi/scaffolding.rb
    CHANGED
    
    | @@ -1,6 +1,9 @@ | |
| 1 1 | 
             
            require 'ostruct'
         | 
| 2 2 | 
             
            require 'optparse'
         | 
| 3 3 | 
             
            require 'fileutils'
         | 
| 4 | 
            +
            require 'tmpdir'
         | 
| 5 | 
            +
            require 'rubygems'
         | 
| 6 | 
            +
            require 'archive/tar/minitar'
         | 
| 4 7 |  | 
| 5 8 | 
             
            module Gaudi
         | 
| 6 9 | 
             
              class Gem
         | 
| @@ -13,6 +16,7 @@ module Gaudi | |
| 13 16 | 
             
                  options.project_root = Dir.pwd
         | 
| 14 17 | 
             
                  options.verbose = false
         | 
| 15 18 | 
             
                  options.scaffold=false
         | 
| 19 | 
            +
                  options.version="HEAD"
         | 
| 16 20 |  | 
| 17 21 | 
             
                  opt_parser = OptionParser.new do |opts|
         | 
| 18 22 | 
             
                    opts.banner = "Usage: gaudi [options]"
         | 
| @@ -45,7 +49,7 @@ module Gaudi | |
| 45 49 | 
             
                def self.run args
         | 
| 46 50 | 
             
                  opts=options(args)
         | 
| 47 51 | 
             
                  if opts.scaffold
         | 
| 48 | 
            -
                    Gaudi::Gem.new(opts.project_root).project
         | 
| 52 | 
            +
                    Gaudi::Gem.new(opts.project_root).project(opts.version)
         | 
| 49 53 | 
             
                  end
         | 
| 50 54 | 
             
                end
         | 
| 51 55 |  | 
| @@ -53,12 +57,13 @@ module Gaudi | |
| 53 57 | 
             
                  @project_root=project_root
         | 
| 54 58 | 
             
                end
         | 
| 55 59 |  | 
| 56 | 
            -
                def project
         | 
| 60 | 
            +
                def project version
         | 
| 57 61 | 
             
                  raise "#{project_root} already exists!" if File.exists?(project_root) && project_root != Dir.pwd
         | 
| 58 62 | 
             
                  directory_structure
         | 
| 59 63 | 
             
                  rakefile
         | 
| 60 64 | 
             
                  main_config
         | 
| 61 | 
            -
                   | 
| 65 | 
            +
                  platform_config
         | 
| 66 | 
            +
                  gaudi(version)
         | 
| 62 67 | 
             
                end
         | 
| 63 68 | 
             
                #:nodoc:
         | 
| 64 69 | 
             
                def directory_structure
         | 
| @@ -105,5 +110,25 @@ module Gaudi | |
| 105 110 | 
             
                    File.open(config_file, 'wb') {|f| f.write(configuration_content) }
         | 
| 106 111 | 
             
                  end
         | 
| 107 112 | 
             
                end
         | 
| 113 | 
            +
                #:nodoc:
         | 
| 114 | 
            +
                def gaudi(version)
         | 
| 115 | 
            +
                  Dir.mktmpdir do |tmp|
         | 
| 116 | 
            +
                    if File.exists?('gaudi')
         | 
| 117 | 
            +
                      FileUtils.rm_rf('gaudi')
         | 
| 118 | 
            +
                    end
         | 
| 119 | 
            +
                    system 'git clone https://github.com/damphyr/gaudi gaudi'
         | 
| 120 | 
            +
                    Dir.chdir('gaudi') do |d|
         | 
| 121 | 
            +
                      puts "Packing #{version} gaudi version"
         | 
| 122 | 
            +
                      cmdline="git archive --format=tar -o #{project_root}/gaudilib.tar #{version} lib/"
         | 
| 123 | 
            +
                      system(cmdline)
         | 
| 124 | 
            +
                    end
         | 
| 125 | 
            +
                    puts "Unpacking in #{project_root}/tools/build"
         | 
| 126 | 
            +
                    Dir.chdir(project_root) do |d|
         | 
| 127 | 
            +
                      Archive::Tar::Minitar.unpack(File.join(project_root,'gaudilib.tar'), 'tools/build')
         | 
| 128 | 
            +
                    end
         | 
| 129 | 
            +
                    FileUtils.rm_rf(File.join(project_root,'gaudilib.tar'))
         | 
| 130 | 
            +
                    FileUtils.rm_rf(File.join(project_root,'tools/build/pax_global_header'))
         | 
| 131 | 
            +
                  end
         | 
| 132 | 
            +
                end
         | 
| 108 133 | 
             
              end
         | 
| 109 134 | 
             
            end
         | 
    
        data/lib/gaudi/version.rb
    CHANGED