json-crud-api 0.0.4 → 0.0.5

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: b011194209c43c09fab09e549d9e88b12854f4ff
4
- data.tar.gz: 7a62d339247b3a0bc48b6f2ee96a34392d307219
3
+ metadata.gz: 79b2e0ca071a00b36b5255b2f4168b274e16f0bf
4
+ data.tar.gz: 767ca5c4018742511b7e539fcdf10fa0c34a2498
5
5
  SHA512:
6
- metadata.gz: b4d3d94ff25dc21acc2fa5f963d0f20ae87a5704a680dcd10e9996e52b223325438d2da5e6794b760a2e0f8362fa597da18fa27fa27f8b828ca2a0c6dd0f7e9d
7
- data.tar.gz: 94dfbd31daa4d202dae135edd442dd0ca9bcc180e56bcff55332fd43bcf5b588f450a284b6568f136aaa0f948eeeaf352e4fbac3d30d22dfb1b9e28159bdeb38
6
+ metadata.gz: 42c783872ea7f4e68a32d1d48f86a5baa960fa82a53f94045c8ca1c2099c51ea0448a9a02f7cb18bbbc63a6a8f492caff3621abd47538eb63c2167905d26458e
7
+ data.tar.gz: 64c631939a0817a09aae149993dd853a23e5d0fd302f4f4716c426f4a2eadf2eccaf94d767c6a2d200388cb65aca57cddb2a4c2fcc38a0f3041733ee74911887
@@ -6,6 +6,7 @@ module JsonCrudApi
6
6
  def initialize(options)
7
7
  @model = options[:model]
8
8
  @exclude = options[:exclude]
9
+ @include = options[:include]
9
10
 
10
11
  throw "Model must be defined" if @model.nil?
11
12
  end
@@ -6,12 +6,16 @@ describe JsonCrudApi::Presenter do
6
6
 
7
7
  @presenter = JsonCrudApi::Presenter.new({
8
8
  :model => @mock_model,
9
+ :include => { :no_operation => 10 },
10
+ :exclude => { :no_operation => 11 }
9
11
  })
10
12
  end
11
13
 
12
14
  describe '#initialize' do
13
15
  it 'should inject dependencies correctly' do
14
16
  @presenter.model.should be @mock_model
17
+ @presenter.include.should eq({ :no_operation => 10 })
18
+ @presenter.exclude.should eq({ :no_operation => 11 })
15
19
  end
16
20
 
17
21
  it 'should throw an exception if model is not set' do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: json-crud-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tom Cully