wat_catcher 0.10.6 → 0.10.7

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: ad0074aeae97415f2a3354685377165c05e1cd07
4
- data.tar.gz: 34d75eb6117f5ed6f1a4c45ac43fe3a6293bec26
3
+ metadata.gz: 9cb2c3c37663cfcfad5e43d648e1791868b41c96
4
+ data.tar.gz: b0c1758301a25f7022e3f4408e56a32a9e2f0a83
5
5
  SHA512:
6
- metadata.gz: 13330049c47a1275c6c0831194cba3e3b410b17cb43cf4ce603e305fd59db9c5b7aa4fdd04c63f334fc1586adebbc25d7af8512452d6f9f47279852d56267bca
7
- data.tar.gz: bfd892ac4383e5a1e2163ce0f600947fceabf007cb4983b10db4f36a8cd29ad5f065d048f46a09585422cb2ded43881158314e1931c91eb826d022096bee0545
6
+ metadata.gz: 972778f6232d83cfb0baa363d05fbcb44976750a0fce4dd7ab34c700ca6e098d50a8eebf90939de42b03c62aa014f23cbc3fe12ddb371359059d84560e11dad6
7
+ data.tar.gz: 18ee5fdd20e526a50de5307140a7391dbc049f8ffc47b7f3297da8bea9b5440caa3a35b9b530b7cacdc18e53ed5c1afc54a94bfa123703f13936fa4745ba51a6
data/Gemfile CHANGED
@@ -1,6 +1,4 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
- gem "rails", "< 5.0"
4
-
5
3
  # Specify your gem's dependencies in wat_catcher.gemspec
6
4
  gemspec
@@ -1,51 +1,40 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- wat_catcher (0.10.6)
4
+ wat_catcher (0.10.7)
5
5
  coffee-rails
6
6
  httpclient
7
- rails (>= 4.2.0)
7
+ sidekiq
8
8
 
9
9
  GEM
10
10
  remote: https://rubygems.org/
11
11
  specs:
12
- actionmailer (4.2.7.1)
13
- actionpack (= 4.2.7.1)
14
- actionview (= 4.2.7.1)
15
- activejob (= 4.2.7.1)
12
+ actionmailer (4.0.13)
13
+ actionpack (= 4.0.13)
16
14
  mail (~> 2.5, >= 2.5.4)
17
- rails-dom-testing (~> 1.0, >= 1.0.5)
18
- actionpack (4.2.7.1)
19
- actionview (= 4.2.7.1)
20
- activesupport (= 4.2.7.1)
21
- rack (~> 1.6)
22
- rack-test (~> 0.6.2)
23
- rails-dom-testing (~> 1.0, >= 1.0.5)
24
- rails-html-sanitizer (~> 1.0, >= 1.0.2)
25
- actionview (4.2.7.1)
26
- activesupport (= 4.2.7.1)
27
- builder (~> 3.1)
15
+ actionpack (4.0.13)
16
+ activesupport (= 4.0.13)
17
+ builder (~> 3.1.0)
28
18
  erubis (~> 2.7.0)
29
- rails-dom-testing (~> 1.0, >= 1.0.5)
30
- rails-html-sanitizer (~> 1.0, >= 1.0.2)
31
- activejob (4.2.7.1)
32
- activesupport (= 4.2.7.1)
33
- globalid (>= 0.3.0)
34
- activemodel (4.2.7.1)
35
- activesupport (= 4.2.7.1)
36
- builder (~> 3.1)
37
- activerecord (4.2.7.1)
38
- activemodel (= 4.2.7.1)
39
- activesupport (= 4.2.7.1)
40
- arel (~> 6.0)
41
- activesupport (4.2.7.1)
42
- i18n (~> 0.7)
43
- json (~> 1.7, >= 1.7.7)
44
- minitest (~> 5.1)
45
- thread_safe (~> 0.3, >= 0.3.4)
46
- tzinfo (~> 1.1)
47
- arel (6.0.3)
48
- builder (3.2.2)
19
+ rack (~> 1.5.2)
20
+ rack-test (~> 0.6.2)
21
+ activemodel (4.0.13)
22
+ activesupport (= 4.0.13)
23
+ builder (~> 3.1.0)
24
+ activerecord (4.0.13)
25
+ activemodel (= 4.0.13)
26
+ activerecord-deprecated_finders (~> 1.0.2)
27
+ activesupport (= 4.0.13)
28
+ arel (~> 4.0.0)
29
+ activerecord-deprecated_finders (1.0.4)
30
+ activesupport (4.0.13)
31
+ i18n (~> 0.6, >= 0.6.9)
32
+ minitest (~> 4.2)
33
+ multi_json (~> 1.3)
34
+ thread_safe (~> 0.1)
35
+ tzinfo (~> 0.3.37)
36
+ arel (4.0.2)
37
+ builder (3.1.4)
49
38
  coderay (1.1.1)
50
39
  coffee-rails (4.2.1)
51
40
  coffee-script (>= 2.2.0)
@@ -54,14 +43,13 @@ GEM
54
43
  coffee-script-source
55
44
  execjs
56
45
  coffee-script-source (1.10.0)
57
- concurrent-ruby (1.0.2)
46
+ concurrent-ruby (1.0.1)
47
+ connection_pool (2.2.1)
58
48
  diff-lcs (1.2.5)
59
49
  erubis (2.7.0)
60
50
  execjs (2.6.0)
61
51
  ffi (1.9.10)
62
52
  formatador (0.2.5)
63
- globalid (0.3.7)
64
- activesupport (>= 4.1.0)
65
53
  guard (2.13.0)
66
54
  formatador (>= 0.2.4)
67
55
  listen (>= 2.7, <= 4.0)
@@ -84,24 +72,17 @@ GEM
84
72
  rack (>= 1.2.1)
85
73
  rake
86
74
  jasmine-core (2.4.1)
87
- json (1.8.3)
88
75
  listen (3.0.6)
89
76
  rb-fsevent (>= 0.9.3)
90
77
  rb-inotify (>= 0.9.7)
91
- loofah (2.0.3)
92
- nokogiri (>= 1.5.9)
93
78
  lumberjack (1.0.10)
94
- mail (2.6.4)
95
- mime-types (>= 1.16, < 4)
79
+ mail (2.6.3)
80
+ mime-types (>= 1.16, < 3)
96
81
  method_source (0.8.2)
97
- mime-types (3.1)
98
- mime-types-data (~> 3.2015)
99
- mime-types-data (3.2016.0521)
100
- mini_portile2 (2.1.0)
101
- minitest (5.10.1)
82
+ mime-types (2.99.1)
83
+ minitest (4.7.5)
84
+ multi_json (1.11.2)
102
85
  nenv (0.3.0)
103
- nokogiri (1.6.8.1)
104
- mini_portile2 (~> 2.1.0)
105
86
  notiffany (0.0.8)
106
87
  nenv (~> 0.1)
107
88
  shellany (~> 0.0)
@@ -110,38 +91,30 @@ GEM
110
91
  coderay (~> 1.1.0)
111
92
  method_source (~> 0.8.1)
112
93
  slop (~> 3.4)
113
- rack (1.6.5)
94
+ rack (1.5.5)
95
+ rack-protection (1.5.3)
96
+ rack
114
97
  rack-test (0.6.3)
115
98
  rack (>= 1.0)
116
- rails (4.2.7.1)
117
- actionmailer (= 4.2.7.1)
118
- actionpack (= 4.2.7.1)
119
- actionview (= 4.2.7.1)
120
- activejob (= 4.2.7.1)
121
- activemodel (= 4.2.7.1)
122
- activerecord (= 4.2.7.1)
123
- activesupport (= 4.2.7.1)
99
+ rails (4.0.13)
100
+ actionmailer (= 4.0.13)
101
+ actionpack (= 4.0.13)
102
+ activerecord (= 4.0.13)
103
+ activesupport (= 4.0.13)
124
104
  bundler (>= 1.3.0, < 2.0)
125
- railties (= 4.2.7.1)
126
- sprockets-rails
127
- rails-deprecated_sanitizer (1.0.3)
128
- activesupport (>= 4.2.0.alpha)
129
- rails-dom-testing (1.0.7)
130
- activesupport (>= 4.2.0.beta, < 5.0)
131
- nokogiri (~> 1.6.0)
132
- rails-deprecated_sanitizer (>= 1.0.1)
133
- rails-html-sanitizer (1.0.3)
134
- loofah (~> 2.0)
135
- railties (4.2.7.1)
136
- actionpack (= 4.2.7.1)
137
- activesupport (= 4.2.7.1)
105
+ railties (= 4.0.13)
106
+ sprockets-rails (~> 2.0)
107
+ railties (4.0.13)
108
+ actionpack (= 4.0.13)
109
+ activesupport (= 4.0.13)
138
110
  rake (>= 0.8.7)
139
111
  thor (>= 0.18.1, < 2.0)
140
- rake (11.3.0)
112
+ rake (11.1.1)
141
113
  rb-fsevent (0.9.7)
142
114
  rb-inotify (0.9.7)
143
115
  ffi (>= 0.5.0)
144
116
  rb-readline (0.5.3)
117
+ redis (3.3.2)
145
118
  rspec (3.4.0)
146
119
  rspec-core (~> 3.4.0)
147
120
  rspec-expectations (~> 3.4.0)
@@ -164,19 +137,23 @@ GEM
164
137
  rspec-support (~> 3.4.0)
165
138
  rspec-support (3.4.1)
166
139
  shellany (0.0.1)
140
+ sidekiq (4.2.7)
141
+ concurrent-ruby (~> 1.0)
142
+ connection_pool (~> 2.2, >= 2.2.0)
143
+ rack-protection (>= 1.5.0)
144
+ redis (~> 3.2, >= 3.2.1)
167
145
  slop (3.6.0)
168
- sprockets (3.7.0)
146
+ sprockets (3.5.2)
169
147
  concurrent-ruby (~> 1.0)
170
148
  rack (> 1, < 3)
171
- sprockets-rails (3.2.0)
172
- actionpack (>= 4.0)
173
- activesupport (>= 4.0)
174
- sprockets (>= 3.0.0)
149
+ sprockets-rails (2.3.3)
150
+ actionpack (>= 3.0)
151
+ activesupport (>= 3.0)
152
+ sprockets (>= 2.8, < 4.0)
175
153
  sqlite3 (1.3.11)
176
- thor (0.19.4)
154
+ thor (0.19.1)
177
155
  thread_safe (0.3.5)
178
- tzinfo (1.2.2)
179
- thread_safe (~> 0.1)
156
+ tzinfo (0.3.47)
180
157
 
181
158
  PLATFORMS
182
159
  ruby
@@ -185,7 +162,7 @@ DEPENDENCIES
185
162
  bundler (~> 1.3)
186
163
  guard-coffeescript
187
164
  jasmine
188
- rails (< 5.0)
165
+ rails (~> 4.0.2)
189
166
  rake
190
167
  rb-readline
191
168
  rspec
@@ -1,10 +1,11 @@
1
1
  require "wat_catcher/version"
2
2
 
3
3
  require "wat_catcher/report"
4
- require "wat_catcher/poster"
4
+ require 'wat_catcher/sidekiq_poster'
5
5
  require "wat_catcher/wattle_helper"
6
6
  require "wat_catcher/sidekiq_middleware"
7
7
  require "wat_catcher/rack_middleware"
8
+ require "wat_catcher/sidekiq_poster"
8
9
 
9
10
  require "wat_catcher/railtie" if defined?(Rails::Railtie)
10
11
 
@@ -13,7 +13,7 @@ module WatCatcher
13
13
 
14
14
  def send_report
15
15
  return if WatCatcher.configuration.disabled
16
- ::WatCatcher::Poster.perform_later("#{WatCatcher.configuration.host}/wats", params.to_json)
16
+ ::WatCatcher::SidekiqPoster.perform_async("#{WatCatcher.configuration.host}/wats", params)
17
17
  end
18
18
 
19
19
  def log_report
@@ -1,7 +1,9 @@
1
+ require 'sidekiq'
1
2
  require 'httpclient'
2
3
 
3
4
  module WatCatcher
4
- class Poster < ActiveJob::Base
5
+ class SidekiqPoster
6
+ include Sidekiq::Worker
5
7
 
6
8
  def perform(url, params)
7
9
  HTTPClient.post_content(url,
@@ -1,3 +1,3 @@
1
1
  module WatCatcher
2
- VERSION = "0.10.6"
2
+ VERSION = "0.10.7"
3
3
  end
@@ -1,13 +1,8 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  describe WatCatcher::BugsnagController, type: :controller do
4
- routes { WatCatcher::Engine.routes }
5
-
6
4
  describe "GET #show" do
7
- before do
8
- expect_any_instance_of(WatCatcher::Poster).to receive(:perform) { true }
9
- end
10
- let(:req) { get :show, { "notifierVersion" => "2.3.2", "apiKey" => "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "projectRoot" => "http://localhost:3001", "context" => "/exceptionals", "user" => "{\"id\":16,\"first_name\":null,\"name\":\"asdfasd\",\"email\":\"asdfasdf\",\"created_at\":\"2014-04-07T22:21:57.041Z\",\"updated_at\":\"2014-04-07T22:21:57.041Z\"}", "metaData" => { "script" => { "src" => "http://localhost:3001/assets/exceptionals/thrower.js?body=1", "content" => "" }, "Last Event" => { "millisecondsAgo" => "742", "type" => "load", "target" => "#document" } }, "url" => "http://localhost:3001/exceptionals", "userAgent" => "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.152 Safari/537.36", "language" => "en-US", "severity" => "fatal", "name" => "Error", "message" => "Uncaught Error: foo", "stacktrace" => "Error: foo\n at thrower (http://localhost:3001/assets/exceptionals/thrower.js?body=1:3:11)\n at http://localhost:3001/assets/exceptionals/thrower.js?body=1:7:12\n at _super.bugsnag (http://localhost:3001/assets/bugsnag.js?body=1:128:30)\n at http://localhost:3001/assets/bugsnag.js?body=1:583:15", "file" => "http://localhost:3001/assets/exceptionals/thrower.js?body=1", "lineNumber" => "3", "columnNumber" => "11", "ct" => "img", "cb" => "1397595292609", "id" => "Wattle" } }
5
+ let(:req) { get :show, { use_route: :wat_catcher, "notifierVersion" => "2.3.2", "apiKey" => "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "projectRoot" => "http://localhost:3001", "context" => "/exceptionals", "user" => "{\"id\":16,\"first_name\":null,\"name\":\"asdfasd\",\"email\":\"asdfasdf\",\"created_at\":\"2014-04-07T22:21:57.041Z\",\"updated_at\":\"2014-04-07T22:21:57.041Z\"}", "metaData" => { "script" => { "src" => "http://localhost:3001/assets/exceptionals/thrower.js?body=1", "content" => "" }, "Last Event" => { "millisecondsAgo" => "742", "type" => "load", "target" => "#document" } }, "url" => "http://localhost:3001/exceptionals", "userAgent" => "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.152 Safari/537.36", "language" => "en-US", "severity" => "fatal", "name" => "Error", "message" => "Uncaught Error: foo", "stacktrace" => "Error: foo\n at thrower (http://localhost:3001/assets/exceptionals/thrower.js?body=1:3:11)\n at http://localhost:3001/assets/exceptionals/thrower.js?body=1:7:12\n at _super.bugsnag (http://localhost:3001/assets/bugsnag.js?body=1:128:30)\n at http://localhost:3001/assets/bugsnag.js?body=1:583:15", "file" => "http://localhost:3001/assets/exceptionals/thrower.js?body=1", "lineNumber" => "3", "columnNumber" => "11", "ct" => "img", "cb" => "1397595292609", "id" => "Wattle" } }
11
6
  subject { req; OpenStruct.new assigns[:report].params[:wat] }
12
7
  it "should be success" do
13
8
  req
@@ -20,7 +15,7 @@ describe WatCatcher::BugsnagController, type: :controller do
20
15
  it { expect(subject.app_user).to include({ 'id' => 16, 'first_name' => nil, 'name' => 'asdfasd', 'email' => 'asdfasdf' }) }
21
16
 
22
17
  context "with a bogus user" do
23
- let(:req) { get :show, {"notifierVersion" => "2.3.2", "apiKey" => "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "projectRoot" => "http://localhost:3001", "context" => "/exceptionals", "user" => "{\"id\":16,", "metaData" => { "script" => { "src" => "http://localhost:3001/assets/exceptionals/thrower.js?body=1", "content" => "" }, "Last Event" => { "millisecondsAgo" => "742", "type" => "load", "target" => "#document" } }, "url" => "http://localhost:3001/exceptionals", "userAgent" => "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.152 Safari/537.36", "language" => "en-US", "severity" => "fatal", "name" => "Error", "message" => "Uncaught Error: foo", "stacktrace" => "Error: foo\n at thrower (http://localhost:3001/assets/exceptionals/thrower.js?body=1:3:11)\n at http://localhost:3001/assets/exceptionals/thrower.js?body=1:7:12\n at _super.bugsnag (http://localhost:3001/assets/bugsnag.js?body=1:128:30)\n at http://localhost:3001/assets/bugsnag.js?body=1:583:15", "file" => "http://localhost:3001/assets/exceptionals/thrower.js?body=1", "lineNumber" => "3", "columnNumber" => "11", "ct" => "img", "cb" => "1397595292609", "id" => "Wattle" } }
18
+ let(:req) { get :show, { use_route: :wat_catcher, "notifierVersion" => "2.3.2", "apiKey" => "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "projectRoot" => "http://localhost:3001", "context" => "/exceptionals", "user" => "{\"id\":16,", "metaData" => { "script" => { "src" => "http://localhost:3001/assets/exceptionals/thrower.js?body=1", "content" => "" }, "Last Event" => { "millisecondsAgo" => "742", "type" => "load", "target" => "#document" } }, "url" => "http://localhost:3001/exceptionals", "userAgent" => "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.152 Safari/537.36", "language" => "en-US", "severity" => "fatal", "name" => "Error", "message" => "Uncaught Error: foo", "stacktrace" => "Error: foo\n at thrower (http://localhost:3001/assets/exceptionals/thrower.js?body=1:3:11)\n at http://localhost:3001/assets/exceptionals/thrower.js?body=1:7:12\n at _super.bugsnag (http://localhost:3001/assets/bugsnag.js?body=1:128:30)\n at http://localhost:3001/assets/bugsnag.js?body=1:583:15", "file" => "http://localhost:3001/assets/exceptionals/thrower.js?body=1", "lineNumber" => "3", "columnNumber" => "11", "ct" => "img", "cb" => "1397595292609", "id" => "Wattle" } }
24
19
  it "should be success" do
25
20
  req
26
21
  expect(response).to be_success
@@ -13,7 +13,7 @@ Dummy::Application.configure do
13
13
  config.eager_load = false
14
14
 
15
15
  # Configure static asset server for tests with Cache-Control for performance.
16
- config.serve_static_files = true
16
+ config.serve_static_assets = true
17
17
  config.static_cache_control = "public, max-age=3600"
18
18
 
19
19
  # Show full error reports and disable caching.
@@ -1,13 +1,18 @@
1
1
  # This file is copied to spec/ when you run 'rails generate rspec:install'
2
2
  ENV["RAILS_ENV"] ||= 'test'
3
+
3
4
  require File.expand_path("../dummy/config/environment", __FILE__)
4
5
 
5
6
  require 'rspec/rails'
7
+ #require 'rr'
8
+ require 'sidekiq/testing/inline'
6
9
 
7
10
  # Requires supporting ruby files with custom matchers and macros, etc,
8
11
  # in spec/support/ and its subdirectories.
9
12
  Dir[Rails.root.join("spec/support/**/*.rb")].each {|f| require f}
10
13
 
14
+ Sidekiq::Testing.fake!
15
+
11
16
  RSpec.configure do |config|
12
17
 
13
18
  # If you're not using ActiveRecord, or you'd prefer not to run each of your
@@ -25,9 +25,10 @@ Gem::Specification.new do |spec|
25
25
  spec.add_development_dependency "rb-readline"
26
26
  spec.add_development_dependency "rspec"
27
27
  spec.add_development_dependency "rspec-rails"
28
+ spec.add_development_dependency "rails", "~> 4.0.2"
28
29
  spec.add_development_dependency "sqlite3"
29
30
 
30
31
  spec.add_runtime_dependency 'coffee-rails'
31
- spec.add_runtime_dependency 'rails', '>= 4.2.0'
32
+ spec.add_runtime_dependency 'sidekiq'
32
33
  spec.add_runtime_dependency 'httpclient'
33
34
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wat_catcher
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.6
4
+ version: 0.10.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Constantine
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-12-03 00:00:00.000000000 Z
11
+ date: 2016-12-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -108,6 +108,20 @@ dependencies:
108
108
  - - ">="
109
109
  - !ruby/object:Gem::Version
110
110
  version: '0'
111
+ - !ruby/object:Gem::Dependency
112
+ name: rails
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - "~>"
116
+ - !ruby/object:Gem::Version
117
+ version: 4.0.2
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - "~>"
123
+ - !ruby/object:Gem::Version
124
+ version: 4.0.2
111
125
  - !ruby/object:Gem::Dependency
112
126
  name: sqlite3
113
127
  requirement: !ruby/object:Gem::Requirement
@@ -137,19 +151,19 @@ dependencies:
137
151
  - !ruby/object:Gem::Version
138
152
  version: '0'
139
153
  - !ruby/object:Gem::Dependency
140
- name: rails
154
+ name: sidekiq
141
155
  requirement: !ruby/object:Gem::Requirement
142
156
  requirements:
143
157
  - - ">="
144
158
  - !ruby/object:Gem::Version
145
- version: 4.2.0
159
+ version: '0'
146
160
  type: :runtime
147
161
  prerelease: false
148
162
  version_requirements: !ruby/object:Gem::Requirement
149
163
  requirements:
150
164
  - - ">="
151
165
  - !ruby/object:Gem::Version
152
- version: 4.2.0
166
+ version: '0'
153
167
  - !ruby/object:Gem::Dependency
154
168
  name: httpclient
155
169
  requirement: !ruby/object:Gem::Requirement
@@ -186,11 +200,11 @@ files:
186
200
  - config/routes.rb
187
201
  - lib/wat_catcher.rb
188
202
  - lib/wat_catcher/engine.rb
189
- - lib/wat_catcher/poster.rb
190
203
  - lib/wat_catcher/rack_middleware.rb
191
204
  - lib/wat_catcher/railtie.rb
192
205
  - lib/wat_catcher/report.rb
193
206
  - lib/wat_catcher/sidekiq_middleware.rb
207
+ - lib/wat_catcher/sidekiq_poster.rb
194
208
  - lib/wat_catcher/version.rb
195
209
  - lib/wat_catcher/wattle_helper.rb
196
210
  - spec/ci.sh