Skip to content

Commit

Permalink
Enable and fix UTF-8 encoding comments
Browse files Browse the repository at this point in the history
  • Loading branch information
packetmonkey committed Apr 7, 2014
1 parent d43d6a0 commit 88354b9
Show file tree
Hide file tree
Showing 27 changed files with 50 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -180,5 +180,5 @@ ClassVars:
Enabled: false
ParameterLists:
Enabled: false
Encoding:
Enabled: false
# Encoding:
# Enabled: false
2 changes: 2 additions & 0 deletions bench/afm_text_bench.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# encoding: utf-8

$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
require "prawn"
require "benchmark"
Expand Down
2 changes: 2 additions & 0 deletions bench/png_type_6.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# encoding: utf-8

$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
require "prawn"
require "benchmark"
Expand Down
2 changes: 2 additions & 0 deletions bench/png_type_6_objects.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# encoding: utf-8

$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
require "prawn"

Expand Down
2 changes: 2 additions & 0 deletions bench/table_bench.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# encoding: utf-8

$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
require "prawn"
require "benchmark"
Expand Down
2 changes: 2 additions & 0 deletions bench/ttf_text_bench.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# encoding: utf-8

$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
require "prawn"
require "benchmark"
Expand Down
2 changes: 2 additions & 0 deletions lib/prawn.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# encoding: utf-8

# Welcome to Prawn, the best PDF Generation library ever.
# This documentation covers user level functionality.
#
Expand Down
2 changes: 2 additions & 0 deletions lib/prawn/grid.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# encoding: utf-8

# grid.rb: Provides a basic grid layout system for Prawn
#
# Contributed by Andrew O'Brien in March 2009
Expand Down
2 changes: 2 additions & 0 deletions lib/prawn/image_handler.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# encoding: utf-8

# ImageHandler provides a way to register image processors with Prawn
#
# Contributed by Evan Sharp in November 2013.
Expand Down
2 changes: 1 addition & 1 deletion lib/prawn/images.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# encoding: ASCII-8BIT
# encoding: utf-8
# images.rb : Implements PDF image embedding
#
# Copyright April 2008, James Healy, Gregory Brown. All Rights Reserved.
Expand Down
2 changes: 1 addition & 1 deletion lib/prawn/images/jpg.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# encoding: ASCII-8BIT
# encoding: utf-8

# jpg.rb : Extracts the data from a JPG that is needed for embedding
#
Expand Down
2 changes: 1 addition & 1 deletion lib/prawn/images/png.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# encoding: ASCII-8BIT
# encoding: utf-8

# png.rb : Extracts the data from a PNG that is needed for embedding
#
Expand Down
2 changes: 2 additions & 0 deletions lib/prawn/layout.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# encoding: utf-8

# This is free software. Please see the LICENSE and COPYING files for details.

require_relative "table"
Expand Down
2 changes: 2 additions & 0 deletions lib/prawn/outline.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# encoding: utf-8

module Prawn
class Document
# @group Stable API
Expand Down
2 changes: 2 additions & 0 deletions lib/prawn/security/arcfour.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# encoding: utf-8

# Implementation of the "ARCFOUR" algorithm ("alleged RC4 (tm)"). Implemented
# as described at:
# http://www.mozilla.org/projects/security/pki/nss/draft-kaukonen-cipher-arcfour-03.txt
Expand Down
2 changes: 2 additions & 0 deletions lib/prawn/table/column_width_calculator.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# encoding: utf-8

module Prawn
class Table
# @private
Expand Down
2 changes: 2 additions & 0 deletions lib/prawn/text/formatted.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# encoding: utf-8

require_relative "formatted/wrap"

require_relative "formatted/box"
Expand Down
2 changes: 2 additions & 0 deletions lib/prawn/text/formatted/wrap.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# encoding: utf-8

# wrap.rb: Handles text wrapping for for formatted text
#
# Contributed by Daniel Nelson
Expand Down
2 changes: 2 additions & 0 deletions spec/acceptance/png.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# encoding: utf-8

require_relative "../../lib/prawn"

images = [
Expand Down
2 changes: 2 additions & 0 deletions spec/extensions/encoding_helpers.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# encoding: utf-8

module EncodingHelpers
def win1252_string(str)
str.force_encoding(Encoding::Windows_1252)
Expand Down
2 changes: 2 additions & 0 deletions spec/extensions/mocha.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# encoding: utf-8

# Allow speccing things when an expectation matcher runs. Similar to #with, but
# always succeeds.
#
Expand Down
2 changes: 2 additions & 0 deletions spec/measurement_units_spec.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# encoding: utf-8

require File.join(File.expand_path(File.dirname(__FILE__)), "spec_helper")
require "prawn/measurement_extensions"

Expand Down
2 changes: 1 addition & 1 deletion spec/png_spec.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# encoding: ASCII-8BIT
# encoding: utf-8

# Spec'ing the PNG class. Not complete yet - still needs to check the
# contents of palette and transparency to ensure they're correct.
Expand Down
2 changes: 2 additions & 0 deletions spec/repeater_spec.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# encoding: utf-8

require File.join(File.expand_path(File.dirname(__FILE__)), "spec_helper")

describe "Repeaters" do
Expand Down
2 changes: 2 additions & 0 deletions spec/soft_mask_spec.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# encoding: utf-8

require File.join(File.expand_path(File.dirname(__FILE__)), "spec_helper")

module SoftMaskHelper
Expand Down
2 changes: 2 additions & 0 deletions spec/stamp_spec.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# encoding: utf-8

require File.join(File.expand_path(File.dirname(__FILE__)), "spec_helper")

describe "create_stamp before any page is added" do
Expand Down
2 changes: 2 additions & 0 deletions spec/transparency_spec.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# encoding: utf-8

require File.join(File.expand_path(File.dirname(__FILE__)), "spec_helper")

module TransparencyHelper
Expand Down

0 comments on commit 88354b9

Please sign in to comment.