capistrano-locally 0.2.7 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6e833304cd9224ff0e9e5a12c394f7422cf69738bd42f7ab1062cceb44121b70
4
- data.tar.gz: 354d9e14248d7d796a122b38d1c31045c90cfcba20d781fc8948a0d1f9da291a
3
+ metadata.gz: 6a04f292f6b34ea461a1ebb835925adec2ebbeca70a1b91ced1e5fbab9eeab42
4
+ data.tar.gz: 7616d5e12a79281d24ef7bcbbca925a9c57cbac2aeb3179897d32a250d52dfc2
5
5
  SHA512:
6
- metadata.gz: 5700767f88d92d52b85bb918db4cef974276935f3d59ef5b94e0b5c19606b6d2d48552bc873c8da7ef86aa0bb5ad98acfa21b402b4c5e728d43a37eac2b1dcfc
7
- data.tar.gz: ea93f72cf41dd6bd3939169cca25e0fa5a053af114a03e225fa45ffb87b34d6a6edbb26b7592ec376e7a97a26c919ade4f8cf5b1dd7db94c56fd6c50cc668f4d
6
+ metadata.gz: c7d14aa9533c666627b1c441e4e7f99632457fb3e0e133ac2f67343962b27780d3c8a2c0379463f7dd87c77f5164088f9e31b820df3a5e7828e0a5731449bd71
7
+ data.tar.gz: 66202b70619916df1da22bc01816759d36980e25858135f9992d1c7a01a12e62809932bcb588932a31f68e1be2bfcd7a8f65a5fa7525035ed20e7c19fa3b9f75
data/.circleci/config.yml CHANGED
@@ -1,64 +1,42 @@
1
- # Ruby CircleCI 2.0 configuration file
1
+ # Ruby CircleCI 2.1 configuration file
2
2
  #
3
3
  # Check https://circleci.com/docs/2.0/language-ruby/ for more details
4
4
  #
5
- version: 2
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
+
6
12
  jobs:
7
- build:
13
+ test:
14
+ parameters:
15
+ ruby-version:
16
+ type: string
17
+ bundler-version:
18
+ type: string
8
19
  docker:
9
20
  # 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
-
21
+ - image: cimg/ruby:<< parameters.ruby-version >>
20
22
  steps:
21
23
  - 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
24
  - run:
31
- name: install dependencies
32
25
  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
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/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
@@ -43,9 +43,10 @@ Require in `Capfile`:
43
43
  server 'localhost', roles: %w{app web} # no need to set SSH configs.
44
44
 
45
45
  ### Options
46
- **`:run_locally_with_clean_env`** (default: `true`)
46
+ **`:run_locally_with_unbundled_env`** (default: `true`)
47
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`.
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`.
49
50
 
50
51
  ## Development
51
52
 
@@ -29,7 +29,7 @@ A `capistrano-locally` deploys without SSH only when a target host named "localh
29
29
  spec.add_dependency "capistrano", "~> 3.0"
30
30
 
31
31
  spec.add_development_dependency "bundler"
32
- spec.add_development_dependency "rake", "~> 10.0"
32
+ spec.add_development_dependency "rake"
33
33
  spec.add_development_dependency "rspec"
34
34
  spec.add_development_dependency "rspec_junit_formatter"
35
35
  end
@@ -1,5 +1,5 @@
1
1
  module Capistrano
2
2
  module Locally
3
- VERSION = "0.2.7"
3
+ VERSION = "0.3.0"
4
4
  end
5
5
  end
@@ -22,8 +22,13 @@ module Capistrano
22
22
  else
23
23
  SSHKit::Backend::Local
24
24
  end
25
- if (defined? Bundler) && fetch(:run_locally_with_clean_env, true)
26
- Bundler.with_clean_env do
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
27
32
  klass.new(localhost, &block).run
28
33
  end
29
34
  else
@@ -34,10 +39,25 @@ module Capistrano
34
39
  original_on(remotehosts, options, &block)
35
40
  end
36
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
+
37
48
  private
38
49
 
39
50
  def dry_run?
40
51
  fetch(:sshkit_backend) == SSHKit::Backend::Printer
41
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
42
62
  end
43
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.2.7
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: 2021-01-22 00:00:00.000000000 Z
11
+ date: 2021-09-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: capistrano
@@ -42,16 +42,16 @@ dependencies:
42
42
  name: rake
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - "~>"
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
- version: '10.0'
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: '10.0'
54
+ version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rspec
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -96,6 +96,7 @@ files:
96
96
  - ".circleci/config.yml"
97
97
  - ".gitignore"
98
98
  - ".rspec"
99
+ - CHANGELOG.md
99
100
  - Gemfile
100
101
  - LICENSE.txt
101
102
  - README.md
@@ -109,7 +110,7 @@ homepage: https://github.com/komazarari/capistrano-locally
109
110
  licenses:
110
111
  - MIT
111
112
  metadata: {}
112
- post_install_message:
113
+ post_install_message:
113
114
  rdoc_options: []
114
115
  require_paths:
115
116
  - lib
@@ -125,7 +126,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
125
126
  version: '0'
126
127
  requirements: []
127
128
  rubygems_version: 3.1.4
128
- signing_key:
129
+ signing_key:
129
130
  specification_version: 4
130
131
  summary: Capistrano plugin to simplify "localhost" deployment.
131
132
  test_files: []