rack-ketai 0.1.3 → 0.2.0

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.
@@ -1,11 +1,13 @@
1
1
  # -*- coding: utf-8 -*-
2
2
 
3
3
  # 一般的な環境(PCその他)
4
+ # 現在はフィルタ用のみに利用
5
+ # アプリ側では利用しないこと(できません)
4
6
 
5
7
  module Rack::Ketai::Carrier
6
8
  class General < Abstract
7
9
 
8
- class EmoticonFilter < Rack::Ketai::Carrier::Abstract::Filter
10
+ class EmoticonFilter < Rack::Ketai::Filter
9
11
  EMOJIID_REGEXP = Regexp.new('\[e:([0-9A-F]{3})\]').freeze
10
12
  INSIDE_INPUT_TAG = Regexp.new('(<input\s.*?\svalue=")(.*?)(".*?>)').freeze
11
13
  INSIDE_TEXTAREA_TAG = Regexp.new('(<textarea\s.*?>)(.*?)(</textarea>)', Regexp::MULTILINE).freeze
@@ -24,7 +26,7 @@ module Rack::Ketai::Carrier
24
26
  emoticons_path = @options[:emoticons_path]
25
27
 
26
28
  output = ''
27
- body.collect do |str|
29
+ (body.respond_to?(:each) ? body : [body]).each do |str|
28
30
  # input内・textarea内以外のものだけを置換する良い方法がわからないので、
29
31
  # とりあえず、input内、textarea内のものを別なのにしとく
30
32
  str = str.gsub(INSIDE_INPUT_TAG) do
@@ -1,13 +1,12 @@
1
1
  # -*- coding: utf-8 -*-
2
+
3
+ require 'rack/ketai/carrier/smartphone'
4
+
2
5
  module Rack::Ketai::Carrier
3
- class IPhone < General
6
+ class IPhone < Smartphone
4
7
 
5
- USER_AGENT_REGEXP = /iPhone/
8
+ USER_AGENT_REGEXP = /iPhone|iPod/
6
9
 
7
- def mobile?
8
- true
9
- end
10
-
11
10
  def supports_cookie?
12
11
  true
13
12
  end
@@ -0,0 +1,65 @@
1
+ # -*- coding: utf-8 -*-
2
+
3
+ require 'rack/ketai/carrier/abstract'
4
+
5
+ module Rack::Ketai::Carrier
6
+ class Mobile < Abstract
7
+
8
+ def mobile?
9
+ true
10
+ end
11
+
12
+ end
13
+ end
14
+
15
+ module Rack::Ketai
16
+ class SjisFilter < Filter
17
+
18
+ private
19
+ def to_internal(env)
20
+ request = Rack::Request.new(env)
21
+
22
+ # 最低でも1回呼んでないと query_string, form_hash等が未設定
23
+ request.params
24
+
25
+ # 同一オブジェクトが両方に入ってたりして二重にかかることがあるので
26
+ converted_objects = []
27
+ converter = lambda { |value|
28
+ unless converted_objects.include?(value)
29
+ value = NKF.nkf('-m0 -x -Sw', value)
30
+ converted_objects << value
31
+ end
32
+ value
33
+ }
34
+
35
+ full_apply(request.env["rack.request.query_hash"],
36
+ request.env["rack.request.form_hash"],
37
+ &converter)
38
+
39
+ request.env
40
+ end
41
+
42
+ def to_external(status, headers, body)
43
+ output = ''
44
+
45
+ (body.respond_to?(:each) ? body : [body]).each do |str|
46
+ output << NKF.nkf('-m0 -x -Ws', str)
47
+ end
48
+
49
+ if headers['Content-Type']
50
+ case headers['Content-Type']
51
+ when /charset=[\w\-]+/i
52
+ headers['Content-Type'] = headers['Content-Type'].sub(/charset=[\w\-]+/, 'charset=shift_jis')
53
+ else
54
+ headers['Content-Type'] = headers['Content-Type'] + "; charset=shift_jis"
55
+ end
56
+ end
57
+
58
+ headers['Content-Length'] = (output.respond_to?(:bytesize) ? output.bytesize : output.size).to_s if headers.member?('Content-Length')
59
+
60
+ [status, headers, [output]]
61
+ end
62
+
63
+ end
64
+
65
+ end
@@ -0,0 +1,20 @@
1
+ # -*- coding: utf-8 -*-
2
+
3
+ require 'rack/ketai/carrier/mobile'
4
+
5
+ module Rack::Ketai::Carrier
6
+ class Smartphone < General
7
+ CIDRS = []
8
+
9
+ def mobile?
10
+ true
11
+ end
12
+
13
+ def smartphone?
14
+ true
15
+ end
16
+
17
+ end
18
+ end
19
+
20
+
@@ -1,16 +1,17 @@
1
1
  # -*- coding: utf-8 -*-
2
- # -*- coding: utf-8 -*-
2
+
3
3
  require 'scanf'
4
+ require 'rack/ketai/carrier/mobile'
4
5
 
5
6
  module Rack::Ketai::Carrier
6
- class Softbank < Abstract
7
+ class Softbank < Mobile
7
8
  autoload :CIDRS, 'rack/ketai/carrier/cidrs/softbank'
8
9
  autoload :SPECS, 'rack/ketai/carrier/specs/softbank'
9
10
 
10
11
  # Semulator はウェブコンテンツビューアのUA
11
12
  USER_AGENT_REGEXP = /^(?:Vodafone|SoftBank|Semulator)/
12
13
 
13
- class Filter < ::Rack::Ketai::Carrier::Abstract::Filter
14
+ class Filter < ::Rack::Ketai::Filter
14
15
 
15
16
  # 絵文字コード -> 絵文字ID 対応表から、絵文字コード検出用の正規表現をつくる
16
17
  # 複数の絵文字の組み合わせのものを前におくことで
@@ -87,10 +88,6 @@ module Rack::Ketai::Carrier
87
88
  end
88
89
  end
89
90
 
90
- def mobile?
91
- true
92
- end
93
-
94
91
  def subscriberid
95
92
  @env['HTTP_X_JPHONE_UID'].to_s =~ /^([A-z|0-9]+)$/
96
93
  $1
@@ -1,11 +1,11 @@
1
1
  module Rack::Ketai::Carrier
2
2
 
3
- autoload :Abstract, 'rack/ketai/carrier/abstract'
4
3
  autoload :General, 'rack/ketai/carrier/general'
5
4
  autoload :Docomo, 'rack/ketai/carrier/docomo'
6
5
  autoload :Au, 'rack/ketai/carrier/au'
7
6
  autoload :Softbank, 'rack/ketai/carrier/softbank'
8
7
  autoload :IPhone, 'rack/ketai/carrier/iphone'
8
+ autoload :Android, 'rack/ketai/carrier/android'
9
9
 
10
10
  def self.load(env)
11
11
  constants.each do |const|
@@ -0,0 +1,108 @@
1
+ # -*- coding: utf-8 -*-
2
+ module Rack::Ketai
3
+ class Filter
4
+
5
+ def initialize(options = { })
6
+ @options = options.clone
7
+ end
8
+
9
+ def inbound(env)
10
+ apply_incoming?(env) ? to_internal(env) : env
11
+ end
12
+
13
+ def outbound(status, headers, body)
14
+ apply_outgoing?(status, headers, body) ? to_external(status, headers, body) : [status, headers, body]
15
+ end
16
+
17
+ private
18
+ def to_internal(env)
19
+ env
20
+ end
21
+
22
+ def to_external(status, headers, body)
23
+ [status, headers, body]
24
+ end
25
+
26
+ def full_apply(*argv, &proc)
27
+ argv.each do |obj|
28
+ deep_apply(obj, &proc)
29
+ end
30
+ end
31
+
32
+ def deep_apply(obj, &proc)
33
+ case obj
34
+ when Hash
35
+ obj.each_pair do |key, value|
36
+ obj[key] = deep_apply(value, &proc)
37
+ end
38
+ obj
39
+ when Array
40
+ obj.collect!{ |value| deep_apply(value, &proc)}
41
+ when NilClass, TrueClass, FalseClass, Tempfile, StringIO
42
+ obj
43
+ else
44
+ proc.call(obj)
45
+ end
46
+ end
47
+
48
+ def apply_incoming?(env); true; end
49
+ def apply_outgoing?(status, headers, body)
50
+ headers['Content-Type'] !~ /^(.+?)(?:;|$)/
51
+ [nil, "text/html", "application/xhtml+xml"].include?($1)
52
+ end
53
+
54
+ end
55
+
56
+
57
+ class SjisFilter < Filter
58
+
59
+ private
60
+ def to_internal(env)
61
+ request = Rack::Request.new(env)
62
+
63
+ # 最低でも1回呼んでないと query_string, form_hash等が未設定
64
+ request.params
65
+
66
+ # 同一オブジェクトが両方に入ってたりして二重にかかることがあるので
67
+ converted_objects = []
68
+ converter = lambda { |value|
69
+ unless converted_objects.include?(value)
70
+ value = NKF.nkf('-m0 -x -Sw', value)
71
+ converted_objects << value
72
+ end
73
+ value
74
+ }
75
+
76
+ full_apply(request.env["rack.request.query_hash"],
77
+ request.env["rack.request.form_hash"],
78
+ &converter)
79
+
80
+ request.env
81
+ end
82
+
83
+ def to_external(status, headers, body)
84
+ output = ''
85
+
86
+ (body.respond_to?(:each) ? body : [body]).each do |str|
87
+ output << NKF.nkf('-m0 -x -Ws', str)
88
+ end
89
+
90
+ if headers['Content-Type']
91
+ case headers['Content-Type']
92
+ when /charset=[\w\-]+/i
93
+ headers['Content-Type'] = headers['Content-Type'].sub(/charset=[\w\-]+/, 'charset=shift_jis')
94
+ else
95
+ headers['Content-Type'] = headers['Content-Type'] + "; charset=shift_jis"
96
+ end
97
+ end
98
+
99
+ headers['Content-Length'] = (output.respond_to?(:bytesize) ? output.bytesize : output.size).to_s if headers.member?('Content-Length')
100
+
101
+ [status, headers, [output]]
102
+ end
103
+
104
+ end
105
+
106
+ end
107
+
108
+ require 'rack/ketai/carrier/emoji/emojidata'
@@ -25,6 +25,9 @@ class Rack::Ketai::Middleware
25
25
  def obj.mobile?
26
26
  false
27
27
  end
28
+ def obj.smartphone?
29
+ false
30
+ end
28
31
  request.env['rack.ketai'] = obj
29
32
  end
30
33
 
data/rack-ketai.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{rack-ketai}
8
- s.version = "0.1.3"
8
+ s.version = "0.2.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Yuichi Takeuchi"]
12
- s.date = %q{2010-09-21}
12
+ s.date = %q{2010-11-15}
13
13
  s.email = %q{info@takeyu-web.com}
14
14
  s.extra_rdoc_files = [
15
15
  "README.rdoc"
@@ -23,6 +23,7 @@ Gem::Specification.new do |s|
23
23
  "lib/rack/ketai.rb",
24
24
  "lib/rack/ketai/carrier.rb",
25
25
  "lib/rack/ketai/carrier/abstract.rb",
26
+ "lib/rack/ketai/carrier/android.rb",
26
27
  "lib/rack/ketai/carrier/au.rb",
27
28
  "lib/rack/ketai/carrier/cidrs/au.rb",
28
29
  "lib/rack/ketai/carrier/cidrs/docomo.rb",
@@ -36,15 +37,19 @@ Gem::Specification.new do |s|
36
37
  "lib/rack/ketai/carrier/emoji/softbankwebcodetoutf8str.rb",
37
38
  "lib/rack/ketai/carrier/general.rb",
38
39
  "lib/rack/ketai/carrier/iphone.rb",
40
+ "lib/rack/ketai/carrier/mobile.rb",
41
+ "lib/rack/ketai/carrier/smartphone.rb",
39
42
  "lib/rack/ketai/carrier/softbank.rb",
40
43
  "lib/rack/ketai/carrier/specs/au.rb",
41
44
  "lib/rack/ketai/carrier/specs/docomo.rb",
42
45
  "lib/rack/ketai/carrier/specs/softbank.rb",
43
46
  "lib/rack/ketai/display.rb",
47
+ "lib/rack/ketai/filter.rb",
44
48
  "lib/rack/ketai/middleware.rb",
45
49
  "lib/rack/ketai/position.rb",
46
50
  "rack-ketai.gemspec",
47
51
  "spec/spec_helper.rb",
52
+ "spec/unit/android_spec.rb",
48
53
  "spec/unit/au_filter_spec.rb",
49
54
  "spec/unit/au_spec.rb",
50
55
  "spec/unit/carrier_spec.rb",
@@ -86,6 +91,7 @@ Gem::Specification.new do |s|
86
91
  "spec/unit/iphone_spec.rb",
87
92
  "spec/unit/softbank_spec.rb",
88
93
  "spec/unit/carrier_spec.rb",
94
+ "spec/unit/android_spec.rb",
89
95
  "spec/unit/emoticon_filter_spec.rb",
90
96
  "spec/spec_helper.rb",
91
97
  "test/spec_runner.rb"
@@ -0,0 +1,50 @@
1
+ # -*- coding: utf-8 -*-
2
+ require 'rack/ketai/carrier/android'
3
+ describe "Rack::Ketai::Carrier::Android" do
4
+
5
+ describe 'Android 2.1 でのアクセスのとき' do
6
+
7
+ before(:each) do
8
+ @env = Rack::MockRequest.env_for('http://hoge.com/dummy',
9
+ 'HTTP_USER_AGENT' => 'Mozilla/5.0 (Linux; U; Android 2.1-update1; ja-jp; SonyEricssonSO-01B Build/2.0.B.0.138) AppleWebKit/530.17 (KHTML, like Gecko) Version/4.0 Mobile Safari/530.17',
10
+ 'REMOTE_ADDR' => '110.160.154.44')
11
+ @mobile = Rack::Ketai::Carrier.load(@env)
12
+ end
13
+
14
+ it 'PC向け絵文字フィルタが適用されること' do
15
+ mock_app = mock('App')
16
+ mock_app.should_receive(:call).twice do |env|
17
+ [200, { "Content-Type" => "text/html"}, ["今日は良い天気ですね[e:000]"]]
18
+ end
19
+
20
+ middleware = Rack::Ketai::Middleware.new(mock_app, {})
21
+ middleware.call(@env)[2].should == ['今日は良い天気ですね[e:000]']
22
+
23
+ middleware = Rack::Ketai::Middleware.new(mock_app, { :emoticons_path => '/path-to/emoticons' })
24
+ middleware.call(@env)[2].should == ['今日は良い天気ですね<img src="/path-to/emoticons/sun.gif" />']
25
+ end
26
+
27
+ it 'Rack::Ketai::Carrier::Android がセットされること' do
28
+ @mobile.should be_is_a(Rack::Ketai::Carrier::Android)
29
+ end
30
+
31
+ it '携帯端末であること' do
32
+ @mobile.should be_mobile
33
+ end
34
+
35
+ it 'スマートフォンであること' do
36
+ @mobile.should be_smartphone
37
+ end
38
+
39
+ it "#supports_cookie? は true を返すこと" do
40
+ @mobile.should be_respond_to(:supports_cookie?)
41
+ @mobile.should be_supports_cookie
42
+ end
43
+
44
+ it "#valid_addr? は false を返すこと" do
45
+ @mobile.should_not be_valid_addr
46
+ end
47
+
48
+ end
49
+
50
+ end
data/spec/unit/au_spec.rb CHANGED
@@ -39,6 +39,14 @@ describe "Rack::Ketai::Carrier::Au" do
39
39
 
40
40
  end
41
41
 
42
+ it 'スマートフォンではないこと' do
43
+ env = Rack::MockRequest.env_for('http://hoge.com/dummy',
44
+ 'HTTP_USER_AGENT' => 'KDDI-HI3B UP.Browser/6.2.0.13.2 (GUI) MMP/2.0',
45
+ 'HTTP_X_UP_DEVCAP_MAX_PDU' => '131072')
46
+ mobile = Rack::Ketai::Carrier::Au.new(env)
47
+ mobile.should_not be_smartphone
48
+ end
49
+
42
50
  describe "#cache_size でキャッシュ容量を取得するとき" do
43
51
 
44
52
  it "環境変数を使用すること" do
@@ -125,6 +125,13 @@ describe "Rack::Ketai::Carrier::Docomo" do
125
125
  end
126
126
  end
127
127
 
128
+ it 'スマートフォンではないこと' do
129
+ env = Rack::MockRequest.env_for('http://hoge.com/dummy',
130
+ 'HTTP_USER_AGENT' => "DoCoMo/2.0 SH02A")
131
+ mobile = Rack::Ketai::Carrier::Docomo.new(env)
132
+ mobile.should_not be_smartphone
133
+ end
134
+
128
135
  describe "ディスプレイ情報を取得できること" do
129
136
 
130
137
  it "既知の端末のとき" do
@@ -2,15 +2,94 @@
2
2
  require 'rack/ketai/carrier/iphone'
3
3
  describe "Rack::Ketai::Carrier::IPhone" do
4
4
 
5
- describe "#supports_cookie? を使うとき" do
6
- # iPhone はCookie対応
7
- it "#supports_cookie? は true を返す" do
8
- env = Rack::MockRequest.env_for('http://hoge.com/dummy',
9
- 'HTTP_USER_AGENT' => 'Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_0 like Mac OS X; ja-jp) AppleWebKit/532.9 (KHTML, like Gecko) Version/4.0.5 Mobile/8A293 Safari/6531.22.7')
10
- mobile = Rack::Ketai::Carrier::IPhone.new(env)
11
- mobile.should be_respond_to(:supports_cookie?)
12
- mobile.should be_supports_cookie
5
+ describe 'iPhoneでのアクセスのとき' do
6
+
7
+ before(:each) do
8
+ @env = Rack::MockRequest.env_for('http://hoge.com/dummy',
9
+ 'HTTP_USER_AGENT' => 'Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_0 like Mac OS X; ja-jp) AppleWebKit/532.9 (KHTML, like Gecko) Version/4.0.5 Mobile/8A293 Safari/6531.22.7',
10
+ 'REMOTE_ADDR' => '126.240.0.41')
11
+ @mobile = Rack::Ketai::Carrier.load(@env)
13
12
  end
13
+
14
+ it 'PC向け絵文字フィルタが適用されること' do
15
+ mock_app = mock('App')
16
+ mock_app.should_receive(:call).twice do |env|
17
+ [200, { "Content-Type" => "text/html"}, ["今日は良い天気ですね[e:000]"]]
18
+ end
19
+
20
+ middleware = Rack::Ketai::Middleware.new(mock_app, {})
21
+ middleware.call(@env)[2].should == ['今日は良い天気ですね[e:000]']
22
+
23
+ middleware = Rack::Ketai::Middleware.new(mock_app, { :emoticons_path => '/path-to/emoticons' })
24
+ middleware.call(@env)[2].should == ['今日は良い天気ですね<img src="/path-to/emoticons/sun.gif" />']
25
+ end
26
+
27
+ it 'Rack::Ketai::Carrier::IPhone がセットされること' do
28
+ @mobile.should be_is_a(Rack::Ketai::Carrier::IPhone)
29
+ end
30
+
31
+ it '携帯端末であること' do
32
+ @mobile.should be_mobile
33
+ end
34
+
35
+ it 'スマートフォンであること' do
36
+ @mobile.should be_smartphone
37
+ end
38
+
39
+ it "#supports_cookie? は true を返すこと" do
40
+ @mobile.should be_respond_to(:supports_cookie?)
41
+ @mobile.should be_supports_cookie
42
+ end
43
+
44
+ it "#valid_addr? は false を返すこと" do
45
+ @mobile.should_not be_valid_addr
46
+ end
47
+
48
+ end
49
+
50
+ describe 'iPodでのアクセスのとき' do
51
+
52
+ before(:each) do
53
+ @env = Rack::MockRequest.env_for('http://hoge.com/dummy',
54
+ 'HTTP_USER_AGENT' => 'Mozilla/5.0 (iPod; U; CPU like Mac OS X; en) AppleWebKit/420.1 (KHTML, like Gecko) Version/3.0 Mobile/3A100a Safari/419.3',
55
+ 'REMOTE_ADDR' => '126.240.0.41')
56
+ @mobile = Rack::Ketai::Carrier.load(@env)
57
+ end
58
+
59
+ it 'PC向け絵文字フィルタが適用されること' do
60
+ mock_app = mock('App')
61
+ mock_app.should_receive(:call).twice do |env|
62
+ [200, { "Content-Type" => "text/html"}, ["今日は良い天気ですね[e:000]"]]
63
+ end
64
+
65
+ middleware = Rack::Ketai::Middleware.new(mock_app, {})
66
+ middleware.call(@env)[2].should == ['今日は良い天気ですね[e:000]']
67
+
68
+ middleware = Rack::Ketai::Middleware.new(mock_app, { :emoticons_path => '/path-to/emoticons' })
69
+ middleware.call(@env)[2].should == ['今日は良い天気ですね<img src="/path-to/emoticons/sun.gif" />']
70
+ end
71
+
72
+ it 'Rack::Ketai::Carrier::IPhone がセットされること' do
73
+ @mobile.should be_is_a(Rack::Ketai::Carrier::IPhone)
74
+ end
75
+
76
+ it '携帯端末であること' do
77
+ @mobile.should be_mobile
78
+ end
79
+
80
+ it 'スマートフォンであること' do
81
+ @mobile.should be_smartphone
82
+ end
83
+
84
+ it "#supports_cookie? は true を返すこと" do
85
+ @mobile.should be_respond_to(:supports_cookie?)
86
+ @mobile.should be_supports_cookie
87
+ end
88
+
89
+ it "#valid_addr? は false を返すこと" do
90
+ @mobile.should_not be_valid_addr
91
+ end
92
+
14
93
  end
15
94
 
16
95
  end
@@ -197,4 +197,11 @@ describe "Rack::Ketai::Carrier::Softbank" do
197
197
  end
198
198
  end
199
199
 
200
+ it 'スマートフォンではないこと' do
201
+ env = Rack::MockRequest.env_for('http://hoge.com/dummy',
202
+ 'HTTP_USER_AGENT' => 'SoftBank/1.0/930SH/SHJ001[/Serial] Browser/NetFront/3.4 Profile/MIDP-2.0 Configuration/CLDC-1.1')
203
+ mobile = Rack::Ketai::Carrier::Softbank.new(env)
204
+ mobile.should_not be_smartphone
205
+ end
206
+
200
207
  end
@@ -388,29 +388,25 @@ output['emojidata'] = (<<-FILE)
388
388
 
389
389
  module Rack
390
390
  module Ketai
391
- module Carrier
392
- class Abstract
393
- class Filter
394
- EMOJI_DATA = {
391
+ class Filter
392
+ EMOJI_DATA = {
395
393
  FILE
396
394
 
397
395
  emoji.each do |id, data|
398
396
  emojiid = id.to_i(16)
399
- output['emojidata'] += format(" 0x%03X => #{data.inspect},\n", emojiid)
397
+ output['emojidata'] += format(" 0x%03X => #{data.inspect},\n", emojiid)
400
398
  end
401
399
 
402
400
  output['emojidata'] += <<-EOF
403
- }
401
+ }
404
402
 
405
- # 1.8系、1.9系 互換性維持のため
406
- if RUBY_VERSION >= '1.9.0'
407
- def EMOJI_TO_EMOJIID.index(val)
408
- key(val)
409
- end
410
- end
411
-
403
+ # 1.8系、1.9系 互換性維持のため
404
+ if RUBY_VERSION >= '1.9.0'
405
+ def EMOJI_DATA.index(val)
406
+ key(val)
412
407
  end
413
408
  end
409
+
414
410
  end
415
411
  end
416
412
  end
metadata CHANGED
@@ -1,12 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rack-ketai
3
3
  version: !ruby/object:Gem::Version
4
+ hash: 23
4
5
  prerelease: false
5
6
  segments:
6
7
  - 0
7
- - 1
8
- - 3
9
- version: 0.1.3
8
+ - 2
9
+ - 0
10
+ version: 0.2.0
10
11
  platform: ruby
11
12
  authors:
12
13
  - Yuichi Takeuchi
@@ -14,7 +15,7 @@ autorequire:
14
15
  bindir: bin
15
16
  cert_chain: []
16
17
 
17
- date: 2010-09-21 00:00:00 +09:00
18
+ date: 2010-11-15 00:00:00 +09:00
18
19
  default_executable:
19
20
  dependencies:
20
21
  - !ruby/object:Gem::Dependency
@@ -25,6 +26,7 @@ dependencies:
25
26
  requirements:
26
27
  - - ">="
27
28
  - !ruby/object:Gem::Version
29
+ hash: 23
28
30
  segments:
29
31
  - 1
30
32
  - 0
@@ -49,6 +51,7 @@ files:
49
51
  - lib/rack/ketai.rb
50
52
  - lib/rack/ketai/carrier.rb
51
53
  - lib/rack/ketai/carrier/abstract.rb
54
+ - lib/rack/ketai/carrier/android.rb
52
55
  - lib/rack/ketai/carrier/au.rb
53
56
  - lib/rack/ketai/carrier/cidrs/au.rb
54
57
  - lib/rack/ketai/carrier/cidrs/docomo.rb
@@ -62,15 +65,19 @@ files:
62
65
  - lib/rack/ketai/carrier/emoji/softbankwebcodetoutf8str.rb
63
66
  - lib/rack/ketai/carrier/general.rb
64
67
  - lib/rack/ketai/carrier/iphone.rb
68
+ - lib/rack/ketai/carrier/mobile.rb
69
+ - lib/rack/ketai/carrier/smartphone.rb
65
70
  - lib/rack/ketai/carrier/softbank.rb
66
71
  - lib/rack/ketai/carrier/specs/au.rb
67
72
  - lib/rack/ketai/carrier/specs/docomo.rb
68
73
  - lib/rack/ketai/carrier/specs/softbank.rb
69
74
  - lib/rack/ketai/display.rb
75
+ - lib/rack/ketai/filter.rb
70
76
  - lib/rack/ketai/middleware.rb
71
77
  - lib/rack/ketai/position.rb
72
78
  - rack-ketai.gemspec
73
79
  - spec/spec_helper.rb
80
+ - spec/unit/android_spec.rb
74
81
  - spec/unit/au_filter_spec.rb
75
82
  - spec/unit/au_spec.rb
76
83
  - spec/unit/carrier_spec.rb
@@ -105,6 +112,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
105
112
  requirements:
106
113
  - - ">="
107
114
  - !ruby/object:Gem::Version
115
+ hash: 3
108
116
  segments:
109
117
  - 0
110
118
  version: "0"
@@ -113,6 +121,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
113
121
  requirements:
114
122
  - - ">="
115
123
  - !ruby/object:Gem::Version
124
+ hash: 3
116
125
  segments:
117
126
  - 0
118
127
  version: "0"
@@ -138,6 +147,7 @@ test_files:
138
147
  - spec/unit/iphone_spec.rb
139
148
  - spec/unit/softbank_spec.rb
140
149
  - spec/unit/carrier_spec.rb
150
+ - spec/unit/android_spec.rb
141
151
  - spec/unit/emoticon_filter_spec.rb
142
152
  - spec/spec_helper.rb
143
153
  - test/spec_runner.rb