hasselhoff 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +14 -0
- data/.rubocop.yml +11 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +31 -0
- data/Rakefile +1 -0
- data/bin/hasselhoff +12 -0
- data/hasselhoff.gemspec +24 -0
- data/img/749137-hoff.jpg +0 -0
- data/img/Wallpapers 3029-2-David-Hasselhoff.jpg +0 -0
- data/img/david-hasselhoff-sexy.jpg +0 -0
- data/img/hasselhoff_1600w.jpg +0 -0
- data/img/hoff.jpeg +0 -0
- data/lib/hasselhoff.rb +41 -0
- data/lib/hasselhoff/version.rb +4 -0
- data/screenshots/shot.png +0 -0
- metadata +104 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 0e2793353f8a7feeeaa8962d66360f801d67c5b9
|
4
|
+
data.tar.gz: aa6ecf0405a4ab0899f3c3aef581ae6bbf997344
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: d24b4018c61ae17fbf68f9549063a823c51ad09b469fc30356f41a96ff273b1633fdb751f27a542724d01e6b763c6436c04168ce11474a118a18ca6cf96afe2d
|
7
|
+
data.tar.gz: 5dc7716ab99df06364b61589c96f2a2ae79bcf1075a44525612ced6ade36b92a1c5f31fe9df51717e76fa56b11aa60ab6dc25884945fc406baba21a35d584135
|
data/.gitignore
ADDED
data/.rubocop.yml
ADDED
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2015 Boris Bügling
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
# Hasselhoff
|
2
|
+
|
3
|
+
Saves you the hassle of setting a Hoff desktop picture manually.
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
$ gem install hasselhoff
|
8
|
+
|
9
|
+
## Usage
|
10
|
+
|
11
|
+
Simply
|
12
|
+
|
13
|
+
$ hasselhoff
|
14
|
+
|
15
|
+
💥
|
16
|
+
|
17
|
+
![Screenshot of a desktop picture of Hasselhoff](screenshots/shot.png)
|
18
|
+
|
19
|
+
## TODO
|
20
|
+
|
21
|
+
- Supports OS X only at the moment
|
22
|
+
- OS X: It is hard to actually set the picture for all spaces, so thi
|
23
|
+
unfortunately only works for the current space 😭.
|
24
|
+
|
25
|
+
## Contributing
|
26
|
+
|
27
|
+
1. Fork it ( https://github.com/[my-github-username]/hasselhoff/fork )
|
28
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
29
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
30
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
31
|
+
5. Create a new Pull Request
|
data/Rakefile
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require 'bundler/gem_tasks'
|
data/bin/hasselhoff
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
if $PROGRAM_NAME == __FILE__
|
4
|
+
ENV['BUNDLE_GEMFILE'] = File.expand_path('../../Gemfile', __FILE__)
|
5
|
+
require 'rubygems'
|
6
|
+
require 'bundler/setup'
|
7
|
+
$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
|
8
|
+
end
|
9
|
+
|
10
|
+
require 'hasselhoff'
|
11
|
+
|
12
|
+
Hasselhoff.set_random_hoff
|
data/hasselhoff.gemspec
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'hasselhoff/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = 'hasselhoff'
|
8
|
+
spec.version = Hasselhoff::VERSION
|
9
|
+
spec.authors = ['Boris Bügling']
|
10
|
+
spec.email = ['boris@buegling.com']
|
11
|
+
spec.summary = 'Hoff up your desktop.'
|
12
|
+
spec.homepage = 'https://github.com/neonichu/hasselhoff'
|
13
|
+
spec.license = 'MIT'
|
14
|
+
|
15
|
+
spec.files = `git ls-files -z`.split("\x0")
|
16
|
+
spec.executables = spec.files.grep(/^bin/) { |f| File.basename(f) }
|
17
|
+
spec.test_files = spec.files.grep(/^(test|spec|features)/)
|
18
|
+
spec.require_paths = ['lib']
|
19
|
+
|
20
|
+
spec.add_development_dependency 'bundler', '~> 1.7'
|
21
|
+
spec.add_development_dependency 'rake', '~> 10.0'
|
22
|
+
|
23
|
+
spec.add_dependency 'desktop'
|
24
|
+
end
|
data/img/749137-hoff.jpg
ADDED
Binary file
|
Binary file
|
Binary file
|
Binary file
|
data/img/hoff.jpeg
ADDED
Binary file
|
data/lib/hasselhoff.rb
ADDED
@@ -0,0 +1,41 @@
|
|
1
|
+
require 'hasselhoff/version'
|
2
|
+
require 'desktop'
|
3
|
+
|
4
|
+
# Looking for freedom...
|
5
|
+
module Hasselhoff
|
6
|
+
include Desktop
|
7
|
+
|
8
|
+
module_function
|
9
|
+
|
10
|
+
def set_random_hoff
|
11
|
+
path = images.sample
|
12
|
+
|
13
|
+
script = <<SCRIPT
|
14
|
+
tell application "System Events"
|
15
|
+
set theDesktops to a reference to every desktop
|
16
|
+
|
17
|
+
repeat with i from 1 to (count theDesktops)
|
18
|
+
set picture of item i of the theDesktops to "#{path}"
|
19
|
+
end repeat
|
20
|
+
end tell
|
21
|
+
SCRIPT
|
22
|
+
|
23
|
+
`osascript -e '#{script}'`
|
24
|
+
|
25
|
+
#osx = OSX.new
|
26
|
+
#image = HTTP.uri?(path) ? WebImage.new(path) : LocalImage.new(path)
|
27
|
+
#osx.desktop_image = image
|
28
|
+
end
|
29
|
+
|
30
|
+
private
|
31
|
+
|
32
|
+
module_function
|
33
|
+
|
34
|
+
def images
|
35
|
+
Dir.glob("#{path_to_resources}/*")
|
36
|
+
end
|
37
|
+
|
38
|
+
def path_to_resources
|
39
|
+
File.join(File.dirname(File.expand_path(__FILE__)), '../img')
|
40
|
+
end
|
41
|
+
end
|
Binary file
|
metadata
ADDED
@@ -0,0 +1,104 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: hasselhoff
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Boris Bügling
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2015-02-27 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ~>
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.7'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ~>
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.7'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ~>
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '10.0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ~>
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '10.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: desktop
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - '>='
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
description:
|
56
|
+
email:
|
57
|
+
- boris@buegling.com
|
58
|
+
executables:
|
59
|
+
- hasselhoff
|
60
|
+
extensions: []
|
61
|
+
extra_rdoc_files: []
|
62
|
+
files:
|
63
|
+
- .gitignore
|
64
|
+
- .rubocop.yml
|
65
|
+
- Gemfile
|
66
|
+
- LICENSE.txt
|
67
|
+
- README.md
|
68
|
+
- Rakefile
|
69
|
+
- bin/hasselhoff
|
70
|
+
- hasselhoff.gemspec
|
71
|
+
- img/749137-hoff.jpg
|
72
|
+
- img/Wallpapers 3029-2-David-Hasselhoff.jpg
|
73
|
+
- img/david-hasselhoff-sexy.jpg
|
74
|
+
- img/hasselhoff_1600w.jpg
|
75
|
+
- img/hoff.jpeg
|
76
|
+
- lib/hasselhoff.rb
|
77
|
+
- lib/hasselhoff/version.rb
|
78
|
+
- screenshots/shot.png
|
79
|
+
homepage: https://github.com/neonichu/hasselhoff
|
80
|
+
licenses:
|
81
|
+
- MIT
|
82
|
+
metadata: {}
|
83
|
+
post_install_message:
|
84
|
+
rdoc_options: []
|
85
|
+
require_paths:
|
86
|
+
- lib
|
87
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
88
|
+
requirements:
|
89
|
+
- - '>='
|
90
|
+
- !ruby/object:Gem::Version
|
91
|
+
version: '0'
|
92
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - '>='
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
requirements: []
|
98
|
+
rubyforge_project:
|
99
|
+
rubygems_version: 2.0.14
|
100
|
+
signing_key:
|
101
|
+
specification_version: 4
|
102
|
+
summary: Hoff up your desktop.
|
103
|
+
test_files: []
|
104
|
+
has_rdoc:
|