jpmobile 4.1.4 → 4.1.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c3144787e76be4d863f9196009d1e41b898d3562
4
- data.tar.gz: 7b8a4479c9a57eefdba5c167ba322d6e23a8d8d7
3
+ metadata.gz: a4087728fed83f93b1bc634817757c2737dbc1c6
4
+ data.tar.gz: deef1288401df95e41c266b15630f93904cf1950
5
5
  SHA512:
6
- metadata.gz: e028586f34450a8da47dfd7292886b2dab4b1d4745a2d49cdd7bf9a9f81891bd82572e15018968d0a2540d7c23429e92e471eab2558b543cc62fbf034f2dd659
7
- data.tar.gz: cfcb93bb0eb1b8ba9dc4e73bbd77943c2d2eab47249c18afd1a15bffb9908df9c4c7bf81bf692c71c349a53210ccbf832f015fa8c88478d0e3ee22e120a0093d
6
+ metadata.gz: 4705b4a6bfd5544b3146dda02a7b61cb89d233c62d12b47babd6f9a822e0adc6de5b0e21c2c14759f99ebeed756f2226d06b67f6048def8480eea1d5acc1185a
7
+ data.tar.gz: 7eae1aead8165e2332a3a802a2315ce36f6396af9cc42f8707b7f2be2babd3a92b7474656a60dfbd8d62c765172af6dc577028293bc5ff91d450a0591288f6a0
@@ -25,6 +25,4 @@ Gem::Specification.new do |gem|
25
25
  gem.add_development_dependency 'sqlite3-ruby'
26
26
  gem.add_development_dependency 'hpricot'
27
27
  gem.add_development_dependency 'git'
28
-
29
- gem.add_dependency 'rails', '~> 4.1.0'
30
28
  end
@@ -5,15 +5,14 @@ module Mail
5
5
  # encoding patch
6
6
  Ruby19.class_eval do
7
7
  def self.b_value_decode(str, encoding = nil)
8
- match = str.match(/\=\?(.+)?\?[Bb]\?(.+)?\?\=/m)
8
+ match = str.match(/\=\?(.+)?\?[Bb]\?(.*)\?\=/m)
9
9
  if match
10
- encoding = match[1]
10
+ charset = match[1]
11
11
  str = self.decode_base64(match[2])
12
- str.force_encoding(pick_encoding(encoding))
12
+ str = charset_encoder.encode(str, charset)
13
13
  end
14
- # if str contains some emoticon, the following line raises Encoding error
15
- str.encode("utf-8", :invalid => :replace, :replace => "") rescue Jpmobile::Util.ascii_8bit(str)
16
- # decoded.valid_encoding? ? decoded : decoded.encode("utf-16le", :invalid => :replace, :replace => "").encode("utf-8")
14
+ decoded = str.encode(Encoding::UTF_8, :invalid => :replace, :replace => "") rescue Jpmobile::Util.ascii_8bit(str)
15
+ # decoded.valid_encoding? ? decoded : decoded.encode(Encoding::UTF_16LE, :invalid => :replace, :replace => "").encode(Encoding::UTF_8)
17
16
  end
18
17
 
19
18
  # change encoding
@@ -67,6 +66,7 @@ module Mail
67
66
 
68
67
  def parse_message_with_jpmobile
69
68
  header_part, body_part = raw_source.lstrip.split(/#{CRLF}#{CRLF}|#{CRLF}#{WSP}*#{CRLF}(?!#{WSP})/m, 2)
69
+ # header_part, body_part = raw_source.lstrip.split(HEADER_SEPARATOR, 2)
70
70
 
71
71
  self.header = header_part
72
72
 
@@ -255,7 +255,8 @@ module Mail
255
255
  self.header[:subject].charset = subject_charset unless subject_charset.blank?
256
256
 
257
257
  if @mobile
258
- subject_value = Encodings.value_decode(self.header[:subject].value)
258
+ subject_value = Jpmobile::Util.ascii_8bit(self.header[:subject].value.dup)
259
+ subject_value = Encodings.value_decode(subject_value)
259
260
  subject_converting_encoding = Jpmobile::Util.detect_encoding(subject_value)
260
261
  v = @mobile.to_mail_internal(subject_value, subject_converting_encoding)
261
262
  self.header[:subject].value = Jpmobile::Util.force_encode(v, @mobile.mail_charset(subject_charset), Jpmobile::Util::UTF8)
@@ -11,11 +11,12 @@ module Jpmobile
11
11
 
12
12
  private
13
13
 
14
- def query(path, details, formats)
14
+ def query(path, details, formats, outside_app_allowed)
15
15
  query = build_query(path, details)
16
16
 
17
17
  begin
18
18
  template_paths = find_template_paths query
19
+ template_paths = reject_files_external_to_app(template_paths) unless outside_app_allowed
19
20
  rescue NoMethodError
20
21
  self.class_eval do
21
22
  def find_template_paths(query)
@@ -1,3 +1,3 @@
1
1
  module Jpmobile
2
- VERSION = "4.1.4"
2
+ VERSION = "4.1.5"
3
3
  end
@@ -36,7 +36,7 @@ namespace :test do
36
36
  FileUtils.rm_rf("Gemfile.lock")
37
37
  FileUtils.rm_rf(rails_root)
38
38
  FileUtils.mkdir_p(rails_root)
39
- `rails new #{rails_root} --skip-bundle`
39
+ `rails _4.1.11_ new #{rails_root} --skip-bundle`
40
40
  end
41
41
 
42
42
  # setup jpmobile
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jpmobile
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.1.4
4
+ version: 4.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shin-ichiro OGAWA
@@ -9,148 +9,134 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-11-19 00:00:00.000000000 Z
12
+ date: 2016-03-03 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
- - - '>='
18
+ - - ">="
19
19
  - !ruby/object:Gem::Version
20
20
  version: '0'
21
21
  type: :development
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
- - - '>='
25
+ - - ">="
26
26
  - !ruby/object:Gem::Version
27
27
  version: '0'
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: rspec
30
30
  requirement: !ruby/object:Gem::Requirement
31
31
  requirements:
32
- - - '>='
32
+ - - ">="
33
33
  - !ruby/object:Gem::Version
34
34
  version: '0'
35
35
  type: :development
36
36
  prerelease: false
37
37
  version_requirements: !ruby/object:Gem::Requirement
38
38
  requirements:
39
- - - '>='
39
+ - - ">="
40
40
  - !ruby/object:Gem::Version
41
41
  version: '0'
42
42
  - !ruby/object:Gem::Dependency
43
43
  name: rspec-rails
44
44
  requirement: !ruby/object:Gem::Requirement
45
45
  requirements:
46
- - - '>='
46
+ - - ">="
47
47
  - !ruby/object:Gem::Version
48
48
  version: '0'
49
49
  type: :development
50
50
  prerelease: false
51
51
  version_requirements: !ruby/object:Gem::Requirement
52
52
  requirements:
53
- - - '>='
53
+ - - ">="
54
54
  - !ruby/object:Gem::Version
55
55
  version: '0'
56
56
  - !ruby/object:Gem::Dependency
57
57
  name: rspec-its
58
58
  requirement: !ruby/object:Gem::Requirement
59
59
  requirements:
60
- - - '>='
60
+ - - ">="
61
61
  - !ruby/object:Gem::Version
62
62
  version: '0'
63
63
  type: :development
64
64
  prerelease: false
65
65
  version_requirements: !ruby/object:Gem::Requirement
66
66
  requirements:
67
- - - '>='
67
+ - - ">="
68
68
  - !ruby/object:Gem::Version
69
69
  version: '0'
70
70
  - !ruby/object:Gem::Dependency
71
71
  name: capybara-webkit
72
72
  requirement: !ruby/object:Gem::Requirement
73
73
  requirements:
74
- - - '>='
74
+ - - ">="
75
75
  - !ruby/object:Gem::Version
76
76
  version: '0'
77
77
  type: :development
78
78
  prerelease: false
79
79
  version_requirements: !ruby/object:Gem::Requirement
80
80
  requirements:
81
- - - '>='
81
+ - - ">="
82
82
  - !ruby/object:Gem::Version
83
83
  version: '0'
84
84
  - !ruby/object:Gem::Dependency
85
85
  name: geokit
86
86
  requirement: !ruby/object:Gem::Requirement
87
87
  requirements:
88
- - - '>='
88
+ - - ">="
89
89
  - !ruby/object:Gem::Version
90
90
  version: '0'
91
91
  type: :development
92
92
  prerelease: false
93
93
  version_requirements: !ruby/object:Gem::Requirement
94
94
  requirements:
95
- - - '>='
95
+ - - ">="
96
96
  - !ruby/object:Gem::Version
97
97
  version: '0'
98
98
  - !ruby/object:Gem::Dependency
99
99
  name: sqlite3-ruby
100
100
  requirement: !ruby/object:Gem::Requirement
101
101
  requirements:
102
- - - '>='
102
+ - - ">="
103
103
  - !ruby/object:Gem::Version
104
104
  version: '0'
105
105
  type: :development
106
106
  prerelease: false
107
107
  version_requirements: !ruby/object:Gem::Requirement
108
108
  requirements:
109
- - - '>='
109
+ - - ">="
110
110
  - !ruby/object:Gem::Version
111
111
  version: '0'
112
112
  - !ruby/object:Gem::Dependency
113
113
  name: hpricot
114
114
  requirement: !ruby/object:Gem::Requirement
115
115
  requirements:
116
- - - '>='
116
+ - - ">="
117
117
  - !ruby/object:Gem::Version
118
118
  version: '0'
119
119
  type: :development
120
120
  prerelease: false
121
121
  version_requirements: !ruby/object:Gem::Requirement
122
122
  requirements:
123
- - - '>='
123
+ - - ">="
124
124
  - !ruby/object:Gem::Version
125
125
  version: '0'
126
126
  - !ruby/object:Gem::Dependency
127
127
  name: git
128
128
  requirement: !ruby/object:Gem::Requirement
129
129
  requirements:
130
- - - '>='
130
+ - - ">="
131
131
  - !ruby/object:Gem::Version
132
132
  version: '0'
133
133
  type: :development
134
134
  prerelease: false
135
135
  version_requirements: !ruby/object:Gem::Requirement
136
136
  requirements:
137
- - - '>='
137
+ - - ">="
138
138
  - !ruby/object:Gem::Version
139
139
  version: '0'
140
- - !ruby/object:Gem::Dependency
141
- name: rails
142
- requirement: !ruby/object:Gem::Requirement
143
- requirements:
144
- - - ~>
145
- - !ruby/object:Gem::Version
146
- version: 4.1.0
147
- type: :runtime
148
- prerelease: false
149
- version_requirements: !ruby/object:Gem::Requirement
150
- requirements:
151
- - - ~>
152
- - !ruby/object:Gem::Version
153
- version: 4.1.0
154
140
  description: A Rails plugin for mobile devices in Japan
155
141
  email:
156
142
  - rust.stnard@gmail.com
@@ -158,8 +144,8 @@ executables: []
158
144
  extensions: []
159
145
  extra_rdoc_files: []
160
146
  files:
161
- - .gitignore
162
- - .rspec
147
+ - ".gitignore"
148
+ - ".rspec"
163
149
  - Gemfile
164
150
  - MIT-LICENSE
165
151
  - README
@@ -418,17 +404,17 @@ require_paths:
418
404
  - lib
419
405
  required_ruby_version: !ruby/object:Gem::Requirement
420
406
  requirements:
421
- - - '>='
407
+ - - ">="
422
408
  - !ruby/object:Gem::Version
423
409
  version: '0'
424
410
  required_rubygems_version: !ruby/object:Gem::Requirement
425
411
  requirements:
426
- - - '>='
412
+ - - ">="
427
413
  - !ruby/object:Gem::Version
428
414
  version: '0'
429
415
  requirements: []
430
416
  rubyforge_project:
431
- rubygems_version: 2.0.14
417
+ rubygems_version: 2.5.1
432
418
  signing_key:
433
419
  specification_version: 4
434
420
  summary: A Rails plugin for mobile devices in Japan