-
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.
* add `rubocop` and `rubocop-rspec` dependencies to gemspec file. * add `.rubocop.yml` config file * fix all offenses reported
- Loading branch information
Showing
7 changed files
with
37 additions
and
20 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,11 @@ | ||
require: rubocop-rspec | ||
|
||
Metrics/LineLength: | ||
Max: 100 | ||
|
||
Style/BlockComments: | ||
Exclude: | ||
- 'spec/spec_helper.rb' | ||
|
||
Layout/EndOfLine: | ||
EnforcedStyle: lf # enforce LF line endings on all platforms |
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 |
---|---|---|
|
@@ -3,19 +3,21 @@ Gem::Specification.new do |spec| | |
spec.version = '0.0.3' | ||
spec.authors = ['Claudio Bley'] | ||
spec.email = ['[email protected]'] | ||
spec.summary = "A Ruby gem that wraps C locale functions." | ||
spec.summary = 'A Ruby gem that wraps C locale functions.' | ||
spec.homepage = 'https://github.com/avdv/clocale' | ||
spec.license = 'MIT' | ||
|
||
spec.extensions = %w[ext/clocale/extconf.rb] | ||
|
||
spec.files = `git ls-files -z`.split("\x0").reject do |f| | ||
f.match(%r{^.gitignore}) | ||
f.match(/^.gitignore/) | ||
end | ||
|
||
spec.add_development_dependency 'codecov', '~> 0.1.10' | ||
spec.add_development_dependency 'rake', '~> 12.3' | ||
spec.add_development_dependency 'rake-compiler', '~> 1.0' | ||
spec.add_development_dependency 'rspec', '~> 3.7' | ||
spec.add_development_dependency 'rubocop', '~> 0.58' | ||
spec.add_development_dependency 'rubocop-rspec', '~> 1.27' | ||
spec.add_development_dependency 'rubygems-tasks', '~> 0.2' | ||
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
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,2 +1 @@ | ||
|
||
require 'clocale/clocale' |
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,17 @@ | ||
require 'clocale' | ||
|
||
RSpec.describe CLocale do | ||
%i[LC_ALL LC_COLLATE LC_CTYPE LC_MONETARY LC_NUMERIC LC_TIME].each do |const| | ||
it "has #{const} constant" do | ||
is_expected.to(satisfy { |m| m.const_defined? const }) | ||
end | ||
end | ||
|
||
it 'can call setlocale' do | ||
expect { described_class.setlocale(CLocale::LC_ALL, '') }.not_to raise_error | ||
end | ||
|
||
it 'raises an error with invalid locales' do | ||
expect { described_class.setlocale(CLocale::LC_COLLATE, 'FOOBAR') }.to raise_error(RuntimeError) | ||
end | ||
end |
This file was deleted.
Oops, something went wrong.