maclight 1.0.1 → 2.0.0

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.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 214cc2a1bc8b6597a2aba20b8ada99138e581540
4
+ data.tar.gz: 6aaf23bcf522b680158eeaa49d285f1f3de846f7
5
+ SHA512:
6
+ metadata.gz: a94f4339ee62e3e2e314c10df89c1d49bcb347983499fda177de0ce3abcbbdabce885d2e1d2a013dc7462ca908c8416468fcf4fa49370a6a9983f1247d702557
7
+ data.tar.gz: 593bbc2b9d2e17e9b147890db0cd4248f29d2b5ed39b9607c30182808e6c4e5f82b8de232fede599b6bf4e412b7d73c8e9eb30df0ca8388d49e9a9f75b609146
data/README.md CHANGED
@@ -4,7 +4,7 @@ MacLight lets you control the keyboard-LEDs (capslock, numlock) on your Mac.
4
4
 
5
5
  ## Screenshot
6
6
 
7
- ![capslock](http://github.com/busyloop/maclight/raw/master/ass/screenshot_capslock.jpg)
7
+ ![capslock](https://github.com/busyloop/maclight/raw/master/ass/screenshot_capslock.jpg?raw=true)
8
8
 
9
9
  ## Installation
10
10
 
@@ -18,7 +18,7 @@ $ maclight --help
18
18
  Usage: maclight <command>
19
19
 
20
20
  MacLight v1.0.0 - LED control utility
21
-
21
+
22
22
  Options:
23
23
  --version: Print version and exit
24
24
  --help, -h: Show this message
@@ -16,11 +16,24 @@ module MacLight
16
16
 
17
17
  desc "Toggle keyboard LEDs"
18
18
  text "Toggle keyboard LEDs (capslock, numlock)"
19
- opt :capslock, "Toggle capslock LED (0|1)", :type => Integer
20
- opt :numlock, "Toggle numlock LED (0|1)", :type => Integer
19
+ opt :capslock, "Toggle capslock LED", :default => false
20
+ opt :numlock, "Toggle numlock LED", :default => false
21
21
  opt :verbose, "Print current state of capslock, numlock"
22
22
  parent "keyboard", "Control keyboard LEDs"
23
23
  def toggle(cmd, opts, argv)
24
+ raise Optix::HelpNeeded unless opts.values_at(:capslock, :numlock, :verbose).any?
25
+ MacLight.capslock(!MacLight.capslock) if opts[:capslock]
26
+ MacLight.numlock(!MacLight.numlock) if opts[:numlock]
27
+ puts "#{MacLight.capslock ? 1:0} #{MacLight.numlock ? 1:0}" if opts[:verbose]
28
+ end
29
+
30
+ desc "Set keyboard LEDs state"
31
+ text "Set keyboard LEDs (capslock, numlock) state (on, off)"
32
+ opt :capslock, "Set capslock LED (0|1)", :type => Integer
33
+ opt :numlock, "Set numlock LED (0|1)", :type => Integer
34
+ opt :verbose, "Print current state of capslock, numlock"
35
+ parent "keyboard"
36
+ def set(cmd, opts, argv)
24
37
  raise Optix::HelpNeeded unless opts.values_at(:capslock, :numlock, :verbose).any?
25
38
  MacLight.capslock(1 == opts[:capslock]) unless opts[:capslock].nil?
26
39
  MacLight.numlock(1 == opts[:numlock]) unless opts[:numlock].nil?
@@ -1,3 +1,3 @@
1
1
  module MacLight
2
- VERSION = "1.0.1"
2
+ VERSION = "2.0.0"
3
3
  end
@@ -19,4 +19,5 @@ Gem::Specification.new do |gem|
19
19
  gem.extensions = ['ext/maclight/extconf.rb']
20
20
 
21
21
  gem.add_dependency 'optix', '>= 1.2.2'
22
+ gem.add_development_dependency 'rake', '~> 10.1.0'
22
23
  end
metadata CHANGED
@@ -1,27 +1,43 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: maclight
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
5
- prerelease:
4
+ version: 2.0.0
6
5
  platform: ruby
7
6
  authors:
8
7
  - Moe
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2012-12-30 00:00:00.000000000Z
11
+ date: 2015-03-21 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: optix
16
- requirement: &70258854498720 !ruby/object:Gem::Requirement
17
- none: false
15
+ requirement: !ruby/object:Gem::Requirement
18
16
  requirements:
19
- - - ! '>='
17
+ - - '>='
20
18
  - !ruby/object:Gem::Version
21
19
  version: 1.2.2
22
20
  type: :runtime
23
21
  prerelease: false
24
- version_requirements: *70258854498720
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - '>='
25
+ - !ruby/object:Gem::Version
26
+ version: 1.2.2
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.1.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.1.0
25
41
  description: Control your Mac keyboard LEDs (capslock, numlock)
26
42
  email:
27
43
  - moe@busyloop.net
@@ -46,26 +62,25 @@ files:
46
62
  - maclight.gemspec
47
63
  homepage: https://github.com/busyloop/maclight
48
64
  licenses: []
65
+ metadata: {}
49
66
  post_install_message:
50
67
  rdoc_options: []
51
68
  require_paths:
52
69
  - lib
53
70
  required_ruby_version: !ruby/object:Gem::Requirement
54
- none: false
55
71
  requirements:
56
- - - ! '>='
72
+ - - '>='
57
73
  - !ruby/object:Gem::Version
58
74
  version: '0'
59
75
  required_rubygems_version: !ruby/object:Gem::Requirement
60
- none: false
61
76
  requirements:
62
- - - ! '>='
77
+ - - '>='
63
78
  - !ruby/object:Gem::Version
64
79
  version: '0'
65
80
  requirements: []
66
81
  rubyforge_project:
67
- rubygems_version: 1.8.10
82
+ rubygems_version: 2.0.14
68
83
  signing_key:
69
- specification_version: 3
84
+ specification_version: 4
70
85
  summary: Control your Mac keyboard LEDs (capslock, numlock)
71
86
  test_files: []