roku_builder 3.11.0 → 3.11.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -285,5 +285,52 @@ class StagerTest < Minitest::Test
285
285
  stash.verify
286
286
  pstore.verify
287
287
  end
288
+
289
+ def test_stager_load_second_state
290
+ root_dir = File.join(File.dirname(__FILE__), "test_files", "stager_test")
291
+ branch_name = 'branch'
292
+ git = Minitest::Mock.new
293
+ branch = Minitest::Mock.new
294
+ stashes = Minitest::Mock.new
295
+ stash = Minitest::Mock.new
296
+ other_stash = Minitest::Mock.new
297
+ pstore = Minitest::Mock.new
298
+
299
+ stager_config = {
300
+ method: :git,
301
+ root_dir: root_dir,
302
+ key: branch_name,
303
+ logger: nil
304
+ }
305
+
306
+ pstore.expect(:transaction, nil) do |&block|
307
+ block.call
308
+ end
309
+ git.expect(:branches, ['other_branch'])
310
+ pstore.expect(:[], 'other_branch', [:current_branch])
311
+ pstore.expect(:[]=, nil, [:current_branch, nil])
312
+
313
+ git.expect(:branch, branch)
314
+ branch.expect(:stashes, [other_stash, stash])
315
+ git.expect(:checkout, nil, ['other_branch'])
316
+ git.expect(:branch, branch)
317
+ stash.expect(:message, "roku-builder-temp-stash")
318
+ other_stash.expect(:message, "random_messgae")
319
+ branch.expect(:stashes, stashes)
320
+ stashes.expect(:pop, nil, ["stash@{1}"])
321
+
322
+ Git.stub(:open, git) do
323
+ PStore.stub(:new, pstore) do
324
+ stager = RokuBuilder::Stager.new(**stager_config)
325
+ assert stager.unstage
326
+ end
327
+ end
328
+ git.verify
329
+ branch.verify
330
+ stashes.verify
331
+ stash.verify
332
+ other_stash.verify
333
+ pstore.verify
334
+ end
288
335
  end
289
336
 
@@ -51,13 +51,19 @@ def good_config
51
51
  stages:{
52
52
  production: {
53
53
  branch: "production",
54
- key: {
55
- keyed_pkg: "/dev/null",
56
- password: "<password for pkg>"
57
- }
54
+ key: "a"
58
55
  }
59
56
  }
60
57
  }
58
+ },
59
+ keys: {
60
+ a: {
61
+ keyed_pkg: "/dev/null",
62
+ password: "password"
63
+ }
64
+ },
65
+ input_mapping: {
66
+ "a": ["home", "Home"]
61
67
  }
62
68
  }
63
69
  end
@@ -20,7 +20,7 @@ class TesterTest < Minitest::Test
20
20
  }
21
21
  tester = RokuBuilder::Tester.new(**device_config)
22
22
 
23
- loader.expect(:sideload, nil, [loader_config])
23
+ loader.expect(:sideload, [RokuBuilder::SUCCESS, ""], [loader_config])
24
24
  connection.expect(:waitfor, nil, [/\*\*\*\*\* ENDING TESTS \*\*\*\*\*/])
25
25
  connection.expect(:puts, nil, ["cont\n"])
26
26
 
@@ -55,7 +55,7 @@ class TesterTest < Minitest::Test
55
55
  }
56
56
  tester = RokuBuilder::Tester.new(**device_config)
57
57
 
58
- loader.expect(:sideload, nil, [loader_config])
58
+ loader.expect(:sideload, [RokuBuilder::SUCCESS, ""], [loader_config])
59
59
  connection.expect(:waitfor, nil, &waitfor)
60
60
  connection.expect(:puts, nil, ["cont\n"])
61
61
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: roku_builder
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.11.0
4
+ version: 3.11.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - greeneca
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-01-10 00:00:00.000000000 Z
11
+ date: 2017-01-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubyzip
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '0.10'
33
+ version: '0.11'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '0.10'
40
+ version: '0.11'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: faraday-digestauth
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -346,7 +346,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
346
346
  version: '0'
347
347
  requirements: []
348
348
  rubyforge_project:
349
- rubygems_version: 2.5.1
349
+ rubygems_version: 2.5.2
350
350
  signing_key:
351
351
  specification_version: 4
352
352
  summary: Build Tool for Roku Apps