rest_area 2.4.2 → 2.4.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 42b497916d026fc71f188ba545922af948146ba3
4
- data.tar.gz: 19ec8f6e4fc3625a6501b27a983ca023892aac9b
3
+ metadata.gz: 14e91120011f71a0b1acf647f3688b4ccbc63998
4
+ data.tar.gz: fdb5b2b5bbcd1764c9eab55d42399aa331e6522e
5
5
  SHA512:
6
- metadata.gz: 04dbfd2f92bb1c733c727ce24db2c681d9d525349c129b2b5b293c3dbd66cafcf361327d43ba971c61cb85187c668cdccdf8e64b4074959dfa2d984a829d8f08
7
- data.tar.gz: 76c3904f36da6bb0f6c9c2530927063d32e0092b6859197682a80a21c621f8ba36312bf41a9e859aca540066643203a270c7ade7cca09835e2c625103d53659a
6
+ metadata.gz: 22a68c3061b657661225b1003580a8da62413feb1eadbf78aa197e43f0878c7a2174d98a19bdc3443f646bc7e31e92027c4ada2238c60a2d22801781786b2fd7
7
+ data.tar.gz: dfc3f07e1e0cc0a38105b413d1732501f442cc2d9f99705c8caa55e2349edc849c4d27c8eca7b06f9974107a042df228e2833328ca201469596df2d50150b4c0
data/README.md CHANGED
@@ -26,7 +26,7 @@ If you are using Rails 4.1.x you should use the master branch and/or versions/ta
26
26
  1. Create a file called `rest_area.rb` in your initializers file
27
27
  2. Add configuration like the following in that file.
28
28
 
29
- RestArea.config do
29
+ RestArea.configure do
30
30
  resources :thing_one, :thing_two # Defaults to all actions
31
31
 
32
32
  resources :cereal, :thing do
@@ -77,4 +77,6 @@ But what if I want to customize the JSON that comes back? Simple this
77
77
  gem supports [active_model_serializer][1]. Go there, ignore the stuff
78
78
  about controllers.
79
79
 
80
+ *NOTE* You must use AMS 0.8.x, things are not working for AMS 0.9.x+
81
+
80
82
  [1]:https://github.com/rails-api/active_model_serializers
@@ -3,7 +3,7 @@
3
3
  #
4
4
  # Example:
5
5
  #
6
- # RestArea.config do
6
+ # RestArea.configure do
7
7
  # resources :cereal, :thing do
8
8
  # action :index, :show, :create, :update, :delete
9
9
  # messages :say_hello, :say_goodbye
@@ -36,7 +36,7 @@ module RestArea
36
36
  end
37
37
 
38
38
  def resource(klass, &block)
39
- resource = Resource.new(klass)
39
+ resource = @resources[klass] || Resource.new(klass)
40
40
  resource.instance_eval(&block) if block_given?
41
41
  @resources[klass] = resource
42
42
  end
@@ -1,3 +1,3 @@
1
1
  module RestArea
2
- VERSION = "2.4.2"
2
+ VERSION = "2.4.3"
3
3
  end
metadata CHANGED
@@ -1,23 +1,20 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rest_area
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.2
4
+ version: 2.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Benjamin Guest
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-01-06 00:00:00.000000000 Z
11
+ date: 2015-01-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - "~>"
18
- - !ruby/object:Gem::Version
19
- version: '4.1'
20
- - - "<"
21
18
  - !ruby/object:Gem::Version
22
19
  version: '4.2'
23
20
  type: :runtime
@@ -25,9 +22,6 @@ dependencies:
25
22
  version_requirements: !ruby/object:Gem::Requirement
26
23
  requirements:
27
24
  - - "~>"
28
- - !ruby/object:Gem::Version
29
- version: '4.1'
30
- - - "<"
31
25
  - !ruby/object:Gem::Version
32
26
  version: '4.2'
33
27
  - !ruby/object:Gem::Dependency
@@ -187,7 +181,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
187
181
  version: '0'
188
182
  requirements: []
189
183
  rubyforge_project:
190
- rubygems_version: 2.4.3
184
+ rubygems_version: 2.4.5
191
185
  signing_key:
192
186
  specification_version: 4
193
187
  summary: Adds a restfull controller and api to a Rails Application