rails-console-tweaks 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +4 -0
- data/.rvmrc +1 -0
- data/CONTRIBUTORS.txt +6 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +35 -0
- data/Rakefile +1 -0
- data/lib/rails-console-tweaks.rb +10 -0
- data/lib/rails-console-tweaks/engine.rb +17 -0
- data/lib/rails-console-tweaks/version.rb +7 -0
- data/rails-console-tweaks.gemspec +24 -0
- metadata +123 -0
data/.gitignore
ADDED
data/.rvmrc
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
rvm use ree-1.8.7-2011.03@rails-console-tweaks --create
|
data/CONTRIBUTORS.txt
ADDED
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
The MIT License
|
2
|
+
|
3
|
+
Copyright (c) 2011 Ryan Sonnek
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
22
|
+
|
data/README.md
ADDED
@@ -0,0 +1,35 @@
|
|
1
|
+
# rails-console-tweaks
|
2
|
+
|
3
|
+
Customize Rails console with more useful defaults.
|
4
|
+
|
5
|
+
Useful for local development as well as inspecting production system
|
6
|
+
output.
|
7
|
+
|
8
|
+
|
9
|
+
## Features
|
10
|
+
|
11
|
+
* print all SQL statments executed within the current console
|
12
|
+
* pretty print `ActiveRecord` objects using [HIRB](https://github.com/cldwalker/hirb)
|
13
|
+
|
14
|
+
## Installation
|
15
|
+
|
16
|
+
```ruby
|
17
|
+
# Gemfile
|
18
|
+
gem 'rails-console-tweaks'
|
19
|
+
```
|
20
|
+
|
21
|
+
That's it! No extra configuration is necessary!
|
22
|
+
|
23
|
+
## Contributing
|
24
|
+
|
25
|
+
* Fork the project
|
26
|
+
* Fix the issue
|
27
|
+
* Add unit tests
|
28
|
+
* Submit pull request on github
|
29
|
+
|
30
|
+
See CONTRIBUTORS.txt for list of project contributors
|
31
|
+
|
32
|
+
## Copyright
|
33
|
+
|
34
|
+
Copyright (c) 2011 Ryan Sonnek
|
35
|
+
See LICENSE.txt for further details.
|
data/Rakefile
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require "bundler/gem_tasks"
|
@@ -0,0 +1,17 @@
|
|
1
|
+
module Rails
|
2
|
+
module Console
|
3
|
+
module Tweaks
|
4
|
+
class Engine < Rails::Engine
|
5
|
+
initializer "rails-console-tweaks.initializer" do |app|
|
6
|
+
if defined? Rails::Console
|
7
|
+
# log sql statements to stdout
|
8
|
+
ActiveRecord::Base.logger = Logger.new(STDOUT)
|
9
|
+
|
10
|
+
# pretty print output of models
|
11
|
+
Hirb.enable
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
$:.push File.expand_path("../lib", __FILE__)
|
3
|
+
require "rails-console-tweaks/version"
|
4
|
+
|
5
|
+
Gem::Specification.new do |s|
|
6
|
+
s.name = "rails-console-tweaks"
|
7
|
+
s.version = Rails::Console::Tweaks::VERSION
|
8
|
+
s.authors = ["Ryan Sonnek"]
|
9
|
+
s.email = ["ryan@socialcast.com"]
|
10
|
+
s.homepage = "http://github.com/wireframe/rails-console-tweaks"
|
11
|
+
s.summary = %q{customize rails console with more useful defaults}
|
12
|
+
s.description = %q{tweak the default console behavior with better defaults}
|
13
|
+
|
14
|
+
s.rubyforge_project = "rails-console-tweaks"
|
15
|
+
|
16
|
+
s.files = `git ls-files`.split("\n")
|
17
|
+
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
18
|
+
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
19
|
+
s.require_paths = ["lib"]
|
20
|
+
|
21
|
+
s.add_runtime_dependency 'rails', ['>= 3.0']
|
22
|
+
s.add_runtime_dependency 'hirb', ['>= 0.5.0']
|
23
|
+
s.add_development_dependency 'rake', ['0.9.2.2']
|
24
|
+
end
|
metadata
ADDED
@@ -0,0 +1,123 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: rails-console-tweaks
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 29
|
5
|
+
prerelease:
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 0
|
9
|
+
- 1
|
10
|
+
version: 0.0.1
|
11
|
+
platform: ruby
|
12
|
+
authors:
|
13
|
+
- Ryan Sonnek
|
14
|
+
autorequire:
|
15
|
+
bindir: bin
|
16
|
+
cert_chain: []
|
17
|
+
|
18
|
+
date: 2011-11-04 00:00:00 Z
|
19
|
+
dependencies:
|
20
|
+
- !ruby/object:Gem::Dependency
|
21
|
+
name: rails
|
22
|
+
prerelease: false
|
23
|
+
version_requirements: &id001 !ruby/object:Gem::Requirement
|
24
|
+
none: false
|
25
|
+
requirements:
|
26
|
+
- - ">="
|
27
|
+
- !ruby/object:Gem::Version
|
28
|
+
hash: 7
|
29
|
+
segments:
|
30
|
+
- 3
|
31
|
+
- 0
|
32
|
+
version: "3.0"
|
33
|
+
requirement: *id001
|
34
|
+
type: :runtime
|
35
|
+
- !ruby/object:Gem::Dependency
|
36
|
+
name: hirb
|
37
|
+
prerelease: false
|
38
|
+
version_requirements: &id002 !ruby/object:Gem::Requirement
|
39
|
+
none: false
|
40
|
+
requirements:
|
41
|
+
- - ">="
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
hash: 11
|
44
|
+
segments:
|
45
|
+
- 0
|
46
|
+
- 5
|
47
|
+
- 0
|
48
|
+
version: 0.5.0
|
49
|
+
requirement: *id002
|
50
|
+
type: :runtime
|
51
|
+
- !ruby/object:Gem::Dependency
|
52
|
+
name: rake
|
53
|
+
prerelease: false
|
54
|
+
version_requirements: &id003 !ruby/object:Gem::Requirement
|
55
|
+
none: false
|
56
|
+
requirements:
|
57
|
+
- - "="
|
58
|
+
- !ruby/object:Gem::Version
|
59
|
+
hash: 11
|
60
|
+
segments:
|
61
|
+
- 0
|
62
|
+
- 9
|
63
|
+
- 2
|
64
|
+
- 2
|
65
|
+
version: 0.9.2.2
|
66
|
+
requirement: *id003
|
67
|
+
type: :development
|
68
|
+
description: tweak the default console behavior with better defaults
|
69
|
+
email:
|
70
|
+
- ryan@socialcast.com
|
71
|
+
executables: []
|
72
|
+
|
73
|
+
extensions: []
|
74
|
+
|
75
|
+
extra_rdoc_files: []
|
76
|
+
|
77
|
+
files:
|
78
|
+
- .gitignore
|
79
|
+
- .rvmrc
|
80
|
+
- CONTRIBUTORS.txt
|
81
|
+
- Gemfile
|
82
|
+
- LICENSE.txt
|
83
|
+
- README.md
|
84
|
+
- Rakefile
|
85
|
+
- lib/rails-console-tweaks.rb
|
86
|
+
- lib/rails-console-tweaks/engine.rb
|
87
|
+
- lib/rails-console-tweaks/version.rb
|
88
|
+
- rails-console-tweaks.gemspec
|
89
|
+
homepage: http://github.com/wireframe/rails-console-tweaks
|
90
|
+
licenses: []
|
91
|
+
|
92
|
+
post_install_message:
|
93
|
+
rdoc_options: []
|
94
|
+
|
95
|
+
require_paths:
|
96
|
+
- lib
|
97
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
98
|
+
none: false
|
99
|
+
requirements:
|
100
|
+
- - ">="
|
101
|
+
- !ruby/object:Gem::Version
|
102
|
+
hash: 3
|
103
|
+
segments:
|
104
|
+
- 0
|
105
|
+
version: "0"
|
106
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
107
|
+
none: false
|
108
|
+
requirements:
|
109
|
+
- - ">="
|
110
|
+
- !ruby/object:Gem::Version
|
111
|
+
hash: 3
|
112
|
+
segments:
|
113
|
+
- 0
|
114
|
+
version: "0"
|
115
|
+
requirements: []
|
116
|
+
|
117
|
+
rubyforge_project: rails-console-tweaks
|
118
|
+
rubygems_version: 1.8.5
|
119
|
+
signing_key:
|
120
|
+
specification_version: 3
|
121
|
+
summary: customize rails console with more useful defaults
|
122
|
+
test_files: []
|
123
|
+
|