farmstead 0.0.45 → 0.0.46

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: 421a8c7ff68442eac4c953df6127be75e4194192
4
- data.tar.gz: c0a04516474c73265c850da49a4275e4e8f4cdb2
3
+ metadata.gz: 9af9766d2bf99aff2dc4853eb04d44b8253e162c
4
+ data.tar.gz: 9a6dc71173f7c358f817cc3851cde2aec1f5ead6
5
5
  SHA512:
6
- metadata.gz: a1282292cd92f59094d78740d12c2e34caa10ad73759d518f0c41b857dcb688da6f3b4262cb0933b5e850eb2f1f3d8292feeafe5e00e7536ed326df8abbf89f4
7
- data.tar.gz: 3b2ce2a19f11a49096d576fe3112c120a69027d0350b97738314e434d1820146734368e7e2b1404d3ac34151d90db74e55a6e928c0879074776b34911a99ede2
6
+ metadata.gz: a3d38fa3acff331621727307330525f21981966dfe001e84603823aca0514b52c5b00a0cba1e89c38016ebf7979d0bb884017ec883f3a6d0354b867882d4effb
7
+ data.tar.gz: bfcc00e7a2635b2db989dc04640269e4f700c258331a4f2162e1753d784c289f0b5ea44da354b6868a23ed1d6eff4f74bf0b5e4f95e03a61919743f615e910fa
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- farmstead (0.0.45)
4
+ farmstead (0.0.46)
5
5
  httparty (~> 0.15.6)
6
6
  mechanize (~> 2.7)
7
7
  mysql2 (~> 0.4.10)
data/README.md CHANGED
@@ -128,6 +128,10 @@ Transforms one or more datasets.
128
128
 
129
129
  Loads the data into a database.
130
130
 
131
+ **Test**
132
+ curl -X PUT -H "Accept: application/json" -d '{ "name": "test", "type": "test" }' http://localhost:3000/api/v1/source
133
+
134
+
131
135
  ## License
132
136
 
133
137
  MIT
@@ -13,9 +13,8 @@ module Sinatra
13
13
  end
14
14
 
15
15
  put "/source" do
16
- request.body.read
17
- #payload = JSON.parse(request.body.read)
18
- #Farmstead::DB.add_source(payload)
16
+ payload = JSON.parse(request.body.read)
17
+ Farmstead::DB.add_source(payload)
19
18
  end
20
19
  end
21
20
  end
@@ -12,9 +12,8 @@ module Farmstead
12
12
 
13
13
  def self.add_source(payload)
14
14
  self.pull_variables
15
- payload
16
- #ds = @@DB[:sources]
17
- #ds.insert(:name => name, :type => type)
15
+ ds = @@DB[:sources]
16
+ ds.insert(:name => payload["name"], :type => payload["type"])
18
17
  end
19
18
 
20
19
  def self.setup
@@ -1,3 +1,3 @@
1
1
  module Farmstead
2
- VERSION = "0.0.45"
2
+ VERSION = "0.0.46"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: farmstead
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.45
4
+ version: 0.0.46
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ken Jenney