nakal 1.0.3 → 1.0.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: 61e2153b886871d6dd540d5c9112f7b6d69b4c5e
4
- data.tar.gz: 053513692e7e6a63ebf539b48e1177328c8c28f3
3
+ metadata.gz: a21ea77d8d0ca80f63d8a208a2cb0f334aa8122f
4
+ data.tar.gz: 5a5032bf7017ae757c330c5beed360075c9b2287
5
5
  SHA512:
6
- metadata.gz: a7dc1b1a46e61eedd7f195ce54c502d60b2ead67deee771ac8a6b04008dc246f4fa80a3f24eba4a8a7781f39b555f4009d90ade0f6e70b02335ca2a4675d0aa4
7
- data.tar.gz: 18f8f682b4ebe0ffcbd09985f30f7c48280dd3f7488debbfbefe5d16826760bb40abe73e901baf4ba205d6b575704896944ff4d5ce22e305308cdb3479898c9d
6
+ metadata.gz: 090617008a835be17966abb952d8a98cce52f7f8535a964de65beacb692f79256efe21202f28f8d8079ed3a02451b31ae2dd730adbc2501a346c03798e3a2464
7
+ data.tar.gz: bab5f5e1ae9140fa29b182a614c185f4135b0bfece3529f1e8b152a943e27fd8d505ce4549f243cb9182d25489d1f9bc6c6c45ec21ba83ad4b582d5ac434afb1
@@ -5,8 +5,6 @@ module Nakal
5
5
  private
6
6
 
7
7
  def capture_script
8
- xcode_7 = !(%x(instruments -s devices ; echo)).match(' Simulator\)')
9
- simulator_app_name = xcode_7 ? "Simulator" : "iOS Simulator"
10
8
  "osascript <<EOF
11
9
  tell application \"#{simulator_app_name}\"
12
10
  activate
@@ -18,15 +16,19 @@ module Nakal
18
16
  EOF"
19
17
  end
20
18
 
19
+ def simulator_app_name
20
+ xcode_7 = !(%x(instruments -s devices ; echo)).match(' Simulator\)')
21
+ xcode_7 ? "Simulator" : "iOS Simulator"
22
+ end
21
23
 
22
24
  def capture
23
25
  `#{capture_script}`
24
26
  sleep 1
25
- Dir.glob(File.expand_path('~/Desktop/iOS\\ Simulator\\ Screen\\ Shot - Apple\\ Watch*')).each { |f| FileUtils.rm(f) }
26
- latest_file = Dir.glob(File.expand_path('~/Desktop/iOS\\ Simulator\\ Screen\\ Shot*')).max_by { |f| File.mtime(f) }
27
+ Dir.glob(File.expand_path("~/Desktop/#{simulator_app_name}\\ Screen\\ Shot - Apple\\ Watch*")).each { |f| FileUtils.rm(f) }
28
+ latest_file = Dir.glob(File.expand_path("~/Desktop/#{simulator_app_name}\\ Screen\\ Shot*")).max_by { |f| File.mtime(f) }
27
29
  File.rename(latest_file, "#{Nakal.image_location}/#{@name}.png")
28
30
  end
29
31
 
30
32
  end
31
33
  end
32
- end
34
+ end
@@ -1,3 +1,3 @@
1
1
  module Nakal
2
- VERSION = "1.0.3"
2
+ VERSION = "1.0.4"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nakal
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rajdeep
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-02-08 00:00:00.000000000 Z
11
+ date: 2016-02-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rmagick