capistrano-locally 0.2.4 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.circleci/config.yml +42 -0
- data/.gitignore +1 -0
- data/CHANGELOG.md +77 -0
- data/README.md +7 -1
- data/capistrano-locally.gemspec +3 -2
- data/lib/capistrano/locally/version.rb +1 -1
- data/lib/capistrano/locally.rb +32 -4
- metadata +30 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 6a04f292f6b34ea461a1ebb835925adec2ebbeca70a1b91ced1e5fbab9eeab42
|
4
|
+
data.tar.gz: 7616d5e12a79281d24ef7bcbbca925a9c57cbac2aeb3179897d32a250d52dfc2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c7d14aa9533c666627b1c441e4e7f99632457fb3e0e133ac2f67343962b27780d3c8a2c0379463f7dd87c77f5164088f9e31b820df3a5e7828e0a5731449bd71
|
7
|
+
data.tar.gz: 66202b70619916df1da22bc01816759d36980e25858135f9992d1c7a01a12e62809932bcb588932a31f68e1be2bfcd7a8f65a5fa7525035ed20e7c19fa3b9f75
|
@@ -0,0 +1,42 @@
|
|
1
|
+
# Ruby CircleCI 2.1 configuration file
|
2
|
+
#
|
3
|
+
# Check https://circleci.com/docs/2.0/language-ruby/ for more details
|
4
|
+
#
|
5
|
+
version: 2.1 # Use 2.1 to enable using orbs and other features.
|
6
|
+
|
7
|
+
# Declare the orbs that we'll use in our config.
|
8
|
+
# read more about orbs: https://circleci.com/docs/2.0/using-orbs/
|
9
|
+
orbs:
|
10
|
+
ruby: circleci/ruby@1.1.4
|
11
|
+
|
12
|
+
jobs:
|
13
|
+
test:
|
14
|
+
parameters:
|
15
|
+
ruby-version:
|
16
|
+
type: string
|
17
|
+
bundler-version:
|
18
|
+
type: string
|
19
|
+
docker:
|
20
|
+
# specify the version you desire here
|
21
|
+
- image: cimg/ruby:<< parameters.ruby-version >>
|
22
|
+
steps:
|
23
|
+
- checkout
|
24
|
+
- run:
|
25
|
+
command: |
|
26
|
+
gem install bundler:<< parameters.bundler-version >>
|
27
|
+
bundle config set path ./vendor/bundle
|
28
|
+
bundle _<< parameters.bundler-version >>_ install
|
29
|
+
# - ruby/install-deps:
|
30
|
+
# bundler-version: << parameters.bundler-version >>
|
31
|
+
# with-cache: false
|
32
|
+
- ruby/rspec-test
|
33
|
+
|
34
|
+
workflows:
|
35
|
+
build_and_test:
|
36
|
+
jobs:
|
37
|
+
- test:
|
38
|
+
# matrix jobs https://circleci.com/blog/circleci-matrix-jobs/
|
39
|
+
matrix:
|
40
|
+
parameters:
|
41
|
+
ruby-version: ["2.5", "2.7"]
|
42
|
+
bundler-version: ["1.17.3", "2.2.3"]
|
data/.gitignore
CHANGED
data/CHANGELOG.md
ADDED
@@ -0,0 +1,77 @@
|
|
1
|
+
# Changelog
|
2
|
+
|
3
|
+
## [Unreleased](https://github.com/komazarari/capistrano-locally/tree/HEAD)
|
4
|
+
|
5
|
+
[Full Changelog](https://github.com/komazarari/capistrano-locally/compare/v0.2.7...HEAD)
|
6
|
+
|
7
|
+
**Closed issues:**
|
8
|
+
|
9
|
+
- Gem installs many of its files as world writable [\#14](https://github.com/komazarari/capistrano-locally/issues/14)
|
10
|
+
|
11
|
+
## [v0.2.7](https://github.com/komazarari/capistrano-locally/tree/v0.2.7) (2021-01-22)
|
12
|
+
|
13
|
+
[Full Changelog](https://github.com/komazarari/capistrano-locally/compare/v0.2.6...v0.2.7)
|
14
|
+
|
15
|
+
**Closed issues:**
|
16
|
+
|
17
|
+
- within doesn't work with this [\#13](https://github.com/komazarari/capistrano-locally/issues/13)
|
18
|
+
|
19
|
+
**Merged pull requests:**
|
20
|
+
|
21
|
+
- Fix: Many files in the gem are world writable [\#15](https://github.com/komazarari/capistrano-locally/pull/15) ([komazarari](https://github.com/komazarari))
|
22
|
+
|
23
|
+
## [v0.2.6](https://github.com/komazarari/capistrano-locally/tree/v0.2.6) (2019-02-28)
|
24
|
+
|
25
|
+
[Full Changelog](https://github.com/komazarari/capistrano-locally/compare/v0.2.5...v0.2.6)
|
26
|
+
|
27
|
+
**Closed issues:**
|
28
|
+
|
29
|
+
- Capistrano stopped when sending signal [\#9](https://github.com/komazarari/capistrano-locally/issues/9)
|
30
|
+
|
31
|
+
**Merged pull requests:**
|
32
|
+
|
33
|
+
- Add a way to inherit environment variables and execute commands [\#12](https://github.com/komazarari/capistrano-locally/pull/12) ([ogidow](https://github.com/ogidow))
|
34
|
+
- first circleci config [\#11](https://github.com/komazarari/capistrano-locally/pull/11) ([komazarari](https://github.com/komazarari))
|
35
|
+
- Add specs [\#10](https://github.com/komazarari/capistrano-locally/pull/10) ([komazarari](https://github.com/komazarari))
|
36
|
+
|
37
|
+
## [v0.2.5](https://github.com/komazarari/capistrano-locally/tree/v0.2.5) (2018-03-12)
|
38
|
+
|
39
|
+
[Full Changelog](https://github.com/komazarari/capistrano-locally/compare/v0.2.4...v0.2.5)
|
40
|
+
|
41
|
+
**Merged pull requests:**
|
42
|
+
|
43
|
+
- Use pristine Bundler environment when executing local commands [\#8](https://github.com/komazarari/capistrano-locally/pull/8) ([adimitrov](https://github.com/adimitrov))
|
44
|
+
- Fix error on boot [\#7](https://github.com/komazarari/capistrano-locally/pull/7) ([willnet](https://github.com/willnet))
|
45
|
+
|
46
|
+
## [v0.2.4](https://github.com/komazarari/capistrano-locally/tree/v0.2.4) (2016-09-23)
|
47
|
+
|
48
|
+
[Full Changelog](https://github.com/komazarari/capistrano-locally/compare/v0.2.3...v0.2.4)
|
49
|
+
|
50
|
+
## [v0.2.3](https://github.com/komazarari/capistrano-locally/tree/v0.2.3) (2016-09-05)
|
51
|
+
|
52
|
+
[Full Changelog](https://github.com/komazarari/capistrano-locally/compare/v0.2.1...v0.2.3)
|
53
|
+
|
54
|
+
**Closed issues:**
|
55
|
+
|
56
|
+
- License? [\#4](https://github.com/komazarari/capistrano-locally/issues/4)
|
57
|
+
|
58
|
+
**Merged pull requests:**
|
59
|
+
|
60
|
+
- Add LICENSE.txt [\#5](https://github.com/komazarari/capistrano-locally/pull/5) ([komazarari](https://github.com/komazarari))
|
61
|
+
- Update README.md [\#3](https://github.com/komazarari/capistrano-locally/pull/3) ([webflo](https://github.com/webflo))
|
62
|
+
|
63
|
+
## [v0.2.1](https://github.com/komazarari/capistrano-locally/tree/v0.2.1) (2016-01-23)
|
64
|
+
|
65
|
+
[Full Changelog](https://github.com/komazarari/capistrano-locally/compare/v0.2.0...v0.2.1)
|
66
|
+
|
67
|
+
**Merged pull requests:**
|
68
|
+
|
69
|
+
- Do not fail if hosts is nil [\#1](https://github.com/komazarari/capistrano-locally/pull/1) ([blelump](https://github.com/blelump))
|
70
|
+
|
71
|
+
## [v0.2.0](https://github.com/komazarari/capistrano-locally/tree/v0.2.0) (2015-09-26)
|
72
|
+
|
73
|
+
[Full Changelog](https://github.com/komazarari/capistrano-locally/compare/c7c7bd2fb34a62bb7f1f7578b970ff53382b0de9...v0.2.0)
|
74
|
+
|
75
|
+
|
76
|
+
|
77
|
+
\* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)*
|
data/README.md
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
# Capistrano::Locally
|
2
|
+
[![CircleCI](https://circleci.com/gh/komazarari/capistrano-locally.svg?style=svg)](https://circleci.com/gh/komazarari/capistrano-locally)
|
2
3
|
|
3
4
|
This gem is a Capistrano plugin to simplify "localhost" deployment.
|
4
5
|
|
@@ -14,7 +15,7 @@ So, you don't need to write SSH user and configs on `server 'localhost'`.
|
|
14
15
|
Add this line to your application's Gemfile:
|
15
16
|
|
16
17
|
```ruby
|
17
|
-
gem 'capistrano-locally'
|
18
|
+
gem 'capistrano-locally', require: false
|
18
19
|
```
|
19
20
|
|
20
21
|
And then execute:
|
@@ -41,6 +42,11 @@ Require in `Capfile`:
|
|
41
42
|
# localhost config is:
|
42
43
|
server 'localhost', roles: %w{app web} # no need to set SSH configs.
|
43
44
|
|
45
|
+
### Options
|
46
|
+
**`:run_locally_with_unbundled_env`** (default: `true`)
|
47
|
+
|
48
|
+
Previous name is **`run_locally_with_clean_env`**.
|
49
|
+
When using bundler, commands are executed in `Bundler.with_unbundled_env` by default so as not to affect the executable ruby scripts. To explicitly inherit environment variables, set this `false`.
|
44
50
|
|
45
51
|
## Development
|
46
52
|
|
data/capistrano-locally.gemspec
CHANGED
@@ -28,7 +28,8 @@ A `capistrano-locally` deploys without SSH only when a target host named "localh
|
|
28
28
|
|
29
29
|
spec.add_dependency "capistrano", "~> 3.0"
|
30
30
|
|
31
|
-
spec.add_development_dependency "bundler"
|
32
|
-
spec.add_development_dependency "rake"
|
31
|
+
spec.add_development_dependency "bundler"
|
32
|
+
spec.add_development_dependency "rake"
|
33
33
|
spec.add_development_dependency "rspec"
|
34
|
+
spec.add_development_dependency "rspec_junit_formatter"
|
34
35
|
end
|
data/lib/capistrano/locally.rb
CHANGED
@@ -17,19 +17,47 @@ module Capistrano
|
|
17
17
|
localhost = Configuration.env.filter(localhosts).first
|
18
18
|
|
19
19
|
unless localhost.nil?
|
20
|
-
if dry_run?
|
21
|
-
|
20
|
+
klass = if dry_run?
|
21
|
+
SSHKit::Backend::Printer
|
22
|
+
else
|
23
|
+
SSHKit::Backend::Local
|
24
|
+
end
|
25
|
+
|
26
|
+
if (defined? Bundler) && with_unbundled_env?
|
27
|
+
if Bundler.respond_to?(:with_unbundled_env)
|
28
|
+
Bundler.method(:with_unbundled_env)
|
29
|
+
else
|
30
|
+
Bundler.method(:with_clean_env)
|
31
|
+
end.call do
|
32
|
+
klass.new(localhost, &block).run
|
33
|
+
end
|
22
34
|
else
|
23
|
-
|
24
|
-
end
|
35
|
+
klass.new(localhost, &block).run
|
36
|
+
end
|
25
37
|
end
|
26
38
|
|
27
39
|
original_on(remotehosts, options, &block)
|
28
40
|
end
|
29
41
|
|
42
|
+
def with_unbundled_env?
|
43
|
+
[deprecated_with_unbundled_env?, fetch(:run_locally_with_unbundled_env, true)].find do |val|
|
44
|
+
!val.nil?
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
30
48
|
private
|
49
|
+
|
31
50
|
def dry_run?
|
32
51
|
fetch(:sshkit_backend) == SSHKit::Backend::Printer
|
33
52
|
end
|
53
|
+
|
54
|
+
def deprecated_with_unbundled_env?
|
55
|
+
fetch(:run_locally_with_clean_env).tap do |val|
|
56
|
+
$stderr.puts(<<~MESSAGE) unless val.nil?
|
57
|
+
[Deprecation Notice] `set :run_locally_with_clean_env` has been deprecated \
|
58
|
+
in favor of `set :run_locally_with_unbundled_env`.
|
59
|
+
MESSAGE
|
60
|
+
end
|
61
|
+
end
|
34
62
|
end
|
35
63
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capistrano-locally
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Takuto Komazaki
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-09-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: capistrano
|
@@ -28,30 +28,30 @@ dependencies:
|
|
28
28
|
name: bundler
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
40
|
+
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rake
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - "
|
45
|
+
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
47
|
+
version: '0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - "
|
52
|
+
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
54
|
+
version: '0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rspec
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -66,6 +66,20 @@ dependencies:
|
|
66
66
|
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rspec_junit_formatter
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
69
83
|
description: |
|
70
84
|
Capistrano plugin to simplify "localhost" deployment.
|
71
85
|
|
@@ -79,8 +93,10 @@ executables: []
|
|
79
93
|
extensions: []
|
80
94
|
extra_rdoc_files: []
|
81
95
|
files:
|
96
|
+
- ".circleci/config.yml"
|
82
97
|
- ".gitignore"
|
83
98
|
- ".rspec"
|
99
|
+
- CHANGELOG.md
|
84
100
|
- Gemfile
|
85
101
|
- LICENSE.txt
|
86
102
|
- README.md
|
@@ -94,7 +110,7 @@ homepage: https://github.com/komazarari/capistrano-locally
|
|
94
110
|
licenses:
|
95
111
|
- MIT
|
96
112
|
metadata: {}
|
97
|
-
post_install_message:
|
113
|
+
post_install_message:
|
98
114
|
rdoc_options: []
|
99
115
|
require_paths:
|
100
116
|
- lib
|
@@ -109,9 +125,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
109
125
|
- !ruby/object:Gem::Version
|
110
126
|
version: '0'
|
111
127
|
requirements: []
|
112
|
-
|
113
|
-
|
114
|
-
signing_key:
|
128
|
+
rubygems_version: 3.1.4
|
129
|
+
signing_key:
|
115
130
|
specification_version: 4
|
116
131
|
summary: Capistrano plugin to simplify "localhost" deployment.
|
117
132
|
test_files: []
|