rails_app_generator 0.2.41 → 0.2.42

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: 6f266923a169ab15ff8606551f4e023723d947f785513dc89083e0762fd2d568
4
- data.tar.gz: 55093884128eff848ef3a6b21e415c3739530110590d58308bb7037674022744
3
+ metadata.gz: fac35f7d43a4a0aa30d5ad4804f03210e65531405e2bb4aa816adceb57a6fce0
4
+ data.tar.gz: c5bd9713bca39f89e04cb76811a8e4a6d5d6479af06cd9a10b813040f5761404
5
5
  SHA512:
6
- metadata.gz: aaf2fc71ee43c3d12c73b2ab6c91e1c7b5aacd31740a17284b845eb60aff94058634b7d346910242777d1e7ae17d4d75cde624002e6b67b2c5b73e530a6668d2
7
- data.tar.gz: c2c8a7dbb9d0cf975b4e02d19309147a3a90ae5a58da010b007eba9f2713d8289b6e3dbe1ee5caa04b33ef95a9d6c9eae31f97ec4480cad7969d4fdb1796642f
6
+ metadata.gz: c05f482952728e4d790dc1e8f0ce58acaeae23d104df1a4b2dd05d42378e5aed84995397d2092e2144d2acb5528b091179b79045beab7e68f7245cbf9b0c4aee
7
+ data.tar.gz: b229e0da5f6b7d8b1062c09fab5cab949cea7b5de883279311b3199a4c16bd3d1aa84010b41d6b27db0dd672f6707c0d095f839547c49d2eb4f4432282c56425
data/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## [0.2.41](https://github.com/klueless-io/rails_app_generator/compare/v0.2.40...v0.2.41) (2022-08-30)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * update klueless profile ([e426b82](https://github.com/klueless-io/rails_app_generator/commit/e426b820b15e8e49d2cc6c6ec2ccfd4ed8ea1158))
7
+
1
8
  ## [0.2.40](https://github.com/klueless-io/rails_app_generator/compare/v0.2.39...v0.2.40) (2022-08-23)
2
9
 
3
10
 
@@ -70,6 +70,7 @@
70
70
  "add_pretender",
71
71
  "add_public_suffix",
72
72
  "add_rails_html_sanitizer",
73
+ "add_scenic",
73
74
  "add_ransack",
74
75
  "add_redcarpet",
75
76
  "add_rolify",
@@ -567,6 +568,13 @@
567
568
  "default": false,
568
569
  "required": false
569
570
  },
571
+ {
572
+ "name": "add_scenic",
573
+ "description": "Indicates when to generate add scenic",
574
+ "type": "boolean",
575
+ "default": false,
576
+ "required": false
577
+ },
570
578
  {
571
579
  "name": "add_ransack",
572
580
  "description": "Indicates when to generate add ransack",
@@ -70,6 +70,7 @@
70
70
  "add_pretender",
71
71
  "add_public_suffix",
72
72
  "add_rails_html_sanitizer",
73
+ "add_scenic",
73
74
  "add_ransack",
74
75
  "add_redcarpet",
75
76
  "add_rolify",
@@ -567,6 +568,13 @@
567
568
  "default": false,
568
569
  "required": false
569
570
  },
571
+ {
572
+ "name": "add_scenic",
573
+ "description": "",
574
+ "type": "boolean",
575
+ "default": false,
576
+ "required": false
577
+ },
570
578
  {
571
579
  "name": "add_ransack",
572
580
  "description": "",
@@ -1,37 +1,14 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # lib/rails_app_generator/rag_initializer.rb
4
- # add_if(:scenic)
5
- # rag.add_option :add_scenic , type: :boolean, default: false
6
-
7
3
  module RailsAppGenerator
8
4
  # Custom add-ons for RailsAppGenerator
9
5
  module AddOns
10
6
  # Add Scenic to rails application
11
7
  class Scenic < RailsAppGenerator::Addon
12
- required_gem gem.version('scenic', '1.6.0', '')
8
+ required_gem gem.version('scenic', '1.6.0', 'Ads methods to ActiveRecord:Migration to create and manage database views in Rails')
13
9
 
14
10
  def apply
15
- say 'Setting up Scenic'
16
- # template('scenic_template.rb', 'target/scenic.rb', force: true)
17
- # template('app/javascript/stylesheets/components.scss')
18
- # create_file('target/scenic.rb', 'put your content here')
19
- # directory 'app/template', 'app/target', force: true
20
- # empty_directory 'app/target'
21
- # inject_into_file('app/application.js', "some content")
22
- # rails_command('tailwindcss:install')
23
- end
24
-
25
- def before_template
26
- say 'Setting up Scenic - before custom template'
27
- end
28
-
29
- def before_bundle
30
- say 'Setting up Scenic - before bundle install'
31
- end
32
-
33
- def after_bundle
34
- say 'Setting up Scenic - after bundle install'
11
+ bundle_install
35
12
  end
36
13
  end
37
14
  end
@@ -208,6 +208,7 @@ module RailsAppGenerator
208
208
  add_if(:rails_app_generator) # TODO: needs testing
209
209
  add_if(:redcarpet) # tested
210
210
  add_if(:rolify) # tested
211
+ add_if(:scenic)
211
212
  add_if(:services) # TODO: needs testing
212
213
  add_if(:shoulda) # TODO: needs testing
213
214
  add_if(:sidekiq) # TODO: needs testing
@@ -23,7 +23,9 @@ module RailsAppGenerator
23
23
  info = Net::HTTP.get(URI.parse(link))
24
24
  json = JSON.parse(info)
25
25
 
26
- Rails::Generators::AppBase::GemfileEntry.new(json['name'], json['version'], json['description'])
26
+ comment = (json['description'] || json['info'] || '').gsub(/(\r?\n|\r)/, ' ').squeeze.strip
27
+
28
+ Rails::Generators::AppBase::GemfileEntry.new(json['name'], json['version'], comment)
27
29
  rescue SocketError
28
30
  abort 'Internet connection cannot be established to RubyGems.org'
29
31
  rescue JSON::ParserError
@@ -131,7 +131,7 @@ KConfig.configure do |config|
131
131
  rag.add_option :add_kaminari , type: :boolean, default: false
132
132
  rag.add_option :add_lograge , type: :boolean, default: false
133
133
  rag.add_option :add_minimal_css , type: :boolean, default: false
134
- rag.add_option :minimal_css_library , type: :string, default: 'water.css', description: "Minimal CSS library to get you started. [options: water.css (default)]"
134
+ rag.add_option :minimal_css_library , type: :string , default: 'water.css', description: "Minimal CSS library to get you started. [options: water.css (default)]"
135
135
  rag.add_option :add_mini_magick , type: :boolean, default: false
136
136
  rag.add_option :add_motor_admin , type: :boolean, default: false
137
137
  rag.add_option :add_phony_rails , type: :boolean, default: false
@@ -139,6 +139,7 @@ KConfig.configure do |config|
139
139
  rag.add_option :add_public_suffix , type: :boolean, default: false
140
140
  # pundit
141
141
  rag.add_option :add_rails_html_sanitizer , type: :boolean, default: false
142
+ rag.add_option :add_scenic , type: :boolean, default: false
142
143
  # rails_app_generator
143
144
  rag.add_option :add_ransack , type: :boolean, default: false
144
145
  rag.add_option :add_redcarpet , type: :boolean, default: false
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RailsAppGenerator
4
- VERSION = '0.2.41'
4
+ VERSION = '0.2.42'
5
5
  end
data/package-lock.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "rails_app_generator",
3
- "version": "0.2.41",
3
+ "version": "0.2.42",
4
4
  "lockfileVersion": 2,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "rails_app_generator",
9
- "version": "0.2.41",
9
+ "version": "0.2.42",
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.41",
3
+ "version": "0.2.42",
4
4
  "description": "Create new Rails Application with custom opinions",
5
5
  "scripts": {
6
6
  "release": "semantic-release"
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.41
4
+ version: 0.2.42
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Cruwys