farmstead 0.0.33 → 0.0.34

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: be257e924582fa6d191e360d9be191e79eb499f9
4
- data.tar.gz: 49756451f76c5098c04cd9a660b55c21f29a1057
3
+ metadata.gz: b34bb46dfc07c08d730ea5ea78cdd01eb2b20877
4
+ data.tar.gz: 278e3559ea065c95e3731e3a6147b7f59426b289
5
5
  SHA512:
6
- metadata.gz: a9323a1a8c3f9ef8be2b32860dc381b97b96a25b5dca141b63d4dde56c3cc2bef270d06a83bc3c0e6be6659f37af2787ec563d1db66672749edd3cf22008c655
7
- data.tar.gz: 65e393193e37d2ffbc0df646146b9c9e54dc58e4322823212f6f991f291404c5b64f02b01370bab683cea4cd4e0e11484ee6e668193f601157037095c402e81c
6
+ metadata.gz: a3085aff67ebf004713983687398189bd27d9620016205c9fed5a9f346cc908cced4e1798cb10ed07406979cd8b360f3991be2d2f9195d1f58d3dfee5cbc58b0
7
+ data.tar.gz: 507b0339285550cb279dbf46a33e1730eec19a0ef24c93472259b4d1d3e7ca7f3ff9b014be69e9af73eb305e41ad3340656db4c9e49c2d4adcbaf963b9194e3d
data/Gemfile.lock CHANGED
@@ -1,19 +1,22 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- farmstead (0.0.33)
4
+ farmstead (0.0.34)
5
5
  httparty (~> 0.15.6)
6
6
  mechanize (~> 2.7)
7
7
  mysql2 (~> 0.4.10)
8
8
  nokogiri (~> 1.8)
9
9
  os (~> 1.0)
10
10
  ruby-kafka (~> 0.5.1)
11
+ sequel (~> 5.4.0)
11
12
  sinatra (~> 2.0.0)
13
+ sinatra-contrib (~> 2.0.0)
12
14
  thor (~> 0.20.0)
13
15
 
14
16
  GEM
15
17
  remote: https://rubygems.org/
16
18
  specs:
19
+ backports (3.11.0)
17
20
  diff-lcs (1.3)
18
21
  domain_name (0.5.20170404)
19
22
  unf (>= 0.0.5, < 1.0.0)
@@ -41,6 +44,7 @@ GEM
41
44
  mime-types-data (~> 3.2015)
42
45
  mime-types-data (3.2016.0521)
43
46
  mini_portile2 (2.3.0)
47
+ multi_json (1.13.1)
44
48
  multi_xml (0.6.0)
45
49
  mustermann (1.0.1)
46
50
  mysql2 (0.4.10)
@@ -71,11 +75,19 @@ GEM
71
75
  rspec-support (~> 3.7.0)
72
76
  rspec-support (3.7.0)
73
77
  ruby-kafka (0.5.2)
78
+ sequel (5.4.0)
74
79
  sinatra (2.0.0)
75
80
  mustermann (~> 1.0)
76
81
  rack (~> 2.0)
77
82
  rack-protection (= 2.0.0)
78
83
  tilt (~> 2.0)
84
+ sinatra-contrib (2.0.0)
85
+ backports (>= 2.0)
86
+ multi_json
87
+ mustermann (~> 1.0)
88
+ rack-protection (= 2.0.0)
89
+ sinatra (= 2.0.0)
90
+ tilt (>= 1.3, < 3)
79
91
  thor (0.20.0)
80
92
  tilt (2.0.8)
81
93
  unf (0.1.4)
data/farmstead.gemspec CHANGED
@@ -30,7 +30,9 @@ Gem::Specification.new do |spec|
30
30
  spec.add_runtime_dependency "nokogiri", "~> 1.8"
31
31
  spec.add_runtime_dependency "mechanize", "~> 2.7"
32
32
  spec.add_runtime_dependency "httparty", "~> 0.15.6"
33
+ spec.add_runtime_dependency "sequel", "~> 5.4.0"
33
34
  spec.add_runtime_dependency "sinatra", "~> 2.0.0"
35
+ spec.add_runtime_dependency "sinatra-contrib", "~> 2.0.0"
34
36
 
35
37
  spec.add_development_dependency "dotenv", "~> 0.11.1"
36
38
  spec.add_development_dependency "listen", "~> 3.0"
@@ -6,14 +6,13 @@ module Sinatra
6
6
  end
7
7
 
8
8
  app.get "/version" do
9
- "Farmstead #{Farmstead::VERSION}"
10
- end
9
+ "Farmstead #{Farmstead::VERSION}"
10
+ end
11
11
 
12
12
  app.get "/environment" do
13
- Farmstead::ENVIRONMENT.each do |var|
14
- var
15
- end
13
+ Farmstead::ENVIRONMENT.join(" ")
16
14
  end
15
+
17
16
  end
18
17
  end
19
18
  register DefaultRoutes
@@ -0,0 +1,18 @@
1
+ require "sinatra/base"
2
+ require "sinatra/namespace"
3
+
4
+ module Sinatra
5
+ module V1
6
+
7
+ def self.registered(app)
8
+ app.register Sinatra::Namespace
9
+ app.namespace "/api/v1" do
10
+ get "/source" do
11
+ Farmstead::DB.add_source
12
+ end
13
+ end
14
+ end
15
+
16
+ end
17
+ register V1
18
+ end
data/lib/farmstead/api.rb CHANGED
@@ -1,5 +1,6 @@
1
1
  module Farmstead
2
2
  class API < Sinatra::Base
3
+ register Sinatra::V1
3
4
  register Sinatra::DefaultRoutes
4
5
  set :port, 3000
5
6
  set :bind, "0.0.0.0"
@@ -0,0 +1,9 @@
1
+ require "sequel"
2
+
3
+ module Farmstead
4
+ class DB
5
+ def self.add_source
6
+ "Test"
7
+ end
8
+ end
9
+ end
@@ -14,7 +14,6 @@ gem "mysql2", "~> 0.4.10"
14
14
  gem "nokogiri", "~> 1.8.1"
15
15
  gem "omniauth-auth0", "~> 2.0.0"
16
16
  gem "puma", "~> 3.0"
17
- gem "rails", "~> 5.0.0"
18
17
  gem "ruby-kafka", "~> 0.5.1"
19
18
  gem "sass-rails", "~> 5.0"
20
19
  gem "turbolinks", "~> 5"
@@ -1,3 +1,3 @@
1
1
  module Farmstead
2
- VERSION = "0.0.33"
2
+ VERSION = "0.0.34"
3
3
  end
data/lib/farmstead.rb CHANGED
@@ -36,6 +36,7 @@ require "farmstead/version"
36
36
  require "farmstead/environment"
37
37
  require "farmstead/project"
38
38
  require "farmstead/cli"
39
+ require "farmstead/db"
39
40
  require "farmstead/service"
40
41
  require "farmstead/pipeline/manage"
41
42
  require "farmstead/pipeline/extract"
@@ -44,6 +45,7 @@ require "farmstead/pipeline/load"
44
45
 
45
46
  require "farmstead/api/defaultroutes.rb"
46
47
  require "farmstead/api/helpers.rb"
48
+ require "farmstead/api/v1.rb"
47
49
  require "farmstead/api"
48
50
 
49
51
  module Farmstead
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.33
4
+ version: 0.0.34
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ken Jenney
@@ -108,6 +108,20 @@ dependencies:
108
108
  - - "~>"
109
109
  - !ruby/object:Gem::Version
110
110
  version: 0.15.6
111
+ - !ruby/object:Gem::Dependency
112
+ name: sequel
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - "~>"
116
+ - !ruby/object:Gem::Version
117
+ version: 5.4.0
118
+ type: :runtime
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - "~>"
123
+ - !ruby/object:Gem::Version
124
+ version: 5.4.0
111
125
  - !ruby/object:Gem::Dependency
112
126
  name: sinatra
113
127
  requirement: !ruby/object:Gem::Requirement
@@ -122,6 +136,20 @@ dependencies:
122
136
  - - "~>"
123
137
  - !ruby/object:Gem::Version
124
138
  version: 2.0.0
139
+ - !ruby/object:Gem::Dependency
140
+ name: sinatra-contrib
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - "~>"
144
+ - !ruby/object:Gem::Version
145
+ version: 2.0.0
146
+ type: :runtime
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - "~>"
151
+ - !ruby/object:Gem::Version
152
+ version: 2.0.0
125
153
  - !ruby/object:Gem::Dependency
126
154
  name: dotenv
127
155
  requirement: !ruby/object:Gem::Requirement
@@ -219,8 +247,10 @@ files:
219
247
  - lib/farmstead/api.rb
220
248
  - lib/farmstead/api/defaultroutes.rb
221
249
  - lib/farmstead/api/helpers.rb
250
+ - lib/farmstead/api/v1.rb
222
251
  - lib/farmstead/cli.rb
223
252
  - lib/farmstead/cli/test.rb
253
+ - lib/farmstead/db.rb
224
254
  - lib/farmstead/environment.rb
225
255
  - lib/farmstead/pipeline/extract.rb
226
256
  - lib/farmstead/pipeline/load.rb