veksel 0.2.0 → 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 +22 -0
- data/lib/veksel/cli.rb +14 -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,6 +63,28 @@ $ gem install veksel
|
|
63
63
|
- Explicit/optional branching
|
64
64
|
- Other database drivers
|
65
65
|
|
66
|
+
## Release process
|
67
|
+
|
68
|
+
```shell
|
69
|
+
# Bump version number in lib/veksel/version.rb
|
70
|
+
|
71
|
+
# Update lockfile
|
72
|
+
bundle install
|
73
|
+
|
74
|
+
# Update changelog, review manually before committing
|
75
|
+
conventional-changelog -p conventionalcommits -i CHANGELOG.md -s
|
76
|
+
git commit -m 'chore(release): x.y.z'
|
77
|
+
git push origin
|
78
|
+
git tag vx.y.z
|
79
|
+
git push origin vx.y.z
|
80
|
+
|
81
|
+
# Build and push gem
|
82
|
+
gem build
|
83
|
+
gem push veksel-x.y.z.gem
|
84
|
+
|
85
|
+
# Upload the veksel-x-y-z.gem file to the Github release page
|
86
|
+
```
|
87
|
+
|
66
88
|
## Sponsors
|
67
89
|
|
68
90
|
Veksel is sponsored by [Skalar](https://github.com/Skalar)
|
data/lib/veksel/cli.rb
CHANGED
@@ -13,8 +13,10 @@ module Veksel
|
|
13
13
|
require 'veksel/commands/fork'
|
14
14
|
require 'psych'
|
15
15
|
require 'ostruct'
|
16
|
+
require 'fileutils'
|
17
|
+
|
18
|
+
config = read_config('config/database.yml')[:development]
|
16
19
|
|
17
|
-
config = Psych.safe_load(File.read('config/database.yml'), aliases: true)['development'].transform_keys(&:to_sym)
|
18
20
|
target_database = config[:database] + Veksel.suffix
|
19
21
|
db = OpenStruct.new(configuration_hash: config, database: target_database)
|
20
22
|
Veksel::Commands::Fork.new(db).perform
|
@@ -23,5 +25,16 @@ module Veksel
|
|
23
25
|
FileUtils.touch('tmp/restart.txt')
|
24
26
|
puts "Forked database in #{duration.to_i}ms"
|
25
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
|
26
39
|
end
|
27
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-
|
11
|
+
date: 2024-03-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|