a_r_q_logger 0.0.3
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.
- checksums.yaml +7 -0
- data/.codeclimate.yml +2 -0
- data/.coveralls.yml +1 -0
- data/.gitignore +8 -0
- data/.travis.yml +23 -0
- data/Gemfile +14 -0
- data/Gemfile.lock +167 -0
- data/MIT-LICENSE +20 -0
- data/Rakefile +21 -0
- data/a_r_q_logger.gemspec +31 -0
- data/lib/a_r_q_logger/version.rb +3 -0
- data/lib/a_r_q_logger.rb +50 -0
- data/spec/dummy/README.rdoc +28 -0
- data/spec/dummy/Rakefile +6 -0
- data/spec/dummy/app/assets/images/.keep +0 -0
- data/spec/dummy/app/assets/javascripts/application.js +13 -0
- data/spec/dummy/app/assets/stylesheets/application.css +13 -0
- data/spec/dummy/app/controllers/application_controller.rb +5 -0
- data/spec/dummy/app/controllers/concerns/.keep +0 -0
- data/spec/dummy/app/helpers/application_helper.rb +2 -0
- data/spec/dummy/app/mailers/.keep +0 -0
- data/spec/dummy/app/models/.keep +0 -0
- data/spec/dummy/app/models/concerns/.keep +0 -0
- data/spec/dummy/app/views/layouts/application.html.erb +14 -0
- data/spec/dummy/bin/bundle +3 -0
- data/spec/dummy/bin/rails +4 -0
- data/spec/dummy/bin/rake +4 -0
- data/spec/dummy/config/application.rb +38 -0
- data/spec/dummy/config/boot.rb +5 -0
- data/spec/dummy/config/database.def.yml +25 -0
- data/spec/dummy/config/environment.rb +5 -0
- data/spec/dummy/config/environments/development.rb +29 -0
- data/spec/dummy/config/environments/production.rb +80 -0
- data/spec/dummy/config/environments/test.rb +36 -0
- data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/dummy/config/initializers/filter_parameter_logging.rb +4 -0
- data/spec/dummy/config/initializers/inflections.rb +16 -0
- data/spec/dummy/config/initializers/mime_types.rb +5 -0
- data/spec/dummy/config/initializers/secret_token.rb +12 -0
- data/spec/dummy/config/initializers/session_store.rb +3 -0
- data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/spec/dummy/config/locales/en.yml +23 -0
- data/spec/dummy/config/routes.rb +56 -0
- data/spec/dummy/config.ru +4 -0
- data/spec/dummy/lib/assets/.keep +0 -0
- data/spec/dummy/log/.keep +0 -0
- data/spec/dummy/public/404.html +58 -0
- data/spec/dummy/public/422.html +58 -0
- data/spec/dummy/public/500.html +57 -0
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/rails_helper.rb +67 -0
- data/spec/spec_helper.rb +101 -0
- metadata +235 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA1:
|
|
3
|
+
metadata.gz: 0c22297e8c11c6bd201448eb4098463801bd7b75
|
|
4
|
+
data.tar.gz: 2503c9d84a87a22d54009fccf46f64c3dd4b9293
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: 32af77b86a9344ff08db8defa738b196a155102e05fded957de286b9c75f61119675f019c627dcd1e62aa35a2953a05a2269b3f22016b2c976c49f3b7c47a9ec
|
|
7
|
+
data.tar.gz: 707ec4e170d8893dbe93dd62deb03e708d6ddd65401ab8e39bb2a0552df3f58491b0232e7dc8e79af179976dd42a073fd5dfe0b6806ffd62b78d8ab8cce59439
|
data/.codeclimate.yml
ADDED
data/.coveralls.yml
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
service_name: travis-ci
|
data/.gitignore
ADDED
data/.travis.yml
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
language: ruby
|
|
2
|
+
rvm:
|
|
3
|
+
- 2.1.5
|
|
4
|
+
- 2.2.2
|
|
5
|
+
env:
|
|
6
|
+
- DB=sqlite
|
|
7
|
+
before_install:
|
|
8
|
+
- gem install bundler -v 1.10.3
|
|
9
|
+
install:
|
|
10
|
+
- bundle install
|
|
11
|
+
cache:
|
|
12
|
+
directories:
|
|
13
|
+
- vendor/bundle
|
|
14
|
+
before_script:
|
|
15
|
+
- cp spec/dummy/config/database.def.yml spec/dummy/config/database.yml
|
|
16
|
+
script:
|
|
17
|
+
- cd spec/dummy
|
|
18
|
+
- bundle install
|
|
19
|
+
- bundle exec rake db:create RAILS_ENV=test
|
|
20
|
+
- bundle exec rake db:migrate RAILS_ENV=test
|
|
21
|
+
- bundle exec rake db:test:prepare
|
|
22
|
+
- cd ../../
|
|
23
|
+
- bundle exec rake
|
data/Gemfile
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
source "https://rubygems.org"
|
|
2
|
+
|
|
3
|
+
# Declare your gem's dependencies in a_r_q_logger.gemspec.
|
|
4
|
+
# Bundler will treat runtime dependencies like base dependencies, and
|
|
5
|
+
# development dependencies will be added by default to the :development group.
|
|
6
|
+
gemspec
|
|
7
|
+
|
|
8
|
+
# Declare any dependencies that are still in development here instead of in
|
|
9
|
+
# your gemspec. These might include edge Rails or gems from your path or
|
|
10
|
+
# Git. Remember to move these dependencies to your gemspec before releasing
|
|
11
|
+
# your gem to rubygems.org.
|
|
12
|
+
|
|
13
|
+
# To use debugger
|
|
14
|
+
# gem 'debugger'
|
data/Gemfile.lock
ADDED
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
PATH
|
|
2
|
+
remote: .
|
|
3
|
+
specs:
|
|
4
|
+
a_r_q_logger (0.0.1)
|
|
5
|
+
rails (>= 4.0)
|
|
6
|
+
|
|
7
|
+
GEM
|
|
8
|
+
remote: https://rubygems.org/
|
|
9
|
+
specs:
|
|
10
|
+
actionmailer (4.2.7.1)
|
|
11
|
+
actionpack (= 4.2.7.1)
|
|
12
|
+
actionview (= 4.2.7.1)
|
|
13
|
+
activejob (= 4.2.7.1)
|
|
14
|
+
mail (~> 2.5, >= 2.5.4)
|
|
15
|
+
rails-dom-testing (~> 1.0, >= 1.0.5)
|
|
16
|
+
actionpack (4.2.7.1)
|
|
17
|
+
actionview (= 4.2.7.1)
|
|
18
|
+
activesupport (= 4.2.7.1)
|
|
19
|
+
rack (~> 1.6)
|
|
20
|
+
rack-test (~> 0.6.2)
|
|
21
|
+
rails-dom-testing (~> 1.0, >= 1.0.5)
|
|
22
|
+
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
|
23
|
+
actionview (4.2.7.1)
|
|
24
|
+
activesupport (= 4.2.7.1)
|
|
25
|
+
builder (~> 3.1)
|
|
26
|
+
erubis (~> 2.7.0)
|
|
27
|
+
rails-dom-testing (~> 1.0, >= 1.0.5)
|
|
28
|
+
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
|
29
|
+
activejob (4.2.7.1)
|
|
30
|
+
activesupport (= 4.2.7.1)
|
|
31
|
+
globalid (>= 0.3.0)
|
|
32
|
+
activemodel (4.2.7.1)
|
|
33
|
+
activesupport (= 4.2.7.1)
|
|
34
|
+
builder (~> 3.1)
|
|
35
|
+
activerecord (4.2.7.1)
|
|
36
|
+
activemodel (= 4.2.7.1)
|
|
37
|
+
activesupport (= 4.2.7.1)
|
|
38
|
+
arel (~> 6.0)
|
|
39
|
+
activesupport (4.2.7.1)
|
|
40
|
+
i18n (~> 0.7)
|
|
41
|
+
json (~> 1.7, >= 1.7.7)
|
|
42
|
+
minitest (~> 5.1)
|
|
43
|
+
thread_safe (~> 0.3, >= 0.3.4)
|
|
44
|
+
tzinfo (~> 1.1)
|
|
45
|
+
arel (6.0.3)
|
|
46
|
+
builder (3.2.2)
|
|
47
|
+
concurrent-ruby (1.0.2)
|
|
48
|
+
coveralls (0.8.15)
|
|
49
|
+
json (>= 1.8, < 3)
|
|
50
|
+
simplecov (~> 0.12.0)
|
|
51
|
+
term-ansicolor (~> 1.3)
|
|
52
|
+
thor (~> 0.19.1)
|
|
53
|
+
tins (>= 1.6.0, < 2)
|
|
54
|
+
diff-lcs (1.2.5)
|
|
55
|
+
docile (1.1.5)
|
|
56
|
+
erubis (2.7.0)
|
|
57
|
+
factory_girl (4.7.0)
|
|
58
|
+
activesupport (>= 3.0.0)
|
|
59
|
+
factory_girl_rails (4.7.0)
|
|
60
|
+
factory_girl (~> 4.7.0)
|
|
61
|
+
railties (>= 3.0.0)
|
|
62
|
+
globalid (0.3.7)
|
|
63
|
+
activesupport (>= 4.1.0)
|
|
64
|
+
i18n (0.7.0)
|
|
65
|
+
json (1.8.3)
|
|
66
|
+
loofah (2.0.3)
|
|
67
|
+
nokogiri (>= 1.5.9)
|
|
68
|
+
mail (2.6.4)
|
|
69
|
+
mime-types (>= 1.16, < 4)
|
|
70
|
+
mime-types (3.1)
|
|
71
|
+
mime-types-data (~> 3.2015)
|
|
72
|
+
mime-types-data (3.2016.0521)
|
|
73
|
+
mini_portile2 (2.1.0)
|
|
74
|
+
minitest (5.9.1)
|
|
75
|
+
nokogiri (1.6.8.1)
|
|
76
|
+
mini_portile2 (~> 2.1.0)
|
|
77
|
+
rack (1.6.4)
|
|
78
|
+
rack-test (0.6.3)
|
|
79
|
+
rack (>= 1.0)
|
|
80
|
+
rails (4.2.7.1)
|
|
81
|
+
actionmailer (= 4.2.7.1)
|
|
82
|
+
actionpack (= 4.2.7.1)
|
|
83
|
+
actionview (= 4.2.7.1)
|
|
84
|
+
activejob (= 4.2.7.1)
|
|
85
|
+
activemodel (= 4.2.7.1)
|
|
86
|
+
activerecord (= 4.2.7.1)
|
|
87
|
+
activesupport (= 4.2.7.1)
|
|
88
|
+
bundler (>= 1.3.0, < 2.0)
|
|
89
|
+
railties (= 4.2.7.1)
|
|
90
|
+
sprockets-rails
|
|
91
|
+
rails-deprecated_sanitizer (1.0.3)
|
|
92
|
+
activesupport (>= 4.2.0.alpha)
|
|
93
|
+
rails-dom-testing (1.0.7)
|
|
94
|
+
activesupport (>= 4.2.0.beta, < 5.0)
|
|
95
|
+
nokogiri (~> 1.6.0)
|
|
96
|
+
rails-deprecated_sanitizer (>= 1.0.1)
|
|
97
|
+
rails-html-sanitizer (1.0.3)
|
|
98
|
+
loofah (~> 2.0)
|
|
99
|
+
railties (4.2.7.1)
|
|
100
|
+
actionpack (= 4.2.7.1)
|
|
101
|
+
activesupport (= 4.2.7.1)
|
|
102
|
+
rake (>= 0.8.7)
|
|
103
|
+
thor (>= 0.18.1, < 2.0)
|
|
104
|
+
rake (10.5.0)
|
|
105
|
+
rb-readline (0.5.3)
|
|
106
|
+
rspec (3.5.0)
|
|
107
|
+
rspec-core (~> 3.5.0)
|
|
108
|
+
rspec-expectations (~> 3.5.0)
|
|
109
|
+
rspec-mocks (~> 3.5.0)
|
|
110
|
+
rspec-core (3.5.4)
|
|
111
|
+
rspec-support (~> 3.5.0)
|
|
112
|
+
rspec-expectations (3.5.0)
|
|
113
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
|
114
|
+
rspec-support (~> 3.5.0)
|
|
115
|
+
rspec-html-matchers (0.8.1)
|
|
116
|
+
nokogiri (~> 1)
|
|
117
|
+
rspec (>= 3.0.0.a, < 4)
|
|
118
|
+
rspec-mocks (3.5.0)
|
|
119
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
|
120
|
+
rspec-support (~> 3.5.0)
|
|
121
|
+
rspec-rails (3.5.2)
|
|
122
|
+
actionpack (>= 3.0)
|
|
123
|
+
activesupport (>= 3.0)
|
|
124
|
+
railties (>= 3.0)
|
|
125
|
+
rspec-core (~> 3.5.0)
|
|
126
|
+
rspec-expectations (~> 3.5.0)
|
|
127
|
+
rspec-mocks (~> 3.5.0)
|
|
128
|
+
rspec-support (~> 3.5.0)
|
|
129
|
+
rspec-support (3.5.0)
|
|
130
|
+
simplecov (0.12.0)
|
|
131
|
+
docile (~> 1.1.0)
|
|
132
|
+
json (>= 1.8, < 3)
|
|
133
|
+
simplecov-html (~> 0.10.0)
|
|
134
|
+
simplecov-html (0.10.0)
|
|
135
|
+
sprockets (3.7.0)
|
|
136
|
+
concurrent-ruby (~> 1.0)
|
|
137
|
+
rack (> 1, < 3)
|
|
138
|
+
sprockets-rails (3.2.0)
|
|
139
|
+
actionpack (>= 4.0)
|
|
140
|
+
activesupport (>= 4.0)
|
|
141
|
+
sprockets (>= 3.0.0)
|
|
142
|
+
sqlite3 (1.3.12)
|
|
143
|
+
term-ansicolor (1.4.0)
|
|
144
|
+
tins (~> 1.0)
|
|
145
|
+
thor (0.19.1)
|
|
146
|
+
thread_safe (0.3.5)
|
|
147
|
+
tins (1.12.0)
|
|
148
|
+
tzinfo (1.2.2)
|
|
149
|
+
thread_safe (~> 0.1)
|
|
150
|
+
|
|
151
|
+
PLATFORMS
|
|
152
|
+
ruby
|
|
153
|
+
|
|
154
|
+
DEPENDENCIES
|
|
155
|
+
a_r_q_logger!
|
|
156
|
+
bundler (~> 1.10)
|
|
157
|
+
coveralls
|
|
158
|
+
factory_girl_rails
|
|
159
|
+
rake (~> 10.0)
|
|
160
|
+
rb-readline
|
|
161
|
+
rspec
|
|
162
|
+
rspec-html-matchers
|
|
163
|
+
rspec-rails
|
|
164
|
+
sqlite3
|
|
165
|
+
|
|
166
|
+
BUNDLED WITH
|
|
167
|
+
1.11.2
|
data/MIT-LICENSE
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
Copyright 2016 mmmpa
|
|
2
|
+
|
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
4
|
+
a copy of this software and associated documentation files (the
|
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
|
9
|
+
the following conditions:
|
|
10
|
+
|
|
11
|
+
The above copyright notice and this permission notice shall be
|
|
12
|
+
included in all copies or substantial portions of the Software.
|
|
13
|
+
|
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/Rakefile
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
begin
|
|
2
|
+
require 'bundler/setup'
|
|
3
|
+
rescue LoadError
|
|
4
|
+
puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
|
|
5
|
+
end
|
|
6
|
+
|
|
7
|
+
require 'rdoc/task'
|
|
8
|
+
|
|
9
|
+
RDoc::Task.new(:rdoc) do |rdoc|
|
|
10
|
+
rdoc.rdoc_dir = 'rdoc'
|
|
11
|
+
rdoc.title = 'ARQLogger'
|
|
12
|
+
rdoc.options << '--line-numbers'
|
|
13
|
+
rdoc.rdoc_files.include('README.rdoc')
|
|
14
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
Bundler::GemHelper.install_tasks
|
|
21
|
+
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
$:.push File.expand_path("../lib", __FILE__)
|
|
2
|
+
|
|
3
|
+
# Maintain your gem's version:
|
|
4
|
+
require "a_r_q_logger/version"
|
|
5
|
+
|
|
6
|
+
# Describe your gem and declare its dependencies:
|
|
7
|
+
Gem::Specification.new do |spec|
|
|
8
|
+
spec.name = "a_r_q_logger"
|
|
9
|
+
spec.version = ARQLogger::VERSION
|
|
10
|
+
spec.authors = ["mmmpa"]
|
|
11
|
+
spec.email = ["mmmpa.mmmpa@gmail.com"]
|
|
12
|
+
spec.homepage = "http://mmmpa.net"
|
|
13
|
+
spec.summary = "count of querying"
|
|
14
|
+
spec.description = "count of querying"
|
|
15
|
+
|
|
16
|
+
spec.files = `git ls-files`.split("\n")
|
|
17
|
+
spec.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
|
18
|
+
spec.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
|
19
|
+
spec.require_paths = ["lib"]
|
|
20
|
+
spec.add_dependency "rails", ">= 4.0"
|
|
21
|
+
|
|
22
|
+
spec.add_development_dependency "bundler", "~> 1.10"
|
|
23
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
|
24
|
+
spec.add_development_dependency "sqlite3"
|
|
25
|
+
spec.add_development_dependency "rspec"
|
|
26
|
+
spec.add_development_dependency "rspec-rails"
|
|
27
|
+
spec.add_development_dependency "rspec-html-matchers"
|
|
28
|
+
spec.add_development_dependency "factory_girl_rails"
|
|
29
|
+
spec.add_development_dependency "coveralls"
|
|
30
|
+
spec.add_development_dependency "rb-readline"
|
|
31
|
+
end
|
data/lib/a_r_q_logger.rb
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
module ARQLogger
|
|
2
|
+
class << self
|
|
3
|
+
def log(&block)
|
|
4
|
+
start
|
|
5
|
+
block.call
|
|
6
|
+
finish
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
private
|
|
10
|
+
|
|
11
|
+
def start
|
|
12
|
+
ActiveRecord::LogSubscriber.duration_store_box = []
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
def finish
|
|
16
|
+
Result.new(
|
|
17
|
+
count: logger.size,
|
|
18
|
+
msec: logger.sum.round(1)
|
|
19
|
+
)
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
def logger
|
|
23
|
+
ActiveRecord::LogSubscriber.duration_store_box
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
class Result < Struct.new(:count, :msec)
|
|
28
|
+
def initialize(count:, msec:)
|
|
29
|
+
super(count, msec)
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
class ARQLoggerApplicationProxy < ::Rails::Railtie
|
|
35
|
+
initializer 'set data store for ARQLogger' do
|
|
36
|
+
class ::ActiveRecord::LogSubscriber
|
|
37
|
+
cattr_accessor :duration_store_box
|
|
38
|
+
|
|
39
|
+
alias_method :real_sql, :sql
|
|
40
|
+
|
|
41
|
+
def sql(event)
|
|
42
|
+
payload = event.payload
|
|
43
|
+
if payload[:name] && !IGNORE_PAYLOAD_NAMES.include?(payload[:name])
|
|
44
|
+
self.class.duration_store_box.push(event.duration)
|
|
45
|
+
end
|
|
46
|
+
real_sql(event)
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
end
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
== README
|
|
2
|
+
|
|
3
|
+
This README would normally document whatever steps are necessary to get the
|
|
4
|
+
application up and running.
|
|
5
|
+
|
|
6
|
+
Things you may want to cover:
|
|
7
|
+
|
|
8
|
+
* Ruby version
|
|
9
|
+
|
|
10
|
+
* System dependencies
|
|
11
|
+
|
|
12
|
+
* Configuration
|
|
13
|
+
|
|
14
|
+
* Database creation
|
|
15
|
+
|
|
16
|
+
* Database initialization
|
|
17
|
+
|
|
18
|
+
* How to run the test suite
|
|
19
|
+
|
|
20
|
+
* Services (job queues, cache servers, search engines, etc.)
|
|
21
|
+
|
|
22
|
+
* Deployment instructions
|
|
23
|
+
|
|
24
|
+
* ...
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
Please feel free to use a different markup language if you do not plan to run
|
|
28
|
+
<tt>rake doc:app</tt>.
|
data/spec/dummy/Rakefile
ADDED
|
File without changes
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// This is a manifest file that'll be compiled into application.js, which will include all the files
|
|
2
|
+
// listed below.
|
|
3
|
+
//
|
|
4
|
+
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
|
|
5
|
+
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
|
|
6
|
+
//
|
|
7
|
+
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
|
|
8
|
+
// compiled file.
|
|
9
|
+
//
|
|
10
|
+
// Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details
|
|
11
|
+
// about supported directives.
|
|
12
|
+
//
|
|
13
|
+
//= require_tree .
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* This is a manifest file that'll be compiled into application.css, which will include all the files
|
|
3
|
+
* listed below.
|
|
4
|
+
*
|
|
5
|
+
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
|
|
6
|
+
* or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
|
|
7
|
+
*
|
|
8
|
+
* You're free to add application-wide styles to this file and they'll appear at the top of the
|
|
9
|
+
* compiled file, but it's generally better to create a new file per style scope.
|
|
10
|
+
*
|
|
11
|
+
*= require_self
|
|
12
|
+
*= require_tree .
|
|
13
|
+
*/
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<title>Dummy</title>
|
|
5
|
+
<%= stylesheet_link_tag "application", media: "all", "data-turbolinks-track" => true %>
|
|
6
|
+
<%= javascript_include_tag "application", "data-turbolinks-track" => true %>
|
|
7
|
+
<%= csrf_meta_tags %>
|
|
8
|
+
</head>
|
|
9
|
+
<body>
|
|
10
|
+
|
|
11
|
+
<%= yield %>
|
|
12
|
+
|
|
13
|
+
</body>
|
|
14
|
+
</html>
|
data/spec/dummy/bin/rake
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
require File.expand_path('../boot', __FILE__)
|
|
2
|
+
|
|
3
|
+
# Pick the frameworks you want:
|
|
4
|
+
require "active_record/railtie"
|
|
5
|
+
require "action_controller/railtie"
|
|
6
|
+
require "action_mailer/railtie"
|
|
7
|
+
require "sprockets/railtie"
|
|
8
|
+
# require "rails/test_unit/railtie"
|
|
9
|
+
|
|
10
|
+
Bundler.require(*Rails.groups)
|
|
11
|
+
require "a_r_q_logger"
|
|
12
|
+
|
|
13
|
+
module Dummy
|
|
14
|
+
class Application < Rails::Application
|
|
15
|
+
config.generators do |g|
|
|
16
|
+
g.assets false
|
|
17
|
+
g.helper false
|
|
18
|
+
g.view false
|
|
19
|
+
|
|
20
|
+
g.test_framework :rspec, fixtures: true, view_specs: false, helper_specs: false, routing_specs:
|
|
21
|
+
false, controller_specs: true, request_specs: true
|
|
22
|
+
g.fixture_replacement :factory_girl, dir: 'spec/factories'
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
# Settings in config/environments/* take precedence over those specified here.
|
|
26
|
+
# Application configuration should go into files in config/initializers
|
|
27
|
+
# -- all .rb files in that directory are automatically loaded.
|
|
28
|
+
|
|
29
|
+
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
|
|
30
|
+
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
|
|
31
|
+
# config.time_zone = 'Central Time (US & Canada)'
|
|
32
|
+
|
|
33
|
+
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
|
|
34
|
+
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
|
|
35
|
+
# config.i18n.default_locale = :de
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# SQLite version 3.x
|
|
2
|
+
# gem install sqlite3
|
|
3
|
+
#
|
|
4
|
+
# Ensure the SQLite 3 gem is defined in your Gemfile
|
|
5
|
+
# gem 'sqlite3'
|
|
6
|
+
development:
|
|
7
|
+
adapter: sqlite3
|
|
8
|
+
database: db/development.sqlite3
|
|
9
|
+
pool: 5
|
|
10
|
+
timeout: 5000
|
|
11
|
+
|
|
12
|
+
# Warning: The database defined as "test" will be erased and
|
|
13
|
+
# re-generated from your development database when you run "rake".
|
|
14
|
+
# Do not set this db to the same as development or production.
|
|
15
|
+
test:
|
|
16
|
+
adapter: sqlite3
|
|
17
|
+
database: db/test.sqlite3
|
|
18
|
+
pool: 5
|
|
19
|
+
timeout: 5000
|
|
20
|
+
|
|
21
|
+
production:
|
|
22
|
+
adapter: sqlite3
|
|
23
|
+
database: db/production.sqlite3
|
|
24
|
+
pool: 5
|
|
25
|
+
timeout: 5000
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
Dummy::Application.configure do
|
|
2
|
+
# Settings specified here will take precedence over those in config/application.rb.
|
|
3
|
+
|
|
4
|
+
# In the development environment your application's code is reloaded on
|
|
5
|
+
# every request. This slows down response time but is perfect for development
|
|
6
|
+
# since you don't have to restart the web server when you make code changes.
|
|
7
|
+
config.cache_classes = false
|
|
8
|
+
|
|
9
|
+
# Do not eager load code on boot.
|
|
10
|
+
config.eager_load = false
|
|
11
|
+
|
|
12
|
+
# Show full error reports and disable caching.
|
|
13
|
+
config.consider_all_requests_local = true
|
|
14
|
+
config.action_controller.perform_caching = false
|
|
15
|
+
|
|
16
|
+
# Don't care if the mailer can't send.
|
|
17
|
+
config.action_mailer.raise_delivery_errors = false
|
|
18
|
+
|
|
19
|
+
# Print deprecation notices to the Rails logger.
|
|
20
|
+
config.active_support.deprecation = :log
|
|
21
|
+
|
|
22
|
+
# Raise an error on page load if there are pending migrations
|
|
23
|
+
config.active_record.migration_error = :page_load
|
|
24
|
+
|
|
25
|
+
# Debug mode disables concatenation and preprocessing of assets.
|
|
26
|
+
# This option may cause significant delays in view rendering with a large
|
|
27
|
+
# number of complex assets.
|
|
28
|
+
config.assets.debug = true
|
|
29
|
+
end
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
Dummy::Application.configure do
|
|
2
|
+
# Settings specified here will take precedence over those in config/application.rb.
|
|
3
|
+
|
|
4
|
+
# Code is not reloaded between requests.
|
|
5
|
+
config.cache_classes = true
|
|
6
|
+
|
|
7
|
+
# Eager load code on boot. This eager loads most of Rails and
|
|
8
|
+
# your application in memory, allowing both thread web servers
|
|
9
|
+
# and those relying on copy on write to perform better.
|
|
10
|
+
# Rake tasks automatically ignore this option for performance.
|
|
11
|
+
config.eager_load = true
|
|
12
|
+
|
|
13
|
+
# Full error reports are disabled and caching is turned on.
|
|
14
|
+
config.consider_all_requests_local = false
|
|
15
|
+
config.action_controller.perform_caching = true
|
|
16
|
+
|
|
17
|
+
# Enable Rack::Cache to put a simple HTTP cache in front of your application
|
|
18
|
+
# Add `rack-cache` to your Gemfile before enabling this.
|
|
19
|
+
# For large-scale production use, consider using a caching reverse proxy like nginx, varnish or squid.
|
|
20
|
+
# config.action_dispatch.rack_cache = true
|
|
21
|
+
|
|
22
|
+
# Disable Rails's static asset server (Apache or nginx will already do this).
|
|
23
|
+
config.serve_static_files = false
|
|
24
|
+
|
|
25
|
+
# Compress JavaScripts and CSS.
|
|
26
|
+
config.assets.js_compressor = :uglifier
|
|
27
|
+
# config.assets.css_compressor = :sass
|
|
28
|
+
|
|
29
|
+
# Do not fallback to assets pipeline if a precompiled asset is missed.
|
|
30
|
+
config.assets.compile = false
|
|
31
|
+
|
|
32
|
+
# Generate digests for assets URLs.
|
|
33
|
+
config.assets.digest = true
|
|
34
|
+
|
|
35
|
+
# Version of your assets, change this if you want to expire all your assets.
|
|
36
|
+
config.assets.version = '1.0'
|
|
37
|
+
|
|
38
|
+
# Specifies the header that your server uses for sending files.
|
|
39
|
+
# config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
|
|
40
|
+
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
|
|
41
|
+
|
|
42
|
+
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
|
|
43
|
+
# config.force_ssl = true
|
|
44
|
+
|
|
45
|
+
# Set to :debug to see everything in the log.
|
|
46
|
+
config.log_level = :info
|
|
47
|
+
|
|
48
|
+
# Prepend all log lines with the following tags.
|
|
49
|
+
# config.log_tags = [ :subdomain, :uuid ]
|
|
50
|
+
|
|
51
|
+
# Use a different logger for distributed setups.
|
|
52
|
+
# config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
|
|
53
|
+
|
|
54
|
+
# Use a different cache store in production.
|
|
55
|
+
# config.cache_store = :mem_cache_store
|
|
56
|
+
|
|
57
|
+
# Enable serving of images, stylesheets, and JavaScripts from an asset server.
|
|
58
|
+
# config.action_controller.asset_host = "http://assets.example.com"
|
|
59
|
+
|
|
60
|
+
# Precompile additional assets.
|
|
61
|
+
# application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
|
|
62
|
+
# config.assets.precompile += %w( search.js )
|
|
63
|
+
|
|
64
|
+
# Ignore bad email addresses and do not raise email delivery errors.
|
|
65
|
+
# Set this to true and configure the email server for immediate delivery to raise delivery errors.
|
|
66
|
+
# config.action_mailer.raise_delivery_errors = false
|
|
67
|
+
|
|
68
|
+
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
|
|
69
|
+
# the I18n.default_locale when a translation can not be found).
|
|
70
|
+
config.i18n.fallbacks = true
|
|
71
|
+
|
|
72
|
+
# Send deprecation notices to registered listeners.
|
|
73
|
+
config.active_support.deprecation = :notify
|
|
74
|
+
|
|
75
|
+
# Disable automatic flushing of the log to improve performance.
|
|
76
|
+
# config.autoflush_log = false
|
|
77
|
+
|
|
78
|
+
# Use default logging formatter so that PID and timestamp are not suppressed.
|
|
79
|
+
config.log_formatter = ::Logger::Formatter.new
|
|
80
|
+
end
|