miracle_grow 0.1.3 → 0.1.4

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: 227194e27efd8b78000742605cf920e9a6911380
4
- data.tar.gz: b6e2aff18dce8fe6817fdc9eed38fe64863f855a
3
+ metadata.gz: 45dac7f6987b6caf980e9b43a83361b08cd15e56
4
+ data.tar.gz: 62a1d2d36d63bea012c97651d1ae866e792cc42d
5
5
  SHA512:
6
- metadata.gz: b8a86d20eefbc53a029be057807d31d6af245de67de16ce31ee030512d23468cc06a5432ed14fbc73e21da216f63c6d074295460a657891ab1b32b382c9dbef9
7
- data.tar.gz: e0b072381dbd0c63f23e728a1a579f036d9cfc6650841fc098629d6d9a48824fb9ae909f32261c53420071b97dd9b2238477417443c5dba5ea15d96acffc4b96
6
+ metadata.gz: 234ed3c209fda39315a6ca7e9d2c36ca3af74344a8c19b0a1097fa7c9142b7282c5f53beb9db96193efb76c8feab41d3eea6d047a0d29a9c09be5750be89fd29
7
+ data.tar.gz: b12de76b0450e205b2bdd4d6fc8672449bcd1726bd6c9649aa09f948bb11341fc3b5a7a2e426c118886c0a2f9f9436c09815dc3503afccfb5061db7a31534c30
@@ -8,31 +8,31 @@ module MiracleGrow
8
8
  end
9
9
 
10
10
  def create_bed(params)
11
- Faraday.post('http://localhost:8080/api/v1/beds') do |req|
11
+ Faraday.post("#{request.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("http://localhost:8080/api/v1/beds/#{(params[:id])}") do |req|
18
+ Faraday.put("#{request.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("http://localhost:8080/api/v1/beds/for_user/#{uid}")
25
+ response = Faraday.get("#{request.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("http://localhost:8080/api/v1/beds/default_for_user/#{uid}")
30
+ response = Faraday.get("#{request.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("http://localhost:8080/api/v1/beds/#{id}")
35
+ response = Faraday.get("#{request.host}/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("http://localhost:8080/api/v1/plants")
7
+ response = Faraday.get("#{request.host}/api/v1/plants")
8
8
  JSON.parse(response.body)
9
9
  end
10
10
 
@@ -1,3 +1,3 @@
1
1
  module MiracleGrow
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
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.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Lewinsky