capistrano-dotgpg 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: 1e55baed2c660d515a4bf90c72febbdc06de66ed
4
+ data.tar.gz: 94adcc54f2032cb17a663700731ea2c164c07b57
5
+ SHA512:
6
+ metadata.gz: d35b4b5bd192b6d81dfde2312de76b4b1f16a8fe5a626f259f6102780b7e7d84a003a92906f41ee3d1492eb9fa99ed5799fea7d59ece222f9deb52ebd0396348
7
+ data.tar.gz: 84efc876e9c9a15b49e4b10e6947f1b497f67d8e60b89ed915f331e0e456e044efe8e792ce9ab1e4367ed8e905269d2487101847b5705c8251a5f83e2ebb0820
data/.gitignore ADDED
@@ -0,0 +1,22 @@
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
18
+ *.bundle
19
+ *.so
20
+ *.o
21
+ *.a
22
+ mkmf.log
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in capistrano-dotgpg.gemspec
4
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2014 Alex Sergeyev
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,35 @@
1
+ # Capistrano::Dotgpg
2
+
3
+ Upload secrets and shared password managed by [dotgpg]('https://github.com/ConradIrwin/dotgpg')
4
+
5
+ - `cap dotgpg:env`
6
+
7
+ ## Configuration options
8
+
9
+ ```ruby
10
+ set :dotgpg_files, '.env.gpg' # Encrypted .env files
11
+ set :capistrano_export, 'shared_path' # Capistrano specific options to export
12
+ ```
13
+
14
+ ## Installation
15
+
16
+ Add this line to your application's Gemfile:
17
+
18
+ gem 'capistrano-dotgpg'
19
+ gem 'capistrano-dotgpg', github: 'alexsergeyev/capistrano-eye'
20
+
21
+ And then execute:
22
+
23
+ $ bundle
24
+
25
+ Or install it yourself as:
26
+
27
+ $ gem install capistrano-dotgpg
28
+
29
+ ## Contributing
30
+
31
+ 1. Fork it ( https://github.com/alexsergeyev/capistrano-dotgpg/fork )
32
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
33
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
34
+ 4. Push to the branch (`git push origin my-new-feature`)
35
+ 5. Create a new Pull Request
data/Rakefile ADDED
@@ -0,0 +1,2 @@
1
+ require "bundler/gem_tasks"
2
+
@@ -0,0 +1,21 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'capistrano/dotgpg/version'
5
+
6
+ Gem::Specification.new do |gem|
7
+ gem.name = "capistrano-dotgpg"
8
+ gem.version = Capistrano::Dotgpg::VERSION
9
+ gem.authors = ["Alex Sergeyev"]
10
+ gem.email = ["alex.sergeyev@gmail.com"]
11
+ gem.summary = %q{Manage dotgpg files}
12
+ gem.description = %q{Decrypt and upload dotgpg files}
13
+ gem.homepage = "https://github.com/alexsergeyev/capistrano-dotgpg"
14
+ gem.license = "MIT"
15
+
16
+ gem.files = `git ls-files -z`.split("\x0")
17
+ gem.require_paths = ["lib"]
18
+
19
+ gem.add_dependency 'capistrano', '~> 3.1'
20
+ gem.add_dependency 'sshkit', '~> 1.2'
21
+ end
@@ -0,0 +1,5 @@
1
+ module Capistrano
2
+ module Dotgpg
3
+ VERSION = "0.0.1"
4
+ end
5
+ end
@@ -0,0 +1 @@
1
+ load File.expand_path("../tasks/dotgpg.rake", __FILE__)
@@ -0,0 +1,19 @@
1
+ require 'stringio'
2
+
3
+ namespace :dotgpg do
4
+ desc "Decrypt and upload gpg files"
5
+ task :env do
6
+ on roles(:app) do
7
+ dotenv = StringIO.new
8
+ Array(fetch(:dotgpg_files, [".env.gpg", ".env.#{fetch(:stage)}.gpg"])).each do |file|
9
+ dotenv << %x[bundle exec dotgpg cat #{file}] if File.exists?(file)
10
+ end
11
+
12
+ Array(fetch(:capistrano_export, %w(shared_path application))).map do |n|
13
+ dotenv << "CAPISTRANO_#{n.upcase}=#{fetch(n.to_sym) || self.send(n.to_sym)}\n"
14
+ end
15
+ dotenv.rewind
16
+ upload! dotenv, "#{shared_path}/.env"
17
+ end
18
+ end
19
+ end
File without changes
metadata ADDED
@@ -0,0 +1,82 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: capistrano-dotgpg
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Alex Sergeyev
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-06-22 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: capistrano
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '3.1'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '3.1'
27
+ - !ruby/object:Gem::Dependency
28
+ name: sshkit
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '1.2'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '1.2'
41
+ description: Decrypt and upload dotgpg files
42
+ email:
43
+ - alex.sergeyev@gmail.com
44
+ executables: []
45
+ extensions: []
46
+ extra_rdoc_files: []
47
+ files:
48
+ - ".gitignore"
49
+ - Gemfile
50
+ - LICENSE.txt
51
+ - README.md
52
+ - Rakefile
53
+ - capistrano-dotgpg.gemspec
54
+ - lib/capistrano-dotgpg.rb
55
+ - lib/capistrano/dotgpg.rb
56
+ - lib/capistrano/dotgpg/version.rb
57
+ - lib/capistrano/tasks/dotgpg.rake
58
+ homepage: https://github.com/alexsergeyev/capistrano-dotgpg
59
+ licenses:
60
+ - MIT
61
+ metadata: {}
62
+ post_install_message:
63
+ rdoc_options: []
64
+ require_paths:
65
+ - lib
66
+ required_ruby_version: !ruby/object:Gem::Requirement
67
+ requirements:
68
+ - - ">="
69
+ - !ruby/object:Gem::Version
70
+ version: '0'
71
+ required_rubygems_version: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ requirements: []
77
+ rubyforge_project:
78
+ rubygems_version: 2.2.2
79
+ signing_key:
80
+ specification_version: 4
81
+ summary: Manage dotgpg files
82
+ test_files: []