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 +4 -4
- data/README.md +5 -4
- data/lib/veksel/cli.rb +13 -1
- data/lib/veksel/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 288e8f30d1d6e5297d1decb5a50cb352c099a8bb8c8081bbb1b16ab834ecfb21
|
4
|
+
data.tar.gz: 280188595b8536edb7f8677b9cf8dded5f815b8c6552122a09670aadcdc691d6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
##
|
66
|
+
## Release process
|
67
67
|
|
68
|
-
|
68
|
+
```shell
|
69
|
+
# Bump version number in lib/veksel/version.rb
|
69
70
|
|
70
|
-
|
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 =
|
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
|
data/lib/veksel/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2024-03-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|