-
Notifications
You must be signed in to change notification settings - Fork 8
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 #16 from infiton/v1.2
V1.2
- Loading branch information
Showing
13 changed files
with
340 additions
and
144 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 |
---|---|---|
@@ -1,2 +1,3 @@ | ||
*.gem | ||
pkg | ||
Gemfile.lock |
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,2 @@ | ||
inherit_gem: | ||
rubocop-shopify: rubocop.yml |
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,3 +1,5 @@ | ||
source 'https://rubygems.org' | ||
# frozen_string_literal: true | ||
|
||
gemspec | ||
source "https://rubygems.org" | ||
|
||
gemspec |
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,9 +1,11 @@ | ||
require 'bundler/gem_tasks' | ||
require 'rake/testtask' | ||
# frozen_string_literal: true | ||
|
||
require "bundler/gem_tasks" | ||
require "rake/testtask" | ||
|
||
Rake::TestTask.new(:test) do |test| | ||
test.pattern = 'test/test_*.rb' | ||
test.pattern = "test/test_*.rb" | ||
end | ||
|
||
desc "Run tests" | ||
task :default => :test | ||
task default: :test |
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,20 +1,22 @@ | ||
# -*- encoding: utf-8 -*- | ||
require File.expand_path('../lib/capitalize_names/version', __FILE__) | ||
# frozen_string_literal: true | ||
|
||
require File.expand_path("../lib/capitalize_names/version", __FILE__) | ||
|
||
Gem::Specification.new do |s| | ||
s.name = 'capitalize-names' | ||
s.name = "capitalize-names" | ||
s.version = CapitalizeNames::VERSION | ||
s.date = '2017-09-20' | ||
s.summary = 'Capitalizes names; handles edge cases.' | ||
s.description = 'A simple gem to capitalize names, based off of: http://dzone.com/snippets/capitalize-proper-names' | ||
s.authors = ['Kyle Tate'] | ||
s.email = '[email protected]' | ||
s.summary = "Capitalizes names; handles edge cases." | ||
s.description = "A simple gem to capitalize names, based off of: http://dzone.com/snippets/capitalize-proper-names" | ||
s.authors = ["Kyle Tate"] | ||
s.email = "[email protected]" | ||
s.files = Dir.glob("{lib}/**/*") | ||
|
||
s.required_ruby_version = '> 2.0' | ||
s.add_runtime_dependency "activesupport", [">= 3"] | ||
s.add_development_dependency 'rake' | ||
s.add_development_dependency 'minitest' | ||
s.homepage = 'http://github.com/infiton/capitalize-names' | ||
s.license = 'MIT' | ||
s.required_ruby_version = ">= 2.4" | ||
s.add_development_dependency("minitest") | ||
s.add_development_dependency("rake") | ||
s.add_development_dependency("rubocop") | ||
s.add_development_dependency("rubocop-shopify") | ||
s.homepage = "http://github.com/infiton/capitalize-names" | ||
s.license = "MIT" | ||
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,20 +1,19 @@ | ||
#based on http://dzone.com/snippets/capitalize-proper-names | ||
require 'capitalize_names/errors' | ||
require 'capitalize_names/capitalizer' | ||
require 'capitalize_names/suffixes' | ||
require 'capitalize_names/surnames' | ||
require 'active_support/core_ext/string/multibyte' | ||
# frozen_string_literal: true | ||
|
||
module CapitalizeNames | ||
# originally based on http://dzone.com/snippets/capitalize-proper-names | ||
require "capitalize_names/errors" | ||
require "capitalize_names/suffixes" | ||
require "capitalize_names/surnames" | ||
require "capitalize_names/capitalizer" | ||
|
||
module CapitalizeNames | ||
class << self | ||
|
||
def capitalize!(name) | ||
Capitalizer.new(name).capitalize! | ||
def capitalize!(name, options = {}) | ||
Capitalizer.new(name, options).capitalize! | ||
end | ||
|
||
def capitalize(name) | ||
Capitalizer.new(name).capitalize | ||
def capitalize(name, options = {}) | ||
Capitalizer.new(name, options).capitalize | ||
end | ||
end | ||
end | ||
end |
Oops, something went wrong.