rails_app_generator 0.1.21 → 0.1.24

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: bff2db058b7a94cca7a3a2dbf88c224712abed77f395e6e17e88ca390db06e63
4
- data.tar.gz: 7bfad8880b3d40e34fa4a46d8921e179e20f53f3fe04e830651536939cff52e7
3
+ metadata.gz: 7e236768df446ce46cacc15f00e2f7d01b4199ce4925b6533b1ccf8dba8f340b
4
+ data.tar.gz: ee76cae25541e6b59718df39674da78b3cd5417170d794863ea22a6e0866d4f1
5
5
  SHA512:
6
- metadata.gz: 3740692527a1cf226504e1c06a582b671bbf0685eb4c0f11a55d4431a244f681a5a0cb34d52c9b74806c816005e28ba5aff84bdb1d39acc6f3181586b81536c6
7
- data.tar.gz: ec99ceb2866abc91fb1e7137370897b35b5407845f15ff8f0017ca1df9f41e259a4bac5bbb84aee7beb3abe2966dcdedbb39536550d236ca98ca431b57f91677
6
+ metadata.gz: '07950304f0c96819a02b3cce486e798dc961a3cf6efc78463be7ffeae8c9db84a63d588582dd69f7e0f8183d3159fa16d24da8fa69f59f8d56819dad38828f4f'
7
+ data.tar.gz: fad5dd76e12615d58073cf586ece0b6eedc5d539fafa6484506afe11616a8e5749bb9ea1bbbeee0b7674dc39f3d2bf27cc5b74eba2115fda93978b22a3e47f14
data/CHANGELOG.md CHANGED
@@ -1,3 +1,26 @@
1
+ ## [0.1.23](https://github.com/klueless-io/rails_app_generator/compare/v0.1.22...v0.1.23) (2022-08-06)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * remove addon rest-client ([d480b6a](https://github.com/klueless-io/rails_app_generator/commit/d480b6a2963338957a58db7410641ab23d0ef297))
7
+
8
+ ## [0.1.22](https://github.com/klueless-io/rails_app_generator/compare/v0.1.21...v0.1.22) (2022-08-06)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * addon hexapdf ([0b99dde](https://github.com/klueless-io/rails_app_generator/commit/0b99dde1e2609c12c1235b4a9c73e683785c3eb6))
14
+ * addon rest-client ([ed3a426](https://github.com/klueless-io/rails_app_generator/commit/ed3a42669ae9707fa2713f767fcda990346bed5e))
15
+
16
+ ## [0.1.21](https://github.com/klueless-io/rails_app_generator/compare/v0.1.20...v0.1.21) (2022-08-06)
17
+
18
+
19
+ ### Bug Fixes
20
+
21
+ * addon hexapdf progress ([631e589](https://github.com/klueless-io/rails_app_generator/commit/631e5897c9dd7bcdbb9a8c857b9a62c251213fa6))
22
+ * addon hexapdf progress ([b2bb9e5](https://github.com/klueless-io/rails_app_generator/commit/b2bb9e5855a24a41fdddcd553ce970481bc57e66))
23
+
1
24
  ## [0.1.20](https://github.com/klueless-io/rails_app_generator/compare/v0.1.19...v0.1.20) (2022-08-06)
2
25
 
3
26
 
@@ -0,0 +1,26 @@
1
+ # frozen_string_literal: true
2
+
3
+ # require 'pry'
4
+
5
+ # HexaPDF is a pure Ruby library with an accompanying application for working with PDF files.
6
+
7
+ #
8
+ # exe/rag addons/hexapdf
9
+
10
+ self.local_template_path = File.dirname(__FILE__)
11
+
12
+ gac 'base rails 7 image created'
13
+
14
+ add_controller('home', 'index')
15
+ route("root 'home#index'")
16
+ route("get 'home/make_pdf'")
17
+
18
+ force_copy
19
+
20
+ copy_file 'app/controllers/home_controller.rb' , 'app/controllers/home_controller.rb'
21
+ copy_file 'app/views/home/index.html.erb' , 'app/views/home/index.html.erb'
22
+
23
+ copy_file 'app/views/layouts/_alerts.html.erb' , 'app/views/layouts/_alerts.html.erb'
24
+ copy_file 'app/views/layouts/_navbar.html.erb' , 'app/views/layouts/_navbar.html.erb'
25
+ copy_file 'app/views/layouts/_footer.html.erb' , 'app/views/layouts/_footer.html.erb'
26
+ template 'app/views/layouts/application.html.erb' , 'app/views/layouts/application.html.erb'
@@ -0,0 +1,17 @@
1
+ class HomeController < ApplicationController
2
+ def index
3
+ end
4
+
5
+ def make_pdf
6
+ doc = HexaPDF::Document.new
7
+ canvas = doc.pages.add.canvas
8
+ canvas.font('Helvetica', size: 40)
9
+ name = Faker::Name.name
10
+ canvas.text("Hello #{name}", at: [20, 400])
11
+ doc.write("hello-sean.pdf")
12
+
13
+ flash.notice = "PDF Created!"
14
+
15
+ render :index
16
+ end
17
+ end
@@ -0,0 +1,11 @@
1
+ <style>
2
+ .alert { color: red; }
3
+ .notice { color: green; }
4
+ </style>
5
+
6
+ <% flash.each do |type, msg| %><div class="<%= type %>"><%= msg %></div><% end %>
7
+ <% if flash.any? %><hr /><% end %>
8
+
9
+ <h1>Hexapdf</h1>
10
+
11
+ <h2>HexaPDF is a pure Ruby library with an accompanying application for working with PDF files.</h2>
@@ -0,0 +1,2 @@
1
+ <% flash.each do |type, msg| %><div class="<%= type %>"><%= msg %></div><% end %>
2
+ <% if flash.any? %><hr /><% end %>
@@ -0,0 +1,3 @@
1
+ <footer>
2
+ <hr />
3
+ </footer>
@@ -0,0 +1,5 @@
1
+ <header>
2
+ <%= link_to 'Home', root_path %> |
3
+ <%= link_to 'Create PDF', home_make_pdf_path %> |
4
+ <hr />
5
+ </header>
@@ -0,0 +1,28 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title><%= camelized %></title>
5
+ <meta name="viewport" content="width=device-width,initial-scale=1">
6
+ <%%= csrf_meta_tags %>
7
+ <%%= csp_meta_tag %>
8
+
9
+ <%- if options[:skip_hotwire] || options[:skip_javascript] -%>
10
+ <%%= stylesheet_link_tag "application" %>
11
+ <%- else -%>
12
+ <%%= stylesheet_link_tag "application", "data-turbo-track": "reload" %>
13
+ <%- end -%>
14
+ <style>
15
+ .alert { color: red; }
16
+ .notice { color: green; }
17
+ </style>
18
+ </head>
19
+
20
+ <body>
21
+ <%%= render 'layouts/navbar' %>
22
+ <main>
23
+ <%%= render 'layouts/alerts' %>
24
+ <%%= yield %>
25
+ </main>
26
+ <%%= render 'layouts/footer' %>
27
+ </body>
28
+ </html>
@@ -7,24 +7,7 @@ module RailsAppGenerator
7
7
  class Hexapdf < AddOn
8
8
  required_gem gem.version('hexapdf', '0.24.0', 'HexaPDF is a pure Ruby library with an accompanying application for working with PDF files.')
9
9
 
10
- def apply
11
- say 'Setting up Hexapdf'
12
- # template('hexapdf_template.rb', 'target/hexapdf.rb', force: true)
13
- # template('app/javascript/stylesheets/components.scss')
14
- # create_file('target/hexapdf.rb', 'put your content here')
15
- # directory 'app/template', 'app/target', force: true
16
- # empty_directory 'app/target'
17
- # inject_into_file('app/application.js', "some content")
18
- # rails_command('tailwindcss:install')
19
- end
20
-
21
- def before_bundle
22
- say 'Setting up Hexapdf - before bundle install'
23
- end
24
-
25
- def after_bundle
26
- say 'Setting up Hexapdf - after bundle install'
27
- end
10
+ def apply; end
28
11
  end
29
12
  end
30
13
  end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RailsAppGenerator
4
+ # Custom add-ons for RailsAppGenerator
5
+ module AddOns
6
+ # Add Httparty to rails application
7
+ class Httparty < AddOn
8
+ required_gem gem.version('httparty', '0.20.0', 'Makes http fun! Also, makes consuming restful web services dead easy.')
9
+
10
+ def apply; end
11
+ end
12
+ end
13
+ end
@@ -19,9 +19,7 @@ module RailsAppGenerator
19
19
  # factory_bot_rails 5.2.0 6.2.0 = 5.2.0 development, test
20
20
  # guard-bundler 2.2.1 3.0.0 = 2.2.1 development, test
21
21
  # guard-rubocop 1.4.0 1.5.0 = 1.4.0 development, test
22
- # hexapdf 0.23.0 0.24.0 ~> 0.5 default
23
22
  # http-accept 1.7.0 2.2.0
24
- # k_log 0.0.18 0.0.33 = 0.0.18 development, test
25
23
  # net-ssh 6.1.0 7.0.1
26
24
  # oauth2 1.4.10 2.0.6
27
25
  # omniauth-oauth2 1.7.3 1.8.0
@@ -155,6 +153,7 @@ module RailsAppGenerator
155
153
  class_option :add_hexapdf , type: :boolean, default: false
156
154
  class_option :add_honeybadger , type: :boolean, default: false
157
155
  class_option :add_rails_html_sanitizer , type: :boolean, default: false
156
+ class_option :add_httparty , type: :boolean, default: false
158
157
  class_option :add_twilio_ruby , type: :boolean, default: false
159
158
 
160
159
  class << self
@@ -306,6 +305,7 @@ module RailsAppGenerator
306
305
  add_if(:faker)
307
306
  add_if(:generators)
308
307
  add_if(:hexapdf)
308
+ add_if(:httparty)
309
309
  add_if(:high_voltage)
310
310
  add_if(:honeybadger)
311
311
  add_if(:lograge)
@@ -65,6 +65,7 @@ module RailsAppGenerator
65
65
  register_option :add_faker , type: :boolean, default: false
66
66
  register_option :add_groupdate , type: :boolean, default: false
67
67
  register_option :add_hexapdf , type: :boolean, default: false
68
+ register_option :add_httparty , type: :boolean, default: false
68
69
  register_option :add_honeybadger , type: :boolean, default: false
69
70
  register_option :add_rails_html_sanitizer , type: :boolean, default: false
70
71
  register_option :add_twilio_ruby , type: :boolean, default: false
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RailsAppGenerator
4
- VERSION = '0.1.21'
4
+ VERSION = '0.1.24'
5
5
  end
data/package-lock.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "rails_app_generator",
3
- "version": "0.1.21",
3
+ "version": "0.1.24",
4
4
  "lockfileVersion": 2,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "rails_app_generator",
9
- "version": "0.1.21",
9
+ "version": "0.1.24",
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.1.21",
3
+ "version": "0.1.24",
4
4
  "description": "Create new Rails Application with custom opinions",
5
5
  "scripts": {
6
6
  "release": "semantic-release"
@@ -0,0 +1,13 @@
1
+ {
2
+ "args": {
3
+ "app_path": "hexapdf",
4
+ "destination_root": "/Users/davidcruwys/dev/kgems/rails_app_generator/a/addons"
5
+ },
6
+ "opts": {
7
+ "skip_git": true,
8
+ "skip_test": true,
9
+ "template": "/Users/davidcruwys/dev/kgems/rails_app_generator/after_templates/addons/hexapdf/_.rb",
10
+ "add_hexapdf": true,
11
+ "add_faker": true
12
+ }
13
+ }
data/tasks/profile.thor CHANGED
@@ -50,8 +50,6 @@ class Profile < Thor
50
50
  copy_file('profile/app/views/layouts/application.html.erb' , after_template_path('app/views/layouts/application.html.erb') , force: options[:force])
51
51
 
52
52
  copy_file('profile/db/seeds.rb' , after_template_path('db/seeds.rb') , force: options[:force])
53
-
54
- copy_file('profile/config/initializers/addon_name.rb' , after_template_path("config/initializers/#{name}.rb") , force: options[:force])
55
53
  end
56
54
 
57
55
  # rubocop:enable Metrics/AbcSize
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.1.21
4
+ version: 0.1.24
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Cruwys
@@ -195,6 +195,13 @@ files:
195
195
  - after_templates/addons/faker/app/views/layouts/_footer.html.erb
196
196
  - after_templates/addons/faker/app/views/layouts/_navbar.html.erb
197
197
  - after_templates/addons/faker/app/views/layouts/application.html.erb
198
+ - after_templates/addons/hexapdf/_.rb
199
+ - after_templates/addons/hexapdf/app/controllers/home_controller.rb
200
+ - after_templates/addons/hexapdf/app/views/home/index.html.erb
201
+ - after_templates/addons/hexapdf/app/views/layouts/_alerts.html.erb
202
+ - after_templates/addons/hexapdf/app/views/layouts/_footer.html.erb
203
+ - after_templates/addons/hexapdf/app/views/layouts/_navbar.html.erb
204
+ - after_templates/addons/hexapdf/app/views/layouts/application.html.erb
198
205
  - after_templates/addons/honeybadger/_.rb
199
206
  - after_templates/addons/honeybadger/app/controllers/application_controller.rb
200
207
  - after_templates/addons/honeybadger/app/controllers/errors_controller.rb
@@ -357,6 +364,7 @@ files:
357
364
  - lib/rails_app_generator/addons/hexapdf.rb
358
365
  - lib/rails_app_generator/addons/high_voltage.rb
359
366
  - lib/rails_app_generator/addons/honeybadger.rb
367
+ - lib/rails_app_generator/addons/httparty.rb
360
368
  - lib/rails_app_generator/addons/inline_svg.rb
361
369
  - lib/rails_app_generator/addons/irbrc.rb
362
370
  - lib/rails_app_generator/addons/lograge.rb
@@ -410,6 +418,7 @@ files:
410
418
  - profiles/addons/browser.json
411
419
  - profiles/addons/chartkick.json
412
420
  - profiles/addons/faker.json
421
+ - profiles/addons/hexapdf.json
413
422
  - profiles/addons/honeybadger.json
414
423
  - profiles/addons/rails-html-sanitizer.json
415
424
  - profiles/addons/twilio_ruby.json