roku_builder 3.10.6 → 3.10.7

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: 4cc5f4a1c600149557b481765e1659974e6b87de
4
- data.tar.gz: e25e846a20dd3fad26b8e6dda95b55d5464702e3
3
+ metadata.gz: 375387f31b52479dc262e78bc5f8d7e57efbb186
4
+ data.tar.gz: ba455138e37db3c4e69042f10cbdd2e908cb357d
5
5
  SHA512:
6
- metadata.gz: 04f99e4169c1853dc35d27cc1ea3862887afd51c3cf1dfbf69cd9f66d1295b4f8a05658567f98853d5cc91b9779d84af2d31c307ce0c1c37a28fd2455add9d7d
7
- data.tar.gz: fce8ec616e2f3432228fc130a901f44bd93e50c6526b4a7e498ad58f2099ecf5ce0b57aaa645ed00d2a8de3d6625a9a20c88878e0d8333ea6d8137d6110228f7
6
+ metadata.gz: b1b336f9b7798a53e52974dd28bd08ba13a5a4de4da99dfc759e627dd6dcd68647a721378d367e4260bf9f1fba3ff39e8f440325cb5fdb5b0f2f8328a47fccd7
7
+ data.tar.gz: 9df9712dd4c33de3dc47a06aeed09593da3b84ef8fd86fe173fc5b3ceb6b73bf073842c1332540458a044aa1e75afe9f8a475e7ee3ea375259bc145318be0ef3
data/.travis.yml CHANGED
@@ -1,3 +1,3 @@
1
1
  language: ruby
2
2
  rvm:
3
- - "2.2.5"
3
+ - "2.3.0"
@@ -23,6 +23,7 @@ module RokuBuilder
23
23
  KEY_MISSING_PATH = 19
24
24
  KEY_MISSING_PASSWORD = 20
25
25
  INVALID_MAPPING_INFO = 21
26
+ MISSING_KEY = 22
26
27
 
27
28
  MISSING_STAGE_METHOD = -1
28
29
 
@@ -47,7 +48,7 @@ module RokuBuilder
47
48
  validate_project(codes: codes, project: project_config)
48
49
  if project_config[:stages]
49
50
  project_config[:stages].each {|_stage, stage_config|
50
- validate_stage(codes: codes, stage: stage_config, project: project_config)
51
+ validate_stage(codes: codes, stage: stage_config, project: project_config, config: config)
51
52
  }
52
53
  end
53
54
  }
@@ -94,6 +95,7 @@ module RokuBuilder
94
95
  "A key is missing its keyed package path.",
95
96
  "A key is missing its password.", #20
96
97
  "A input mapping is invalid",
98
+ "A key is missing from the keys section",
97
99
  #===============WARNINGS===============#
98
100
  "A project is missing its stage method."
99
101
  ]
@@ -156,10 +158,11 @@ module RokuBuilder
156
158
  # Validates a roku config project
157
159
  # @param codes [Array] array of error codes
158
160
  # @param project [Hash] project config object
159
- def self.validate_stage(codes:, stage:, project:)
161
+ def self.validate_stage(codes:, stage:, project:, config:)
160
162
  errors= [
161
163
  [STAGE_MISSING_BRANCH, (!stage[:branch] and project[:stage_method] == :git)],
162
164
  [STAGE_MISSING_SCRIPT, (!stage[:script] and project[:stage_method] == :script)],
165
+ [MISSING_KEY, (!!stage[:key] and stage[:key].class == String and (!config[:keys] or !config[:keys][stage[:key].to_sym]))]
163
166
  ]
164
167
  process_errors(codes: codes, errors: errors)
165
168
  end
@@ -62,7 +62,7 @@ module RokuBuilder
62
62
  # It will add missing attributes but not remove them
63
63
  # @param root_dir [String] The app root directory
64
64
  # @param attributes [Hash] The new attributes for the app manifest
65
- def self.update_manifest(root_dir:, attributes:)
65
+ def self.update_manifest(root_dir:, attributes:, set_default: true)
66
66
  temp_file = Tempfile.new('manifest')
67
67
  path = File.join(root_dir, 'manifest')
68
68
  new_params = attributes.dup
@@ -79,7 +79,7 @@ module RokuBuilder
79
79
  end
80
80
  end
81
81
  end
82
- else
82
+ elsif set_default
83
83
  new_params = self.default_params().merge(new_params)
84
84
  end
85
85
  new_params.each_pair do |key, value|
@@ -2,5 +2,5 @@
2
2
 
3
3
  module RokuBuilder
4
4
  # Version of the RokuBuilder Gem
5
- VERSION = "3.10.6"
5
+ VERSION = "3.10.7"
6
6
  end
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.10.6
4
+ version: 3.10.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - greeneca
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-10-25 00:00:00.000000000 Z
11
+ date: 2016-12-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubyzip