tunees 0.1.1 → 0.1.2

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: ff5b5067a291104d41fe24c62570a5a02fd6ff2c
4
- data.tar.gz: a890feace1671cf7431d69516bf1b4b3e10eb3b0
3
+ metadata.gz: 2d5d812e9e6ce1b14047845c050cc24168b432bb
4
+ data.tar.gz: e62ba44b3abf9ea59a53e375e4bd935010bdd9c0
5
5
  SHA512:
6
- metadata.gz: b9cdd6552a365e5f2111d66cf8362ba405f33f82cf8c037140f20e6dbd9069c8aee331e9ead15d4c7f793df8d0d2110db355de665278f03cb4576f1e46abe9fc
7
- data.tar.gz: 4dd8c22b67de39b32368d58ba6d6a9ccdeb1f6bbba9e7281ec7288dbf23aca6a2f5129c81a43b11f0a416964a1c1f029b08131121faabee5a427239eec7dc657
6
+ metadata.gz: d3afa84074b987ff8fe3325e5c63a3c1760a8f165b7bf3a8fe49c7a388508c5600b3055ac863d7f02f64e358fe45840b85c435a87c2551b34e9b596ce32592bf
7
+ data.tar.gz: dea0b30498b1368474b415cd4f84e62c3ed24f580842e06c391fa5fcb7e64521a8c3864766d07259d107e4e1184267e13e8bda9134432dfe9b5dd90ad8498082
@@ -8,7 +8,18 @@ module Tunees
8
8
  def self.execute(method, *args)
9
9
  Commander.run <<-JXA.strip_heredoc
10
10
  var app = Application("iTunes")
11
- return app.#{method}(#{args.join(",")})
11
+ var ret = app.#{method}(#{args.join(",")})
12
+
13
+ // TODO: make this recursively
14
+ if (Array.isArray(ret)) {
15
+ return ret.map(function(x) { return x.properties() })
16
+ } else if (typeof ret == 'object') {
17
+ return ret.properties()
18
+ } else if (typeof ret == 'function') {
19
+ return ret.properties()
20
+ } else {
21
+ return ret
22
+ }
12
23
  JXA
13
24
  end
14
25
 
@@ -1,3 +1,3 @@
1
1
  module Tunees
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tunees
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - meganemura
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-11-04 00:00:00.000000000 Z
11
+ date: 2015-11-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport