dao-gateway 1.0.0 → 1.0.1

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: a333a3af2fed768ff134e876f7499671dce28fae
4
- data.tar.gz: 1bac797dacc1daa57720af7c229ebfe260b5c1b4
3
+ metadata.gz: a3f078a10c3cddff50d05b3643838315da7a90b7
4
+ data.tar.gz: 44a2f48864b7345a0c1a7148a356b2437aa22c72
5
5
  SHA512:
6
- metadata.gz: 0b8b8787d3c05ab7be3fbc7387806c7ed9658249eb7c03374dcf918fa7f4c07e06c544a1c823fd356d45c58c8e07dc020ea2a60f12e3d9c4ca2f3e99dc704a4b
7
- data.tar.gz: 316cae5284892c87afbeb2fcea83197b9397a53ea4e7542ec1c802f187c917bc9f52e080c820aac9c9ccfac0ceb53d83d146ec3e8b198d8ef8e60495e06b79f5
6
+ metadata.gz: 4cfd8d73b7eadd0031cc03089063b78195bc6e65c0467eb075d02a1624d5d32d32e4bfb26533d16ece2839c7619923be8bccda4a209b1fc4ebeb4e972c680683
7
+ data.tar.gz: 88504f06a17eda7d6b4b7b2b12109d5cc495c3c349d999426087ad1942748a01ee0a37d81fca3f0a2c01acb82cb1e4505cc5710a007539bd8ff2f0c36075b63b
data/.travis.yml CHANGED
@@ -3,3 +3,6 @@ rvm:
3
3
  - 2.2.2
4
4
  - 2.3.0
5
5
  before_install: gem install bundler -v 1.11.2
6
+
7
+ script:
8
+ - CODECLIMATE_REPO_TOKEN=763e2fed349469f0d07de8278c7df59cc64b9b8aa8f2f178fb1e7c5efae1bc49 bundle exec rspec
data/README.md CHANGED
@@ -1,8 +1,9 @@
1
1
  # Dao::Gateway
2
2
 
3
+ [![Gem Version](https://badge.fury.io/rb/dao-gateway.svg)](https://badge.fury.io/rb/dao-gateway)
3
4
  [![Build Status](https://travis-ci.org/dao-rb/dao-gateway.svg?branch=master)](https://travis-ci.org/dao-rb/dao-gateway)
4
5
  [![Code Climate](https://codeclimate.com/github/dao-rb/dao-gateway/badges/gpa.svg)](https://codeclimate.com/github/dao-rb/dao-gateway)
5
- [![Test Coverage](https://codeclimate.com/github/dao-rb/dao-gateway/badges/coverage.svg)](https://codeclimate.com/github/dao-rb/dao-gateway/coverage)
6
+ [![Test Coverage](https://codeclimate.com/repos/5772c7717be4200075002276/badges/7a1a924db7afcf9ed068/coverage.svg)](https://codeclimate.com/repos/5772c7717be4200075002276/coverage)
6
7
 
7
8
  This is a basic class for your gateway.
8
9
 
data/dao-gateway.gemspec CHANGED
@@ -24,4 +24,5 @@ Gem::Specification.new do |spec|
24
24
  spec.add_development_dependency 'rake', '~> 10.0'
25
25
  spec.add_development_dependency 'rspec', '~> 3.4'
26
26
  spec.add_development_dependency 'rspec-its'
27
+ spec.add_development_dependency 'codeclimate-test-reporter'
27
28
  end
@@ -28,13 +28,10 @@ module Dao
28
28
  protected
29
29
 
30
30
  def transform(relation, &block)
31
- Enumerator.new do |collection|
32
- entities = relation
33
- entities = relation.collect(&block) if block_given?
34
- entities.each do |attributes|
35
- collection << @entity.new(attributes).tap do |entity|
36
- entity.initialized_with = associations
37
- end
31
+ relation.collect do |attributes|
32
+ attributes = block.call(attributes) if block_given?
33
+ @entity.new(attributes).tap do |entity|
34
+ entity.initialized_with = associations
38
35
  end
39
36
  end
40
37
  end
@@ -1,5 +1,5 @@
1
1
  module Dao
2
2
  module Gateway
3
- VERSION = '1.0.0'
3
+ VERSION = '1.0.1'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dao-gateway
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
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-06-28 00:00:00.000000000 Z
12
+ date: 2016-07-14 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -67,6 +67,20 @@ dependencies:
67
67
  - - ">="
68
68
  - !ruby/object:Gem::Version
69
69
  version: '0'
70
+ - !ruby/object:Gem::Dependency
71
+ name: codeclimate-test-reporter
72
+ requirement: !ruby/object:Gem::Requirement
73
+ requirements:
74
+ - - ">="
75
+ - !ruby/object:Gem::Version
76
+ version: '0'
77
+ type: :development
78
+ prerelease: false
79
+ version_requirements: !ruby/object:Gem::Requirement
80
+ requirements:
81
+ - - ">="
82
+ - !ruby/object:Gem::Version
83
+ version: '0'
70
84
  description: Base gateway interface for dao-rb/repository
71
85
  email:
72
86
  - ll.wg.bin@gmail.com