capistrano-locally 0.2.5 → 0.2.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.circleci/config.yml +64 -0
- data/.gitignore +1 -0
- data/README.md +5 -0
- data/capistrano-locally.gemspec +1 -0
- data/lib/capistrano/locally.rb +2 -1
- data/lib/capistrano/locally/version.rb +1 -1
- metadata +18 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 17cdcc9fe413eed6b748987d60d60e9fabd46b40ba4a0ea1ea1a111dcfbdd950
|
4
|
+
data.tar.gz: 30e8f306d1b94cb73a1d20ebd949bb281411c96cf395656dc63786c45cacdc2f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c7656ddbd77240e0bc390ac85b59678908cbb465169c0d6790ca2a779b0ab2f7138e2f872ca220eba403eccf7da17ebcaf3d93c11adb414f39c6aeb3212675ef
|
7
|
+
data.tar.gz: 124335cd3309b38c4a131b9be9fa500c27caea02a0463424f93fb9b6ce74f9b06ec1fd7c1443971b69a8cd90078c6938457f0cffd3c819e3ba4a6e72c34f4427
|
@@ -0,0 +1,64 @@
|
|
1
|
+
# Ruby CircleCI 2.0 configuration file
|
2
|
+
#
|
3
|
+
# Check https://circleci.com/docs/2.0/language-ruby/ for more details
|
4
|
+
#
|
5
|
+
version: 2
|
6
|
+
jobs:
|
7
|
+
build:
|
8
|
+
docker:
|
9
|
+
# specify the version you desire here
|
10
|
+
- image: circleci/ruby:2.4.1-node-browsers
|
11
|
+
- image: circleci/ruby:2.5.3-node-browsers
|
12
|
+
|
13
|
+
# Specify service dependencies here if necessary
|
14
|
+
# CircleCI maintains a library of pre-built images
|
15
|
+
# documented at https://circleci.com/docs/2.0/circleci-images/
|
16
|
+
# - image: circleci/postgres:9.4
|
17
|
+
|
18
|
+
working_directory: ~/repo
|
19
|
+
|
20
|
+
steps:
|
21
|
+
- checkout
|
22
|
+
|
23
|
+
# Download and cache dependencies
|
24
|
+
- restore_cache:
|
25
|
+
keys:
|
26
|
+
- v1-dependencies-{{ checksum "Gemfile.lock" }}
|
27
|
+
# fallback to using the latest cache if no exact match is found
|
28
|
+
- v1-dependencies-
|
29
|
+
|
30
|
+
- run:
|
31
|
+
name: install dependencies
|
32
|
+
command: |
|
33
|
+
bundle install --jobs=4 --retry=3 --path vendor/bundle
|
34
|
+
|
35
|
+
- save_cache:
|
36
|
+
paths:
|
37
|
+
- ./vendor/bundle
|
38
|
+
key: v1-dependencies-{{ checksum "Gemfile.lock" }}
|
39
|
+
|
40
|
+
# # Database setup
|
41
|
+
# - run: bundle exec rake db:create
|
42
|
+
# - run: bundle exec rake db:schema:load
|
43
|
+
|
44
|
+
# run tests!
|
45
|
+
- run:
|
46
|
+
name: run tests
|
47
|
+
command: |
|
48
|
+
mkdir /tmp/test-results
|
49
|
+
TEST_FILES="$(circleci tests glob "spec/**/*_spec.rb" | \
|
50
|
+
circleci tests split --split-by=timings)"
|
51
|
+
|
52
|
+
bundle exec rspec \
|
53
|
+
--format progress \
|
54
|
+
--format RspecJunitFormatter \
|
55
|
+
--out /tmp/test-results/rspec.xml \
|
56
|
+
--format progress \
|
57
|
+
$TEST_FILES
|
58
|
+
|
59
|
+
# collect reports
|
60
|
+
- store_test_results:
|
61
|
+
path: /tmp/test-results
|
62
|
+
- store_artifacts:
|
63
|
+
path: /tmp/test-results
|
64
|
+
destination: test-results
|
data/.gitignore
CHANGED
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
|
|
@@ -41,6 +42,10 @@ 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_clean_env`** (default: `true`)
|
47
|
+
|
48
|
+
When using bundler, commands are executed in `Bundler.with_clean_env` by default so as not to affect the executable ruby scripts. To explicitly inherit environment variables, set this `false`.
|
44
49
|
|
45
50
|
## Development
|
46
51
|
|
data/capistrano-locally.gemspec
CHANGED
@@ -31,4 +31,5 @@ A `capistrano-locally` deploys without SSH only when a target host named "localh
|
|
31
31
|
spec.add_development_dependency "bundler", "~> 1.10"
|
32
32
|
spec.add_development_dependency "rake", "~> 10.0"
|
33
33
|
spec.add_development_dependency "rspec"
|
34
|
+
spec.add_development_dependency "rspec_junit_formatter"
|
34
35
|
end
|
data/lib/capistrano/locally.rb
CHANGED
@@ -22,7 +22,7 @@ module Capistrano
|
|
22
22
|
else
|
23
23
|
SSHKit::Backend::Local
|
24
24
|
end
|
25
|
-
if defined? Bundler
|
25
|
+
if (defined? Bundler) && fetch(:run_locally_with_clean_env, true)
|
26
26
|
Bundler.with_clean_env do
|
27
27
|
klass.new(localhost, &block).run
|
28
28
|
end
|
@@ -35,6 +35,7 @@ module Capistrano
|
|
35
35
|
end
|
36
36
|
|
37
37
|
private
|
38
|
+
|
38
39
|
def dry_run?
|
39
40
|
fetch(:sshkit_backend) == SSHKit::Backend::Printer
|
40
41
|
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.2.
|
4
|
+
version: 0.2.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Takuto Komazaki
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-02-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: capistrano
|
@@ -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,6 +93,7 @@ executables: []
|
|
79
93
|
extensions: []
|
80
94
|
extra_rdoc_files: []
|
81
95
|
files:
|
96
|
+
- ".circleci/config.yml"
|
82
97
|
- ".gitignore"
|
83
98
|
- ".rspec"
|
84
99
|
- Gemfile
|
@@ -109,8 +124,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
109
124
|
- !ruby/object:Gem::Version
|
110
125
|
version: '0'
|
111
126
|
requirements: []
|
112
|
-
|
113
|
-
rubygems_version: 2.7.3
|
127
|
+
rubygems_version: 3.0.1
|
114
128
|
signing_key:
|
115
129
|
specification_version: 4
|
116
130
|
summary: Capistrano plugin to simplify "localhost" deployment.
|