veksel 0.2.1 → 0.2.2

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
  SHA256:
3
- metadata.gz: 5ea3fcb9a16045af635f30b41e951e002e82d3f9de54c2b015f183069bf96a27
4
- data.tar.gz: db4756858dac59fe8e26b67c9d0498aa5bf34eae6c88b4cadc61b1cd326b4c4d
3
+ metadata.gz: 288e8f30d1d6e5297d1decb5a50cb352c099a8bb8c8081bbb1b16ab834ecfb21
4
+ data.tar.gz: 280188595b8536edb7f8677b9cf8dded5f815b8c6552122a09670aadcdc691d6
5
5
  SHA512:
6
- metadata.gz: 2b10cd547c563757d88b93e8293b1e3243d1d962708729c6faf1b90e16b8b75de89b52dff3e74d45b9a36ff470fbc6ddb20fdd922fae2c20aa23f9dfaac526e7
7
- data.tar.gz: 23ddfb9527f9ebbee6f6e91bc01553261f0985170ac27aeef8d9717c6d307fd111c5d00b620d04a7043092a7d8f0ff7c2c2be67450003f69286b034a09b3467b
6
+ metadata.gz: 45c0de39a5e76b77bd7b14ffdbfa0dfbe209ff87fa0ae42acb2a84c6c44971814eac36026063be82656159ce72cd37fcaf4e0db428f0be1263cb121821aefddb
7
+ data.tar.gz: 9b441491aa25606aa1e87080523f8daed8a5550f0f9a4a250d801ddce39b4da02bd4bab716d3b3f603462d9e09c53de1a11f4c954654a3abcb679fa87f71e27a
data/README.md CHANGED
@@ -63,13 +63,14 @@ $ gem install veksel
63
63
  - Explicit/optional branching
64
64
  - Other database drivers
65
65
 
66
- ## Publishing
66
+ ## Release process
67
67
 
68
- Veksel is published and distributed on [rubygems](https://rubygems.org).
68
+ ```shell
69
+ # Bump version number in lib/veksel/version.rb
69
70
 
70
- To publish a new version:
71
+ # Update lockfile
72
+ bundle install
71
73
 
72
- ```shell
73
74
  # Update changelog, review manually before committing
74
75
  conventional-changelog -p conventionalcommits -i CHANGELOG.md -s
75
76
  git commit -m 'chore(release): x.y.z'
data/lib/veksel/cli.rb CHANGED
@@ -15,7 +15,8 @@ module Veksel
15
15
  require 'ostruct'
16
16
  require 'fileutils'
17
17
 
18
- config = Psych.safe_load(File.read('config/database.yml'), aliases: true)['development'].transform_keys(&:to_sym)
18
+ config = read_config('config/database.yml')[:development]
19
+
19
20
  target_database = config[:database] + Veksel.suffix
20
21
  db = OpenStruct.new(configuration_hash: config, database: target_database)
21
22
  Veksel::Commands::Fork.new(db).perform
@@ -24,5 +25,16 @@ module Veksel
24
25
  FileUtils.touch('tmp/restart.txt')
25
26
  puts "Forked database in #{duration.to_i}ms"
26
27
  end
28
+
29
+ private_class_method def self.read_config(path)
30
+ raw_config = File.read(path)
31
+
32
+ if raw_config.include?('<%=')
33
+ require 'erb'
34
+ raw_config = ERB.new(raw_config).result
35
+ end
36
+
37
+ Psych.safe_load(raw_config, aliases: true, symbolize_names: true)
38
+ end
27
39
  end
28
40
  end
@@ -1,3 +1,3 @@
1
1
  module Veksel
2
- VERSION = "0.2.1"
2
+ VERSION = "0.2.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: veksel
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Theodor Tonum
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-03-10 00:00:00.000000000 Z
11
+ date: 2024-03-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails