dao-gateway-active_resource 1.4.2 → 1.5.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: 97043e3326060501d56d0ae031546b3f02a3f9b0
4
- data.tar.gz: 33b23160c43664f83ca60a6ab201b069c4a91bc8
3
+ metadata.gz: 2ac5eea339cb209f6531d02e7911e9e54a6eebfa
4
+ data.tar.gz: 9748564b74ca09afb4eed0993c7dd18a48a3e140
5
5
  SHA512:
6
- metadata.gz: 505deefcb2e4fda7659baba5d70b8a300f441a796068d59a81b24e72266b0f8ed8c3384b61530ba06b055caa0805d8bd360a75dfaffc9fceb0e2fb4801d6a830
7
- data.tar.gz: 99b4e8ae35d8530c7f44d44c0b7b57fc3633ea916a3ebb8bb060bd7d2b66697378f41b862c3bd8543ffc5615543831c702b3d905fc18bfa77ebc58385b37f1b3
6
+ metadata.gz: b2f1bd79ba9ad950753b0bbc298d62fd79d02f184f44b87ed30390e641f67ce36fcdcb1ef351594c4f995419f46d3dfb292d5221d0d106d305a7c7478f68029e
7
+ data.tar.gz: 944325413fdadd5ebf1ea661193d0afc57f08f87d9c80836ea6d6178af35b201d854e7ec9e54f9a262873381ba4561f460c9d76a75f9638f20a3774171562323
data/Gemfile CHANGED
@@ -1,3 +1,8 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
+ # TODO: https://github.com/rails/activeresource/issues/215
4
+
5
+ gem 'rails-observers', github: 'rails/rails-observers'
6
+ gem 'activeresource', github: 'rails/activeresource'
7
+
3
8
  gemspec
@@ -27,4 +27,5 @@ Gem::Specification.new do |spec|
27
27
  spec.add_development_dependency 'rspec-its'
28
28
  spec.add_development_dependency 'dao-entity', '~> 1.0'
29
29
  spec.add_development_dependency 'codeclimate-test-reporter'
30
+ spec.add_development_dependency 'pry'
30
31
  end
@@ -4,6 +4,7 @@ require 'dao/gateway/active_resource/version'
4
4
  require 'active_resource'
5
5
  require 'active_support/hash_with_indifferent_access'
6
6
 
7
+ require 'dao/gateway/forbidden_record'
7
8
  require 'dao/gateway/active_resource/resource_processor'
8
9
  require 'dao/gateway/active_resource/base'
9
10
  require 'dao/gateway/active_resource/base_transformer'
@@ -29,6 +29,8 @@ module Dao
29
29
  {}
30
30
  end
31
31
  raise Dao::Gateway::InvalidRecord.new(errors)
32
+ rescue ::ActiveResource::ForbiddenAccess => e
33
+ raise Dao::Gateway::ForbiddenRecord, e.message
32
34
  rescue ::ActiveResource::ConnectionError => e
33
35
  raise Dao::Gateway::BadConnection, e.to_s
34
36
  end
@@ -1,7 +1,7 @@
1
1
  module Dao
2
2
  module Gateway
3
3
  module ActiveResource
4
- VERSION = '1.4.2'
4
+ VERSION = '1.5.0'
5
5
  end
6
6
  end
7
7
  end
@@ -0,0 +1,5 @@
1
+ module Dao
2
+ module Gateway
3
+ class ForbiddenRecord < StandardError; end
4
+ end
5
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dao-gateway-active_resource
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.2
4
+ version: 1.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - llxff
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2016-10-12 00:00:00.000000000 Z
12
+ date: 2017-02-14 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: dao-gateway
@@ -123,6 +123,20 @@ dependencies:
123
123
  - - ">="
124
124
  - !ruby/object:Gem::Version
125
125
  version: '0'
126
+ - !ruby/object:Gem::Dependency
127
+ name: pry
128
+ requirement: !ruby/object:Gem::Requirement
129
+ requirements:
130
+ - - ">="
131
+ - !ruby/object:Gem::Version
132
+ version: '0'
133
+ type: :development
134
+ prerelease: false
135
+ version_requirements: !ruby/object:Gem::Requirement
136
+ requirements:
137
+ - - ">="
138
+ - !ruby/object:Gem::Version
139
+ version: '0'
126
140
  description: Gateway for Active Resource
127
141
  email:
128
142
  - ll.wg.bin@gmail.com
@@ -145,6 +159,7 @@ files:
145
159
  - lib/dao/gateway/active_resource/base_transformer.rb
146
160
  - lib/dao/gateway/active_resource/resource_processor.rb
147
161
  - lib/dao/gateway/active_resource/version.rb
162
+ - lib/dao/gateway/forbidden_record.rb
148
163
  homepage: https://github.com/dao-rb/dao-gateway-active_resource
149
164
  licenses:
150
165
  - MIT
@@ -165,7 +180,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
165
180
  version: '0'
166
181
  requirements: []
167
182
  rubyforge_project:
168
- rubygems_version: 2.5.1
183
+ rubygems_version: 2.6.10
169
184
  signing_key:
170
185
  specification_version: 4
171
186
  summary: Gateway for Active Resource