capistrano-devops 0.0.1

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 (82) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +18 -0
  3. data/Gemfile +4 -0
  4. data/LICENSE.txt +22 -0
  5. data/README.md +35 -0
  6. data/Rakefile +1 -0
  7. data/capistrano-devops.gemspec +22 -0
  8. data/lib/capistrano-devops.rb +0 -0
  9. data/lib/capistrano/devops.rb +7 -0
  10. data/lib/capistrano/devops/base.rb +6 -0
  11. data/lib/capistrano/devops/papertrail.rb +1 -0
  12. data/lib/capistrano/devops/postgresql.rb +1 -0
  13. data/lib/capistrano/devops/rainbows.rb +1 -0
  14. data/lib/capistrano/devops/ssh.rb +1 -0
  15. data/lib/capistrano/devops/templates/rainbows.erb +14 -0
  16. data/lib/capistrano/devops/templates/rainbows_init.erb +84 -0
  17. data/lib/capistrano/devops/utilities.rb +1 -0
  18. data/lib/capistrano/devops/version.rb +5 -0
  19. data/lib/capistrano/tasks/papertrail.rake +50 -0
  20. data/lib/capistrano/tasks/postgresql.rake +9 -0
  21. data/lib/capistrano/tasks/rainbows.rake +33 -0
  22. data/lib/capistrano/tasks/set_rails_env.rake +5 -0
  23. data/lib/capistrano/tasks/ssh.rake +17 -0
  24. data/lib/capistrano/tasks/utilities.rake +31 -0
  25. data/sample_app/.gitignore +16 -0
  26. data/sample_app/Capfile +30 -0
  27. data/sample_app/Gemfile +54 -0
  28. data/sample_app/Gemfile.lock +185 -0
  29. data/sample_app/README.rdoc +28 -0
  30. data/sample_app/Rakefile +6 -0
  31. data/sample_app/Vagrantfile +59 -0
  32. data/sample_app/app/assets/images/.keep +0 -0
  33. data/sample_app/app/assets/javascripts/application.js +16 -0
  34. data/sample_app/app/assets/stylesheets/application.css +13 -0
  35. data/sample_app/app/controllers/application_controller.rb +5 -0
  36. data/sample_app/app/controllers/concerns/.keep +0 -0
  37. data/sample_app/app/helpers/application_helper.rb +2 -0
  38. data/sample_app/app/mailers/.keep +0 -0
  39. data/sample_app/app/models/.keep +0 -0
  40. data/sample_app/app/models/concerns/.keep +0 -0
  41. data/sample_app/app/views/layouts/application.html.erb +14 -0
  42. data/sample_app/bin/bundle +3 -0
  43. data/sample_app/bin/rails +4 -0
  44. data/sample_app/bin/rake +4 -0
  45. data/sample_app/config.ru +4 -0
  46. data/sample_app/config/application.rb +23 -0
  47. data/sample_app/config/boot.rb +4 -0
  48. data/sample_app/config/database.yml +25 -0
  49. data/sample_app/config/deploy.rb +60 -0
  50. data/sample_app/config/deploy/production.rb +49 -0
  51. data/sample_app/config/environment.rb +5 -0
  52. data/sample_app/config/environments/development.rb +29 -0
  53. data/sample_app/config/environments/production.rb +80 -0
  54. data/sample_app/config/environments/test.rb +36 -0
  55. data/sample_app/config/initializers/backtrace_silencers.rb +7 -0
  56. data/sample_app/config/initializers/filter_parameter_logging.rb +4 -0
  57. data/sample_app/config/initializers/inflections.rb +16 -0
  58. data/sample_app/config/initializers/mime_types.rb +5 -0
  59. data/sample_app/config/initializers/secret_token.rb +12 -0
  60. data/sample_app/config/initializers/session_store.rb +3 -0
  61. data/sample_app/config/initializers/wrap_parameters.rb +14 -0
  62. data/sample_app/config/locales/en.yml +23 -0
  63. data/sample_app/config/routes.rb +56 -0
  64. data/sample_app/db/seeds.rb +7 -0
  65. data/sample_app/lib/assets/.keep +0 -0
  66. data/sample_app/lib/tasks/.keep +0 -0
  67. data/sample_app/log/.keep +0 -0
  68. data/sample_app/public/404.html +58 -0
  69. data/sample_app/public/422.html +58 -0
  70. data/sample_app/public/500.html +57 -0
  71. data/sample_app/public/favicon.ico +0 -0
  72. data/sample_app/public/robots.txt +5 -0
  73. data/sample_app/test/controllers/.keep +0 -0
  74. data/sample_app/test/fixtures/.keep +0 -0
  75. data/sample_app/test/helpers/.keep +0 -0
  76. data/sample_app/test/integration/.keep +0 -0
  77. data/sample_app/test/mailers/.keep +0 -0
  78. data/sample_app/test/models/.keep +0 -0
  79. data/sample_app/test/test_helper.rb +15 -0
  80. data/sample_app/vendor/assets/javascripts/.keep +0 -0
  81. data/sample_app/vendor/assets/stylesheets/.keep +0 -0
  82. metadata +152 -0
@@ -0,0 +1,54 @@
1
+ source 'http://rubygems.org'
2
+
3
+ # Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
4
+ gem 'rails', '4.0.1'
5
+
6
+ # Use sqlite3 as the database for Active Record
7
+ gem 'sqlite3'
8
+
9
+ # Use SCSS for stylesheets
10
+ gem 'sass-rails', '~> 4.0.0'
11
+
12
+ # Use Uglifier as compressor for JavaScript assets
13
+ gem 'uglifier', '>= 1.3.0'
14
+
15
+ # Use CoffeeScript for .js.coffee assets and views
16
+ gem 'coffee-rails', '~> 4.0.0'
17
+
18
+ # See https://github.com/sstephenson/execjs#readme for more supported runtimes
19
+ gem 'therubyracer', platforms: :ruby
20
+
21
+ # Use jquery as the JavaScript library
22
+ gem 'jquery-rails'
23
+
24
+ # Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
25
+ gem 'turbolinks'
26
+
27
+ # Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
28
+ gem 'jbuilder', '~> 1.2'
29
+
30
+ group :doc do
31
+ # bundle exec rake doc:rails generates the API under doc/api.
32
+ gem 'sdoc', require: false
33
+ end
34
+
35
+ # Use ActiveModel has_secure_password
36
+ # gem 'bcrypt-ruby', '~> 3.1.2'
37
+
38
+ # Use unicorn as the app server
39
+ gem 'rainbows'
40
+
41
+ group :development do
42
+ # Use Capistrano for deployment
43
+ gem 'capistrano', github: 'capistrano/capistrano'
44
+ gem 'capistrano-rails'
45
+ gem 'capistrano-bundler'
46
+ gem 'capistrano-devops', github: 'parasquid/capistrano-devops'
47
+ # gem 'capistrano-devops', path: '../../capistrano-devops'
48
+ gem 'capistrano-rbenv', github: "capistrano/rbenv"
49
+ end
50
+
51
+ # Use debugger
52
+ # gem 'debugger', group: [:development, :test]
53
+
54
+ gem 'multi_json', github: 'intridea/multi_json'
@@ -0,0 +1,185 @@
1
+ GIT
2
+ remote: git://github.com/capistrano/capistrano.git
3
+ revision: d13cab9bb78eb1ec9e4f0aea5ed2463390f2f036
4
+ specs:
5
+ capistrano (3.1.0)
6
+ i18n
7
+ rake (>= 10.0.0)
8
+ sshkit (>= 0.0.23)
9
+
10
+ GIT
11
+ remote: git://github.com/capistrano/rbenv.git
12
+ revision: 362dbc02ef963c91425767e09b4848ff7be5132b
13
+ specs:
14
+ capistrano-rbenv (0.0.1)
15
+ capistrano
16
+
17
+ GIT
18
+ remote: git://github.com/intridea/multi_json.git
19
+ revision: c1cf075453ce0110f7decc4f906444b1233bb67c
20
+ specs:
21
+ multi_json (1.8.2)
22
+
23
+ GIT
24
+ remote: git://github.com/parasquid/capistrano-devops.git
25
+ revision: d84c855cda8545d39fa529ff454384c6734579a1
26
+ specs:
27
+ capistrano-devops (0.0.1)
28
+ capistrano (~> 3)
29
+ capistrano-bundler
30
+
31
+ GEM
32
+ remote: http://rubygems.org/
33
+ specs:
34
+ actionmailer (4.0.1)
35
+ actionpack (= 4.0.1)
36
+ mail (~> 2.5.4)
37
+ actionpack (4.0.1)
38
+ activesupport (= 4.0.1)
39
+ builder (~> 3.1.0)
40
+ erubis (~> 2.7.0)
41
+ rack (~> 1.5.2)
42
+ rack-test (~> 0.6.2)
43
+ activemodel (4.0.1)
44
+ activesupport (= 4.0.1)
45
+ builder (~> 3.1.0)
46
+ activerecord (4.0.1)
47
+ activemodel (= 4.0.1)
48
+ activerecord-deprecated_finders (~> 1.0.2)
49
+ activesupport (= 4.0.1)
50
+ arel (~> 4.0.0)
51
+ activerecord-deprecated_finders (1.0.3)
52
+ activesupport (4.0.1)
53
+ i18n (~> 0.6, >= 0.6.4)
54
+ minitest (~> 4.2)
55
+ multi_json (~> 1.3)
56
+ thread_safe (~> 0.1)
57
+ tzinfo (~> 0.3.37)
58
+ arel (4.0.1)
59
+ atomic (1.1.14)
60
+ builder (3.1.4)
61
+ capistrano-bundler (1.0.0)
62
+ capistrano (>= 3.0.0.pre)
63
+ capistrano-rails (1.0.0)
64
+ capistrano
65
+ coffee-rails (4.0.1)
66
+ coffee-script (>= 2.2.0)
67
+ railties (>= 4.0.0, < 5.0)
68
+ coffee-script (2.2.0)
69
+ coffee-script-source
70
+ execjs
71
+ coffee-script-source (1.6.3)
72
+ erubis (2.7.0)
73
+ execjs (2.0.2)
74
+ hike (1.2.3)
75
+ i18n (0.6.5)
76
+ jbuilder (1.5.2)
77
+ activesupport (>= 3.0.0)
78
+ multi_json (>= 1.2.0)
79
+ jquery-rails (3.0.4)
80
+ railties (>= 3.0, < 5.0)
81
+ thor (>= 0.14, < 2.0)
82
+ json (1.8.1)
83
+ kgio (2.8.1)
84
+ libv8 (3.16.14.3)
85
+ mail (2.5.4)
86
+ mime-types (~> 1.16)
87
+ treetop (~> 1.4.8)
88
+ mime-types (1.25)
89
+ minitest (4.7.5)
90
+ net-scp (1.1.2)
91
+ net-ssh (>= 2.6.5)
92
+ net-ssh (2.7.0)
93
+ polyglot (0.3.3)
94
+ rack (1.5.2)
95
+ rack-test (0.6.2)
96
+ rack (>= 1.0)
97
+ rails (4.0.1)
98
+ actionmailer (= 4.0.1)
99
+ actionpack (= 4.0.1)
100
+ activerecord (= 4.0.1)
101
+ activesupport (= 4.0.1)
102
+ bundler (>= 1.3.0, < 2.0)
103
+ railties (= 4.0.1)
104
+ sprockets-rails (~> 2.0.0)
105
+ railties (4.0.1)
106
+ actionpack (= 4.0.1)
107
+ activesupport (= 4.0.1)
108
+ rake (>= 0.8.7)
109
+ thor (>= 0.18.1, < 2.0)
110
+ rainbows (4.5.0)
111
+ kgio (~> 2.5)
112
+ rack (~> 1.1)
113
+ unicorn (~> 4.6, >= 4.6.2)
114
+ raindrops (0.12.0)
115
+ rake (10.1.0)
116
+ rdoc (3.12.2)
117
+ json (~> 1.4)
118
+ ref (1.0.5)
119
+ sass (3.2.12)
120
+ sass-rails (4.0.1)
121
+ railties (>= 4.0.0, < 5.0)
122
+ sass (>= 3.1.10)
123
+ sprockets-rails (~> 2.0.0)
124
+ sdoc (0.3.20)
125
+ json (>= 1.1.3)
126
+ rdoc (~> 3.10)
127
+ sprockets (2.10.0)
128
+ hike (~> 1.2)
129
+ multi_json (~> 1.0)
130
+ rack (~> 1.0)
131
+ tilt (~> 1.1, != 1.3.0)
132
+ sprockets-rails (2.0.1)
133
+ actionpack (>= 3.0)
134
+ activesupport (>= 3.0)
135
+ sprockets (~> 2.8)
136
+ sqlite3 (1.3.8)
137
+ sshkit (1.1.0)
138
+ net-scp
139
+ net-ssh
140
+ term-ansicolor
141
+ term-ansicolor (1.2.2)
142
+ tins (~> 0.8)
143
+ therubyracer (0.12.0)
144
+ libv8 (~> 3.16.14.0)
145
+ ref
146
+ thor (0.18.1)
147
+ thread_safe (0.1.3)
148
+ atomic
149
+ tilt (1.4.1)
150
+ tins (0.12.0)
151
+ treetop (1.4.15)
152
+ polyglot
153
+ polyglot (>= 0.3.1)
154
+ turbolinks (1.3.0)
155
+ coffee-rails
156
+ tzinfo (0.3.38)
157
+ uglifier (2.3.0)
158
+ execjs (>= 0.3.0)
159
+ json (>= 1.8.0)
160
+ unicorn (4.7.0)
161
+ kgio (~> 2.6)
162
+ rack
163
+ raindrops (~> 0.7)
164
+
165
+ PLATFORMS
166
+ ruby
167
+
168
+ DEPENDENCIES
169
+ capistrano!
170
+ capistrano-bundler
171
+ capistrano-devops!
172
+ capistrano-rails
173
+ capistrano-rbenv!
174
+ coffee-rails (~> 4.0.0)
175
+ jbuilder (~> 1.2)
176
+ jquery-rails
177
+ multi_json!
178
+ rails (= 4.0.1)
179
+ rainbows
180
+ sass-rails (~> 4.0.0)
181
+ sdoc
182
+ sqlite3
183
+ therubyracer
184
+ turbolinks
185
+ uglifier (>= 1.3.0)
@@ -0,0 +1,28 @@
1
+ == README
2
+
3
+ This README would normally document whatever steps are necessary to get the
4
+ application up and running.
5
+
6
+ Things you may want to cover:
7
+
8
+ * Ruby version
9
+
10
+ * System dependencies
11
+
12
+ * Configuration
13
+
14
+ * Database creation
15
+
16
+ * Database initialization
17
+
18
+ * How to run the test suite
19
+
20
+ * Services (job queues, cache servers, search engines, etc.)
21
+
22
+ * Deployment instructions
23
+
24
+ * ...
25
+
26
+
27
+ Please feel free to use a different markup language if you do not plan to run
28
+ <tt>rake doc:app</tt>.
@@ -0,0 +1,6 @@
1
+ # Add your own tasks in files placed in lib/tasks ending in .rake,
2
+ # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
3
+
4
+ require File.expand_path('../config/application', __FILE__)
5
+
6
+ SampleApp::Application.load_tasks
@@ -0,0 +1,59 @@
1
+ # -*- mode: ruby -*-
2
+ # vi: set ft=ruby :
3
+
4
+ # Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
5
+ VAGRANTFILE_API_VERSION = "2"
6
+
7
+ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
8
+ # All Vagrant configuration is done here. The most common configuration
9
+ # options are documented and commented below. For a complete reference,
10
+ # please see the online documentation at vagrantup.com.
11
+
12
+ # Every Vagrant virtual environment requires a box to build off of.
13
+ config.vm.box = "precise64"
14
+
15
+ # The url from where the 'config.vm.box' box will be fetched if it
16
+ # doesn't already exist on the user's system.
17
+ config.vm.box_url = "http://files.vagrantup.com/precise64.box"
18
+
19
+ # Create a forwarded port mapping which allows access to a specific port
20
+ # within the machine from a port on the host machine. In the example below,
21
+ # accessing "localhost:8080" will access port 80 on the guest machine.
22
+ # config.vm.network :forwarded_port, guest: 80, host: 8080
23
+ config.vm.network :forwarded_port, guest: 80, host: 3000
24
+
25
+ # Create a private network, which allows host-only access to the machine
26
+ # using a specific IP.
27
+ # config.vm.network :private_network, ip: "172.16.13.37"
28
+
29
+ # Create a public network, which generally matched to bridged network.
30
+ # Bridged networks make the machine appear as another physical device on
31
+ # your network.
32
+ # config.vm.network :public_network
33
+
34
+ # If true, then any SSH connections made will enable agent forwarding.
35
+ # Default value: false
36
+ # config.ssh.forward_agent = true
37
+
38
+ # Share an additional folder to the guest VM. The first argument is
39
+ # the path on the host to the actual folder. The second argument is
40
+ # the path on the guest to mount the folder. And the optional third
41
+ # argument is a set of non-required options.
42
+ # config.vm.synced_folder "../data", "/vagrant_data"
43
+
44
+ # Provider-specific configuration so you can fine-tune various
45
+ # backing providers for Vagrant. These expose provider-specific options.
46
+ # Example for VirtualBox:
47
+ #
48
+ config.vm.provider :virtualbox do |vb|
49
+ # Don't boot with headless mode
50
+ # vb.gui = true
51
+
52
+ # Use VBoxManage to customize the VM. For example to change memory:
53
+ vb.customize ["modifyvm", :id, "--memory", "1024"]
54
+ end
55
+ #
56
+ # View the documentation for the provider you're using for more
57
+ # information on available options.
58
+
59
+ end
File without changes
@@ -0,0 +1,16 @@
1
+ // This is a manifest file that'll be compiled into application.js, which will include all the files
2
+ // listed below.
3
+ //
4
+ // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
5
+ // or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
6
+ //
7
+ // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
8
+ // compiled file.
9
+ //
10
+ // Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details
11
+ // about supported directives.
12
+ //
13
+ //= require jquery
14
+ //= require jquery_ujs
15
+ //= require turbolinks
16
+ //= require_tree .
@@ -0,0 +1,13 @@
1
+ /*
2
+ * This is a manifest file that'll be compiled into application.css, which will include all the files
3
+ * listed below.
4
+ *
5
+ * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
6
+ * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
7
+ *
8
+ * You're free to add application-wide styles to this file and they'll appear at the top of the
9
+ * compiled file, but it's generally better to create a new file per style scope.
10
+ *
11
+ *= require_self
12
+ *= require_tree .
13
+ */
@@ -0,0 +1,5 @@
1
+ class ApplicationController < ActionController::Base
2
+ # Prevent CSRF attacks by raising an exception.
3
+ # For APIs, you may want to use :null_session instead.
4
+ protect_from_forgery with: :exception
5
+ end
File without changes
@@ -0,0 +1,2 @@
1
+ module ApplicationHelper
2
+ end
File without changes
File without changes
File without changes
@@ -0,0 +1,14 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>SampleApp</title>
5
+ <%= stylesheet_link_tag "application", media: "all", "data-turbolinks-track" => true %>
6
+ <%= javascript_include_tag "application", "data-turbolinks-track" => true %>
7
+ <%= csrf_meta_tags %>
8
+ </head>
9
+ <body>
10
+
11
+ <%= yield %>
12
+
13
+ </body>
14
+ </html>
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
3
+ load Gem.bin_path('bundler', 'bundle')
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+ APP_PATH = File.expand_path('../../config/application', __FILE__)
3
+ require_relative '../config/boot'
4
+ require 'rails/commands'
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+ require_relative '../config/boot'
3
+ require 'rake'
4
+ Rake.application.run
@@ -0,0 +1,4 @@
1
+ # This file is used by Rack-based servers to start the application.
2
+
3
+ require ::File.expand_path('../config/environment', __FILE__)
4
+ run Rails.application
@@ -0,0 +1,23 @@
1
+ require File.expand_path('../boot', __FILE__)
2
+
3
+ require 'rails/all'
4
+
5
+ # Require the gems listed in Gemfile, including any gems
6
+ # you've limited to :test, :development, or :production.
7
+ Bundler.require(:default, Rails.env)
8
+
9
+ module SampleApp
10
+ class Application < Rails::Application
11
+ # Settings in config/environments/* take precedence over those specified here.
12
+ # Application configuration should go into files in config/initializers
13
+ # -- all .rb files in that directory are automatically loaded.
14
+
15
+ # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
16
+ # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
17
+ # config.time_zone = 'Central Time (US & Canada)'
18
+
19
+ # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
20
+ # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
21
+ # config.i18n.default_locale = :de
22
+ end
23
+ end