sequel-logger 1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +22 -0
- data/Gemfile +4 -0
- data/LICENSE +27 -0
- data/README.md +23 -0
- data/Rakefile +2 -0
- data/lib/sequel-logger.rb +16 -0
- data/lib/sequel-logger/version.rb +3 -0
- data/sequel-logger.gemspec +25 -0
- metadata +95 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 97aba24fdc1becd3d9fd5436b4d366c0e4e3b1b5
|
4
|
+
data.tar.gz: 41d74746c7ee472a13210ea91902e3499c49e2ef
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: fda06a62a07a99234f16308ba520a20dc1658e509ba012988654aedb7be33dd245d2c4c0601e0f5b5da515fde3d5134afbc4173e518db65fed7ded1ddbb8374b
|
7
|
+
data.tar.gz: 2a40f55afb8cbb7904e7fb0d16cbc4704e3ae4607b9c47348261b952458349763ef09c0b9b6e04b838184cfa167da3b38bd9a0b33a13a575a9881884681fba68
|
data/.gitignore
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
*.gem
|
2
|
+
*.rbc
|
3
|
+
.bundle
|
4
|
+
.config
|
5
|
+
.yardoc
|
6
|
+
Gemfile.lock
|
7
|
+
InstalledFiles
|
8
|
+
_yardoc
|
9
|
+
coverage
|
10
|
+
doc/
|
11
|
+
lib/bundler/man
|
12
|
+
pkg
|
13
|
+
rdoc
|
14
|
+
spec/reports
|
15
|
+
test/tmp
|
16
|
+
test/version_tmp
|
17
|
+
tmp
|
18
|
+
*.bundle
|
19
|
+
*.so
|
20
|
+
*.o
|
21
|
+
*.a
|
22
|
+
mkmf.log
|
data/Gemfile
ADDED
data/LICENSE
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
The Azure License
|
2
|
+
|
3
|
+
Copyright (c) 2014 Kenneth Ballenegger
|
4
|
+
|
5
|
+
Attribute to Kenneth Ballenegger - http://kswizz.com/
|
6
|
+
|
7
|
+
You (the licensee) are hereby granted permission, free of charge, to deal in
|
8
|
+
this software or source code (this "Software") without restriction, including
|
9
|
+
without limitation the rights to use, copy, modify, merge, publish, distribute,
|
10
|
+
and/or sublicense this Software, subject to the following conditions:
|
11
|
+
|
12
|
+
You must give attribution to the party mentioned above, by name and by
|
13
|
+
hyperlink, in the about box, credits document and/or documentation of any
|
14
|
+
derivative work using a substantial portion of this Software.
|
15
|
+
|
16
|
+
You may not use the name of the copyright holder(s) to endorse or promote
|
17
|
+
products derived from this Software without specific prior written permission.
|
18
|
+
|
19
|
+
THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
20
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
21
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
22
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
23
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
24
|
+
OUT OF OR IN CONNECTION WITH THIS SOFTWARE OR THE USE OR OTHER DEALINGS IN THIS
|
25
|
+
SOFTWARE.
|
26
|
+
|
27
|
+
http://license.azuretalon.com/
|
data/README.md
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
# sequel-logger
|
2
|
+
|
3
|
+
This gem makes it dead easy to debug Sequel by adding a `-r` flag to any Ruby
|
4
|
+
script, and printing Sequel's logs to STDOUT.
|
5
|
+
|
6
|
+
## Usage
|
7
|
+
|
8
|
+
$ ruby -rsequel-logger myscript.rb
|
9
|
+
# Sequel will now log its output. :)
|
10
|
+
|
11
|
+
## Installation
|
12
|
+
|
13
|
+
Install it globally:
|
14
|
+
|
15
|
+
$ gem install sequel-logger
|
16
|
+
|
17
|
+
## Contributing
|
18
|
+
|
19
|
+
1. Fork it ( https://github.com/kballenegger/sequel-logger/fork )
|
20
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
21
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
22
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
23
|
+
5. Create a new Pull Request
|
data/Rakefile
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
require 'sequel'
|
2
|
+
require 'sequel-logger/version'
|
3
|
+
require 'logger'
|
4
|
+
|
5
|
+
module Sequel
|
6
|
+
class Database
|
7
|
+
class << self
|
8
|
+
alias_method :pre_sequel_logger_connect, :connect
|
9
|
+
def connect(*args, &block)
|
10
|
+
db = pre_sequel_logger_connect(*args, &block)
|
11
|
+
db.loggers << Logger.new(STDOUT)
|
12
|
+
db
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'sequel-logger/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = 'sequel-logger'
|
8
|
+
spec.version = SequelLogger::VERSION
|
9
|
+
spec.authors = ['Kenneth Ballenegger']
|
10
|
+
spec.email = ['kenneth@ballenegger.com']
|
11
|
+
spec.summary = %q{This gem makes it dead easy to debug Sequel by logging its SQL queries.}
|
12
|
+
spec.description = %q{This gem makes it dead easy to debug Sequel by logging its SQL queries.}
|
13
|
+
spec.homepage = 'https://github.com/kballenegger/sequel-logger'
|
14
|
+
spec.license = 'Azure License'
|
15
|
+
|
16
|
+
spec.files = `git ls-files -z`.split("\x0")
|
17
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
+
spec.require_paths = ['lib']
|
20
|
+
|
21
|
+
spec.add_development_dependency 'bundler', '~> 1.6'
|
22
|
+
spec.add_development_dependency 'rake'
|
23
|
+
|
24
|
+
spec.add_dependency 'sequel'
|
25
|
+
end
|
metadata
ADDED
@@ -0,0 +1,95 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: sequel-logger
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: '1.0'
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Kenneth Ballenegger
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2014-07-15 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.6'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.6'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: sequel
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
description: This gem makes it dead easy to debug Sequel by logging its SQL queries.
|
56
|
+
email:
|
57
|
+
- kenneth@ballenegger.com
|
58
|
+
executables: []
|
59
|
+
extensions: []
|
60
|
+
extra_rdoc_files: []
|
61
|
+
files:
|
62
|
+
- ".gitignore"
|
63
|
+
- Gemfile
|
64
|
+
- LICENSE
|
65
|
+
- README.md
|
66
|
+
- Rakefile
|
67
|
+
- lib/sequel-logger.rb
|
68
|
+
- lib/sequel-logger/version.rb
|
69
|
+
- sequel-logger.gemspec
|
70
|
+
homepage: https://github.com/kballenegger/sequel-logger
|
71
|
+
licenses:
|
72
|
+
- Azure License
|
73
|
+
metadata: {}
|
74
|
+
post_install_message:
|
75
|
+
rdoc_options: []
|
76
|
+
require_paths:
|
77
|
+
- lib
|
78
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
84
|
+
requirements:
|
85
|
+
- - ">="
|
86
|
+
- !ruby/object:Gem::Version
|
87
|
+
version: '0'
|
88
|
+
requirements: []
|
89
|
+
rubyforge_project:
|
90
|
+
rubygems_version: 2.2.2
|
91
|
+
signing_key:
|
92
|
+
specification_version: 4
|
93
|
+
summary: This gem makes it dead easy to debug Sequel by logging its SQL queries.
|
94
|
+
test_files: []
|
95
|
+
has_rdoc:
|