flak 0.0.2 → 0.0.3

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.
@@ -112,7 +112,7 @@ module Flak
112
112
  h[:root] = existing_settings[:root]
113
113
 
114
114
  h[:os] = Flak::Base.os
115
-
115
+
116
116
  # after this point we get values from the hash (h) wherever possible -
117
117
  # Why? - because h is the flattened hash - meaning that configuration and OS specific
118
118
  # settings will be correct. For example, product_revision may be different for debug and release
@@ -124,10 +124,10 @@ module Flak
124
124
  h[:build_dir] = File.join("build", h[:product_revision] , h[:os])
125
125
  h[:release_root] = File.join(h[:target_release_path], h[:product_name])
126
126
 
127
-
127
+
128
128
  h[:versioned_os_release_path] = File.join( h[:release_root] , h[:product_revision] )
129
129
  h[:versioned_os_release_path] += "-#{h[:os]}" unless h[:agnostic]
130
-
130
+
131
131
  h[:doc_dirname] = "#{h[:product_revision]}-doc"
132
132
  h[:doc_release_root] = File.join( h[:release_root] , h[:doc_dirname] )
133
133
 
@@ -199,7 +199,7 @@ module Flak
199
199
  task :build
200
200
 
201
201
  CLEAN.include( File.dirname(@settings[:build_dir]) ) unless CLEAN.include? File.dirname(@settings[:build_dir])
202
-
202
+
203
203
  CLOBBER.include( @settings[:versioned_os_release_path]) unless CLOBBER.include? @settings[:versioned_os_release_path]
204
204
 
205
205
 
@@ -298,6 +298,10 @@ module Flak
298
298
 
299
299
  task :default => ["release"]
300
300
 
301
+
302
+
303
+
304
+
301
305
  task :inspect do
302
306
  ap @settings
303
307
  end
data/lib/flak/rake/doc.rb CHANGED
@@ -16,7 +16,7 @@ module Flak
16
16
  def default_hash(item)
17
17
  {
18
18
  :title => "#{@settings[:product_name].capitalize} #{item[:type]}",
19
- :description=> "#{@settings[:product_revision]} #{item[:type]}",
19
+ :description=> "#{@settings[:product_name].capitalize} #{@settings[:product_revision]} #{item[:type]}",
20
20
  :author=> @settings[:author_name],
21
21
  :email=> @settings[:author_email],
22
22
  :created_at => Time.now.strftime("%d %B %Y")
@@ -39,25 +39,30 @@ module Flak
39
39
  def doc_instance_tasks
40
40
 
41
41
 
42
- # namespace :doc do
43
42
 
44
- desc "Release documentation"
45
- task :doc do
46
- docroot = File.join(@settings[:root],'doc')
47
- Dir.chdir(docroot) do |d|
48
- site = Nanoc::Site.new(YAML.load_file('config.yaml'))
49
- site.config[:output_dir] = @settings[:doc_release_root]
50
- plug_metadata(site)
51
- puts "Compiling site..."
52
- site.compile
53
- puts "Done... ;)"
54
- end
55
43
 
44
+ desc "Release documentation"
45
+ task :doc do
46
+ docroot = File.join(@settings[:root],'doc')
47
+ Dir.chdir(docroot) do |d|
48
+ site = Nanoc::Site.new(YAML.load_file('config.yaml'))
49
+ site.config[:output_dir] = @settings[:doc_release_root]
50
+ plug_metadata(site)
51
+ puts "Compiling site..."
52
+ site.compile
53
+ puts "Done... ;)"
56
54
  end
55
+ end
57
56
 
58
-
57
+ namespace :doc do
58
+ desc "Build and tar up documentation to tar.gz."
59
+ task :tar => :doc do
60
+ Dir.chdir( @settings[:target_release_path] ) do |d|
61
+ sh "tar cfz #{@settings[:product_name]}-#{@settings[:product_revision]}-doc.tar.gz #{@settings[:product_name]}/#{@settings[:product_revision]}-doc"
62
+ end
63
+ end
59
64
  end
60
- # end
65
+ end
61
66
 
62
67
  end
63
68
  end
@@ -0,0 +1,31 @@
1
+
2
+
3
+ module Flak
4
+
5
+ module Mod
6
+
7
+ def self.resolve_settings( existing_settings )
8
+
9
+ f = existing_settings[:root] + '/config/mod.yml'
10
+ h =Flak::Base.flatten_settings(f,existing_settings[:configuration], existing_settings[:os] )
11
+
12
+ h
13
+ end
14
+
15
+
16
+ def mod_instance_tasks
17
+
18
+ desc "Build and tar up product to tar.gz."
19
+ task :tar => :release do
20
+ Dir.chdir( @settings[:target_release_path] ) do |d|
21
+ sh "tar cfz #{@settings[:product_name]}-#{@settings[:product_revision]}.tar.gz #{@settings[:product_name]}/#{@settings[:product_revision]}"
22
+ end
23
+ end
24
+
25
+ end
26
+
27
+
28
+ end
29
+
30
+ end
31
+
@@ -12,7 +12,7 @@ module Flak
12
12
  ############################ P R O J E C T ###############################
13
13
  ##########################################################################
14
14
 
15
- TEMPLATES = ["env", "cpp", "delight","gl","mac","maya","maya_app","maya_plugin", "nuke", "doc"]
15
+ TEMPLATES = ["env", "cpp", "delight","gl","mac","maya","maya_app","maya_plugin", "nuke", "doc", "mod"]
16
16
 
17
17
  MAYA_PLUGIN_TEMPLATES = ["cpp", "gl","maya","maya_plugin"]
18
18
 
@@ -187,16 +187,19 @@ module Flak
187
187
  desc "tutorial [name]", "Create a tutorial"
188
188
  map "u" => :tutorial
189
189
  def tutorial(name)
190
- template("tutorial.txt.tt", "doc/content/#{name}.txt")
190
+ template("tutorial.txt.tt", "doc/content/#{name}_tutorial.txt")
191
191
  end
192
192
 
193
- desc "install_guide [name]", "Create an install guide"
194
- map "i" => :tutorial
195
- def tutorial(name)
196
- template("install_guide.txt.tt", "doc/content/#{name}.txt")
197
- end
198
193
 
194
+ desc "install [name]", "Create a new install file"
195
+ map "i" => :install
196
+ def install(name)
197
+ opts = self.project_options
198
+ self.name= name
199
+ template( "INSTALL.tt" , "config/script/shell/erb/INSTALL_#{name.upcase}.erb")
200
+ end
199
201
 
202
+
200
203
 
201
204
 
202
205
 
@@ -4,15 +4,14 @@
4
4
 
5
5
 
6
6
  # INSTALL script for mac and linux - the purpose of this script is to:
7
- # Write lines at the bottom of bashrc to source the product.sh file
7
+ # Write lines at the bottom of bashrc to source the <%%= @settings[:product_name] %>.sh file
8
8
  # Write the Maya modules file if this is a module, and put it in the maya app dir modules directory
9
9
 
10
10
  set maya_ver = "<%%= self.settings[:maya_version] %>"
11
11
 
12
12
  set product_up = "<%%= @settings[:product_name].upcase %>"
13
- set product_version = "<%%= self.settings[:product_revision] %>"
13
+ set product_version = "<%%= self.settings[:product_revision] %>"
14
14
  set product = "<%%= @settings[:product_name] %>"
15
- set product_up = "<%%= @settings[:product_name].upcase %>"
16
15
 
17
16
  set rootdir = `dirname $0`
18
17
  set rootdir = `cd $rootdir && pwd` # ensure absolute path
@@ -23,15 +22,16 @@ set full_path_to_this_script = ${rootdir}/${base}
23
22
  echo "full path to script : ${full_path_to_this_script}"
24
23
 
25
24
  set tools = $full_path_to_this_script:h:h:h:h
25
+ set version_dir = $full_path_to_this_script:h:h:t
26
26
 
27
- set product_inst_dir = ${tools}/${product}
27
+ set product_install_dir = ${tools}/<%%= @settings[:product_name] %>
28
28
  echo "**************************************************************"
29
29
  echo ""
30
30
 
31
31
  echo "working from : ${tools}"
32
32
  pushd ${tools}
33
33
 
34
- echo "${product} install directory is: ${product_inst_dir}"
34
+ echo "<%%= @settings[:product_name] %> install directory is: ${product_install_dir}"
35
35
 
36
36
  set install_platform = ""
37
37
  set maya_ver_dir =""
@@ -81,32 +81,33 @@ endif
81
81
  set modules_dir = "${maya_app_dir}/${maya_ver_dir}/modules"
82
82
  mkdir -p $modules_dir
83
83
 
84
- set the_product_dir = ${product_inst_dir}/${product_version}-${install_platform}
84
+ set the_product_dir = ${product_install_dir}/${version_dir}
85
85
  set the_maya_module = ${the_product_dir}"/maya"
86
86
 
87
87
  <% if project_options[:maya_module] -%>
88
- echo "+ ${product} ${product_version} ${the_maya_module}" > ${modules_dir}/${product}
89
- echo "writing + ${product} ${product_version} ${the_maya_module} to ${modules_dir}/${product}"
88
+ echo "+ <%%= @settings[:product_name] %> <%%= self.settings[:product_revision] %> ${the_maya_module}" > ${modules_dir}/<%%= @settings[:product_name] %>
89
+ echo "writing + <%%= @settings[:product_name] %> <%%= self.settings[:product_revision] %> ${the_maya_module} to ${modules_dir}/<%%= @settings[:product_name] %>"
90
90
  <% else -%>
91
- # echo "+ ${product} ${product_version} ${the_maya_module}" > ${modules_dir}/${product}
92
- # echo "writing + ${product} ${product_version} ${the_maya_module} to ${modules_dir}/${product}"
91
+ # Uncomment the next 2 lines if you want this script to set up the <%%= @settings[:product_name] %> maya module file
92
+ # echo "+ <%%= @settings[:product_name] %> <%%= self.settings[:product_revision] %> ${the_maya_module}" > ${modules_dir}/<%%= @settings[:product_name] %>
93
+ # echo "writing + <%%= @settings[:product_name] %> <%%= self.settings[:product_revision] %> ${the_maya_module} to ${modules_dir}/<%%= @settings[:product_name] %>"
93
94
  <% end -%>
94
95
 
95
96
  if (-f ${HOME}/.bashrc) then
96
- cp ${HOME}/.bashrc ${HOME}/.bashrc.${product}.bck
97
- cat ${HOME}/.bashrc.${product}.bck | grep -v "#.*added by ${product}" > ${HOME}/.bashrc
97
+ cp ${HOME}/.bashrc ${HOME}/.bashrc.<%%= @settings[:product_name] %>.bck
98
+ cat ${HOME}/.bashrc.<%%= @settings[:product_name] %>.bck | grep -v "#.*added by <%%= @settings[:product_name] %>" > ${HOME}/.bashrc
98
99
 
99
- echo "appending ${product} source commands to ${HOME}/.bashrc"
100
+ echo "appending <%%= @settings[:product_name] %> source commands to ${HOME}/.bashrc"
100
101
 
101
- echo "# The following lines have been added by ${product}" >> ${HOME}/.bashrc
102
- echo 'export '${product_up}'="'${the_product_dir}'" # added by '${product} >> ${HOME}/.bashrc
103
- echo '[[ -e "${'${product_up}'}/bin/'${product}'.sh" ]] && . "${'${product_up}'}/bin/'${product}'.sh" # added by '${product} >> ${HOME}/.bashrc
102
+ echo "# The following lines have been added by <%%= @settings[:product_name] %>" >> ${HOME}/.bashrc
103
+ echo 'export <%%= @settings[:product_name].upcase %>="'${the_product_dir}'" # added by '<%%= @settings[:product_name] %> >> ${HOME}/.bashrc
104
+ echo '[[ -e "${<%%= @settings[:product_name].upcase %>}/bin/<%%= @settings[:product_name] %>.sh" ]] && . "${<%%= @settings[:product_name].upcase %>}/bin/<%%= @settings[:product_name] %>.sh" # added by '<%%= @settings[:product_name] %> >> ${HOME}/.bashrc
104
105
 
105
106
  echo ""
106
107
  echo "*********NOW RUN THESE COMMANDS OR OPEN A NEW SHELL***********"
107
108
  echo ""
108
- echo "export ${product_up}=${the_product_dir}"
109
- echo '. ${'${product_up}'}/bin/'${product}'.sh'
109
+ echo "export <%%= @settings[:product_name].upcase %>=${the_product_dir}"
110
+ echo '. ${<%%= @settings[:product_name].upcase %>}/bin/<%%= @settings[:product_name] %>.sh'
110
111
  echo ""
111
112
  echo "**************************************************************"
112
113
 
@@ -9,6 +9,9 @@ $toc_headings_bg_color : #aa251b;
9
9
  $reliance_blue : #0c4ca3;
10
10
  $reliance_light_blue: $reliance_blue + #333;
11
11
  $toc_current_bg_color:#f1c7bf;
12
+ $code_block_color:#eaeef9;
13
+ $code_block_border_color:#b8c2e3;
14
+
12
15
  @mixin shadow_box {
13
16
  box-shadow: 0px 2px 5px #606060;
14
17
  }
@@ -30,14 +30,26 @@ p {
30
30
 
31
31
 
32
32
 
33
+
34
+ code {
35
+ display:inline-block;
36
+ border-radius:5px;
37
+ border : 1px solid $code_block_border_color;
38
+ // width:auto;
39
+ font-size: 1.1em;
40
+
41
+ background-color:$code_block_color;
42
+ line-height:1.2em;
43
+ // color:$src_code_color;
44
+ padding: 0.05em 1em;
45
+ }
33
46
  pre {
34
47
  width:50%;
35
- }
36
48
 
37
- code {
38
- font-size: 1.4em;
39
- color:$src_code_color;
40
- padding-left: 10px;
49
+ code {
50
+ line-height:1.5em;
51
+ }
52
+
41
53
  }
42
54
 
43
55
  hr {
@@ -132,10 +144,24 @@ p {
132
144
  }
133
145
 
134
146
 
135
- .logo {
136
- border:0;
137
- clear: both;
138
- margin:1em 0 0 1em;
147
+ #logos {
148
+ // clear: both;
149
+ display:table-row;
150
+ padding:1em 0 0 1em;
151
+ li {
152
+ padding:1em 0 0 1em;
153
+ list-style:none;
154
+ display:table-cell;
155
+ .logo {
156
+ border:0;
157
+ }
158
+ .module_logo {
159
+ height:50px;
160
+ width:auto;
161
+ }
162
+ }
163
+
164
+
139
165
  }
140
166
 
141
167
  .meta_container {
@@ -177,7 +203,7 @@ p {
177
203
  font-stretch: condensed;
178
204
  font-size: 1.2em;
179
205
 
180
-
206
+
181
207
  .toc_block {
182
208
  // border: 1px solid $borders_color;
183
209
  // background-color: #ff9;
@@ -215,7 +241,7 @@ p {
215
241
  }
216
242
 
217
243
  #footer {
218
-
244
+
219
245
  border-top: 1px solid $borders_color;
220
246
  background-color: $bg1_color;
221
247
  ul {
@@ -227,7 +253,7 @@ p {
227
253
  list-style:none;
228
254
  width:20%;
229
255
  img {
230
- padding: 0 2em;
256
+ padding: 0 2em;
231
257
  max-height:50px;
232
258
  width:auto;
233
259
  }
@@ -20,29 +20,9 @@
20
20
  </li>
21
21
  </ol>
22
22
  <%= vfxoverflow_ribbon %>
23
- <div id="footer">
24
- <ul>
25
- <li class="footer_image">
26
- <a href="http://www.mirovideoconverter.com/"><img src="site_images/miro_logo_bw.png" title="miro video converter" /></a>
27
- </li>
28
- <li class="footer_image">
29
- <a href="http://www.thefoundry.co.uk/support/"><img src="site_images/nuke.png" title="nuke support" /></a>
30
- </li>
31
- <li class="footer_image">
32
- <a href="http://download.autodesk.com/global/docs/maya2012/en_us/index.html"><img src="site_images/maya.png" title="maya 2012 help" /></a>
33
- </li>
34
- <li class="footer_image">
35
- <a href="http://www.python.org/about/help/"><img src="site_images/python.png" title="python help" /></a>
36
- </li>
37
- <li class="footer_image">
38
- <a href="http://www.chaosgroup.com/en/2/support.html"><img src="site_images/vray.png" title="vray support" /></a>
39
- </li>
40
- <li class="footer_image">
41
- <a href="https://renderman.pixar.com/forum/support.php"><img src="site_images/prman.png" title="renderman support" /></a>
42
- </li>
43
- </ul>
44
23
 
45
- </div>
24
+ <%= footer %>
25
+
46
26
  </div>
47
27
 
48
28
 
@@ -107,8 +107,12 @@ end
107
107
  # create markup for the header header
108
108
  def create_header
109
109
  body = '<div id="header">'
110
+
111
+ body +='<ul id="logos">'
110
112
  r = "site_images/logo.jpg"
111
- body += '<a href="http://www.reliancemediaworks.com/"><img class="logo" src="'+r+'" alt="logo" /></a>'
113
+ body += '<li><a href="http://www.reliancemediaworks.com/"><img class="logo" src="'+r+'" alt="logo" /></a></li>'
114
+ body += '<li><a href="images/module_logo.png"><img class="module_logo" src="images/module_logo.png" /></a></li>'
115
+ body +='</ul>'
112
116
  body += "<h3><b>#{@item[:type]}: </b> #{@item[:title]} </h3>"
113
117
  body += '</div>'
114
118
  end
@@ -143,5 +147,24 @@ def create_meta
143
147
 
144
148
  end
145
149
 
150
+ LOGOS = [
151
+ [ "www.mirovideoconverter.com" , "miro_logo_bw.png", "miro video converter"],
152
+ [ "www.thefoundry.co.uk/support" , "nuke.png", "nuke support"],
153
+ [ "download.autodesk.com/global/docs/maya2012/en_us/index.html" , "maya.png", "maya 2012 help"],
154
+ [ "www.python.org/about/help" , "python.png", "python help"],
155
+ [ "www.chaosgroup.com/en/2/support.html" , "vray.png", "vray support"],
156
+ [ "renderman.pixar.com/forum/support.php" , "prman.png", "renderman support"]
157
+ ]
158
+
159
+ def footer
160
+ str = '<div id="footer"><ul>'
161
+ arr = LOGOS.collect do |logo|
162
+ '<li class="footer_image"><a href="http://'+logo[0]+'"><img src="site_images/'+ logo[1]+'" title="'+logo[2]+'" /></a></li>'
163
+ end
164
+ str += arr.join("\n")
165
+ str += '</ul></div>'
166
+ str
167
+
168
+ end
146
169
 
147
170
 
@@ -8,10 +8,8 @@ configuration: "debug"
8
8
  # The name of your product of course.
9
9
  product_name: "<%= name %>"
10
10
 
11
- # The revision number for your product. You can set it to any string
12
- # but it is recommended to include the name of the product so it can
13
- # be recognized when it is deployed.
14
- product_revision: "<%= name %>-0.0.1"
11
+ # The revision number for your product. You can set it to any string.
12
+ product_revision: "0.0.1"
15
13
 
16
14
  # set to true if you dont want the os name appended to the release directory.
17
15
  # For example, if the module contains only cross platform scripts, there is
File without changes
data/lib/flak/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Flak
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
data/lib/flak.rb CHANGED
@@ -23,6 +23,7 @@ require 'flak/rake/maya_plugin'
23
23
  require 'flak/rake/nuke'
24
24
  require 'flak/rake/target'
25
25
  require 'flak/rake/base'
26
+ require 'flak/rake/mod'
26
27
 
27
28
  require 'flak/version'
28
29
  require 'flak/thor/wizard'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: flak
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2012-02-27 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: thor
16
- requirement: &70319437889160 !ruby/object:Gem::Requirement
16
+ requirement: &70332259564940 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70319437889160
24
+ version_requirements: *70332259564940
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: awesome_print
27
- requirement: &70319437886500 !ruby/object:Gem::Requirement
27
+ requirement: &70332259562220 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '0'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70319437886500
35
+ version_requirements: *70332259562220
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: nanoc
38
- requirement: &70319437886080 !ruby/object:Gem::Requirement
38
+ requirement: &70332259561800 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: '0'
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *70319437886080
46
+ version_requirements: *70332259561800
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: RedCloth
49
- requirement: &70319437885660 !ruby/object:Gem::Requirement
49
+ requirement: &70332259593100 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ! '>='
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: '0'
55
55
  type: :runtime
56
56
  prerelease: false
57
- version_requirements: *70319437885660
57
+ version_requirements: *70332259593100
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: sass
60
- requirement: &70319444337200 !ruby/object:Gem::Requirement
60
+ requirement: &70332259592680 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ! '>='
@@ -65,7 +65,7 @@ dependencies:
65
65
  version: '0'
66
66
  type: :runtime
67
67
  prerelease: false
68
- version_requirements: *70319444337200
68
+ version_requirements: *70332259592680
69
69
  description: VFX tool build and documentation framework based on rake with thor generators
70
70
  email:
71
71
  - julian.mann@gmail.com
@@ -92,6 +92,7 @@ files:
92
92
  - lib/flak/rake/maya.rb
93
93
  - lib/flak/rake/maya_app.rb
94
94
  - lib/flak/rake/maya_plugin.rb
95
+ - lib/flak/rake/mod.rb
95
96
  - lib/flak/rake/nuke.rb
96
97
  - lib/flak/rake/target.rb
97
98
  - lib/flak/thor/cli.rb
@@ -135,6 +136,7 @@ files:
135
136
  - lib/flak/thor/templates/doc/content/install_guide.txt.tt
136
137
  - lib/flak/thor/templates/doc/content/release_notes.txt.tt
137
138
  - lib/flak/thor/templates/doc/content/scenes/.empty_directory
139
+ - lib/flak/thor/templates/doc/content/scenes/module_logo.psd
138
140
  - lib/flak/thor/templates/doc/content/tutorial.txt.tt
139
141
  - lib/flak/thor/templates/doc/layouts/default.html
140
142
  - lib/flak/thor/templates/doc/lib/helpers.rb
@@ -147,6 +149,7 @@ files:
147
149
  - lib/flak/thor/templates/maya.tt
148
150
  - lib/flak/thor/templates/maya_app.tt
149
151
  - lib/flak/thor/templates/maya_plugin.tt
152
+ - lib/flak/thor/templates/mod.tt
150
153
  - lib/flak/thor/templates/nuke.tt
151
154
  - lib/flak/thor/templates/product.mel.tt
152
155
  - lib/flak/thor/templates/product.sh.tt