capistrano-rbenv-maintenance 1.0.0

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.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 395367f770d93829b9affd7bfd7e8b6bddc7b32b
4
+ data.tar.gz: b917daf8fb84a1ce8a921d3cfb50c7af1bcc2a2f
5
+ SHA512:
6
+ metadata.gz: 81e0e2cfc16aad923de1447c1361e81d2c636350b0380055928ae3ad73013c99d1605a18d209bdc2619b9a062daf4dbb0a45950957e1b27f20e7ec2fe19ed990
7
+ data.tar.gz: 2527d20276b9a150fbf015e22f8f9cb2239c08a841ee1684c2f673c007de36e1afa7ede621099c6864013fc3a9102f1b2a2064ad487162e485fa4d6da98fdc57
data/.gitignore ADDED
@@ -0,0 +1,17 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
12
+ pkg
13
+ rdoc
14
+ spec/reports
15
+ test/tmp
16
+ test/version_tmp
17
+ tmp
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in capistrano-rbenv-maintenance.gemspec
4
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2014 Bob Breznak
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,54 @@
1
+ # Capistrano Rbenv Maintenance
2
+ A Capistrano 3 extension that allows for easily maintaining rbenv. Use the
3
+ [Capistrano Rbenv](https://github.com/capistrano/rbenv) gem for using rbenv with Capistrano, use this gem to
4
+ add additional tasks for setting up rbenv and installing rubies.
5
+
6
+ ## Installation
7
+ Add this line to your application's Gemfile:
8
+
9
+ gem 'capistrano-rbenv-maintenance'
10
+
11
+ And then execute:
12
+
13
+ $ bundle
14
+
15
+ Then add this line to your Capfile:
16
+
17
+ require 'capistrano/rbenv/maintenance'
18
+
19
+
20
+ ## Tasks
21
+
22
+ ### rbenv:setup
23
+ This task does an initial install, if necessary, of rbenv and the ruby-build plugin.
24
+
25
+ ### rbenv:upgrade
26
+ This task upgrades rbenv and ruby-build
27
+
28
+ ### rbenv:install
29
+ This task installs a ruby using ruby-build, if necessary. If no option is provided, the task will try to
30
+ install the ruby set via `rbenv_ruby`.
31
+
32
+ ## Automatic Hooks
33
+ These tasks are automatically hooked off of the `rbenv:map_bins` and `rbenv:validate` tasks provided by
34
+ Capistrano Rbenv. This means that once you install the gem and add it to your Capfile, you're ready to go.
35
+ Every deployment will check to see if rbenv is installed and if the proper version of ruby is installed. If
36
+ not, it will install as necessary.
37
+
38
+ # Configuration
39
+ Under normal circumstances, no configuration should be necessary but it is provided to allow to workarounds if necessary.
40
+
41
+ * `ruby_build_path` - The path where ruby-build should be installed. Defaults to `plugins/ruby-build` under `rbenv_path`
42
+ * `rbenv_git_url` - The git url used to download and install rbenv. Defaults to `git://github.com/sstephenson/rbenv.git`
43
+ * `ruby_build_git_url` - The git url used to download and install ruby-build. Defaults to `git://github.com/sstephenson/ruby-build.git`
44
+
45
+ ## Contributing
46
+ 1. Fork it ( http://github.com/<my-github-username>/capistrano-rbenv-maintenance/fork )
47
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
48
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
49
+ 4. Push to the branch (`git push origin my-new-feature`)
50
+ 5. Create new Pull Request
51
+
52
+ ## Credits
53
+ This is originally based off of a [pull request](https://github.com/stas/rbenv/commit/9cd333db1655af3d2dbb345a6cf61aff1755462c)
54
+ from [Stas Sușcov](https://github.com/stas). Gemified and maintained by [Bob Breznak](https://github.com/bobbrez)
data/Rakefile ADDED
@@ -0,0 +1 @@
1
+ require "bundler/gem_tasks"
@@ -0,0 +1,24 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = "capistrano-rbenv-maintenance"
7
+ spec.version = '1.0.0'
8
+ spec.authors = ['Bob Breznak']
9
+ spec.email = ['bob.breznak@gmail.com']
10
+ spec.summary = %q{Tasks for maintaining rbenv with Capistrano}
11
+ spec.description = %q{Tasks for maintaining rbenv with Capistrano}
12
+ spec.homepage = 'https://github.com/bobbrez/capistrano-rbenv-maintenance'
13
+ spec.license = 'MIT'
14
+
15
+ spec.files = `git ls-files`.split($/)
16
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
17
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
18
+ spec.require_paths = ['lib']
19
+
20
+ spec.add_development_dependency 'bundler', '~> 1.5'
21
+ spec.add_development_dependency 'rake'
22
+
23
+ spec.add_dependency 'capistrano', '~> 3.0'
24
+ end
@@ -0,0 +1 @@
1
+ load File.expand_path('../tasks/maintenance.rake', __FILE__)
@@ -0,0 +1,50 @@
1
+ namespace :rbenv do
2
+ desc 'Install rbenv and ruby-build, if necessary'
3
+ task :setup do
4
+ on roles(fetch(:rbenv_roles)) do
5
+ [:rbenv, :ruby_build].each do |component|
6
+ path = fetch("#{component}_path".to_s)
7
+ url = fetch("#{component}_git_url".to_s)
8
+ execute :git, 'clone', url, path if test "[ ! -d #{path} ]"
9
+ end
10
+ end
11
+ end
12
+
13
+ desc 'Upgrade rbenv and ruby-build'
14
+ task :update do
15
+ on roles(fetch(:rbenv_roles)) do
16
+ [fetch(:rbenv_path), fetch(:ruby_build_path)].each do |update_path|
17
+ within update_path do
18
+ execute :git, 'pull'
19
+ end
20
+ end
21
+ end
22
+ end
23
+
24
+ desc 'Install a new ruby or, the one provided by rbenv_ruby if none is given.'
25
+ task :install, [:new_ruby] do |task, args|
26
+ on roles(fetch(:rbenv_roles)) do
27
+ ruby_version = args[:new_ruby] || fetch(:rbenv_ruby)
28
+
29
+ unless test "[ -d #{fetch(:rbenv_path)}/versions/#{ruby_version} ]"
30
+ execute :rbenv, 'install', args[:new_ruby] || fetch(:rbenv_ruby)
31
+ execute :rbenv, 'local', args[:new_ruby] || fetch(:rbenv_ruby)
32
+ execute :rbenv, 'rehash'
33
+ execute :gem, 'install', 'bundler' unless fetch(:bundle_roles)
34
+ execute :rbenv, 'rehash'
35
+ end
36
+ end
37
+ end
38
+
39
+ before 'rbenv:map_bins', 'rbenv:setup'
40
+ before 'rbenv:install', 'rbenv:map_bins'
41
+ before 'rbenv:validate', 'rbenv:install'
42
+ end
43
+
44
+ namespace :load do
45
+ task :defaults do
46
+ set :ruby_build_path, -> { '%s/plugins/ruby-build' % fetch(:rbenv_path) }
47
+ set :rbenv_git_url, 'git://github.com/sstephenson/rbenv.git'
48
+ set :ruby_build_git_url, 'git://github.com/sstephenson/ruby-build.git'
49
+ end
50
+ end
File without changes
metadata ADDED
@@ -0,0 +1,96 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: capistrano-rbenv-maintenance
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Bob Breznak
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-02-27 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.5'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.5'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: capistrano
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '3.0'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '3.0'
55
+ description: Tasks for maintaining rbenv with Capistrano
56
+ email:
57
+ - bob.breznak@gmail.com
58
+ executables: []
59
+ extensions: []
60
+ extra_rdoc_files: []
61
+ files:
62
+ - ".gitignore"
63
+ - Gemfile
64
+ - LICENSE.txt
65
+ - README.md
66
+ - Rakefile
67
+ - capistrano-rbenv-maintenance.gemspec
68
+ - lib/capistrano-rbenv-maintenance.rb
69
+ - lib/capistrano/rbenv/maintenance.rb
70
+ - lib/capistrano/rbenv/tasks/maintenance.rake
71
+ homepage: https://github.com/bobbrez/capistrano-rbenv-maintenance
72
+ licenses:
73
+ - MIT
74
+ metadata: {}
75
+ post_install_message:
76
+ rdoc_options: []
77
+ require_paths:
78
+ - lib
79
+ required_ruby_version: !ruby/object:Gem::Requirement
80
+ requirements:
81
+ - - ">="
82
+ - !ruby/object:Gem::Version
83
+ version: '0'
84
+ required_rubygems_version: !ruby/object:Gem::Requirement
85
+ requirements:
86
+ - - ">="
87
+ - !ruby/object:Gem::Version
88
+ version: '0'
89
+ requirements: []
90
+ rubyforge_project:
91
+ rubygems_version: 2.2.0
92
+ signing_key:
93
+ specification_version: 4
94
+ summary: Tasks for maintaining rbenv with Capistrano
95
+ test_files: []
96
+ has_rdoc: