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 +4 -4
- data/lib/tunees/application.rb +12 -1
- data/lib/tunees/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2d5d812e9e6ce1b14047845c050cc24168b432bb
|
4
|
+
data.tar.gz: e62ba44b3abf9ea59a53e375e4bd935010bdd9c0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d3afa84074b987ff8fe3325e5c63a3c1760a8f165b7bf3a8fe49c7a388508c5600b3055ac863d7f02f64e358fe45840b85c435a87c2551b34e9b596ce32592bf
|
7
|
+
data.tar.gz: dea0b30498b1368474b415cd4f84e62c3ed24f580842e06c391fa5fcb7e64521a8c3864766d07259d107e4e1184267e13e8bda9134432dfe9b5dd90ad8498082
|
data/lib/tunees/application.rb
CHANGED
@@ -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
|
-
|
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
|
|
data/lib/tunees/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2015-11-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|