miracle_grow 0.1.6 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/miracle_grow/bed.rb +6 -6
- data/lib/miracle_grow/plant.rb +1 -1
- data/lib/miracle_grow/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0ccca65589cf6781ecc8b8757b19696e715fd9b6
|
4
|
+
data.tar.gz: d09ecf587028b3ff7539c41a4642c8d28265ae1a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8464e40f68a3897f2ea9570b278aec46a3ed1291e72c6d9270f08253f14cd228c8c4180bd5f9637455c8cfce7d9766b79dcf9dd16e6473301557b3a8a77b8a8e
|
7
|
+
data.tar.gz: cfeff142f17de2b99ce29e3dcc9676de05aab130aa08c8bf7b01ed4f38105800f4ee52940e7109ea3f18313ef24a6c68d8f86effb697798149060437d0c00682
|
data/lib/miracle_grow/bed.rb
CHANGED
@@ -3,36 +3,36 @@ module MiracleGrow
|
|
3
3
|
class Bed
|
4
4
|
class << self
|
5
5
|
def find_bed(id)
|
6
|
-
response = Faraday.get("#{
|
6
|
+
response = Faraday.get("#{ENV["HOST"]}/api/v1/beds/#{id}")
|
7
7
|
JSON.parse(response.body)
|
8
8
|
end
|
9
9
|
|
10
10
|
def create_bed(params)
|
11
|
-
Faraday.post("#{
|
11
|
+
Faraday.post("#{ENV["HOST"]}/api/v1/beds") do |req|
|
12
12
|
request = params
|
13
13
|
req.body = params
|
14
14
|
end
|
15
15
|
end
|
16
16
|
|
17
17
|
def patch_bed(params)
|
18
|
-
Faraday.put("#{
|
18
|
+
Faraday.put("#{ENV["HOST"]}/api/v1/beds/#{(params[:id])}") do |req|
|
19
19
|
request = params
|
20
20
|
req.body = params
|
21
21
|
end
|
22
22
|
end
|
23
23
|
|
24
24
|
def current_users_beds(uid)
|
25
|
-
response = Faraday.get("#{
|
25
|
+
response = Faraday.get("#{ENV["HOST"]}/api/v1/beds/for_user/#{uid}")
|
26
26
|
JSON.parse(response.body)
|
27
27
|
end
|
28
28
|
|
29
29
|
def default_bed(uid)
|
30
|
-
response = Faraday.get("#{
|
30
|
+
response = Faraday.get("#{ENV["HOST"]}/api/v1/beds/default_for_user/#{uid}")
|
31
31
|
JSON.parse(response.body)
|
32
32
|
end
|
33
33
|
|
34
34
|
def show_bed(id)
|
35
|
-
response = Faraday.get("#{
|
35
|
+
response = Faraday.get("#{ENV["HOST"]}/api/v1/beds/#{id}")
|
36
36
|
JSON.parse(response.body)
|
37
37
|
end
|
38
38
|
|
data/lib/miracle_grow/plant.rb
CHANGED
data/lib/miracle_grow/version.rb
CHANGED