Skip to content
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

djb/update to ruby 3 3 5 #5

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
require: rubocop-rspec

AllCops:
TargetRubyVersion: 2.3
TargetRubyVersion: 3.0
NewCops: enable

Naming/FileName:
Enabled: false
Expand All @@ -13,12 +16,15 @@ Naming/AccessorMethodName:
Style/ClassAndModuleChildren:
Enabled: false

Metrics/LineLength:
Layout/LineLength:
Max: 120

Metrics/MethodLength:
Enabled: false

Metrics/ModuleLength:
Enabled: false

Metrics/AbcSize:
Enabled: false

Expand Down Expand Up @@ -46,7 +52,7 @@ Style/Documentation:
Style/GuardClause:
Enabled: false

Naming/UncommunicativeMethodParamName:
Naming/MethodParameterName:
Enabled: false

Style/EvalWithLocation:
Expand Down
1 change: 1 addition & 0 deletions .ruby-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.3.5
6 changes: 6 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,9 @@
source 'https://rubygems.org/'

gemspec

group :development do
gem 'rspec'
gem 'rubocop'
gem 'rubocop-rspec'
end
86 changes: 48 additions & 38 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7,46 +7,55 @@ PATH
GEM
remote: https://rubygems.org/
specs:
Ascii85 (1.0.2)
afm (0.2.0)
ast (2.4.0)
diff-lcs (1.2.5)
hashery (2.1.1)
jaro_winkler (1.5.2)
parallel (1.12.1)
parser (2.5.3.0)
ast (~> 2.4.0)
pdf-reader (1.3.3)
Ascii85 (~> 1.0.0)
afm (~> 0.2.0)
hashery (~> 2.0)
ruby-rc4
ttfunk
powerpack (0.1.2)
prawn (0.12.0)
pdf-reader (>= 0.9.0)
ttfunk (~> 1.0.2)
rainbow (3.0.0)
rspec (2.14.1)
rspec-core (~> 2.14.0)
rspec-expectations (~> 2.14.0)
rspec-mocks (~> 2.14.0)
rspec-core (2.14.7)
rspec-expectations (2.14.4)
diff-lcs (>= 1.1.3, < 2.0)
rspec-mocks (2.14.4)
rubocop (0.62.0)
jaro_winkler (~> 1.5.1)
ast (2.4.2)
bigdecimal (3.1.8)
diff-lcs (1.5.1)
json (2.7.2)
language_server-protocol (3.17.0.3)
matrix (0.4.2)
parallel (1.26.3)
parser (3.3.5.0)
ast (~> 2.4.1)
racc
pdf-core (0.10.0)
prawn (2.5.0)
matrix (~> 0.4)
pdf-core (~> 0.10.0)
ttfunk (~> 1.8)
racc (1.8.1)
rainbow (3.1.1)
regexp_parser (2.9.2)
rspec (3.13.0)
rspec-core (~> 3.13.0)
rspec-expectations (~> 3.13.0)
rspec-mocks (~> 3.13.0)
rspec-core (3.13.1)
rspec-support (~> 3.13.0)
rspec-expectations (3.13.3)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.13.0)
rspec-mocks (3.13.2)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.13.0)
rspec-support (3.13.1)
rubocop (1.66.1)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
parser (>= 2.5, != 2.5.1.1)
powerpack (~> 0.1)
parser (>= 3.3.0.2)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 2.4, < 3.0)
rubocop-ast (>= 1.32.2, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (~> 1.4.0)
ruby-progressbar (1.10.0)
ruby-rc4 (0.1.5)
ttfunk (1.0.3)
unicode-display_width (1.4.1)
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.32.3)
parser (>= 3.3.1.0)
rubocop-rspec (3.1.0)
rubocop (~> 1.61)
ruby-progressbar (1.13.0)
ttfunk (1.8.0)
bigdecimal (~> 3.1)
unicode-display_width (2.6.0)

PLATFORMS
ruby
Expand All @@ -55,6 +64,7 @@ DEPENDENCIES
prawn-blank!
rspec
rubocop
rubocop-rspec

BUNDLED WITH
1.17.1
2.5.21
6 changes: 1 addition & 5 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,11 @@ end
gem 'hoe', '>=2.0.0'
require 'hoe'

require 'spec/version'
require 'spec/rake/spectask'
require 'spec/ruby'

Spec::Rake::SpecTask.new('spec') do |t|
t.spec_files = FileList['spec/**/*.rb']
end

desc 'Look for TODO and FIXME tags in the code'
task :todo do
task todo: :environment do
egrep(/(FIXME|TODO|TBD)/)
end
7 changes: 1 addition & 6 deletions lib/prawn/blank.rb
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,7 @@ def get_actual_page_dimensions(page)

page_rotation = get_page_rotation(page)

if [90, 270].include?(page_rotation)
swap_width = page_width

page_width = page_height
page_height = swap_width
end
page_width, page_height = page_height, page_width if [90, 270].include?(page_rotation)

[page_width, page_height]
end
Expand Down
Loading