bixby-common 0.3.14 → 0.3.15

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.14
1
+ 0.3.15
data/bixby-common.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "bixby-common"
8
- s.version = "0.3.14"
8
+ s.version = "0.3.15"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Chetan Sarva"]
@@ -101,7 +101,7 @@ class CommandSpec
101
101
 
102
102
  def load_manifest
103
103
  begin
104
- return MultiJson.load(path("manifest.json"))
104
+ return MultiJson.load(File.read(path("manifest.json")))
105
105
  rescue => ex
106
106
  end
107
107
  nil
@@ -11,6 +11,7 @@ class TestCommandSpec < MiniTest::Unit::TestCase
11
11
  ENV["BIXBY_HOME"] = File.join(File.expand_path(File.dirname(__FILE__)), "support")
12
12
  h = { :repo => "vendor", :bundle => "test_bundle", 'command' => "echo", :foobar => "baz" }
13
13
  @c = CommandSpec.new(h)
14
+ @expected_digest = "2bb6900420c87d5a7cbd8acc9dd1978593670f4e31bfa9218bb9c7c31d4472dd"
14
15
  end
15
16
 
16
17
  def teardown
@@ -57,9 +58,22 @@ class TestCommandSpec < MiniTest::Unit::TestCase
57
58
  end
58
59
 
59
60
  def test_digest
60
- expected_digest = "8980372485fc6bcd287e481ab1e15710e2b63c68db75085c2d24386ced272ca4"
61
- assert_equal expected_digest, @c.digest
62
- assert @c.validate(expected_digest)
61
+ assert_equal @expected_digest, @c.digest
62
+ assert @c.validate(@expected_digest)
63
+ end
64
+
65
+ def test_has_digest
66
+ digest = @c.load_digest
67
+ assert digest
68
+ assert_equal @expected_digest, digest["digest"]
69
+ assert_equal 4, digest["files"].size
70
+ end
71
+
72
+ def test_has_manifest
73
+ manifest = @c.load_manifest
74
+ assert manifest
75
+ assert_kind_of Hash, manifest
76
+ assert_equal "test_bundle", manifest["name"]
63
77
  end
64
78
 
65
79
  def test_digest_no_err
@@ -1,20 +1,21 @@
1
1
  {
2
- "digest":"8980372485fc6bcd287e481ab1e15710e2b63c68db75085c2d24386ced272ca4",
3
- "files":[
2
+ "digest": "2bb6900420c87d5a7cbd8acc9dd1978593670f4e31bfa9218bb9c7c31d4472dd",
3
+ "files": [
4
4
  {
5
- "file":"bin/cat",
6
- "digest":"6d14ab63802f3ef51bdc16db1cfeb6df93167fe7a2aa09a6c737293d42c118b2"
5
+ "file": "bin/cat",
6
+ "digest": "6d14ab63802f3ef51bdc16db1cfeb6df93167fe7a2aa09a6c737293d42c118b2"
7
7
  },
8
8
  {
9
- "file":"bin/cat.json",
10
- "digest":"1d1f4247f1412aa595c3df27226ebe808dfa8c72c1edc3ebbee452401153503b"
9
+ "file": "bin/cat.json",
10
+ "digest": "1d1f4247f1412aa595c3df27226ebe808dfa8c72c1edc3ebbee452401153503b"
11
11
  },
12
12
  {
13
- "file":"bin/echo",
14
- "digest":"299001868fb8c02fd431c336c6d058f5558c5dff5b5af5e6fe04b870a6a9cbba"
13
+ "file": "bin/echo",
14
+ "digest": "299001868fb8c02fd431c336c6d058f5558c5dff5b5af5e6fe04b870a6a9cbba"
15
15
  },
16
16
  {
17
- "file":"manifest.json",
18
- "digest":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
17
+ "file": "manifest.json",
18
+ "digest": "4e26d93b1b75adfc0bfa10ba15decc3216ec32da8316bfd73d717ee8313390db"
19
19
  }
20
- ]}
20
+ ]
21
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "name": "test_bundle",
3
+ "version": "0.0.1",
4
+ "description": "test bundle",
5
+ "requires": []
6
+ }
7
+
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: bixby-common
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.3.14
5
+ version: 0.3.15
6
6
  platform: ruby
7
7
  authors:
8
8
  - Chetan Sarva
@@ -431,7 +431,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
431
431
  requirements:
432
432
  - - ! '>='
433
433
  - !ruby/object:Gem::Version
434
- hash: -4039827025591653461
434
+ hash: 2553190823794860004
435
435
  segments:
436
436
  - 0
437
437
  version: '0'