gioext-sinatra-emoji 0.1.2 → 0.1.4

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.
Files changed (3) hide show
  1. data/README.textile +40 -0
  2. data/lib/sinatra/emoji.rb +0 -1
  3. metadata +4 -3
@@ -4,6 +4,46 @@ Mobile emoji on Sinatra
4
4
 
5
5
  h2. Usage
6
6
 
7
+ <pre>
8
+ require 'rubygems'
9
+ require 'sinatra'
10
+ require '../lib/sinatra/emoji'
11
+
12
+ get '/' do
13
+ erb :index
14
+ end
15
+
16
+ helpers do
17
+ # use __erb__
18
+ def partial(sym)
19
+ __erb__ sym, :layout => false
20
+ end
21
+ end
22
+
23
+ configure do
24
+ # default
25
+ set :output_encoding_sjis, true
26
+ end
27
+
28
+ __END__
29
+ @@ layout
30
+ <html>
31
+ <head><title>test</title></head>
32
+ <body>
33
+ <%= yield %>
34
+ </body>
35
+ </html>
36
+
37
+ @@ index
38
+ <%= emoji(0) %>
39
+ <%= partial(:parts) %>
40
+
41
+ @@parts
42
+ <%= emoji(1) %>
43
+ <br />
44
+ はろー
45
+ </pre>
46
+
7
47
  h2. License
8
48
 
9
49
  Copyright (c) 2009 Kazuki UCHIDA
@@ -14,7 +14,6 @@ module Sinatra
14
14
 
15
15
  def erb(template, opts={}, locals={})
16
16
  html = __erb__(template, opts, locals)
17
- p options
18
17
  html = NKF.nkf('-s -x', html) if options.output_encoding_sjis
19
18
  parseEmoji(html)
20
19
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gioext-sinatra-emoji
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - gioext
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-09-06 00:00:00 -07:00
12
+ date: 2009-09-17 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -35,6 +35,7 @@ files:
35
35
  - lib/sinatra/emoji.rb
36
36
  has_rdoc: "false"
37
37
  homepage: http://github.com/gioext/sinatra-emoji
38
+ licenses:
38
39
  post_install_message:
39
40
  rdoc_options: []
40
41
 
@@ -55,7 +56,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
55
56
  requirements: []
56
57
 
57
58
  rubyforge_project:
58
- rubygems_version: 1.2.0
59
+ rubygems_version: 1.3.5
59
60
  signing_key:
60
61
  specification_version: 2
61
62
  summary: Mobile emoji on Sinatra