haplo 2.5.0-java → 2.5.1-java

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c4debe71fe91f237e4c8536a6f172b841ffedf5807e83c77aeabf44f5dd95d69
4
- data.tar.gz: 0e8b43f580f7767466cf333bfa7f847d5f834bce7b950918125ebe65e5422135
3
+ metadata.gz: 924b41d315815330b19fe0ec64f2b33dfe348ae2d4add114cb95172014b8e6a2
4
+ data.tar.gz: b805bc81718967662f3e37128623cfd1b2e3d37948a2eaea0af989e4364b6515
5
5
  SHA512:
6
- metadata.gz: 4f954ab6515de58158e0eacc826b6023bdcc53af299ac4a38fc59762f3dd184de177348024573fcd4e81bf506de02f75ff4a4ed2b06237c03708f8bdbf3ef1eb
7
- data.tar.gz: 6fc846cc2827a1e9b925c5dcb8adbc3c96f7c27a9b7d850ce76dea176b5b887c6869bd78170621fc912dd54029f2019d99d433af5aedc3215c86e086254618a4
6
+ metadata.gz: 07a8c102a1b54d23e8b255195a3ddf222077cd3ce354fc0760cba349c50878a864472ca705adf4290d148df1dbafffa34c103a180f822161b431417bf61e8d3a
7
+ data.tar.gz: ef92e6e798ca532f5b9bd4b152abf62b0dc3bb960b2e795d362be0f6e04a450391d1e044d58bd92c39166ec2e0055f791e80c59b037ac24fb14d610c819bc452
@@ -3,8 +3,8 @@ Gem::Specification.new do |s|
3
3
  files = Dir.glob("#{root_dir}/**/*.*").map { |x| x[root_dir.length + 1, x.length]}
4
4
 
5
5
  s.name = 'haplo'
6
- s.version = '2.5.0'
7
- s.date = '2019-09-25'
6
+ s.version = '2.5.1'
7
+ s.date = '2019-10-28'
8
8
  s.summary = "Haplo Plugin Tool"
9
9
  s.description = "Development tools for developing Haplo plugins, see https://haplo.org"
10
10
  s.licenses = ["MPL-2.0"]
@@ -50,7 +50,10 @@ module PluginTool
50
50
  end
51
51
  # Minimise file?
52
52
  unless filename =~ /\A(js|test)\//
53
- data = minimiser.process(data, filename)
53
+ # Is this file explicitly excluded from minimisation?
54
+ unless plugin.exclude_files_from_minimisation.include?(filename)
55
+ data = minimiser.process(data, filename)
56
+ end
54
57
  end
55
58
  hash = Digest::SHA256.hexdigest(data)
56
59
  # Make sure output directory exists, write file
@@ -102,6 +102,17 @@ module PluginTool
102
102
  end
103
103
  end
104
104
 
105
+ def exclude_files_from_minimisation
106
+ @exclude_files_from_minimisation ||= begin
107
+ # developer.json file might specify files which should skip minimisation when packing
108
+ if developer_json['excludeFromMinimisation'].kind_of?(Array)
109
+ developer_json['excludeFromMinimisation']
110
+ else
111
+ []
112
+ end
113
+ end
114
+ end
115
+
105
116
  # ---------------------------------------------------------------------------------------------------------
106
117
 
107
118
  def command(cmd, errors)
@@ -180,11 +191,16 @@ module PluginTool
180
191
  hash = action
181
192
  # Minimise file before uploading?
182
193
  if @options.minimiser != nil && filename =~ /\A(static|template)\//
183
- size_before = data.length
184
- data = @options.minimiser.process(data, filename)
185
- size_after = data.length
186
- hash = Digest::SHA256.hexdigest(data)
187
- puts " minimisation: #{size_before} -> #{size_after} (#{(size_after * 100) / size_before}%)"
194
+ # Is this file explicitly excluded from minimisation?
195
+ unless exclude_files_from_minimisation.include?(filename)
196
+ size_before = data.length
197
+ data = @options.minimiser.process(data, filename)
198
+ size_after = data.length
199
+ hash = Digest::SHA256.hexdigest(data)
200
+ puts " minimisation: #{size_before} -> #{size_after} (#{(size_after * 100) / size_before}%)"
201
+ else
202
+ puts " minimisation: skipped by developer.json, unmodified file uploaded"
203
+ end
188
204
  end
189
205
  r = PluginTool.post_with_json_response("/api/development-plugin-loader/put-file/#{@loaded_plugin_id}", params, {:file => [filename, data]})
190
206
  if r["result"] == 'success'
@@ -1 +1 @@
1
- 861823a
1
+ a387d65
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: haplo
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.5.0
4
+ version: 2.5.1
5
5
  platform: java
6
6
  authors:
7
7
  - Haplo Services
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-09-25 00:00:00.000000000 Z
11
+ date: 2019-10-28 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Development tools for developing Haplo plugins, see https://haplo.org
14
14
  email: client.services@haplo-services.com