splat 0.0.8 → 0.0.9

Sign up to get free protection for your applications and to get access to all the features.
data/MIT-LICENSE CHANGED
@@ -1,20 +1,20 @@
1
- Copyright (c) 2010 Mark Ryall
2
-
3
- Permission is hereby granted, free of charge, to any person obtaining
4
- a copy of this software and associated documentation files (the
5
- "Software"), to deal in the Software without restriction, including
6
- without limitation the rights to use, copy, modify, merge, publish,
7
- distribute, sublicense, and/or sell copies of the Software, and to
8
- permit persons to whom the Software is furnished to do so, subject to
9
- the following conditions:
10
-
11
- The above copyright notice and this permission notice shall be
12
- included in all copies or substantial portions of the Software.
13
-
14
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1
+ Copyright (c) 2010 Mark Ryall
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.rdoc CHANGED
@@ -1,31 +1,31 @@
1
- = splat
2
-
3
- small gem to provide an adapter for various platform specific features
4
-
5
- == installation
6
-
7
- gem install splat
8
-
9
- == instantiate
10
-
11
- splat = Splat.new
12
-
13
- == platform
14
-
15
- puts spat.platform
16
- puts splat.supported? ? 'supported' : 'not supported'
17
-
18
- == clipboard
19
-
20
- splat.clipboard = "some new content"
21
-
22
- this will do nothing if the platform is not supported (win32 and macosx for the moment)
23
-
24
- == launcher
25
-
26
- splat.launch 'http://google.com'
27
-
28
- == Future plans for world domination
29
-
30
- * detect remaining platforms
31
- * determine 1.9 compatibility
1
+ = splat
2
+
3
+ small gem to provide an adapter for various platform specific features
4
+
5
+ == installation
6
+
7
+ gem install splat
8
+
9
+ == instantiate
10
+
11
+ splat = Splat.new
12
+
13
+ == platform
14
+
15
+ puts spat.platform
16
+ puts splat.supported? ? 'supported' : 'not supported'
17
+
18
+ == clipboard
19
+
20
+ splat.clipboard = "some new content"
21
+
22
+ this will do nothing if the platform is not supported (win32 and macosx for the moment)
23
+
24
+ == launcher
25
+
26
+ splat.launch 'http://google.com'
27
+
28
+ == Future plans for world domination
29
+
30
+ * detect remaining platforms
31
+ * determine 1.9 compatibility
data/lib/splat.rb CHANGED
@@ -25,6 +25,8 @@ class Splat
25
25
  end
26
26
  require 'splat/win32_launcher'
27
27
  @launcher = Splat::Win32Launcher.new
28
+ require 'splat/win32_player'
29
+ @player = Splat::Win32Player.new
28
30
  try_load 'browser automation', 'watir' => 'watir' do
29
31
  @browser_class = Watir::IE
30
32
  end
@@ -37,6 +39,8 @@ class Splat
37
39
  @clipboard = Splat::DarwinClipboard.new
38
40
  require 'splat/darwin_launcher'
39
41
  @launcher = Splat::DarwinLauncher.new
42
+ require 'splat/darwin_player'
43
+ @player = Splat::DarwinPlayer.new
40
44
  try_load 'browser automation', 'rb-appscript' => 'appscript', 'safariwatir' => 'safariwatir' do
41
45
  @browser_class = Watir::Safari
42
46
  end
@@ -62,6 +66,10 @@ class Splat
62
66
  @launcher.launch content if @launcher
63
67
  end
64
68
 
69
+ def play path
70
+ @player.play path if @player
71
+ end
72
+
65
73
  def clean_path path
66
74
  @path_cleaner.clean path
67
75
  end
@@ -1,5 +1,5 @@
1
- class Splat::DarwinClipboard
2
- def content= text
3
- `echo "#{text}" | pbcopy`
4
- end
5
- end
1
+ class Splat::DarwinClipboard
2
+ def content= text
3
+ `echo "#{text}" | pbcopy`
4
+ end
5
+ end
@@ -1,5 +1,5 @@
1
- class Splat::DarwinLauncher
2
- def launch text
3
- `open #{text}`
4
- end
5
- end
1
+ class Splat::DarwinLauncher
2
+ def launch text
3
+ `open #{text}`
4
+ end
5
+ end
@@ -0,0 +1,5 @@
1
+ class Splat::DarwinPlayer
2
+ def play path
3
+ `afplay #{path}`
4
+ end
5
+ end
@@ -1,5 +1,5 @@
1
- class Splat::Win32Clipboard
2
- def content= text
3
- Win32::Clipboard.set_data(text)
4
- end
5
- end
1
+ class Splat::Win32Clipboard
2
+ def content= text
3
+ Win32::Clipboard.set_data(text)
4
+ end
5
+ end
@@ -1,5 +1,5 @@
1
- class Splat::Win32Launcher
2
- def launch text
3
- `start #{text}`
4
- end
5
- end
1
+ class Splat::Win32Launcher
2
+ def launch text
3
+ `start #{text}`
4
+ end
5
+ end
@@ -0,0 +1,5 @@
1
+ class Splat::Win32Player
2
+ def play path
3
+ `mpg123 -q #{path}`
4
+ end
5
+ end
metadata CHANGED
@@ -1,7 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: splat
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ prerelease: false
5
+ segments:
6
+ - 0
7
+ - 0
8
+ - 9
9
+ version: 0.0.9
5
10
  platform: ruby
6
11
  authors:
7
12
  - Mark Ryall
@@ -9,7 +14,7 @@ autorequire:
9
14
  bindir: bin
10
15
  cert_chain: []
11
16
 
12
- date: 2010-02-28 00:00:00 +11:00
17
+ date: 2010-03-07 00:00:00 +11:00
13
18
  default_executable:
14
19
  dependencies: []
15
20
 
@@ -29,8 +34,10 @@ extra_rdoc_files: []
29
34
  files:
30
35
  - lib/splat/darwin_clipboard.rb
31
36
  - lib/splat/darwin_launcher.rb
37
+ - lib/splat/darwin_player.rb
32
38
  - lib/splat/win32_clipboard.rb
33
39
  - lib/splat/win32_launcher.rb
40
+ - lib/splat/win32_player.rb
34
41
  - lib/splat.rb
35
42
  - README.rdoc
36
43
  - MIT-LICENSE
@@ -47,18 +54,20 @@ required_ruby_version: !ruby/object:Gem::Requirement
47
54
  requirements:
48
55
  - - ">="
49
56
  - !ruby/object:Gem::Version
57
+ segments:
58
+ - 0
50
59
  version: "0"
51
- version:
52
60
  required_rubygems_version: !ruby/object:Gem::Requirement
53
61
  requirements:
54
62
  - - ">="
55
63
  - !ruby/object:Gem::Version
64
+ segments:
65
+ - 0
56
66
  version: "0"
57
- version:
58
67
  requirements: []
59
68
 
60
69
  rubyforge_project:
61
- rubygems_version: 1.3.5
70
+ rubygems_version: 1.3.6
62
71
  signing_key:
63
72
  specification_version: 3
64
73
  summary: cross platform adapter for various os specific features