roku_builder 4.13.0 → 4.14.0

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: 4e77383c33c69d2858c263393e4e4ae038e2a8c9
4
- data.tar.gz: 4ab74464ad9fcc48e0b2dd991d0799220de1802c
3
+ metadata.gz: 9daed3f43880d417a7c93a4af2649634c8502c6f
4
+ data.tar.gz: 66512085abebb55079b0e9e73b81fea70ca5c360
5
5
  SHA512:
6
- metadata.gz: 5e3df3b2a6f7f138b6600c04d48de8bf46213e37fea263fd0c8090b53530690659c79aeddfa165a84ccc1bfa848698fc6bd4d0a5f0d4cfdb425bee4b423c8046
7
- data.tar.gz: 3700e5da2d298fe907dd4638213daa4c128ace3c740de0b5db31f44295d750c507eb82cd2c3195c923ea95e8a4f1f9e7c534d4ce594722613be5414949ad3d47
6
+ metadata.gz: 179a7a358d9243ae3d0b43f04763e13c07aba29e6aec709db49d3ee72fd2dab27e05e79bd378ae951afaab68a5bb97b29357892a8a52fa5d03b04e33972b7dce
7
+ data.tar.gz: 7dc316a7fa81e122ac6a3281d771770ac09c35adf55130467d29740d547b35268e35e94bbe690ea7ac31bac26f87b338ece249b39b5f5612335f0d4f878c8232
data/CHANGELOG CHANGED
@@ -1,3 +1,7 @@
1
+ = 4.14.0 =
2
+
3
+ - Add plugin staging method
4
+
1
5
  = 4.13.0 =
2
6
 
3
7
  - Add combined source_files project config key
@@ -16,7 +16,7 @@ module RokuBuilder
16
16
  DEVICE_MISSING_PASSWORD = 9
17
17
  PROJECT_MISSING_APP_NAME = 10
18
18
  PROJECT_MISSING_DIRECTORY = 11
19
- # = 12
19
+ PROJECT_MISSING_PLUGIN = 12
20
20
  PROJECT_FOLDERS_BAD = 13
21
21
  PROJECT_MISSING_FILES = 14
22
22
  PROJECT_FILES_BAD = 15
@@ -143,7 +143,8 @@ module RokuBuilder
143
143
  [PROJECT_MISSING_FILES, (!project[:source_files] and !(project[:files] and project[:folders]))],
144
144
  [PROJECT_FILES_BAD, (project[:files] and !project[:files].is_a?(Array))],
145
145
  [MISSING_STAGE_METHOD, ( !project[:stage_method])],
146
- [PROJECT_STAGE_METHOD_BAD, (![:git, :script, nil].include?(project[:stage_method]))],
146
+ [PROJECT_STAGE_METHOD_BAD, (![:git, :script, :plugin, nil].include?(project[:stage_method]))],
147
+ [PROJECT_MISSING_PLUGIN, (!project[:staging_plugin] and project[:stage_method] == :plugin)],
147
148
  [DEPRICATED_FILES_FOLDERS, (project[:files] or project[:folders])],
148
149
  ]
149
150
  process_errors(errors: errors)
@@ -196,7 +197,7 @@ module RokuBuilder
196
197
  "A device config is missing its password.",
197
198
  "A project config is missing its app_name.", #10
198
199
  "A project config is missing its directorty.",
199
- "",
200
+ "A project is missing its staging plugin",
200
201
  "A project config's folders is not an array.",
201
202
  "A project config is missing its files.",
202
203
  "A project config's files is not an array.", #15
@@ -49,7 +49,7 @@ module RokuBuilder
49
49
  if File.file?(file_path) and file_path.end_with?(".brs", ".xml")
50
50
  line_inspector_config = analyzer_config[:lineInspectors]
51
51
  line_inspector_config += performance_config
52
- line_inspector_config += linter_config if linter_config
52
+ line_inspector_config += linter_config[:rules] if linter_config
53
53
  line_inspector = LineInspector.new(config: @config, raf: raf_inspector, inspector_config: line_inspector_config)
54
54
  @warnings.concat(line_inspector.run(file_path))
55
55
  end
@@ -11,6 +11,7 @@ module RokuBuilder
11
11
  @method = get_method
12
12
  @ref = get_git_ref
13
13
  @scripts = get_scripts
14
+ @plugin = get_plugin
14
15
  @root_dir = config.root_dir
15
16
  @logger = Logger.instance
16
17
  @stage_success = true
@@ -49,6 +50,8 @@ module RokuBuilder
49
50
  puts staging_logs
50
51
  @logger.warn "===== Staging Logs End ======="
51
52
  end
53
+ when :plugin
54
+ @plugin.stage(options: @options)
52
55
  end
53
56
  @stage_success
54
57
  end
@@ -81,6 +84,8 @@ module RokuBuilder
81
84
  end
82
85
  end
83
86
  switch_directory_back
87
+ when :plugin
88
+ @plugin.unstage(options: @options)
84
89
  end
85
90
  unstage_success
86
91
  end
@@ -107,6 +112,12 @@ module RokuBuilder
107
112
  @config.stage[:script] if @config.stage
108
113
  end
109
114
 
115
+ def get_plugin
116
+ if @config.project and @config.project[:staging_plugin]
117
+ RokuBuilder.plugins[RokuBuilder.plugins.index{|p| p.to_s == @config.project[:staging_plugin]}].new(config: @config)
118
+ end
119
+ end
120
+
110
121
  def switch_directory
111
122
  Dir.chdir(@root_dir) unless @root_dir.nil? or @root_dir == @orginal_directory
112
123
  end
@@ -2,5 +2,5 @@
2
2
 
3
3
  module RokuBuilder
4
4
  # Version of the RokuBuilder Gem
5
- VERSION = "4.13.0"
5
+ VERSION = "4.14.0"
6
6
  end
@@ -223,5 +223,12 @@ module RokuBuilder
223
223
  validator = ConfigValidator.new(config: config)
224
224
  assert_equal [23], validator.instance_variable_get(:@codes)
225
225
  end
226
+
227
+ def test_config_manager_validate_project_missing_plugin
228
+ config = good_config
229
+ config[:projects][:project2][:stage_method] = :plugin
230
+ validator = ConfigValidator.new(config: config)
231
+ assert_equal [12], validator.instance_variable_get(:@codes)
232
+ end
226
233
  end
227
234
  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: 4.13.0
4
+ version: 4.14.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - greeneca
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-01-17 00:00:00.000000000 Z
11
+ date: 2019-01-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubyzip