galakei 0.12.1 → 0.13.0

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- galakei (0.12.1)
4
+ galakei (0.13.0)
5
5
  actionpack (>= 3.0.3)
6
6
  css_parser
7
7
  nokogiri
data/README.md CHANGED
@@ -7,7 +7,7 @@
7
7
  * Provide support for 3G handsets from the major 3 carriers in Japan (docomo, au, SoftBank)
8
8
  * Avoid modifying Rails internals as much as possible
9
9
 
10
- ## Examples
10
+ ## Features
11
11
 
12
12
  ### Inlining Styles
13
13
 
@@ -60,6 +60,10 @@ Have a PC site that you want to add galakei templates for? Put your views in app
60
60
 
61
61
  haml is great for building galakei sites, as it enforces well formed markup. galakei takes care of setting the haml template format for you, so you'll generate xhtml.
62
62
 
63
+ ### Zenkaku to Hankaku Katakana Conversion
64
+
65
+ For galakei, zenkaku katakana such as カタカナ will be converted to hankaku like カタカナ automatically when rendering html. This is standard practice, as zenkaku katakana taxes up too much screen space.
66
+
63
67
  ## Thanks
64
68
 
65
69
  * To [jpmobile](https://github.com/jpmobile/jpmobile) for offering the most mature Rails plugin for Rails
@@ -8,7 +8,7 @@ class Galakei::DocomoCss::InlineStylesheet
8
8
  doc = Nokogiri::HTML(controller.response.body)
9
9
  stylesheets = doc.xpath('//link[@rel="stylesheet"]')
10
10
  return if stylesheets.empty?
11
- Galakei.logger.info("[galakei] DoCoMo browser 1.0 and external stylesheets detected, inlining CSS")
11
+ Rails.logger.debug("[galakei] DoCoMo browser 1.0 and external stylesheets detected, inlining CSS")
12
12
  stylesheets.each do |e|
13
13
  e.unlink
14
14
  stylesheet = Galakei::DocomoCss::Stylesheet.new(parser(e['href']))
@@ -28,7 +28,7 @@ class Galakei::DocomoCss::InlineStylesheet
28
28
  if asset
29
29
  parser.add_block!(asset.to_s, {:media_types => :all, :base_dir => File.dirname(href)})
30
30
  else
31
- Galakei.logger.warn("[galakei] asset lookup for #{$1} failed, skipping")
31
+ Rails.logger.warn("[galakei] asset lookup for #{$1} failed, skipping")
32
32
  end
33
33
  else
34
34
  parser.load_file!(path(href))
@@ -3,17 +3,12 @@
3
3
  # text/html is used, the content is rendered as the vastly inferior i-mode
4
4
  # html (aka CHTML).
5
5
  class Galakei::Filter::ContentType < Galakei::Filter::Base
6
- def self.inject(klass)
7
- this_class = self
8
- klass.after_filter self, :if => lambda {|c| this_class.condition?(c) }
9
- end
10
-
11
6
  def condition?
12
7
  request.docomo? && %r{text/html} =~ response.content_type
13
8
  end
14
9
 
15
10
  def filter
16
- Galakei.logger.info("[galakei] DoCoMo browser 1.0 and HTML detected, changing content type to application/xhtml+xml")
11
+ Rails.logger.debug("[galakei] DoCoMo browser 1.0 and HTML detected, changing content type to application/xhtml+xml")
17
12
  response.content_type = 'application/xhtml+xml'
18
13
  end
19
14
  end
@@ -1,13 +1,9 @@
1
1
  # Set template format to xhtml. This method of setting the format is rails
2
2
  # specific so leave a filter
3
3
  class Galakei::Filter::Haml < Galakei::Filter::Base
4
- def self.inject(klass)
5
- klass.around_filter self, :if => :galakei?
6
- end
7
-
8
4
  def filter
9
5
  old_format = ::Haml::Template.options[:format]
10
- Galakei.logger.info("[galakei] galakei detected, switching HAML to use :xhtml")
6
+ Rails.logger.debug("[galakei] galakei detected, switching HAML to use :xhtml")
11
7
  ::Haml::Template.options[:format] = :xhtml
12
8
  yield
13
9
  ensure
@@ -0,0 +1,33 @@
1
+ # coding: utf-8
2
+ class Galakei::Filter::Hankaku < Galakei::Filter::Base
3
+ zenkaku = %w(ガ ギ グ ゲ ゴ ザ ジ ズ ゼ ゾ ダ ヂ ヅ デ ド バ ビ ブ ベ ボ パ ピ プ ペ ポ ヴ ア イ ウ エ オ カ キ ク ケ コ サ シ ス セ ソ タ チ ツ テ ト ナ ニ ヌ ネ ノ ハ ヒ フ ヘ ホ マ ミ ム メ モ ヤ ユ ヨ ラ リ ル レ ロ ワ ヲ ン ャ ュ ョ ァ ィ ゥ ェ ォ ッ ー)
4
+ hankaku = %w(ガ ギ グ ゲ ゴ ザ ジ ズ ゼ ゾ ダ ヂ ヅ デ ド バ ビ ブ ベ ボ パ ピ プ ペ ポ ヴ ア イ ウ エ オ カ キ ク ケ コ サ シ ス セ ソ タ チ ツ テ ト ナ ニ ヌ ネ ノ ハ ヒ フ ヘ ホ マ ミ ム メ モ ヤ ユ ヨ ラ リ ル レ ロ ワ ヲ ン ャ ュ ョ ァ ィ ゥ ェ ォ ッ ー)
5
+ MAPPING = zenkaku.zip(hankaku)
6
+
7
+ def condition?
8
+ galakei? && response.content_type =~ %r{text/html|application/xhtml\+xml}
9
+ end
10
+
11
+ def filter
12
+ doc = Nokogiri::HTML(response.body)
13
+ response.body = convert_text_content(doc).to_xhtml
14
+ end
15
+
16
+ def convert_text_content(doc)
17
+ doc.children.each do |e|
18
+ if e.kind_of?(Nokogiri::XML::Text) && e.parent.node_name != "textarea"
19
+ e.content = zenkaku_to_hankaku(e.content)
20
+ elsif e.node_name == "input" && %w[submit button].include?(e["type"])
21
+ e["value"] = zenkaku_to_hankaku(e["value"])
22
+ else
23
+ convert_text_content(e)
24
+ end
25
+ end
26
+ doc
27
+ end
28
+
29
+ def zenkaku_to_hankaku(s)
30
+ MAPPING.each {|from, to| s.gsub!(from, to) }
31
+ s
32
+ end
33
+ end
@@ -1,10 +1,5 @@
1
1
  # coding: utf-8
2
2
  class Galakei::Filter::NonStandardChar < Galakei::Filter::Base
3
- def self.inject(klass)
4
- this_class = self
5
- klass.after_filter self, :if => lambda {|c| this_class.condition?(c) }
6
- end
7
-
8
3
  def condition?
9
4
  response.content_type =~ %r{text/html|application/xhtml+xml} &&
10
5
  (response.charset || Rails.application.config.encoding).downcase == "utf-8"
@@ -13,12 +8,9 @@ class Galakei::Filter::NonStandardChar < Galakei::Filter::Base
13
8
  def filter
14
9
  body = response.body
15
10
  full_dot = "\u30FB"
11
+ body.gsub!(/&middot;|&#x30FB;|\u00B7|&#183;|&#xB7;|&#12539;/, full_dot)
16
12
  half_dot = "\uFF65"
17
- body.gsub!("&middot;", full_dot) if request.docomo?
18
- body.gsub!("\u00B7", half_dot) unless request.softbank?
19
- body.gsub!("&#xFF65;", half_dot) if request.au?
20
- body.gsub!("&#x30FB;", full_dot) if request.au?
21
- body.gsub!("&sdot;", half_dot)
13
+ body.gsub!(/&#xFF65;|&sdot;|&#x22C5;|&#8901;|&#65381;|\u22C5/, half_dot)
22
14
  response.body = body
23
15
  end
24
16
  end
@@ -1,42 +1,44 @@
1
1
  # Takes care of recoding pages to Shift-JIS for some handsets when required
2
2
  require 'nkf'
3
- class Galakei::Filter::Recode < Galakei::Filter::Base
4
- def self.inject(klass)
5
- this_class = self
6
- klass.around_filter self, :if => lambda {|c| this_class.condition?(c) }
3
+ module Galakei::Filter::Recode
4
+ def self.condition?(c)
5
+ c.request.ssl? && c.request.au?
7
6
  end
8
7
 
9
- def condition?
10
- request.ssl? && request.au?
11
- end
8
+ class Params < Galakei::Filter::Base
9
+ def filter
10
+ Rails.logger.debug("[galakei] AU handset over SSL detected, recoding everything to Shift_JIS")
11
+ deep_apply(controller.params) do |param|
12
+ NKF.nkf('-Sw', param)
13
+ end
14
+ end
12
15
 
13
- def filter
14
- Galakei.logger.info("[galakei] AU handset over SSL detected, recoding everything to Shift_JIS")
15
- deep_apply(controller.params) do |param|
16
- NKF.nkf('-Sw', param)
16
+ private
17
+ def deep_apply(obj, &proc)
18
+ case obj
19
+ when Hash
20
+ obj.each_pair do |key, value|
21
+ obj[key] = deep_apply(value, &proc)
22
+ end
23
+ when Array
24
+ obj.collect!{|value| deep_apply(value, &proc)}
25
+ when String
26
+ obj = obj.to_param if obj.respond_to?(:to_param)
27
+ proc.call(obj)
28
+ else
29
+ # NilClass, TrueClass, FalseClass, Tempfile, StringIO, etc...
30
+ return obj
31
+ end
17
32
  end
18
- yield
19
- doc = Nokogiri::HTML(response.body)
20
- response.body = doc.serialize(:encoding => 'Shift_JIS')
21
- response.body = Galakei::EmojiTable.au_utf8_to_sjis(response.body)
22
- response.charset = "Shift_JIS"
33
+
23
34
  end
24
35
 
25
- private
26
- def deep_apply(obj, &proc)
27
- case obj
28
- when Hash
29
- obj.each_pair do |key, value|
30
- obj[key] = deep_apply(value, &proc)
31
- end
32
- when Array
33
- obj.collect!{|value| deep_apply(value, &proc)}
34
- when String
35
- obj = obj.to_param if obj.respond_to?(:to_param)
36
- proc.call(obj)
37
- else
38
- # NilClass, TrueClass, FalseClass, Tempfile, StringIO, etc...
39
- return obj
36
+ class Response < Galakei::Filter::Base
37
+ def filter
38
+ doc = Nokogiri::HTML(response.body)
39
+ response.body = doc.serialize(:encoding => 'Shift_JIS')
40
+ response.body = Galakei::EmojiTable.au_utf8_to_sjis(response.body)
41
+ response.charset = "Shift_JIS"
40
42
  end
41
43
  end
42
44
  end
@@ -1,8 +1,4 @@
1
1
  class Galakei::Filter::Views < Galakei::Filter::Base
2
- def self.inject(klass)
3
- klass.before_filter self, :if => :galakei?
4
- end
5
-
6
2
  def filter
7
3
  logger.debug("appending galakei views")
8
4
  prepend_view_path(::Rails.root.join('app','views.galakei'))
@@ -2,11 +2,15 @@ module Galakei
2
2
  class Railtie < ::Rails::Railtie
3
3
  config.galakei = ActiveSupport::OrderedOptions.new
4
4
  initializer "galakei.extend.action_controller" do |app|
5
- filters = %w[Views ContentType Recode NonStandardChar]
6
- filters << :Haml if defined?(Haml)
7
5
  ActiveSupport.on_load :action_controller do
8
6
  include Galakei::HelperMethods
9
- filters.each {|f| Galakei::Filter.const_get(f).inject(self) }
7
+ before_filter Galakei::Filter::Views, :if => :galakei?
8
+ after_filter Galakei::Filter::ContentType, :if => lambda {|c| Galakei::Filter::ContentType.condition?(c) }
9
+ before_filter Galakei::Filter::Recode::Params, :if => lambda {|c| Galakei::Filter::Recode.condition?(c) }
10
+ after_filter Galakei::Filter::Recode::Response, :if => lambda {|c| Galakei::Filter::Recode.condition?(c) }
11
+ after_filter Galakei::Filter::NonStandardChar, :if => lambda {|c| Galakei::Filter::NonStandardChar.condition?(c) }
12
+ after_filter Galakei::Filter::Hankaku, :if => lambda {|c| Galakei::Filter::Hankaku.condition?(c) }
13
+ around_filter Galakei::Filter::Haml, :if => :galakei? if defined?(Haml)
10
14
  end
11
15
  ActiveSupport.on_load :action_view do
12
16
  include Galakei::InputMode
@@ -1,3 +1,3 @@
1
1
  module Galakei
2
- VERSION = "0.12.1"
2
+ VERSION = "0.13.0"
3
3
  end
data/lib/galakei.rb CHANGED
@@ -13,6 +13,7 @@ module Galakei
13
13
  autoload :Base, "galakei/filter/base"
14
14
  autoload :ContentType, "galakei/filter/content_type"
15
15
  autoload :Haml, "galakei/filter/haml"
16
+ autoload :Hankaku, "galakei/filter/hankaku"
16
17
  autoload :NonStandardChar, "galakei/filter/non_standard_char"
17
18
  autoload :Recode, "galakei/filter/recode"
18
19
  autoload :Views, "galakei/filter/views"
@@ -23,16 +24,4 @@ if defined?(Rails)
23
24
  require 'galakei/railtie'
24
25
  require 'galakei/engine'
25
26
  require 'galakei/use_rack_request_to_extract_sid'
26
-
27
- module Galakei
28
- def self.logger
29
- Rails.logger
30
- end
31
- end
32
- else
33
- module Galakei
34
- def self.logger
35
- @logger ||= Logger.new(STDERR)
36
- end
37
- end
38
27
  end
@@ -6,7 +6,7 @@ class EmojiController < ApplicationController
6
6
  render :inline => "<%= emoji_table.black_sun_with_rays %>", :layout => true
7
7
  end
8
8
  def with_unicode
9
- render :inline => "テスト<%= emoji_table.black_sun_with_rays %>", :layout => true
9
+ render :inline => "てすと<%= emoji_table.black_sun_with_rays %>", :layout => true
10
10
  end
11
11
  end
12
12
 
@@ -28,7 +28,7 @@ feature 'emoji table' do
28
28
 
29
29
  scenario 'for au SSL with unicode source', :driver => :au do
30
30
  visit 'https://www.example.com/emoji/with_unicode'
31
- expected = "テスト".encode("Shift_JIS") + [0xF660].pack("n").force_encoding("Shift_JIS")
31
+ expected = "てすと".encode("Shift_JIS") + [0xF660].pack("n").force_encoding("Shift_JIS")
32
32
  page.source.should match(expected)
33
33
  end
34
34
 
@@ -0,0 +1,44 @@
1
+ # encoding: UTF-8
2
+ require File.expand_path(File.dirname(__FILE__) + '/acceptance_helper')
3
+
4
+ class HankakuController < ApplicationController
5
+ def index
6
+ render :inline => "<div id='hankaku'>メインガギ漢字ひらがな</div>", :layout => true
7
+ end
8
+
9
+ def textarea
10
+ render :inline => "<textarea id='hankaku'>メインガギ漢字ひらがな</textarea>", :layout => true
11
+ end
12
+
13
+ def input
14
+ render :inline => "<input id='hankaku' value='メインガギ漢字ひらがな' />", :layout => true
15
+ end
16
+ end
17
+
18
+ feature 'hankaku conversion' do
19
+ shared_examples_for "galakei" do |driver|
20
+ scenario "for #{driver} viewing text", :driver => driver do
21
+ visit '/hankaku'
22
+ page.find("#hankaku").text.should == "メインガギ漢字ひらがな"
23
+ end
24
+
25
+ scenario "for #{driver} viewing textarea", :driver => driver do
26
+ visit '/hankaku/textarea'
27
+ page.find("#hankaku").text.should == "メインガギ漢字ひらがな"
28
+ end
29
+
30
+ scenario "for #{driver} viewing input", :driver => driver do
31
+ visit '/hankaku/input'
32
+ page.find("#hankaku")["value"].should == "メインガギ漢字ひらがな"
33
+ end
34
+ end
35
+ it_should_behave_like "galakei", :docomo
36
+ it_should_behave_like "galakei", :softbank
37
+ it_should_behave_like "galakei", :au
38
+
39
+ scenario 'for PC' do
40
+ visit '/hankaku'
41
+ page.find("#hankaku").text.should == "メインガギ漢字ひらがな"
42
+ end
43
+
44
+ end
@@ -2,80 +2,52 @@
2
2
  require File.expand_path(File.dirname(__FILE__) + '/acceptance_helper')
3
3
 
4
4
  class NonStandardCharController < ApplicationController
5
- def middot
6
- render :inline => '&middot;'
7
- end
8
-
9
- def latin
10
- render :inline => "\u00B7"
11
- end
12
-
13
- def harf_entity
14
- render :inline => "&#xFF65;"
15
- end
16
-
17
- def full_entity
18
- render :inline => "&#x30FB;"
19
- end
20
-
21
- def sdot
22
- render :inline => "&sdot;"
23
- end
24
- end
25
-
26
- feature 'nakaguro' do
27
- scenario "Do convert &middot for docomo", :driver => :docomo do
28
- visit '/non_standard_char/middot'
29
- page.source.should == "\u30FB"
30
- end
31
-
32
- %w[softbank au].each do |s|
33
- scenario "Do not convert &middot for #{s}", :driver => s.to_sym do
34
- visit '/non_standard_char/middot'
35
- page.source.should == "&middot;"
5
+ def self.character(name, value, options = {})
6
+ define_method("#{name}_raw") do
7
+ render :inline => "'#{value}'"
36
8
  end
37
- end
38
-
39
- %w[au docomo].each do |s|
40
- scenario "Do convert latin dot(\u00B7) for #{s}", :driver => s.to_sym do
41
- visit '/non_standard_char/latin'
42
- page.source.should == "\uFF65"
9
+ define_method("#{name}_dec") do
10
+ render :inline => "'&##{value.codepoints.first.to_s};'"
43
11
  end
44
- end
45
-
46
- scenario "Do not convert latin dot(\u00B7) for softbank", :driver => :softbank do
47
- visit '/non_standard_char/latin'
48
- page.source.should == "\u00B7"
49
- end
50
-
51
- %w[softbank docomo].each do |s|
52
- scenario "Do not convert &#xFF65 for #{s}", :driver => s.to_sym do
53
- visit '/non_standard_char/harf_entity'
54
- page.source.should == "&#xFF65;"
12
+ define_method("#{name}_hex") do
13
+ render :inline => "'&#x#{value.codepoints.first.to_s(16).upcase};'"
55
14
  end
56
- end
57
-
58
- scenario "Do convert &#xFF65 for au", :driver => :au do
59
- visit '/non_standard_char/harf_entity'
60
- page.source.should == "\uFF65"
61
- end
62
-
63
- %w[docomo softbank].each do |s|
64
- scenario "Do not convert &#x30FB for #{s}", :driver => s.to_sym do
65
- visit '/non_standard_char/full_entity'
66
- page.source.should == "&#x30FB;"
15
+ if options[:named]
16
+ define_method("#{name}_named") do
17
+ render :inline => "'&#{name};'"
18
+ end
67
19
  end
68
20
  end
69
21
 
70
- scenario "Do convert &#x30FB for au", :driver => :au do
71
- visit '/non_standard_char/full_entity'
72
- page.source.should == "\u30FB"
73
- end
22
+ character :middot, "\u00B7", named: true
23
+ character :nakaguro_half, "\uFF65"
24
+ character :nakaguro_full, "\u30FB"
25
+ character :sdot, "\u22C5", named: true
26
+ end
74
27
 
75
- %w[softbank au docomo].each do |s|
76
- scenario "Do convert &sdot; to \uFF65 for #{s}", :driver => s.to_sym do
77
- visit '/non_standard_char/sdot'
78
- page.source.should == "\uFF65"
28
+ shared_examples_for "convert character" do |type, path|
29
+ %w[au docomo softbank].each do |driver|
30
+ scenario "should convert #{path} to #{type} for #{driver}", :driver => driver.to_sym do
31
+ visit "/non_standard_char/#{path}"
32
+ page.source =~ /'(.*)'/
33
+ $1.codepoints.first.to_s(16).should == (type == :full ? "30fb" : "ff65")
79
34
  end
80
35
  end
81
36
  end
37
+
38
+ feature 'nakaguro' do
39
+ it_should_behave_like "convert character", :full, :middot_raw
40
+ it_should_behave_like "convert character", :full, :middot_hex
41
+ it_should_behave_like "convert character", :full, :middot_dec
42
+ it_should_behave_like "convert character", :full, :middot_named
43
+ it_should_behave_like "convert character", :half, :nakaguro_half_raw
44
+ it_should_behave_like "convert character", :half, :nakaguro_half_hex
45
+ it_should_behave_like "convert character", :half, :nakaguro_half_dec
46
+ it_should_behave_like "convert character", :full, :nakaguro_full_raw
47
+ it_should_behave_like "convert character", :full, :nakaguro_full_hex
48
+ it_should_behave_like "convert character", :full, :nakaguro_full_dec
49
+ it_should_behave_like "convert character", :half, :sdot_raw
50
+ it_should_behave_like "convert character", :half, :sdot_hex
51
+ it_should_behave_like "convert character", :half, :sdot_dec
52
+ it_should_behave_like "convert character", :half, :sdot_named
53
+ end
@@ -0,0 +1,41 @@
1
+ # encoding: UTF-8
2
+ require 'spec_helper'
3
+
4
+ shared_examples_for "convertable zenkaku" do |body|
5
+ it 'should be converted' do
6
+ @response.stub!(:body).and_return(body)
7
+ @response.should_receive(:body=).with(/メインガギ漢字ひらがな。/)
8
+ @filter.filter
9
+ end
10
+ end
11
+
12
+ shared_examples_for "unconvertable zenkaku" do |body|
13
+ it 'should not be converted' do
14
+ @response.stub!(:body).and_return(body)
15
+ @response.should_receive(:body=).with(/メインガギ漢字ひらがな。/)
16
+ @filter.filter
17
+ end
18
+ end
19
+
20
+ describe Galakei::Filter::Hankaku do
21
+ before do
22
+ @filter = described_class.new
23
+ @filter.controller = mock("controller")
24
+ @request = mock("request")
25
+ @response = mock("response")
26
+ @filter.controller.stub!(:request).and_return(@request)
27
+ @filter.controller.stub!(:response).and_return(@response)
28
+ end
29
+
30
+ it_should_behave_like "convertable zenkaku", "<div id='hankaku'>メインガギ漢字ひらがな。</div>"
31
+ it_should_behave_like "unconvertable zenkaku", "<textarea id='hankaku'>メインガギ漢字ひらがな。</textarea>"
32
+ it_should_behave_like "unconvertable zenkaku", "<input id='hankaku' value='メインガギ漢字ひらがな。'></input>"
33
+ it_should_behave_like "convertable zenkaku", "<input type='submit' id='hankaku' value='メインガギ漢字ひらがな。'></input>"
34
+ it_should_behave_like "convertable zenkaku", "<input type='button' id='hankaku' value='メインガギ漢字ひらがな。'></input>"
35
+
36
+ it 'should convert long vowel' do
37
+ @response.stub!(:body).and_return("プロフィール")
38
+ @response.should_receive(:body=).with(/プロフィール/)
39
+ @filter.filter
40
+ end
41
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: galakei
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.1
4
+ version: 0.13.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -11,12 +11,11 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2011-10-05 00:00:00.000000000 +09:00
15
- default_executable:
14
+ date: 2011-10-06 00:00:00.000000000Z
16
15
  dependencies:
17
16
  - !ruby/object:Gem::Dependency
18
17
  name: actionpack
19
- requirement: &18595660 !ruby/object:Gem::Requirement
18
+ requirement: &2157187700 !ruby/object:Gem::Requirement
20
19
  none: false
21
20
  requirements:
22
21
  - - ! '>='
@@ -24,10 +23,10 @@ dependencies:
24
23
  version: 3.0.3
25
24
  type: :runtime
26
25
  prerelease: false
27
- version_requirements: *18595660
26
+ version_requirements: *2157187700
28
27
  - !ruby/object:Gem::Dependency
29
28
  name: rack
30
- requirement: &18595000 !ruby/object:Gem::Requirement
29
+ requirement: &2157187080 !ruby/object:Gem::Requirement
31
30
  none: false
32
31
  requirements:
33
32
  - - ! '>='
@@ -35,10 +34,10 @@ dependencies:
35
34
  version: 1.2.1
36
35
  type: :runtime
37
36
  prerelease: false
38
- version_requirements: *18595000
37
+ version_requirements: *2157187080
39
38
  - !ruby/object:Gem::Dependency
40
39
  name: css_parser
41
- requirement: &18594460 !ruby/object:Gem::Requirement
40
+ requirement: &2157186580 !ruby/object:Gem::Requirement
42
41
  none: false
43
42
  requirements:
44
43
  - - ! '>='
@@ -46,10 +45,10 @@ dependencies:
46
45
  version: '0'
47
46
  type: :runtime
48
47
  prerelease: false
49
- version_requirements: *18594460
48
+ version_requirements: *2157186580
50
49
  - !ruby/object:Gem::Dependency
51
50
  name: nokogiri
52
- requirement: &18593840 !ruby/object:Gem::Requirement
51
+ requirement: &2157186000 !ruby/object:Gem::Requirement
53
52
  none: false
54
53
  requirements:
55
54
  - - ! '>='
@@ -57,10 +56,10 @@ dependencies:
57
56
  version: '0'
58
57
  type: :runtime
59
58
  prerelease: false
60
- version_requirements: *18593840
59
+ version_requirements: *2157186000
61
60
  - !ruby/object:Gem::Dependency
62
61
  name: sanitize
63
- requirement: &18567560 !ruby/object:Gem::Requirement
62
+ requirement: &2157185460 !ruby/object:Gem::Requirement
64
63
  none: false
65
64
  requirements:
66
65
  - - ! '>='
@@ -68,7 +67,7 @@ dependencies:
68
67
  version: '0'
69
68
  type: :runtime
70
69
  prerelease: false
71
- version_requirements: *18567560
70
+ version_requirements: *2157185460
72
71
  description: Japanese feature phones (a.k.a., keitai, galakei) have a number of restrictions
73
72
  over normal web browsers. This library adds support for them
74
73
  email: info@mobalean.com
@@ -99,6 +98,7 @@ files:
99
98
  - lib/galakei/filter/base.rb
100
99
  - lib/galakei/filter/content_type.rb
101
100
  - lib/galakei/filter/haml.rb
101
+ - lib/galakei/filter/hankaku.rb
102
102
  - lib/galakei/filter/non_standard_char.rb
103
103
  - lib/galakei/filter/recode.rb
104
104
  - lib/galakei/filter/views.rb
@@ -121,6 +121,7 @@ files:
121
121
  - spec/acceptance/emoji_table_spec.rb
122
122
  - spec/acceptance/haml_spec.rb
123
123
  - spec/acceptance/handset_detection_spec.rb
124
+ - spec/acceptance/hankaku_filter_spec.rb
124
125
  - spec/acceptance/input_mode_spec.rb
125
126
  - spec/acceptance/non_standard_char_spec.rb
126
127
  - spec/acceptance/recode_spec.rb
@@ -138,10 +139,10 @@ files:
138
139
  - spec/galakei/email_spec.rb
139
140
  - spec/galakei/emoji_table_spec.rb
140
141
  - spec/galakei/filter/content_type_spec.rb
142
+ - spec/galakei/filter/hankaku_spec.rb
141
143
  - spec/galakei/request_spec.rb
142
144
  - spec/galakei/spacer_spec.rb
143
145
  - spec/spec_helper.rb
144
- has_rdoc: true
145
146
  homepage: http://www.mobalean.com
146
147
  licenses: []
147
148
  post_install_message:
@@ -162,7 +163,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
162
163
  version: '0'
163
164
  requirements: []
164
165
  rubyforge_project: galakei
165
- rubygems_version: 1.6.2
166
+ rubygems_version: 1.8.6
166
167
  signing_key:
167
168
  specification_version: 3
168
169
  summary: Japanese feature phones support