jpmobile 4.2.3 → 4.2.4

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: 9e7afdd073603c4cd21bb29179a79d69ae6c510b
4
- data.tar.gz: 019c1675536713dbd71faeb3f9e6ee51e1bb0325
3
+ metadata.gz: c642e8e056bb3640414207b90b5f708bbbbb381b
4
+ data.tar.gz: b81621cee3f51f931acb99fe373950eeb8a2f167
5
5
  SHA512:
6
- metadata.gz: 0ffd252eb6afb2a17ea2c4b516a0d783c2d097c8aa2a73f1512f030f1a6587afaa3255f679c5122e97e793da3299d9ce25b02b38ad04aafbbc8c016cca29c786
7
- data.tar.gz: 9057c72035500a9e822a61f633039cc1a75c93bbe2b09534028866329a149bfe204d7254448cda8c04d73c298b4419a05952276d0277908cc1f2d840b3333f63
6
+ metadata.gz: 14337a48b6e5432ee5f4d2df98e1b3224722a9c72d70bbeb47f2b99c47b6e204ce551d9e5093ac42c83650a6a5c7c8e1d2965720e3245229db669c18d5b5cb37
7
+ data.tar.gz: de4719aad80730b8817ba8d197a67861584c42192f025f7226a5ff88b78df14706fdaa806710aae6570da80a9e1d020f8c5093408a18dd182f8d71947eaed407
data/.gitignore CHANGED
@@ -17,4 +17,5 @@ rdoc
17
17
  spec/reports
18
18
  test/tmp
19
19
  test/version_tmp
20
- .ruby-version
20
+ .ruby-version
21
+ .envrc
data/jpmobile.gemspec CHANGED
@@ -16,7 +16,7 @@ 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'
19
+ gem.add_development_dependency 'rails', '~> 4.2'
20
20
  gem.add_development_dependency 'rspec'
21
21
  gem.add_development_dependency 'rspec-rails'
22
22
  gem.add_development_dependency 'rspec-its'
@@ -26,4 +26,5 @@ Gem::Specification.new do |gem|
26
26
  gem.add_development_dependency 'hpricot'
27
27
  gem.add_development_dependency 'git'
28
28
  gem.add_development_dependency 'pry'
29
+ gem.add_development_dependency 'mail', '2.5.5'
29
30
  end
@@ -1,3 +1,3 @@
1
1
  module Jpmobile
2
- VERSION = "4.2.3"
2
+ VERSION = "4.2.4"
3
3
  end
@@ -1,4 +1,3 @@
1
- # -*- coding: utf-8 -*-
2
1
  # desc "Explaining what the task does"
3
2
  # task :jpmobile do
4
3
  # # Task goes here
@@ -19,21 +18,19 @@ begin
19
18
  end
20
19
  end
21
20
  rescue LoadError
22
- warn "RSpec is not installed. Some tasks were skipped. please install rspec"
21
+ warn 'RSpec is not installed. Some tasks were skipped. please install rspec'
23
22
  end
24
23
 
25
24
  namespace :test do
26
- desc "Generate rails app and run jpmobile tests in the app"
27
- task :rails, [:skip] do |t, args|
28
- rails_root = "test/rails/rails_root"
29
- relative_root = "../../../"
25
+ desc 'Generate rails app and run jpmobile tests in the app'
26
+ task :rails, [:skip] do |_, args|
27
+ rails_root = 'test/rails/rails_root'
30
28
 
31
- puts "Running tests in Rails"
32
- skip = args.skip == "true"
29
+ puts 'Running tests in Rails'
30
+ skip = args.skip == 'true'
33
31
 
34
32
  unless skip
35
33
  # generate rails app
36
- FileUtils.rm_rf("Gemfile.lock")
37
34
  FileUtils.rm_rf(rails_root)
38
35
  FileUtils.mkdir_p(rails_root)
39
36
  `rails new #{rails_root} --skip-bundle`
@@ -42,7 +39,7 @@ namespace :test do
42
39
  # setup jpmobile
43
40
  plugin_path = File.join(rails_root, 'vendor', 'jpmobile')
44
41
  FileUtils.mkdir_p(plugin_path)
45
- FileList["*"].exclude("test").exclude("spec").exclude('vendor').each do |file|
42
+ FileList['*'].exclude('test').exclude('spec').exclude('vendor').each do |file|
46
43
  FileUtils.cp_r(file, plugin_path)
47
44
  end
48
45
 
@@ -50,26 +47,37 @@ namespace :test do
50
47
  begin
51
48
  plugin_path = File.join(rails_root, 'vendor', 'jpmobile-ipaddresses')
52
49
  FileUtils.mkdir_p(plugin_path)
53
- FileList["vendor/jpmobile-ipaddresses/*"].exclude("test").each do |file|
50
+ FileList['vendor/jpmobile-ipaddresses/*'].exclude('test').each do |file|
54
51
  FileUtils.cp_r(file, plugin_path)
55
52
  end
56
53
  rescue LoadError
57
- puts "IP Address test requires jpmobile-ipaddresses module"
54
+ puts 'IP Address test requires jpmobile-ipaddresses module'
58
55
  end
59
56
 
60
57
  # setup jpmobile-terminfo
61
58
  begin
62
59
  plugin_path = File.join(rails_root, 'vendor', 'jpmobile-terminfo')
63
60
  FileUtils.mkdir_p(plugin_path)
64
- FileList["vendor/jpmobile-terminfo/*"].exclude("test").each do |file|
61
+ FileList['vendor/jpmobile-terminfo/*'].exclude('test').each do |file|
65
62
  FileUtils.cp_r(file, plugin_path)
66
63
  end
67
64
  rescue LoadError
68
- puts "Terminal display information test requires jpmobile-terminfo module"
65
+ puts 'Terminal display information test requires jpmobile-terminfo module'
66
+ end
67
+
68
+ # setup activerecord-session_store
69
+ begin
70
+ plugin_path = File.join(rails_root, 'vendor', 'activerecord-session_store')
71
+ FileUtils.mkdir_p(plugin_path)
72
+ FileList['../activerecord-session_store/*'].exclude('test').each do |file|
73
+ FileUtils.cp_r(file, plugin_path)
74
+ end
75
+ rescue LoadError
76
+ puts 'Terminal display information test requires jpmobile-terminfo module'
69
77
  end
70
78
 
71
79
  # setup tests
72
- FileList["test/rails/overrides/*"].each do |file|
80
+ FileList['test/rails/overrides/*'].each do |file|
73
81
  FileUtils.cp_r(file, rails_root)
74
82
  end
75
83
 
@@ -77,10 +85,10 @@ namespace :test do
77
85
  # for cookie_only option
78
86
  config_path = File.join(rails_root, 'config', 'initializers', 'session_store.rb')
79
87
  File.open(config_path, 'w') do |file|
80
- file.write <<-END
81
- Rails.application.config.session_store :active_record_store, :key => '_session_id'
82
- Rails.application.config.session_options = {:cookie_only => false}
83
- END
88
+ file.write <<-SESSION_CONFIG
89
+ Rails.application.config.session_store :active_record_store, :key => '_session_id'
90
+ Rails.application.config.session_options = { :cookie_only => false }
91
+ SESSION_CONFIG
84
92
  end
85
93
  end
86
94
 
@@ -88,20 +96,29 @@ END
88
96
  # add gems for jpmobile spec
89
97
  config_path = File.join(rails_root, 'Gemfile')
90
98
  File.open(config_path, 'a+') do |file|
91
- file.write <<-END
92
- instance_eval File.read(File.expand_path(__FILE__) + '.jpmobile')
93
- END
99
+ file.write <<-GEMFILE
100
+ instance_eval File.read(File.expand_path(__FILE__) + '.jpmobile')
101
+ GEMFILE
94
102
  end
95
103
  end
96
104
 
97
105
  # run tests in rails
98
- cd rails_root
99
- ruby "-S bundle install"
100
- ruby "-S rake db:migrate RAILS_ENV=test" unless skip
101
- ruby "-S rake spec"
102
- # ruby "-S rspec -b --color spec/requests/filter_spec.rb -e 'jpmobile integration spec HankakuInputFilterController SoftBank 910T からのアクセス it should behave like hankaku_filter :input => true のとき はtextareaの中では半角に変換されないこと'"
106
+ Dir.chdir(rails_root) do
107
+ Bundler.with_clean_env do
108
+ original_env = ENV.to_hash
109
+
110
+ ENV.update('RBENV_VERSION' => nil)
111
+ ENV.update('RBENV_DIR' => nil)
112
+
113
+ system 'bundle install'
114
+ system 'bin/rake db:migrate RAILS_ENV=test' unless skip
115
+ system 'bin/rake spec'
116
+
117
+ ENV.replace(original_env)
118
+ end
119
+ end
103
120
  end
104
- desc "Run sinatra on jpmobile tests"
121
+ desc 'Run sinatra on jpmobile tests'
105
122
  Rake::TestTask.new(:sinatra) do |t|
106
123
  t.libs << 'lib'
107
124
  t.libs << 'test/sinatra'
@@ -342,7 +342,16 @@ describe "Jpmobile::Mail" do
342
342
  end
343
343
 
344
344
  it "delivers through SMTP" do
345
- @mail.delivery_method :smtp, {:enable_starttls_auto => false}
345
+ @mail.delivery_method :smtp, {
346
+ enable_starttls_auto: false,
347
+ user_name: ENV['MAILTRAP_USERNAME'],
348
+ password: ENV['MAILTRAP_PASSWORD'],
349
+ address: 'smtp.mailtrap.io',
350
+ domain: 'smtp.mailtrap.io',
351
+ port: '2525',
352
+ authentication: :cram_md5
353
+ }
354
+
346
355
  expect {
347
356
  @mail.deliver
348
357
  }.not_to raise_error
@@ -6,11 +6,12 @@ gem 'jpmobile-ipaddresses', path: './vendor/jpmobile-ipaddresses'
6
6
 
7
7
  gem 'activerecord-session_store'
8
8
 
9
+ gem 'mail', '2.5.5'
10
+
9
11
  # Bundle gems for certain environments:
10
12
  group :development, :test do
11
13
  gem "rspec"
12
14
  gem "rspec-rails"
13
- gem 'capybara'
14
15
  gem 'capybara-webkit'
15
16
  gem 'pry'
16
17
  end
@@ -18,7 +18,7 @@ describe "jpmobile integration spec", :type => :feature do
18
18
  end
19
19
  it "は&nbsp;変換されない" do
20
20
  visit "/#{controller}/nbsp_char"
21
- expect(page.body.encode('UTF-8')).to have_content('アブラ カダブラ')
21
+ expect(page.body.encode('UTF-8')).to have_content("アブラ\xc2\xa0カダブラ")
22
22
  end
23
23
  end
24
24
 
@@ -33,7 +33,7 @@ describe "jpmobile integration spec", :type => :feature do
33
33
  end
34
34
  it "は&nbsp;変換されない" do
35
35
  visit "/#{controller}/nbsp_char"
36
- expect(page.body.encode('UTF-8')).to have_content('アブラ カダブラ')
36
+ expect(page.body.encode('UTF-8')).to have_content("アブラ\xc2\xa0カダブラ")
37
37
  end
38
38
  end
39
39
 
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.2.3
4
+ version: 4.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shin-ichiro OGAWA
@@ -9,22 +9,22 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-02-25 00:00:00.000000000 Z
12
+ date: 2019-03-14 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
- version: '0'
20
+ version: '4.2'
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
- version: '0'
27
+ version: '4.2'
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: rspec
30
30
  requirement: !ruby/object:Gem::Requirement
@@ -151,6 +151,20 @@ dependencies:
151
151
  - - ">="
152
152
  - !ruby/object:Gem::Version
153
153
  version: '0'
154
+ - !ruby/object:Gem::Dependency
155
+ name: mail
156
+ requirement: !ruby/object:Gem::Requirement
157
+ requirements:
158
+ - - '='
159
+ - !ruby/object:Gem::Version
160
+ version: 2.5.5
161
+ type: :development
162
+ prerelease: false
163
+ version_requirements: !ruby/object:Gem::Requirement
164
+ requirements:
165
+ - - '='
166
+ - !ruby/object:Gem::Version
167
+ version: 2.5.5
154
168
  description: A Rails plugin for mobile devices in Japan
155
169
  email:
156
170
  - rust.stnard@gmail.com
@@ -281,6 +295,7 @@ files:
281
295
  - spec/unit/variants_spec.rb
282
296
  - test/rails/.gitignore
283
297
  - test/rails/overrides/.rspec
298
+ - test/rails/overrides/Gemfile
284
299
  - test/rails/overrides/Gemfile.jpmobile
285
300
  - test/rails/overrides/app/controllers/admin/top_controller.rb
286
301
  - test/rails/overrides/app/controllers/application_controller.rb
@@ -434,7 +449,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
434
449
  version: '0'
435
450
  requirements: []
436
451
  rubyforge_project:
437
- rubygems_version: 2.5.1
452
+ rubygems_version: 2.6.14.1
438
453
  signing_key:
439
454
  specification_version: 4
440
455
  summary: A Rails plugin for mobile devices in Japan
@@ -495,6 +510,7 @@ test_files:
495
510
  - spec/unit/variants_spec.rb
496
511
  - test/rails/.gitignore
497
512
  - test/rails/overrides/.rspec
513
+ - test/rails/overrides/Gemfile
498
514
  - test/rails/overrides/Gemfile.jpmobile
499
515
  - test/rails/overrides/app/controllers/admin/top_controller.rb
500
516
  - test/rails/overrides/app/controllers/application_controller.rb