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 +4 -4
- data/lib/easy_api_operations.rb +2 -5
- data/lib/easy_api_operations/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 84b38dcba2d461880e892ff85db898bf0ddd2fcf
|
4
|
+
data.tar.gz: 4ec0c69a73583c953cb4d6ed781ac5eceefc0f8a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 325ca21a55e6169dbdf911908dbef6194c217643b826e7d9a5c3d962ba50f034f97b2b30cffae40ad0b1fd343d750211febc04ceab2e0099226e33e5cfc38542
|
7
|
+
data.tar.gz: 821938b582f006991321f0c733ca06ac2bc3cf95d5f4ad9a2a1c61b81fb8dd15393e3672215f8c309a4d6171486bd6c91c211271d3f7fe5438dfe3445791d87a
|
data/lib/easy_api_operations.rb
CHANGED
@@ -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
|
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
|
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
|
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.
|
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-
|
11
|
+
date: 2016-03-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|