angular-semver-sort-rails 0.2.0 → 0.2.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
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA1:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: f19ff08ea6079d45d902ea5412ee46ae70c0b0ff
         | 
| 4 | 
            +
              data.tar.gz: b7b23180f51facc97d9855e1736e6ed2eb4cd16b
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 046a37f58f9a6fd44545c16a42822ab2d269c80306f542de0cdb5a42c8dae60fe112565a3a25439a853204b984b907367276d81becee040a2c722942d2389f4d
         | 
| 7 | 
            +
              data.tar.gz: 837336e707ec28f51e8c1393442fa1f4a1df2ab501d68f672a41cd171057789b8088f3e9288a5a9aa5e4316bc67a40295386c354d298c977830b4e5dc427eda4
         | 
| @@ -7,11 +7,11 @@ Gem::Specification.new do |spec| | |
| 7 7 | 
             
              # This is the only reason why this asset gem was created.
         | 
| 8 8 |  | 
| 9 9 | 
             
              spec.name          = 'angular-semver-sort-rails'
         | 
| 10 | 
            -
              spec.version       = '0.2. | 
| 10 | 
            +
              spec.version       = '0.2.1'
         | 
| 11 11 | 
             
              spec.authors       = ['Dominik Porada']
         | 
| 12 12 | 
             
              spec.email         = ['dominik@porada.co']
         | 
| 13 13 | 
             
              spec.summary       = 'angular-semver-sort packaged for Rails assets pipeline'
         | 
| 14 | 
            -
              spec.homepage      = 'https://github.com/ | 
| 14 | 
            +
              spec.homepage      = 'https://github.com/rails-assets/angular-semver-sort'
         | 
| 15 15 | 
             
              spec.license       = 'BSD'
         | 
| 16 16 | 
             
              spec.files         = `git ls-files`.split($/)
         | 
| 17 17 | 
             
              spec.require_paths = ['lib']
         | 
| @@ -1,5 +1,5 @@ | |
| 1 1 | 
             
            /*!
         | 
| 2 | 
            -
              angular-semver-sort v0.2. | 
| 2 | 
            +
              angular-semver-sort v0.2.1 <http://git.io/angular-semver>
         | 
| 3 3 | 
             
              @includes <http://git.io/semver> by Isaac Z. Schlueter
         | 
| 4 4 | 
             
              @license BSD
         | 
| 5 5 | 
             
            */
         | 
| @@ -253,6 +253,8 @@ function SemVer(version, loose) { | |
| 253 253 | 
             
                  return version;
         | 
| 254 254 | 
             
                else
         | 
| 255 255 | 
             
                  version = version.version;
         | 
| 256 | 
            +
              } else if (typeof version !== 'string') {
         | 
| 257 | 
            +
                throw new TypeError('Invalid Version: ' + version);
         | 
| 256 258 | 
             
              }
         | 
| 257 259 |  | 
| 258 260 | 
             
              if (!(this instanceof SemVer))
         | 
| @@ -325,7 +327,7 @@ SemVer.prototype.comparePre = function(other) { | |
| 325 327 | 
             
                return -1;
         | 
| 326 328 | 
             
              else if (!this.prerelease.length && other.prerelease.length)
         | 
| 327 329 | 
             
                return 1;
         | 
| 328 | 
            -
              else if (!this.prerelease. | 
| 330 | 
            +
              else if (!this.prerelease.length && !other.prerelease.length)
         | 
| 329 331 | 
             
                return 0;
         | 
| 330 332 |  | 
| 331 333 | 
             
              var i = 0;
         | 
| @@ -346,19 +348,49 @@ SemVer.prototype.comparePre = function(other) { | |
| 346 348 | 
             
              } while (++i);
         | 
| 347 349 | 
             
            };
         | 
| 348 350 |  | 
| 351 | 
            +
            // preminor will bump the version up to the next minor release, and immediately
         | 
| 352 | 
            +
            // down to pre-release. premajor and prepatch work the same way.
         | 
| 349 353 | 
             
            SemVer.prototype.inc = function(release) {
         | 
| 350 354 | 
             
              switch (release) {
         | 
| 355 | 
            +
                case 'premajor':
         | 
| 356 | 
            +
                  this.inc('major');
         | 
| 357 | 
            +
                  this.inc('pre');
         | 
| 358 | 
            +
                  break;
         | 
| 359 | 
            +
                case 'preminor':
         | 
| 360 | 
            +
                  this.inc('minor');
         | 
| 361 | 
            +
                  this.inc('pre');
         | 
| 362 | 
            +
                  break;
         | 
| 363 | 
            +
                case 'prepatch':
         | 
| 364 | 
            +
                  this.inc('patch');
         | 
| 365 | 
            +
                  this.inc('pre');
         | 
| 366 | 
            +
                  break;
         | 
| 367 | 
            +
                // If the input is a non-prerelease version, this acts the same as
         | 
| 368 | 
            +
                // prepatch.
         | 
| 369 | 
            +
                case 'prerelease':
         | 
| 370 | 
            +
                  if (this.prerelease.length === 0)
         | 
| 371 | 
            +
                    this.inc('patch');
         | 
| 372 | 
            +
                  this.inc('pre');
         | 
| 373 | 
            +
                  break;
         | 
| 351 374 | 
             
                case 'major':
         | 
| 352 375 | 
             
                  this.major++;
         | 
| 353 376 | 
             
                  this.minor = -1;
         | 
| 354 377 | 
             
                case 'minor':
         | 
| 355 378 | 
             
                  this.minor++;
         | 
| 356 | 
            -
                  this.patch =  | 
| 379 | 
            +
                  this.patch = 0;
         | 
| 380 | 
            +
                  this.prerelease = [];
         | 
| 381 | 
            +
                  break;
         | 
| 357 382 | 
             
                case 'patch':
         | 
| 358 | 
            -
                  this. | 
| 383 | 
            +
                  // If this is not a pre-release version, it will increment the patch.
         | 
| 384 | 
            +
                  // If it is a pre-release it will bump up to the same patch version.
         | 
| 385 | 
            +
                  // 1.2.0-5 patches to 1.2.0
         | 
| 386 | 
            +
                  // 1.2.0 patches to 1.2.1
         | 
| 387 | 
            +
                  if (this.prerelease.length === 0)
         | 
| 388 | 
            +
                    this.patch++;
         | 
| 359 389 | 
             
                  this.prerelease = [];
         | 
| 360 390 | 
             
                  break;
         | 
| 361 | 
            -
                 | 
| 391 | 
            +
                // This probably shouldn't be used publically.
         | 
| 392 | 
            +
                // 1.0.0 "pre" would become 1.0.0-0 which is the wrong direction.
         | 
| 393 | 
            +
                case 'pre':
         | 
| 362 394 | 
             
                  if (this.prerelease.length === 0)
         | 
| 363 395 | 
             
                    this.prerelease = [0];
         | 
| 364 396 | 
             
                  else {
         | 
    
        metadata
    CHANGED
    
    | @@ -1,14 +1,14 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: angular-semver-sort-rails
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 0.2. | 
| 4 | 
            +
              version: 0.2.1
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Dominik Porada
         | 
| 8 8 | 
             
            autorequire: 
         | 
| 9 9 | 
             
            bindir: bin
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date: 2014- | 
| 11 | 
            +
            date: 2014-05-22 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: bundler
         | 
| @@ -51,7 +51,7 @@ files: | |
| 51 51 | 
             
            - angular-semver-sort-rails.gemspec
         | 
| 52 52 | 
             
            - lib/angular-semver-sort-rails.rb
         | 
| 53 53 | 
             
            - vendor/assets/javascripts/angular-semver-sort.js
         | 
| 54 | 
            -
            homepage: https://github.com/ | 
| 54 | 
            +
            homepage: https://github.com/rails-assets/angular-semver-sort
         | 
| 55 55 | 
             
            licenses:
         | 
| 56 56 | 
             
            - BSD
         | 
| 57 57 | 
             
            metadata: {}
         |