jpmobile 5.1.1 → 5.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 (63) hide show
  1. checksums.yaml +5 -5
  2. data/.rubocop.yml +17 -3
  3. data/.ruby-version +1 -1
  4. data/CONTRIBUTING.md +0 -6
  5. data/Gemfile +2 -2
  6. data/Gemfile.lock +116 -105
  7. data/Rakefile +0 -1
  8. data/jpmobile.gemspec +8 -7
  9. data/lib/jpmobile.rb +1 -1
  10. data/lib/jpmobile/docomo_guid.rb +1 -0
  11. data/lib/jpmobile/email.rb +1 -1
  12. data/lib/jpmobile/emoticon.rb +3 -3
  13. data/lib/jpmobile/emoticon/z_combine.rb +14 -14
  14. data/lib/jpmobile/fallback_view_selector.rb +1 -1
  15. data/lib/jpmobile/filter.rb +6 -20
  16. data/lib/jpmobile/mail.rb +17 -15
  17. data/lib/jpmobile/mobile/abstract_mobile.rb +11 -12
  18. data/lib/jpmobile/mobile/android.rb +2 -2
  19. data/lib/jpmobile/mobile/android_tablet.rb +2 -2
  20. data/lib/jpmobile/mobile/au.rb +4 -1
  21. data/lib/jpmobile/mobile/docomo.rb +4 -0
  22. data/lib/jpmobile/mobile/ipad.rb +2 -2
  23. data/lib/jpmobile/mobile/iphone.rb +2 -2
  24. data/lib/jpmobile/mobile/softbank.rb +2 -1
  25. data/lib/jpmobile/mobile/willcom.rb +1 -0
  26. data/lib/jpmobile/path_set.rb +2 -0
  27. data/lib/jpmobile/rack/filter.rb +1 -1
  28. data/lib/jpmobile/rack/params_filter.rb +9 -9
  29. data/lib/jpmobile/rails.rb +1 -1
  30. data/lib/jpmobile/resolver.rb +2 -1
  31. data/lib/jpmobile/trans_sid.rb +3 -3
  32. data/lib/jpmobile/util.rb +2 -2
  33. data/lib/jpmobile/version.rb +1 -1
  34. data/lib/tasks/jpmobile_tasks.rake +7 -8
  35. data/spec/rack/jpmobile/android_spec.rb +2 -2
  36. data/spec/rack/jpmobile/au_spec.rb +17 -17
  37. data/spec/rack/jpmobile/black_berry_spec.rb +2 -2
  38. data/spec/rack/jpmobile/docomo_spec.rb +15 -15
  39. data/spec/rack/jpmobile/emoticon_spec.rb +31 -31
  40. data/spec/rack/jpmobile/filter_spec.rb +23 -23
  41. data/spec/rack/jpmobile/iphone_spec.rb +3 -3
  42. data/spec/rack/jpmobile/mobile_by_ua_spec.rb +3 -3
  43. data/spec/rack/jpmobile/params_filter_spec.rb +14 -14
  44. data/spec/rack/jpmobile/softbank_spec.rb +9 -9
  45. data/spec/rack/jpmobile/willcom_spec.rb +6 -6
  46. data/spec/rack/jpmobile/windows_phone.rb +2 -2
  47. data/spec/unit/decorated_mail_spec.rb +1 -1
  48. data/spec/unit/mail_spec.rb +3 -3
  49. data/spec/unit/receive_mail_spec.rb +30 -30
  50. data/spec/unit/util_spec.rb +4 -4
  51. data/spec/unit/valid_ip_spec.rb +1 -1
  52. data/test/rails/overrides/Gemfile.jpmobile +1 -1
  53. data/test/rails/overrides/app/controllers/filter_controller_base.rb +2 -2
  54. data/test/rails/overrides/app/mailers/decorated_mailer.rb +1 -1
  55. data/test/rails/overrides/spec/controllers/mobile_spec_controller_spec.rb +6 -6
  56. data/test/rails/overrides/spec/features/filter_spec.rb +10 -10
  57. data/test/rails/overrides/spec/mailers/mobile_mailer_spec.rb +20 -20
  58. data/test/rails/overrides/spec/rails_helper.rb +1 -1
  59. data/tools/e4u_conv.rb +3 -3
  60. data/tools/generate_emoticon_conversion_table.rb +1 -1
  61. metadata +30 -20
  62. data/test/rails/overrides/Gemfile +0 -55
  63. data/test/rails/overrides/spec/controllers/hankaku_filter_controller_spec.rb +0 -14
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 0f606e8dcfcefaf3f8c8157d08a2ff642f8a89bb
4
- data.tar.gz: 8fa435f921bf2fca48a6572c4859b5f5076aa42b
2
+ SHA256:
3
+ metadata.gz: 6a3282bc38e1341f5732641f7fbcb39a45f6067ea93796d9ddf39d17198b8efa
4
+ data.tar.gz: 8ec05a3964dee4fd9a731ff61f38f946ca0a06049dc8d5709a8dec89ea701ff1
5
5
  SHA512:
6
- metadata.gz: 74fbb52d229f5cfbdd7c2c26ca5fd05dbfcba78b5731bfce905e1992bd06a04e5ddbddd205d46ddf9a51b8d8988712e264f8a4e127347ad684449e2dd0e67dc0
7
- data.tar.gz: d9f196f90b90ee8a1a3c3eefa7c4b663d187022b56f86aa8b1747d800348ebe1b3af49dc2a4566059fc7cdfb40a8fffd577af2915d9a879fe6d2c38d301ef2d5
6
+ metadata.gz: cb4b41c43846247d7f2462793925ba8ac7313490f9f019145122c7e0e91d6574b862bcd81ef0d2d44be80e34e58f62c52b776995a0a4df31dc46e2f7d678fdce
7
+ data.tar.gz: 92b5f532f143b28226b949b1cb384d4fc7d382c268ba102ee0700580f0f49ec37f83496b1b5c40f3e87273b2f222c8e3ee2b71d6840099663a50d2c4faa40547
@@ -7,7 +7,7 @@ inherit_gem:
7
7
  # - "config/rspec.yml"
8
8
 
9
9
  AllCops:
10
- TargetRubyVersion: 2.3
10
+ TargetRubyVersion: 2.4
11
11
  Exclude:
12
12
  - 'bin/bundle'
13
13
  - 'bin/rails'
@@ -38,17 +38,27 @@ Style/BlockDelimiters:
38
38
  - 'lib/jpmobile/mail.rb'
39
39
  EnforcedStyle: braces_for_chaining
40
40
 
41
- Style/IndentationConsistency:
41
+ Layout/IndentationConsistency:
42
42
  EnforcedStyle: normal
43
43
 
44
- Style/AccessorMethodName:
44
+ Naming/AccessorMethodName:
45
45
  Exclude:
46
46
  - 'lib/jpmobile/mail.rb'
47
47
 
48
+ Naming/ConstantName:
49
+ Exclude:
50
+ - 'lib/jpmobile/datum_conv.rb'
51
+
52
+ Naming/MemoizedInstanceVariableName:
53
+ Enabled: false
54
+
48
55
  Style/BlockComments:
49
56
  Exclude:
50
57
  - 'test/rails/overrides/spec/spec_helper.rb'
51
58
 
59
+ Style/FormatStringToken:
60
+ Enabled: false
61
+
52
62
  Metrics/AbcSize:
53
63
  Exclude:
54
64
  - 'lib/jpmobile/datum_conv.rb'
@@ -121,3 +131,7 @@ Lint/HandleExceptions:
121
131
  - 'lib/jpmobile/emoticon.rb'
122
132
  - 'lib/jpmobile/fallback_view_selector.rb'
123
133
  - 'lib/jpmobile/position.rb'
134
+
135
+ Lint/Void:
136
+ Exclude:
137
+ - 'lib/jpmobile/filter.rb'
@@ -1 +1 @@
1
- 2.4.4
1
+ 2.5.1
@@ -28,9 +28,3 @@ export MAILTRAP_PASSWORD=YYYYYYYYYYYYYY
28
28
  $ bundle exec rake test
29
29
  $ bundle exec rubocop
30
30
  ```
31
-
32
- ### Railsでのテスト
33
-
34
- ```
35
- $ bundle exec rake test:rails
36
- ```
data/Gemfile CHANGED
@@ -3,5 +3,5 @@ source 'https://rubygems.org'
3
3
  # Specify your gem's dependencies in jpmobile.gemspec
4
4
  gemspec
5
5
 
6
- gem 'onkcop', '0.48.1.1', require: false
7
- gem 'rubocop', '0.48.1', require: false
6
+ gem 'onkcop', require: false
7
+ gem 'rubocop', require: false
@@ -1,159 +1,170 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- jpmobile (5.1.0)
4
+ jpmobile (5.2.0.beta1)
5
+ mail (~> 2.7.0)
5
6
 
6
7
  GEM
7
8
  remote: https://rubygems.org/
8
9
  specs:
9
- actioncable (5.1.4)
10
- actionpack (= 5.1.4)
10
+ actioncable (5.2.0)
11
+ actionpack (= 5.2.0)
11
12
  nio4r (~> 2.0)
12
- websocket-driver (~> 0.6.1)
13
- actionmailer (5.1.4)
14
- actionpack (= 5.1.4)
15
- actionview (= 5.1.4)
16
- activejob (= 5.1.4)
13
+ websocket-driver (>= 0.6.1)
14
+ actionmailer (5.2.0)
15
+ actionpack (= 5.2.0)
16
+ actionview (= 5.2.0)
17
+ activejob (= 5.2.0)
17
18
  mail (~> 2.5, >= 2.5.4)
18
19
  rails-dom-testing (~> 2.0)
19
- actionpack (5.1.4)
20
- actionview (= 5.1.4)
21
- activesupport (= 5.1.4)
20
+ actionpack (5.2.0)
21
+ actionview (= 5.2.0)
22
+ activesupport (= 5.2.0)
22
23
  rack (~> 2.0)
23
24
  rack-test (>= 0.6.3)
24
25
  rails-dom-testing (~> 2.0)
25
26
  rails-html-sanitizer (~> 1.0, >= 1.0.2)
26
- actionview (5.1.4)
27
- activesupport (= 5.1.4)
27
+ actionview (5.2.0)
28
+ activesupport (= 5.2.0)
28
29
  builder (~> 3.1)
29
30
  erubi (~> 1.4)
30
31
  rails-dom-testing (~> 2.0)
31
32
  rails-html-sanitizer (~> 1.0, >= 1.0.3)
32
- activejob (5.1.4)
33
- activesupport (= 5.1.4)
33
+ activejob (5.2.0)
34
+ activesupport (= 5.2.0)
34
35
  globalid (>= 0.3.6)
35
- activemodel (5.1.4)
36
- activesupport (= 5.1.4)
37
- activerecord (5.1.4)
38
- activemodel (= 5.1.4)
39
- activesupport (= 5.1.4)
40
- arel (~> 8.0)
41
- activesupport (5.1.4)
36
+ activemodel (5.2.0)
37
+ activesupport (= 5.2.0)
38
+ activerecord (5.2.0)
39
+ activemodel (= 5.2.0)
40
+ activesupport (= 5.2.0)
41
+ arel (>= 9.0)
42
+ activestorage (5.2.0)
43
+ actionpack (= 5.2.0)
44
+ activerecord (= 5.2.0)
45
+ marcel (~> 0.3.1)
46
+ activesupport (5.2.0)
42
47
  concurrent-ruby (~> 1.0, >= 1.0.2)
43
- i18n (~> 0.7)
48
+ i18n (>= 0.7, < 2)
44
49
  minitest (~> 5.1)
45
50
  tzinfo (~> 1.1)
46
51
  addressable (2.5.2)
47
52
  public_suffix (>= 2.0.2, < 4.0)
48
- arel (8.0.0)
49
- ast (2.3.0)
53
+ arel (9.0.0)
54
+ ast (2.4.0)
50
55
  builder (3.2.3)
51
- capybara (2.13.0)
56
+ capybara (3.0.1)
52
57
  addressable
53
- mime-types (>= 1.16)
54
- nokogiri (>= 1.3.3)
55
- rack (>= 1.0.0)
56
- rack-test (>= 0.5.4)
57
- xpath (~> 2.0)
58
- capybara-webkit (1.14.0)
59
- capybara (>= 2.3.0, < 2.14.0)
58
+ mini_mime (>= 0.1.3)
59
+ nokogiri (~> 1.8)
60
+ rack (>= 1.6.0)
61
+ rack-test (>= 0.6.3)
62
+ xpath (~> 3.0)
63
+ capybara-webkit (1.15.0)
64
+ capybara (>= 2.3, < 4.0)
60
65
  json
61
66
  coderay (1.1.2)
62
67
  concurrent-ruby (1.0.5)
68
+ crass (1.0.4)
63
69
  diff-lcs (1.3)
64
- erubi (1.6.1)
70
+ erubi (1.7.1)
65
71
  geokit (1.11.0)
66
72
  git (1.3.0)
67
- globalid (0.4.0)
73
+ globalid (0.4.1)
68
74
  activesupport (>= 4.2.0)
69
75
  hpricot (0.8.6)
70
- i18n (0.8.6)
76
+ i18n (1.0.0)
77
+ concurrent-ruby (~> 1.0)
71
78
  json (2.1.0)
72
- loofah (2.0.3)
79
+ loofah (2.2.2)
80
+ crass (~> 1.0.2)
73
81
  nokogiri (>= 1.5.9)
74
- mail (2.6.6)
75
- mime-types (>= 1.16, < 4)
76
- method_source (0.8.2)
77
- mime-types (3.1)
78
- mime-types-data (~> 3.2015)
79
- mime-types-data (3.2016.0521)
82
+ mail (2.7.0)
83
+ mini_mime (>= 0.1.1)
84
+ marcel (0.3.2)
85
+ mimemagic (~> 0.3.2)
86
+ method_source (0.9.0)
87
+ mimemagic (0.3.2)
88
+ mini_mime (1.0.0)
80
89
  mini_portile2 (2.3.0)
81
- minitest (5.10.3)
82
- nio4r (2.1.0)
83
- nokogiri (1.8.1)
90
+ minitest (5.11.3)
91
+ nio4r (2.3.0)
92
+ nokogiri (1.8.2)
84
93
  mini_portile2 (~> 2.3.0)
85
- onkcop (0.48.1.1)
86
- rubocop (~> 0.48.1)
87
- rubocop-rspec (>= 1.15.0)
88
- parser (2.4.0.0)
89
- ast (~> 2.2)
94
+ onkcop (0.53.0.0)
95
+ rubocop (~> 0.53.0)
96
+ rubocop-rspec (>= 1.24.0)
97
+ parallel (1.12.1)
98
+ parser (2.5.0.5)
99
+ ast (~> 2.4.0)
90
100
  powerpack (0.1.1)
91
- pry (0.11.0)
101
+ pry (0.11.3)
92
102
  coderay (~> 1.1.0)
93
- method_source (~> 0.8.1)
94
- public_suffix (3.0.0)
95
- rack (2.0.3)
96
- rack-test (0.7.0)
103
+ method_source (~> 0.9.0)
104
+ public_suffix (3.0.2)
105
+ rack (2.0.4)
106
+ rack-test (1.0.0)
97
107
  rack (>= 1.0, < 3)
98
- rails (5.1.4)
99
- actioncable (= 5.1.4)
100
- actionmailer (= 5.1.4)
101
- actionpack (= 5.1.4)
102
- actionview (= 5.1.4)
103
- activejob (= 5.1.4)
104
- activemodel (= 5.1.4)
105
- activerecord (= 5.1.4)
106
- activesupport (= 5.1.4)
108
+ rails (5.2.0)
109
+ actioncable (= 5.2.0)
110
+ actionmailer (= 5.2.0)
111
+ actionpack (= 5.2.0)
112
+ actionview (= 5.2.0)
113
+ activejob (= 5.2.0)
114
+ activemodel (= 5.2.0)
115
+ activerecord (= 5.2.0)
116
+ activestorage (= 5.2.0)
117
+ activesupport (= 5.2.0)
107
118
  bundler (>= 1.3.0)
108
- railties (= 5.1.4)
119
+ railties (= 5.2.0)
109
120
  sprockets-rails (>= 2.0.0)
110
121
  rails-dom-testing (2.0.3)
111
122
  activesupport (>= 4.2.0)
112
123
  nokogiri (>= 1.6)
113
- rails-html-sanitizer (1.0.3)
114
- loofah (~> 2.0)
115
- railties (5.1.4)
116
- actionpack (= 5.1.4)
117
- activesupport (= 5.1.4)
124
+ rails-html-sanitizer (1.0.4)
125
+ loofah (~> 2.2, >= 2.2.2)
126
+ railties (5.2.0)
127
+ actionpack (= 5.2.0)
128
+ activesupport (= 5.2.0)
118
129
  method_source
119
130
  rake (>= 0.8.7)
120
131
  thor (>= 0.18.1, < 2.0)
121
- rainbow (2.2.2)
122
- rake
123
- rake (12.1.0)
124
- rspec (3.6.0)
125
- rspec-core (~> 3.6.0)
126
- rspec-expectations (~> 3.6.0)
127
- rspec-mocks (~> 3.6.0)
128
- rspec-core (3.6.0)
129
- rspec-support (~> 3.6.0)
130
- rspec-expectations (3.6.0)
132
+ rainbow (3.0.0)
133
+ rake (12.3.1)
134
+ rspec (3.7.0)
135
+ rspec-core (~> 3.7.0)
136
+ rspec-expectations (~> 3.7.0)
137
+ rspec-mocks (~> 3.7.0)
138
+ rspec-core (3.7.1)
139
+ rspec-support (~> 3.7.0)
140
+ rspec-expectations (3.7.0)
131
141
  diff-lcs (>= 1.2.0, < 2.0)
132
- rspec-support (~> 3.6.0)
142
+ rspec-support (~> 3.7.0)
133
143
  rspec-its (1.2.0)
134
144
  rspec-core (>= 3.0.0)
135
145
  rspec-expectations (>= 3.0.0)
136
- rspec-mocks (3.6.0)
146
+ rspec-mocks (3.7.0)
137
147
  diff-lcs (>= 1.2.0, < 2.0)
138
- rspec-support (~> 3.6.0)
139
- rspec-rails (3.6.1)
148
+ rspec-support (~> 3.7.0)
149
+ rspec-rails (3.7.2)
140
150
  actionpack (>= 3.0)
141
151
  activesupport (>= 3.0)
142
152
  railties (>= 3.0)
143
- rspec-core (~> 3.6.0)
144
- rspec-expectations (~> 3.6.0)
145
- rspec-mocks (~> 3.6.0)
146
- rspec-support (~> 3.6.0)
147
- rspec-support (3.6.0)
148
- rubocop (0.48.1)
149
- parser (>= 2.3.3.1, < 3.0)
153
+ rspec-core (~> 3.7.0)
154
+ rspec-expectations (~> 3.7.0)
155
+ rspec-mocks (~> 3.7.0)
156
+ rspec-support (~> 3.7.0)
157
+ rspec-support (3.7.1)
158
+ rubocop (0.53.0)
159
+ parallel (~> 1.10)
160
+ parser (>= 2.5)
150
161
  powerpack (~> 0.1)
151
- rainbow (>= 1.99.1, < 3.0)
162
+ rainbow (>= 2.2.2, < 4.0)
152
163
  ruby-progressbar (~> 1.7)
153
164
  unicode-display_width (~> 1.0, >= 1.0.1)
154
- rubocop-rspec (1.15.1)
155
- rubocop (>= 0.42.0)
156
- ruby-progressbar (1.8.3)
165
+ rubocop-rspec (1.25.0)
166
+ rubocop (>= 0.53.0)
167
+ ruby-progressbar (1.9.0)
157
168
  sprockets (3.7.1)
158
169
  concurrent-ruby (~> 1.0)
159
170
  rack (> 1, < 3)
@@ -166,14 +177,14 @@ GEM
166
177
  sqlite3 (>= 1.3.3)
167
178
  thor (0.20.0)
168
179
  thread_safe (0.3.6)
169
- tzinfo (1.2.3)
180
+ tzinfo (1.2.5)
170
181
  thread_safe (~> 0.1)
171
182
  unicode-display_width (1.3.0)
172
- websocket-driver (0.6.5)
183
+ websocket-driver (0.7.0)
173
184
  websocket-extensions (>= 0.1.0)
174
- websocket-extensions (0.1.2)
175
- xpath (2.1.0)
176
- nokogiri (~> 1.3)
185
+ websocket-extensions (0.1.3)
186
+ xpath (3.0.0)
187
+ nokogiri (~> 1.8)
177
188
 
178
189
  PLATFORMS
179
190
  ruby
@@ -184,14 +195,14 @@ DEPENDENCIES
184
195
  git
185
196
  hpricot
186
197
  jpmobile!
187
- onkcop (= 0.48.1.1)
198
+ onkcop
188
199
  pry
189
- rails (~> 5.1.4)
200
+ rails (~> 5.2.0)
190
201
  rspec
191
202
  rspec-its
192
203
  rspec-rails
193
- rubocop (= 0.48.1)
204
+ rubocop
194
205
  sqlite3-ruby
195
206
 
196
207
  BUNDLED WITH
197
- 1.16.0.pre.2
208
+ 1.16.1
data/Rakefile CHANGED
@@ -3,7 +3,6 @@ require 'rake/testtask'
3
3
  require 'fileutils'
4
4
  require 'pathname'
5
5
  require 'git'
6
- include FileUtils
7
6
 
8
7
  desc 'Default: run unit tests.'
9
8
  task :default => :test
@@ -1,4 +1,4 @@
1
- lib = File.expand_path('../lib', __FILE__)
1
+ lib = File.expand_path('lib', __dir__)
2
2
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
3
  require 'jpmobile/version'
4
4
 
@@ -16,14 +16,15 @@ Gem::Specification.new do |gem|
16
16
  gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
17
17
  gem.require_paths = ['lib']
18
18
 
19
- gem.add_development_dependency 'rails', '~> 5.1.4'
20
- gem.add_development_dependency 'rspec'
21
- gem.add_development_dependency 'rspec-rails'
22
- gem.add_development_dependency 'rspec-its'
19
+ gem.add_dependency 'mail', '~> 2.7.0'
23
20
  gem.add_development_dependency 'capybara-webkit'
24
21
  gem.add_development_dependency 'geokit'
25
- gem.add_development_dependency 'sqlite3-ruby'
26
- gem.add_development_dependency 'hpricot'
27
22
  gem.add_development_dependency 'git'
23
+ gem.add_development_dependency 'hpricot'
28
24
  gem.add_development_dependency 'pry'
25
+ gem.add_development_dependency 'rails', '~> 5.2.0'
26
+ gem.add_development_dependency 'rspec'
27
+ gem.add_development_dependency 'rspec-its'
28
+ gem.add_development_dependency 'rspec-rails'
29
+ gem.add_development_dependency 'sqlite3-ruby'
29
30
  end
@@ -1,5 +1,5 @@
1
1
  $LOAD_PATH.unshift(File.dirname(__FILE__)) unless $LOAD_PATH.include?(File.dirname(__FILE__)) ||
2
- $LOAD_PATH.include?(File.expand_path(File.dirname(__FILE__)))
2
+ $LOAD_PATH.include?(__dir__)
3
3
  require 'jpmobile/version'
4
4
  require 'singleton'
5
5
  require 'rack/utils'
@@ -17,6 +17,7 @@ module Jpmobile::DocomoGuid #:nodoc:
17
17
  result = super || {}
18
18
  return result unless request # for test process
19
19
  return result unless apply_add_guid?
20
+
20
21
  result.merge({ guid: 'ON' })
21
22
  end
22
23
 
@@ -48,7 +48,7 @@ module Jpmobile
48
48
  def convertable?(content_type)
49
49
  if converting_content_type.respond_to?(:each)
50
50
  converting_content_type.each do |c|
51
- return true if content_type.match(c)
51
+ return true if content_type.match?(c)
52
52
  end
53
53
  end
54
54