Skip to content

Commit

Permalink
Changes main module back to PetrovichElixir
Browse files Browse the repository at this point in the history
 Changes:
 1. Updates docs
 2. Refactores all code to fit new standard
 3. Adds new file `petrovich.ex`
  • Loading branch information
sobolevn committed Jun 17, 2017
1 parent a60be9b commit 42b01d4
Show file tree
Hide file tree
Showing 9 changed files with 27 additions and 21 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# petrovic_elixir

[![Build Status](https://travis-ci.org/petrovich/petrovich_elixir.svg?branch=master)](https://travis-ci.org/petrovich/petrovich_elixir)[![Coverage Status](https://coveralls.io/repos/github/petrovich/petrovich_elixir/badge.svg?branch=master)](https://coveralls.io/github/petrovich/petrovich_elixir?branch=master)[![petrovich](https://camo.githubusercontent.com/4555ec1b7aa15e0cd22f8ff619c965da0596399a/68747470733a2f2f7261772e6769746875622e636f6d2f726f637363692f706574726f766963682f6d61737465722f706574726f766963682e706e67)](https://github.com/petrovich/petrovich_elixir)
[![petrovich](https://camo.githubusercontent.com/4555ec1b7aa15e0cd22f8ff619c965da0596399a/68747470733a2f2f7261772e6769746875622e636f6d2f726f637363692f706574726f766963682f6d61737465722f706574726f766963682e706e67)](https://github.com/petrovich/petrovich_elixir)

[![Hex Version](https://img.shields.io/hexpm/v/petrovich_elixir.svg)](https://hex.pm/packages/petrovich_elixir) [![License](http://img.shields.io/badge/license-MIT-brightgreen.svg)](http://opensource.org/licenses/MIT)
[![Build Status](https://travis-ci.org/petrovich/petrovich_elixir.svg?branch=master)](https://travis-ci.org/petrovich/petrovich_elixir)[![Coverage Status](https://coveralls.io/repos/github/petrovich/petrovich_elixir/badge.svg?branch=master)](https://coveralls.io/github/petrovich/petrovich_elixir?branch=master)[![Hex Version](https://img.shields.io/hexpm/v/petrovich_elixir.svg)](https://hex.pm/packages/petrovich_elixir) [![License](http://img.shields.io/badge/license-MIT-brightgreen.svg)](http://opensource.org/licenses/MIT)

Elixir library to inflect Russian first, last, and middle names.

Expand All @@ -29,6 +29,8 @@ You need to understand how [grammatical cases](https://en.wikipedia.org/wiki/Gra
### API

```elixir
alias PetrovichElixir.Petrovich

Petrovich.firstname("Александр", :accusative, :male)
# => Александра

Expand Down
2 changes: 1 addition & 1 deletion mix.exs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
defmodule Petrovich.Mixfile do
defmodule PetrovichElixir.Mixfile do
use Mix.Project

@version "0.0.1"
Expand Down
8 changes: 5 additions & 3 deletions test/petrovich_elixir_test/config_test.exs
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
defmodule PetrovichTest.ConfigTest do
defmodule PetrovichElixirTest.ConfigTest do
use ExUnit.Case

alias PetrovichElixir.Config

test "config can read regular config values" do
Application.put_env(:petrovich_elixir, :test_var, "test")

assert Petrovich.Config.get_env(:petrovich_elixir, :test_var) == "test"
assert Config.get_env(:petrovich_elixir, :test_var) == "test"
end

test "config can read environment variables" do
Expand All @@ -14,7 +16,7 @@ defmodule PetrovichTest.ConfigTest do
:test_env_var,
{:system, "TEST_VAR"})

assert Petrovich.Config.get_env(
assert Config.get_env(
:petrovich_elixir, :test_env_var) == "test_env_vars"
end
end
8 changes: 4 additions & 4 deletions test/petrovich_elixir_test/parser_test/firstname_test.exs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
defmodule PetrovichTest.ParserTest.FirstName.Normal do
defmodule PetrovichElixirTest.ParserTest.FirstName.Normal do
use ExUnit.Case

alias Petrovich.Parser
alias PetrovichElixir.Parser

setup do
values = %{
Expand Down Expand Up @@ -76,10 +76,10 @@ defmodule PetrovichTest.ParserTest.FirstName.Normal do
end


defmodule PetrovichTest.ParserTest.FirstName.Exception do
defmodule PetrovichElixir.ParserTest.FirstName.Exception do
use ExUnit.Case

alias Petrovich.Parser
alias PetrovichElixir.Parser

setup do
values = %{
Expand Down
8 changes: 4 additions & 4 deletions test/petrovich_elixir_test/parser_test/lastname_test.exs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
defmodule PetrovichTest.ParserTest.LastName.Normal do
defmodule PetrovichElixirTest.ParserTest.LastName.Normal do
use ExUnit.Case

alias Petrovich.Parser
alias PetrovichElixir.Parser

setup do
values = %{
Expand Down Expand Up @@ -77,10 +77,10 @@ end



defmodule PetrovichTest.ParserTest.LastName.Multipart do
defmodule PetrovichElixirTest.ParserTest.LastName.Multipart do
use ExUnit.Case

alias Petrovich.Parser
alias PetrovichElixir.Parser

setup do
values = %{
Expand Down
4 changes: 2 additions & 2 deletions test/petrovich_elixir_test/parser_test/middlename_test.exs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
defmodule PetrovichTest.ParserTest.MiddleName.Normal do
defmodule PetrovichElixirTest.ParserTest.MiddleName.Normal do
use ExUnit.Case

alias Petrovich.Parser
alias PetrovichElixir.Parser

setup do
values = %{
Expand Down
4 changes: 3 additions & 1 deletion test/petrovich_elixir_test/public_api_test.exs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
defmodule PetrovichTest.PublicAPITest do
defmodule PetrovichElixirTest.PublicAPITest do
use ExUnit.Case

alias PetrovichElixir.Petrovich

test "public firstname function works" do
assert Petrovich.firstname(
"Александр", :accusative, :male) == "Александра"
Expand Down
4 changes: 2 additions & 2 deletions test/petrovich_elixir_test/stores_test/gender_store_test.exs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
defmodule PetrovichTest.GenderStoreTest do
defmodule PetrovichElixirTest.GenderStoreTest do
use ExUnit.Case

alias Petrovich.GenderStore
alias PetrovichElixir.GenderStore

setup do
{status, _pid} = GenderStore.start_link()
Expand Down
4 changes: 2 additions & 2 deletions test/petrovich_elixir_test/stores_test/name_store_test.exs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
defmodule PetrovichTest.NameStoreTest do
defmodule PetrovichElixirTest.NameStoreTest do
use ExUnit.Case

alias Petrovich.NameStore
alias PetrovichElixir.NameStore

setup do
{status, _pid} = NameStore.start_link()
Expand Down

0 comments on commit 42b01d4

Please sign in to comment.