bootstrap-honoka-rails 3.3.7.2 → 3.3.7.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +21 -16
- data/Rakefile +38 -16
- data/lib/bootstrap/honoka/rails/engine.rb +1 -3
- data/lib/bootstrap/honoka/rails/version.rb +1 -1
- data/lib/bootstrap/honoka/rails.rb +6 -0
- data/test/dummy/app/controllers/pages_controller.rb +4 -8
- data/test/dummy/app/views/layouts/application.html.erb +1 -1
- data/test/dummy/config/application.rb +1 -5
- data/test/dummy/config/routes.rb +3 -4
- data/test/dummy/public/favicon.ico +0 -0
- data/test/honoka_test.rb +38 -4
- data/test/support/dummy_integration.rb +57 -0
- data/test/support/dummy_reporters.rb +61 -0
- data/test/test_helper.rb +49 -5
- metadata +66 -10
- data/test/dummy/config/initializers/backtrace_silencers.rb +0 -7
- data/test/dummy/config/initializers/inflections.rb +0 -16
- data/test/dummy/config/initializers/mime_types.rb +0 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 68416e9359b3090730d1ebff22e1bdb55a637f1937fa42df8455ddfc162e560b
|
4
|
+
data.tar.gz: 102ddae94e79d3c9303c97dfe44cc2894aa756995e6bdcd0e79a112fd318782c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ee10477c3525d4d1b86d25d8d31eaeaaee3bf275963f7c3bdd15f724a76dc2b975edc18c7ec8e115d5a0fb12c0855ac9c121a694346af0eb62b3b4edd8a17bdc
|
7
|
+
data.tar.gz: b0114a40787e65db26043da667e6f33b7f87d367a65be696f3b4536b02e7c964329fb7f75549ab1cd96e622177bb6d024f183671e64a52cf4fed0bfe7d65bb23
|
data/README.md
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# Bootstrap-Honoka-Rails
|
2
2
|
|
3
3
|
[Honoka](https://github.com/windyakin/Honoka) is a Bootstrap theme that can display Japanese beautifully.
|
4
|
-
bootstrap-honoka-rails can easily install [Honoka](https://github.com/windyakin/Honoka),[Umi](https://ysakasin.github.io/Umi/) , [Nico](https://nico.kubosho.com/) and [Rin](https://rinhoshizo.la/) on Rails.
|
4
|
+
bootstrap-honoka-rails can easily install [Honoka](https://github.com/windyakin/Honoka), [Umi](https://ysakasin.github.io/Umi/) , [Nico](https://nico.kubosho.com/) and [Rin](https://rinhoshizo.la/) on Rails.
|
5
5
|
|
6
6
|
[Honoka](https://github.com/windyakin/Honoka) は日本語も美しく表示できる Bootstrap テーマです。
|
7
7
|
bootstrap-honoka-rails は [Honoka](https://github.com/windyakin/Honoka) や [Umi](https://ysakasin.github.io/Umi/) や [Nico](https://nico.kubosho.com/) や [Rin](https://rinhoshizo.la/) を Rails 上に簡単にインストールできます。
|
@@ -34,7 +34,9 @@ gem 'bootstrap-honoka-rails' , '~>4.3.1' # or '~> 3.3.7'
|
|
34
34
|
Add to application.css `*= require _honoka` <br>
|
35
35
|
For bootstrap ver3 you need `*= _bootstrap-sprockets`.
|
36
36
|
|
37
|
-
|
37
|
+
app/assets/stylesheets/application.css
|
38
|
+
|
39
|
+
```css
|
38
40
|
/*
|
39
41
|
*= require _bootstrap-sprockets # Add line ※ v3 only
|
40
42
|
*= require _honoka # Add line
|
@@ -44,10 +46,11 @@ For bootstrap ver3 you need `*= _bootstrap-sprockets`.
|
|
44
46
|
|
45
47
|
and add to application.js <br>
|
46
48
|
`//= require popper` (bootstrap ver4 later), <br>
|
47
|
-
`//= require bootstrap-sprockets`
|
48
|
-
|
49
|
+
`//= require bootstrap-sprockets`
|
50
|
+
|
51
|
+
app/assets/javascripts/application.js
|
49
52
|
|
50
|
-
```js
|
53
|
+
```js
|
51
54
|
//= require jquery2
|
52
55
|
//= require rails-ujs
|
53
56
|
//= require activestorage
|
@@ -66,28 +69,30 @@ Please check [here](https://github.com/twbs/bootstrap-sass/issues/714) for more
|
|
66
69
|
とりあえずインストール後、上記を application.css と application.js に追加すれば OK です。<br>
|
67
70
|
注意点として `bootstrap-sprockets` を読み込むと思いますが、その場合 `bootstrap.min` は読み込む必要がありません。<br>
|
68
71
|
何故なら Dropdown が正しく動作しない可能性があります。 <br>
|
69
|
-
詳細は[こちら](https://github.com/twbs/bootstrap-sass/issues/714)
|
72
|
+
詳細は[こちら](https://github.com/twbs/bootstrap-sass/issues/714)をご確認ください。<br>
|
70
73
|
※production 環境で動作することを確認済み。 サンプルアプリは 'test/dummy' ディレクトリ内 にあります。
|
71
74
|
|
72
75
|
---
|
73
76
|
|
74
77
|
Certain [versions](VERSIONS.md) also support Nico , Umi and Rin.
|
75
78
|
|
76
|
-
|
79
|
+
app/assets/stylesheets/application.css
|
80
|
+
|
81
|
+
```css
|
77
82
|
*= require _umi # Add line
|
78
83
|
*= require_self
|
79
84
|
```
|
80
85
|
|
81
86
|
or
|
82
87
|
|
83
|
-
```css
|
88
|
+
```css
|
84
89
|
*= require _nico # Add line
|
85
90
|
*= require_self
|
86
91
|
```
|
87
92
|
|
88
93
|
or
|
89
94
|
|
90
|
-
```css
|
95
|
+
```css
|
91
96
|
*= require _rin # Add line
|
92
97
|
*= require_self
|
93
98
|
```
|
@@ -95,7 +100,7 @@ or
|
|
95
100
|
Please check [VERSIONS.md](VERSIONS.md) for Honoka Nico Umi Rin compatible Ver.
|
96
101
|
|
97
102
|
[日本語訳][特定のバージョン](VERSIONS.md)では "Nico"と "Umi" と "Rin" も対応しています。
|
98
|
-
`_honoka` の代わりに `*= require _nico` と書けば Nico になりますし、 `_umi` と書けば Umi デザインになります。
|
103
|
+
`_honoka` の代わりに `*= require _nico` と書けば Nico になりますし、 `_umi` と書けば Umi デザインになります。 <br>
|
99
104
|
Rin も Ver によっては `_rin` と書けば対応出来ます。<br>
|
100
105
|
Honoka Nico Umi Rin の対応 Ver は[VERSIONS.md](VERSIONS.md)をご確認ください。
|
101
106
|
|
@@ -110,11 +115,11 @@ bootstrap-honoka-rails は bootstrap 又は bootstrap-sass を内部的に使っ
|
|
110
115
|
|
111
116
|
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
112
117
|
|
113
|
-
##
|
118
|
+
## Supported bootstrap themes
|
114
119
|
|
115
|
-
#### [Honoka](
|
120
|
+
#### [Honoka](http://honokak.osaka/)
|
116
121
|
|
117
|
-
Source
|
122
|
+
Source URL ... [https://github.com/windyakin/Honoka](https://github.com/windyakin/Honoka)
|
118
123
|
|
119
124
|
> The MIT License (MIT)
|
120
125
|
>
|
@@ -124,7 +129,7 @@ Source Url ... [https://github.com/windyakin/Honoka](https://github.com/windyaki
|
|
124
129
|
|
125
130
|
#### [Umi](https://ysakasin.github.io/Umi/)
|
126
131
|
|
127
|
-
Source
|
132
|
+
Source URL ... [https://github.com/ysakasin/Umi](https://github.com/ysakasin/Umi)
|
128
133
|
|
129
134
|
> The MIT License (MIT)
|
130
135
|
>
|
@@ -134,7 +139,7 @@ Source Url ... [https://github.com/ysakasin/Umi](https://github.com/ysakasin/Umi
|
|
134
139
|
|
135
140
|
#### [Nico](https://nico.kubosho.com/)
|
136
141
|
|
137
|
-
Source
|
142
|
+
Source URL ... [https://github.com/kubosho/Nico](https://github.com/kubosho/Nico)
|
138
143
|
|
139
144
|
> The MIT License (MIT)
|
140
145
|
>
|
@@ -144,7 +149,7 @@ Source Url ... [https://github.com/kubosho/Nico](https://github.com/kubosho/Nico
|
|
144
149
|
|
145
150
|
#### [Rin](https://rinhoshizo.la/)
|
146
151
|
|
147
|
-
Source
|
152
|
+
Source URL ... [https://github.com/raryosu/Rin](https://github.com/raryosu/Rin)
|
148
153
|
|
149
154
|
> The MIT License (MIT)
|
150
155
|
>
|
data/Rakefile
CHANGED
@@ -1,33 +1,55 @@
|
|
1
1
|
begin
|
2
|
+
# bundlerでインストールしたgemをrequireで読み取り可能とする。
|
2
3
|
require 'bundler/setup'
|
3
4
|
rescue LoadError
|
4
5
|
puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
|
5
6
|
end
|
6
7
|
|
7
|
-
|
8
|
+
# requires
|
9
|
+
require 'bundler/gem_tasks' # build, clobber, release などのコマンドを使用可能とする。
|
10
|
+
require 'rdoc/task' # RDoc::Taskクラスのrequireを行う。
|
11
|
+
require 'rake/testtask' # Rake::TestTaskクラスのrequireを行う。
|
12
|
+
require 'rake/file_utils_ext' # rake用file_utilsの拡張
|
8
13
|
|
14
|
+
# rdoc, clobber_rdoc コマンド定義
|
9
15
|
RDoc::Task.new(:rdoc) do |rdoc|
|
10
16
|
rdoc.rdoc_dir = 'rdoc'
|
11
17
|
rdoc.title = 'Bootstrap::Honoka::Rails'
|
12
18
|
rdoc.options << '--line-numbers'
|
13
|
-
rdoc.rdoc_files.include('README.md')
|
14
|
-
rdoc.rdoc_files.include('lib/**/*.rb')
|
19
|
+
rdoc.rdoc_files.include('README.md', 'VERSIONS.md', 'lib/**/*.rb')
|
15
20
|
end
|
16
21
|
|
17
|
-
|
18
|
-
load 'rails/tasks/engine.rake'
|
19
|
-
|
20
|
-
load 'rails/tasks/statistics.rake'
|
21
|
-
|
22
|
-
require 'bundler/gem_tasks'
|
23
|
-
|
24
|
-
require 'rake/testtask'
|
25
|
-
|
22
|
+
# test コマンド定義
|
26
23
|
Rake::TestTask.new(:test) do |t|
|
27
|
-
t.libs << 'test'
|
28
|
-
t.pattern = 'test/**/*_test.rb'
|
29
|
-
t.verbose = false
|
30
|
-
t.warning = false
|
24
|
+
t.libs << 'test' # require pathの追加
|
25
|
+
t.pattern = 'test/**/*_test.rb' # 実行するテストコマンド
|
26
|
+
t.verbose = false # 詳細なテキストを非表示化
|
27
|
+
t.warning = false # 警告を非表示
|
31
28
|
end
|
32
29
|
|
30
|
+
# test clobberコマンド定義
|
31
|
+
desc 'Remove files generated during test'
|
32
|
+
task :clobber_test do
|
33
|
+
# 下記 rm_rf を使用するとbegin rescueで囲む必要もないが、
|
34
|
+
# あえて rm_r を使用している理由は下記の通り。
|
35
|
+
#
|
36
|
+
# - 本処理は主にシステムのデフォルトで用意されているrdocに倣っている。
|
37
|
+
# ※rdocの削除処理に対して [secure属性] だけは追加している。
|
38
|
+
# - rdocの削除である `rake clobber_rdoc` コマンドを使用すると
|
39
|
+
# ::Rake::Fileutils::rm_r が使用されている。
|
40
|
+
# - その rm_r コマンドでは `rm_r @rdoc_dir rescue nil` というように
|
41
|
+
# no such file or directoryエラーが発生する事も考慮して、
|
42
|
+
# rescueを行う処理となっていた。
|
43
|
+
#
|
44
|
+
# 以上の事から、rm_rf ではなく rm_r を使用している。
|
45
|
+
begin
|
46
|
+
::Rake::FileUtilsExt.rm_r('tmp', secure: true)
|
47
|
+
rescue StandardError
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
# clobberコマンドで clobber_testが動作するようにする。
|
52
|
+
task clobber: [:clobber_test]
|
53
|
+
|
54
|
+
# test コマンドをrakeのデフォルト動作とする。
|
33
55
|
task default: :test
|
@@ -13,9 +13,7 @@ module Bootstrap
|
|
13
13
|
|
14
14
|
# initializer
|
15
15
|
initializer 'bootstrap-honoka-rails.assets' do |app|
|
16
|
-
|
17
|
-
app.config.assets.paths << root.join('assets', sub).to_s
|
18
|
-
end
|
16
|
+
app.config.assets.paths << root.join('assets', 'stylesheets').to_s
|
19
17
|
end
|
20
18
|
end
|
21
19
|
end
|
@@ -3,6 +3,12 @@ require 'bootstrap/honoka/rails/engine'
|
|
3
3
|
module Bootstrap
|
4
4
|
module Honoka
|
5
5
|
module Rails
|
6
|
+
class << self
|
7
|
+
def stylesheets
|
8
|
+
Dir.glob("#{File.join(File.expand_path('../../..', __dir__), 'assets', 'stylesheets')}/*.scss")
|
9
|
+
.map { |f| f.match(%r{.+/_([^/]+?)\.scss})[1] }
|
10
|
+
end
|
11
|
+
end
|
6
12
|
end
|
7
13
|
end
|
8
14
|
end
|
@@ -1,11 +1,7 @@
|
|
1
1
|
require_relative 'boot'
|
2
2
|
|
3
3
|
require 'rails/all'
|
4
|
-
require
|
5
|
-
require 'sprockets'
|
6
|
-
require 'turbolinks'
|
7
|
-
|
8
|
-
Bundler.require(*Rails.groups)
|
4
|
+
Bundler.require(*Rails.groups << :development)
|
9
5
|
|
10
6
|
module Dummy
|
11
7
|
class Application < Rails::Application
|
data/test/dummy/config/routes.rb
CHANGED
File without changes
|
data/test/honoka_test.rb
CHANGED
@@ -1,10 +1,44 @@
|
|
1
1
|
require 'test_helper'
|
2
2
|
|
3
3
|
class Bootstrap::Honoka::Rails::Test < ActionDispatch::IntegrationTest
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
4
|
+
# Mix-in
|
5
|
+
include DummyIntegration
|
6
|
+
|
7
|
+
# constant stylesheets
|
8
|
+
STYLESHEETS = ::Bootstrap::Honoka::Rails.stylesheets
|
9
|
+
|
10
|
+
# constant data variables
|
11
|
+
TEST_PAGES = STYLESHEETS.map(&:freeze).freeze
|
12
|
+
TEST_PATHS = TEST_PAGES.map { |el| "/pages/#{el}".freeze }.freeze
|
13
|
+
TEST_DATAS = TEST_PAGES.zip(TEST_PATHS).map(&:freeze).freeze
|
14
|
+
|
15
|
+
# access test
|
16
|
+
TEST_DATAS.each do |page, path|
|
17
|
+
test "access #{page}" do
|
18
|
+
begin
|
19
|
+
# ページのアクセステスト
|
20
|
+
visit path
|
21
|
+
|
22
|
+
# ステータスコードの取得を行う
|
23
|
+
# https://stackoverflow.com/questions/7908907/how-to-test-the-response-code-with-capybara-selenium
|
24
|
+
response_code = Capybara.page.first('html')[:code].to_i
|
25
|
+
assert response_code == 200, 'エラー:正しくページを取得できませんでした。'
|
26
|
+
ensure
|
27
|
+
# エラーであっても表示ページのscreenshotは撮る。
|
28
|
+
take_full_page_screenshot!
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
# compile test
|
34
|
+
TEST_PAGES.each do |page|
|
35
|
+
test "compile #{page}" do
|
36
|
+
# Sassのコンパイルを行う
|
37
|
+
SassC::Engine.new("@import '_#{page}';",
|
38
|
+
load_paths: app.config.assets.paths).render
|
39
|
+
|
40
|
+
# 例外が発生せずここまで来れば assert成功
|
41
|
+
assert true
|
8
42
|
end
|
9
43
|
end
|
10
44
|
end
|
@@ -0,0 +1,57 @@
|
|
1
|
+
# require files
|
2
|
+
require 'fileutils'
|
3
|
+
|
4
|
+
# DummyIntegration
|
5
|
+
module DummyIntegration
|
6
|
+
# Capybara系のヘルパーメソッド
|
7
|
+
|
8
|
+
# Mix-in
|
9
|
+
include Capybara::DSL
|
10
|
+
include Capybara::Minitest::Assertions
|
11
|
+
|
12
|
+
def setup
|
13
|
+
super
|
14
|
+
cleanup_cache_files
|
15
|
+
end
|
16
|
+
|
17
|
+
def teardown
|
18
|
+
super
|
19
|
+
Capybara.reset_sessions!
|
20
|
+
Capybara.use_default_driver
|
21
|
+
end
|
22
|
+
|
23
|
+
private
|
24
|
+
|
25
|
+
def cleanup_cache_files
|
26
|
+
FileUtils.rm_rf('test/dummy/tmp/cache', secure: true)
|
27
|
+
end
|
28
|
+
|
29
|
+
def screenshot_to_file!(path, log_append = '')
|
30
|
+
# save screenshot!
|
31
|
+
page.save_screenshot File.join(ROOT_PATH, path)
|
32
|
+
::Minitest::Reporters::DummyReporter.log_strings_append! "Screenshot: Saved to #{path} #{log_append}"
|
33
|
+
end
|
34
|
+
|
35
|
+
# screenshotを撮る
|
36
|
+
def screenshot!
|
37
|
+
# パスを設定してファイルを保存する。
|
38
|
+
path = "tmp/#{name}.png"
|
39
|
+
screenshot_to_file! path
|
40
|
+
end
|
41
|
+
|
42
|
+
# 画面リサイズ後にscreenshotを撮る
|
43
|
+
def take_full_page_screenshot!
|
44
|
+
# https://testingrepository.com/full-page-screenshot-with-selenium/
|
45
|
+
# https://github.com/teampoltergeist/poltergeist/issues/165
|
46
|
+
# https://sqa.stackexchange.com/questions/9007/how-to-handle-time-out-receiving-message-from-the-renderer-in-chrome-driver
|
47
|
+
|
48
|
+
# 幅と高さを取得しブラウザのリサイズを行う。
|
49
|
+
width = Capybara.page.execute_script('return screen.width;')
|
50
|
+
height = Capybara.page.execute_script('return Math.max( document.body.scrollHeight , document.body.offsetHeight , document.documentElement.clientHeight , document.documentElement.scrollHeight , document.documentElement.offsetHeight );')
|
51
|
+
window = Capybara.current_session.driver.browser.manage.window
|
52
|
+
window.resize_to(width, height)
|
53
|
+
|
54
|
+
# スクリーンショットの保存
|
55
|
+
screenshot_to_file! "tmp/#{name}.png", "- W:H=#{width}:#{height}"
|
56
|
+
end
|
57
|
+
end
|
@@ -0,0 +1,61 @@
|
|
1
|
+
require 'minitest/reporters'
|
2
|
+
|
3
|
+
module Minitest
|
4
|
+
module Reporters
|
5
|
+
class DummyReporter < DefaultReporter
|
6
|
+
# 最後にログ出力する際の文字列配列(下記注意点)
|
7
|
+
#
|
8
|
+
# 1)特異メソッド内から下記変数を参照する為、クラス変数にするべきと思われるかもしれないが、
|
9
|
+
# 後にDummyReportersから継承される可能性を考慮すると、
|
10
|
+
# クラスインスタンス変数を使用する方が良いとの事。
|
11
|
+
# Effective Ruby 項目15
|
12
|
+
# 2)クラスインスタンス変数をクラスメソッドで使用する点から
|
13
|
+
# SingletonをIncludeする事も考慮したが、
|
14
|
+
# その場合
|
15
|
+
# ・Instanceメソッドからinitializeに引数が渡せない。
|
16
|
+
# ・どうしても親クラスのinitializeにデータを渡す際、
|
17
|
+
# def set_options( options = {} ); initialize(options); end;
|
18
|
+
# というようなRubyとして正か判断できないややこしい処理となりそうだった。
|
19
|
+
# (一般的に考えてコンストラクタを無理やり呼び出す違和感のあるやり方)
|
20
|
+
# という観点からSingletonは見送りとした。
|
21
|
+
@log_strings = []
|
22
|
+
|
23
|
+
# 特異メソッド
|
24
|
+
class << self
|
25
|
+
attr_reader :log_strings
|
26
|
+
|
27
|
+
def log_strings_append!(rhs)
|
28
|
+
@log_strings << rhs unless rhs.nil?
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
# 独自カラー
|
33
|
+
def cyan(string)
|
34
|
+
color? ? ANSI::Code.cyan(string) : string
|
35
|
+
end
|
36
|
+
|
37
|
+
def magenta(string)
|
38
|
+
color? ? ANSI::Code.magenta(string) : string
|
39
|
+
end
|
40
|
+
|
41
|
+
# レポートを行う
|
42
|
+
def on_report
|
43
|
+
super
|
44
|
+
return if self.class.log_strings.empty?
|
45
|
+
|
46
|
+
puts
|
47
|
+
puts cyan('------------------------------------------------------------')
|
48
|
+
puts magenta('[TEST INFO]')
|
49
|
+
self.class.log_strings.each do |data|
|
50
|
+
puts yellow(data)
|
51
|
+
end
|
52
|
+
puts cyan('------------------------------------------------------------')
|
53
|
+
puts
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
57
|
+
# セットアップ
|
58
|
+
reporter_options = { color: true }
|
59
|
+
::Minitest::Reporters.use! [DummyReporter.new(reporter_options)]
|
60
|
+
end
|
61
|
+
end
|
data/test/test_helper.rb
CHANGED
@@ -1,8 +1,52 @@
|
|
1
|
-
require 'minitest/autorun'
|
2
|
-
require 'minitest/reporters'
|
3
|
-
|
4
1
|
# Configure Rails Environment
|
5
2
|
ENV['RAILS_ENV'] = 'test'
|
6
3
|
|
7
|
-
|
8
|
-
|
4
|
+
# require environment / rails / capybara
|
5
|
+
require_relative 'dummy/config/environment'
|
6
|
+
require 'rails/test_help' # 内部でminitestのautorunも行う。
|
7
|
+
require 'capybara/rails' # 内部でcapybara/dslもrequireする。
|
8
|
+
require 'capybara/minitest'
|
9
|
+
|
10
|
+
# settings
|
11
|
+
Webdrivers.cache_time = 10_000
|
12
|
+
ROOT_PATH = File.expand_path('../', File.dirname(__FILE__)).freeze
|
13
|
+
|
14
|
+
# support directory files require
|
15
|
+
Dir['test/support/**/*.rb'].each do |file|
|
16
|
+
require_relative File.join('.', file[5..-4])
|
17
|
+
end
|
18
|
+
|
19
|
+
# -----------------------------------------------------------------------------
|
20
|
+
|
21
|
+
# https://groups.google.com/forum/#!topic/chromedriver-users/ZBEju24L5ww
|
22
|
+
|
23
|
+
# Settings Selenium Timeout
|
24
|
+
client = Selenium::WebDriver::Remote::Http::Default.new
|
25
|
+
client.read_timeout = 1000 # 1000 second read wait
|
26
|
+
|
27
|
+
# Capybara driver settings
|
28
|
+
Capybara.register_driver :selenium_chrome_headless do |app|
|
29
|
+
Capybara::Selenium::Driver.load_selenium
|
30
|
+
browser_options = ::Selenium::WebDriver::Chrome::Options.new.tap do |opts|
|
31
|
+
opts.args << 'start-maximized'
|
32
|
+
opts.args << 'enable-automation'
|
33
|
+
opts.args << '--window-size=1200,768'
|
34
|
+
opts.args << '--headless'
|
35
|
+
opts.args << '--disable-gpu'
|
36
|
+
opts.args << '--no-sandbox'
|
37
|
+
opts.args << '--disable-infobars'
|
38
|
+
opts.args << '--disable-dev-shm-usage'
|
39
|
+
opts.args << '--disable-browser-side-navigation'
|
40
|
+
opts.args << '--disable-site-isolation-trials'
|
41
|
+
end
|
42
|
+
Capybara::Selenium::Driver.new(app, browser: :chrome, options: browser_options, http_client: client)
|
43
|
+
end
|
44
|
+
|
45
|
+
# Capybara settings
|
46
|
+
Capybara.configure do |config|
|
47
|
+
config.server_port = 3000
|
48
|
+
config.app_host = "http://localhost:#{config.server_port}"
|
49
|
+
config.default_driver = :selenium_chrome_headless
|
50
|
+
config.javascript_driver = :selenium_chrome_headless
|
51
|
+
config.server = :webrick
|
52
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bootstrap-honoka-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.3.7.
|
4
|
+
version: 3.3.7.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Takmg
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-05-
|
11
|
+
date: 2019-05-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bootstrap-sass
|
@@ -24,6 +24,20 @@ dependencies:
|
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: 3.3.7
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: capybara
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 3.20.2
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 3.20.2
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
42
|
name: jquery-rails
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -66,6 +80,34 @@ dependencies:
|
|
66
80
|
- - "~>"
|
67
81
|
- !ruby/object:Gem::Version
|
68
82
|
version: 1.3.6
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: pry-byebug
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: 3.7.0
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: 3.7.0
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: sassc
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: 2.0.0
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: 2.0.0
|
69
111
|
- !ruby/object:Gem::Dependency
|
70
112
|
name: sprockets-rails
|
71
113
|
requirement: !ruby/object:Gem::Requirement
|
@@ -108,7 +150,21 @@ dependencies:
|
|
108
150
|
- - "~>"
|
109
151
|
- !ruby/object:Gem::Version
|
110
152
|
version: 4.1.20
|
111
|
-
|
153
|
+
- !ruby/object:Gem::Dependency
|
154
|
+
name: webdrivers
|
155
|
+
requirement: !ruby/object:Gem::Requirement
|
156
|
+
requirements:
|
157
|
+
- - ">="
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: 3.9.4
|
160
|
+
type: :development
|
161
|
+
prerelease: false
|
162
|
+
version_requirements: !ruby/object:Gem::Requirement
|
163
|
+
requirements:
|
164
|
+
- - ">="
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: 3.9.4
|
167
|
+
description: Gem to handle -Bootstrap Honoka, Umi, Nico, Rin- easily
|
112
168
|
email:
|
113
169
|
- Takmg@example.com
|
114
170
|
executables: []
|
@@ -172,16 +228,16 @@ files:
|
|
172
228
|
- test/dummy/config/environments/production.rb
|
173
229
|
- test/dummy/config/environments/test.rb
|
174
230
|
- test/dummy/config/initializers/assets.rb
|
175
|
-
- test/dummy/config/initializers/backtrace_silencers.rb
|
176
231
|
- test/dummy/config/initializers/filter_parameter_logging.rb
|
177
|
-
- test/dummy/config/initializers/inflections.rb
|
178
|
-
- test/dummy/config/initializers/mime_types.rb
|
179
232
|
- test/dummy/config/initializers/wrap_parameters.rb
|
180
233
|
- test/dummy/config/locales/en.yml
|
181
234
|
- test/dummy/config/routes.rb
|
182
235
|
- test/dummy/package.json
|
183
236
|
- test/dummy/production_key_generate.sh
|
237
|
+
- test/dummy/public/favicon.ico
|
184
238
|
- test/honoka_test.rb
|
239
|
+
- test/support/dummy_integration.rb
|
240
|
+
- test/support/dummy_reporters.rb
|
185
241
|
- test/test_helper.rb
|
186
242
|
homepage: https://github.com/Takmg/bootstrap-honoka-rails
|
187
243
|
licenses:
|
@@ -205,7 +261,7 @@ requirements: []
|
|
205
261
|
rubygems_version: 3.0.3
|
206
262
|
signing_key:
|
207
263
|
specification_version: 4
|
208
|
-
summary: Gem to handle -Bootstrap
|
264
|
+
summary: Gem to handle -Bootstrap Honoka, Umi, Nico, Rin- easily
|
209
265
|
test_files:
|
210
266
|
- test/dummy/Rakefile
|
211
267
|
- test/dummy/app/assets/config/manifest.js
|
@@ -233,14 +289,14 @@ test_files:
|
|
233
289
|
- test/dummy/config/environments/production.rb
|
234
290
|
- test/dummy/config/environments/test.rb
|
235
291
|
- test/dummy/config/initializers/assets.rb
|
236
|
-
- test/dummy/config/initializers/backtrace_silencers.rb
|
237
292
|
- test/dummy/config/initializers/filter_parameter_logging.rb
|
238
|
-
- test/dummy/config/initializers/inflections.rb
|
239
|
-
- test/dummy/config/initializers/mime_types.rb
|
240
293
|
- test/dummy/config/initializers/wrap_parameters.rb
|
241
294
|
- test/dummy/config/locales/en.yml
|
242
295
|
- test/dummy/config/routes.rb
|
243
296
|
- test/dummy/package.json
|
244
297
|
- test/dummy/production_key_generate.sh
|
298
|
+
- test/dummy/public/favicon.ico
|
245
299
|
- test/honoka_test.rb
|
300
|
+
- test/support/dummy_integration.rb
|
301
|
+
- test/support/dummy_reporters.rb
|
246
302
|
- test/test_helper.rb
|
@@ -1,7 +0,0 @@
|
|
1
|
-
# Be sure to restart your server when you modify this file.
|
2
|
-
|
3
|
-
# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
|
4
|
-
# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
|
5
|
-
|
6
|
-
# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
|
7
|
-
# Rails.backtrace_cleaner.remove_silencers!
|
@@ -1,16 +0,0 @@
|
|
1
|
-
# Be sure to restart your server when you modify this file.
|
2
|
-
|
3
|
-
# Add new inflection rules using the following format. Inflections
|
4
|
-
# are locale specific, and you may define rules for as many different
|
5
|
-
# locales as you wish. All of these examples are active by default:
|
6
|
-
# ActiveSupport::Inflector.inflections(:en) do |inflect|
|
7
|
-
# inflect.plural /^(ox)$/i, '\1en'
|
8
|
-
# inflect.singular /^(ox)en/i, '\1'
|
9
|
-
# inflect.irregular 'person', 'people'
|
10
|
-
# inflect.uncountable %w( fish sheep )
|
11
|
-
# end
|
12
|
-
|
13
|
-
# These inflection rules are supported but not enabled by default:
|
14
|
-
# ActiveSupport::Inflector.inflections(:en) do |inflect|
|
15
|
-
# inflect.acronym 'RESTful'
|
16
|
-
# end
|