obf 0.6.0 → 0.6.1

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/obf/validator.rb +5 -1
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e5d07ecf16d2203be0d9413839d5d40fef459d1b
4
- data.tar.gz: 8197d0663f79ae864f1be1219a7738242ad98296
3
+ metadata.gz: 3e249a35931e0186e77d7891dd62ea793e590029
4
+ data.tar.gz: f5ac6ea76ef9258197bdc8668bfdc9eddbf4db6e
5
5
  SHA512:
6
- metadata.gz: 005aa69b9b244383b670bced8b6c43aaa9085f3e7eed91aa4640c567d9eea58520ed5da171915f497d66d8c374ec5e5b2100da6d248698c555969b5996298c17
7
- data.tar.gz: a830f23b3501dda0b301d643086913049e55b1a759e4acf9921cf3f858e5fcdbf218ff6b39d1e847e239978399a5aa27df656efdb3194ff42795e3cbb20c54f5
6
+ metadata.gz: 10eaf3229ebf54f38d81524a72729885a8a95645f66179595cd47d1cf5f232f8524b0be4eaad15aaf1efe103c66daf1bfd66d9a009ce0de3490a53b251e41375
7
+ data.tar.gz: c34e9d79971e8aefba7de989d0bf45a861f37b30b4f796287d99456991d99627b4af4d4a6c98ffeaff56ac84682dc283bcac2d00852524c539e44f5e41111eb0
@@ -37,8 +37,11 @@ module OBF
37
37
 
38
38
  def self.validate_obf(path)
39
39
  v = self.new
40
+ fn = File.basename(path)
40
41
  results = v.validate_obf(path)
41
42
  {
43
+ :filename => fn,
44
+ :filesize => File.size(path),
42
45
  :valid => v.errors == 0,
43
46
  :errors => v.errors,
44
47
  :warnings => v.warnings,
@@ -75,6 +78,7 @@ module OBF
75
78
  err "Couldn't parse structure: #{e.message}", true
76
79
  end
77
80
  end
81
+ ext = json
78
82
 
79
83
  add_check('format_version', "format version") do
80
84
  if !ext['format']
@@ -101,7 +105,7 @@ module OBF
101
105
  end
102
106
 
103
107
  add_check('extras', "extra attributes") do
104
- attrs = ['format', 'id', 'locale', 'url', 'data_url', 'name', 'description_html', 'buttons', 'buttons_hash', 'images', 'images_hash', 'sounds', 'sounds_hash', 'grid', 'license']
108
+ attrs = ['format', 'id', 'locale', 'url', 'data_url', 'name', 'description_html', 'buttons', 'images', 'sounds', 'grid', 'license']
105
109
  ext.keys.each do |key|
106
110
  if !attrs.include?(key) && !key.match(/^ext_/)
107
111
  warn "#{key} attribute is not defined in the spec, should be prefixed with ext_yourapp_"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: obf
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Whitmer