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

Add Faker::Military #1283

Merged
merged 2 commits into from
Jun 13, 2018
Merged

Add Faker::Military #1283

merged 2 commits into from
Jun 13, 2018

Conversation

jjasghar
Copy link

Added US military ranks for Army, Navy, Air Force, and Marines. Also the
DOD Pay scale.

Signed-off-by: JJ Asghar jj@chef.io

doc/military.md Outdated

Faker::Military.us_air_force_rank #=> "Captain"

Faker::Military.us_dod_paygrade #=> "E-6"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd recommend dropping the us_ because it would help us in our future locale contributions. I mean if we decide to move on with these methods, we'd need to create a chilean_army_rank, brazilian_army_rank, spanish_army_rank and so on. I'd prefer to have only army_rank + the locales behind the scenes.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah cool, yeah my thought was that we could have the chilean_army_rank in the en.yml. No worries I'll make the changes now.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have a few methods in other objects that are named as nationality_ but they involve algorithms to calculate ID numbers or SSN for example. Those methods are a bit particular, that's why we categorize and isolate them. In your case I think we just need the translations. Just like Faker::Name.first_name.

@@ -0,0 +1,27 @@
require File.expand_path(File.dirname(__FILE__) + '/test_helper.rb')

class TestFakerMilitary < Test::Unit::TestCase
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -0,0 +1,13 @@
# Faker::Military

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please add something like It might be available in the next version just like I did here?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done.

@vbrazo vbrazo changed the title Added US Military ranks Add Faker::Military Jun 13, 2018

def us_dod_paygrade
fetch('military.us_dod_paygrade')
end
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Travis is crashing because you still need to rename a few things in this file @jjasghar

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

opps! Fixing.

JJ Asghar and others added 2 commits June 13, 2018 16:26
Added US military ranks for Army, Navy, Air Force, and Marines. Also the
DOD Pay scale.

Signed-off-by: JJ Asghar <jj@chef.io>
Copy link
Member

@vbrazo vbrazo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for contributing 💯 and welcome!

@vbrazo vbrazo merged commit a7c03e6 into faker-ruby:master Jun 13, 2018
@jjasghar jjasghar deleted the jjasghar/military_ranks branch June 14, 2018 00:10
@vbrazo vbrazo self-requested a review July 19, 2018 01:21
davidmorton0 pushed a commit to davidmorton0/faker that referenced this pull request Jul 12, 2021
* Added US Military ranks

Added US military ranks for Army, Navy, Air Force, and Marines. Also the
DOD Pay scale.

Signed-off-by: JJ Asghar <jj@chef.io>

* Update CHANGELOG.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants