minfra-cli 1.4.4 → 1.5.0

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: 0431a193e4cb6b0fe022a8a1c2fb3b988b14ed3e2bca4cc7c2407e4b9bd76a86
4
- data.tar.gz: e73b425bbd7bd64f17da06b6f38897cd8fdc014d3fbecaccd213c9a247cc596c
3
+ metadata.gz: 0d8c4fc413b6865291c1f47e12581c0f11131008f4852742969fb49a8be4272d
4
+ data.tar.gz: 7e1eb348156ba8adb74bf7f5bb5055853c31a3c2802fa77497c7a529573f9d23
5
5
  SHA512:
6
- metadata.gz: 358adc1077ebf830b16243631837fcd04d722ed92f45cb1bb6b3bfd2e905fa127f3f725f68500a96ee001b7bcf66aba796931fccbdc8f6a6bbb0941dff9d3bec
7
- data.tar.gz: dee59c2f5f2da709352c09a7bfbc4094f91e5c4f6ee533ae04708ecb9618b55435a151b1518a6e921f85712c4278f4258b21853d0087b06098b19b90a009206d
6
+ metadata.gz: efa9ca0853ee602c708770a42cd6c1269f996dbcb70d4170cb630b815df161bc280bd5afb1ce608a4afefa699a6df78fa22c099260bfe3853ce4da7b8a601745
7
+ data.tar.gz: 28e53a02daacbe1c3ccc33fa2e273a52ac04c7b9189c559a93b7d4fd5840bae0eb837ebbee16e74df533dd574b84eb350805ffca22bad2e4da09b209af7d916a
data/.gitignore CHANGED
@@ -14,3 +14,5 @@ vendor
14
14
  spec/docker-compose.run.yml
15
15
 
16
16
  minfra-cli-*.gem
17
+
18
+ .rspec
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ # 1.5.0
2
+ * minfra project branch create now supports --prefix, keeps '-' (dash intact) and is config file configurable
3
+ * Minfra::Cli::Config deep merges personal config (again)
1
4
  # 1.4.4
2
5
  * fixing logging on fresh installs
3
6
  # 1.4.3
data/Rakefile ADDED
@@ -0,0 +1,6 @@
1
+ require "bundler/gem_tasks"
2
+ require "rspec/core/rake_task"
3
+
4
+ #RSpec::Core::RakeTask.new(:spec)
5
+
6
+ #task :default => :spec
@@ -4,12 +4,16 @@ module Minfra
4
4
  class Branch < Command
5
5
 
6
6
  desc "create 'story desc'", 'create branch'
7
+ option :prefix, type: :string, desc: "don't use your git email address or project.branch.create.prefix or identity.email"
7
8
  def create(story_desc)
8
- story_desc = story_desc.gsub(/[^0-9a-z]/i, '_')
9
- email = `git config user.email`
10
- fullname = email.split('@').first
11
- name = fullname[0] + fullname.split('.').last
12
- Runner.run("git checkout -b #{name}_#{story_desc}_$(date +%Y%m%d)")
9
+ story_desc = story_desc.gsub(/[^0-9a-z\-]/i, '_')
10
+ prefix = options[:prefix] || Minfra::Cli.config.project.dig('project','branch', 'create', 'prefix')
11
+ unless prefix
12
+ email = Minfra::Cli.config.project.dig('identity', 'email') || `git config user.email`
13
+ fullname = email.split('@').first
14
+ prefix = fullname[0] + fullname.split('.').last
15
+ end
16
+ Runner.run("git checkout -b #{prefix}_#{story_desc}_$(date +%Y%m%d)")
13
17
  end
14
18
  end
15
19
  end
@@ -56,6 +56,11 @@ module Minfra
56
56
  @config = Hashie::Mash.new({})
57
57
  end
58
58
  @project = Hashie::Mash.new(JSON.parse(Minfra::Cli::Templater.render(File.read(@project_config_path),{})))
59
+ @project= @project.
60
+ deep_merge(@config)
61
+ # deep_merge(@project.environments[@orch_env]).
62
+ # deep_merge(@orch_env_config)
63
+
59
64
  end
60
65
 
61
66
  def load(orch_env)
@@ -1,5 +1,5 @@
1
1
  module Minfra
2
2
  module Cli
3
- VERSION = '1.4.4'.freeze
3
+ VERSION = '1.5.0'.freeze
4
4
  end
5
5
  end
@@ -0,0 +1,13 @@
1
+ #!/bin/bash
2
+
3
+ if [[ -f "$MINFRA_PATH/config/env_setup" ]]; then
4
+ source $MINFRA_PATH/config/env_setup
5
+ fi
6
+
7
+ MINFRA_SHELL=${MINFRA_SHELL:-"/bin/bash"}
8
+ CMD=${@:-$MINFRA_SHELL}
9
+
10
+ echo "running: '$CMD'"
11
+
12
+ exec $CMD
13
+
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: minfra-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.4
4
+ version: 1.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Schrammel
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-11-22 00:00:00.000000000 Z
11
+ date: 2022-11-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -157,6 +157,7 @@ files:
157
157
  - Gemfile
158
158
  - Gemfile.lock
159
159
  - README.md
160
+ - Rakefile
160
161
  - bin/build
161
162
  - bin/console
162
163
  - bin/container_exec
@@ -211,6 +212,7 @@ files:
211
212
  - templates/kind.yaml.erb
212
213
  - templates/kube_config.yaml.erb
213
214
  - templates/minfra_config.json.erb
215
+ - templates/project/dev/bin/runner
214
216
  homepage: https://github.com/fixingthenet/minfra-cli
215
217
  licenses:
216
218
  - MIT