-
-
Notifications
You must be signed in to change notification settings - Fork 154
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add static_page rails generator #321
Conversation
end | ||
|
||
it "creates an HTML.ERB page template in the correct location" do | ||
expect(File.exist?("#{destination}/app/views/pages/#{filename}.html.erb")).to be(true) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Metrics/LineLength: Line is too long. [90/80]
|
||
before do | ||
FileUtils.mkdir_p(destination) | ||
Rails::Generators.invoke('static_page', [filename], destination_root: destination) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
Metrics/LineLength: Line is too long. [86/80]
RSpec.describe StaticPageGenerator, type: :generator do | ||
# Define the destination directory for generator output | ||
let(:destination) { Rails.root.join('tmp/generators') } | ||
let(:filename) { 'homepage' } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
|
||
RSpec.describe StaticPageGenerator, type: :generator do | ||
# Define the destination directory for generator output | ||
let(:destination) { Rails.root.join('tmp/generators') } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rails/FilePath: Please use Rails.root.join('path', 'to') instead.
Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
@@ -0,0 +1,22 @@ | |||
require 'spec_helper' | |||
require 'rails/generators' | |||
require_relative '../../lib/generators/static_page_generator.rb' # Make sure this path is correct for your project |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
Metrics/LineLength: Line is too long. [114/80]
@@ -0,0 +1,22 @@ | |||
require 'spec_helper' | |||
require 'rails/generators' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
@@ -0,0 +1,22 @@ | |||
require 'spec_helper' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
Not sure if these hound critiques are valid as I largely tried following convention within the project |
failed to see new features weren't being added :( |
Hi @whatnotery thank you for contribution but this library is in maintenance mode, which means we will only accept bug fixes/dependencies updates contributions. We have other gems you can contribute to, if you're interested. This post shares some active ones. Thank you! |
This PR creates the generator requested in #303
Hope this is helpful!