tavignano 0.0.0.pre

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 (4) hide show
  1. data/README.md +0 -0
  2. data/bin/tavignano +37 -0
  3. data/lib/tavignano.rb +25 -0
  4. metadata +49 -0
File without changes
@@ -0,0 +1,37 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'trollop'
4
+ require 'tavignano'
5
+
6
+ commands = %w(deploy stage rollback)
7
+ global_opts = Trollop::options do
8
+ banner "A tool for more advanced, automated Heroku deploys"
9
+ opt :noop, "Don't actually do anything", short: "-n"
10
+ opt :app, "Name of the app to manage", type: String
11
+ stop_on commands
12
+ end
13
+
14
+ cmd = ARGV.shift
15
+ cmd_opts = Trollop::options do
16
+ opt :force, "Force"
17
+ opt :repo, "Repo to use", type: String
18
+ opt :ref, "Git ref to use", type: String
19
+ end
20
+
21
+ # puts "Global options: #{global_opts.inspect}"
22
+ # puts "Subcommand: #{cmd.inspect}"
23
+ # puts "Subcommand options: #{cmd_opts.inspect}"
24
+ # puts "Remaining arguments: #{ARGV.inspect}"
25
+
26
+ op = case cmd
27
+ when "deploy"
28
+ Tavignano::Deploy.new app
29
+ when "stage"
30
+ Tavignano::Deploy.new "#{app}-staging"
31
+ when "rollback"
32
+ Tavignano::Rollback.new app
33
+
34
+ op.options = [*global_opts, *cmd_opts]
35
+ op.log = STDOUT
36
+
37
+ op.run!
@@ -0,0 +1,25 @@
1
+ module Tavignano
2
+ class Op
3
+ def initialize(app_name, opts = {})
4
+ @options = opts
5
+ end
6
+
7
+ def options(opts = {})
8
+ @options = opts
9
+ end
10
+
11
+ def log(io)
12
+ @logfile = io
13
+ end
14
+
15
+ def run!
16
+ # Do something!
17
+ end
18
+ end
19
+
20
+ class Deploy < Op
21
+ end
22
+
23
+ class Rollback < Op
24
+ end
25
+ end
metadata ADDED
@@ -0,0 +1,49 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: tavignano
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.0.pre
5
+ prerelease: 6
6
+ platform: ruby
7
+ authors:
8
+ - Félix Saparelli
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2012-03-23 00:00:00.000000000 Z
13
+ dependencies: []
14
+ description: A tool to help automate more complex Heroku deploys, stage pushes, and
15
+ rollbacks
16
+ email: me@passcod.net
17
+ executables:
18
+ - tavignano
19
+ extensions: []
20
+ extra_rdoc_files: []
21
+ files:
22
+ - lib/tavignano.rb
23
+ - bin/tavignano
24
+ - README.md
25
+ homepage: http://j.mp/Tavignano
26
+ licenses: []
27
+ post_install_message:
28
+ rdoc_options: []
29
+ require_paths:
30
+ - lib
31
+ required_ruby_version: !ruby/object:Gem::Requirement
32
+ none: false
33
+ requirements:
34
+ - - ! '>='
35
+ - !ruby/object:Gem::Version
36
+ version: '0'
37
+ required_rubygems_version: !ruby/object:Gem::Requirement
38
+ none: false
39
+ requirements:
40
+ - - ! '>'
41
+ - !ruby/object:Gem::Version
42
+ version: 1.3.1
43
+ requirements: []
44
+ rubyforge_project:
45
+ rubygems_version: 1.8.15
46
+ signing_key:
47
+ specification_version: 3
48
+ summary: More complex Heroku deploys
49
+ test_files: []