sapience 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (125) hide show
  1. checksums.yaml +7 -0
  2. data/.coveralls.yml +1 -0
  3. data/.gitignore +13 -0
  4. data/.rspec +2 -0
  5. data/.ruby-version +1 -0
  6. data/.simplecov +15 -0
  7. data/.travis.yml +27 -0
  8. data/CODE_OF_CONDUCT.md +49 -0
  9. data/Gemfile +12 -0
  10. data/LICENSE.txt +21 -0
  11. data/README.md +43 -0
  12. data/Rakefile +13 -0
  13. data/bin/console +14 -0
  14. data/bin/setup +8 -0
  15. data/lib/sapience/ansi_colors.rb +27 -0
  16. data/lib/sapience/appender/file.rb +138 -0
  17. data/lib/sapience/appender/sentry.rb +72 -0
  18. data/lib/sapience/appender/statsd.rb +68 -0
  19. data/lib/sapience/appender/wrapper.rb +74 -0
  20. data/lib/sapience/base.rb +381 -0
  21. data/lib/sapience/concerns/compatibility.rb +53 -0
  22. data/lib/sapience/configuration.rb +86 -0
  23. data/lib/sapience/core_ext/thread.rb +14 -0
  24. data/lib/sapience/formatters/base.rb +36 -0
  25. data/lib/sapience/formatters/color.rb +68 -0
  26. data/lib/sapience/formatters/default.rb +41 -0
  27. data/lib/sapience/formatters/json.rb +22 -0
  28. data/lib/sapience/formatters/raw.rb +12 -0
  29. data/lib/sapience/log.rb +221 -0
  30. data/lib/sapience/loggable.rb +29 -0
  31. data/lib/sapience/logger.rb +236 -0
  32. data/lib/sapience/rails.rb +15 -0
  33. data/lib/sapience/sapience.rb +357 -0
  34. data/lib/sapience/subscriber.rb +127 -0
  35. data/lib/sapience/version.rb +3 -0
  36. data/lib/sapience.rb +35 -0
  37. data/sapience.gemspec +39 -0
  38. data/test_app/.gitignore +42 -0
  39. data/test_app/.rspec +2 -0
  40. data/test_app/.ruby-version +1 -0
  41. data/test_app/Gemfile +36 -0
  42. data/test_app/README.md +24 -0
  43. data/test_app/Rakefile +6 -0
  44. data/test_app/app/assets/config/manifest.js +2 -0
  45. data/test_app/app/assets/images/.keep +0 -0
  46. data/test_app/app/assets/javascripts/posts.js +2 -0
  47. data/test_app/app/assets/stylesheets/application.css +15 -0
  48. data/test_app/app/assets/stylesheets/posts.css +4 -0
  49. data/test_app/app/assets/stylesheets/scaffold.css +84 -0
  50. data/test_app/app/channels/application_cable/channel.rb +4 -0
  51. data/test_app/app/channels/application_cable/connection.rb +4 -0
  52. data/test_app/app/controllers/application_controller.rb +3 -0
  53. data/test_app/app/controllers/concerns/.keep +0 -0
  54. data/test_app/app/controllers/posts_controller.rb +58 -0
  55. data/test_app/app/helpers/application_helper.rb +2 -0
  56. data/test_app/app/helpers/posts_helper.rb +2 -0
  57. data/test_app/app/jobs/application_job.rb +2 -0
  58. data/test_app/app/mailers/application_mailer.rb +4 -0
  59. data/test_app/app/models/application_record.rb +3 -0
  60. data/test_app/app/models/concerns/.keep +0 -0
  61. data/test_app/app/models/post.rb +3 -0
  62. data/test_app/app/models/user.rb +2 -0
  63. data/test_app/app/views/layouts/application.html.erb +13 -0
  64. data/test_app/app/views/layouts/mailer.html.erb +13 -0
  65. data/test_app/app/views/layouts/mailer.text.erb +1 -0
  66. data/test_app/app/views/posts/_form.html.erb +32 -0
  67. data/test_app/app/views/posts/create.html.erb +2 -0
  68. data/test_app/app/views/posts/destroy.html.erb +2 -0
  69. data/test_app/app/views/posts/edit.html.erb +6 -0
  70. data/test_app/app/views/posts/index.html.erb +31 -0
  71. data/test_app/app/views/posts/new.html.erb +5 -0
  72. data/test_app/app/views/posts/show.html.erb +19 -0
  73. data/test_app/app/views/posts/update.html.erb +2 -0
  74. data/test_app/bin/bundle +3 -0
  75. data/test_app/bin/rails +4 -0
  76. data/test_app/bin/rake +4 -0
  77. data/test_app/bin/setup +34 -0
  78. data/test_app/bin/update +29 -0
  79. data/test_app/config/application.rb +26 -0
  80. data/test_app/config/boot.rb +3 -0
  81. data/test_app/config/cable.yml +9 -0
  82. data/test_app/config/database.yml +25 -0
  83. data/test_app/config/environment.rb +5 -0
  84. data/test_app/config/environments/development.rb +49 -0
  85. data/test_app/config/environments/production.rb +78 -0
  86. data/test_app/config/environments/test.rb +42 -0
  87. data/test_app/config/initializers/application_controller_renderer.rb +6 -0
  88. data/test_app/config/initializers/backtrace_silencers.rb +7 -0
  89. data/test_app/config/initializers/cookies_serializer.rb +5 -0
  90. data/test_app/config/initializers/filter_parameter_logging.rb +4 -0
  91. data/test_app/config/initializers/inflections.rb +16 -0
  92. data/test_app/config/initializers/mime_types.rb +4 -0
  93. data/test_app/config/initializers/new_framework_defaults.rb +24 -0
  94. data/test_app/config/initializers/session_store.rb +3 -0
  95. data/test_app/config/initializers/wrap_parameters.rb +14 -0
  96. data/test_app/config/locales/en.yml +23 -0
  97. data/test_app/config/puma.rb +45 -0
  98. data/test_app/config/routes.rb +3 -0
  99. data/test_app/config/secrets.yml +22 -0
  100. data/test_app/config.ru +5 -0
  101. data/test_app/db/migrate/20160812092236_create_users.rb +13 -0
  102. data/test_app/db/migrate/20160812093621_create_posts.rb +11 -0
  103. data/test_app/db/schema.rb +33 -0
  104. data/test_app/db/seeds.rb +7 -0
  105. data/test_app/lib/assets/.keep +0 -0
  106. data/test_app/lib/tasks/.keep +0 -0
  107. data/test_app/log/.keep +0 -0
  108. data/test_app/public/404.html +67 -0
  109. data/test_app/public/422.html +67 -0
  110. data/test_app/public/500.html +66 -0
  111. data/test_app/public/apple-touch-icon-precomposed.png +0 -0
  112. data/test_app/public/apple-touch-icon.png +0 -0
  113. data/test_app/public/favicon.ico +0 -0
  114. data/test_app/public/robots.txt +5 -0
  115. data/test_app/spec/controllers/posts_controller_spec.rb +7 -0
  116. data/test_app/spec/helpers/posts_helper_spec.rb +15 -0
  117. data/test_app/spec/models/post_spec.rb +5 -0
  118. data/test_app/spec/models/user_spec.rb +5 -0
  119. data/test_app/spec/rails_helper.rb +23 -0
  120. data/test_app/spec/requests/posts_spec.rb +10 -0
  121. data/test_app/spec/routing/posts_routing_spec.rb +39 -0
  122. data/test_app/spec/spec_helper.rb +60 -0
  123. data/test_app/tmp/.keep +0 -0
  124. data/test_app/vendor/assets/stylesheets/.keep +0 -0
  125. metadata +298 -0
@@ -0,0 +1,60 @@
1
+ RSpec.configure do |config|
2
+ config.expect_with :rspec do |expectations|
3
+ expectations.include_chain_clauses_in_custom_matcher_descriptions = true
4
+ end
5
+
6
+ config.mock_with :rspec do |mocks|
7
+ mocks.verify_partial_doubles = true
8
+ end
9
+
10
+ # This option will default to `:apply_to_host_groups` in RSpec 4 (and will
11
+ # have no way to turn it off -- the option exists only for backwards
12
+ # compatibility in RSpec 3). It causes shared context metadata to be
13
+ # inherited by the metadata hash of host groups and examples, rather than
14
+ # triggering implicit auto-inclusion in groups with matching metadata.
15
+ config.shared_context_metadata_behavior = :apply_to_host_groups
16
+
17
+ # This allows you to limit a spec run to individual examples or groups
18
+ # you care about by tagging them with `:focus` metadata. When nothing
19
+ # is tagged with `:focus`, all examples get run. RSpec also provides
20
+ # aliases for `it`, `describe`, and `context` that include `:focus`
21
+ # metadata: `fit`, `fdescribe` and `fcontext`, respectively.
22
+ config.filter_run_when_matching :focus
23
+
24
+ # Allows RSpec to persist some state between runs in order to support
25
+ # the `--only-failures` and `--next-failure` CLI options. We recommend
26
+ # you configure your source control system to ignore this file.
27
+ config.example_status_persistence_file_path = "spec/examples.txt"
28
+
29
+ # Limits the available syntax to the non-monkey patched syntax that is
30
+ # recommended. For more details, see:
31
+ # - http://rspec.info/blog/2012/06/rspecs-new-expectation-syntax/
32
+ # - http://www.teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
33
+ # - http://rspec.info/blog/2014/05/notable-changes-in-rspec-3/#zero-monkey-patching-mode
34
+ config.disable_monkey_patching!
35
+
36
+ # Many RSpec users commonly either run the entire suite or an individual
37
+ # file, and it's useful to allow more verbose output when running an
38
+ # individual spec file.
39
+ # Use the documentation formatter for detailed output,
40
+ # unless a formatter has already been configured
41
+ # (e.g. via a command-line flag).
42
+ config.default_formatter = "doc" if config.files_to_run.one?
43
+
44
+ # Print the 10 slowest examples and example groups at the
45
+ # end of the spec run, to help surface which specs are running
46
+ # particularly slow.
47
+ # config.profile_examples = 10
48
+
49
+ # Run specs in random order to surface order dependencies. If you find an
50
+ # order dependency and want to debug it, you can fix the order by providing
51
+ # the seed, which is printed after each run.
52
+ # --seed 1234
53
+ config.order = :random
54
+
55
+ # Seed global randomization in this process using the `--seed` CLI option.
56
+ # Setting this allows you to use `--seed` to deterministically reproduce
57
+ # test failures related to randomization by passing the same `--seed` value
58
+ # as the one that triggered the failure.
59
+ Kernel.srand config.seed
60
+ end
File without changes
File without changes
metadata ADDED
@@ -0,0 +1,298 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: sapience
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.1
5
+ platform: ruby
6
+ authors:
7
+ - Mikael Henriksson
8
+ - Alex Malkov
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2016-08-12 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: concurrent-ruby
16
+ requirement: !ruby/object:Gem::Requirement
17
+ requirements:
18
+ - - ">="
19
+ - !ruby/object:Gem::Version
20
+ version: '0'
21
+ type: :runtime
22
+ prerelease: false
23
+ version_requirements: !ruby/object:Gem::Requirement
24
+ requirements:
25
+ - - ">="
26
+ - !ruby/object:Gem::Version
27
+ version: '0'
28
+ - !ruby/object:Gem::Dependency
29
+ name: bundler
30
+ requirement: !ruby/object:Gem::Requirement
31
+ requirements:
32
+ - - "~>"
33
+ - !ruby/object:Gem::Version
34
+ version: '1.12'
35
+ type: :development
36
+ prerelease: false
37
+ version_requirements: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - "~>"
40
+ - !ruby/object:Gem::Version
41
+ version: '1.12'
42
+ - !ruby/object:Gem::Dependency
43
+ name: rake
44
+ requirement: !ruby/object:Gem::Requirement
45
+ requirements:
46
+ - - "~>"
47
+ - !ruby/object:Gem::Version
48
+ version: '10.0'
49
+ type: :development
50
+ prerelease: false
51
+ version_requirements: !ruby/object:Gem::Requirement
52
+ requirements:
53
+ - - "~>"
54
+ - !ruby/object:Gem::Version
55
+ version: '10.0'
56
+ - !ruby/object:Gem::Dependency
57
+ name: rspec
58
+ requirement: !ruby/object:Gem::Requirement
59
+ requirements:
60
+ - - "~>"
61
+ - !ruby/object:Gem::Version
62
+ version: '3.0'
63
+ type: :development
64
+ prerelease: false
65
+ version_requirements: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - "~>"
68
+ - !ruby/object:Gem::Version
69
+ version: '3.0'
70
+ - !ruby/object:Gem::Dependency
71
+ name: reevoocop
72
+ requirement: !ruby/object:Gem::Requirement
73
+ requirements:
74
+ - - ">="
75
+ - !ruby/object:Gem::Version
76
+ version: '0'
77
+ type: :development
78
+ prerelease: false
79
+ version_requirements: !ruby/object:Gem::Requirement
80
+ requirements:
81
+ - - ">="
82
+ - !ruby/object:Gem::Version
83
+ version: '0'
84
+ - !ruby/object:Gem::Dependency
85
+ name: fuubar
86
+ requirement: !ruby/object:Gem::Requirement
87
+ requirements:
88
+ - - ">="
89
+ - !ruby/object:Gem::Version
90
+ version: '0'
91
+ type: :development
92
+ prerelease: false
93
+ version_requirements: !ruby/object:Gem::Requirement
94
+ requirements:
95
+ - - ">="
96
+ - !ruby/object:Gem::Version
97
+ version: '0'
98
+ - !ruby/object:Gem::Dependency
99
+ name: simplecov
100
+ requirement: !ruby/object:Gem::Requirement
101
+ requirements:
102
+ - - ">="
103
+ - !ruby/object:Gem::Version
104
+ version: '0'
105
+ type: :development
106
+ prerelease: false
107
+ version_requirements: !ruby/object:Gem::Requirement
108
+ requirements:
109
+ - - ">="
110
+ - !ruby/object:Gem::Version
111
+ version: '0'
112
+ - !ruby/object:Gem::Dependency
113
+ name: simplecov-json
114
+ requirement: !ruby/object:Gem::Requirement
115
+ requirements:
116
+ - - ">="
117
+ - !ruby/object:Gem::Version
118
+ version: '0'
119
+ type: :development
120
+ prerelease: false
121
+ version_requirements: !ruby/object:Gem::Requirement
122
+ requirements:
123
+ - - ">="
124
+ - !ruby/object:Gem::Version
125
+ version: '0'
126
+ - !ruby/object:Gem::Dependency
127
+ name: rspec-its
128
+ requirement: !ruby/object:Gem::Requirement
129
+ requirements:
130
+ - - ">="
131
+ - !ruby/object:Gem::Version
132
+ version: '0'
133
+ type: :development
134
+ prerelease: false
135
+ version_requirements: !ruby/object:Gem::Requirement
136
+ requirements:
137
+ - - ">="
138
+ - !ruby/object:Gem::Version
139
+ version: '0'
140
+ description: Write a longer description or delete this line.
141
+ email:
142
+ - mika@reevoo.com
143
+ - alex.malkov@reevoo.com
144
+ executables:
145
+ - console
146
+ - setup
147
+ extensions: []
148
+ extra_rdoc_files: []
149
+ files:
150
+ - ".coveralls.yml"
151
+ - ".gitignore"
152
+ - ".rspec"
153
+ - ".ruby-version"
154
+ - ".simplecov"
155
+ - ".travis.yml"
156
+ - CODE_OF_CONDUCT.md
157
+ - Gemfile
158
+ - LICENSE.txt
159
+ - README.md
160
+ - Rakefile
161
+ - bin/console
162
+ - bin/setup
163
+ - lib/sapience.rb
164
+ - lib/sapience/ansi_colors.rb
165
+ - lib/sapience/appender/file.rb
166
+ - lib/sapience/appender/sentry.rb
167
+ - lib/sapience/appender/statsd.rb
168
+ - lib/sapience/appender/wrapper.rb
169
+ - lib/sapience/base.rb
170
+ - lib/sapience/concerns/compatibility.rb
171
+ - lib/sapience/configuration.rb
172
+ - lib/sapience/core_ext/thread.rb
173
+ - lib/sapience/formatters/base.rb
174
+ - lib/sapience/formatters/color.rb
175
+ - lib/sapience/formatters/default.rb
176
+ - lib/sapience/formatters/json.rb
177
+ - lib/sapience/formatters/raw.rb
178
+ - lib/sapience/log.rb
179
+ - lib/sapience/loggable.rb
180
+ - lib/sapience/logger.rb
181
+ - lib/sapience/rails.rb
182
+ - lib/sapience/sapience.rb
183
+ - lib/sapience/subscriber.rb
184
+ - lib/sapience/version.rb
185
+ - sapience.gemspec
186
+ - test_app/.gitignore
187
+ - test_app/.rspec
188
+ - test_app/.ruby-version
189
+ - test_app/Gemfile
190
+ - test_app/README.md
191
+ - test_app/Rakefile
192
+ - test_app/app/assets/config/manifest.js
193
+ - test_app/app/assets/images/.keep
194
+ - test_app/app/assets/javascripts/posts.js
195
+ - test_app/app/assets/stylesheets/application.css
196
+ - test_app/app/assets/stylesheets/posts.css
197
+ - test_app/app/assets/stylesheets/scaffold.css
198
+ - test_app/app/channels/application_cable/channel.rb
199
+ - test_app/app/channels/application_cable/connection.rb
200
+ - test_app/app/controllers/application_controller.rb
201
+ - test_app/app/controllers/concerns/.keep
202
+ - test_app/app/controllers/posts_controller.rb
203
+ - test_app/app/helpers/application_helper.rb
204
+ - test_app/app/helpers/posts_helper.rb
205
+ - test_app/app/jobs/application_job.rb
206
+ - test_app/app/mailers/application_mailer.rb
207
+ - test_app/app/models/application_record.rb
208
+ - test_app/app/models/concerns/.keep
209
+ - test_app/app/models/post.rb
210
+ - test_app/app/models/user.rb
211
+ - test_app/app/views/layouts/application.html.erb
212
+ - test_app/app/views/layouts/mailer.html.erb
213
+ - test_app/app/views/layouts/mailer.text.erb
214
+ - test_app/app/views/posts/_form.html.erb
215
+ - test_app/app/views/posts/create.html.erb
216
+ - test_app/app/views/posts/destroy.html.erb
217
+ - test_app/app/views/posts/edit.html.erb
218
+ - test_app/app/views/posts/index.html.erb
219
+ - test_app/app/views/posts/new.html.erb
220
+ - test_app/app/views/posts/show.html.erb
221
+ - test_app/app/views/posts/update.html.erb
222
+ - test_app/bin/bundle
223
+ - test_app/bin/rails
224
+ - test_app/bin/rake
225
+ - test_app/bin/setup
226
+ - test_app/bin/update
227
+ - test_app/config.ru
228
+ - test_app/config/application.rb
229
+ - test_app/config/boot.rb
230
+ - test_app/config/cable.yml
231
+ - test_app/config/database.yml
232
+ - test_app/config/environment.rb
233
+ - test_app/config/environments/development.rb
234
+ - test_app/config/environments/production.rb
235
+ - test_app/config/environments/test.rb
236
+ - test_app/config/initializers/application_controller_renderer.rb
237
+ - test_app/config/initializers/backtrace_silencers.rb
238
+ - test_app/config/initializers/cookies_serializer.rb
239
+ - test_app/config/initializers/filter_parameter_logging.rb
240
+ - test_app/config/initializers/inflections.rb
241
+ - test_app/config/initializers/mime_types.rb
242
+ - test_app/config/initializers/new_framework_defaults.rb
243
+ - test_app/config/initializers/session_store.rb
244
+ - test_app/config/initializers/wrap_parameters.rb
245
+ - test_app/config/locales/en.yml
246
+ - test_app/config/puma.rb
247
+ - test_app/config/routes.rb
248
+ - test_app/config/secrets.yml
249
+ - test_app/db/migrate/20160812092236_create_users.rb
250
+ - test_app/db/migrate/20160812093621_create_posts.rb
251
+ - test_app/db/schema.rb
252
+ - test_app/db/seeds.rb
253
+ - test_app/lib/assets/.keep
254
+ - test_app/lib/tasks/.keep
255
+ - test_app/log/.keep
256
+ - test_app/public/404.html
257
+ - test_app/public/422.html
258
+ - test_app/public/500.html
259
+ - test_app/public/apple-touch-icon-precomposed.png
260
+ - test_app/public/apple-touch-icon.png
261
+ - test_app/public/favicon.ico
262
+ - test_app/public/robots.txt
263
+ - test_app/spec/controllers/posts_controller_spec.rb
264
+ - test_app/spec/helpers/posts_helper_spec.rb
265
+ - test_app/spec/models/post_spec.rb
266
+ - test_app/spec/models/user_spec.rb
267
+ - test_app/spec/rails_helper.rb
268
+ - test_app/spec/requests/posts_spec.rb
269
+ - test_app/spec/routing/posts_routing_spec.rb
270
+ - test_app/spec/spec_helper.rb
271
+ - test_app/tmp/.keep
272
+ - test_app/vendor/assets/stylesheets/.keep
273
+ homepage: https://sapience.github.io
274
+ licenses:
275
+ - MIT
276
+ metadata:
277
+ allowed_push_host: https://rubygems.org
278
+ post_install_message:
279
+ rdoc_options: []
280
+ require_paths:
281
+ - lib
282
+ required_ruby_version: !ruby/object:Gem::Requirement
283
+ requirements:
284
+ - - ">="
285
+ - !ruby/object:Gem::Version
286
+ version: '0'
287
+ required_rubygems_version: !ruby/object:Gem::Requirement
288
+ requirements:
289
+ - - ">="
290
+ - !ruby/object:Gem::Version
291
+ version: '0'
292
+ requirements: []
293
+ rubyforge_project:
294
+ rubygems_version: 2.6.6
295
+ signing_key:
296
+ specification_version: 4
297
+ summary: Write a short summary, because Rubygems requires one.
298
+ test_files: []