roar-rails 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES.markdown +20 -16
- data/lib/generators/rails/USAGE +1 -1
- data/lib/roar/rails/controller_additions.rb +2 -2
- data/lib/roar/rails/version.rb +1 -1
- data/roar-rails.gemspec +1 -1
- metadata +74 -29
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c33c21876169c4a22758b63518545cc16907738e
|
4
|
+
data.tar.gz: 7dfd9b6f4acf5d968e6f4610a121f11aa114db61
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6a03309f56329e8fc0b7c6697663cc12684bd5aa38120c94e0787700db93ef098dc68f694403aacfa194aea0ef6ce82fd1483843cbfb18c22891d3ec44dd446e
|
7
|
+
data.tar.gz: 01ff61bf13937790add1c81be32505fd67f41b14321bddc16f292d8ab69ede4cc3a171970940b1719eabd50afc63554eba14fc70a84aca647abd8e64cffd24a0
|
data/CHANGES.markdown
CHANGED
@@ -1,71 +1,75 @@
|
|
1
|
-
|
1
|
+
## 0.1.5
|
2
|
+
|
3
|
+
* Maintenance release, using Uber now and get rid of deprecation warning.
|
4
|
+
|
5
|
+
## 0.1.4
|
2
6
|
|
3
7
|
* Added a generator to create modules from the command-line. Thanks to Guilherme Cavalcanti <guiocavalcanti> for working on this.
|
4
8
|
* We always use `request.body.read` now, however, we call `rewind` beforehand.
|
5
9
|
|
6
|
-
|
10
|
+
## 0.1.3
|
7
11
|
|
8
12
|
* Fix a bug where `TestCase` wouldn't work in 3.2.
|
9
13
|
|
10
|
-
|
14
|
+
## 0.1.2
|
11
15
|
|
12
16
|
* Introducing a check where `request.body.read` is called (as usual) if `request.body.string` isn't present. This is due to some faulty behaviour in Rails and some web servers that don't provide a properly working `#read`, as it's the Rack rule. Should finally fix https://github.com/apotonick/roar-rails/issues/18 and friends.
|
13
17
|
* `TestCase#process` no longer triggers a deprecation warning for Rails > 3.1.
|
14
18
|
* Now allows using roar >= 0.11.
|
15
19
|
|
16
|
-
|
20
|
+
## 0.1.1
|
17
21
|
|
18
22
|
* Added the `represented_formats: [...]` option to be passed to `#respond_with` for either suppressing roar-rails from extending/decorating models when rendering or to fine-tune so this will only happen on white-listed formats as `:hal`. This can also be set globally using `config.representer.represented_formats`.
|
19
23
|
|
20
|
-
|
24
|
+
## 0.1.0
|
21
25
|
|
22
26
|
* `ActiveRecord::Relation` is now detected as a collection and the appropriate representer should be found.
|
23
27
|
* Entity (singular) representers are now correctly infered even if you only specified `collection:` in `::represents`. That works by querying the model.
|
24
28
|
* Entity representers are now *namespaced* when guessed (i.e., when you didn't specify them explicitly in `::represents`) as it works with collection representers already. If you have a namespaced controller and it suddenly doesn't find its entity representer anymore, either namespace the representer or specify its name in `::represents`.
|
25
29
|
|
26
|
-
|
30
|
+
## 0.0.14
|
27
31
|
|
28
32
|
* Moved logic to infer representer names from `ControllerAdditions` to `RepresenterComputer` class.
|
29
33
|
* Representer names passed to `::represents` are now constantized at runtime where they are actually needed, only. This fixes a bug where you were required to provide a `SingersRepresenter` (for collections) everywhere even when you just want to represent singular resources.
|
30
34
|
* You can now pass strings to `::represents` as representer names.
|
31
35
|
|
32
|
-
|
36
|
+
## 0.0.13
|
33
37
|
|
34
38
|
* Allow passing user options to both `#respond_with` and `#consume!`.
|
35
39
|
* Fixing `#consume!` with decorators.
|
36
40
|
|
37
|
-
|
41
|
+
## 0.0.12
|
38
42
|
|
39
43
|
* Bumping representable to 1.4 which allows us using both extend and decorating representers.
|
40
44
|
|
41
|
-
|
45
|
+
## 0.0.11
|
42
46
|
|
43
47
|
* Back to `request.body.read` in `#consume!` (again). If anyone is having problems with empty incoming strings this is a Rails issue - update ;-)
|
44
48
|
|
45
|
-
|
49
|
+
## 0.0.10
|
46
50
|
|
47
51
|
* Empty resources now work properly in Rails 3.0 and 3.1.
|
48
52
|
|
49
|
-
|
53
|
+
## 0.0.9
|
50
54
|
|
51
55
|
* Changed `request.body.string` to `read` to make it work with Unicorn.
|
52
56
|
|
53
|
-
|
57
|
+
## 0.0.8
|
54
58
|
|
55
59
|
* Added `#represents` to configure consuming and rendering on controller class layer. This also calls `respond_to`.
|
56
60
|
|
57
|
-
|
61
|
+
## 0.0.7
|
58
62
|
|
59
63
|
* Introduce `:represent_with` and `:represent_items_with` for `#respond_with`. In turn, deprecate the old behaviour since it will change in 1.0.
|
60
64
|
|
61
|
-
|
65
|
+
## 0.0.6
|
62
66
|
|
63
67
|
* Make roar-rails rely on roar 0.10 and bigger.
|
64
68
|
|
65
|
-
|
69
|
+
## 0.0.4
|
66
70
|
|
67
71
|
* Added `#consume!` to infer representer name and parse the incoming document for a model.
|
68
72
|
|
69
|
-
|
73
|
+
## 0.0.3
|
70
74
|
|
71
75
|
* Works with Rails 3.0 now, too. Fixed the `mounted_helpers` import.
|
data/lib/generators/rails/USAGE
CHANGED
@@ -26,7 +26,7 @@ Examples:
|
|
26
26
|
include Roar::Representer::JSON
|
27
27
|
|
28
28
|
property :id
|
29
|
-
property :instrument, :class =>
|
29
|
+
property :instrument, :class => Equipment, :extend => InstrumentRepresenter
|
30
30
|
end
|
31
31
|
|
32
32
|
You can also choose representer format with --format option
|
@@ -1,4 +1,4 @@
|
|
1
|
-
require '
|
1
|
+
require 'uber/inheritable_attr'
|
2
2
|
require 'roar/rails/responder'
|
3
3
|
|
4
4
|
module Roar::Rails
|
@@ -6,7 +6,7 @@ module Roar::Rails
|
|
6
6
|
extend ActiveSupport::Concern
|
7
7
|
|
8
8
|
included do
|
9
|
-
extend
|
9
|
+
extend Uber::InheritableAttr
|
10
10
|
inheritable_attr :represents_options
|
11
11
|
self.represents_options ||= RepresenterComputer.new
|
12
12
|
end
|
data/lib/roar/rails/version.rb
CHANGED
data/roar-rails.gemspec
CHANGED
@@ -22,7 +22,7 @@ Gem::Specification.new do |s|
|
|
22
22
|
s.add_runtime_dependency "test_xml", ">= 0.1.6" # TODO: remove dependency as most people don't use XML.
|
23
23
|
s.add_runtime_dependency "actionpack"
|
24
24
|
s.add_runtime_dependency "railties", ">= 3.0.0"
|
25
|
-
s.add_runtime_dependency "
|
25
|
+
s.add_runtime_dependency "uber"
|
26
26
|
|
27
27
|
s.add_development_dependency "minitest", "~> 4.0"
|
28
28
|
s.add_development_dependency "activemodel"
|
metadata
CHANGED
@@ -1,153 +1,153 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: roar-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nick Sutterer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2014-03-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: roar
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: 0.11.13
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: 0.11.13
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: test_xml
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: 0.1.6
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: 0.1.6
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: actionpack
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '0'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: railties
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: 3.0.0
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- -
|
66
|
+
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: 3.0.0
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
70
|
+
name: uber
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- -
|
73
|
+
- - ">="
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: '0'
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- -
|
80
|
+
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: minitest
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- - ~>
|
87
|
+
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
89
|
version: '4.0'
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- - ~>
|
94
|
+
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '4.0'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: activemodel
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
|
-
- -
|
101
|
+
- - ">="
|
102
102
|
- !ruby/object:Gem::Version
|
103
103
|
version: '0'
|
104
104
|
type: :development
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
|
-
- -
|
108
|
+
- - ">="
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '0'
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
112
|
name: activerecord
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
|
-
- -
|
115
|
+
- - ">="
|
116
116
|
- !ruby/object:Gem::Version
|
117
117
|
version: '0'
|
118
118
|
type: :development
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
|
-
- -
|
122
|
+
- - ">="
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: '0'
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
126
|
name: sqlite3
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|
128
128
|
requirements:
|
129
|
-
- -
|
129
|
+
- - ">="
|
130
130
|
- !ruby/object:Gem::Version
|
131
131
|
version: '0'
|
132
132
|
type: :development
|
133
133
|
prerelease: false
|
134
134
|
version_requirements: !ruby/object:Gem::Requirement
|
135
135
|
requirements:
|
136
|
-
- -
|
136
|
+
- - ">="
|
137
137
|
- !ruby/object:Gem::Version
|
138
138
|
version: '0'
|
139
139
|
- !ruby/object:Gem::Dependency
|
140
140
|
name: tzinfo
|
141
141
|
requirement: !ruby/object:Gem::Requirement
|
142
142
|
requirements:
|
143
|
-
- -
|
143
|
+
- - ">="
|
144
144
|
- !ruby/object:Gem::Version
|
145
145
|
version: '0'
|
146
146
|
type: :development
|
147
147
|
prerelease: false
|
148
148
|
version_requirements: !ruby/object:Gem::Requirement
|
149
149
|
requirements:
|
150
|
-
- -
|
150
|
+
- - ">="
|
151
151
|
- !ruby/object:Gem::Version
|
152
152
|
version: '0'
|
153
153
|
description: Rails extensions for using Roar in the popular web framework.
|
@@ -157,8 +157,8 @@ executables: []
|
|
157
157
|
extensions: []
|
158
158
|
extra_rdoc_files: []
|
159
159
|
files:
|
160
|
-
- .gitignore
|
161
|
-
- .travis.yml
|
160
|
+
- ".gitignore"
|
161
|
+
- ".travis.yml"
|
162
162
|
- CHANGES.markdown
|
163
163
|
- Gemfile
|
164
164
|
- LICENSE
|
@@ -238,18 +238,63 @@ require_paths:
|
|
238
238
|
- lib
|
239
239
|
required_ruby_version: !ruby/object:Gem::Requirement
|
240
240
|
requirements:
|
241
|
-
- -
|
241
|
+
- - ">="
|
242
242
|
- !ruby/object:Gem::Version
|
243
243
|
version: '0'
|
244
244
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
245
245
|
requirements:
|
246
|
-
- -
|
246
|
+
- - ">="
|
247
247
|
- !ruby/object:Gem::Version
|
248
248
|
version: '0'
|
249
249
|
requirements: []
|
250
250
|
rubyforge_project: roar-rails
|
251
|
-
rubygems_version: 2.
|
251
|
+
rubygems_version: 2.2.1
|
252
252
|
signing_key:
|
253
253
|
specification_version: 4
|
254
254
|
summary: Use Roar in Rails.
|
255
|
-
test_files:
|
255
|
+
test_files:
|
256
|
+
- test/consume_test.rb
|
257
|
+
- test/dummy/Rakefile
|
258
|
+
- test/dummy/app/controllers/application_controller.rb
|
259
|
+
- test/dummy/app/controllers/bands_controller.rb
|
260
|
+
- test/dummy/app/controllers/singers_controller.rb
|
261
|
+
- test/dummy/app/helpers/application_helper.rb
|
262
|
+
- test/dummy/app/models/artist.rb
|
263
|
+
- test/dummy/app/representers/band_representer.rb
|
264
|
+
- test/dummy/app/representers/singer_alias_representer.rb
|
265
|
+
- test/dummy/app/representers/singer_representer.rb
|
266
|
+
- test/dummy/app/views/layouts/application.html.erb
|
267
|
+
- test/dummy/app/views/musician/featured.html.erb
|
268
|
+
- test/dummy/app/views/musician/featured_with_block.html.erb
|
269
|
+
- test/dummy/app/views/musician/hamlet.html.haml
|
270
|
+
- test/dummy/config.ru
|
271
|
+
- test/dummy/config/application.rb
|
272
|
+
- test/dummy/config/boot.rb
|
273
|
+
- test/dummy/config/database.yml
|
274
|
+
- test/dummy/config/environment.rb
|
275
|
+
- test/dummy/config/environments/development.rb
|
276
|
+
- test/dummy/config/environments/production.rb
|
277
|
+
- test/dummy/config/environments/test.rb
|
278
|
+
- test/dummy/config/locales/en.yml
|
279
|
+
- test/dummy/config/routes.rb
|
280
|
+
- test/dummy/db/test.sqlite3
|
281
|
+
- test/dummy/public/404.html
|
282
|
+
- test/dummy/public/422.html
|
283
|
+
- test/dummy/public/500.html
|
284
|
+
- test/dummy/public/favicon.ico
|
285
|
+
- test/dummy/public/javascripts/application.js
|
286
|
+
- test/dummy/public/javascripts/controls.js
|
287
|
+
- test/dummy/public/javascripts/dragdrop.js
|
288
|
+
- test/dummy/public/javascripts/effects.js
|
289
|
+
- test/dummy/public/javascripts/prototype.js
|
290
|
+
- test/dummy/public/javascripts/rails.js
|
291
|
+
- test/dummy/public/stylesheets/.gitkeep
|
292
|
+
- test/dummy/script/rails
|
293
|
+
- test/json_hal_renderer_test.rb
|
294
|
+
- test/representer_computer_test.rb
|
295
|
+
- test/representer_generator_test.rb
|
296
|
+
- test/representer_test.rb
|
297
|
+
- test/responder_test.rb
|
298
|
+
- test/test_case_test.rb
|
299
|
+
- test/test_helper.rb
|
300
|
+
- test/validations_test.rb
|