zenslap 0.2.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. data/bin/zenslap +22 -15
  2. data/zenslap.gemspec +1 -1
  3. metadata +3 -3
@@ -1,15 +1,22 @@
1
- #!/bin/sh
2
- app=$(git config zenslap.zenslap)
3
- while [ "$app" = "" ]; do·
4
- echo "Enter the name of the zenslap app"
5
- read unvalidatedApp·
6
- $(heroku config --app $unvalidatedApp)
7
- if [ "$?" != "0" ]; then
8
- echo $app
9
- else
10
- app=$unvalidatedApp
11
- git config zenslap.zenslap $app
12
- fi
13
- done
14
- echo $app
15
- heroku $* --app $app
1
+ #!/usr/bin/env ruby
2
+
3
+ def valid_app?(app)
4
+ system "heroku config --app #{app}"
5
+ end
6
+
7
+ def app
8
+ app=%x{ git config zenslap.zenslap }
9
+ while app == ""
10
+ puts "\nEnter the name of the zenslap app"
11
+ unvalidated_app = STDIN.gets.chomp
12
+ if unvalidated_app == ""
13
+ # retry
14
+ elsif valid_app? unvalidated_app
15
+ system "git config zenslap.zenslap #{unvalidated_app}"
16
+ app = unvalidated_app
17
+ end
18
+ end
19
+ app
20
+ end
21
+
22
+ exec "heroku #{ARGV.join("")} --app #{app}"
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{zenslap}
8
- s.version = "0.2.0"
8
+ s.version = "0.2.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["opsb"]
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zenslap
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 21
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 0
10
- version: 0.2.0
9
+ - 1
10
+ version: 0.2.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - opsb