cantango-api 0.0.0 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (51) hide show
  1. data/Gemfile +8 -5
  2. data/Gemfile.lock +20 -24
  3. data/README.mdown +73 -0
  4. data/VERSION +1 -1
  5. data/cantango-api.gemspec +42 -23
  6. data/lib/cantango/api/ability/account.rb +6 -6
  7. data/lib/cantango/api/ability/user.rb +1 -0
  8. data/lib/cantango/api/account.rb +9 -11
  9. data/lib/cantango/api/attributes.rb +1 -1
  10. data/lib/cantango/api/can/account.rb +2 -2
  11. data/lib/cantango/api/can/dsl/relation.rb +67 -0
  12. data/lib/cantango/api/can/dsl/scope.rb +24 -0
  13. data/lib/cantango/api/can/dsl.rb +26 -0
  14. data/lib/cantango/api/can/user.rb +1 -1
  15. data/lib/cantango/api/can.rb +1 -1
  16. data/lib/cantango/api/common.rb +16 -3
  17. data/lib/cantango/api/model/account.rb +9 -16
  18. data/lib/cantango/api/model/user.rb +10 -17
  19. data/lib/cantango/api/model.rb +3 -1
  20. data/lib/cantango/api/scope/account.rb +8 -5
  21. data/lib/cantango/api/scope/user.rb +1 -0
  22. data/lib/cantango/api/session/account.rb +1 -1
  23. data/lib/cantango/api/user.rb +9 -11
  24. data/lib/cantango/api.rb +7 -4
  25. data/lib/cantango/api_ext/macros/account.rb +8 -0
  26. data/lib/cantango/api_ext/macros/clazz.rb +17 -0
  27. data/lib/cantango/api_ext/macros/user.rb +8 -0
  28. data/lib/cantango/api_ext/macros.rb +12 -0
  29. data/lib/cantango/api_ext.rb +5 -0
  30. data/spec/cantango/api/ability/account_spec.rb +14 -15
  31. data/spec/cantango/api/ability/user_spec.rb +18 -22
  32. data/spec/cantango/api/account_spec.rb +40 -0
  33. data/spec/cantango/api/attributes_spec.rb +13 -14
  34. data/spec/cantango/api/can/account_spec.rb +40 -47
  35. data/spec/cantango/api/can/user_spec.rb +56 -83
  36. data/spec/cantango/api/common_spec.rb +37 -0
  37. data/spec/cantango/api/model/account_spec.rb +38 -0
  38. data/spec/cantango/api/model/user_spec.rb +35 -0
  39. data/spec/cantango/api/options_spec.rb +23 -0
  40. data/spec/cantango/api/scope/account_spec.rb +43 -0
  41. data/spec/cantango/api/scope/user_spec.rb +19 -51
  42. data/spec/cantango/api/session/account_spec.rb +0 -0
  43. data/spec/cantango/api/session/user_spec.rb +0 -0
  44. data/spec/cantango/api/user_spec.rb +40 -0
  45. data/spec/cantango/api_ext/macros/account_spec.rb +16 -0
  46. data/spec/cantango/api_ext/macros/clazz_spec.rb +26 -0
  47. data/spec/cantango/api_ext/macros/user_spec.rb +17 -0
  48. data/spec/fixtures/models/user_account.rb +1 -15
  49. data/spec/helpers/current_user_accounts.rb +1 -1
  50. data/spec/spec_helper.rb +0 -1
  51. metadata +55 -28
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cantango-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.0
4
+ version: 0.1.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-11-25 00:00:00.000000000Z
12
+ date: 2011-12-08 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
16
- requirement: &895281780 !ruby/object:Gem::Requirement
16
+ requirement: &70114366393220 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,54 +21,65 @@ dependencies:
21
21
  version: '3.1'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *895281780
24
+ version_requirements: *70114366393220
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: sugar-high
27
- requirement: &895281260 !ruby/object:Gem::Requirement
27
+ requirement: &70114366392120 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
- - - ! '>='
30
+ - - ~>
31
31
  - !ruby/object:Gem::Version
32
- version: 0.6.0
32
+ version: 0.6.2
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *895281260
35
+ version_requirements: *70114366392120
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: sweetloader
38
- requirement: &895280240 !ruby/object:Gem::Requirement
38
+ requirement: &70114366390820 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ~>
42
42
  - !ruby/object:Gem::Version
43
- version: 0.1.0
43
+ version: 0.1.6
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *895280240
46
+ version_requirements: *70114366390820
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: hashie
49
- requirement: &895279880 !ruby/object:Gem::Requirement
49
+ requirement: &70114366388960 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
- - - ! '>='
52
+ - - ~>
53
53
  - !ruby/object:Gem::Version
54
- version: '0'
54
+ version: '1.2'
55
55
  type: :runtime
56
56
  prerelease: false
57
- version_requirements: *895279880
57
+ version_requirements: *70114366388960
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: cantango-config
60
- requirement: &895279280 !ruby/object:Gem::Requirement
60
+ requirement: &70114366386640 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ! '>='
64
64
  - !ruby/object:Gem::Version
65
- version: '0'
65
+ version: 0.1.8.1
66
+ type: :runtime
67
+ prerelease: false
68
+ version_requirements: *70114366386640
69
+ - !ruby/object:Gem::Dependency
70
+ name: cantango-core
71
+ requirement: &70114366385140 !ruby/object:Gem::Requirement
72
+ none: false
73
+ requirements:
74
+ - - ! '>='
75
+ - !ruby/object:Gem::Version
76
+ version: 0.1.9.1
66
77
  type: :runtime
67
78
  prerelease: false
68
- version_requirements: *895279280
79
+ version_requirements: *70114366385140
69
80
  - !ruby/object:Gem::Dependency
70
81
  name: bundler
71
- requirement: &895278600 !ruby/object:Gem::Requirement
82
+ requirement: &70114366384140 !ruby/object:Gem::Requirement
72
83
  none: false
73
84
  requirements:
74
85
  - - ! '>='
@@ -76,10 +87,10 @@ dependencies:
76
87
  version: 1.1.rc
77
88
  type: :development
78
89
  prerelease: false
79
- version_requirements: *895278600
90
+ version_requirements: *70114366384140
80
91
  - !ruby/object:Gem::Dependency
81
92
  name: jeweler
82
- requirement: &895278190 !ruby/object:Gem::Requirement
93
+ requirement: &70114366382760 !ruby/object:Gem::Requirement
83
94
  none: false
84
95
  requirements:
85
96
  - - ! '>='
@@ -87,10 +98,10 @@ dependencies:
87
98
  version: 1.6.4
88
99
  type: :development
89
100
  prerelease: false
90
- version_requirements: *895278190
101
+ version_requirements: *70114366382760
91
102
  - !ruby/object:Gem::Dependency
92
103
  name: rcov
93
- requirement: &895277780 !ruby/object:Gem::Requirement
104
+ requirement: &70114366381860 !ruby/object:Gem::Requirement
94
105
  none: false
95
106
  requirements:
96
107
  - - ! '>='
@@ -98,10 +109,10 @@ dependencies:
98
109
  version: '0'
99
110
  type: :development
100
111
  prerelease: false
101
- version_requirements: *895277780
112
+ version_requirements: *70114366381860
102
113
  - !ruby/object:Gem::Dependency
103
114
  name: rspec
104
- requirement: &895277450 !ruby/object:Gem::Requirement
115
+ requirement: &70114366380620 !ruby/object:Gem::Requirement
105
116
  none: false
106
117
  requirements:
107
118
  - - ! '>='
@@ -109,7 +120,7 @@ dependencies:
109
120
  version: 2.6.0
110
121
  type: :development
111
122
  prerelease: false
112
- version_requirements: *895277450
123
+ version_requirements: *70114366380620
113
124
  description: Ability, Can, Scope, Session, User, Account and more APIs for CanTango
114
125
  email: kristian@unity3d.com
115
126
  executables: []
@@ -135,6 +146,9 @@ files:
135
146
  - lib/cantango/api/attributes.rb
136
147
  - lib/cantango/api/can.rb
137
148
  - lib/cantango/api/can/account.rb
149
+ - lib/cantango/api/can/dsl.rb
150
+ - lib/cantango/api/can/dsl/relation.rb
151
+ - lib/cantango/api/can/dsl/scope.rb
138
152
  - lib/cantango/api/can/user.rb
139
153
  - lib/cantango/api/common.rb
140
154
  - lib/cantango/api/model.rb
@@ -148,16 +162,29 @@ files:
148
162
  - lib/cantango/api/session/account.rb
149
163
  - lib/cantango/api/session/user.rb
150
164
  - lib/cantango/api/user.rb
165
+ - lib/cantango/api_ext.rb
166
+ - lib/cantango/api_ext/macros.rb
167
+ - lib/cantango/api_ext/macros/account.rb
168
+ - lib/cantango/api_ext/macros/clazz.rb
169
+ - lib/cantango/api_ext/macros/user.rb
151
170
  - spec/cantango/api/ability/account_spec.rb
152
171
  - spec/cantango/api/ability/user_spec.rb
153
172
  - spec/cantango/api/account_spec.rb
154
173
  - spec/cantango/api/attributes_spec.rb
155
174
  - spec/cantango/api/can/account_spec.rb
156
175
  - spec/cantango/api/can/user_spec.rb
176
+ - spec/cantango/api/common_spec.rb
177
+ - spec/cantango/api/model/account_spec.rb
178
+ - spec/cantango/api/model/user_spec.rb
157
179
  - spec/cantango/api/options_spec.rb
158
180
  - spec/cantango/api/scope/account_spec.rb
159
181
  - spec/cantango/api/scope/user_spec.rb
182
+ - spec/cantango/api/session/account_spec.rb
183
+ - spec/cantango/api/session/user_spec.rb
160
184
  - spec/cantango/api/user_spec.rb
185
+ - spec/cantango/api_ext/macros/account_spec.rb
186
+ - spec/cantango/api_ext/macros/clazz_spec.rb
187
+ - spec/cantango/api_ext/macros/user_spec.rb
161
188
  - spec/cantango/api_spec.rb
162
189
  - spec/cantango_api_spec.rb
163
190
  - spec/fixtures/models.rb
@@ -187,7 +214,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
187
214
  version: '0'
188
215
  segments:
189
216
  - 0
190
- hash: 568185265
217
+ hash: -3829316605648255715
191
218
  required_rubygems_version: !ruby/object:Gem::Requirement
192
219
  none: false
193
220
  requirements:
@@ -196,7 +223,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
196
223
  version: '0'
197
224
  requirements: []
198
225
  rubyforge_project:
199
- rubygems_version: 1.8.10
226
+ rubygems_version: 1.8.6
200
227
  signing_key:
201
228
  specification_version: 3
202
229
  summary: The main API for CanTango