motion-addressbook 1.4.0 → 1.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (31) hide show
  1. data/.travis.yml +0 -1
  2. data/README.md +2 -3
  3. data/Rakefile +16 -4
  4. data/lib/motion-addressbook/version.rb +1 -1
  5. data/lib/motion-addressbook.rb +22 -10
  6. data/motion/address_book/{addr_book.rb → ios/addr_book.rb} +0 -0
  7. data/motion/address_book/{group.rb → ios/group.rb} +0 -0
  8. data/motion/address_book/{multi_value.rb → ios/multi_value.rb} +0 -0
  9. data/motion/address_book/{multi_valued.rb → ios/multi_valued.rb} +0 -0
  10. data/motion/address_book/{person.rb → ios/person.rb} +8 -0
  11. data/motion/address_book/{picker.rb → ios/picker.rb} +0 -0
  12. data/motion/address_book/{source.rb → ios/source.rb} +0 -0
  13. data/motion/address_book/osx/addr_book.rb +67 -0
  14. data/motion/address_book/osx/group.rb +122 -0
  15. data/motion/address_book/osx/multi_valued.rb +166 -0
  16. data/motion/address_book/osx/person.rb +350 -0
  17. data/motion/address_book.rb +13 -5
  18. data/motion-addressbook.gemspec +2 -2
  19. data/spec/{address_book → ios/address_book}/group_spec.rb +0 -0
  20. data/spec/{address_book → ios/address_book}/multi_valued_spec.rb +0 -0
  21. data/spec/{address_book → ios/address_book}/person_spec.rb +33 -154
  22. data/spec/{address_book → ios/address_book}/picker_spec.rb +0 -0
  23. data/spec/{helpers → ios/helpers}/bacon_matchers.rb +0 -0
  24. data/spec/{helpers → ios/helpers}/hacks.rb +0 -0
  25. data/spec/{helpers → ios/helpers}/person_helpers.rb +0 -0
  26. data/spec/osx/address_book/person_spec.rb +174 -0
  27. data/spec/osx/helpers/bacon_matchers.rb +11 -0
  28. data/spec/osx/helpers/hacks.rb +6 -0
  29. data/spec/osx/helpers/person_helpers.rb +12 -0
  30. metadata +39 -29
  31. data/spec/address_book/multi_value_spec.rb +0 -125
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: motion-addressbook
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.0
4
+ version: 1.5.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2013-05-17 00:00:00.000000000 Z
13
+ date: 2013-06-12 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: bubble-wrap
@@ -60,7 +60,7 @@ dependencies:
60
60
  - - ! '>='
61
61
  - !ruby/object:Gem::Version
62
62
  version: '0'
63
- description: A RubyMotion wrapper around the iOS Address Book framework
63
+ description: A RubyMotion wrapper around the iOS & OSX Address Book frameworks
64
64
  email:
65
65
  - alex@alexrothenberg.com
66
66
  - jmay@pobox.com
@@ -80,21 +80,28 @@ files:
80
80
  - lib/motion-addressbook/version.rb
81
81
  - motion-addressbook.gemspec
82
82
  - motion/address_book.rb
83
- - motion/address_book/addr_book.rb
84
- - motion/address_book/group.rb
85
- - motion/address_book/multi_value.rb
86
- - motion/address_book/multi_valued.rb
87
- - motion/address_book/person.rb
88
- - motion/address_book/picker.rb
89
- - motion/address_book/source.rb
90
- - spec/address_book/group_spec.rb
91
- - spec/address_book/multi_value_spec.rb
92
- - spec/address_book/multi_valued_spec.rb
93
- - spec/address_book/person_spec.rb
94
- - spec/address_book/picker_spec.rb
95
- - spec/helpers/bacon_matchers.rb
96
- - spec/helpers/hacks.rb
97
- - spec/helpers/person_helpers.rb
83
+ - motion/address_book/ios/addr_book.rb
84
+ - motion/address_book/ios/group.rb
85
+ - motion/address_book/ios/multi_value.rb
86
+ - motion/address_book/ios/multi_valued.rb
87
+ - motion/address_book/ios/person.rb
88
+ - motion/address_book/ios/picker.rb
89
+ - motion/address_book/ios/source.rb
90
+ - motion/address_book/osx/addr_book.rb
91
+ - motion/address_book/osx/group.rb
92
+ - motion/address_book/osx/multi_valued.rb
93
+ - motion/address_book/osx/person.rb
94
+ - spec/ios/address_book/group_spec.rb
95
+ - spec/ios/address_book/multi_valued_spec.rb
96
+ - spec/ios/address_book/person_spec.rb
97
+ - spec/ios/address_book/picker_spec.rb
98
+ - spec/ios/helpers/bacon_matchers.rb
99
+ - spec/ios/helpers/hacks.rb
100
+ - spec/ios/helpers/person_helpers.rb
101
+ - spec/osx/address_book/person_spec.rb
102
+ - spec/osx/helpers/bacon_matchers.rb
103
+ - spec/osx/helpers/hacks.rb
104
+ - spec/osx/helpers/person_helpers.rb
98
105
  homepage: ''
99
106
  licenses: []
100
107
  post_install_message:
@@ -109,7 +116,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
109
116
  version: '0'
110
117
  segments:
111
118
  - 0
112
- hash: -259703607999042735
119
+ hash: -2657752188704794631
113
120
  required_rubygems_version: !ruby/object:Gem::Requirement
114
121
  none: false
115
122
  requirements:
@@ -118,19 +125,22 @@ required_rubygems_version: !ruby/object:Gem::Requirement
118
125
  version: '0'
119
126
  segments:
120
127
  - 0
121
- hash: -259703607999042735
128
+ hash: -2657752188704794631
122
129
  requirements: []
123
130
  rubyforge_project:
124
131
  rubygems_version: 1.8.24
125
132
  signing_key:
126
133
  specification_version: 3
127
- summary: A RubyMotion wrapper around the iOS Address Book framework
134
+ summary: A RubyMotion wrapper around the iOS & OSX Address Book frameworks
128
135
  test_files:
129
- - spec/address_book/group_spec.rb
130
- - spec/address_book/multi_value_spec.rb
131
- - spec/address_book/multi_valued_spec.rb
132
- - spec/address_book/person_spec.rb
133
- - spec/address_book/picker_spec.rb
134
- - spec/helpers/bacon_matchers.rb
135
- - spec/helpers/hacks.rb
136
- - spec/helpers/person_helpers.rb
136
+ - spec/ios/address_book/group_spec.rb
137
+ - spec/ios/address_book/multi_valued_spec.rb
138
+ - spec/ios/address_book/person_spec.rb
139
+ - spec/ios/address_book/picker_spec.rb
140
+ - spec/ios/helpers/bacon_matchers.rb
141
+ - spec/ios/helpers/hacks.rb
142
+ - spec/ios/helpers/person_helpers.rb
143
+ - spec/osx/address_book/person_spec.rb
144
+ - spec/osx/helpers/bacon_matchers.rb
145
+ - spec/osx/helpers/hacks.rb
146
+ - spec/osx/helpers/person_helpers.rb
@@ -1,125 +0,0 @@
1
- describe AddressBook::MultiValue do
2
- describe 'properties on a new multivalue' do
3
- describe 'initializing with values' do
4
- before do
5
- @attributes = { :mobile => '123-456-7890', :iphone => '222-333-4444', :main => '555-1212',
6
- :home_fax => '1-617-555-8000', :work_fax => '1-212-555-0000', :pager => '99-9999-9999',
7
- :work => 'alex@work.com', :home => 'alex@home.com', :other => 'alex@other.com'}
8
- @multi_value = AddressBook::MultiValue.new @attributes
9
- end
10
-
11
- it 'should be able to get each of the single value fields' do
12
- @multi_value.mobile.should.equal @attributes[:mobile ]
13
- @multi_value.iphone.should.equal @attributes[:iphone ]
14
- @multi_value.main.should.equal @attributes[:main ]
15
- @multi_value.home_fax.should.equal @attributes[:home_fax]
16
- @multi_value.work_fax.should.equal @attributes[:work_fax]
17
- @multi_value.pager.should.equal @attributes[:pager ]
18
- @multi_value.work.should.equal @attributes[:work ]
19
- @multi_value.home.should.equal @attributes[:home ]
20
- @multi_value.other.should.equal @attributes[:other ]
21
- end
22
-
23
- it 'should give all the values in a list' do
24
- @multi_value.values.should == ["123-456-7890", "222-333-4444", "555-1212", "1-617-555-8000", "1-212-555-0000", "99-9999-9999", "alex@work.com", "alex@home.com", "alex@other.com"]
25
- end
26
- end
27
-
28
- describe 'setting each field' do
29
- before do
30
- @multi_value = AddressBook::MultiValue.new
31
- end
32
-
33
- it 'should be able to set the first name' do
34
- @multi_value.mobile = '123456789'
35
- @multi_value.mobile.should.equal '123456789'
36
- end
37
- it 'should be able to set the iphone' do
38
- @multi_value.iphone = '123456789'
39
- @multi_value.iphone.should.equal '123456789'
40
- end
41
- it 'should be able to set the main' do
42
- @multi_value.main = '123456789'
43
- @multi_value.main.should.equal '123456789'
44
- end
45
- it 'should be able to set the home fax' do
46
- @multi_value.home_fax = '123456789'
47
- @multi_value.home_fax.should.equal '123456789'
48
- end
49
- it 'should be able to set the work fax' do
50
- @multi_value.work_fax = '123456789'
51
- @multi_value.work_fax.should.equal '123456789'
52
- end
53
- it 'should be able to set the pager' do
54
- @multi_value.pager = '123456789'
55
- @multi_value.pager.should.equal '123456789'
56
- end
57
- it 'should be able to set the work' do
58
- @multi_value.work = 'a@work.com'
59
- @multi_value.work.should.equal 'a@work.com'
60
- end
61
- it 'should be able to set the home' do
62
- @multi_value.home = 'a@home.com'
63
- @multi_value.home.should.equal 'a@home.com'
64
- end
65
- it 'should be able to set the other' do
66
- @multi_value.other = 'a@other.com'
67
- @multi_value.other.should.equal 'a@other.com'
68
- end
69
- end
70
- end
71
-
72
- describe 'an existing multivalue' do
73
- before do
74
- @first_multi_value = AddressBook::MultiValue.new :mobile => '123-456-7890', :iphone => '99-8888888-7777777-66'
75
- @multi_value = AddressBook::MultiValue.new({:mobile => '987654321', :home_fax => '777-6666-4444'}, @first_multi_value.ab_multi_values)
76
- end
77
-
78
- it 'should ' do
79
- @multi_value.mobile.should == '987654321'
80
- @multi_value.iphone.should == '99-8888888-7777777-66'
81
- @multi_value.home_fax.should == '777-6666-4444'
82
- end
83
- end
84
-
85
- describe 'method missing magic' do
86
- before do
87
- @multi_value = AddressBook::MultiValue.new
88
- end
89
- describe 'getters' do
90
- it 'should have a getter for each attribute' do
91
- @multi_value.getter?('mobile' ).should.be truthy
92
- @multi_value.getter?('iphone' ).should.be truthy
93
- @multi_value.getter?('main' ).should.be truthy
94
- @multi_value.getter?('home_fax').should.be truthy
95
- @multi_value.getter?('work_fax').should.be truthy
96
- @multi_value.getter?('pager' ).should.be truthy
97
- @multi_value.getter?('work' ).should.be truthy
98
- @multi_value.getter?('home' ).should.be truthy
99
- @multi_value.getter?('other' ).should.be truthy
100
- end
101
- it 'should know what is not a getter' do
102
- @multi_value.getter?('nonesense').should.be falsey
103
- @multi_value.getter?('mobile=' ).should.be falsey
104
- end
105
- end
106
- describe 'setters' do
107
- it 'should have a setter for each attribute' do
108
- @multi_value.setter?('mobile=' ).should.be truthy
109
- @multi_value.setter?('iphone=' ).should.be truthy
110
- @multi_value.setter?('main=' ).should.be truthy
111
- @multi_value.setter?('home_fax=').should.be truthy
112
- @multi_value.setter?('work_fax=').should.be truthy
113
- @multi_value.setter?('pager=' ).should.be truthy
114
- @multi_value.setter?('work=' ).should.be truthy
115
- @multi_value.setter?('home=' ).should.be truthy
116
- @multi_value.setter?('other=' ).should.be truthy
117
- end
118
- it 'should know what is not a setter' do
119
- @multi_value.setter?('nonesense=').should.be falsey
120
- @multi_value.setter?('mobile' ).should.be falsey
121
- end
122
- end
123
- end
124
-
125
- end