keylime 0.2.1 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/exporter.sh +16 -0
- data/.github/workflows/build.yml +37 -0
- data/LICENSE +1 -1
- data/README.md +1 -4
- data/keylime.gemspec +6 -11
- data/lib/keylime/credential.rb +2 -2
- data/spec/keylime/credential_spec.rb +2 -2
- data/spec/spec_helper.rb +0 -9
- data/spec/stub/keychain.rb +1 -1
- metadata +15 -90
- data/.circle-ruby +0 -4
- data/.prospectus +0 -25
- data/circle.yml +0 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c0b964641e6048faf56bf4886b691066d3122a82e81a425245c07e7b9c084619
|
4
|
+
data.tar.gz: 938b6e4a89c4c6fbcf8e3965b690a141a116bd825388c4a408fcbae0dc5658be
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c2e557a73a9b273f87f78d6163a927ad8a400a09da0f3c678e921d59dbe7454f027c53d4c3adef9682f1013b91dd8876c8bbc9874a1392ea6e936aca9c90c6db
|
7
|
+
data.tar.gz: 5c88423ef0f6c1f7c74aedaafb2a6d988a450c14fa99e74dc5054b2e6188f99e74c67cd6a76b4219e78374d9e2ed871a0a6ce4657de6a550e15ce344558eda1b
|
data/.github/exporter.sh
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
#!/usr/bin/env bash
|
2
|
+
|
3
|
+
set -euo pipefail
|
4
|
+
|
5
|
+
URL="https://exporter.akerl.app/metric"
|
6
|
+
AUTH="Authorization: Bearer $EXPORTER_TOKEN"
|
7
|
+
if [[ "$JOB_STATUS" == "success" ]] ; then
|
8
|
+
VALUE=1
|
9
|
+
else
|
10
|
+
VALUE=0
|
11
|
+
fi
|
12
|
+
BODY="{\"name\":\"gh/${GITHUB_REPOSITORY}\",\"metrics\":[{\"name\":\"ghactions\",\"type\":\"gauge\",\"tags\":{\"repo\":\"${GITHUB_REPOSITORY}\"},\"value\":\"${VALUE}\"}]}"
|
13
|
+
|
14
|
+
echo "$BODY"
|
15
|
+
|
16
|
+
curl -i -XPOST -d "$BODY" -H"$AUTH" "$URL"
|
@@ -0,0 +1,37 @@
|
|
1
|
+
---
|
2
|
+
name: Build
|
3
|
+
'on':
|
4
|
+
push:
|
5
|
+
branches:
|
6
|
+
- main
|
7
|
+
tags:
|
8
|
+
- "**"
|
9
|
+
pull_request_target:
|
10
|
+
jobs:
|
11
|
+
build:
|
12
|
+
name: Build
|
13
|
+
runs-on: ubuntu-22.04
|
14
|
+
permissions:
|
15
|
+
contents: write
|
16
|
+
steps:
|
17
|
+
- name: Checkout
|
18
|
+
uses: actions/checkout@v3
|
19
|
+
with:
|
20
|
+
submodules: recursive
|
21
|
+
- uses: ruby/setup-ruby@v1
|
22
|
+
with:
|
23
|
+
ruby-version: '3.1'
|
24
|
+
bundler-cache: true
|
25
|
+
- name: Build
|
26
|
+
run: bundle exec rake
|
27
|
+
- name: Release
|
28
|
+
if: github.ref_type == 'tag'
|
29
|
+
run: bundle exec rake release
|
30
|
+
env:
|
31
|
+
GEM_HOST_API_KEY: "${{ secrets.GEM_HOST_API_KEY }}"
|
32
|
+
- name: Post to hook-exporter
|
33
|
+
run: "./.github/exporter.sh"
|
34
|
+
env:
|
35
|
+
EXPORTER_TOKEN: "${{ secrets.EXPORTER_TOKEN }}"
|
36
|
+
JOB_STATUS: "${{ job.status }}"
|
37
|
+
if: always() && github.ref == 'refs/heads/main'
|
data/LICENSE
CHANGED
data/README.md
CHANGED
@@ -2,10 +2,7 @@ keylime
|
|
2
2
|
=========
|
3
3
|
|
4
4
|
[![Gem Version](https://img.shields.io/gem/v/keylime.svg)](https://rubygems.org/gems/keylime)
|
5
|
-
[![
|
6
|
-
[![Build Status](https://img.shields.io/circleci/project/akerl/keylime/master.svg)](https://circleci.com/gh/akerl/keylime)
|
7
|
-
[![Coverage Status](https://img.shields.io/codecov/c/github/akerl/keylime.svg)](https://codecov.io/github/akerl/keylime)
|
8
|
-
[![Code Quality](https://img.shields.io/codacy/b84e51f348094a33b2982bfb73adc645.svg)](https://www.codacy.com/app/akerl/keylime)
|
5
|
+
[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/akerl/keylime/build.yml?branch=main)](https://github.com/akerl/keylime/actions)
|
9
6
|
[![MIT Licensed](https://img.shields.io/badge/license-MIT-green.svg)](https://tldrlegal.com/license/mit-license)
|
10
7
|
|
11
8
|
Simple wrapper for using Mac Keychain
|
data/keylime.gemspec
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'keylime'
|
3
|
-
s.version = '0.
|
4
|
-
s.
|
3
|
+
s.version = '0.3.0'
|
4
|
+
s.required_ruby_version = '>= 2.6'
|
5
5
|
|
6
6
|
s.summary = 'Simple wrapper for using Mac Keychain'
|
7
7
|
s.description = 'Simple wrapper for using Mac Keychain'
|
@@ -11,15 +11,10 @@ Gem::Specification.new do |s|
|
|
11
11
|
s.license = 'MIT'
|
12
12
|
|
13
13
|
s.files = `git ls-files`.split
|
14
|
-
s.test_files = `git ls-files spec/*`.split
|
15
14
|
|
16
|
-
s.add_dependency 'ruby-keychain', '~> 0.
|
17
|
-
s.add_dependency 'userinput', '~> 1.0.
|
15
|
+
s.add_dependency 'ruby-keychain', '~> 0.4.0'
|
16
|
+
s.add_dependency 'userinput', '~> 1.0.2'
|
18
17
|
|
19
|
-
s.add_development_dependency '
|
20
|
-
s.
|
21
|
-
s.add_development_dependency 'goodcop', '~> 0.4.0'
|
22
|
-
s.add_development_dependency 'rake', '~> 12.3.0'
|
23
|
-
s.add_development_dependency 'rspec', '~> 3.7.0'
|
24
|
-
s.add_development_dependency 'rubocop', '~> 0.54.0'
|
18
|
+
s.add_development_dependency 'goodcop', '~> 0.9.7'
|
19
|
+
s.metadata['rubygems_mfa_required'] = 'true'
|
25
20
|
end
|
data/lib/keylime/credential.rb
CHANGED
@@ -6,7 +6,7 @@ module Keylime
|
|
6
6
|
require 'keychain'
|
7
7
|
true
|
8
8
|
rescue LoadError
|
9
|
-
raise if RUBY_PLATFORM
|
9
|
+
raise if RUBY_PLATFORM.include?('darwin')
|
10
10
|
false
|
11
11
|
end
|
12
12
|
|
@@ -133,7 +133,7 @@ module Keylime
|
|
133
133
|
end
|
134
134
|
|
135
135
|
def stringify(fields)
|
136
|
-
fields.
|
136
|
+
fields.transform_keys(&:to_s)
|
137
137
|
end
|
138
138
|
end
|
139
139
|
|
@@ -36,8 +36,8 @@ describe Keylime::Credential do
|
|
36
36
|
expect(subject.get.password).to eql secret
|
37
37
|
end
|
38
38
|
it 'prompts the user if the credential does not exist' do
|
39
|
-
allow(
|
40
|
-
expect(
|
39
|
+
allow($stdin).to receive(:gets) { "#{secret}\n" }
|
40
|
+
expect($stdout).to receive(:print).with('Question? ')
|
41
41
|
expect(subject.get!('Question').password).to eql secret
|
42
42
|
end
|
43
43
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -1,12 +1,3 @@
|
|
1
|
-
if ENV['CI'] == 'true'
|
2
|
-
require 'simplecov'
|
3
|
-
require 'codecov'
|
4
|
-
SimpleCov.formatter = SimpleCov::Formatter::Codecov
|
5
|
-
SimpleCov.start do
|
6
|
-
add_filter '/spec/'
|
7
|
-
end
|
8
|
-
end
|
9
|
-
|
10
1
|
require 'rspec'
|
11
2
|
$LOAD_PATH.unshift File.expand_path('stub', __dir__)
|
12
3
|
require 'keylime'
|
data/spec/stub/keychain.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: keylime
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Les Aker
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-10-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ruby-keychain
|
@@ -16,128 +16,57 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.
|
19
|
+
version: 0.4.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.
|
26
|
+
version: 0.4.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: userinput
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 1.0.
|
33
|
+
version: 1.0.2
|
34
34
|
type: :runtime
|
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: 1.0.
|
41
|
-
- !ruby/object:Gem::Dependency
|
42
|
-
name: codecov
|
43
|
-
requirement: !ruby/object:Gem::Requirement
|
44
|
-
requirements:
|
45
|
-
- - "~>"
|
46
|
-
- !ruby/object:Gem::Version
|
47
|
-
version: 0.1.1
|
48
|
-
type: :development
|
49
|
-
prerelease: false
|
50
|
-
version_requirements: !ruby/object:Gem::Requirement
|
51
|
-
requirements:
|
52
|
-
- - "~>"
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
version: 0.1.1
|
55
|
-
- !ruby/object:Gem::Dependency
|
56
|
-
name: fuubar
|
57
|
-
requirement: !ruby/object:Gem::Requirement
|
58
|
-
requirements:
|
59
|
-
- - "~>"
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: 2.3.0
|
62
|
-
type: :development
|
63
|
-
prerelease: false
|
64
|
-
version_requirements: !ruby/object:Gem::Requirement
|
65
|
-
requirements:
|
66
|
-
- - "~>"
|
67
|
-
- !ruby/object:Gem::Version
|
68
|
-
version: 2.3.0
|
40
|
+
version: 1.0.2
|
69
41
|
- !ruby/object:Gem::Dependency
|
70
42
|
name: goodcop
|
71
43
|
requirement: !ruby/object:Gem::Requirement
|
72
44
|
requirements:
|
73
45
|
- - "~>"
|
74
46
|
- !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.4.0
|
83
|
-
- !ruby/object:Gem::Dependency
|
84
|
-
name: rake
|
85
|
-
requirement: !ruby/object:Gem::Requirement
|
86
|
-
requirements:
|
87
|
-
- - "~>"
|
88
|
-
- !ruby/object:Gem::Version
|
89
|
-
version: 12.3.0
|
90
|
-
type: :development
|
91
|
-
prerelease: false
|
92
|
-
version_requirements: !ruby/object:Gem::Requirement
|
93
|
-
requirements:
|
94
|
-
- - "~>"
|
95
|
-
- !ruby/object:Gem::Version
|
96
|
-
version: 12.3.0
|
97
|
-
- !ruby/object:Gem::Dependency
|
98
|
-
name: rspec
|
99
|
-
requirement: !ruby/object:Gem::Requirement
|
100
|
-
requirements:
|
101
|
-
- - "~>"
|
102
|
-
- !ruby/object:Gem::Version
|
103
|
-
version: 3.7.0
|
47
|
+
version: 0.9.7
|
104
48
|
type: :development
|
105
49
|
prerelease: false
|
106
50
|
version_requirements: !ruby/object:Gem::Requirement
|
107
51
|
requirements:
|
108
52
|
- - "~>"
|
109
53
|
- !ruby/object:Gem::Version
|
110
|
-
version:
|
111
|
-
- !ruby/object:Gem::Dependency
|
112
|
-
name: rubocop
|
113
|
-
requirement: !ruby/object:Gem::Requirement
|
114
|
-
requirements:
|
115
|
-
- - "~>"
|
116
|
-
- !ruby/object:Gem::Version
|
117
|
-
version: 0.54.0
|
118
|
-
type: :development
|
119
|
-
prerelease: false
|
120
|
-
version_requirements: !ruby/object:Gem::Requirement
|
121
|
-
requirements:
|
122
|
-
- - "~>"
|
123
|
-
- !ruby/object:Gem::Version
|
124
|
-
version: 0.54.0
|
54
|
+
version: 0.9.7
|
125
55
|
description: Simple wrapper for using Mac Keychain
|
126
56
|
email: me@lesaker.org
|
127
57
|
executables: []
|
128
58
|
extensions: []
|
129
59
|
extra_rdoc_files: []
|
130
60
|
files:
|
131
|
-
- ".
|
61
|
+
- ".github/exporter.sh"
|
62
|
+
- ".github/workflows/build.yml"
|
132
63
|
- ".gitignore"
|
133
|
-
- ".prospectus"
|
134
64
|
- ".rspec"
|
135
65
|
- ".rubocop.yml"
|
136
66
|
- Gemfile
|
137
67
|
- LICENSE
|
138
68
|
- README.md
|
139
69
|
- Rakefile
|
140
|
-
- circle.yml
|
141
70
|
- keylime.gemspec
|
142
71
|
- lib/keylime.rb
|
143
72
|
- lib/keylime/credential.rb
|
@@ -148,7 +77,8 @@ files:
|
|
148
77
|
homepage: https://github.com/akerl/keylime
|
149
78
|
licenses:
|
150
79
|
- MIT
|
151
|
-
metadata:
|
80
|
+
metadata:
|
81
|
+
rubygems_mfa_required: 'true'
|
152
82
|
post_install_message:
|
153
83
|
rdoc_options: []
|
154
84
|
require_paths:
|
@@ -157,20 +87,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
157
87
|
requirements:
|
158
88
|
- - ">="
|
159
89
|
- !ruby/object:Gem::Version
|
160
|
-
version: '
|
90
|
+
version: '2.6'
|
161
91
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
162
92
|
requirements:
|
163
93
|
- - ">="
|
164
94
|
- !ruby/object:Gem::Version
|
165
95
|
version: '0'
|
166
96
|
requirements: []
|
167
|
-
|
168
|
-
rubygems_version: 2.7.3
|
97
|
+
rubygems_version: 3.3.26
|
169
98
|
signing_key:
|
170
99
|
specification_version: 4
|
171
100
|
summary: Simple wrapper for using Mac Keychain
|
172
|
-
test_files:
|
173
|
-
- spec/keylime/credential_spec.rb
|
174
|
-
- spec/keylime_spec.rb
|
175
|
-
- spec/spec_helper.rb
|
176
|
-
- spec/stub/keychain.rb
|
101
|
+
test_files: []
|
data/.circle-ruby
DELETED
data/.prospectus
DELETED
@@ -1,25 +0,0 @@
|
|
1
|
-
Prospectus.extra_dep('file', 'prospectus_circleci')
|
2
|
-
|
3
|
-
my_slug = 'akerl/keylime'
|
4
|
-
|
5
|
-
item do
|
6
|
-
noop
|
7
|
-
|
8
|
-
deps do
|
9
|
-
item do
|
10
|
-
name 'gems'
|
11
|
-
|
12
|
-
expected do
|
13
|
-
static
|
14
|
-
set 'green'
|
15
|
-
end
|
16
|
-
|
17
|
-
actual do
|
18
|
-
gemnasium
|
19
|
-
slug my_slug
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|
23
|
-
|
24
|
-
extend ProspectusCircleci::Build.new(my_slug)
|
25
|
-
end
|
data/circle.yml
DELETED
@@ -1,7 +0,0 @@
|
|
1
|
-
dependencies:
|
2
|
-
override:
|
3
|
-
- 'for i in $(cat .circle-ruby) ; do rvm-exec $i gem update --system --no-doc || exit 1 ; done'
|
4
|
-
- 'for i in $(cat .circle-ruby) ; do rvm-exec $i bundle install || exit 1 ; done'
|
5
|
-
test:
|
6
|
-
override:
|
7
|
-
- 'for i in $(cat .circle-ruby) ; do rvm-exec $i bundle exec rake || exit 1 ; done'
|