gitmodel-rails 0.1.1 → 0.1.3
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.
- data/VERSION +1 -1
- data/gitmodel-rails.gemspec +1 -1
- data/lib/gitmodel-rails.rb +13 -15
- metadata +2 -2
    
        data/VERSION
    CHANGED
    
    | @@ -1 +1 @@ | |
| 1 | 
            -
            0.1. | 
| 1 | 
            +
            0.1.3
         | 
    
        data/gitmodel-rails.gemspec
    CHANGED
    
    
    
        data/lib/gitmodel-rails.rb
    CHANGED
    
    | @@ -7,23 +7,21 @@ module GitmodelRails | |
| 7 7 |  | 
| 8 8 | 
             
                  gitmodel_config_file = Rails.root.join("config", "gitmodel.yml")
         | 
| 9 9 |  | 
| 10 | 
            -
                   | 
| 11 | 
            -
                     | 
| 12 | 
            -
             | 
| 13 | 
            -
             | 
| 14 | 
            -
             | 
| 15 | 
            -
             | 
| 16 | 
            -
             | 
| 17 | 
            -
             | 
| 18 | 
            -
             | 
| 19 | 
            -
                  GitModel.git_user_email = gitmodel_config.fetch("gitmodel", nil).try(:fetch, "git_user_email", GitModel.git_user_email)
         | 
| 20 | 
            -
                  GitModel.memcache_servers   = Array.wrap gitmodel_config.fetch("gitmodel", nil).try(:fetch, "memcache_servers", nil)
         | 
| 21 | 
            -
                  GitModel.memcache_namespace = gitmodel_config.fetch("gitmodel", nil).try(:fetch, "memcache_namespace", GitModel.git_user_email)
         | 
| 10 | 
            +
                  if File.exist?(gitmodel_config_file)     
         | 
| 11 | 
            +
                    gitmodel_config         = YAML.load_file(gitmodel_config_file)
         | 
| 12 | 
            +
                    gitmodel_config         = gitmodel_config.is_a?(Hash) ? gitmodel_config : {}
         | 
| 13 | 
            +
                    GitModel.db_root        = gitmodel_config.fetch("gitmodel", nil).try(:fetch, "db_root", GitModel.db_root)
         | 
| 14 | 
            +
                    GitModel.default_branch = gitmodel_config.fetch("gitmodel", nil).try(:fetch, "default_branch", GitModel.default_branch)
         | 
| 15 | 
            +
                    GitModel.git_user_name  = gitmodel_config.fetch("gitmodel", nil).try(:fetch, "git_user_name", GitModel.git_user_name)
         | 
| 16 | 
            +
                    GitModel.git_user_email = gitmodel_config.fetch("gitmodel", nil).try(:fetch, "git_user_email", GitModel.git_user_email)
         | 
| 17 | 
            +
                    GitModel.memcache_servers   = Array.wrap gitmodel_config.fetch("gitmodel", nil).try(:fetch, "memcache_servers", nil)
         | 
| 18 | 
            +
                    GitModel.memcache_namespace = gitmodel_config.fetch("gitmodel", nil).try(:fetch, "memcache_namespace", GitModel.git_user_email)
         | 
| 22 19 |  | 
| 23 | 
            -
             | 
| 20 | 
            +
                    GitModel.db_root        = Rails.root.join(GitModel.db_root)
         | 
| 24 21 |  | 
| 25 | 
            -
             | 
| 26 | 
            -
             | 
| 22 | 
            +
                    unless File.exist?(GitModel.db_root)
         | 
| 23 | 
            +
                      GitModel.create_db!
         | 
| 24 | 
            +
                    end
         | 
| 27 25 | 
             
                  end
         | 
| 28 26 |  | 
| 29 27 | 
             
                end
         | 
    
        metadata
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: gitmodel-rails
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 0.1. | 
| 4 | 
            +
              version: 0.1.3
         | 
| 5 5 | 
             
              prerelease: 
         | 
| 6 6 | 
             
            platform: ruby
         | 
| 7 7 | 
             
            authors:
         | 
| @@ -110,7 +110,7 @@ required_ruby_version: !ruby/object:Gem::Requirement | |
| 110 110 | 
             
                  version: '0'
         | 
| 111 111 | 
             
                  segments:
         | 
| 112 112 | 
             
                  - 0
         | 
| 113 | 
            -
                  hash:  | 
| 113 | 
            +
                  hash: -3965994780301818265
         | 
| 114 114 | 
             
            required_rubygems_version: !ruby/object:Gem::Requirement
         | 
| 115 115 | 
             
              none: false
         | 
| 116 116 | 
             
              requirements:
         |