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

Remove redundant encoding #1093

Open
wants to merge 1 commit into
base: main
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
2 changes: 0 additions & 2 deletions lib/money/currency.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# encoding: utf-8

require "json"
require "money/currency/loader"
require "money/currency/heuristics"
Expand Down
2 changes: 0 additions & 2 deletions lib/money/currency/heuristics.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# encoding: utf-8

class Money
class Currency
module Heuristics
Expand Down
1 change: 0 additions & 1 deletion lib/money/money.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# encoding: utf-8
require "money/bank/variable_exchange"
require "money/bank/single_currency"
require "money/money/arithmetic"
Expand Down
2 changes: 0 additions & 2 deletions lib/money/money/allocation.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# encoding: utf-8

class Money
class Allocation
# Splits a given amount in parts. The allocation is based on the parts' proportions
Expand Down
1 change: 0 additions & 1 deletion lib/money/money/formatter.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# encoding: UTF-8
require 'money/money/formatting_rules'

class Money
Expand Down
2 changes: 0 additions & 2 deletions lib/money/money/formatting_rules.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# encoding: UTF-8

class Money
class FormattingRules
def initialize(currency, *raw_rules)
Expand Down
2 changes: 0 additions & 2 deletions lib/money/money/locale_backend.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# encoding: UTF-8

require 'money/locale_backend/errors'
require 'money/locale_backend/legacy'
require 'money/locale_backend/i18n'
Expand Down
1 change: 0 additions & 1 deletion money.gemspec
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- encoding: utf-8 -*-
lib = File.expand_path('../lib', __FILE__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require "money/version"
Expand Down
2 changes: 0 additions & 2 deletions spec/currency/heuristics_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# encoding: utf-8

describe Money::Currency::Heuristics do
describe "#analyze_string" do
let(:it) { Money::Currency }
Expand Down
2 changes: 0 additions & 2 deletions spec/currency/loader_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# encoding: utf-8

describe Money::Currency::Loader do
it "returns a currency table hash" do
expect(subject.load_currencies).to be_a Hash
Expand Down
2 changes: 0 additions & 2 deletions spec/currency_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# encoding: utf-8

describe Money::Currency do
FOO = '{ "priority": 1, "iso_code": "FOO", "iso_numeric": "840", "name": "United States Dollar", "symbol": "$", "subunit": "Cent", "subunit_to_unit": 1000, "symbol_first": true, "html_entity": "$", "decimal_mark": ".", "thousands_separator": ",", "smallest_denomination": 1 }'

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

describe Money::LocaleBackend::Currency do
describe '#lookup' do
let(:currency) { Money::Currency.new('EUR') }
Expand Down
2 changes: 0 additions & 2 deletions spec/locale_backend/i18n_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# encoding: utf-8

describe Money::LocaleBackend::I18n do
describe '#initialize' do
it 'raises an error when I18n is not defined' do
Expand Down
2 changes: 0 additions & 2 deletions spec/locale_backend/legacy_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# encoding: utf-8

describe Money::LocaleBackend::Legacy do
after { Money.use_i18n = true }

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

describe Money::Allocation do
describe 'given number as argument' do
it 'raises an error when invalid argument is given' do
Expand Down
2 changes: 0 additions & 2 deletions spec/money/arithmetic_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# encoding: utf-8

describe Money::Arithmetic do
describe "-@" do
it "changes the sign of a number" do
Expand Down
2 changes: 0 additions & 2 deletions spec/money/constructors_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# encoding: utf-8

describe Money::Constructors do

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

describe Money::FormattingRules do
it 'does not modify frozen rules in place' do
expect {
Expand Down
2 changes: 0 additions & 2 deletions spec/money/formatting_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# encoding: utf-8

describe Money, "formatting" do

BAR = '{ "priority": 1, "iso_code": "BAR", "iso_numeric": "840", "name": "Dollar with 4 decimal places", "symbol": "$", "subunit": "Cent", "subunit_to_unit": 10000, "symbol_first": true, "html_entity": "$", "decimal_mark": ".", "thousands_separator": ",", "smallest_denomination": 1 }'
Expand Down
2 changes: 0 additions & 2 deletions spec/money/locale_backend_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# encoding: utf-8

describe Money::LocaleBackend do
describe '.find' do
it 'returns an initialized backend' do
Expand Down
2 changes: 0 additions & 2 deletions spec/money_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# encoding: utf-8

describe Money do
describe '.locale_backend' do
after { Money.locale_backend = :legacy }
Expand Down