taps2 0.6.2 → 0.6.3

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: 3269014543ce71626233b86653548e88ffb2203d
4
- data.tar.gz: '099399d46e0c8cf8836ccfa3e149f0c0515ddab8'
3
+ metadata.gz: 90d456e2f3cc63da7d527fb43f19203e2d5cf223
4
+ data.tar.gz: 26901b91006ce88eab5b65e6ed72ce8ad93d7cc7
5
5
  SHA512:
6
- metadata.gz: b036656d30d8d062c5ccda4e885822c48a09608655481d930beea6002f02f994df05e85d85227aa3c1be0d9039681bf1ef1e139b214133f5f7a66f451abfb14d
7
- data.tar.gz: ed19000dcb306a530a1bc771466aa8fb9e71bb07645d0d222ef37126316660d968c8a6639380bd0b2568d99dac20a9a6fce4ecc47e874bf4820f4c4692c6f810
6
+ metadata.gz: 1666f844b2af103978f95b7da215dd6b265b1753510ffdbfbe4e1267c6ab70bb70f755956a67031823ba47bda8a9638aa50c01c09c651a5c9a2df0aaa5bb8ca0
7
+ data.tar.gz: 14198719b01808971eba5cf90f8c8c108fe34610c5201fd734985615cc841c649b6aff84873aed2fac80c150b06e43ffd0edd3cae2a1e0b220dc15006ee8e8c0
@@ -1,20 +1,21 @@
1
- Sequel::Model.db = Sequel.connect(Taps::Config.taps_database_url)
1
+ DB = Sequel.connect(Taps::Config.taps_database_url)
2
2
 
3
- class DbSession < Sequel::Model
4
- plugin :schema
5
- set_schema do
6
- primary_key :id
7
- text :key
8
- text :database_url
9
- timestamp :started_at
10
- timestamp :last_access
11
- end
3
+ #DbSession.create_table! unless DbSession.table_exists?
4
+ DB.create_table? :db_session do
5
+ primary_key :id
6
+ text :key
7
+ text :database_url
8
+ timestamp :started_at
9
+ timestamp :last_access
10
+ end
12
11
 
12
+ Sequel::Model.db = DB
13
+ Sequel::Model.require_valid_table = false
14
+
15
+ class DbSession < Sequel::Model
13
16
  def conn
14
17
  Sequel.connect(database_url) do |db|
15
18
  yield db if block_given?
16
19
  end
17
20
  end
18
21
  end
19
-
20
- DbSession.create_table! unless DbSession.table_exists?
data/lib/taps/server.rb CHANGED
@@ -31,8 +31,8 @@ module Taps
31
31
  before do
32
32
  unless request.path_info == '/health'
33
33
  major, minor = request.env['HTTP_TAPS_VERSION'].to_s.split('.')
34
- unless Taps.compatible_version == "#{major}.#{minor}"
35
- halt 417, "Taps >= v#{Taps.compatible_version}.x is required for this server"
34
+ unless Taps::Version.compatible_version == "#{major}.#{minor}"
35
+ halt 417, "Taps >= v#{Taps::Version.compatible_version}.x is required for this server"
36
36
  end
37
37
  end
38
38
  end
data/lib/taps/version.rb CHANGED
@@ -2,7 +2,7 @@ module Taps
2
2
  module Version
3
3
  MAJOR = 0
4
4
  MINOR = 6
5
- PATCH = 2
5
+ PATCH = 3
6
6
  BUILD = 0
7
7
 
8
8
  def self.current
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: taps2
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.2
4
+ version: 0.6.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ricardo Chimal, Jr.
@@ -57,14 +57,14 @@ dependencies:
57
57
  name: sequel
58
58
  requirement: !ruby/object:Gem::Requirement
59
59
  requirements:
60
- - - "~>"
60
+ - - ">="
61
61
  - !ruby/object:Gem::Version
62
62
  version: '4.0'
63
63
  type: :runtime
64
64
  prerelease: false
65
65
  version_requirements: !ruby/object:Gem::Requirement
66
66
  requirements:
67
- - - "~>"
67
+ - - ">="
68
68
  - !ruby/object:Gem::Version
69
69
  version: '4.0'
70
70
  - !ruby/object:Gem::Dependency