stipa 0.2.1 → 0.2.3

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
  SHA256:
3
- metadata.gz: f091e5c4ee4aa36a0ebeb498b1ad781be0bb0d0f3423c5c1b242ff1dc11754f0
4
- data.tar.gz: 2b97f2bc8eaa3a8cfe1ccacab9a030209b88ba44dbd76f84cbc99ba56530ca52
3
+ metadata.gz: 629ad04a4c8bcd7193a81038be6845f90d9e01b229bfbc0b2d1cb7931359ac06
4
+ data.tar.gz: 7d57a8f7839381d2abfe434221cc58de4a8bddf945d7f55ced2c7c9f272c6bef
5
5
  SHA512:
6
- metadata.gz: cac5a86b535550c92811bbff7db3715109e736e32d1eab7e809b2da14d448e768c4a9ee2a5e1b9a15f9ad07dc4949dd369314dc644ddb071aebc4e84bd7926fc
7
- data.tar.gz: 83dc705b0d41a4616609bb2a8469511a8cb6ef46e12c8acc4372eb6875bf031fc49a9b62707ca6ce698dfc8b7f7660e37970df631df93b2131dba4ed3cace838
6
+ metadata.gz: d96ce9f31e87e046095910f784526cc9a7eb7ca98e5af626b07dd668a12c0eb46e7bab0bd60950788ca924ea75aea08b97b981e38b4ba6615edb2dfbaf72661c
7
+ data.tar.gz: 74e83a3380253c27ef9eddbd4cdba82b3a7658b9261a4dc5ad2b2a58a75cd5820799f9a6ba0cd2512f485ec38c5cb7b354dd07368769c34dc2ab214bee89fc7a
@@ -190,13 +190,17 @@ module Stipa
190
190
 
191
191
  require 'stipa/model'
192
192
 
193
- class ApplicationModel < Sequel::Model
194
- include Stipa::Model
195
-
196
- def self.dataset
197
- super
198
- rescue Sequel::Error => e
199
- raise "Database not ready: \#{e.message}"
193
+ # Include this in any Sequel::Model subclass to get
194
+ # timestamps, UUID, soft delete, and serialization.
195
+ #
196
+ # Usage:
197
+ # class Post < Sequel::Model
198
+ # include ApplicationModel
199
+ # end
200
+
201
+ module ApplicationModel
202
+ def self.included(base)
203
+ base.include Stipa::Model
200
204
  end
201
205
  end
202
206
  RUBY
@@ -223,7 +227,7 @@ module Stipa
223
227
  RUBY
224
228
  end
225
229
 
226
- def t_rakefile
230
+ def t_rakefile(config_path: 'config')
227
231
  <<~RUBY
228
232
  # frozen_string_literal: true
229
233
 
@@ -257,7 +261,7 @@ module Stipa
257
261
  task default: 'db:migrate'
258
262
 
259
263
  def load_config
260
- require_relative 'config/database'
264
+ require_relative '#{config_path}/database'
261
265
  Stipa::Database.connect!
262
266
  end
263
267
 
@@ -56,7 +56,7 @@ module Stipa
56
56
  {
57
57
  '.gitignore' => t_gitignore,
58
58
  'Gemfile' => t_gemfile,
59
- 'Rakefile' => t_rakefile,
59
+ 'Rakefile' => t_rakefile(config_path: 'app/config'),
60
60
  'package.json' => t_package_json,
61
61
  'rollup.config.js' => t_rollup_config,
62
62
  'tsconfig.json' => t_tsconfig,
data/lib/stipa/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Stipa
2
- VERSION = '0.2.1'
2
+ VERSION = '0.2.3'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stipa
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jānis Harbs