jpmobile 7.1.0 → 7.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.
Files changed (52) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +2 -2
  3. data/.rubocop.yml +48 -3
  4. data/.ruby-version +1 -1
  5. data/Gemfile +1 -4
  6. data/Gemfile.lock +147 -158
  7. data/jpmobile.gemspec +2 -2
  8. data/lib/jpmobile/email.rb +1 -1
  9. data/lib/jpmobile/emoticon.rb +1 -2
  10. data/lib/jpmobile/fallback_view_selector.rb +1 -1
  11. data/lib/jpmobile/filter.rb +1 -1
  12. data/lib/jpmobile/helpers.rb +1 -1
  13. data/lib/jpmobile/hook_template_details_requested.rb +1 -1
  14. data/lib/jpmobile/mail.rb +22 -24
  15. data/lib/jpmobile/mailer.rb +4 -4
  16. data/lib/jpmobile/method_less_action_support.rb +3 -3
  17. data/lib/jpmobile/mobile/abstract_mobile.rb +8 -8
  18. data/lib/jpmobile/mobile/android.rb +1 -1
  19. data/lib/jpmobile/mobile/au.rb +2 -2
  20. data/lib/jpmobile/mobile/black_berry.rb +1 -1
  21. data/lib/jpmobile/mobile/ddipocket.rb +1 -1
  22. data/lib/jpmobile/mobile/docomo.rb +2 -2
  23. data/lib/jpmobile/mobile/emobile.rb +2 -2
  24. data/lib/jpmobile/mobile/ipad.rb +1 -1
  25. data/lib/jpmobile/mobile/iphone.rb +1 -1
  26. data/lib/jpmobile/mobile/softbank.rb +2 -2
  27. data/lib/jpmobile/mobile/vodafone.rb +2 -2
  28. data/lib/jpmobile/mobile/willcom.rb +2 -2
  29. data/lib/jpmobile/mobile/windows_phone.rb +1 -1
  30. data/lib/jpmobile/path_set.rb +1 -1
  31. data/lib/jpmobile/rack/filter.rb +2 -0
  32. data/lib/jpmobile/resolver.rb +1 -1
  33. data/lib/jpmobile/session/active_record_store.rb +1 -1
  34. data/lib/jpmobile/session/mem_cache_store.rb +1 -1
  35. data/lib/jpmobile/template_details.rb +1 -1
  36. data/lib/jpmobile/trans_sid.rb +1 -1
  37. data/lib/jpmobile/version.rb +1 -1
  38. data/spec/rack_helper.rb +0 -1
  39. data/spec/unit/email_spec.rb +2 -2
  40. data/spec/unit/is_carrier_spec.rb +1 -1
  41. data/spec/unit/receive_mail_spec.rb +1 -1
  42. data/spec/unit/util_spec.rb +0 -1
  43. data/test/rails/overrides/spec/controllers/hankaku_filter_controller_spec.rb +1 -1
  44. data/test/rails/overrides/spec/controllers/helpers_spec.rb +1 -1
  45. data/test/rails/overrides/spec/rails_helper.rb +3 -1
  46. data/test/rails/overrides/spec/requests/method_less_action_support_spec.rb +1 -1
  47. data/test/rails/overrides/spec/system_helper.rb +1 -1
  48. data/test/sinatra/guestbook.rb +1 -1
  49. metadata +6 -9
  50. data/tools/generate_au_emoticon_table.rb +0 -34
  51. data/tools/generate_docomo_emoticon_table.rb +0 -33
  52. data/tools/generate_softbank_emoticon_table.rb +0 -31
@@ -1,34 +0,0 @@
1
- #!/usr/bin/ruby
2
-
3
- # http://www.au.kddi.com/ezfactory/tec/spec/pdf/typeD.pdf から生成
4
- # - OSXのpreviewで開き、すべてを選択してコピーし、テキストファイルに落とす
5
- # - http://moriq.tdiary.net/20070212.html#p01
6
- # などの手段によって生成する。
7
-
8
- table = []
9
- open("au.txt") do |f|
10
- f.each do |l|
11
- l.chomp!
12
- l.scan( /(([0-9A-F] )+)/ ) do |s|
13
- s = s[0].gsub!(/ /, "")
14
- next if s.size < 16
15
- out = s[s.size-16,16]
16
- table << a = [0,4,8,12].map{|i| out[i,4]}
17
- end
18
- end
19
- end
20
-
21
- open(File.dirname(__FILE__)+"/../lib/jpmobile/emoticon/au.rb","w") do |f|
22
- f.puts "Jpmobile::Emoticon::AU_SJIS_TO_UNICODE = {"
23
- table.each do |a|
24
- f.puts " 0x%s=>0x%s," % [a[0],a[1]]
25
- end
26
- f.puts "}.freeze"
27
- f.puts "Jpmobile::Emoticon::AU_UNICODE_TO_SJIS = Jpmobile::Emoticon::AU_SJIS_TO_UNICODE.invert.freeze"
28
- # EmailJIS -> UNICODE
29
- f.puts "Jpmobile::Emoticon::AU_EMAILJIS_TO_UNICODE = {"
30
- table.each do |a|
31
- f.puts " 0x%s=>0x%s," % [a[2],a[1]]
32
- end
33
- f.puts "}.freeze"
34
- end
@@ -1,33 +0,0 @@
1
- require 'rubygems'
2
- require 'hpricot'
3
- require 'open-uri'
4
- require 'cgi'
5
-
6
- $KCODE="u"
7
-
8
- def parse(html)
9
- results = []
10
- (Hpricot(html)/"//table//tr").each do |tr|
11
- tds = (tr/:td/:span)
12
- if tds && tds.size > 0
13
- results << tds.map {|td| CGI.unescapeHTML(td.inner_html)}
14
- end
15
- end
16
- results
17
- end
18
-
19
- table = []
20
- %w(basic extention).each do |x|
21
- uri = "http://www.nttdocomo.co.jp/service/imode/make/content/pictograph/#{x}/index.html"
22
- table += parse(URI(uri).read.toutf8)
23
- end
24
-
25
-
26
- open(File.dirname(__FILE__)+"/../lib/jpmobile/emoticon/docomo.rb","w") do |f|
27
- f.puts "Jpmobile::Emoticon::DOCOMO_SJIS_TO_UNICODE = {"
28
- table.each do |row|
29
- f.puts " 0x%s=>0x%s, "%[row[1], row[3]]
30
- end
31
- f.puts "}.freeze"
32
- f.puts "Jpmobile::Emoticon::DOCOMO_UNICODE_TO_SJIS = Jpmobile::Emoticon::DOCOMO_SJIS_TO_UNICODE.invert.freeze"
33
- end
@@ -1,31 +0,0 @@
1
- require 'rubygems'
2
- require 'hpricot'
3
- require 'cgi'
4
- require 'open-uri'
5
-
6
- # 'http://developers.softbankmobile.co.jp/dp/tool_dl/web/picword_01.php'
7
-
8
- table = []
9
- for i in 1..6
10
- uri = "http://developers.softbankmobile.co.jp/dp/tool_dl/web/picword_%02d.php" % i
11
- h = Hpricot(URI(uri).read.toutf8)
12
- (h/"//table[@width='100%']//tr").each do |tr|
13
- if tr
14
- a = (tr/"td/font[@class='j10']").map { |td| td.inner_html }
15
- unless a.empty?
16
- s = CGI.unescapeHTML(a.last)
17
- raise Exception, "something is wrong" if s[0,2] != "\x1b\x24" || s[4] != 0x0f
18
- table << [a.first, s[2,2]]
19
- end
20
- end
21
- end
22
- end
23
-
24
- open(File.dirname(__FILE__)+"/../lib/jpmobile/emoticon/softbank.rb","w") do |f|
25
- f.puts "Jpmobile::Emoticon::SOFTBANK_UNICODE_TO_WEBCODE = {"
26
- table.each do |a|
27
- f.puts %{ 0x%s => %p,} % a
28
- end
29
- f.puts "}"
30
- f.puts "Jpmobile::Emoticon::SOFTBANK_WEBCODE_TO_UNICODE = Jpmobile::Emoticon::SOFTBANK_UNICODE_TO_WEBCODE.invert"
31
- end