Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sundi3yansyah/indonesian-territory-rails
Indonesian Territory for Rails
https://github.com/sundi3yansyah/indonesian-territory-rails
indonesia indonesian rails ruby ruby-on-rails territory
Last synced: about 1 month ago
JSON representation
Indonesian Territory for Rails
- Host: GitHub
- URL: https://github.com/sundi3yansyah/indonesian-territory-rails
- Owner: SunDi3yansyah
- License: mit
- Created: 2016-12-14T19:26:37.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2020-03-06T12:53:05.000Z (over 4 years ago)
- Last Synced: 2024-04-26T08:04:22.261Z (7 months ago)
- Topics: indonesia, indonesian, rails, ruby, ruby-on-rails, territory
- Language: TSQL
- Homepage: https://www.rubydoc.info/github/SunDi3yansyah/indonesian-territory-rails
- Size: 3.29 MB
- Stars: 8
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Indonesian Territory for Rails
Indonesian Territory for Rails
[![Build Status](https://travis-ci.org/SunDi3yansyah/indonesian-territory-rails.svg)](https://travis-ci.org/SunDi3yansyah/indonesian-territory-rails)
[![License](https://img.shields.io/github/license/SunDi3yansyah/indonesian-territory-rails.svg)](LICENSE)
[![Gem Version](https://badge.fury.io/rb/indonesian-territory-rails.svg)](https://badge.fury.io/rb/indonesian-territory-rails)
[![Download total](https://img.shields.io/gem/dt/indonesian-territory-rails.svg?style=flat)](https://badge.fury.io/rb/indonesian-territory-rails)
[![GitHub last commit](https://img.shields.io/github/last-commit/SunDi3yansyah/indonesian-territory-rails.svg)](https://github.com/SunDi3yansyah/indonesian-territory-rails/commits/master)
[![GitHub issues](https://img.shields.io/github/issues/SunDi3yansyah/indonesian-territory-rails.svg)](https://github.com/SunDi3yansyah/indonesian-territory-rails/issues)## Installation
Add this line to your application's Gemfile:
```ruby
gem 'indonesian-territory-rails'
```And then execute:
```bash
$ bundle
```Or install it yourself as:
```bash
$ gem install indonesian-territory-rails
```## Usage
#### Install Migration
Copy for schema migration:
```bash
$ rails g indonesian_territory:migration install
```#### Migration
Migration database for data Indonesian Territory:
```bash
$ rails db:migrate
```#### Seed
##### Ruby
Run seeding data Indonesian Territory use ruby method (this takes a very long time):
```bash
$ rails db:seed:indonesian_territory_ruby
```##### SQL
Run seeding data Indonesian Territory use sql method (not not so bad, not as long as the ruby method above):
```bash
$ rails db:seed:indonesian_territory_sql
```##### CSV
Run seeding data Indonesian Territory use csv method (not not so bad, not as long as the ruby method above):
```bash
$ rails db:seed:indonesian_territory_csv
```#### Try Rails Console
Run Rails console:
```bash
$ rails c
```Enter console to get data from the Province:
```console
irb(main):001:0> Province.all
```Output:
```
=> #, #, #, #, #, #, #, #, #, #, ...]>
```#### Override Class Model
If you want to modify the model, please overwrite it by entering the generate command below:
```bash
$ rails g indonesian_territory:model
```## Development
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
## Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/SunDi3yansyah/indonesian-territory-rails. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
## License
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
## Code of Conduct
Everyone interacting in the Indonesian::Territory::Rails project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/indonesian-territory-rails/blob/master/CODE_OF_CONDUCT.md).