cloudbees 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
data/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2010 Simon Harris
1
+ Copyright (c) 2011 Michael neale
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
@@ -1,20 +1,19 @@
1
- = NAME - Description
1
+ = CloudBees - Description
2
2
 
3
- GitHub: http://github.com/harukizaemon/NAME
4
- Gemcutter: http://gemcutter/gems/NAME
5
- email: haruki.zaemon@gmail.com
6
- IRC: #haruki_zaemon on freenode
3
+ GitHub: http://github.com/michaelneale/CloudBees-gem
7
4
 
8
5
  == Introduction
6
+ CloudBees gem for deploying ruby rack based apps (such as rails) to CloudBees Paas (via jruby)
9
7
 
10
8
  == Installation
11
9
 
12
- NAME is distributed as a gem via gemcutter (http://gemcutter.org/gems/NAME) or as source via GitHub (http://github.com/harukizaemon/NAME).
13
10
 
14
11
  Installation via the gem is easy:
15
12
 
16
- > gem install NAME
13
+ > gem install cloudbees
17
14
 
18
- Once installed, all that remains is to make the classes available in your code:
15
+ Once installed, you use it via:
19
16
 
20
- require 'NAME'
17
+ > cloudbees
18
+
19
+ It will tell you what to do (run it in your rack/rails app directory)
@@ -8,10 +8,16 @@ def has_program?(program)
8
8
  end
9
9
 
10
10
 
11
+
11
12
  if not has_program?('bees') then
12
- abort('Please install the CloudBees SDK from here: www.cloudbees.com/run.cb')
13
+ abort('Please install the CloudBees SDK www.cloudbees.com/run.cb')
14
+ end
15
+
16
+ if not has_program?('warble') then
17
+ abort('Please install warbler (gem install warbler)')
13
18
  end
14
19
 
20
+
15
21
  usage_message = 'Usage: cloudbees deploy USER/APPNAME ["(optional) description here"]'
16
22
 
17
23
  if ARGV.size < 2 then
@@ -31,7 +37,11 @@ app_id = ARGV[1]
31
37
 
32
38
  puts "Packaging the application locally, please wait..."
33
39
 
34
- `warble`
40
+ packaging_success = system("warble")
41
+
42
+ if not packaging_success then
43
+ abort("Unable to package the application as a war, see errors above")
44
+ end
35
45
 
36
46
  wars = Dir.glob("*.war")
37
47
 
@@ -42,7 +52,8 @@ end
42
52
  puts "Now deploying to CloudBees..."
43
53
 
44
54
  if ARGV.size == 2 then
45
- `bees app:deploy -a #{app_id} #{wars[0]}`
55
+ `bees app:deploy -a #{app_id} #{wars[0]}"`
46
56
  else
47
57
  `bees app:deploy -a #{app_id} -m "#{ARGV[2]}" #{wars[0]}`
48
58
  end
59
+
@@ -1,5 +1,5 @@
1
1
  module NAME
2
2
 
3
- VERSION = "0.1.3".freeze
3
+ VERSION = "0.1.4".freeze
4
4
 
5
5
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cloudbees
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
4
+ hash: 19
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 3
10
- version: 0.1.3
9
+ - 4
10
+ version: 0.1.4
11
11
  platform: ruby
12
12
  authors:
13
13
  - Michael Neale
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-01-28 00:00:00 +11:00
18
+ date: 2011-01-31 00:00:00 +11:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency