xcselect 0.1.4 → 0.1.5

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.
data/Rakefile CHANGED
@@ -1 +1,10 @@
1
+ require 'rake'
1
2
  require 'bundler/gem_tasks'
3
+ require 'rake/testtask'
4
+
5
+ Rake::TestTask.new do |t|
6
+ t.libs << 'test'
7
+ end
8
+
9
+ desc "Run Tests"
10
+ task :default => :test
@@ -17,23 +17,27 @@ module Xcselect
17
17
  end
18
18
 
19
19
  def self.parse file_name
20
- ns_plist = Plist::parse_xml(read_bin_plist_to_xml(file_name))
21
- # this is the integer that we will use to filter all archived nkissue objects
22
- nk_issue_key = find_class_key(ns_plist)
23
-
24
- # filter just the nkissue hashes
25
- object_array = ns_plist['$objects']
26
- obj_key_hashs = object_array.select{|o| o.class == Hash && o['$class'] && nk_issue_key == o['$class']['CF$UID'] }
20
+ begin
21
+ ns_plist = Plist::parse_xml(read_bin_plist_to_xml(file_name))
22
+ # this is the integer that we will use to filter all archived nkissue objects
23
+ nk_issue_key = find_class_key(ns_plist)
24
+
25
+ # filter just the nkissue hashes
26
+ object_array = ns_plist['$objects']
27
+ obj_key_hashs = object_array.select{|o| o.class == Hash && o['$class'] && nk_issue_key == o['$class']['CF$UID'] }
27
28
 
28
- issues = {}
29
- obj_key_hashs.each do |nskey|
30
- issue = NKIssue.new
31
- issue.name = object_array[nskey['name']['CF$UID']]
32
- issue.uuid = object_array[nskey['directory']['CF$UID']]
33
- issue.date = self.archive_time_to_time(object_array[nskey['date']['CF$UID']]['NS.time'])
34
- issues[issue.name] = issue # unless name.nil?
29
+ issues = {}
30
+ obj_key_hashs.each do |nskey|
31
+ issue = NKIssue.new
32
+ issue.name = object_array[nskey['name']['CF$UID']]
33
+ issue.uuid = object_array[nskey['directory']['CF$UID']]
34
+ issue.date = self.archive_time_to_time(object_array[nskey['date']['CF$UID']]['NS.time'])
35
+ issues[issue.name] = issue # unless name.nil?
36
+ end
37
+ return issues
38
+ rescue Exception => e
39
+ return {}
35
40
  end
36
- return issues
37
41
  end
38
42
 
39
43
  def to_s
@@ -1,3 +1,3 @@
1
1
  module Xcselect
2
- VERSION = "0.1.4"
2
+ VERSION = "0.1.5"
3
3
  end
@@ -10,7 +10,7 @@ include Xcselect
10
10
  class NKIssueTest < Test::Unit::TestCase
11
11
  attr_accessor :issues
12
12
  def setup
13
- @issues = NKIssue.parse "big_cats.plist"
13
+ @issues = NKIssue.parse File.dirname(__FILE__) + "/big_cats.plist"
14
14
  end
15
15
 
16
16
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: xcselect
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-08-05 00:00:00.000000000 Z
12
+ date: 2012-08-08 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: A more user friendly interface to the xcode-select command showing more
15
15
  info, xcsim - access the simulator application folders quickly
@@ -34,8 +34,8 @@ files:
34
34
  - lib/xcselect/version.rb
35
35
  - lib/xcselect/xcapp.rb
36
36
  - lib/xcselect/xcode.rb
37
- - tests/big_cats.plist
38
- - tests/test_nkissue.rb
37
+ - test/big_cats.plist
38
+ - test/test_nkissue.rb
39
39
  - xcselect.gemspec
40
40
  homepage: https://github.com/bigkm/xcselect
41
41
  licenses: []
@@ -61,4 +61,6 @@ rubygems_version: 1.8.24
61
61
  signing_key:
62
62
  specification_version: 3
63
63
  summary: xcselect - Xcode Select
64
- test_files: []
64
+ test_files:
65
+ - test/big_cats.plist
66
+ - test/test_nkissue.rb
File without changes