awesome_rails_console 0.3.0 → 0.4.0

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: 85dd83732a6ff6d243a291db31b8e1ef130d9457
4
- data.tar.gz: 1a1e4ca8b6760e0c1d8bc59654f2fa418b1bb8b5
3
+ metadata.gz: 3c6d0377a61aebe9e4bc5fb4f46407180f7329aa
4
+ data.tar.gz: 46ec9cbf75236b7ea1c6363f0eeb3e48e930aafa
5
5
  SHA512:
6
- metadata.gz: 971dffe646a635ee12dd8a27906ce7fa1a1b66fd24571344a244fe4398bab4dde788e709af0c3e3b04320a71077cf8d4682b6c71bf0158765691032a8ffb5e88
7
- data.tar.gz: 798c60f3704eb46c9ccae48ca41843a854bee2c4a3372ded6e5c525911a2ca9921da462aaa5b4e2544f7d955c72d34fb9033e71a92d34a3b932fc72df207eafe
6
+ metadata.gz: e954bdbedb1bd139e94a3bba449cf0dfaa5b7639a3efe2f39cdeb5c4d79b302e433db6a2a3bd7f884e88460d5b74d0b16da83235d5ef35d0aa514c0ea74d8314
7
+ data.tar.gz: 7487cdbbbdbba8d3172544a0173386290dfb96aacfdb563393630e25b5ac2d801977bf13c8bd312fcb2c885fc7a80ae2fe10261107a0d816d94ca1f552182819
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## v0.4.0
4
+
5
+ * Add `pry-byebug`, `pry-stack_explorer` and `hirb` back as optional enhancement. (Run `rails generate awesome_rails_console:install` to install them)
6
+
3
7
  ## v0.3.0
4
8
 
5
9
  * Remove `pry-byebug`, `pry-stack_explorer` and `hirb` dependency. Please add them into your application `Gemfile` if you still want to use.
data/README.md CHANGED
@@ -1,15 +1,25 @@
1
- # Make Your Rails Console Awesome With One-line
1
+ # Make Your Rails Console Awesome
2
2
 
3
3
  This gem was inspired by [Using pry in production](https://bugsnag.com/blog/production-pry), [jazz_hands](https://github.com/nixme/jazz_hands) and [jazz_fingers](https://github.com/plribeiro3000/jazz_fingers).
4
4
 
5
- The pros of `AwesomeRailsConsole` are:
5
+ The pros of `awesome_rails_console` are:
6
6
 
7
- * Less gem dependances (Require infrequent used gems only when you want it)
8
- * Simpler prompt modification (More like the default pry prompt you're familiar with)
9
- * No configurable options at all (You don't need to worry about configuration)
10
- * No debugger or hirb dependancy. Which debugger to use is fully controlled by you.
7
+ * Less gem dependances (You can remove enhancement gems easily)
8
+ * Simpler prompt modification (Closer to the default pry prompt you're familiar with)
9
+ * No need to worry about configuration (Not much configurable options available)
11
10
 
12
- > If you really want to do a lot of customization. You may consider just editing your `Gemfile`, `.pryrc` and `config/initializers/pry.rb`. Or fork this project.
11
+ ## TL; DR;
12
+
13
+ ``` ruby Gemfile
14
+ gem 'awesome_rails_console'
15
+ ```
16
+
17
+ ``` sh (terminal)
18
+ bundle
19
+ rails g awesome_rails_console:install
20
+ spring stop
21
+ rails c
22
+ ```
13
23
 
14
24
  ## Features
15
25
 
@@ -34,19 +44,39 @@ ap (1..100).to_a, limit: 5
34
44
 
35
45
  ![](http://i.imgur.com/I1iV8n9.png)
36
46
 
47
+ ### Print table in console
48
+
49
+ With Hirb (optional enhancement)
50
+
51
+ Very handy when you need to paste some data into issue tracking system.
52
+
53
+ ![](http://i.imgur.com/9z3XDSU.png)
54
+
55
+ ### Debugger
56
+
57
+ With pry-byebug (optional enhancement)
58
+
59
+ Insert `binding.pry` (break point) to start debugging. See [pry-byebug](https://github.com/deivid-rodriguez/pry-byebug) For detail.
60
+
61
+ ![](http://i.imgur.com/mJbC24h.png)
62
+
37
63
  ## Installation
38
64
 
39
- Add this line to your application's Gemfile:
65
+ Add this line to your application's `Gemfile`:
40
66
 
41
67
  ```ruby
42
68
  gem 'awesome_rails_console'
43
69
  ```
44
70
 
45
- And then execute:
71
+ And then execute in terminal:
46
72
 
47
73
  $ bundle
48
74
 
49
- And restart your rails console. (You may need to restart spring also)
75
+ Install and config enhancement gems: (optinal)
76
+
77
+ $ rails generate awesome_rails_console:install
78
+
79
+ Finally, restart your rails console. (You may need to restart `spring` also)
50
80
 
51
81
  ## Changelog
52
82
 
@@ -1,3 +1,3 @@
1
1
  module AwesomeRailsConsole
2
- VERSION = "0.3.0"
2
+ VERSION = "0.4.0"
3
3
  end
@@ -0,0 +1,5 @@
1
+ Description:
2
+ Install hirb, pry-byebug, pry-stack_explorer to make your rails console even more awesome
3
+
4
+ Example:
5
+ rails generate awesome_rails_console:install
@@ -0,0 +1,34 @@
1
+ require 'rails/generators/base'
2
+
3
+ class AwesomeRailsConsole::InstallGenerator < Rails::Generators::Base
4
+ source_root File.expand_path('../templates', __FILE__)
5
+
6
+ def update_gemfile
7
+ gem_group :development, :test do
8
+ gem 'hirb'
9
+ gem 'hirb-unicode'
10
+ gem 'pry-byebug'
11
+ gem 'pry-stack_explorer'
12
+ end
13
+
14
+ inject_into_file 'Gemfile', indication, before: gem_group_declaration
15
+ end
16
+
17
+ def write_to_pryrc_file
18
+ copy_file '.pryrc', '.pryrc'
19
+ end
20
+
21
+ private
22
+
23
+ def indication
24
+ "# Please clean up duplicated gems if any.\n"\
25
+ "# Feel free to remove gems that you don't want to use or "\
26
+ "if they conflict with other gem dependencies. "\
27
+ "(you might need to update .pryrc also)\n"
28
+ end
29
+
30
+ def gem_group_declaration
31
+ "group :development, :test do\n"\
32
+ " gem 'hirb'\n"
33
+ end
34
+ end
@@ -0,0 +1,4 @@
1
+ if Rails.env.development? || Rails.env.test?
2
+ # This introduces the `table` statement
3
+ extend Hirb::Console
4
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: awesome_rails_console
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bruce Li
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-02-28 00:00:00.000000000 Z
11
+ date: 2016-03-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties
@@ -116,6 +116,9 @@ files:
116
116
  - lib/awesome_rails_console.rb
117
117
  - lib/awesome_rails_console/railtie.rb
118
118
  - lib/awesome_rails_console/version.rb
119
+ - lib/generators/awesome_rails_console/install/USAGE
120
+ - lib/generators/awesome_rails_console/install/install_generator.rb
121
+ - lib/generators/awesome_rails_console/install/templates/.pryrc
119
122
  homepage: https://github.com/ascendbruce/awesome_rails_console
120
123
  licenses:
121
124
  - MIT