acfs 1.0.1 → 1.1.0

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: a068c3231f400452221185425c92b7fc516fbe26
4
- data.tar.gz: c443f4645c27bb3047e05aebd94eb53ad26d4a3b
3
+ metadata.gz: b637acde9ee3c465f3f38bf26e85a28313aecc8c
4
+ data.tar.gz: 963f476cfc2c5739e9368d331334b6692f83876c
5
5
  SHA512:
6
- metadata.gz: 867192bceaadef6f3d45dd228beb2c0c75a6abdf9c50b6f510a722991dbb5f51affa8b03ef4edb40e8538f1993ca1db9318485d7d292b2c6765963d920108ad2
7
- data.tar.gz: d1b7cce9b9496e1ac7e5cd876890fb03bd423462801551fc01248139e2a569de1179d89ec0e39251c9f62258862ddf310d1f549316f6811b6f907d4bb1d7f879
6
+ metadata.gz: 9174266a276efe19947cc54da57a4080ae6246a4bb30bd54ed7b2c017182198674c94ee66826a0cb2dac4835f2a50f09d43bcf8aec69754a5e170368af178f64
7
+ data.tar.gz: a87edaa76f6f8a6b9a2a381ac9a311935975b786f9d321a64a1040de2e8d2dc85e1cf140ee7ac25be3e5576b3680a23145e3dc8aa03191d3882918ff0e38e0a3
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.1.0
4
+
5
+ * Add support for Rails 5.1
6
+
3
7
  ## 1.0.1
4
8
 
5
9
  * Fix deprecation warnings when using ::Mime
data/README.md CHANGED
@@ -313,7 +313,6 @@ Read [official guide][2] to see to to subscribe.
313
313
  * Reusing model definitions for generating responses?
314
314
  * Rails responders providing REST operations with integrated ETag,
315
315
  Modified Headers, conflict detection, ...
316
- * Pagination? Filtering? (If service API provides such features.)
317
316
  * Documentation
318
317
 
319
318
  ## Contributing
@@ -18,9 +18,9 @@ Gem::Specification.new do |spec|
18
18
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
19
  spec.require_paths = %w(lib)
20
20
 
21
- spec.add_runtime_dependency 'activesupport', '>= 3.1'
22
- spec.add_runtime_dependency 'activemodel', '>= 3.1'
23
- spec.add_runtime_dependency 'actionpack', '>= 3.1'
21
+ spec.add_runtime_dependency 'activesupport', '>= 4.2'
22
+ spec.add_runtime_dependency 'activemodel', '>= 4.2'
23
+ spec.add_runtime_dependency 'actionpack', '>= 4.2'
24
24
  spec.add_runtime_dependency 'multi_json'
25
25
 
26
26
  # Bundle update w/o version resolves to 0.3.3 ...
@@ -13,8 +13,10 @@ class Acfs::Resource
13
13
 
14
14
  def remote_errors=(errors)
15
15
  (errors || []).each do |field, errs|
16
- self.errors.set field.to_sym, errs
17
- remote_errors.set field.to_sym, errs
16
+ errs.each do |err|
17
+ self.errors.add field.to_sym, err
18
+ remote_errors.add field.to_sym, err
19
+ end
18
20
  end
19
21
  end
20
22
 
@@ -9,7 +9,7 @@ module Acfs
9
9
  end
10
10
 
11
11
  def json?
12
- content_type == Mime::JSON
12
+ content_type == Mime[:json]
13
13
  end
14
14
 
15
15
  private
@@ -1,8 +1,8 @@
1
1
  module Acfs
2
2
  module VERSION
3
3
  MAJOR = 1
4
- MINOR = 0
5
- PATCH = 1
4
+ MINOR = 1
5
+ PATCH = 0
6
6
  STAGE = nil
7
7
 
8
8
  STRING = [MAJOR, MINOR, PATCH, STAGE].reject(&:nil?).join('.')
@@ -12,7 +12,7 @@ describe Acfs::Response::Formats do
12
12
  let(:headers) { {} }
13
13
 
14
14
  it "should fallback on 'text/plain'" do
15
- expect(response.content_type).to be == Mime::TEXT
15
+ expect(response.content_type).to be == Mime[:text]
16
16
  end
17
17
  end
18
18
 
@@ -21,7 +21,7 @@ describe Acfs::Response::Formats do
21
21
 
22
22
  describe '#content_type' do
23
23
  it 'should return Mime::JSON' do
24
- expect(response.content_type).to be == Mime::JSON
24
+ expect(response.content_type).to be == Mime[:json]
25
25
  end
26
26
  end
27
27
 
@@ -36,7 +36,7 @@ describe Acfs::Response::Formats do
36
36
 
37
37
  describe '#content_type' do
38
38
  it 'should return Mime::JSON' do
39
- expect(response.content_type).to be == Mime::JSON
39
+ expect(response.content_type).to be == Mime[:json]
40
40
  end
41
41
  end
42
42
 
@@ -9,7 +9,7 @@ if ENV['CI'] || (defined?(:RUBY_ENGINE) && RUBY_ENGINE != 'rbx')
9
9
  end
10
10
 
11
11
  require 'bundler'
12
- Bundler.require
12
+ Bundler.require(:default, :test)
13
13
 
14
14
  require 'acfs'
15
15
  require 'webmock/rspec'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: acfs
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jan Graichen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-08-24 00:00:00.000000000 Z
11
+ date: 2017-05-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -16,42 +16,42 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '3.1'
19
+ version: '4.2'
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
- version: '3.1'
26
+ version: '4.2'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: activemodel
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: '3.1'
33
+ version: '4.2'
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
- version: '3.1'
40
+ version: '4.2'
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
- version: '3.1'
47
+ version: '4.2'
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
- version: '3.1'
54
+ version: '4.2'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: multi_json
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -228,7 +228,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
228
228
  version: '0'
229
229
  requirements: []
230
230
  rubyforge_project:
231
- rubygems_version: 2.5.1
231
+ rubygems_version: 2.6.11
232
232
  signing_key:
233
233
  specification_version: 4
234
234
  summary: An abstract API base client for service oriented application.