miracle_grow 0.1.4 → 0.1.5

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: 45dac7f6987b6caf980e9b43a83361b08cd15e56
4
- data.tar.gz: 62a1d2d36d63bea012c97651d1ae866e792cc42d
3
+ metadata.gz: b3b5598311c73f39478b1836f3d7aafa6ee93bfa
4
+ data.tar.gz: f2a116befe7750856a6bcdc9f1fa6834d905ca1c
5
5
  SHA512:
6
- metadata.gz: 234ed3c209fda39315a6ca7e9d2c36ca3af74344a8c19b0a1097fa7c9142b7282c5f53beb9db96193efb76c8feab41d3eea6d047a0d29a9c09be5750be89fd29
7
- data.tar.gz: b12de76b0450e205b2bdd4d6fc8672449bcd1726bd6c9649aa09f948bb11341fc3b5a7a2e426c118886c0a2f9f9436c09815dc3503afccfb5061db7a31534c30
6
+ metadata.gz: 2e49380c4fdafb6e9c6b69a436b100b75f4cb60aa19f56bb7e5cd65b76d354be92e603fe89e6f91745a84a7d3d689062aeb517705056e640a9c7aa55e4489c9e
7
+ data.tar.gz: 02e6e9f6a0f1e836cb41243a468bcf0698abca333ac79a8669bc553d1a6ad9f8e9811567dbee0fc12ce79b540b2b246bab3d912f61dd6e6c50fc702f7897a77f
@@ -3,36 +3,36 @@ module MiracleGrow
3
3
  class Bed
4
4
  class << self
5
5
  def find_bed(id)
6
- response = Faraday.get("#{request.host}/api/v1/beds/#{id}")
6
+ response = Faraday.get("#{env["SERVER_NAME"]}/api/v1/beds/#{id}")
7
7
  JSON.parse(response.body)
8
8
  end
9
9
 
10
10
  def create_bed(params)
11
- Faraday.post("#{request.host}/api/v1/beds") do |req|
11
+ Faraday.post("#{env["SERVER_NAME"]}/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("#{request.host}/api/v1/beds/#{(params[:id])}") do |req|
18
+ Faraday.put("#{env["SERVER_NAME"]}/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("#{request.host}/api/v1/beds/for_user/#{uid}")
25
+ response = Faraday.get("#{env["SERVER_NAME"]}/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("#{request.host}/api/v1/beds/default_for_user/#{uid}")
30
+ response = Faraday.get("#{env["SERVER_NAME"]}/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("#{request.host}/api/v1/beds/#{id}")
35
+ response = Faraday.get("#{env["SERVER_NAME"]}/api/v1/beds/#{id}")
36
36
  JSON.parse(response.body)
37
37
  end
38
38
 
@@ -4,7 +4,7 @@ module MiracleGrow
4
4
  class << self
5
5
 
6
6
  def all_the_plants
7
- response = Faraday.get("#{request.host}/api/v1/plants")
7
+ response = Faraday.get("#{env["SERVER_NAME"]}/api/v1/plants")
8
8
  JSON.parse(response.body)
9
9
  end
10
10
 
@@ -4,7 +4,7 @@ module MiracleGrow
4
4
  class << self
5
5
 
6
6
  def plantings_for_bed(id)
7
- response = Faraday.get("#{request.host}/api/v1/plantings/for_bed/#{id}")
7
+ response = Faraday.get("#{env["SERVER_NAME"]}/api/v1/plantings/for_bed/#{id}")
8
8
  plantings = JSON.parse(response.body)
9
9
  end
10
10
 
@@ -1,3 +1,3 @@
1
1
  module MiracleGrow
2
- VERSION = "0.1.4"
2
+ VERSION = "0.1.5"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: miracle_grow
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Lewinsky