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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a24b96d9b611a1f03f01bac6ecf8cb143b999c3c
4
- data.tar.gz: 74b44603584ba06cc746bef651337e09ea7b559b
3
+ metadata.gz: 07fe3e331a96390b606e5f234fb4f140eb3784f6
4
+ data.tar.gz: 51ee4a1952c0a09117016226a0c96f11a2c0277a
5
5
  SHA512:
6
- metadata.gz: d87272b95529129c6cff54571734523f2d12fd211ab16b7da81ddc2091eea5f04dace30b70b2505b12f90c095612634823805d9caf8117290a7e552ecb0ef1b5
7
- data.tar.gz: c5fb1bbe106fa3ce9db987eba49c5f01f2731560daa67f29db609e61621a02fafe79da3b523fac351a47781cb086ab6d8bd4082e9540d7de14251d31d1e91afa
6
+ metadata.gz: 1656259dd973fc60840d33ed00da68e8af9f6c33aaaf2e37040407750e3244589220eff346511311ef3f7741b154e5265fd733ef2dc5b03dd3782055509d6b60
7
+ data.tar.gz: 1d87c0694518dee6421a741f6acf525ad8d6fdd25570aec7886f00276729aadefcf18beca5a8369fa358127f2d96b3af6be819d7cbc12489dac5e57c20fb9c79
data/History.txt CHANGED
@@ -1,4 +1,7 @@
1
- # 0.1.0
1
+ #0.2.0
2
+ * Pulls HEAD of gaudi from GitHub in the scaffold
3
+
4
+ #0.1.0
2
5
  * Scaffolding code for new projects
3
6
  ** Directory structure
4
7
  ** Example system configuration
@@ -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
- #platform_config
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
@@ -5,7 +5,7 @@ module Gaudi
5
5
  #Major version
6
6
  MAJOR=0
7
7
  #Minor version
8
- MINOR=1
8
+ MINOR=2
9
9
  #Tiny version
10
10
  TINY=0
11
11
  #All-in-one
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gaudi
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vassilis Rizopoulos