-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from RoleModel/update-gemspec
Update Gemspec
- Loading branch information
Showing
11 changed files
with
129 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
## Why? | ||
|
||
Why were the changes needed? What issues were the changes addressing? | ||
(Note: some changes may seem unrelated to the ticket, this is a great place to explain further.) | ||
|
||
## What Changed | ||
|
||
What changed in this PR? | ||
|
||
* [ ] Change 1 | ||
* [ ] Change 2 | ||
* [ ] ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,3 +6,5 @@ | |
/pkg/ | ||
/spec/reports/ | ||
/tmp/ | ||
|
||
.history |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,78 @@ | ||
AllCops: | ||
TargetRubyVersion: 3.0 | ||
Exclude: | ||
- bin/**/* | ||
- db/**/* | ||
- vendor/**/* | ||
- config/**/* | ||
- tmp/**/* | ||
- env.rb | ||
NewCops: enable | ||
|
||
Style/StringLiterals: | ||
EnforcedStyle: double_quotes | ||
Metrics: | ||
Severity: refactor | ||
|
||
Style/StringLiteralsInInterpolation: | ||
EnforcedStyle: double_quotes | ||
# Hard to make this pass always and want to keep flexibility | ||
Layout/ArrayAlignment: | ||
Enabled: false | ||
|
||
# Best Practices for readability | ||
Layout: | ||
Severity: refactor | ||
|
||
Layout/ArgumentAlignment: | ||
EnforcedStyle: with_fixed_indentation | ||
|
||
Layout/FirstArrayElementIndentation: | ||
EnforcedStyle: consistent | ||
|
||
Layout/FirstHashElementIndentation: | ||
EnforcedStyle: consistent | ||
|
||
Layout/MultilineMethodCallIndentation: | ||
EnforcedStyle: indented | ||
|
||
Layout/MultilineOperationIndentation: | ||
EnforcedStyle: indented | ||
|
||
Lint/UnusedMethodArgument: | ||
Severity: refactor | ||
AutoCorrect: false | ||
|
||
Lint/UnusedBlockArgument: | ||
Severity: refactor | ||
AutoCorrect: false | ||
|
||
Lint/UselessAssignment: | ||
Severity: refactor | ||
AutoCorrect: false | ||
|
||
Lint/UnderscorePrefixedVariableName: | ||
Enabled: false | ||
|
||
Lint/Loop: | ||
Enabled: false | ||
|
||
Lint/SuppressedException: | ||
Enabled: false | ||
|
||
Naming/BlockForwarding: | ||
EnforcedStyle: explicit | ||
|
||
Style: | ||
Severity: refactor | ||
|
||
Style/ClassAndModuleChildren: | ||
Enabled: false | ||
|
||
Style/Documentation: | ||
Enabled: false | ||
|
||
Style/HashAsLastArrayItem: | ||
Enabled: false | ||
|
||
Style/HashSyntax: | ||
Enabled: false | ||
|
||
# It is ok to use inject at times | ||
Style/EachWithObject: | ||
Enabled: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
# frozen_string_literal: true | ||
|
||
source "https://rubygems.org" | ||
source 'https://rubygems.org' | ||
|
||
# Specify your gem's dependencies in chromium-pdf.gemspec | ||
gemspec | ||
|
||
gem "rake", "~> 13.0" | ||
gem 'rake', '~> 13.0' | ||
|
||
gem "minitest", "~> 5.16" | ||
gem 'minitest', '~> 5.16' | ||
|
||
gem "rubocop", "~> 1.21" | ||
gem 'rubocop', '~> 1.21' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,27 @@ | ||
# frozen_string_literal: true | ||
|
||
require_relative "lib/chromium/pdf/version" | ||
require_relative 'lib/chromium/pdf/version' | ||
|
||
Gem::Specification.new do |spec| | ||
spec.name = "chromium-pdf" | ||
spec.name = 'chromium-pdf' | ||
spec.version = Chromium::Pdf::VERSION | ||
spec.authors = ["RoleModel Software"] | ||
spec.email = ["[email protected]"] | ||
spec.authors = ['RoleModel Software'] | ||
spec.email = ['[email protected]'] | ||
|
||
spec.summary = "A wrapper around headless Chrome's print-to-pdf functionality." | ||
spec.description = "TODO: Write a longer description or delete this line." | ||
spec.homepage = "TODO: Put your gem's website or public repo URL here." | ||
spec.license = "MIT" | ||
spec.required_ruby_version = ">= 3.0.0" | ||
spec.homepage = 'https://github.com/RoleModel/chromium-pdf' | ||
spec.license = 'MIT' | ||
spec.required_ruby_version = '>= 3.0.0' | ||
|
||
spec.metadata["allowed_push_host"] = "TODO: Set to your gem server 'https://example.com'" | ||
# Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host' | ||
# to allow pushing to a single host or delete this section to allow pushing to any host. | ||
raise 'RubyGems 2.0 or newer is required to protect against public gem pushes.' unless spec.respond_to?(:metadata) | ||
|
||
spec.metadata["homepage_uri"] = spec.homepage | ||
spec.metadata["source_code_uri"] = "TODO: Put your gem's public repo URL here." | ||
spec.metadata["changelog_uri"] = "TODO: Put your gem's CHANGELOG.md URL here." | ||
spec.metadata['allowed_push_host'] = "Set to 'http://mygemserver.com'" | ||
|
||
spec.metadata['homepage_uri'] = spec.homepage | ||
spec.metadata['source_code_uri'] = 'https://github.com/RoleModel/chromium-pdf' | ||
spec.metadata['changelog_uri'] = 'https://github.com/RoleModel/chromium-pdf' | ||
|
||
# Specify which files should be added to the gem when it is released. | ||
# The `git ls-files -z` loads the files in the RubyGem that have been added into git. | ||
|
@@ -29,13 +32,14 @@ Gem::Specification.new do |spec| | |
f.start_with?(*%w[bin/ test/ spec/ features/ .git .github appveyor Gemfile]) | ||
end | ||
end | ||
spec.bindir = "exe" | ||
spec.bindir = 'exe' | ||
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) } | ||
spec.require_paths = ["lib"] | ||
spec.require_paths = ['lib'] | ||
|
||
# Uncomment to register a new dependency of your gem | ||
# spec.add_dependency "example-gem", "~> 1.0" | ||
|
||
# For more information and examples about making a new gem, check out our | ||
# guide at: https://bundler.io/guides/creating_gem.html | ||
spec.metadata['rubygems_mfa_required'] = 'true' | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 2 additions & 1 deletion
3
lib/chromium/pdf/generators/chromium/pdf/install/install_generator.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,6 @@ | |
|
||
module Chromium | ||
module Pdf | ||
VERSION = "0.1.0" | ||
VERSION = '0.1.0' | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
# frozen_string_literal: true | ||
|
||
require "test_helper" | ||
require 'test_helper' | ||
|
||
class Chromium::TestPdf < Minitest::Test | ||
def test_that_it_has_a_version_number | ||
refute_nil ::Chromium::Pdf::VERSION | ||
end | ||
# def test_that_it_has_a_version_number | ||
# refute_nil ::Chromium::Pdf::VERSION | ||
# end | ||
|
||
def test_it_does_something_useful | ||
assert false | ||
end | ||
# def test_it_does_something_useful | ||
# assert false | ||
# end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# frozen_string_literal: true | ||
|
||
$LOAD_PATH.unshift File.expand_path("../lib", __dir__) | ||
require "chromium/pdf" | ||
$LOAD_PATH.unshift File.expand_path('../lib', __dir__) | ||
require 'chromium/pdf' | ||
|
||
require "minitest/autorun" | ||
require 'minitest/autorun' |