pinas 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +29 -2
- data/lib/pinas/version.rb +1 -1
- data/pinas.gemspec +0 -1
- metadata +1 -15
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA1:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 1f24f640235536f7258f55f26ad505de4e2117fb
         | 
| 4 | 
            +
              data.tar.gz: b0898fc6b0e79a1053b7d5afc5d57bebee24cf2f
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 7873da1d3510f07b848eaf49266e62025505b702206dfbc007e0415357664bb28e58adc97dbcf156ae6a73c63a0f9e8687f5bd37a0ffc2e04bc9270155757420
         | 
| 7 | 
            +
              data.tar.gz: 61cd6598a685226c400186ffc324a7aa460a6916c3208b86bba46226cd1e2b2d88507cae201d1b88286ed65181b8b1f11c3b357f6816fa0aef6b2a36858d30d1
         | 
    
        data/README.md
    CHANGED
    
    | @@ -1,6 +1,6 @@ | |
| 1 1 | 
             
            # Pinas
         | 
| 2 2 |  | 
| 3 | 
            -
            This gem provides  | 
| 3 | 
            +
            This gem provides hierarchical listing of Philippine location. 
         | 
| 4 4 |  | 
| 5 5 | 
             
            ## Installation
         | 
| 6 6 |  | 
| @@ -16,7 +16,7 @@ Or install it yourself as: | |
| 16 16 |  | 
| 17 17 | 
             
                $ gem install pinas
         | 
| 18 18 |  | 
| 19 | 
            -
            ##  | 
| 19 | 
            +
            ## Setup
         | 
| 20 20 |  | 
| 21 21 | 
             
                $ rails g pinas:install
         | 
| 22 22 |  | 
| @@ -24,6 +24,33 @@ Or install it yourself as: | |
| 24 24 |  | 
| 25 25 | 
             
                $ rake pinas:load_data
         | 
| 26 26 |  | 
| 27 | 
            +
            ## Usage/Sample
         | 
| 28 | 
            +
             | 
| 29 | 
            +
            The gem provides ActiveRecord model `Pinas::Location` in 4 levels of locations
         | 
| 30 | 
            +
             | 
| 31 | 
            +
                $ # All regions
         | 
| 32 | 
            +
                $ Pinas::Location.regions
         | 
| 33 | 
            +
             | 
| 34 | 
            +
                $ # All provinces
         | 
| 35 | 
            +
                $ Pinas::Location.provinces
         | 
| 36 | 
            +
             | 
| 37 | 
            +
                $ # All towns
         | 
| 38 | 
            +
                $ Pinas::Location.towns
         | 
| 39 | 
            +
             | 
| 40 | 
            +
                $ # All barangays
         | 
| 41 | 
            +
                $ Pinas::Location.barangays
         | 
| 42 | 
            +
             | 
| 43 | 
            +
            Or you can get sub locations
         | 
| 44 | 
            +
                $ # get single location
         | 
| 45 | 
            +
                $ batangas_province = Pinas::Location.where(name: 'BATANGAS').first # returns Batangas Province
         | 
| 46 | 
            +
                
         | 
| 47 | 
            +
                $ # get all towns in Batangas
         | 
| 48 | 
            +
                $ towns = batangas_province.towns
         | 
| 49 | 
            +
             | 
| 50 | 
            +
            ## Caveats
         | 
| 51 | 
            +
             | 
| 52 | 
            +
            At the moment this gem supports Rails 4.x using Mysql database
         | 
| 53 | 
            +
             | 
| 27 54 |  | 
| 28 55 | 
             
            ## Contributing
         | 
| 29 56 |  | 
    
        data/lib/pinas/version.rb
    CHANGED
    
    
    
        data/pinas.gemspec
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: pinas
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 0.1. | 
| 4 | 
            +
              version: 0.1.1
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Allan Andal
         | 
| @@ -100,20 +100,6 @@ dependencies: | |
| 100 100 | 
             
                - - ">="
         | 
| 101 101 | 
             
                  - !ruby/object:Gem::Version
         | 
| 102 102 | 
             
                    version: '0'
         | 
| 103 | 
            -
            - !ruby/object:Gem::Dependency
         | 
| 104 | 
            -
              name: yaml_db
         | 
| 105 | 
            -
              requirement: !ruby/object:Gem::Requirement
         | 
| 106 | 
            -
                requirements:
         | 
| 107 | 
            -
                - - "~>"
         | 
| 108 | 
            -
                  - !ruby/object:Gem::Version
         | 
| 109 | 
            -
                    version: 0.3.0
         | 
| 110 | 
            -
              type: :development
         | 
| 111 | 
            -
              prerelease: false
         | 
| 112 | 
            -
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 113 | 
            -
                requirements:
         | 
| 114 | 
            -
                - - "~>"
         | 
| 115 | 
            -
                  - !ruby/object:Gem::Version
         | 
| 116 | 
            -
                    version: 0.3.0
         | 
| 117 103 | 
             
            description: ''
         | 
| 118 104 | 
             
            email:
         | 
| 119 105 | 
             
            - allan.andal@gmail.com
         |