capistrano-cul 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.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 93214bb1fa3f153183f924a74216fc89974c091b
4
+ data.tar.gz: 914740fa3ffadf58b9127f1ed085a70cbab364d0
5
+ SHA512:
6
+ metadata.gz: 0da3180a64afe3b5344d6e439ccee76133a75b0223c4d3d41dd91f15e7878184453654b95ce3c3057390929bd8d8ea355140f005d5f6f5a539bef069abbaf87f
7
+ data.tar.gz: e3a159f3db8871fc1aeef9720bc03b38211eb92362c7f87e48e77f3125cd97fdd16a91bdc1ed2d0988753593fd5dd0070daa39f6bf0d4cfaead559267903f2b4
data/.gitignore ADDED
@@ -0,0 +1,13 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
10
+ *.gem
11
+
12
+ # rspec failure tracking
13
+ .rspec_status
data/CHANGELOG.md ADDED
@@ -0,0 +1,12 @@
1
+ # Changelog
2
+ All notable changes to this project will be documented in this file.
3
+
4
+ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
5
+ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
6
+
7
+ ## [Unreleased]
8
+
9
+ ## [0.0.1] - 2017-08-05
10
+ ### Added
11
+ - Added cul:downtime task
12
+ - Added cul:auto_tag task
data/Gemfile ADDED
@@ -0,0 +1,6 @@
1
+ source "https://rubygems.org"
2
+
3
+ git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
4
+
5
+ # Specify your gem's dependencies in capistrano-cul.gemspec
6
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2017 Carla Galarza
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,51 @@
1
+ # Capistrano::Cul
2
+
3
+ Capistrano v3 tasks shared across CUL projects.
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ ```ruby
10
+ gem 'capistrano-cul', git: 'https://github.com/cul/capistrano-cul'
11
+ ```
12
+
13
+ _Note:_ If installing in a rails application, should only be in `:development` and `:test` groups.
14
+
15
+
16
+ And then execute:
17
+
18
+ $ bundle
19
+
20
+ Or install it yourself as:
21
+
22
+ $ gem install capistrano-cul
23
+
24
+ In your application's `Capfile` include:
25
+
26
+ ```
27
+ require 'capistrano/cul'
28
+ ```
29
+
30
+ ## Usage
31
+ Two tasks are provided as part of this gem:
32
+ 1. `cap {env} cul:auto_tag`
33
+
34
+ Tags the current commit as the version number provided in `VERSION`.
35
+ 2. `cap {env} cul:downtime`
36
+
37
+ Pulls down the downtime branch of the repository to a `/downtime` directory and symlinks `current` to `downtime`. To undo this action, redeploy your application.
38
+
39
+ ## Development
40
+
41
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
42
+
43
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
44
+
45
+ ## Contributing
46
+
47
+ Bug reports and pull requests are welcome on GitHub at https://github.com/cul/capistrano-cul.
48
+
49
+ ## License
50
+
51
+ The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
data/Rakefile ADDED
@@ -0,0 +1,5 @@
1
+ require "bundler/gem_tasks"
2
+ require "rspec/core/rake_task"
3
+
4
+ # Do nothing by default
5
+ task :default
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 0.0.1
@@ -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-cul"
7
+ spec.version = IO.read("VERSION").strip
8
+ spec.authors = ["Carla Galarza", "Columbia University Libraries"]
9
+ spec.email = ["cmg2228@columbia.edu"]
10
+
11
+ spec.summary = "Common capistrano tasks shared across projects at CUL"
12
+ spec.homepage = "https://github.com/cul/capistrano-cul"
13
+ spec.license = "MIT"
14
+
15
+ spec.files = `git ls-files -z`.split("\x0").reject do |f|
16
+ f.match(%r{^(test|spec|features)/})
17
+ end
18
+ spec.bindir = "exe"
19
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
20
+ spec.require_paths = ["lib"]
21
+
22
+ spec.add_development_dependency "bundler", "~> 1.15"
23
+ spec.add_development_dependency "rake", "~> 10.0"
24
+ end
@@ -0,0 +1 @@
1
+ load File.expand_path('../../tasks/hooks.cap', __FILE__)
@@ -0,0 +1 @@
1
+ load File.expand_path('../../tasks/cul.cap', __FILE__)
@@ -0,0 +1,2 @@
1
+ require_relative 'cul/tasks'
2
+ require_relative 'cul/hooks'
@@ -0,0 +1,28 @@
1
+ namespace :cul do
2
+ desc "Add tag based on current version from VERSION file"
3
+ task :auto_tag do
4
+ current_version = "v#{IO.read("VERSION").strip}"
5
+
6
+ ask(:tag, current_version)
7
+ tag = fetch(:tag)
8
+
9
+ system("git tag -a #{tag} -m 'auto-tagged' && git push origin --tags")
10
+ end
11
+
12
+ desc "Deploy downtime branch"
13
+ task :downtime do
14
+ on roles(:web) do
15
+ downtime_path = deploy_path.join("downtime")
16
+ execute :rm, "-rf", downtime_path if test "[ -d #{downtime_path} ]"
17
+ execute :mkdir, "-p", downtime_path
18
+
19
+ within repo_path do
20
+ execute :git, :archive, 'downtime', "| #{SSHKit.config.command_map[:tar]} -x -f - -C", downtime_path
21
+ end
22
+
23
+ tmp_current_path = releases_path.join(current_path.basename)
24
+ execute :ln, "-s", downtime_path, tmp_current_path
25
+ execute :mv, tmp_current_path, current_path.parent
26
+ end
27
+ end
28
+ end
File without changes
metadata ADDED
@@ -0,0 +1,86 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: capistrano-cul
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Carla Galarza
8
+ - Columbia University Libraries
9
+ autorequire:
10
+ bindir: exe
11
+ cert_chain: []
12
+ date: 2017-08-08 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: bundler
16
+ requirement: !ruby/object:Gem::Requirement
17
+ requirements:
18
+ - - "~>"
19
+ - !ruby/object:Gem::Version
20
+ version: '1.15'
21
+ type: :development
22
+ prerelease: false
23
+ version_requirements: !ruby/object:Gem::Requirement
24
+ requirements:
25
+ - - "~>"
26
+ - !ruby/object:Gem::Version
27
+ version: '1.15'
28
+ - !ruby/object:Gem::Dependency
29
+ name: rake
30
+ requirement: !ruby/object:Gem::Requirement
31
+ requirements:
32
+ - - "~>"
33
+ - !ruby/object:Gem::Version
34
+ version: '10.0'
35
+ type: :development
36
+ prerelease: false
37
+ version_requirements: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - "~>"
40
+ - !ruby/object:Gem::Version
41
+ version: '10.0'
42
+ description:
43
+ email:
44
+ - cmg2228@columbia.edu
45
+ executables: []
46
+ extensions: []
47
+ extra_rdoc_files: []
48
+ files:
49
+ - ".gitignore"
50
+ - CHANGELOG.md
51
+ - Gemfile
52
+ - LICENSE.txt
53
+ - README.md
54
+ - Rakefile
55
+ - VERSION
56
+ - capistrano-cul.gemspec
57
+ - lib/capistrano/cul.rb
58
+ - lib/capistrano/cul/hooks.rb
59
+ - lib/capistrano/cul/tasks.rb
60
+ - lib/capistrano/tasks/cul.cap
61
+ - lib/capistrano/tasks/hooks.cap
62
+ homepage: https://github.com/cul/capistrano-cul
63
+ licenses:
64
+ - MIT
65
+ metadata: {}
66
+ post_install_message:
67
+ rdoc_options: []
68
+ require_paths:
69
+ - lib
70
+ required_ruby_version: !ruby/object:Gem::Requirement
71
+ requirements:
72
+ - - ">="
73
+ - !ruby/object:Gem::Version
74
+ version: '0'
75
+ required_rubygems_version: !ruby/object:Gem::Requirement
76
+ requirements:
77
+ - - ">="
78
+ - !ruby/object:Gem::Version
79
+ version: '0'
80
+ requirements: []
81
+ rubyforge_project:
82
+ rubygems_version: 2.5.2
83
+ signing_key:
84
+ specification_version: 4
85
+ summary: Common capistrano tasks shared across projects at CUL
86
+ test_files: []