haplo 2.2.3-java → 2.2.4-java

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: 1208fad2d6e09f5e211febcbf66db8d7e001d4a5
4
- data.tar.gz: db04bc4e201be9ac114b7ce0e5a443e157100ce5
3
+ metadata.gz: 6fe34a8b772a94f2081c13061dbeaa847bd8d59f
4
+ data.tar.gz: 6feb4525fb78d5ea42e4b9df4d2c7b6745f80737
5
5
  SHA512:
6
- metadata.gz: a359b495e0434d0df43228ee04f12a4bc27e88046037f9b0c0c1849f34294710eeb86f980c8528ea4263c34fcd6888d393399570e984fca8ce4a1e950484b381
7
- data.tar.gz: 65460374ff546f428de0493408a8c7d29d52244c7cc584499eb7f3a7ec9c95cc8e7981abd5c00f30038c6df994fee9dcf0bc83b3be1e7d6b1353cb1d493b5aa1
6
+ metadata.gz: abe4e42470ab21c5faa712c2c8e39169107d7e9c206c6861af15262bffcdbd6d453654ea16fba355ac9ef1c534b0a0fe9e42beec3a8da8197f3ba972dd543fad
7
+ data.tar.gz: 648bef2f9722e6fe327e2a73835e6d0161bf81f15f607b97da8b653cbf8b8c4483f183331c079df75090e828a1d391a6be85f7f85b1676d0260a63e8f613be7a
data/haplo.gemspec CHANGED
@@ -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.2.3'
7
- s.date = '2016-05-30'
6
+ s.version = '2.2.4'
7
+ s.date = '2016-09-08'
8
8
  s.summary = "Haplo Plugin Tool"
9
9
  s.description = "Development tools for developing Haplo plugins, see http://haplo.org"
10
10
  s.licenses = ["MPL-2.0"]
Binary file
data/lib/packing.rb CHANGED
@@ -9,12 +9,14 @@ module PluginTool
9
9
 
10
10
  PACKING_EXCLUDE = ['developer.json', 'readme.txt']
11
11
 
12
- def self.pack_plugin(plugin_name, output_directory, errors = [])
13
- STDOUT.write("#{plugin_name}: ")
12
+ def self.pack_plugin(plugin, output_directory, errors = [])
13
+ STDOUT.write("#{plugin.name}: ")
14
+ raise "Bad plugin name when packing" unless plugin.name =~ /\A[a-zA-Z0-9_]+\z/
14
15
  # Get filenames and sort
15
- files = Dir.glob("#{plugin_name}/**/*").map do |filename|
16
+ plugin_dir = plugin.plugin_dir
17
+ files = Dir.glob("#{plugin_dir}/**/*").map do |filename|
16
18
  if File.file? filename
17
- filename[plugin_name.length+1, filename.length]
19
+ filename[plugin_dir.length+1, filename.length]
18
20
  else
19
21
  nil
20
22
  end
@@ -22,12 +24,12 @@ module PluginTool
22
24
  ok = plugin_filename_allowed?(filename) && !PACKING_EXCLUDE.include?(filename)
23
25
  unless ok || PACKING_EXCLUDE.include?(filename)
24
26
  STDOUT.write("!")
25
- errors.push("IGNORED: #{plugin_name}/#{filename}")
27
+ errors.push("IGNORED: #{plugin_dir}/#{filename}")
26
28
  end
27
29
  ok
28
30
  end .sort
29
31
  # Clean output directory
30
- output_plugin_dir = "#{output_directory}/#{plugin_name}"
32
+ output_plugin_dir = "#{output_directory}/#{plugin.name}"
31
33
  if File.exist? output_plugin_dir
32
34
  FileUtils.rm_r(output_plugin_dir)
33
35
  end
@@ -38,7 +40,7 @@ module PluginTool
38
40
  minimiser = PluginTool::Minimiser.new
39
41
  files.each do |filename|
40
42
  STDOUT.write("."); STDOUT.flush
41
- data = File.open("#{plugin_name}/#{filename}") { |f| f.read }
43
+ data = File.open("#{plugin_dir}/#{filename}") { |f| f.read }
42
44
  # Minimise file?
43
45
  unless filename =~ /\Ajs\//
44
46
  data = minimiser.process(data, filename)
data/lib/plugin.rb CHANGED
@@ -106,7 +106,7 @@ module PluginTool
106
106
  generate_license_key(application_id)
107
107
 
108
108
  when 'pack'
109
- PluginTool.pack_plugin(@name, @options.output, errors)
109
+ PluginTool.pack_plugin(self, @options.output, errors)
110
110
 
111
111
  when 'reset-db'
112
112
  puts "Resetting database on server for #{@name}..."
data/lib/version.txt CHANGED
@@ -1 +1 @@
1
- fc8a30a
1
+ 0f48ed9
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.2.3
4
+ version: 2.2.4
5
5
  platform: java
6
6
  authors:
7
7
  - Haplo Services
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-05-30 00:00:00.000000000 Z
11
+ date: 2016-09-08 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Development tools for developing Haplo plugins, see http://haplo.org
14
14
  email: client.services@haplo-services.com