kaeruera 0.1.0 → 0.2.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f10a4c75cdcc7a510f985a61bc48182c27071f89
4
- data.tar.gz: 623fd3a7f3f5e74b468b539c57740303e2d41418
3
+ metadata.gz: 4ee7761c9d61e44c73482ef227fc9123600d575a
4
+ data.tar.gz: 8886340b86465108a75cd34f4e07c6e15a85a73a
5
5
  SHA512:
6
- metadata.gz: 8212e3adfe8d95d3264bdd53422fed401a09782bf62212e0612c73453e778989d2fbf26a8b6dcd218bf4d7a83f099213631a19c6ed98f7a1713c821be0507eae
7
- data.tar.gz: 4e6fee570e76659f25fa767bd190bfdad0669eb95914cef3f4a9bf8c99a0fcb0b5087ca697cdf04ea63e3e7e992dae21b6b20d96e2bd4ed73cfc143860a3cd70
6
+ metadata.gz: 36ccbf2659c148f47c43d0bb7f3169c48da70f34138769b7835fae2592f55ca1f27a8e107eb67e14696b4ffde8e01a5da436b9f9b999cbfc5d462fb24447ae26
7
+ data.tar.gz: 9a20b8dc4bc7b03192d5ddf16aa27da1dc8b66b4714ea079b5bebd0b51b4cb33ac4c65ac113fa43c0104855b3e1ec46a13ac4941493abcc08c2b689b09aedefa
data/CHANGELOG CHANGED
@@ -1,3 +1,7 @@
1
- === 0.1.0
1
+ === 0.2.0 (2016-05-24)
2
+
3
+ * Use jsonb instead of hstore/json for env/params/session (jeremyevans)
4
+
5
+ === 0.1.0 (2013-07-06)
2
6
 
3
7
  * Initial Public Release
data/MIT-LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2013 Jeremy Evans
1
+ Copyright (c) 2013-2016 Jeremy Evans
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining a copy
4
4
  of this software and associated documentation files (the "Software"), to
data/README.rdoc CHANGED
@@ -24,7 +24,7 @@ about the error.
24
24
 
25
25
  == Demo
26
26
 
27
- * URL: http://kaeruera.herokuapp.com
27
+ * URL: http://kaeruera-demo.jeremyevans.net
28
28
  * Login Email: demo
29
29
  * Login Password: demo
30
30
 
@@ -46,8 +46,7 @@ application multiple errors.
46
46
  In the database, each error is stored is a single row, document
47
47
  style. This uses PostgreSQL's advanced types, storing the
48
48
  backtrace for the error as an array of text fields (text[]),
49
- the environment as an hstore (string key/string value hash table),
50
- and the params and session information as json (since they often
49
+ the environment, params, session information as jsonb (since they
51
50
  contain nested data). All of the error columns are indexed for
52
51
  easy searching.
53
52
 
@@ -166,21 +165,29 @@ StandardError :: an exception occurred when trying to report the error, the retu
166
165
 
167
166
  === Sinatra
168
167
 
169
- If the application reporting errors is running sinatra, you can probably put this in your error block
168
+ If the application reporting errors is running Sinatra, you can probably put this in your error block
170
169
  to report errors to KaeruEra:
171
170
 
172
- REPORTER.report(:params=>params, :env=>env, :session=>session, :error=>request.env['sinatra.error'])
171
+ REPORTER.report(:params=>params, :env=>env, :session=>session, :error=>env['sinatra.error'])
172
+
173
+ === Roda
174
+
175
+ If the application reporting errors is running Roda, you can probably use an error plugin block
176
+ similar to this to report errors to KaeruEra:
177
+
178
+ plugin :error do |e|
179
+ REPORTER.report(:params=>request.params, :env=>env, :session=>session, :error=>e)
180
+ end
173
181
 
174
182
  == Runtime Dependencies
175
183
 
176
184
  === KaeruEra::App (web server)
177
185
 
178
- * PostgreSQL 9.2+
186
+ * PostgreSQL 9.4+
179
187
  * pg
180
- * sinatra
181
- * sinatra-flash
188
+ * roda
182
189
  * sequel
183
- * bcrypt-ruby
190
+ * bcrypt
184
191
  * forme
185
192
  * json
186
193
  * rack_csrf
@@ -202,7 +209,6 @@ to report errors to KaeruEra:
202
209
  heroku addons:add heroku-postgresql:dev
203
210
  heroku pg:promote HEROKU_POSTGRESQL_COLOR_URL
204
211
  git push heroku master
205
- echo 'CREATE EXTENSION hstore' | heroku pg:psql
206
212
  heroku run rake production_up
207
213
  heroku config:set KAERUERA_SECRET=`ruby -rsecurerandom -e 'puts SecureRandom.hex(30)'`
208
214
  heroku run irb -r ./models
@@ -233,13 +239,6 @@ Then, create databases for the application with that user:
233
239
  createdb -U postgres -O kaeruera kaeruera_test
234
240
  createdb -U postgres -O kaeruera kaeruera_production
235
241
 
236
- If you don't have hstore as a default extension in your PostgreSQL
237
- template database, you'll have to add it:
238
-
239
- echo 'CREATE EXTENSION hstore' | psql -U postgres kaeruera_development
240
- echo 'CREATE EXTENSION hstore' | psql -U postgres kaeruera_test
241
- echo 'CREATE EXTENSION hstore' | psql -U postgres kaeruera_production
242
-
243
242
  Then, you can migrate the database:
244
243
 
245
244
  rake dev_up
@@ -279,9 +278,10 @@ This assumes you have already created the test database and migrated the
279
278
  test database to the latest version. The following are additional
280
279
  requirements when running tests:
281
280
 
282
- * Rspec 1
283
- * Unicorn
284
- * Capybara
281
+ * minitest
282
+ * minitest-hooks
283
+ * unicorn
284
+ * capybara
285
285
 
286
286
  == Naming
287
287
 
@@ -1,4 +1,4 @@
1
- require 'sequel'
1
+ require 'sequel' unless defined?(Sequel)
2
2
 
3
3
  module KaeruEra
4
4
  # Reporter class that inserts the error information directly
@@ -17,7 +17,7 @@ module KaeruEra
17
17
  # application :: The KaeruEra application name
18
18
  def initialize(uri, email, application)
19
19
  @db = uri.is_a?(Sequel::Database) ? uri : Sequel.connect(uri, :keep_reference=>false)
20
- @db.extension :pg_array, :pg_hstore, :pg_json
20
+ @db.extension :pg_array, :pg_json
21
21
  @application_id, @user_id = @db[:applications].where(:user_id=>@db[:users].where(:email=>email).get(:id), :name=>application).get([:id, :user_id])
22
22
  raise(Error, "No matching application in database for #{email}/#{application}") unless @application_id
23
23
  end
@@ -41,13 +41,13 @@ module KaeruEra
41
41
  }
42
42
 
43
43
  if v = opts[:params]
44
- h[:params] = Sequel.pg_json(v.to_hash)
44
+ h[:params] = Sequel.pg_jsonb(v.to_hash)
45
45
  end
46
46
  if v = opts[:session]
47
- h[:session] = Sequel.pg_json(v.to_hash)
47
+ h[:session] = Sequel.pg_jsonb(v.to_hash)
48
48
  end
49
49
  if v = opts[:env]
50
- h[:env] = Sequel.hstore(v.to_hash)
50
+ h[:env] = Sequel.pg_jsonb(v.to_hash)
51
51
  end
52
52
 
53
53
  @db[:errors].insert(h)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kaeruera
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeremy Evans
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-07-07 00:00:00.000000000 Z
11
+ date: 2016-05-24 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: |
14
14
  KaeruEra is a simple error tracking application. This
@@ -22,40 +22,40 @@ extra_rdoc_files:
22
22
  - CHANGELOG
23
23
  - MIT-LICENSE
24
24
  files:
25
- - MIT-LICENSE
26
25
  - CHANGELOG
26
+ - MIT-LICENSE
27
27
  - README.rdoc
28
- - lib/kaeruera/reporter.rb
29
28
  - lib/kaeruera/async_reporter.rb
30
29
  - lib/kaeruera/database_reporter.rb
30
+ - lib/kaeruera/reporter.rb
31
31
  homepage: http://github.com/jeremyevans/kaeruera
32
32
  licenses: []
33
33
  metadata: {}
34
34
  post_install_message:
35
35
  rdoc_options:
36
- - --quiet
37
- - --line-numbers
38
- - --inline-source
39
- - --title
36
+ - "--quiet"
37
+ - "--line-numbers"
38
+ - "--inline-source"
39
+ - "--title"
40
40
  - Reporter Libraries for KaeruEra
41
- - --main
41
+ - "--main"
42
42
  - README.rdoc
43
43
  require_paths:
44
44
  - lib
45
45
  required_ruby_version: !ruby/object:Gem::Requirement
46
46
  requirements:
47
- - - '>='
47
+ - - ">="
48
48
  - !ruby/object:Gem::Version
49
49
  version: 1.8.7
50
50
  required_rubygems_version: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - '>='
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  requirements: []
56
56
  rubyforge_project:
57
- rubygems_version: 2.0.3
57
+ rubygems_version: 2.5.1
58
58
  signing_key:
59
59
  specification_version: 4
60
- summary: Faster SELECTs when using Sequel with pg
60
+ summary: Reporter Libraries for KaeruEra
61
61
  test_files: []