apperol 0.0.6 → 0.0.7

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1af4ceea19c4f3a053a1ef72abe5dfb5efd8ce69
4
- data.tar.gz: 9f551fb3d5872fdd194ee4e93fd3f43d70909905
3
+ metadata.gz: 0e9e981c70db00587f3b2340a9d452ce9176edd0
4
+ data.tar.gz: f898bafdb9d0d814335b91de19e9c33c4e727f35
5
5
  SHA512:
6
- metadata.gz: ef21f0d24b38429c5745e09739ef1648e3d76cc89d6e3e5fc21076fd7bc5004bafb6d1a5fb399e9a88c1ba733b33d947bbd221dc4a6bdfb89712846544107dd0
7
- data.tar.gz: 315b50fc31f3114a6e04aa9d01c08c886371604ce6c911fbd78a6300c03c83a394b98bd000503744dd467f225b54e69adade3609fbdbaacc21da27f68f74a796
6
+ metadata.gz: acb1d55c64aa1d3fc98f247c44d7bf6ec686a61db8898e4b88cb9790bfe4bbcb30a9647280692ebce533eefebd13030ca2024bbd4dff1290d62b60758ce218b0
7
+ data.tar.gz: 7dfb3ecb7b81c2f6110c069f5bf5b64d0f82fbb4f905bdca8db2ead39aab7ebb93ba4ae539046bafe19de251b44fac989e76ed9021423740cd9c7d31ef8f86a1
data/lib/apperol/cli.rb CHANGED
@@ -23,19 +23,19 @@ module Apperol
23
23
  @options[env_value.key] = value
24
24
  end
25
25
  end
26
- opts.on("-p", "--personal", "Force app in personal apps instead of orgs") do
27
- @options[:personal] = true
26
+ opts.on("-o", "--org ORG", "Push app to organization on heroku") do |org|
27
+ @options[:org] = org
28
28
  end
29
- opts.on("-r", "--repo repo", "GitHub repository used for the deploy (Default: user/dir_name)") do |repo|
29
+ opts.on("-r", "--repo REPO", "GitHub repository used for the deploy (Default: user/dir_name)") do |repo|
30
30
  @options[:repo] = repo
31
31
  end
32
- opts.on("-u", "--user user", "GitHub user where current repo is located (Default: Your GitHub username)") do |user|
32
+ opts.on("-u", "--user USER", "GitHub user where current repo is located (Default: Your GitHub username)") do |user|
33
33
  @options[:user] = user
34
34
  end
35
- opts.on("-s", "--stack stack", "Stack for app on heroku (Default: cedar-14)") do |stack|
35
+ opts.on("-s", "--stack STACK", "Stack for app on heroku (Default: cedar-14)") do |stack|
36
36
  @options[:stack] = stack
37
37
  end
38
- opts.on("-b", "--branch branch", "Branch to setup app from (Default: master)") do |branch|
38
+ opts.on("-b", "--branch BRANCH", "Branch to setup app from (Default: master)") do |branch|
39
39
  @options[:branch] = branch
40
40
  end
41
41
  opts.on('-h', '--help', 'Displays Help') do
@@ -150,7 +150,7 @@ module Apperol
150
150
  $stderr.puts("error: Required fields not filled. Please specify them. #{required_not_filled}")
151
151
  exit 1
152
152
  end
153
- payload[:app][:organization] = "heroku" unless personal_app?
153
+ payload[:app][:organization] = org unless personal_app?
154
154
  payload.to_json
155
155
  end
156
156
 
@@ -179,7 +179,11 @@ module Apperol
179
179
  end
180
180
 
181
181
  def personal_app?
182
- @options.fetch(:personal, false)
182
+ org.nil?
183
+ end
184
+
185
+ def org
186
+ @options.fetch(:org, nil)
183
187
  end
184
188
 
185
189
  def repo
@@ -1,3 +1,3 @@
1
1
  module Apperol
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.7"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: apperol
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yannick