gearbox 0.1.0 → 0.1.10

Sign up to get free protection for your applications and to get access to all the features.
Files changed (43) hide show
  1. data/Gemfile +5 -3
  2. data/Rakefile +1 -0
  3. data/VERSION +1 -1
  4. data/bin/gearbox +9 -0
  5. data/gearbox.gemspec +134 -0
  6. data/lib/gearbox.rb +124 -5
  7. data/lib/gearbox/attribute.rb +128 -0
  8. data/lib/gearbox/mixins/active_model_implementation.rb +27 -0
  9. data/lib/gearbox/mixins/resource.rb +20 -4
  10. data/lib/gearbox/mixins/semantic_accessors.rb +128 -89
  11. data/lib/gearbox/mixins/subject_methods.rb +88 -0
  12. data/lib/gearbox/rdf_collection.rb +22 -8
  13. data/lib/gearbox/types.rb +9 -8
  14. data/lib/gearbox/vocabulary.rb +149 -0
  15. data/lib/pry_utilities.rb +71 -0
  16. data/scratch/4s.rb +335 -0
  17. data/scratch/DEVELOPMENT_NOTES.md +85 -0
  18. data/scratch/actionable.md +34 -0
  19. data/scratch/ccrdf.html-rdfa.nq +100 -0
  20. data/scratch/foo.rb +17 -0
  21. data/scratch/index.rdf +7932 -0
  22. data/scratch/j2.rb +10 -0
  23. data/scratch/junk.rb +16 -0
  24. data/scratch/out.rb +67 -0
  25. data/spec/gearbox/attribute_spec.rb +455 -0
  26. data/spec/gearbox/mixins/active_model_implementation_spec.rb +18 -0
  27. data/spec/gearbox/mixins/ad_hoc_properties_spec.rb +44 -44
  28. data/spec/gearbox/mixins/resource_spec.rb +47 -8
  29. data/spec/gearbox/mixins/semantic_accessors_spec.rb +72 -43
  30. data/spec/gearbox/mixins/subject_methods_spec.rb +126 -0
  31. data/spec/gearbox/rdf_collection_spec.rb +28 -2
  32. data/spec/gearbox_spec.rb +6 -2
  33. data/spec/spec_helper.rb +1 -0
  34. metadata +150 -42
  35. data/Gemfile.lock +0 -138
  36. data/lib/examples/audience.rb +0 -24
  37. data/lib/examples/person.rb +0 -29
  38. data/lib/examples/reference.rb +0 -38
  39. data/lib/examples/theme.rb +0 -8
  40. data/spec/examples/audience_spec.rb +0 -28
  41. data/spec/examples/person_spec.rb +0 -45
  42. data/spec/examples/reference_spec.rb +0 -43
  43. data/spec/examples/theme_spec.rb +0 -137
@@ -6,8 +6,12 @@ describe Gearbox do
6
6
  defined?(OpenStruct).must_equal('constant')
7
7
  end
8
8
 
9
- it "depends on uuid" do
10
- defined?(UUID).must_equal('constant')
9
+ it "depends on sparql" do
10
+ defined?(SPARQL).must_equal('constant')
11
+ end
12
+
13
+ it "depends on ActiveModel" do
14
+ defined?(ActiveModel).must_equal('constant')
11
15
  end
12
16
  end
13
17
 
@@ -1,5 +1,6 @@
1
1
  require 'rubygems'
2
2
  require 'bundler'
3
+ require 'pry'
3
4
 
4
5
  begin
5
6
  Bundler.setup(:default, :development)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gearbox
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.10
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: 2012-03-02 00:00:00.000000000Z
12
+ date: 2012-04-03 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: linkeddata
16
- requirement: &2168807240 !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,47 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *2168807240
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: '0'
30
+ - !ruby/object:Gem::Dependency
31
+ name: sparql
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - ! '>='
36
+ - !ruby/object:Gem::Version
37
+ version: '0'
38
+ type: :runtime
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: '0'
46
+ - !ruby/object:Gem::Dependency
47
+ name: equivalent-xml
48
+ requirement: !ruby/object:Gem::Requirement
49
+ none: false
50
+ requirements:
51
+ - - ! '>='
52
+ - !ruby/object:Gem::Version
53
+ version: '0'
54
+ type: :runtime
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
25
62
  - !ruby/object:Gem::Dependency
26
- name: rspec
27
- requirement: &2168806240 !ruby/object:Gem::Requirement
63
+ name: activemodel
64
+ requirement: !ruby/object:Gem::Requirement
28
65
  none: false
29
66
  requirements:
30
67
  - - ! '>='
@@ -32,10 +69,15 @@ dependencies:
32
69
  version: '0'
33
70
  type: :runtime
34
71
  prerelease: false
35
- version_requirements: *2168806240
72
+ version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ! '>='
76
+ - !ruby/object:Gem::Version
77
+ version: '0'
36
78
  - !ruby/object:Gem::Dependency
37
- name: uuid
38
- requirement: &2168805000 !ruby/object:Gem::Requirement
79
+ name: pry
80
+ requirement: !ruby/object:Gem::Requirement
39
81
  none: false
40
82
  requirements:
41
83
  - - ! '>='
@@ -43,10 +85,15 @@ dependencies:
43
85
  version: '0'
44
86
  type: :runtime
45
87
  prerelease: false
46
- version_requirements: *2168805000
88
+ version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
90
+ requirements:
91
+ - - ! '>='
92
+ - !ruby/object:Gem::Version
93
+ version: '0'
47
94
  - !ruby/object:Gem::Dependency
48
95
  name: autotest-fsevent
49
- requirement: &2168803360 !ruby/object:Gem::Requirement
96
+ requirement: !ruby/object:Gem::Requirement
50
97
  none: false
51
98
  requirements:
52
99
  - - ! '>='
@@ -54,10 +101,15 @@ dependencies:
54
101
  version: '0'
55
102
  type: :runtime
56
103
  prerelease: false
57
- version_requirements: *2168803360
104
+ version_requirements: !ruby/object:Gem::Requirement
105
+ none: false
106
+ requirements:
107
+ - - ! '>='
108
+ - !ruby/object:Gem::Version
109
+ version: '0'
58
110
  - !ruby/object:Gem::Dependency
59
111
  name: autotest-growl
60
- requirement: &2168800780 !ruby/object:Gem::Requirement
112
+ requirement: !ruby/object:Gem::Requirement
61
113
  none: false
62
114
  requirements:
63
115
  - - ! '>='
@@ -65,10 +117,15 @@ dependencies:
65
117
  version: '0'
66
118
  type: :runtime
67
119
  prerelease: false
68
- version_requirements: *2168800780
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ none: false
122
+ requirements:
123
+ - - ! '>='
124
+ - !ruby/object:Gem::Version
125
+ version: '0'
69
126
  - !ruby/object:Gem::Dependency
70
127
  name: minitest
71
- requirement: &2168799800 !ruby/object:Gem::Requirement
128
+ requirement: !ruby/object:Gem::Requirement
72
129
  none: false
73
130
  requirements:
74
131
  - - ! '>='
@@ -76,10 +133,15 @@ dependencies:
76
133
  version: '0'
77
134
  type: :development
78
135
  prerelease: false
79
- version_requirements: *2168799800
136
+ version_requirements: !ruby/object:Gem::Requirement
137
+ none: false
138
+ requirements:
139
+ - - ! '>='
140
+ - !ruby/object:Gem::Version
141
+ version: '0'
80
142
  - !ruby/object:Gem::Dependency
81
143
  name: yard
82
- requirement: &2168798460 !ruby/object:Gem::Requirement
144
+ requirement: !ruby/object:Gem::Requirement
83
145
  none: false
84
146
  requirements:
85
147
  - - ~>
@@ -87,10 +149,15 @@ dependencies:
87
149
  version: 0.6.0
88
150
  type: :development
89
151
  prerelease: false
90
- version_requirements: *2168798460
152
+ version_requirements: !ruby/object:Gem::Requirement
153
+ none: false
154
+ requirements:
155
+ - - ~>
156
+ - !ruby/object:Gem::Version
157
+ version: 0.6.0
91
158
  - !ruby/object:Gem::Dependency
92
159
  name: bundler
93
- requirement: &2168797220 !ruby/object:Gem::Requirement
160
+ requirement: !ruby/object:Gem::Requirement
94
161
  none: false
95
162
  requirements:
96
163
  - - ! '>='
@@ -98,10 +165,15 @@ dependencies:
98
165
  version: '0'
99
166
  type: :development
100
167
  prerelease: false
101
- version_requirements: *2168797220
168
+ version_requirements: !ruby/object:Gem::Requirement
169
+ none: false
170
+ requirements:
171
+ - - ! '>='
172
+ - !ruby/object:Gem::Version
173
+ version: '0'
102
174
  - !ruby/object:Gem::Dependency
103
175
  name: jeweler
104
- requirement: &2168795880 !ruby/object:Gem::Requirement
176
+ requirement: !ruby/object:Gem::Requirement
105
177
  none: false
106
178
  requirements:
107
179
  - - ~>
@@ -109,10 +181,15 @@ dependencies:
109
181
  version: 1.6.4
110
182
  type: :development
111
183
  prerelease: false
112
- version_requirements: *2168795880
184
+ version_requirements: !ruby/object:Gem::Requirement
185
+ none: false
186
+ requirements:
187
+ - - ~>
188
+ - !ruby/object:Gem::Version
189
+ version: 1.6.4
113
190
  - !ruby/object:Gem::Dependency
114
191
  name: simplecov
115
- requirement: &2168794200 !ruby/object:Gem::Requirement
192
+ requirement: !ruby/object:Gem::Requirement
116
193
  none: false
117
194
  requirements:
118
195
  - - ! '>='
@@ -120,10 +197,15 @@ dependencies:
120
197
  version: '0'
121
198
  type: :development
122
199
  prerelease: false
123
- version_requirements: *2168794200
200
+ version_requirements: !ruby/object:Gem::Requirement
201
+ none: false
202
+ requirements:
203
+ - - ! '>='
204
+ - !ruby/object:Gem::Version
205
+ version: '0'
124
206
  - !ruby/object:Gem::Dependency
125
207
  name: guard-markdown
126
- requirement: &2168792740 !ruby/object:Gem::Requirement
208
+ requirement: !ruby/object:Gem::Requirement
127
209
  none: false
128
210
  requirements:
129
211
  - - ! '>='
@@ -131,10 +213,15 @@ dependencies:
131
213
  version: '0'
132
214
  type: :development
133
215
  prerelease: false
134
- version_requirements: *2168792740
216
+ version_requirements: !ruby/object:Gem::Requirement
217
+ none: false
218
+ requirements:
219
+ - - ! '>='
220
+ - !ruby/object:Gem::Version
221
+ version: '0'
135
222
  - !ruby/object:Gem::Dependency
136
223
  name: ruby-debug19
137
- requirement: &2168791760 !ruby/object:Gem::Requirement
224
+ requirement: !ruby/object:Gem::Requirement
138
225
  none: false
139
226
  requirements:
140
227
  - - ! '>='
@@ -142,10 +229,15 @@ dependencies:
142
229
  version: '0'
143
230
  type: :development
144
231
  prerelease: false
145
- version_requirements: *2168791760
232
+ version_requirements: !ruby/object:Gem::Requirement
233
+ none: false
234
+ requirements:
235
+ - - ! '>='
236
+ - !ruby/object:Gem::Version
237
+ version: '0'
146
238
  - !ruby/object:Gem::Dependency
147
239
  name: guard-minitest
148
- requirement: &2168790840 !ruby/object:Gem::Requirement
240
+ requirement: !ruby/object:Gem::Requirement
149
241
  none: false
150
242
  requirements:
151
243
  - - ! '>='
@@ -153,10 +245,16 @@ dependencies:
153
245
  version: '0'
154
246
  type: :development
155
247
  prerelease: false
156
- version_requirements: *2168790840
248
+ version_requirements: !ruby/object:Gem::Requirement
249
+ none: false
250
+ requirements:
251
+ - - ! '>='
252
+ - !ruby/object:Gem::Version
253
+ version: '0'
157
254
  description: A SPARQL-driven modeling toolset for semantic models.
158
255
  email: davidlamontrichards@gmail.com
159
- executables: []
256
+ executables:
257
+ - gearbox
160
258
  extensions: []
161
259
  extra_rdoc_files:
162
260
  - LICENSE.txt
@@ -165,22 +263,22 @@ extra_rdoc_files:
165
263
  files:
166
264
  - .document
167
265
  - Gemfile
168
- - Gemfile.lock
169
266
  - Guardfile
170
267
  - LICENSE.txt
171
268
  - README.html
172
269
  - README.md
173
270
  - Rakefile
174
271
  - VERSION
175
- - lib/examples/audience.rb
176
- - lib/examples/person.rb
177
- - lib/examples/reference.rb
178
- - lib/examples/theme.rb
272
+ - bin/gearbox
273
+ - gearbox.gemspec
179
274
  - lib/gearbox.rb
275
+ - lib/gearbox/attribute.rb
180
276
  - lib/gearbox/attribute_collection.rb
277
+ - lib/gearbox/mixins/active_model_implementation.rb
181
278
  - lib/gearbox/mixins/ad_hoc_properties.rb
182
279
  - lib/gearbox/mixins/resource.rb
183
280
  - lib/gearbox/mixins/semantic_accessors.rb
281
+ - lib/gearbox/mixins/subject_methods.rb
184
282
  - lib/gearbox/rdf_collection.rb
185
283
  - lib/gearbox/type.rb
186
284
  - lib/gearbox/types.rb
@@ -193,14 +291,24 @@ files:
193
291
  - lib/gearbox/types/native.rb
194
292
  - lib/gearbox/types/string.rb
195
293
  - lib/gearbox/types/uri.rb
196
- - spec/examples/audience_spec.rb
197
- - spec/examples/person_spec.rb
198
- - spec/examples/reference_spec.rb
199
- - spec/examples/theme_spec.rb
294
+ - lib/gearbox/vocabulary.rb
295
+ - lib/pry_utilities.rb
296
+ - scratch/4s.rb
297
+ - scratch/DEVELOPMENT_NOTES.md
298
+ - scratch/actionable.md
299
+ - scratch/ccrdf.html-rdfa.nq
300
+ - scratch/foo.rb
301
+ - scratch/index.rdf
302
+ - scratch/j2.rb
303
+ - scratch/junk.rb
304
+ - scratch/out.rb
200
305
  - spec/gearbox/attribute_collection_spec.rb
306
+ - spec/gearbox/attribute_spec.rb
307
+ - spec/gearbox/mixins/active_model_implementation_spec.rb
201
308
  - spec/gearbox/mixins/ad_hoc_properties_spec.rb
202
309
  - spec/gearbox/mixins/resource_spec.rb
203
310
  - spec/gearbox/mixins/semantic_accessors_spec.rb
311
+ - spec/gearbox/mixins/subject_methods_spec.rb
204
312
  - spec/gearbox/rdf_collection_spec.rb
205
313
  - spec/gearbox_spec.rb
206
314
  - spec/spec_helper.rb
@@ -219,7 +327,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
219
327
  version: '0'
220
328
  segments:
221
329
  - 0
222
- hash: -317438611168027119
330
+ hash: -845810536138016079
223
331
  required_rubygems_version: !ruby/object:Gem::Requirement
224
332
  none: false
225
333
  requirements:
@@ -228,7 +336,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
228
336
  version: '0'
229
337
  requirements: []
230
338
  rubyforge_project:
231
- rubygems_version: 1.8.17
339
+ rubygems_version: 1.8.18
232
340
  signing_key:
233
341
  specification_version: 3
234
342
  summary: Flexible semantic models.
@@ -1,138 +0,0 @@
1
- GIT
2
- remote: git://github.com/aspiers/guard-minitest.git
3
- revision: 4b660261d3596b7dd2a9fe135f7ee23ca0c04cc1
4
- specs:
5
- guard-minitest (0.4.0)
6
- guard (~> 0.4)
7
-
8
- GEM
9
- remote: http://rubygems.org/
10
- specs:
11
- addressable (2.2.7)
12
- archive-tar-minitar (0.5.2)
13
- autotest-fsevent (0.2.8)
14
- sys-uname
15
- autotest-growl (0.2.16)
16
- backports (2.3.0)
17
- columnize (0.3.6)
18
- diff-lcs (1.1.3)
19
- ffi (1.0.11)
20
- git (1.2.5)
21
- guard (0.10.0)
22
- ffi (>= 0.5.0)
23
- thor (~> 0.14.6)
24
- guard-markdown (0.1.4)
25
- guard (>= 0.2.2)
26
- kramdown (~> 0.13.3)
27
- haml (3.1.4)
28
- htmlentities (4.3.1)
29
- jeweler (1.6.4)
30
- bundler (~> 1.0)
31
- git (>= 1.2.5)
32
- rake
33
- json (1.6.5)
34
- json-ld (0.1.0)
35
- json (>= 1.5.1)
36
- rdf (>= 0.3.4)
37
- json_pure (1.6.5)
38
- kramdown (0.13.5)
39
- linecache19 (0.5.12)
40
- ruby_core_source (>= 0.1.4)
41
- linkeddata (0.3.5)
42
- json-ld (>= 0.1.0)
43
- rdf (>= 0.3.5)
44
- rdf-isomorphic (>= 0.3.4)
45
- rdf-json (>= 0.3.0)
46
- rdf-microdata (>= 0.2.3)
47
- rdf-n3 (>= 0.3.6)
48
- rdf-rdfa (>= 0.3.9)
49
- rdf-rdfxml (>= 0.3.5)
50
- rdf-trig (>= 0.1.1)
51
- rdf-trix (>= 0.3.0)
52
- rdf-turtle (>= 0.1.1)
53
- macaddr (1.5.0)
54
- systemu (>= 2.4.0)
55
- minitest (2.11.3)
56
- multi_json (1.1.0)
57
- nokogiri (1.5.0)
58
- rake (0.9.2.2)
59
- rdf (0.3.5)
60
- addressable (>= 2.2.6)
61
- rdf-isomorphic (0.3.4)
62
- rdf (>= 0.2.3)
63
- rdf-json (0.3.0)
64
- json_pure (>= 1.4.2)
65
- rdf (~> 0.3.0)
66
- rdf-microdata (0.2.3.1)
67
- htmlentities (>= 4.3.0)
68
- json (>= 1.6.1)
69
- rdf (>= 0.3.4)
70
- rdf-xsd (>= 0.3.4)
71
- rdf-n3 (0.3.6)
72
- rdf (>= 0.3.4)
73
- rdf-rdfa (0.3.9)
74
- backports
75
- haml (>= 3.0.0)
76
- htmlentities (>= 4.3.0)
77
- rdf (>= 0.3.3)
78
- rdf-xsd (>= 0.3.5)
79
- rdf-rdfxml (0.3.5)
80
- nokogiri (>= 1.4.4)
81
- rdf (>= 0.3.4)
82
- rdf-trig (0.1.1)
83
- rdf (>= 0.3.4)
84
- rdf-turtle (>= 0.1.1)
85
- rdf-trix (0.3.0)
86
- rdf (~> 0.3.0)
87
- rdf-turtle (0.1.1)
88
- rdf (>= 0.3.4)
89
- rdf-xsd (0.3.5)
90
- nokogiri (>= 1.5.0)
91
- rdf (>= 0.3.4)
92
- rspec (2.8.0)
93
- rspec-core (~> 2.8.0)
94
- rspec-expectations (~> 2.8.0)
95
- rspec-mocks (~> 2.8.0)
96
- rspec-core (2.8.0)
97
- rspec-expectations (2.8.0)
98
- diff-lcs (~> 1.1.2)
99
- rspec-mocks (2.8.0)
100
- ruby-debug-base19 (0.11.25)
101
- columnize (>= 0.3.1)
102
- linecache19 (>= 0.5.11)
103
- ruby_core_source (>= 0.1.4)
104
- ruby-debug19 (0.11.6)
105
- columnize (>= 0.3.1)
106
- linecache19 (>= 0.5.11)
107
- ruby-debug-base19 (>= 0.11.19)
108
- ruby_core_source (0.1.5)
109
- archive-tar-minitar (>= 0.5.2)
110
- simplecov (0.6.1)
111
- multi_json (~> 1.0)
112
- simplecov-html (~> 0.5.3)
113
- simplecov-html (0.5.3)
114
- sys-uname (0.9.0)
115
- ffi (>= 1.0.0)
116
- systemu (2.4.2)
117
- thor (0.14.6)
118
- uuid (2.3.5)
119
- macaddr (~> 1.0)
120
- yard (0.6.8)
121
-
122
- PLATFORMS
123
- ruby
124
-
125
- DEPENDENCIES
126
- autotest-fsevent
127
- autotest-growl
128
- bundler
129
- guard-markdown
130
- guard-minitest!
131
- jeweler (~> 1.6.4)
132
- linkeddata
133
- minitest
134
- rspec
135
- ruby-debug19
136
- simplecov
137
- uuid
138
- yard (~> 0.6.0)