appli 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/appli/command.rb +2 -2
- data/lib/appli.rb +2 -2
- data/lib/commands/cap.rb +13 -0
- metadata +2 -1
data/lib/appli/command.rb
CHANGED
@@ -76,8 +76,8 @@ module Appli
|
|
76
76
|
when Net::HTTPServiceUnavailable
|
77
77
|
puts "The API is currently unavailable. Please check your codebase account has been enabled for API access."
|
78
78
|
Process.exit(1)
|
79
|
-
when Net::HTTPForbidden, Net::HTTPUnauthorized
|
80
|
-
puts "
|
79
|
+
when Net::HTTPForbidden, Net::HTTPUnauthorized, Net::HTTPFound
|
80
|
+
puts "\e[41;37mAccess Denied. Check your appli username & API key have been configured correctly.\e[0m"
|
81
81
|
Process.exit(1)
|
82
82
|
else
|
83
83
|
@errors = res.body
|
data/lib/appli.rb
CHANGED
@@ -14,7 +14,7 @@ module Appli
|
|
14
14
|
class NotConfiguredError < StandardError; end
|
15
15
|
class MustBeInRepositoryError < StandardError; end
|
16
16
|
|
17
|
-
VERSION = "0.0.
|
17
|
+
VERSION = "0.0.4"
|
18
18
|
|
19
19
|
def run(command, args = [])
|
20
20
|
load_commands
|
@@ -38,7 +38,7 @@ module Appli
|
|
38
38
|
options.merge!({:application => args.shift}) if type == :app
|
39
39
|
|
40
40
|
if args.size < array[command][:required_args].to_i
|
41
|
-
puts "error: #{
|
41
|
+
puts "error: #{array[command][:usage]}"
|
42
42
|
puts "See 'cb help #{command}' for usage."
|
43
43
|
Process.exit(1)
|
44
44
|
end
|
data/lib/commands/cap.rb
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
desc 'Generates a pre-configured capistrano deployment recipe.'
|
2
|
+
desc 'This file is then copied into config/deploy.rb unless a file already exists. This will'
|
3
|
+
desc 'only function if you are in the root of an application with a \'Capify\' file already'
|
4
|
+
desc 'generated.'
|
5
|
+
usage "appli [application] capify {export path}"
|
6
|
+
command "capify", :required_args => 1 do |file|
|
7
|
+
error "File already exists at '#{file}'. Remove this file before continuing or change the export path." if File.exist?(file)
|
8
|
+
File.open(file, 'w') {|f| f.write(get("applications/#{@options[:application]}/capistrano")['config']) }
|
9
|
+
puts "Generated capistrano deployment receipe at '#{file}'."
|
10
|
+
puts
|
11
|
+
puts "You should now edit this file to include the path to your repository. Along with any additional"
|
12
|
+
puts "configuration which may be required by your application."
|
13
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: appli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adam Cooke
|
@@ -34,6 +34,7 @@ files:
|
|
34
34
|
- bin/appli
|
35
35
|
- lib/appli/command.rb
|
36
36
|
- lib/appli.rb
|
37
|
+
- lib/commands/cap.rb
|
37
38
|
- lib/commands/gems.rb
|
38
39
|
- lib/commands/mysql.rb
|
39
40
|
- lib/commands/system.rb
|