rails_console_toolkit 0.5.2 → 0.5.3

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
  SHA256:
3
- metadata.gz: 815b4d4c110fd99045c1ed9f83f8b4628525d4ea276b834cc91ddaa0a1e16c57
4
- data.tar.gz: 91a672c19d578427780773cf85b62f9826132fc830c4348985c1e9568a3833f2
3
+ metadata.gz: 784464abe81f7f89070ab3da6ac2f0a928615d6a361cf097135679ad6c86bf69
4
+ data.tar.gz: 656109e3bbac4bf2200ad8e156523f964897ca942a9b419523f694d83b7f3017
5
5
  SHA512:
6
- metadata.gz: 54995255818f0891f50c155522c3b9f8a8799b017521dc994987ddc0747f08af817c6def93fba16307b067425cc7419a1b73df5c48a9f2ffa371c644063b3b13
7
- data.tar.gz: 28f48d10562cc11eb1b352de71dbe9c1984be82ec9f7e9b3a4ee4c2a9e638c15ffeb54c2fabe4ae68795103076924415670cd84f9d916dae9389db68fe879aee
6
+ metadata.gz: e8052bbf7c75e2672a54a4dd112c867633cae7a7ba184d2969badfe0e5b511e351882c95cb21f08259920dbf8d73a4880b2bb6cd2c5bb41cd5a07949e555ff88
7
+ data.tar.gz: ff605580ad23d9985bde9df0410c0d3fac8a4f705fca802482a18339b6bbe30a90fbc696bebf1c6a4930b1d394c4d2d6715d0f0c086a86cfbd0d5071c7d1dbdc
data/README.md CHANGED
@@ -14,13 +14,23 @@ Add this line to your application's Gemfile:
14
14
  gem 'rails_console_toolkit'
15
15
  ```
16
16
 
17
- And then configure it within an initializer:
17
+ And then generate the initializer:
18
+
19
+ ```
20
+ $ bin/rails generate rails_console_toolkit:install
21
+ ```
22
+
23
+ or write it manually:
18
24
 
19
25
  ```ruby
20
26
  # config/initializers/console.rb
21
27
 
22
28
  RailsConsoleToolkit.configure do |config|
23
29
  # helper definitions go here...
30
+ #
31
+ # config.use_pack :aliases
32
+ # config.use_pack :utils
33
+ # config.use_pack :solidus if defined? Spree
24
34
  end
25
35
  ```
26
36
 
@@ -123,7 +133,7 @@ end
123
133
  # config/initializers/console.rb
124
134
 
125
135
  RailsConsoleToolkit.configure do |config|
126
- config.model_helper 'Spree::Product', as: :product, by: %i[:name, :slug]
136
+ config.model_helper 'Spree::Product', as: :product, by: %i[name slug]
127
137
  end
128
138
  ```
129
139
 
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RailsConsoleToolkit
4
+ module Generators
5
+ class InstallGenerator < Rails::Generators::Base
6
+ def copy_initializer
7
+ copy_file 'initializer.rb', 'config/initializers/console.rb'
8
+ end
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ RailsConsoleToolkit.configure do |config|
4
+ # Uncomment to activate a pack:
5
+ #
6
+ # config.use_pack :aliases
7
+ # config.use_pack :utils
8
+ # config.use_pack :solidus if defined? Spree
9
+ #
10
+ # An example of a model-helper:
11
+ #
12
+ # config.model_helper 'Product', as: :product, by: %i[name slug]
13
+ end
@@ -1,3 +1,3 @@
1
1
  module RailsConsoleToolkit
2
- VERSION = "0.5.2"
2
+ VERSION = "0.5.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_console_toolkit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.2
4
+ version: 0.5.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Elia Schito
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-07-23 00:00:00.000000000 Z
11
+ date: 2020-12-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -83,6 +83,8 @@ files:
83
83
  - Rakefile
84
84
  - bin/console
85
85
  - bin/setup
86
+ - lib/generators/rails_console_toolkit/install/install_generator.rb
87
+ - lib/generators/rails_console_toolkit/install/templates/initializer.rb
86
88
  - lib/rails_console_toolkit.rb
87
89
  - lib/rails_console_toolkit/aliases.rb
88
90
  - lib/rails_console_toolkit/helpers.rb