install_theme 0.5.0 → 0.5.1

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.
data/History.txt CHANGED
@@ -1,3 +1,11 @@
1
+ === 0.5.1 / 2009-09-28
2
+
3
+ Major:
4
+ * Much better options syntax: --inside_yield header:#header
5
+
6
+ Minor:
7
+ * added Haml instructions to README, and --erb flag to force erb generation
8
+
1
9
  === 0.5.0 / 2009-09-27
2
10
 
3
11
  * haml support
data/README.rdoc CHANGED
@@ -22,12 +22,28 @@ Simple case:
22
22
  Replace some DOM content with <%= yield :some_label %> with --inside_yields:
23
23
 
24
24
  install_theme path/to/app path/to/rails_app content_box \
25
- "--inside_yield=header=>#header h2" \
26
- "--inside_yield=sidebar=>#sidebar"
25
+ --inside_yield "header:#header h2" \
26
+ --inside_yield sidebar:#sidebar"
27
+
28
+ === Haml Support:
29
+
30
+ If your application has Haml installed, the template/theme is automatically converted
31
+ to Haml, and the css files converted to Sass.
32
+
33
+ Alternately, you can pass the flag --haml to force it.
34
+
35
+ Or pass the flag --erb to force erb template generation.
27
36
 
28
37
  == INSTALL:
29
38
 
30
- * sudo gem install install_theme
39
+ install_theme is distributed as a RubyGem, which installs the command line app automatically:
40
+
41
+ sudo gem install install_theme
42
+ install_theme -h
43
+
44
+ == AUTHOR:
45
+
46
+ Dr Nic Williams (http://drnicwilliams.com) wrote install_theme because he wanted a very
31
47
 
32
48
  == LICENSE:
33
49
 
data/lib/install_theme.rb CHANGED
@@ -6,7 +6,7 @@ require 'rubigen'
6
6
  require 'rubigen/scripts/generate'
7
7
 
8
8
  class InstallTheme
9
- VERSION = "0.5.0"
9
+ VERSION = "0.5.1"
10
10
 
11
11
  attr_reader :template_root, :rails_root, :index_path, :template_type
12
12
  attr_reader :stylesheet_dir, :javascript_dir, :image_dir
@@ -16,16 +16,21 @@ class InstallTheme
16
16
  Options are:
17
17
  BANNER
18
18
  opts.separator ""
19
+ opts.on("--erb",
20
+ "Generate ERb templates.",
21
+ "Default: auto-detect") { |arg| options[:template_type] = 'erb' }
19
22
  opts.on("--haml",
20
- "Generate HAML templates.") { |arg| options[:template_type] = 'haml' }
21
- opts.on("--index_path=index.html", String,
23
+ "Generate HAML templates.",
24
+ "Default: auto-detect") { |arg| options[:template_type] = 'haml' }
25
+ opts.on("--index_path index.html", String,
22
26
  "HTML page to use for application layout.",
23
27
  "Default: index.html") { |arg| options[:index_path] = arg }
24
- opts.on("--inside_yield=KEY_AND_CSS_PATH", String,
28
+ opts.on("--inside_yield KEY_AND_CSS_PATH", String,
25
29
  "Replace the inner HTML of an element with <%= yield :key %>",
30
+ "Example: --inside_yield header:#header",
26
31
  "Default: nil") do |arg|
27
32
  options[:inside_yields] ||= {}
28
- key, css_path = arg.split(/\s*=>\s*/)[0..1]
33
+ key, css_path = arg.split(/\s*:\s*/)[0..1]
29
34
  options[:inside_yields][key.strip.to_sym] = css_path.strip
30
35
  end
31
36
  opts.on("-h", "--help",
@@ -18,8 +18,8 @@ describe InstallTheme::CLI, "execute" do
18
18
  InstallTheme::CLI.execute(stdout_io, %w[path/to/app path/to/rails_app content_box
19
19
  --index_path=root.html
20
20
  --haml
21
- --inside_yield=header=>#header\ h2
22
- --inside_yield=sidebar=>#sidebar
21
+ --inside_yield header:#header\ h2
22
+ --inside_yield sidebar:#sidebar
23
23
  ])
24
24
  end
25
25
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: install_theme
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dr Nic Williams
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-09-27 00:00:00 +10:00
12
+ date: 2009-09-28 00:00:00 +10:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency