zendesk_apps_tools 1.22.2 → 1.22.3
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 +4 -4
- data/lib/zendesk_apps_tools/array_patch.rb +22 -0
- data/lib/zendesk_apps_tools/manifest_handler.rb +2 -0
- metadata +3 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 49dcab0bef11f1080cdf6c9c53bf7cc6c036b1cd
|
|
4
|
+
data.tar.gz: c147c99cfbf18ec1c1061773fa671c77ddedad87
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f2145bc50364f4382c503d61ef2152b9717611dbe95f5f95c483e2e9f8de72b7e69a210419a8a1c74654600e041d931aa59c6da0a53383c03041449694999b93
|
|
7
|
+
data.tar.gz: 36fce78741acae97790353b50fd294e2a078465873e9e73a8f42b51d350117cf84431195e1308e07d563edae74b267ec0b5340dc4cb71e04b49cae3d05f89f8a
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
class Array
|
|
2
|
+
unless instance_methods.include? :to_h
|
|
3
|
+
def to_h
|
|
4
|
+
if elem_index = index { |elem| !elem.is_a?(Array) }
|
|
5
|
+
raise TypeError.new("wrong element type #{self[elem_index].class} at #{elem_index} (expected array)")
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
each_with_index.inject({}) do |hash, elem|
|
|
9
|
+
pair, index = elem
|
|
10
|
+
|
|
11
|
+
if pair.size != 2
|
|
12
|
+
raise ArgumentError.new("wrong array length at #{index} (expected 2, was #{pair.size})")
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
hash.tap do |h|
|
|
16
|
+
key, val = pair
|
|
17
|
+
h[key] = val
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: zendesk_apps_tools
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.22.
|
|
4
|
+
version: 1.22.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- James A. Rosen
|
|
@@ -11,7 +11,7 @@ authors:
|
|
|
11
11
|
autorequire:
|
|
12
12
|
bindir: bin
|
|
13
13
|
cert_chain: []
|
|
14
|
-
date: 2015-
|
|
14
|
+
date: 2015-03-30 00:00:00.000000000 Z
|
|
15
15
|
dependencies:
|
|
16
16
|
- !ruby/object:Gem::Dependency
|
|
17
17
|
name: thor
|
|
@@ -183,6 +183,7 @@ files:
|
|
|
183
183
|
- features/validate.feature
|
|
184
184
|
- lib/zendesk_apps_tools.rb
|
|
185
185
|
- lib/zendesk_apps_tools/api_connection.rb
|
|
186
|
+
- lib/zendesk_apps_tools/array_patch.rb
|
|
186
187
|
- lib/zendesk_apps_tools/bump.rb
|
|
187
188
|
- lib/zendesk_apps_tools/cache.rb
|
|
188
189
|
- lib/zendesk_apps_tools/command.rb
|