itamae-plugin-resource-encrypted_remote_file 0.0.2 → 0.0.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: e270458d6e290697d036927ea8c4ce3c73a3022d
4
- data.tar.gz: 9bf86433096aff7afd97dd1cc092dc2eea45c435
2
+ SHA256:
3
+ metadata.gz: 32520a2c7ee847e11c25d72d7ba42362713b7c0eab9bf6914d5d7b1aaf14190d
4
+ data.tar.gz: 32bdb6a6509b7178d2ba2b4394e5807683579be3f2db8ad2eaab2502429e6e32
5
5
  SHA512:
6
- metadata.gz: ca3b24362bea3fbfbc6487586821e1aed16aae9486fa8f758ce9b8ae3dab4fb853bec27e297a9947e1bc8549f42d2d9485d9b1e8747890368e991db357c60ce0
7
- data.tar.gz: f2aa33db047d12e11752f1545d782c4351aa4985d6f05559b7f570e3c4dc75476e8223cefeaa664d1757f4e34d81bf3d669e7f342eb764f9fe0c71410e0952fa
6
+ metadata.gz: ff8fde74dddda509a51439be3894c8640c7f4bdd87175ae9b5b3adb7e069663f84ff1e3153034bdc87eab1571eea2200d9932b694218183a271ee97de3b00bb1
7
+ data.tar.gz: a8401d64d8356810e5f110d903cb4954770413b9b665658072ed2e58574c5eab327154b52bd72c754671ed926bad793e59d4340d3ec52e8ada98fa02b87336c7
@@ -0,0 +1,12 @@
1
+ # c.f. https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
2
+ version: 2
3
+
4
+ updates:
5
+ - package-ecosystem: github-actions
6
+ directory: /
7
+ schedule:
8
+ interval: weekly
9
+ cooldown:
10
+ default-days: 7
11
+ assignees:
12
+ - sue445
@@ -0,0 +1,41 @@
1
+ name: Publish gem to rubygems.org
2
+
3
+ on:
4
+ workflow_dispatch:
5
+
6
+ jobs:
7
+ release:
8
+ if: github.repository == 'sue445/itamae-plugin-resource-encrypted_remote_file'
9
+ runs-on: ubuntu-latest
10
+
11
+ environment:
12
+ name: rubygems.org
13
+ url: https://rubygems.org/gems/itamae-plugin-resource-encrypted_remote_file
14
+
15
+ permissions:
16
+ contents: write
17
+ id-token: write
18
+
19
+ steps:
20
+ - name: Harden Runner
21
+ uses: step-security/harden-runner@ec9f2d5744a09debf3a187a3f4f675c53b671911 # v2.13.0
22
+ with:
23
+ egress-policy: audit
24
+
25
+ - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
26
+
27
+ - name: Set up Ruby
28
+ uses: ruby/setup-ruby@eaecf785f6a34567a6d97f686bbb7bccc1ac1e5c # v1.237.0
29
+ with:
30
+ bundler-cache: true
31
+ ruby-version: ruby
32
+
33
+ - name: Publish to RubyGems
34
+ uses: rubygems/release-gem@a25424ba2ba8b387abc8ef40807c2c85b96cbe32 # v1.1.1
35
+
36
+ - name: Create GitHub release
37
+ run: |
38
+ tag_name="$(git describe --tags --abbrev=0)"
39
+ gh release create "${tag_name}" --verify-tag --generate-notes
40
+ env:
41
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -0,0 +1,79 @@
1
+ name: test
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - master
7
+ pull_request:
8
+ types:
9
+ - opened
10
+ - synchronize
11
+ - reopened
12
+ schedule:
13
+ - cron: "0 10 * * 5" # JST 19:00 (Fri)
14
+
15
+ jobs:
16
+ test:
17
+ runs-on: ubuntu-latest
18
+
19
+ strategy:
20
+ fail-fast: false
21
+
22
+ matrix:
23
+ ruby:
24
+ - "2.4"
25
+ image:
26
+ - centos:7
27
+ - centos:8
28
+ - debian:jessie
29
+ - debian:stretch
30
+ - debian:buster
31
+ - amazonlinux:2
32
+
33
+ steps:
34
+ - uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
35
+
36
+ - uses: ruby/setup-ruby@8aeb6ff8030dd539317f8e1769a044873b56ea71 # v1.268.0
37
+ with:
38
+ ruby-version: ${{ matrix.ruby }}
39
+ bundler-cache: true
40
+
41
+ - run: bundle update --jobs $(nproc) --retry 3
42
+
43
+ - name: Run Itamae
44
+ run: |
45
+ set -xe
46
+ bundle exec itamae docker --node-yaml=spec/recipes/node.yml spec/recipes/install.rb --image=$IMAGE --tag itamae-plugin:latest
47
+ env:
48
+ IMAGE: ${{ matrix.image }}
49
+
50
+ - name: Run Serverspec
51
+ run: |
52
+ set -xe
53
+ bundle exec rspec
54
+ env:
55
+ DOCKER_IMAGE: itamae-plugin:latest
56
+
57
+ - name: Slack Notification (not success)
58
+ uses: act10ns/slack@cfcc30955fe9377f4f55e1079e5419ee1014269f # v2
59
+ if: "! success()"
60
+ continue-on-error: true
61
+ with:
62
+ status: ${{ job.status }}
63
+ webhook-url: ${{ secrets.SLACK_WEBHOOK }}
64
+ matrix: ${{ toJson(matrix) }}
65
+
66
+ notify:
67
+ needs:
68
+ - test
69
+
70
+ runs-on: ubuntu-latest
71
+
72
+ steps:
73
+ - name: Slack Notification (success)
74
+ uses: act10ns/slack@cfcc30955fe9377f4f55e1079e5419ee1014269f # v2
75
+ if: always()
76
+ continue-on-error: true
77
+ with:
78
+ status: ${{ job.status }}
79
+ webhook-url: ${{ secrets.SLACK_WEBHOOK }}
data/.rspec CHANGED
@@ -1,3 +1,3 @@
1
- --format documentation
2
1
  --color
2
+ --format documentation
3
3
  --require spec_helper
data/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  ## master
2
- [full changelog](https://github.com/sue445/itamae-plugin-resource-encrypted_remote_file/compare/v0.0.2...master)
2
+ [full changelog](https://github.com/sue445/itamae-plugin-resource-encrypted_remote_file/compare/v0.0.4...master)
3
+
4
+ ## [0.0.4](https://github.com/sue445/itamae-plugin-resource-encrypted_remote_file/releases/tag/v0.0.4) (2025/11/29)
5
+ [full changelog](https://github.com/sue445/itamae-plugin-resource-encrypted_remote_file/compare/v0.0.3...v0.0.4)
6
+
7
+ * Release gem from GitHub Actions
8
+ * https://github.com/sue445/itamae-plugin-resource-encrypted_remote_file/pull/34
9
+
10
+ ## 0.0.3 (2021/11/20)
11
+ [full changelog](https://github.com/sue445/itamae-plugin-resource-encrypted_remote_file/compare/v0.0.2...v0.0.3)
12
+
13
+ * Enable MFA requirement for gem releasing
14
+ * https://github.com/sue445/itamae-plugin-resource-encrypted_remote_file/pull/25
3
15
 
4
16
  ## 0.0.2 (2015/06/02)
5
17
  [full changelog](https://github.com/sue445/itamae-plugin-resource-encrypted_remote_file/compare/v0.0.1...v0.0.2)
data/README.md CHANGED
@@ -1,14 +1,12 @@
1
1
  # Itamae::Plugin::Resource::EncryptedRemoteFile
2
2
 
3
- encrypt secret data (ex. id_rsa), and forward decrypted file to remote.
3
+ encrypt secret data (e.g. id_rsa), and forward decrypted file to remote.
4
4
 
5
5
  This is like to [knife-solo_data_bag](https://github.com/thbishop/knife-solo_data_bag)
6
6
 
7
7
  [![Gem Version](https://badge.fury.io/rb/itamae-plugin-resource-encrypted_remote_file.svg)](http://badge.fury.io/rb/itamae-plugin-resource-encrypted_remote_file)
8
- [![Build Status](https://travis-ci.org/sue445/itamae-plugin-resource-encrypted_remote_file.svg?branch=master)](https://travis-ci.org/sue445/itamae-plugin-resource-encrypted_remote_file)
8
+ [![test](https://github.com/sue445/itamae-plugin-resource-encrypted_remote_file/actions/workflows/test.yml/badge.svg)](https://github.com/sue445/itamae-plugin-resource-encrypted_remote_file/actions/workflows/test.yml)
9
9
  [![Code Climate](https://codeclimate.com/github/sue445/itamae-plugin-resource-encrypted_remote_file/badges/gpa.svg)](https://codeclimate.com/github/sue445/itamae-plugin-resource-encrypted_remote_file)
10
- [![Coverage Status](https://coveralls.io/repos/sue445/itamae-plugin-resource-encrypted_remote_file/badge.svg)](https://coveralls.io/r/sue445/itamae-plugin-resource-encrypted_remote_file)
11
- [![Dependency Status](https://gemnasium.com/sue445/itamae-plugin-resource-encrypted_remote_file.svg)](https://gemnasium.com/sue445/itamae-plugin-resource-encrypted_remote_file)
12
10
 
13
11
  ## Installation
14
12
 
@@ -40,12 +38,10 @@ reversible_cryptography encrypt --password=PASSWORD --src-file=/path/to/secret_f
40
38
  ### Recipe
41
39
 
42
40
  ```ruby
43
- require "itamae-plugin-resource-encrypted_remote_file"
44
-
45
41
  encrypted_remote_file "/home/deployer/.ssh/id_rsa" do
46
42
  owner "root"
47
43
  group "root"
48
- source "remote_files/id_rsa.encrypted"
44
+ source "files/id_rsa.encrypted"
49
45
  password ENV["ID_RSA_PASSWORD"]
50
46
  end
51
47
  ```
@@ -80,7 +76,7 @@ ENV["ID_RSA_PASSWORD"]
80
76
  encrypted_remote_file "/home/deployer/.ssh/id_rsa" do
81
77
  owner "root"
82
78
  group "root"
83
- source "remote_files/id_rsa.encrypted"
79
+ source "files/id_rsa.encrypted"
84
80
  password ENV["ID_RSA_PASSWORD"]
85
81
  end
86
82
  ```
@@ -91,6 +87,14 @@ After checking out the repo, run `bin/setup` to install dependencies. Then, run
91
87
 
92
88
  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` to create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
93
89
 
90
+ ## Testing
91
+ requirements [Docker](https://www.docker.com/)
92
+
93
+ ```sh
94
+ bundle exec itamae docker --node-yaml=spec/recipes/node.yml spec/recipes/install.rb --image=centos:7 --tag itamae-plugin:latest
95
+ DOCKER_IMAGE=itamae-plugin:latest bundle exec rspec
96
+ ```
97
+
94
98
  ## Contributing
95
99
 
96
100
  1. Fork it ( https://github.com/sue445/itamae-plugin-resource-encrypted_remote_file/fork )
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = "itamae-plugin-resource-encrypted_remote_file"
7
- spec.version = "0.0.2"
7
+ spec.version = "0.0.4"
8
8
  spec.authors = ["sue445"]
9
9
  spec.email = ["sue445@sue445.net"]
10
10
  spec.licenses = ["MIT"]
@@ -13,6 +13,11 @@ Gem::Specification.new do |spec|
13
13
  spec.description = "encrypt secret data, and forward decrypted file to remote."
14
14
  spec.homepage = "https://github.com/sue445/itamae-plugin-resource-encrypted_remote_file"
15
15
 
16
+ spec.metadata["homepage_uri"] = spec.homepage
17
+ spec.metadata["source_code_uri"] = spec.homepage
18
+ spec.metadata["changelog_uri"] = "#{spec.homepage}/blob/master/CHANGELOG.md"
19
+ spec.metadata["rubygems_mfa_required"] = "true"
20
+
16
21
  # Prevent pushing this gem to RubyGems.org by setting 'allowed_push_host', or
17
22
  # delete this section to allow pushing this gem to any host.
18
23
  if spec.respond_to?(:metadata)
@@ -30,8 +35,7 @@ Gem::Specification.new do |spec|
30
35
  spec.add_dependency "reversible_cryptography"
31
36
 
32
37
  spec.add_development_dependency "bundler"
33
- spec.add_development_dependency "coveralls"
34
- spec.add_development_dependency "rake", "~> 10.0"
35
- spec.add_development_dependency "rspec"
36
- spec.add_development_dependency "rubocop"
38
+ spec.add_development_dependency "docker-api"
39
+ spec.add_development_dependency "rake"
40
+ spec.add_development_dependency "serverspec"
37
41
  end
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: itamae-plugin-resource-encrypted_remote_file
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - sue445
8
- autorequire:
9
8
  bindir: exe
10
9
  cert_chain: []
11
- date: 2015-06-01 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: itamae
@@ -53,7 +52,7 @@ dependencies:
53
52
  - !ruby/object:Gem::Version
54
53
  version: '0'
55
54
  - !ruby/object:Gem::Dependency
56
- name: coveralls
55
+ name: docker-api
57
56
  requirement: !ruby/object:Gem::Requirement
58
57
  requirements:
59
58
  - - ">="
@@ -68,20 +67,6 @@ dependencies:
68
67
  version: '0'
69
68
  - !ruby/object:Gem::Dependency
70
69
  name: rake
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - "~>"
74
- - !ruby/object:Gem::Version
75
- version: '10.0'
76
- type: :development
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - "~>"
81
- - !ruby/object:Gem::Version
82
- version: '10.0'
83
- - !ruby/object:Gem::Dependency
84
- name: rspec
85
70
  requirement: !ruby/object:Gem::Requirement
86
71
  requirements:
87
72
  - - ">="
@@ -95,7 +80,7 @@ dependencies:
95
80
  - !ruby/object:Gem::Version
96
81
  version: '0'
97
82
  - !ruby/object:Gem::Dependency
98
- name: rubocop
83
+ name: serverspec
99
84
  requirement: !ruby/object:Gem::Requirement
100
85
  requirements:
101
86
  - - ">="
@@ -115,12 +100,11 @@ executables: []
115
100
  extensions: []
116
101
  extra_rdoc_files: []
117
102
  files:
118
- - ".coveralls.yml"
103
+ - ".github/dependabot.yml"
104
+ - ".github/workflows/release_gem.yml"
105
+ - ".github/workflows/test.yml"
119
106
  - ".gitignore"
120
- - ".hound.yml"
121
107
  - ".rspec"
122
- - ".rubocop.yml"
123
- - ".travis.yml"
124
108
  - CHANGELOG.md
125
109
  - Gemfile
126
110
  - LICENSE.txt
@@ -135,8 +119,11 @@ homepage: https://github.com/sue445/itamae-plugin-resource-encrypted_remote_file
135
119
  licenses:
136
120
  - MIT
137
121
  metadata:
122
+ homepage_uri: https://github.com/sue445/itamae-plugin-resource-encrypted_remote_file
123
+ source_code_uri: https://github.com/sue445/itamae-plugin-resource-encrypted_remote_file
124
+ changelog_uri: https://github.com/sue445/itamae-plugin-resource-encrypted_remote_file/blob/master/CHANGELOG.md
125
+ rubygems_mfa_required: 'true'
138
126
  allowed_push_host: https://rubygems.org
139
- post_install_message:
140
127
  rdoc_options: []
141
128
  require_paths:
142
129
  - lib
@@ -151,9 +138,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
151
138
  - !ruby/object:Gem::Version
152
139
  version: '0'
153
140
  requirements: []
154
- rubyforge_project:
155
- rubygems_version: 2.4.5
156
- signing_key:
141
+ rubygems_version: 3.6.7
157
142
  specification_version: 4
158
143
  summary: encrypt secret data, and forward decrypted file to remote.
159
144
  test_files: []
data/.coveralls.yml DELETED
@@ -1 +0,0 @@
1
- repo_token: X0BBZfE4kDkJeaSeaYsiGEstlGR9SLRU1
data/.hound.yml DELETED
@@ -1,127 +0,0 @@
1
- # target_version:
2
- # rubocop v0.30.0
3
-
4
- # Exclude autogenerated files
5
- AllCops:
6
- Exclude:
7
- - "vendor/**/*" # rubocop config/default.yml
8
- - "db/schema.rb"
9
- DisplayCopNames: true
10
-
11
- ##################### Style ##################################
12
-
13
- Style/AndOr:
14
- EnforcedStyle: conditionals
15
-
16
- Style/AsciiComments:
17
- Enabled: false
18
-
19
- Style/BlockDelimiters:
20
- Enabled: false
21
-
22
- Style/BracesAroundHashParameters:
23
- Enabled: false
24
-
25
- Style/DeprecatedHashMethods:
26
- Enabled: false
27
-
28
- Style/Documentation:
29
- Enabled: false
30
-
31
- Style/DoubleNegation:
32
- Enabled: false
33
-
34
- Style/DotPosition:
35
- EnforcedStyle: trailing
36
-
37
- Style/EmptyElse:
38
- EnforcedStyle: empty
39
-
40
- Style/FormatString:
41
- EnforcedStyle: percent
42
-
43
- Style/GuardClause:
44
- MinBodyLength: 5
45
-
46
- Style/HashSyntax:
47
- EnforcedStyle: ruby19_no_mixed_keys
48
- Exclude:
49
- - "**/*.rake"
50
- - "Rakefile"
51
-
52
- Style/IfUnlessModifier:
53
- Enabled: false
54
-
55
- Style/IndentHash:
56
- EnforcedStyle: consistent
57
-
58
- Style/Lambda:
59
- Enabled: false
60
-
61
- Style/NumericLiterals:
62
- MinDigits: 6
63
-
64
- Style/PredicateName:
65
- Enabled: false
66
-
67
- Style/RedundantSelf:
68
- Enabled: false
69
-
70
- Style/RedundantReturn:
71
- AllowMultipleReturnValues: true
72
-
73
- Style/SignalException:
74
- EnforcedStyle: only_raise
75
-
76
- Style/SpaceAroundOperators:
77
- MultiSpaceAllowedForOperators:
78
- - "="
79
- - "=>"
80
- - "||"
81
-
82
- Style/StringLiterals:
83
- EnforcedStyle: double_quotes
84
-
85
- Style/StringLiteralsInInterpolation:
86
- Enabled: false
87
-
88
- Style/SingleLineBlockParams:
89
- Enabled: false
90
-
91
- Style/SingleSpaceBeforeFirstArg:
92
- Enabled: false
93
-
94
- Style/TrailingComma:
95
- EnforcedStyleForMultiline: comma
96
-
97
- ##################### Lint ##################################
98
-
99
- Lint/UnderscorePrefixedVariableName:
100
- Enabled: false
101
-
102
- Lint/UnusedMethodArgument:
103
- Enabled: false
104
-
105
- ##################### Metrics ##################################
106
-
107
- Metrics/AbcSize:
108
- Max: 30
109
-
110
- Metrics/CyclomaticComplexity:
111
- Max: 10
112
-
113
- Metrics/LineLength:
114
- Max: 160
115
- Exclude:
116
- - "db/migrate/*.rb"
117
-
118
- Metrics/MethodLength:
119
- Max: 20
120
- Exclude:
121
- - "db/migrate/*.rb"
122
-
123
- Metrics/PerceivedComplexity:
124
- Max: 8
125
-
126
- Metrics/ClassLength:
127
- Max: 120
data/.rubocop.yml DELETED
@@ -1,2 +0,0 @@
1
- inherit_from:
2
- - .hound.yml
data/.travis.yml DELETED
@@ -1,21 +0,0 @@
1
- language: ruby
2
- rvm:
3
- - 2.1
4
- - 2.2
5
- - ruby-head
6
- cache: bundler
7
- before_install: gem install bundler
8
- before_script:
9
- - export COVERAGE=true
10
- script:
11
- - bundle exec rspec
12
- branches:
13
- only:
14
- - master
15
- notifications:
16
- email: false
17
- slack:
18
- secure: SusEtW3pV+b+KUQoQjhqTI+7QtaDXlVl0Wx2EPo1VA4k/t9M/FRZXAXxq2j5+K3QE0y4p4QbnMRoZ8W8l4f7NXzOi7CFHQAnKUVDswZdsj2udEWeNWUeN4Rub0de3sInfKkbZKfT0uhamToX/pRH7uhOogeL9Eei+KUekUXJKTE=
19
- matrix:
20
- allow_failures:
21
- - rvm: ruby-head