tokamak 1.0.0.beta2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (52) hide show
  1. data/.document +5 -0
  2. data/.rspec +1 -0
  3. data/Gemfile +27 -0
  4. data/Gemfile.lock +77 -0
  5. data/LICENSE.txt +20 -0
  6. data/README.rdoc +69 -0
  7. data/Rakefile +50 -0
  8. data/VERSION +1 -0
  9. data/lib/tokamak.rb +21 -0
  10. data/lib/tokamak/atom.rb +8 -0
  11. data/lib/tokamak/atom/base.rb +87 -0
  12. data/lib/tokamak/atom/builder.rb +107 -0
  13. data/lib/tokamak/atom/helpers.rb +13 -0
  14. data/lib/tokamak/error.rb +6 -0
  15. data/lib/tokamak/json.rb +10 -0
  16. data/lib/tokamak/json/base.rb +83 -0
  17. data/lib/tokamak/json/builder.rb +98 -0
  18. data/lib/tokamak/json/helpers.rb +13 -0
  19. data/lib/tokamak/representation.rb +3 -0
  20. data/lib/tokamak/representation/atom.rb +18 -0
  21. data/lib/tokamak/representation/atom/atom.rng +597 -0
  22. data/lib/tokamak/representation/atom/base.rb +140 -0
  23. data/lib/tokamak/representation/atom/category.rb +39 -0
  24. data/lib/tokamak/representation/atom/entry.rb +56 -0
  25. data/lib/tokamak/representation/atom/factory.rb +48 -0
  26. data/lib/tokamak/representation/atom/feed.rb +108 -0
  27. data/lib/tokamak/representation/atom/link.rb +66 -0
  28. data/lib/tokamak/representation/atom/person.rb +46 -0
  29. data/lib/tokamak/representation/atom/source.rb +57 -0
  30. data/lib/tokamak/representation/atom/tag_collection.rb +36 -0
  31. data/lib/tokamak/representation/atom/xml.rb +94 -0
  32. data/lib/tokamak/representation/generic.rb +20 -0
  33. data/lib/tokamak/representation/json.rb +11 -0
  34. data/lib/tokamak/representation/json/base.rb +25 -0
  35. data/lib/tokamak/representation/json/keys_as_methods.rb +72 -0
  36. data/lib/tokamak/representation/json/link.rb +27 -0
  37. data/lib/tokamak/representation/json/link_collection.rb +21 -0
  38. data/lib/tokamak/representation/links.rb +9 -0
  39. data/lib/tokamak/values.rb +29 -0
  40. data/lib/tokamak/xml.rb +12 -0
  41. data/lib/tokamak/xml/base.rb +60 -0
  42. data/lib/tokamak/xml/builder.rb +115 -0
  43. data/lib/tokamak/xml/helpers.rb +13 -0
  44. data/lib/tokamak/xml/link.rb +31 -0
  45. data/lib/tokamak/xml/links.rb +35 -0
  46. data/spec/integration/atom/atom_spec.rb +191 -0
  47. data/spec/integration/full_atom.xml +92 -0
  48. data/spec/integration/full_json.js +46 -0
  49. data/spec/integration/json/json_spec.rb +172 -0
  50. data/spec/integration/xml/xml_spec.rb +203 -0
  51. data/spec/spec_helper.rb +12 -0
  52. metadata +248 -0
@@ -0,0 +1,12 @@
1
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
2
+ $LOAD_PATH.unshift(File.dirname(__FILE__))
3
+ require 'rspec'
4
+ require 'tokamak'
5
+
6
+ # Requires supporting files with custom matchers and macros, etc,
7
+ # in ./support/ and its subdirectories.
8
+ Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
9
+
10
+ RSpec.configure do |config|
11
+
12
+ end
metadata ADDED
@@ -0,0 +1,248 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: tokamak
3
+ version: !ruby/object:Gem::Version
4
+ prerelease: true
5
+ segments:
6
+ - 1
7
+ - 0
8
+ - 0
9
+ - beta2
10
+ version: 1.0.0.beta2
11
+ platform: ruby
12
+ authors:
13
+ - Guilherme Silveira
14
+ autorequire:
15
+ bindir: bin
16
+ cert_chain: []
17
+
18
+ date: 2010-12-23 00:00:00 -02:00
19
+ default_executable:
20
+ dependencies:
21
+ - !ruby/object:Gem::Dependency
22
+ name: activesupport
23
+ requirement: &id001 !ruby/object:Gem::Requirement
24
+ none: false
25
+ requirements:
26
+ - - ">="
27
+ - !ruby/object:Gem::Version
28
+ segments:
29
+ - 3
30
+ - 0
31
+ - 0
32
+ version: 3.0.0
33
+ type: :runtime
34
+ prerelease: false
35
+ version_requirements: *id001
36
+ - !ruby/object:Gem::Dependency
37
+ name: actionpack
38
+ requirement: &id002 !ruby/object:Gem::Requirement
39
+ none: false
40
+ requirements:
41
+ - - ">="
42
+ - !ruby/object:Gem::Version
43
+ segments:
44
+ - 3
45
+ - 0
46
+ - 0
47
+ version: 3.0.0
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: *id002
51
+ - !ruby/object:Gem::Dependency
52
+ name: libxml-ruby
53
+ requirement: &id003 !ruby/object:Gem::Requirement
54
+ none: false
55
+ requirements:
56
+ - - ">="
57
+ - !ruby/object:Gem::Version
58
+ segments:
59
+ - 0
60
+ version: "0"
61
+ type: :runtime
62
+ prerelease: false
63
+ version_requirements: *id003
64
+ - !ruby/object:Gem::Dependency
65
+ name: json_pure
66
+ requirement: &id004 !ruby/object:Gem::Requirement
67
+ none: false
68
+ requirements:
69
+ - - ">="
70
+ - !ruby/object:Gem::Version
71
+ segments:
72
+ - 0
73
+ version: "0"
74
+ type: :runtime
75
+ prerelease: false
76
+ version_requirements: *id004
77
+ - !ruby/object:Gem::Dependency
78
+ name: rspec
79
+ requirement: &id005 !ruby/object:Gem::Requirement
80
+ none: false
81
+ requirements:
82
+ - - ~>
83
+ - !ruby/object:Gem::Version
84
+ segments:
85
+ - 2
86
+ - 3
87
+ - 0
88
+ version: 2.3.0
89
+ type: :development
90
+ prerelease: false
91
+ version_requirements: *id005
92
+ - !ruby/object:Gem::Dependency
93
+ name: bundler
94
+ requirement: &id006 !ruby/object:Gem::Requirement
95
+ none: false
96
+ requirements:
97
+ - - ~>
98
+ - !ruby/object:Gem::Version
99
+ segments:
100
+ - 1
101
+ - 0
102
+ - 0
103
+ version: 1.0.0
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: *id006
107
+ - !ruby/object:Gem::Dependency
108
+ name: jeweler
109
+ requirement: &id007 !ruby/object:Gem::Requirement
110
+ none: false
111
+ requirements:
112
+ - - ~>
113
+ - !ruby/object:Gem::Version
114
+ segments:
115
+ - 1
116
+ - 5
117
+ - 2
118
+ version: 1.5.2
119
+ type: :development
120
+ prerelease: false
121
+ version_requirements: *id007
122
+ - !ruby/object:Gem::Dependency
123
+ name: rcov
124
+ requirement: &id008 !ruby/object:Gem::Requirement
125
+ none: false
126
+ requirements:
127
+ - - ">="
128
+ - !ruby/object:Gem::Version
129
+ segments:
130
+ - 0
131
+ version: "0"
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: *id008
135
+ - !ruby/object:Gem::Dependency
136
+ name: ruby-debug19
137
+ requirement: &id009 !ruby/object:Gem::Requirement
138
+ none: false
139
+ requirements:
140
+ - - ">="
141
+ - !ruby/object:Gem::Version
142
+ segments:
143
+ - 0
144
+ version: "0"
145
+ type: :development
146
+ prerelease: false
147
+ version_requirements: *id009
148
+ description: A template engine for hypermedia resources
149
+ email: guilherme.silveira@caelum.com.br
150
+ executables: []
151
+
152
+ extensions: []
153
+
154
+ extra_rdoc_files:
155
+ - LICENSE.txt
156
+ - README.rdoc
157
+ files:
158
+ - .document
159
+ - .rspec
160
+ - Gemfile
161
+ - Gemfile.lock
162
+ - LICENSE.txt
163
+ - README.rdoc
164
+ - Rakefile
165
+ - VERSION
166
+ - lib/tokamak.rb
167
+ - lib/tokamak/atom.rb
168
+ - lib/tokamak/atom/base.rb
169
+ - lib/tokamak/atom/builder.rb
170
+ - lib/tokamak/atom/helpers.rb
171
+ - lib/tokamak/error.rb
172
+ - lib/tokamak/json.rb
173
+ - lib/tokamak/json/base.rb
174
+ - lib/tokamak/json/builder.rb
175
+ - lib/tokamak/json/helpers.rb
176
+ - lib/tokamak/representation.rb
177
+ - lib/tokamak/representation/atom.rb
178
+ - lib/tokamak/representation/atom/atom.rng
179
+ - lib/tokamak/representation/atom/base.rb
180
+ - lib/tokamak/representation/atom/category.rb
181
+ - lib/tokamak/representation/atom/entry.rb
182
+ - lib/tokamak/representation/atom/factory.rb
183
+ - lib/tokamak/representation/atom/feed.rb
184
+ - lib/tokamak/representation/atom/link.rb
185
+ - lib/tokamak/representation/atom/person.rb
186
+ - lib/tokamak/representation/atom/source.rb
187
+ - lib/tokamak/representation/atom/tag_collection.rb
188
+ - lib/tokamak/representation/atom/xml.rb
189
+ - lib/tokamak/representation/generic.rb
190
+ - lib/tokamak/representation/json.rb
191
+ - lib/tokamak/representation/json/base.rb
192
+ - lib/tokamak/representation/json/keys_as_methods.rb
193
+ - lib/tokamak/representation/json/link.rb
194
+ - lib/tokamak/representation/json/link_collection.rb
195
+ - lib/tokamak/representation/links.rb
196
+ - lib/tokamak/values.rb
197
+ - lib/tokamak/xml.rb
198
+ - lib/tokamak/xml/base.rb
199
+ - lib/tokamak/xml/builder.rb
200
+ - lib/tokamak/xml/helpers.rb
201
+ - lib/tokamak/xml/link.rb
202
+ - lib/tokamak/xml/links.rb
203
+ - spec/integration/atom/atom_spec.rb
204
+ - spec/integration/full_atom.xml
205
+ - spec/integration/full_json.js
206
+ - spec/integration/json/json_spec.rb
207
+ - spec/integration/xml/xml_spec.rb
208
+ - spec/spec_helper.rb
209
+ has_rdoc: true
210
+ homepage: http://github.com/caelum/tokamak
211
+ licenses:
212
+ - MIT
213
+ post_install_message:
214
+ rdoc_options: []
215
+
216
+ require_paths:
217
+ - lib
218
+ required_ruby_version: !ruby/object:Gem::Requirement
219
+ none: false
220
+ requirements:
221
+ - - ">="
222
+ - !ruby/object:Gem::Version
223
+ hash: -3434081769285654990
224
+ segments:
225
+ - 0
226
+ version: "0"
227
+ required_rubygems_version: !ruby/object:Gem::Requirement
228
+ none: false
229
+ requirements:
230
+ - - ">"
231
+ - !ruby/object:Gem::Version
232
+ segments:
233
+ - 1
234
+ - 3
235
+ - 1
236
+ version: 1.3.1
237
+ requirements: []
238
+
239
+ rubyforge_project:
240
+ rubygems_version: 1.3.7
241
+ signing_key:
242
+ specification_version: 3
243
+ summary: A template engine for hypermedia resources
244
+ test_files:
245
+ - spec/integration/atom/atom_spec.rb
246
+ - spec/integration/json/json_spec.rb
247
+ - spec/integration/xml/xml_spec.rb
248
+ - spec/spec_helper.rb