liferaft 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 726bdd18f87db3ca713d640a46abee6202f638d5
4
- data.tar.gz: e4c6ff1d08f7560637cf497c4ea21b0bd2fb9f52
3
+ metadata.gz: 7326123507d7f8865f08559e3b30e8fbb8b7ed74
4
+ data.tar.gz: 1e27c01b8edeb60f87d8df604645b2d7ecfd990a
5
5
  SHA512:
6
- metadata.gz: f1635a9a3f360ab6ab4c5ee845fc5a6e4b6c9f311b85f753ef0843035b67d47ba9deaaf70efd6c9fd7a45a66e95652680b8f31c05e976266e5c1bf982324e046
7
- data.tar.gz: 3711a70f0a690ba8a5469aade643ad11ee2bb6fc16ddd20a81c9e8b42ec7d7ac1f8706ad8b54578fc773641e2572d03bdd354d5c082c9f956226eef8faf437df
6
+ metadata.gz: cc7a98f75072cb4541a4c04642e559c289bf28eb44586c5bed6b1ee4471a1c09739cfd59191b0b9d700afd7831d0592114398c6f853a3027a40f4ef3aa48704b
7
+ data.tar.gz: f9640d871571aab359dbefcf73892c6ebc2ade105d045f123e516b6ac5f0ffffe4abbb8f5b04ec02bd54814196c2966595fcca4956286bdd319f753db9535767
data/Rakefile CHANGED
@@ -1,7 +1,8 @@
1
1
  require 'bundler/gem_tasks'
2
2
 
3
3
  def specs(dir)
4
- FileList["spec/#{dir}/*_spec.rb"].sample
4
+ list = FileList["spec/#{dir}/*_spec.rb"]
5
+ list.sample(list.count).join(' ')
5
6
  end
6
7
 
7
8
  desc 'Runs all the specs'
@@ -1,3 +1,3 @@
1
1
  module Liferaft
2
- VERSION = '0.0.1'
2
+ VERSION = '0.0.2'
3
3
  end
@@ -16,5 +16,22 @@ module Liferaft
16
16
  @patch = components[1].to_i / 1000
17
17
  @build = components[1].to_i % 1000
18
18
  end
19
+
20
+ def >(other)
21
+ other < self
22
+ end
23
+
24
+ def <(other)
25
+ return true if major < other.major
26
+ return true if minor < other.minor
27
+ return true if patch < other.patch
28
+ build < other.build
29
+ end
30
+
31
+ def ==(other)
32
+ other.instance_of?(self.class) &&
33
+ major == other.major && minor == other.minor &&
34
+ patch == other.patch && build == other.build
35
+ end
19
36
  end
20
37
  end
@@ -0,0 +1,20 @@
1
+ require File.expand_path('../spec_helper', __FILE__)
2
+
3
+ module Liferaft
4
+ describe Version do
5
+ it 'compares 6D570 and 6D1002 correctly' do
6
+ v1 = Version.new('6D570')
7
+ v2 = Version.new('6D1002')
8
+
9
+ v1.should < v2
10
+ v2.should > v1
11
+ end
12
+
13
+ it 'implements the equality operator' do
14
+ v1 = Version.new('6D570')
15
+ v2 = Version.new('6D570')
16
+
17
+ v1.should == v2
18
+ end
19
+ end
20
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: liferaft
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Boris Bügling
@@ -56,6 +56,7 @@ files:
56
56
  - lib/liferaft/gem_version.rb
57
57
  - lib/liferaft/version.rb
58
58
  - liferaft.gemspec
59
+ - spec/comparison_spec.rb
59
60
  - spec/spec_helper.rb
60
61
  - spec/version_spec.rb
61
62
  homepage: https://github.com/neonichu/liferaft
@@ -83,6 +84,7 @@ signing_key:
83
84
  specification_version: 4
84
85
  summary: Liferaft parses Apple build numbers, like 6D1002
85
86
  test_files:
87
+ - spec/comparison_spec.rb
86
88
  - spec/spec_helper.rb
87
89
  - spec/version_spec.rb
88
90
  has_rdoc: