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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fefca18b79ef6e7d59bb87305e52f31c2b5016f960456a60855cfec795b5bcff
4
- data.tar.gz: e0784682f14fdfd8e5e0c80f7b131f3f9d30db7c4f24f77bab82fd0aa00baeca
3
+ metadata.gz: 288e8f30d1d6e5297d1decb5a50cb352c099a8bb8c8081bbb1b16ab834ecfb21
4
+ data.tar.gz: 280188595b8536edb7f8677b9cf8dded5f815b8c6552122a09670aadcdc691d6
5
5
  SHA512:
6
- metadata.gz: 4a601171ac3e739e271232190e6100b8dc9e5742165366827f7ef05c34301140e637fc81a4ec463b458b337f1a5cd62b593edc476160ce3381953fbe3c67a526
7
- data.tar.gz: d01186ca6393d3e12d1c084a5711279a67e82ab5c0bcdb001f741f5f2bd83faab2fb2ff51722bff5c302fe64922a8b62ed433600b8d46d095cb5af768effee58
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
@@ -1,3 +1,3 @@
1
1
  module Veksel
2
- VERSION = "0.2.0"
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.0
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-02-29 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