oh_my_log 1.0.1
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 +65 -0
- data/.document +4 -0
- data/.gitignore +8 -0
- data/.rubocop.yml +73 -0
- data/.ruby-version +1 -0
- data/.travis.yml +31 -0
- data/Appraisals +25 -0
- data/Gemfile +2 -0
- data/LICENSE.txt +21 -0
- data/README.md +180 -0
- data/Rakefile +20 -0
- data/blue_print/oh_my_log_initializer.rb +8 -0
- data/gemfiles/rails_4.2_stable.gemfile +8 -0
- data/gemfiles/rails_4.2_stable.gemfile.lock +181 -0
- data/gemfiles/rails_5.0_stable.gemfile +8 -0
- data/gemfiles/rails_5.0_stable.gemfile.lock +188 -0
- data/gemfiles/rails_5.1_stable.gemfile +8 -0
- data/gemfiles/rails_5.1_stable.gemfile.lock +188 -0
- data/gemfiles/rails_5.2_stable.gemfile +8 -0
- data/gemfiles/rails_5.2_stable.gemfile.lock +196 -0
- data/lib/oh_my_log/active_record_observer.rb +11 -0
- data/lib/oh_my_log/configuration.rb +37 -0
- data/lib/oh_my_log/effect.rb +18 -0
- data/lib/oh_my_log/log.rb +140 -0
- data/lib/oh_my_log/mongoid_observer.rb +11 -0
- data/lib/oh_my_log/observer_factory.rb +90 -0
- data/lib/oh_my_log/request.rb +22 -0
- data/lib/oh_my_log/result.rb +48 -0
- data/lib/oh_my_log/selector.rb +44 -0
- data/lib/oh_my_log/version.rb +5 -0
- data/lib/oh_my_log.rb +47 -0
- data/lib/railtie.rb +48 -0
- data/lib/tasks/oh_my_log.rake +32 -0
- data/oh_my_log.gemspec +36 -0
- data/spec/controllers/foos_controller_spec.rb +116 -0
- data/spec/dummy/Rakefile +4 -0
- data/spec/dummy/app/controllers/application_controller.rb +3 -0
- data/spec/dummy/app/controllers/foos_controller.rb +23 -0
- data/spec/dummy/app/models/application_record.rb +3 -0
- data/spec/dummy/app/models/doo.rb +2 -0
- data/spec/dummy/app/models/foo.rb +2 -0
- data/spec/dummy/app/views/foos/create.html.erb +0 -0
- data/spec/dummy/app/views/foos/index.html.erb +0 -0
- data/spec/dummy/app/views/foos/show.html.erb +0 -0
- data/spec/dummy/app/views/foos/two_in_one.html.erb +0 -0
- data/spec/dummy/app/views/foos/update.html.erb +0 -0
- data/spec/dummy/config/application.rb +20 -0
- data/spec/dummy/config/boot.rb +6 -0
- data/spec/dummy/config/database.yml +7 -0
- data/spec/dummy/config/environment.rb +2 -0
- data/spec/dummy/config/environments/test.rb +37 -0
- data/spec/dummy/config/initializers/migration_class.rb +8 -0
- data/spec/dummy/config/routes.rb +5 -0
- data/spec/dummy/config/secrets.yml +2 -0
- data/spec/dummy/config.ru +4 -0
- data/spec/dummy/db/migrate/20120508165529_create_tables.rb +21 -0
- data/spec/rails_helper.rb +1 -0
- data/spec/spec_helper.rb +32 -0
- metadata +262 -0
@@ -0,0 +1,188 @@
|
|
1
|
+
PATH
|
2
|
+
remote: ..
|
3
|
+
specs:
|
4
|
+
oh_my_log (1.0.0)
|
5
|
+
json
|
6
|
+
rails (>= 4.2.0, < 7.0)
|
7
|
+
rails-observers (~> 0.1.5)
|
8
|
+
|
9
|
+
GEM
|
10
|
+
remote: https://rubygems.org/
|
11
|
+
specs:
|
12
|
+
actioncable (5.0.7.1)
|
13
|
+
actionpack (= 5.0.7.1)
|
14
|
+
nio4r (>= 1.2, < 3.0)
|
15
|
+
websocket-driver (~> 0.6.1)
|
16
|
+
actionmailer (5.0.7.1)
|
17
|
+
actionpack (= 5.0.7.1)
|
18
|
+
actionview (= 5.0.7.1)
|
19
|
+
activejob (= 5.0.7.1)
|
20
|
+
mail (~> 2.5, >= 2.5.4)
|
21
|
+
rails-dom-testing (~> 2.0)
|
22
|
+
actionpack (5.0.7.1)
|
23
|
+
actionview (= 5.0.7.1)
|
24
|
+
activesupport (= 5.0.7.1)
|
25
|
+
rack (~> 2.0)
|
26
|
+
rack-test (~> 0.6.3)
|
27
|
+
rails-dom-testing (~> 2.0)
|
28
|
+
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
29
|
+
actionview (5.0.7.1)
|
30
|
+
activesupport (= 5.0.7.1)
|
31
|
+
builder (~> 3.1)
|
32
|
+
erubis (~> 2.7.0)
|
33
|
+
rails-dom-testing (~> 2.0)
|
34
|
+
rails-html-sanitizer (~> 1.0, >= 1.0.3)
|
35
|
+
activejob (5.0.7.1)
|
36
|
+
activesupport (= 5.0.7.1)
|
37
|
+
globalid (>= 0.3.6)
|
38
|
+
activemodel (5.0.7.1)
|
39
|
+
activesupport (= 5.0.7.1)
|
40
|
+
activerecord (5.0.7.1)
|
41
|
+
activemodel (= 5.0.7.1)
|
42
|
+
activesupport (= 5.0.7.1)
|
43
|
+
arel (~> 7.0)
|
44
|
+
activesupport (5.0.7.1)
|
45
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
46
|
+
i18n (>= 0.7, < 2)
|
47
|
+
minitest (~> 5.1)
|
48
|
+
tzinfo (~> 1.1)
|
49
|
+
appraisal (2.2.0)
|
50
|
+
bundler
|
51
|
+
rake
|
52
|
+
thor (>= 0.14.0)
|
53
|
+
arel (7.1.4)
|
54
|
+
ast (2.4.0)
|
55
|
+
builder (3.2.3)
|
56
|
+
concurrent-ruby (1.1.4)
|
57
|
+
coveralls (0.8.22)
|
58
|
+
json (>= 1.8, < 3)
|
59
|
+
simplecov (~> 0.16.1)
|
60
|
+
term-ansicolor (~> 1.3)
|
61
|
+
thor (~> 0.19.4)
|
62
|
+
tins (~> 1.6)
|
63
|
+
crass (1.0.4)
|
64
|
+
diff-lcs (1.3)
|
65
|
+
docile (1.3.1)
|
66
|
+
erubis (2.7.0)
|
67
|
+
globalid (0.4.2)
|
68
|
+
activesupport (>= 4.2.0)
|
69
|
+
i18n (1.6.0)
|
70
|
+
concurrent-ruby (~> 1.0)
|
71
|
+
jaro_winkler (1.5.2)
|
72
|
+
json (2.2.0)
|
73
|
+
loofah (2.2.3)
|
74
|
+
crass (~> 1.0.2)
|
75
|
+
nokogiri (>= 1.5.9)
|
76
|
+
mail (2.7.1)
|
77
|
+
mini_mime (>= 0.1.1)
|
78
|
+
method_source (0.9.2)
|
79
|
+
mini_mime (1.0.1)
|
80
|
+
mini_portile2 (2.4.0)
|
81
|
+
minitest (5.11.3)
|
82
|
+
nio4r (2.3.1)
|
83
|
+
nokogiri (1.10.1)
|
84
|
+
mini_portile2 (~> 2.4.0)
|
85
|
+
parallel (1.14.0)
|
86
|
+
parser (2.6.0.0)
|
87
|
+
ast (~> 2.4.0)
|
88
|
+
powerpack (0.1.2)
|
89
|
+
rack (2.0.6)
|
90
|
+
rack-test (0.6.3)
|
91
|
+
rack (>= 1.0)
|
92
|
+
rails (5.0.7.1)
|
93
|
+
actioncable (= 5.0.7.1)
|
94
|
+
actionmailer (= 5.0.7.1)
|
95
|
+
actionpack (= 5.0.7.1)
|
96
|
+
actionview (= 5.0.7.1)
|
97
|
+
activejob (= 5.0.7.1)
|
98
|
+
activemodel (= 5.0.7.1)
|
99
|
+
activerecord (= 5.0.7.1)
|
100
|
+
activesupport (= 5.0.7.1)
|
101
|
+
bundler (>= 1.3.0)
|
102
|
+
railties (= 5.0.7.1)
|
103
|
+
sprockets-rails (>= 2.0.0)
|
104
|
+
rails-dom-testing (2.0.3)
|
105
|
+
activesupport (>= 4.2.0)
|
106
|
+
nokogiri (>= 1.6)
|
107
|
+
rails-html-sanitizer (1.0.4)
|
108
|
+
loofah (~> 2.2, >= 2.2.2)
|
109
|
+
rails-observers (0.1.5)
|
110
|
+
activemodel (>= 4.0)
|
111
|
+
railties (5.0.7.1)
|
112
|
+
actionpack (= 5.0.7.1)
|
113
|
+
activesupport (= 5.0.7.1)
|
114
|
+
method_source
|
115
|
+
rake (>= 0.8.7)
|
116
|
+
thor (>= 0.18.1, < 2.0)
|
117
|
+
rainbow (3.0.0)
|
118
|
+
rake (12.3.2)
|
119
|
+
rspec-core (3.8.0)
|
120
|
+
rspec-support (~> 3.8.0)
|
121
|
+
rspec-expectations (3.8.2)
|
122
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
123
|
+
rspec-support (~> 3.8.0)
|
124
|
+
rspec-mocks (3.8.0)
|
125
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
126
|
+
rspec-support (~> 3.8.0)
|
127
|
+
rspec-rails (3.8.2)
|
128
|
+
actionpack (>= 3.0)
|
129
|
+
activesupport (>= 3.0)
|
130
|
+
railties (>= 3.0)
|
131
|
+
rspec-core (~> 3.8.0)
|
132
|
+
rspec-expectations (~> 3.8.0)
|
133
|
+
rspec-mocks (~> 3.8.0)
|
134
|
+
rspec-support (~> 3.8.0)
|
135
|
+
rspec-support (3.8.0)
|
136
|
+
rubocop (0.59.2)
|
137
|
+
jaro_winkler (~> 1.5.1)
|
138
|
+
parallel (~> 1.10)
|
139
|
+
parser (>= 2.5, != 2.5.1.1)
|
140
|
+
powerpack (~> 0.1)
|
141
|
+
rainbow (>= 2.2.2, < 4.0)
|
142
|
+
ruby-progressbar (~> 1.7)
|
143
|
+
unicode-display_width (~> 1.0, >= 1.0.1)
|
144
|
+
ruby-progressbar (1.10.0)
|
145
|
+
simplecov (0.16.1)
|
146
|
+
docile (~> 1.1)
|
147
|
+
json (>= 1.8, < 3)
|
148
|
+
simplecov-html (~> 0.10.0)
|
149
|
+
simplecov-html (0.10.2)
|
150
|
+
sprockets (3.7.2)
|
151
|
+
concurrent-ruby (~> 1.0)
|
152
|
+
rack (> 1, < 3)
|
153
|
+
sprockets-rails (3.2.1)
|
154
|
+
actionpack (>= 4.0)
|
155
|
+
activesupport (>= 4.0)
|
156
|
+
sprockets (>= 3.0.0)
|
157
|
+
sqlite3 (1.3.10)
|
158
|
+
term-ansicolor (1.7.1)
|
159
|
+
tins (~> 1.0)
|
160
|
+
thor (0.19.4)
|
161
|
+
thread_safe (0.3.6)
|
162
|
+
tins (1.20.2)
|
163
|
+
tzinfo (1.2.5)
|
164
|
+
thread_safe (~> 0.1)
|
165
|
+
unicode-display_width (1.5.0)
|
166
|
+
websocket-driver (0.6.5)
|
167
|
+
websocket-extensions (>= 0.1.0)
|
168
|
+
websocket-extensions (0.1.3)
|
169
|
+
wwtd (1.3.0)
|
170
|
+
|
171
|
+
PLATFORMS
|
172
|
+
ruby
|
173
|
+
|
174
|
+
DEPENDENCIES
|
175
|
+
appraisal
|
176
|
+
bundler
|
177
|
+
coveralls
|
178
|
+
oh_my_log!
|
179
|
+
rails (~> 5.0.0)
|
180
|
+
rails-observers
|
181
|
+
rspec-core
|
182
|
+
rspec-rails
|
183
|
+
rubocop (~> 0.59.2)
|
184
|
+
sqlite3 (= 1.3.10)
|
185
|
+
wwtd
|
186
|
+
|
187
|
+
BUNDLED WITH
|
188
|
+
1.17.1
|
@@ -0,0 +1,188 @@
|
|
1
|
+
PATH
|
2
|
+
remote: ..
|
3
|
+
specs:
|
4
|
+
oh_my_log (1.0.0)
|
5
|
+
json
|
6
|
+
rails (>= 4.2.0, < 7.0)
|
7
|
+
rails-observers (~> 0.1.5)
|
8
|
+
|
9
|
+
GEM
|
10
|
+
remote: https://rubygems.org/
|
11
|
+
specs:
|
12
|
+
actioncable (5.1.6.1)
|
13
|
+
actionpack (= 5.1.6.1)
|
14
|
+
nio4r (~> 2.0)
|
15
|
+
websocket-driver (~> 0.6.1)
|
16
|
+
actionmailer (5.1.6.1)
|
17
|
+
actionpack (= 5.1.6.1)
|
18
|
+
actionview (= 5.1.6.1)
|
19
|
+
activejob (= 5.1.6.1)
|
20
|
+
mail (~> 2.5, >= 2.5.4)
|
21
|
+
rails-dom-testing (~> 2.0)
|
22
|
+
actionpack (5.1.6.1)
|
23
|
+
actionview (= 5.1.6.1)
|
24
|
+
activesupport (= 5.1.6.1)
|
25
|
+
rack (~> 2.0)
|
26
|
+
rack-test (>= 0.6.3)
|
27
|
+
rails-dom-testing (~> 2.0)
|
28
|
+
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
29
|
+
actionview (5.1.6.1)
|
30
|
+
activesupport (= 5.1.6.1)
|
31
|
+
builder (~> 3.1)
|
32
|
+
erubi (~> 1.4)
|
33
|
+
rails-dom-testing (~> 2.0)
|
34
|
+
rails-html-sanitizer (~> 1.0, >= 1.0.3)
|
35
|
+
activejob (5.1.6.1)
|
36
|
+
activesupport (= 5.1.6.1)
|
37
|
+
globalid (>= 0.3.6)
|
38
|
+
activemodel (5.1.6.1)
|
39
|
+
activesupport (= 5.1.6.1)
|
40
|
+
activerecord (5.1.6.1)
|
41
|
+
activemodel (= 5.1.6.1)
|
42
|
+
activesupport (= 5.1.6.1)
|
43
|
+
arel (~> 8.0)
|
44
|
+
activesupport (5.1.6.1)
|
45
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
46
|
+
i18n (>= 0.7, < 2)
|
47
|
+
minitest (~> 5.1)
|
48
|
+
tzinfo (~> 1.1)
|
49
|
+
appraisal (2.2.0)
|
50
|
+
bundler
|
51
|
+
rake
|
52
|
+
thor (>= 0.14.0)
|
53
|
+
arel (8.0.0)
|
54
|
+
ast (2.4.0)
|
55
|
+
builder (3.2.3)
|
56
|
+
concurrent-ruby (1.1.4)
|
57
|
+
coveralls (0.8.22)
|
58
|
+
json (>= 1.8, < 3)
|
59
|
+
simplecov (~> 0.16.1)
|
60
|
+
term-ansicolor (~> 1.3)
|
61
|
+
thor (~> 0.19.4)
|
62
|
+
tins (~> 1.6)
|
63
|
+
crass (1.0.4)
|
64
|
+
diff-lcs (1.3)
|
65
|
+
docile (1.3.1)
|
66
|
+
erubi (1.8.0)
|
67
|
+
globalid (0.4.2)
|
68
|
+
activesupport (>= 4.2.0)
|
69
|
+
i18n (1.6.0)
|
70
|
+
concurrent-ruby (~> 1.0)
|
71
|
+
jaro_winkler (1.5.2)
|
72
|
+
json (2.2.0)
|
73
|
+
loofah (2.2.3)
|
74
|
+
crass (~> 1.0.2)
|
75
|
+
nokogiri (>= 1.5.9)
|
76
|
+
mail (2.7.1)
|
77
|
+
mini_mime (>= 0.1.1)
|
78
|
+
method_source (0.9.2)
|
79
|
+
mini_mime (1.0.1)
|
80
|
+
mini_portile2 (2.4.0)
|
81
|
+
minitest (5.11.3)
|
82
|
+
nio4r (2.3.1)
|
83
|
+
nokogiri (1.10.1)
|
84
|
+
mini_portile2 (~> 2.4.0)
|
85
|
+
parallel (1.14.0)
|
86
|
+
parser (2.6.0.0)
|
87
|
+
ast (~> 2.4.0)
|
88
|
+
powerpack (0.1.2)
|
89
|
+
rack (2.0.6)
|
90
|
+
rack-test (1.1.0)
|
91
|
+
rack (>= 1.0, < 3)
|
92
|
+
rails (5.1.6.1)
|
93
|
+
actioncable (= 5.1.6.1)
|
94
|
+
actionmailer (= 5.1.6.1)
|
95
|
+
actionpack (= 5.1.6.1)
|
96
|
+
actionview (= 5.1.6.1)
|
97
|
+
activejob (= 5.1.6.1)
|
98
|
+
activemodel (= 5.1.6.1)
|
99
|
+
activerecord (= 5.1.6.1)
|
100
|
+
activesupport (= 5.1.6.1)
|
101
|
+
bundler (>= 1.3.0)
|
102
|
+
railties (= 5.1.6.1)
|
103
|
+
sprockets-rails (>= 2.0.0)
|
104
|
+
rails-dom-testing (2.0.3)
|
105
|
+
activesupport (>= 4.2.0)
|
106
|
+
nokogiri (>= 1.6)
|
107
|
+
rails-html-sanitizer (1.0.4)
|
108
|
+
loofah (~> 2.2, >= 2.2.2)
|
109
|
+
rails-observers (0.1.5)
|
110
|
+
activemodel (>= 4.0)
|
111
|
+
railties (5.1.6.1)
|
112
|
+
actionpack (= 5.1.6.1)
|
113
|
+
activesupport (= 5.1.6.1)
|
114
|
+
method_source
|
115
|
+
rake (>= 0.8.7)
|
116
|
+
thor (>= 0.18.1, < 2.0)
|
117
|
+
rainbow (3.0.0)
|
118
|
+
rake (12.3.2)
|
119
|
+
rspec-core (3.8.0)
|
120
|
+
rspec-support (~> 3.8.0)
|
121
|
+
rspec-expectations (3.8.2)
|
122
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
123
|
+
rspec-support (~> 3.8.0)
|
124
|
+
rspec-mocks (3.8.0)
|
125
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
126
|
+
rspec-support (~> 3.8.0)
|
127
|
+
rspec-rails (3.8.2)
|
128
|
+
actionpack (>= 3.0)
|
129
|
+
activesupport (>= 3.0)
|
130
|
+
railties (>= 3.0)
|
131
|
+
rspec-core (~> 3.8.0)
|
132
|
+
rspec-expectations (~> 3.8.0)
|
133
|
+
rspec-mocks (~> 3.8.0)
|
134
|
+
rspec-support (~> 3.8.0)
|
135
|
+
rspec-support (3.8.0)
|
136
|
+
rubocop (0.59.2)
|
137
|
+
jaro_winkler (~> 1.5.1)
|
138
|
+
parallel (~> 1.10)
|
139
|
+
parser (>= 2.5, != 2.5.1.1)
|
140
|
+
powerpack (~> 0.1)
|
141
|
+
rainbow (>= 2.2.2, < 4.0)
|
142
|
+
ruby-progressbar (~> 1.7)
|
143
|
+
unicode-display_width (~> 1.0, >= 1.0.1)
|
144
|
+
ruby-progressbar (1.10.0)
|
145
|
+
simplecov (0.16.1)
|
146
|
+
docile (~> 1.1)
|
147
|
+
json (>= 1.8, < 3)
|
148
|
+
simplecov-html (~> 0.10.0)
|
149
|
+
simplecov-html (0.10.2)
|
150
|
+
sprockets (3.7.2)
|
151
|
+
concurrent-ruby (~> 1.0)
|
152
|
+
rack (> 1, < 3)
|
153
|
+
sprockets-rails (3.2.1)
|
154
|
+
actionpack (>= 4.0)
|
155
|
+
activesupport (>= 4.0)
|
156
|
+
sprockets (>= 3.0.0)
|
157
|
+
sqlite3 (1.3.10)
|
158
|
+
term-ansicolor (1.7.1)
|
159
|
+
tins (~> 1.0)
|
160
|
+
thor (0.19.4)
|
161
|
+
thread_safe (0.3.6)
|
162
|
+
tins (1.20.2)
|
163
|
+
tzinfo (1.2.5)
|
164
|
+
thread_safe (~> 0.1)
|
165
|
+
unicode-display_width (1.5.0)
|
166
|
+
websocket-driver (0.6.5)
|
167
|
+
websocket-extensions (>= 0.1.0)
|
168
|
+
websocket-extensions (0.1.3)
|
169
|
+
wwtd (1.3.0)
|
170
|
+
|
171
|
+
PLATFORMS
|
172
|
+
ruby
|
173
|
+
|
174
|
+
DEPENDENCIES
|
175
|
+
appraisal
|
176
|
+
bundler
|
177
|
+
coveralls
|
178
|
+
oh_my_log!
|
179
|
+
rails (~> 5.1.0)
|
180
|
+
rails-observers
|
181
|
+
rspec-core
|
182
|
+
rspec-rails
|
183
|
+
rubocop (~> 0.59.2)
|
184
|
+
sqlite3 (= 1.3.10)
|
185
|
+
wwtd
|
186
|
+
|
187
|
+
BUNDLED WITH
|
188
|
+
1.17.1
|
@@ -0,0 +1,196 @@
|
|
1
|
+
PATH
|
2
|
+
remote: ..
|
3
|
+
specs:
|
4
|
+
oh_my_log (1.0.0)
|
5
|
+
json
|
6
|
+
rails (>= 4.2.0, < 7.0)
|
7
|
+
rails-observers (~> 0.1.5)
|
8
|
+
|
9
|
+
GEM
|
10
|
+
remote: https://rubygems.org/
|
11
|
+
specs:
|
12
|
+
actioncable (5.2.2)
|
13
|
+
actionpack (= 5.2.2)
|
14
|
+
nio4r (~> 2.0)
|
15
|
+
websocket-driver (>= 0.6.1)
|
16
|
+
actionmailer (5.2.2)
|
17
|
+
actionpack (= 5.2.2)
|
18
|
+
actionview (= 5.2.2)
|
19
|
+
activejob (= 5.2.2)
|
20
|
+
mail (~> 2.5, >= 2.5.4)
|
21
|
+
rails-dom-testing (~> 2.0)
|
22
|
+
actionpack (5.2.2)
|
23
|
+
actionview (= 5.2.2)
|
24
|
+
activesupport (= 5.2.2)
|
25
|
+
rack (~> 2.0)
|
26
|
+
rack-test (>= 0.6.3)
|
27
|
+
rails-dom-testing (~> 2.0)
|
28
|
+
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
29
|
+
actionview (5.2.2)
|
30
|
+
activesupport (= 5.2.2)
|
31
|
+
builder (~> 3.1)
|
32
|
+
erubi (~> 1.4)
|
33
|
+
rails-dom-testing (~> 2.0)
|
34
|
+
rails-html-sanitizer (~> 1.0, >= 1.0.3)
|
35
|
+
activejob (5.2.2)
|
36
|
+
activesupport (= 5.2.2)
|
37
|
+
globalid (>= 0.3.6)
|
38
|
+
activemodel (5.2.2)
|
39
|
+
activesupport (= 5.2.2)
|
40
|
+
activerecord (5.2.2)
|
41
|
+
activemodel (= 5.2.2)
|
42
|
+
activesupport (= 5.2.2)
|
43
|
+
arel (>= 9.0)
|
44
|
+
activestorage (5.2.2)
|
45
|
+
actionpack (= 5.2.2)
|
46
|
+
activerecord (= 5.2.2)
|
47
|
+
marcel (~> 0.3.1)
|
48
|
+
activesupport (5.2.2)
|
49
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
50
|
+
i18n (>= 0.7, < 2)
|
51
|
+
minitest (~> 5.1)
|
52
|
+
tzinfo (~> 1.1)
|
53
|
+
appraisal (2.2.0)
|
54
|
+
bundler
|
55
|
+
rake
|
56
|
+
thor (>= 0.14.0)
|
57
|
+
arel (9.0.0)
|
58
|
+
ast (2.4.0)
|
59
|
+
builder (3.2.3)
|
60
|
+
concurrent-ruby (1.1.4)
|
61
|
+
coveralls (0.8.22)
|
62
|
+
json (>= 1.8, < 3)
|
63
|
+
simplecov (~> 0.16.1)
|
64
|
+
term-ansicolor (~> 1.3)
|
65
|
+
thor (~> 0.19.4)
|
66
|
+
tins (~> 1.6)
|
67
|
+
crass (1.0.4)
|
68
|
+
diff-lcs (1.3)
|
69
|
+
docile (1.3.1)
|
70
|
+
erubi (1.8.0)
|
71
|
+
globalid (0.4.2)
|
72
|
+
activesupport (>= 4.2.0)
|
73
|
+
i18n (1.6.0)
|
74
|
+
concurrent-ruby (~> 1.0)
|
75
|
+
jaro_winkler (1.5.2)
|
76
|
+
json (2.2.0)
|
77
|
+
loofah (2.2.3)
|
78
|
+
crass (~> 1.0.2)
|
79
|
+
nokogiri (>= 1.5.9)
|
80
|
+
mail (2.7.1)
|
81
|
+
mini_mime (>= 0.1.1)
|
82
|
+
marcel (0.3.3)
|
83
|
+
mimemagic (~> 0.3.2)
|
84
|
+
method_source (0.9.2)
|
85
|
+
mimemagic (0.3.3)
|
86
|
+
mini_mime (1.0.1)
|
87
|
+
mini_portile2 (2.4.0)
|
88
|
+
minitest (5.11.3)
|
89
|
+
nio4r (2.3.1)
|
90
|
+
nokogiri (1.10.1)
|
91
|
+
mini_portile2 (~> 2.4.0)
|
92
|
+
parallel (1.14.0)
|
93
|
+
parser (2.6.0.0)
|
94
|
+
ast (~> 2.4.0)
|
95
|
+
powerpack (0.1.2)
|
96
|
+
rack (2.0.6)
|
97
|
+
rack-test (1.1.0)
|
98
|
+
rack (>= 1.0, < 3)
|
99
|
+
rails (5.2.2)
|
100
|
+
actioncable (= 5.2.2)
|
101
|
+
actionmailer (= 5.2.2)
|
102
|
+
actionpack (= 5.2.2)
|
103
|
+
actionview (= 5.2.2)
|
104
|
+
activejob (= 5.2.2)
|
105
|
+
activemodel (= 5.2.2)
|
106
|
+
activerecord (= 5.2.2)
|
107
|
+
activestorage (= 5.2.2)
|
108
|
+
activesupport (= 5.2.2)
|
109
|
+
bundler (>= 1.3.0)
|
110
|
+
railties (= 5.2.2)
|
111
|
+
sprockets-rails (>= 2.0.0)
|
112
|
+
rails-dom-testing (2.0.3)
|
113
|
+
activesupport (>= 4.2.0)
|
114
|
+
nokogiri (>= 1.6)
|
115
|
+
rails-html-sanitizer (1.0.4)
|
116
|
+
loofah (~> 2.2, >= 2.2.2)
|
117
|
+
rails-observers (0.1.5)
|
118
|
+
activemodel (>= 4.0)
|
119
|
+
railties (5.2.2)
|
120
|
+
actionpack (= 5.2.2)
|
121
|
+
activesupport (= 5.2.2)
|
122
|
+
method_source
|
123
|
+
rake (>= 0.8.7)
|
124
|
+
thor (>= 0.19.0, < 2.0)
|
125
|
+
rainbow (3.0.0)
|
126
|
+
rake (12.3.2)
|
127
|
+
rspec-core (3.8.0)
|
128
|
+
rspec-support (~> 3.8.0)
|
129
|
+
rspec-expectations (3.8.2)
|
130
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
131
|
+
rspec-support (~> 3.8.0)
|
132
|
+
rspec-mocks (3.8.0)
|
133
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
134
|
+
rspec-support (~> 3.8.0)
|
135
|
+
rspec-rails (3.8.2)
|
136
|
+
actionpack (>= 3.0)
|
137
|
+
activesupport (>= 3.0)
|
138
|
+
railties (>= 3.0)
|
139
|
+
rspec-core (~> 3.8.0)
|
140
|
+
rspec-expectations (~> 3.8.0)
|
141
|
+
rspec-mocks (~> 3.8.0)
|
142
|
+
rspec-support (~> 3.8.0)
|
143
|
+
rspec-support (3.8.0)
|
144
|
+
rubocop (0.59.2)
|
145
|
+
jaro_winkler (~> 1.5.1)
|
146
|
+
parallel (~> 1.10)
|
147
|
+
parser (>= 2.5, != 2.5.1.1)
|
148
|
+
powerpack (~> 0.1)
|
149
|
+
rainbow (>= 2.2.2, < 4.0)
|
150
|
+
ruby-progressbar (~> 1.7)
|
151
|
+
unicode-display_width (~> 1.0, >= 1.0.1)
|
152
|
+
ruby-progressbar (1.10.0)
|
153
|
+
simplecov (0.16.1)
|
154
|
+
docile (~> 1.1)
|
155
|
+
json (>= 1.8, < 3)
|
156
|
+
simplecov-html (~> 0.10.0)
|
157
|
+
simplecov-html (0.10.2)
|
158
|
+
sprockets (3.7.2)
|
159
|
+
concurrent-ruby (~> 1.0)
|
160
|
+
rack (> 1, < 3)
|
161
|
+
sprockets-rails (3.2.1)
|
162
|
+
actionpack (>= 4.0)
|
163
|
+
activesupport (>= 4.0)
|
164
|
+
sprockets (>= 3.0.0)
|
165
|
+
sqlite3 (1.3.10)
|
166
|
+
term-ansicolor (1.7.1)
|
167
|
+
tins (~> 1.0)
|
168
|
+
thor (0.19.4)
|
169
|
+
thread_safe (0.3.6)
|
170
|
+
tins (1.20.2)
|
171
|
+
tzinfo (1.2.5)
|
172
|
+
thread_safe (~> 0.1)
|
173
|
+
unicode-display_width (1.5.0)
|
174
|
+
websocket-driver (0.7.0)
|
175
|
+
websocket-extensions (>= 0.1.0)
|
176
|
+
websocket-extensions (0.1.3)
|
177
|
+
wwtd (1.3.0)
|
178
|
+
|
179
|
+
PLATFORMS
|
180
|
+
ruby
|
181
|
+
|
182
|
+
DEPENDENCIES
|
183
|
+
appraisal
|
184
|
+
bundler
|
185
|
+
coveralls
|
186
|
+
oh_my_log!
|
187
|
+
rails (~> 5.2.0)
|
188
|
+
rails-observers
|
189
|
+
rspec-core
|
190
|
+
rspec-rails
|
191
|
+
rubocop (~> 0.59.2)
|
192
|
+
sqlite3 (= 1.3.10)
|
193
|
+
wwtd
|
194
|
+
|
195
|
+
BUNDLED WITH
|
196
|
+
1.17.1
|
@@ -0,0 +1,11 @@
|
|
1
|
+
module OhMyLog
|
2
|
+
class ActiveRecordObserver < ::ActiveRecord::Observer
|
3
|
+
|
4
|
+
#this is the callback that happens every time after we made changes to the model
|
5
|
+
def after_save(model)
|
6
|
+
#we only add this model in the target list if this model got SUCCESSFULLY change
|
7
|
+
must_be_logged = model.methods.include?(:saved_changes) ? model.saved_changes.empty? : model.changes.empty?
|
8
|
+
Log::add_target(model) unless must_be_logged
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
module OhMyLog
|
2
|
+
module Log
|
3
|
+
class Configuration
|
4
|
+
attr_accessor :models, :print_log, :record_history, :log_instance, :log_path
|
5
|
+
attr_reader :selectors
|
6
|
+
|
7
|
+
def initialize(*args)
|
8
|
+
@selectors = []
|
9
|
+
#models not to track
|
10
|
+
@models = {"ALL" => []}
|
11
|
+
@print_log = true
|
12
|
+
@log_instance = Logger.new(File.join(Rails.root, 'log/oh_my_log.log'))
|
13
|
+
@log_path = nil
|
14
|
+
#do we wanna keep track of all the actions?
|
15
|
+
@record_history = false
|
16
|
+
end
|
17
|
+
|
18
|
+
def add_selector(selector)
|
19
|
+
@selectors << selector
|
20
|
+
end
|
21
|
+
|
22
|
+
def reset_selectors
|
23
|
+
@selectors = []
|
24
|
+
end
|
25
|
+
|
26
|
+
def get_actions(controller)
|
27
|
+
@selectors.each do |selector|
|
28
|
+
return selector.actions if selector.controller == controller
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
def process_path
|
33
|
+
@log_instance = Logger.new(@log_path) if (@log_path)
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# Effect is container of all the changes that a model suffers
|
2
|
+
module OhMyLog
|
3
|
+
module Log
|
4
|
+
class Effect
|
5
|
+
attr_reader :receiver
|
6
|
+
attr_reader :changes
|
7
|
+
|
8
|
+
def initialize(receiver)
|
9
|
+
@receiver = receiver
|
10
|
+
@changes = receiver.previous_changes
|
11
|
+
end
|
12
|
+
|
13
|
+
def to_s
|
14
|
+
return "#{@receiver.class.to_s}[#{@receiver.id}] => #{@changes}"
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|