rails_app_generator 0.2.15 → 0.2.16

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: 56c97362b3f0bbd3b48e5092642f2e169b837a5817b309fab06846fee354d17b
4
- data.tar.gz: 568567cf2fb8a42f66abf2733100f53b058c1d995062f5b44655a5ad11f66500
3
+ metadata.gz: 4d5e04ea00673d065adb8d68f306478509cfa4f3b3088de24e7c0eaaf89a8643
4
+ data.tar.gz: 9918578bf0c9bd0621b9f25581e973fc1e5add6b828a6326b234edbd11faf882
5
5
  SHA512:
6
- metadata.gz: fcdb2bf5a90b1fe66a8343be43ae64f1695deda8e4d27b7d3bbd4028eec1bf6328642e1dc030d2b4e1de3521cb3c55cdc3b5a03a0711caceacb85b70f2c493b7
7
- data.tar.gz: 102179805d385f431ff0487c7d0f181af6db40559a40a6ec447f959e726c6ee08a5720ca91b114d122a207f33ac1607fdf8945c6f5256b592c7ed2245e3b3137
6
+ metadata.gz: 48536723995325dbafcc9c5aff45b0daa6120aa43e8d3143cb22f77dec3583050576a718986621243eb0d48c21507cd3f0e8186ad4abbae1876a3c9b9f2a8350
7
+ data.tar.gz: 46149eba30371e8a90e69bfce992fa9eca0c83aeaee83a2f99a3f768e78c1132d4a710a5908c3b34dd800e3a98f4cfea9bd8b31c269c547ad7d8bf112ddf62dc
data/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## [0.2.15](https://github.com/klueless-io/rails_app_generator/compare/v0.2.14...v0.2.15) (2022-08-12)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * refactor acts_on_list ([b35bb14](https://github.com/klueless-io/rails_app_generator/commit/b35bb142ecafcac1ae47d88edd1a79649b5924c2))
7
+
1
8
  ## [0.2.14](https://github.com/klueless-io/rails_app_generator/compare/v0.2.13...v0.2.14) (2022-08-12)
2
9
 
3
10
 
@@ -29,8 +29,6 @@ after_bundle do
29
29
  generate('administrate:install')
30
30
 
31
31
  directory "app/dashboards"
32
-
33
- rubocop_minimal
34
32
  end
35
33
 
36
34
  def setup_db
@@ -32,15 +32,15 @@
32
32
  "test": "rspec",
33
33
  "add_devise": false,
34
34
  "add_dotenv": false,
35
- "add_rubocop": false,
35
+ "add_rubocop": true,
36
36
  "add_annotate": true,
37
37
  "add_lograge": false,
38
- "add_acts_as_list": true,
39
- "add_administrate": false,
38
+ "add_acts_as_list": false,
39
+ "add_administrate": true,
40
40
  "add_browser": false,
41
41
  "add_bcrypt": false,
42
42
  "add_chartkick": false,
43
- "add_faker": false,
43
+ "add_faker": true,
44
44
  "add_groupdate": false,
45
45
  "add_hexapdf": false,
46
46
  "add_httparty": false,
@@ -52,6 +52,6 @@
52
52
  "add_rails_html_sanitizer": false,
53
53
  "add_redcarpet": false,
54
54
  "add_twilio_ruby": false,
55
- "template": "/Users/davidcruwys/dev/kgems/rails_app_generator/after_templates/addons/acts_as_list/_.rb"
55
+ "template": "/Users/davidcruwys/dev/kgems/rails_app_generator/after_templates/addons/administrate/_.rb"
56
56
  }
57
57
  }
@@ -7,7 +7,7 @@
7
7
  "quiet": false,
8
8
  "skip": false,
9
9
  "ruby": "/Users/davidcruwys/.asdf/installs/ruby/3.1.1/bin/ruby",
10
- "template": "/Users/davidcruwys/dev/kgems/rails_app_generator/after_templates/addons/acts_as_list/_.rb",
10
+ "template": "/Users/davidcruwys/dev/kgems/rails_app_generator/after_templates/addons/administrate/_.rb",
11
11
  "database": "sqlite3",
12
12
  "skip_git": true,
13
13
  "skip_keeps": false,
@@ -42,15 +42,15 @@
42
42
  "test": "rspec",
43
43
  "add_devise": false,
44
44
  "add_dotenv": false,
45
- "add_rubocop": false,
45
+ "add_rubocop": true,
46
46
  "add_annotate": true,
47
47
  "add_lograge": false,
48
- "add_acts_as_list": true,
49
- "add_administrate": false,
48
+ "add_acts_as_list": false,
49
+ "add_administrate": true,
50
50
  "add_browser": false,
51
51
  "add_bcrypt": false,
52
52
  "add_chartkick": false,
53
- "add_faker": false,
53
+ "add_faker": true,
54
54
  "add_groupdate": false,
55
55
  "add_hexapdf": false,
56
56
  "add_httparty": false,
@@ -12,6 +12,13 @@ module RailsAppGenerator
12
12
  def apply
13
13
  template '.rubocop.yml.erb', '.rubocop.yml'
14
14
  end
15
+
16
+ def before_template
17
+ # This will cleanup the basic Rails 7 code base
18
+ # May want to make this a setting in the future
19
+ say 'Rubocop to cleanup the default Rails 7 code base'
20
+ run('rubocop -A --format worst --config .rubocop.yml')
21
+ end
15
22
  end
16
23
  end
17
24
  end
@@ -198,6 +198,13 @@ module RailsAppGenerator
198
198
  end
199
199
  # rubocop:enable Metrics/AbcSize, Metrics/MethodLength
200
200
 
201
+ # Fire any callbacks defined on addons either before running the custom template
202
+ def apply_rails_template
203
+ addon_instances.select { |addon| addon.respond_to?(:before_template) }.each(&:before_template)
204
+ super
205
+ end
206
+
207
+ # Fire any callbacks defined on addons either before or after the standard callbacks
201
208
  def run_after_bundle_callbacks
202
209
  addon_instances.select { |addon| addon.respond_to?(:before_bundle) }.each(&:before_bundle)
203
210
  super
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RailsAppGenerator
4
- VERSION = '0.2.15'
4
+ VERSION = '0.2.16'
5
5
  end
data/package-lock.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "rails_app_generator",
3
- "version": "0.2.15",
3
+ "version": "0.2.16",
4
4
  "lockfileVersion": 2,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "rails_app_generator",
9
- "version": "0.2.15",
9
+ "version": "0.2.16",
10
10
  "dependencies": {
11
11
  "daisyui": "^2.20.0"
12
12
  },
data/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rails_app_generator",
3
- "version": "0.2.15",
3
+ "version": "0.2.16",
4
4
  "description": "Create new Rails Application with custom opinions",
5
5
  "scripts": {
6
6
  "release": "semantic-release"
@@ -21,6 +21,10 @@ module RailsAppGenerator
21
21
  # rails_command('tailwindcss:install')
22
22
  end
23
23
 
24
+ def before_template
25
+ say 'Setting up <%= data.name_camel %> - before custom template'
26
+ end
27
+
24
28
  def before_bundle
25
29
  say 'Setting up <%= data.name_camel %> - before bundle install'
26
30
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_app_generator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.15
4
+ version: 0.2.16
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Cruwys