jet_set 0.3.0 → 0.3.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: 17b8d9e477ca910f5c62582f4f8024cf1628b14e
4
- data.tar.gz: 737fbb0dda2a9dab416dd410d72657b78a006ee0
3
+ metadata.gz: fe8110ac9241efcdd8c84d85b8668cbeb48e022a
4
+ data.tar.gz: 479ef832c344f4dbc3fd45494d23b3fa19a33a1b
5
5
  SHA512:
6
- metadata.gz: d5a039de49cae5e7a93b625ff64373ab945c883ec81ac74d60ea01c0c46da04865db2e97278a2db206a7b0a381c356b4de5f6059b620472e67eb14bb10b14595
7
- data.tar.gz: fb2b0cfb842a13b63294da7b47c14e5094a4dc0045b75480e09ad32082df7564b925ef94f854738692e55feb8b689c669ced5da70ea97654de49123aa5126dee
6
+ metadata.gz: 98f1d9bf5214c2a271ba7e72d73878ebc21673bc8251355163a9d3647c5c135c11f08603eb6dae68835a3d5de780d499d5bcc47bead8d0a56e7586ec3bbdba86
7
+ data.tar.gz: 6df0496c18992fdd35f1ac8da910c936d3e3a6ea156ed49802cbc59a161294a82a28c55aed6757dba581c92901c9061a73132cd78514edf1ecdd596e6d0238a8
@@ -35,6 +35,10 @@ module JetSet
35
35
  # Parameters:
36
36
  # +name+:: string
37
37
  def get(name)
38
+ unless @entity_mappings.has_key?(name)
39
+ raise MapperError, "Entity \"#{name}\" is not defined in the mapping."
40
+ end
41
+
38
42
  @entity_mappings[name]
39
43
  end
40
44
  end
@@ -27,10 +27,6 @@ module JetSet
27
27
  entity_name = match[2]
28
28
  entity = @mapping.get(entity_name.to_sym)
29
29
 
30
- if entity.nil?
31
- raise MapperError, "Entity \"#{entity_name}\" is not defined in the mapping. Query:\n#{expression}"
32
- end
33
-
34
30
  entities << entity
35
31
  fields_sql = entity.fields.map {|field| "#{alias_name}.#{field} AS #{entity_name}__#{field}"}.join(",#{spaces_str}")
36
32
  sql.sub!(entity_expressions[index], fields_sql)
@@ -1,3 +1,3 @@
1
1
  module JetSet
2
- VERSION = "0.3.0"
2
+ VERSION = "0.3.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jet_set
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vladimir Kalinkin
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-04-25 00:00:00.000000000 Z
11
+ date: 2018-05-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sequel