motion-capture 1.2.2 → 1.2.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 07f7f1e40256802d73115f3bb22e8bf34de7a037
4
- data.tar.gz: 3e4b7325ebb2e8e57ea8b9a89b56fa3efac0732e
3
+ metadata.gz: 45554733eedab534e6821dacf7e406ded0ca56ca
4
+ data.tar.gz: da06914f0262e3b3e5464e25438afbb2eb028f81
5
5
  SHA512:
6
- metadata.gz: a4d8836518d35462514bfc3f668c91690348f4c233fa16829912ca4b5890d3b002c02b0aa918db8ddf058bec6f08387558243aad3fd6c83bf3640a3d529b36f5
7
- data.tar.gz: 29fe72673e7f09b2fc9e92fcd11950013f6991b042dbd83064db11d39afe50ba68a1ac912f50ba751b18b3384f88265d95a01b63cd0309f31da1a8621ee705ba
6
+ metadata.gz: 1cf2112337bebae3517694c7d624418eac47ddeac5e9b0d0a01e48173635e754fd117f584b4ac90e37c1f643921086bcb1b4ef0200ccbc116a3a36d556fc4ff4
7
+ data.tar.gz: 6e5eb10ce04a9b678b221b3c483b624cbde9455740d13def41968d7fdf7c557aa0c32c504b8c7aeaba2ba01159cdd394674bcf817bffd879e13cdfdeae24d425
@@ -132,9 +132,11 @@ module Motion; class Capture
132
132
  end
133
133
 
134
134
  def set_flash(mode = :auto)
135
- configure_with_lock do
136
- device.flashMode = FLASH_MODES[mode] if FLASH_MODES.keys.include? mode
137
- end
135
+ configure_with_lock { device.flashMode = FLASH_MODES[mode] } if flash_mode_available?(mode)
136
+ end
137
+
138
+ def flash_mode_available?(mode)
139
+ FLASH_MODES.keys.include?(mode) && device.isFlashModeSupported(FLASH_MODES[mode])
138
140
  end
139
141
 
140
142
  private
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: motion-capture
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.2
4
+ version: 1.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Devon Blandin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-10-29 00:00:00.000000000 Z
11
+ date: 2014-01-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -54,7 +54,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
54
54
  version: '0'
55
55
  requirements: []
56
56
  rubyforge_project:
57
- rubygems_version: 2.1.1
57
+ rubygems_version: 2.0.3
58
58
  signing_key:
59
59
  specification_version: 4
60
60
  summary: RubyMotion AVFoundation wrapper