tune 0.0.4 → 0.0.5
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/README.md +1 -0
- data/lib/tune/task.rb +1 -1
- data/lib/tune/version.rb +1 -1
- data/spec/tune_spec.rb +19 -19
- data/tune.gemspec +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1033b60d6541ba6df3f0e403eb827a35d4e3ef5f
|
4
|
+
data.tar.gz: fd49f3b2a92cecffd8a53fff5390ff1b7709ae69
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 79ae279542f968e5002e9ed52b3a113fdeac6b0b50e1f0cbc7cc6b14329bd476ad27c38616073427f8a14f0477faabeaebfd5f2b2bb4bc1ba9adb06de36671f0
|
7
|
+
data.tar.gz: 86cd6d9dfe5d907b7c16a51ed50c21e20541825561439c72fa10a8a02a25e1de40be076ccd0cdba03b56d603e38e8f8bab590755979b0a361bf25c08dfb5ad05
|
data/README.md
CHANGED
@@ -73,6 +73,7 @@ MIT License
|
|
73
73
|
|
74
74
|
## Change Log
|
75
75
|
|
76
|
+
* 2013.11.01, 0.0.5 Update task to be suitable for thor ~> 0.18.1
|
76
77
|
* 2013.10.28, 0.0.4 Updated `power off` to kill process via pid (tested with ruby-1.9.3-p448, ruby-2.0.0-p247)
|
77
78
|
Specified rspec version for travis (as 2.12.0)
|
78
79
|
* 2013.02.15, 0.0.3 Removed unused gems and files (tested with ruby-1.9.3-p385)
|
data/lib/tune/task.rb
CHANGED
data/lib/tune/version.rb
CHANGED
data/spec/tune_spec.rb
CHANGED
@@ -31,7 +31,7 @@ describe Tune::Task do
|
|
31
31
|
DBus::SessionBus.stub(:instance).and_return(@dbus)
|
32
32
|
end
|
33
33
|
describe ':power action with on' do
|
34
|
-
let(:conf){ {:
|
34
|
+
let(:conf){ {:current_command => OpenStruct.new(:name => 'power')} }
|
35
35
|
let(:task){ Tune::Task.new(['power'], [], conf) }
|
36
36
|
before do
|
37
37
|
@stdout = capture(:stdout) {
|
@@ -45,7 +45,7 @@ describe Tune::Task do
|
|
45
45
|
end
|
46
46
|
end
|
47
47
|
describe ':power action with off' do
|
48
|
-
let(:conf){ {:
|
48
|
+
let(:conf){ {:current_command => OpenStruct.new(:name => 'power')} }
|
49
49
|
let(:task){ Tune::Task.new(['power'], [], conf) }
|
50
50
|
before do
|
51
51
|
@stdout = capture(:stdout) {
|
@@ -60,7 +60,7 @@ describe Tune::Task do
|
|
60
60
|
end
|
61
61
|
end
|
62
62
|
describe ':list action' do
|
63
|
-
let(:conf){ {:
|
63
|
+
let(:conf){ {:current_command => OpenStruct.new(:name => 'list')} }
|
64
64
|
it 'should raise SystemExit at initialize' do
|
65
65
|
lambda {
|
66
66
|
capture(:stdout){ Tune::Task.new(['list'], [], conf) }
|
@@ -68,7 +68,7 @@ describe Tune::Task do
|
|
68
68
|
end
|
69
69
|
end
|
70
70
|
describe ':play action' do
|
71
|
-
let(:conf){ {:
|
71
|
+
let(:conf){ {:current_command => OpenStruct.new(:name => 'play')} }
|
72
72
|
it 'should raise SystemExit at initialize' do
|
73
73
|
lambda {
|
74
74
|
capture(:stdout){ Tune::Task.new(['play'], [], conf) }
|
@@ -76,7 +76,7 @@ describe Tune::Task do
|
|
76
76
|
end
|
77
77
|
end
|
78
78
|
describe ':off action' do
|
79
|
-
let(:conf){ {:
|
79
|
+
let(:conf){ {:current_command => OpenStruct.new(:name => 'off')} }
|
80
80
|
it 'should raise SystemExit at initialize' do
|
81
81
|
lambda {
|
82
82
|
capture(:stdout){ Tune::Task.new(['off'], [], conf) }
|
@@ -84,7 +84,7 @@ describe Tune::Task do
|
|
84
84
|
end
|
85
85
|
end
|
86
86
|
describe ':show action' do
|
87
|
-
let(:conf){ {:
|
87
|
+
let(:conf){ {:current_command => OpenStruct.new(:name => 'show')} }
|
88
88
|
it 'should raise SystemExit at initialize' do
|
89
89
|
lambda {
|
90
90
|
capture(:stdout){ Tune::Task.new(['show'], [], conf) }
|
@@ -92,7 +92,7 @@ describe Tune::Task do
|
|
92
92
|
end
|
93
93
|
end
|
94
94
|
describe ':volume action' do
|
95
|
-
let(:conf){ {:
|
95
|
+
let(:conf){ {:current_command => OpenStruct.new(:name => 'volume')} }
|
96
96
|
it 'should raise SystemExit at initialize' do
|
97
97
|
lambda {
|
98
98
|
capture(:stdout){ Tune::Task.new(['volume'], [], conf) }
|
@@ -123,7 +123,7 @@ describe Tune::Task do
|
|
123
123
|
]])
|
124
124
|
end
|
125
125
|
describe ':power action with on' do
|
126
|
-
let(:conf){ {:
|
126
|
+
let(:conf){ {:current_command => OpenStruct.new(:name => 'power')} }
|
127
127
|
let(:task){ Tune::Task.new(['power'], [], conf) }
|
128
128
|
before do
|
129
129
|
@stdout = capture(:stdout) {
|
@@ -138,7 +138,7 @@ describe Tune::Task do
|
|
138
138
|
end
|
139
139
|
end
|
140
140
|
describe ':power action with off' do
|
141
|
-
let(:conf){ {:
|
141
|
+
let(:conf){ {:current_command => OpenStruct.new(:name => 'power')} }
|
142
142
|
let(:task){ Tune::Task.new(['power'], [], conf) }
|
143
143
|
before do
|
144
144
|
@stdout = capture(:stdout) {
|
@@ -154,7 +154,7 @@ describe Tune::Task do
|
|
154
154
|
end
|
155
155
|
end
|
156
156
|
describe ':list action' do
|
157
|
-
let(:conf){ {:
|
157
|
+
let(:conf){ {:current_command => OpenStruct.new(:name => 'list')} }
|
158
158
|
let(:task){ Tune::Task.new(['list'], [], conf) }
|
159
159
|
before do
|
160
160
|
@stdout = capture(:stdout){ @result = task.list }
|
@@ -173,7 +173,7 @@ describe Tune::Task do
|
|
173
173
|
end
|
174
174
|
end
|
175
175
|
describe ':play action with invalid index' do
|
176
|
-
let(:conf){ {:
|
176
|
+
let(:conf){ {:current_command => OpenStruct.new(:name => 'play')} }
|
177
177
|
let(:task){ Tune::Task.new(['play'], [], conf) }
|
178
178
|
before do
|
179
179
|
@player.stub(:playRadio).with(/Jazz|R&B/)
|
@@ -189,7 +189,7 @@ describe Tune::Task do
|
|
189
189
|
end
|
190
190
|
end
|
191
191
|
describe ':play action with any args' do
|
192
|
-
let(:conf){ {:
|
192
|
+
let(:conf){ {:current_command => OpenStruct.new(:name => 'play')} }
|
193
193
|
let(:task){ Tune::Task.new(['play'], [], conf) }
|
194
194
|
before do
|
195
195
|
@player.stub(:playRadio).with(/Jazz|R&B/)
|
@@ -205,7 +205,7 @@ describe Tune::Task do
|
|
205
205
|
end
|
206
206
|
end
|
207
207
|
describe ':play action with other channel' do
|
208
|
-
let(:conf){ {:
|
208
|
+
let(:conf){ {:current_command => OpenStruct.new(:name => 'play')} }
|
209
209
|
let(:task){ Tune::Task.new(['play'], [], conf) }
|
210
210
|
before do
|
211
211
|
@player.stub(:playRadio).with(/Jazz|R&B/)
|
@@ -221,7 +221,7 @@ describe Tune::Task do
|
|
221
221
|
end
|
222
222
|
end
|
223
223
|
describe ':off action' do
|
224
|
-
let(:conf){ {:
|
224
|
+
let(:conf){ {:current_command => OpenStruct.new(:name => 'off')} }
|
225
225
|
let(:task){ Tune::Task.new(['off'], [], conf) }
|
226
226
|
before do
|
227
227
|
@player.stub(:turnOff).and_return(true)
|
@@ -237,7 +237,7 @@ describe Tune::Task do
|
|
237
237
|
end
|
238
238
|
end
|
239
239
|
describe ':show action' do
|
240
|
-
let(:conf){ {:
|
240
|
+
let(:conf){ {:current_command => OpenStruct.new(:name => 'show')} }
|
241
241
|
let(:task){ Tune::Task.new(['show'], [], conf) }
|
242
242
|
before do
|
243
243
|
@stdout = capture(:stdout){ @result = task.show }
|
@@ -252,7 +252,7 @@ describe Tune::Task do
|
|
252
252
|
end
|
253
253
|
end
|
254
254
|
describe ':volume action with invalid value' do
|
255
|
-
let(:conf){ {:
|
255
|
+
let(:conf){ {:current_command => OpenStruct.new(:name => 'volume')} }
|
256
256
|
let(:task){ Tune::Task.new(['volume'], [], conf) }
|
257
257
|
before do
|
258
258
|
@player.stub(:volumeUp).and_return(true)
|
@@ -269,7 +269,7 @@ describe Tune::Task do
|
|
269
269
|
end
|
270
270
|
end
|
271
271
|
describe ':volume action with valid value' do
|
272
|
-
let(:conf){ {:
|
272
|
+
let(:conf){ {:current_command => OpenStruct.new(:name => 'volume')} }
|
273
273
|
let(:task){ Tune::Task.new(['volume'], [], conf) }
|
274
274
|
before do
|
275
275
|
@player.stub(:volumeUp).and_return(true)
|
@@ -292,7 +292,7 @@ describe Tune::Task do
|
|
292
292
|
@player.stub(:turnOff).and_return(nil)
|
293
293
|
end
|
294
294
|
describe ':off action' do
|
295
|
-
let(:conf){ {:
|
295
|
+
let(:conf){ {:current_command => OpenStruct.new(:name => 'off')} }
|
296
296
|
let(:task){ Tune::Task.new(['off'], [], conf) }
|
297
297
|
before do
|
298
298
|
@stdout = capture(:stdout){ @result = task.off }
|
@@ -307,7 +307,7 @@ describe Tune::Task do
|
|
307
307
|
end
|
308
308
|
end
|
309
309
|
describe ':show action' do
|
310
|
-
let(:conf){ {:
|
310
|
+
let(:conf){ {:current_command => OpenStruct.new(:name => 'show')} }
|
311
311
|
let(:task){ Tune::Task.new(['show'], [], conf) }
|
312
312
|
before do
|
313
313
|
@stdout = capture(:stdout){ @result = task.show }
|
data/tune.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tune
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yasuhiro Asaka
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-10-
|
11
|
+
date: 2013-10-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ruby-dbus
|
@@ -28,16 +28,16 @@ dependencies:
|
|
28
28
|
name: thor
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ~>
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
33
|
+
version: 0.18.1
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ~>
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
40
|
+
version: 0.18.1
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rspec
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|