farmstead 0.0.41 → 0.0.42

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: 2806f182e6cd93e8cd9ff4a69ca6578925e26a2a
4
- data.tar.gz: 1b604a5e9814af604795c68d78385db6906eb229
3
+ metadata.gz: 6d37e7dbfd1bdfb01c36d292ab4f68ea766cd16c
4
+ data.tar.gz: 7eebc85c065b78657f42a954c5559a2abffe0ea0
5
5
  SHA512:
6
- metadata.gz: f606bb4fbb2191151254f064b9640bf552f23e5c6171c9fe1f511e8c836874e0d2591391d9bab9ef78a7c2cea9a5e5b0e097fcfd26184816d33e85e0e9c57f51
7
- data.tar.gz: 38c72bbce85620e6dca08cbd88ebeaf29e55b635ef099156c81d91b64ad5250aeba2b92320fc4e8159b123ff8dbc304673cd77e74f81ee23214b453ef6c26ae2
6
+ metadata.gz: 6b14bb1b3cb06ee007bd2e6e6327e254890753cfb5ec6c1af3fe16e2608a9333852cfb665fe698158dd498d2fdb794ffe6ddc722462c1fe311c140f4a11798d5
7
+ data.tar.gz: 866e4dd886ec9d6fb6ab0fd9c3be93ea839ea71a032d6b5f332e4829e0550945c54cbb9f60d44f6ed53c3a5fd6e3272d11875a6ff4d4109c3a69566be9a39bf1
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- farmstead (0.0.41)
4
+ farmstead (0.0.42)
5
5
  httparty (~> 0.15.6)
6
6
  mechanize (~> 2.7)
7
7
  mysql2 (~> 0.4.10)
@@ -11,8 +11,9 @@ module Sinatra
11
11
  content_type 'application/json'
12
12
  end
13
13
 
14
- get "/source" do
15
- Farmstead::DB.add_source
14
+ put "/source" do
15
+ JSON.parse(app.request.body.read)
16
+ #Farmstead::DB.add_source
16
17
  end
17
18
  end
18
19
  end
data/lib/farmstead/db.rb CHANGED
@@ -10,9 +10,10 @@ module Farmstead
10
10
  @@DB = Sequel.connect(adapter: "mysql2", host: @@mysql_host, database: @@mysql_database, user: @@mysql_user, password: @@mysql_password)
11
11
  end
12
12
 
13
- def self.add_source
13
+ def self.add_source(name,type)
14
14
  self.pull_variables
15
- puts "Add source"
15
+ ds = @@DB[:sources]
16
+ ds.insert(:name => name, :type => type)
16
17
  end
17
18
 
18
19
  def self.setup
@@ -23,7 +23,7 @@ echo "Sleeping"
23
23
  sleep 10
24
24
 
25
25
  echo "Create database tables"
26
- farmstead db setup
26
+ docker-compose exec manage farmstead db setup
27
27
 
28
28
  echo "Starting everything else"
29
29
  docker-compose up -d > /dev/null 2>&1
@@ -1,3 +1,3 @@
1
1
  module Farmstead
2
- VERSION = "0.0.41"
2
+ VERSION = "0.0.42"
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.41
4
+ version: 0.0.42
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ken Jenney