wbzyl-maruku_template 0.0.4 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG ADDED
File without changes
data/README.markdown CHANGED
@@ -1,12 +1,8 @@
1
1
  # Install instructions
2
2
 
3
- Build *maruku\_template* gem:
4
-
5
- gem build maruku_template.gemspec
6
-
7
- and install it with:
8
-
9
- sudo gem install maruku_template
3
+ Run the following command:
4
+
5
+ sudo gem install wbzyl-maruku_template
10
6
 
11
7
  Register Maruku template handler in one of your *config/initializers* files:
12
8
 
@@ -17,6 +13,5 @@ with *.maruku* will be handled by the *ActionView::MarukuTemplate* class.
17
13
 
18
14
  Finally, add this dependency in your *environment.rb*:
19
15
 
20
- config.gem "maruku_template"
21
-
16
+ config.gem "wbzyl-maruku_template", :lib => "maruku_template"
22
17
 
data/TODO ADDED
@@ -0,0 +1,2 @@
1
+
2
+ 1. How to change Maruku defaults?
@@ -12,13 +12,15 @@ module ActionView
12
12
  end
13
13
 
14
14
  def render(template, local_assigns = {})
15
+ #Rails.logger.info("Rendering #{template.path}")
16
+ #Rails.logger.info(">> #{template.filename}")
17
+
15
18
  @action_view.controller.headers["Content-Type"] ||= 'text/html'
16
19
 
17
- # retrieve controller variables
18
- # @action_view.controller.instance_variables.each do |v|
19
- # instance_variable_set(v, @action_view.controller.instance_variable_get(v))
20
- # end
21
-
20
+ # set @maruku_title variable; to be used in layouts
21
+ title = /\A\s*#\s*(.+)\s*$/
22
+ @action_view.instance_variable_set(:@maruku_title, template.source[title, 1])
23
+
22
24
  ::Maruku::new(template.source, :html_use_syntax => true).to_html
23
25
  end
24
26
 
@@ -4,13 +4,16 @@ Gem::Specification.new do |s|
4
4
  s.name = %q{maruku_template}
5
5
  s.authors = ["Włodek Bzyl"]
6
6
  s.email = %q{wbzyl@matwb@univ.gda.pl}
7
- s.version = "0.0.4"
7
+ s.version = "0.4.0"
8
8
  s.date = Time.now.strftime("%Y-%m-%d")
9
9
  s.summary = %q{maruku_template is a rails template handler for Maruku format.}
10
- s.has_rdoc = false
10
+ s.has_rdoc = true
11
11
  s.files = ["README.markdown", "Rakefile",
12
12
  "maruku_template.gemspec",
13
- "lib/maruku_template.rb"]
13
+ "lib/maruku_template.rb",
14
+ "CHANGELOG", "TODO"]
14
15
  s.requirements = ["maruku", "syntax"]
15
16
  s.rubygems_version = %q{1.3.1}
17
+ s.rubyforge_project = %q{maruku_template}
18
+ s.homepage = %q{http://github.com/wbzyl/maruku_template}
16
19
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wbzyl-maruku_template
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - "W\xC5\x82odek Bzyl"
@@ -26,8 +26,10 @@ files:
26
26
  - Rakefile
27
27
  - maruku_template.gemspec
28
28
  - lib/maruku_template.rb
29
- has_rdoc: false
30
- homepage:
29
+ - CHANGELOG
30
+ - TODO
31
+ has_rdoc: true
32
+ homepage: http://github.com/wbzyl/maruku_template
31
33
  post_install_message:
32
34
  rdoc_options: []
33
35
 
@@ -48,7 +50,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
48
50
  requirements:
49
51
  - maruku
50
52
  - syntax
51
- rubyforge_project:
53
+ rubyforge_project: maruku_template
52
54
  rubygems_version: 1.2.0
53
55
  signing_key:
54
56
  specification_version: 2