Skip to content

Commit ca0ac0f

Browse files
author
Rodrigo Tassinari de Oliveira
committedMar 21, 2013
Sets up RDoc
1 parent 44a88b1 commit ca0ac0f

11 files changed

+92
-31
lines changed
 

‎README.rdoc

+67-1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,70 @@ Command line application to deploy and manage webapps on Amazon Web Services.
44

55
{<img src="https://travis-ci.org/myfreecomm/myfc_cloud.png?branch=master" alt="Build Status" />}[https://travis-ci.org/myfreecomm/myfc_cloud]
66
{<img src="https://coveralls.io/repos/myfreecomm/myfc_cloud/badge.png?branch=master" alt="Coverage Status" />}[https://coveralls.io/r/myfreecomm/myfc_cloud]
7-
{<img src="https://codeclimate.com/github/myfreecomm/myfc_cloud.png" />}[https://codeclimate.com/github/myfreecomm/myfc_cloud]
7+
{<img src="https://codeclimate.com/github/myfreecomm/myfc_cloud.png" alt="Code Climate Status" />}[https://codeclimate.com/github/myfreecomm/myfc_cloud]
8+
9+
== Installation
10+
11+
$ gem install myfc_cloud
12+
13+
== Usage
14+
15+
=== Available commands
16+
17+
$ myfc_cloud help
18+
19+
NAME
20+
myfc_cloud - Command line application to deploy and manage webapps on Amazon Web Services
21+
22+
SYNOPSIS
23+
myfc_cloud [global options] command [command options] [arguments...]
24+
25+
VERSION
26+
0.0.1
27+
28+
GLOBAL OPTIONS
29+
-C, --config_file=PATH_TO_CONFIG_FILE - Path to the configuration file (default: ~/.myfc_cloud.yml)
30+
-P, --production - Targets the production environment
31+
-S, --sandbox - Targets the sandbox environment (default)
32+
-T, --stage - Targets the stage environment
33+
--help - Show this message
34+
--version -
35+
36+
COMMANDS
37+
check - Checks if all required configuration is properly set and all requirements are met
38+
deploy - Deploys your application to the selected environment
39+
help - Shows a list of commands or help for one command
40+
scaling_group:check - Checks if all instances are InService AND Healthy on your ASG
41+
scaling_group:freeze - 'Freezes' your ASG
42+
scaling_group:info - Lists information about your Auto Scaling Group
43+
scaling_group:update - Updates some attributes of your ASG
44+
45+
=== Configuration
46+
47+
+myfc_cloud+ expects a YAML configuration file with your AWS settings, keyed by environment, like this:
48+
49+
production:
50+
access_key_id: production_access_key_id
51+
secret_access_key: production_secret_access_key
52+
auto_scaling_group_name: production_asg
53+
elastic_load_balancer_name: production_elb
54+
rds_instance_identifier: production_rds
55+
app_path_on_server: /path/to/production/app/src
56+
sandbox:
57+
access_key_id: sandbox_access_key_id
58+
secret_access_key: sandbox_secret_access_key
59+
auto_scaling_group_name: sandbox_asg
60+
elastic_load_balancer_name: sandbox_elb
61+
rds_instance_identifier: sandbox_rds
62+
app_path_on_server: /path/to/sandbox/app/src
63+
stage:
64+
access_key_id: stage_access_key_id
65+
secret_access_key: stage_secret_access_key
66+
auto_scaling_group_name: stage_asg
67+
elastic_load_balancer_name: stage_elb
68+
rds_instance_identifier: stage_rds
69+
app_path_on_server: /path/to/stage/app/src
70+
71+
Optionally, you can leave out the +access_key_id+ and +secret_access_key+ information from the configuration file, and supply them as environment variables when you call the +myfc_cloud+ command, for example:
72+
73+
$ MYFC_CLOUD_ACCESS_KEY_ID=some-id MYFC_CLOUD_SECRET_ACCESS_KEY=some-secret myfc_cloud deploy

‎Rakefile

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
# encoding: utf-8
22
require "bundler/gem_tasks"
33

4-
require "rspec/core/rake_task"
5-
64
require 'rdoc/task'
5+
Rake::RDocTask.new do |rdoc|
6+
rdoc.title = 'myfc_cloud'
7+
rdoc.main = "README.rdoc"
8+
rdoc.rdoc_dir = 'doc'
9+
rdoc.rdoc_files.include("README.rdoc","lib/**/*.rb","bin/**/*")
10+
# rdoc.generator = 'darkfish'
11+
end
712

13+
require "rspec/core/rake_task"
814
RSpec::Core::RakeTask.new(:spec)
915

10-
Rake::RDocTask.new do |rd|
11-
rd.main = "README.rdoc"
12-
rd.rdoc_files.include("README.rdoc","lib/**/*.rb","bin/**/*")
13-
rd.title = 'myfc_cloud'
14-
end
15-
1616
task :test => :spec
1717
task :default => :spec

‎bin/myfc_cloud

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# have this method, so we add it so we get resolved symlinks
55
# and compatibility
66
unless File.respond_to?(:realpath)
7-
class File #:nodoc:
7+
class File # :nodoc:
88
def self.realpath(path)
99
return realpath(File.readlink(path)) if symlink?(path)
1010
path
@@ -24,7 +24,7 @@ AwesomePrint.defaults = {
2424
:index => false
2525
}
2626

27-
include GLI::App
27+
include GLI::App # :nodoc:
2828

2929
program_desc 'Command line application to deploy and manage webapps on Amazon Web Services'
3030

‎lib/myfc_cloud.rb

+5-5
Original file line numberDiff line numberDiff line change
@@ -5,24 +5,24 @@
55
require "myfc_cloud/configuration"
66
require "myfc_cloud/version"
77

8-
module MyfcCloud
8+
module MyfcCloud # :nodoc:
99
end
1010

11-
# TODO extract these extensions to separate file (or just use active_support already)
12-
class Object
11+
class Object # :nodoc:
12+
# TODO extract these extensions to separate file (or just use active_support already)
1313
def blank?
1414
respond_to?(:empty?) ? empty? : !self
1515
end
1616
end
1717

18-
class Hash
18+
class Hash # :nodoc:
19+
# TODO extract these extensions to separate file (or just use active_support already)
1920
def symbolize_keys
2021
inject({}) do |options, (key, value)|
2122
options[(key.to_sym rescue key) || key] = value
2223
options
2324
end
2425
end
25-
2626
def symbolize_keys!
2727
self.replace(self.symbolize_keys)
2828
end

‎lib/myfc_cloud/commands.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
require "myfc_cloud/commands/deploy"
55
require "myfc_cloud/commands/scaling_group"
66

7-
module MyfcCloud
8-
module Commands
7+
module MyfcCloud # :nodoc:
8+
module Commands # :nodoc:
99
end
1010
end

‎lib/myfc_cloud/commands/check.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# encoding: utf-8
2-
module MyfcCloud
3-
module Commands
2+
module MyfcCloud # :nodoc:
3+
module Commands # :nodoc:
44
class Check
55

66
def initialize(configuration)

‎lib/myfc_cloud/commands/deploy.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# encoding: utf-8
2-
module MyfcCloud
3-
module Commands
2+
module MyfcCloud # :nodoc:
3+
module Commands # :nodoc:
44
class Deploy
55

66
def initialize(configuration, options={})

‎lib/myfc_cloud/commands/scaling_group.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# encoding: utf-8
2-
module MyfcCloud
3-
module Commands
2+
module MyfcCloud # :nodoc:
3+
module Commands # :nodoc:
44
class ScalingGroup
55

66
def initialize(configuration)

‎lib/myfc_cloud/configuration.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
require 'yaml'
33
require 'ostruct'
44

5-
module MyfcCloud
5+
module MyfcCloud # :nodoc:
66
class Configuration
77

88
def initialize(filepath, environment=:sandbox)

‎lib/myfc_cloud/version.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# encoding: utf-8
2-
module MyfcCloud
2+
module MyfcCloud # :nodoc:
33
VERSION = '0.0.1'
44
end

‎myfc_cloud.rdoc

-5
This file was deleted.

0 commit comments

Comments
 (0)
Please sign in to comment.