easy_api_operations 0.4.6 → 0.4.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 77759adde44079bc70bdc7a749e4371fdc064121
4
- data.tar.gz: 2a898902cf673c6a602d793a0112046f565d8db9
3
+ metadata.gz: 84b38dcba2d461880e892ff85db898bf0ddd2fcf
4
+ data.tar.gz: 4ec0c69a73583c953cb4d6ed781ac5eceefc0f8a
5
5
  SHA512:
6
- metadata.gz: 138e2cd64c5dbc0a250ab39523e3df58effb96b274ab0f0b70e15f2790834b20f286503e1a20d3d65e0e24e3de2b3c7136dec5c4a0fe47401b62f1acaf98455a
7
- data.tar.gz: ff57717c759ed0410dbef1bad8eb6e61820a18b2bd14d18f712c05ba341f7feb904b5f80a10cbdcd867ce4dd78f9b5cc998d20dd32ead869451857f400914d5c
6
+ metadata.gz: 325ca21a55e6169dbdf911908dbef6194c217643b826e7d9a5c3d962ba50f034f97b2b30cffae40ad0b1fd343d750211febc04ceab2e0099226e33e5cfc38542
7
+ data.tar.gz: 821938b582f006991321f0c733ca06ac2bc3cf95d5f4ad9a2a1c61b81fb8dd15393e3672215f8c309a4d6171486bd6c91c211271d3f7fe5438dfe3445791d87a
@@ -52,9 +52,6 @@ module EasyApiOperations
52
52
  if params.empty?
53
53
  present "Choose something dudesadf"
54
54
  else
55
- puts "hallo"
56
- puts EasyModelSelects.get_where_statement_from_param(params, db: options[:db])
57
- puts "fertsch"
58
55
  results = ressource_name.constantize.where(EasyModelSelects.get_where_statement_from_param(params, db: options[:db])).order(@@primary_key => :desc).limit(1000)
59
56
  present results, with: (api_version + "::Entities::" + ressource_name.pluralize).constantize
60
57
  end
@@ -108,7 +105,7 @@ module EasyApiOperations
108
105
  end
109
106
  put @@primary_key, http_codes: http_codes_hash.merge(http_codes_hash_extra_creates) do
110
107
 
111
- instance_variable = ressource_name.constantize.where(EasyModelSelects.get_where_statement_from_param(params[@@primary_key], db: options[:db])).first
108
+ instance_variable = ressource_name.constantize.where(EasyModelSelects.get_where_statement_from_param(params, db: options[:db])).first
112
109
  if instance_variable.nil?
113
110
  error! http_codes_hash[404], 404
114
111
  end
@@ -138,7 +135,7 @@ module EasyApiOperations
138
135
  requires @@primary_key, type: String, desc: "#{ressource_name} #{@@primary_key}"
139
136
  end
140
137
  delete @@primary_key, http_codes: http_codes_hash do
141
- instance_variable = ressource_name.constantize.where(EasyModelSelects.get_where_statement_from_param(params[@@primary_key], db: options[:db])).first
138
+ instance_variable = ressource_name.constantize.where(EasyModelSelects.get_where_statement_from_param(params, db: options[:db])).first
142
139
 
143
140
  if instance_variable.nil?
144
141
  error! http_codes_hash[404], 404
@@ -1,3 +1,3 @@
1
1
  module EasyApiOperations
2
- VERSION = "0.4.6"
2
+ VERSION = "0.4.7"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: easy_api_operations
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.6
4
+ version: 0.4.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bjoern Moeller / Christian Hentke
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-03-03 00:00:00.000000000 Z
11
+ date: 2016-03-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler