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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0a21114a6aa5f7156a2e35579e1403489f4a9c0b2b4d7444ef5a0479fb5cf4dd
4
- data.tar.gz: c2c3eb6b3c5dccc744d160e7ebd3a3e9115aacd08a84e690c288e833a365e59d
3
+ metadata.gz: c0b964641e6048faf56bf4886b691066d3122a82e81a425245c07e7b9c084619
4
+ data.tar.gz: 938b6e4a89c4c6fbcf8e3965b690a141a116bd825388c4a408fcbae0dc5658be
5
5
  SHA512:
6
- metadata.gz: 41f817258287dd2d1e2f5d9f4fcd1292b47aeca9e66eff4e5ec0269be281851cd960627387dd16e66bdef2dddeb2b12fa359154beec3adbc5207e8b357dab9af
7
- data.tar.gz: 6987ae38b09ee19ede33a889ed025bb136aa97b61f1cb4aefc182a317737f5ac243882db05d6a305fa637669ed864a94390670c73a6c4904143b5a5a58cf7a47
6
+ metadata.gz: c2e557a73a9b273f87f78d6163a927ad8a400a09da0f3c678e921d59dbe7454f027c53d4c3adef9682f1013b91dd8876c8bbc9874a1392ea6e936aca9c90c6db
7
+ data.tar.gz: 5c88423ef0f6c1f7c74aedaafb2a6d988a450c14fa99e74dc5054b2e6188f99e74c67cd6a76b4219e78374d9e2ed871a0a6ce4657de6a550e15ce344558eda1b
@@ -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
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2016 Les Aker
3
+ Copyright (c) 2022 Les Aker
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
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
- [![Dependency Status](https://img.shields.io/gemnasium/akerl/keylime.svg)](https://gemnasium.com/akerl/keylime)
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.2.1'
4
- s.date = Time.now.strftime('%Y-%m-%d')
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.3.0'
17
- s.add_dependency 'userinput', '~> 1.0.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 'codecov', '~> 0.1.1'
20
- s.add_development_dependency 'fuubar', '~> 2.3.0'
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
@@ -6,7 +6,7 @@ module Keylime
6
6
  require 'keychain'
7
7
  true
8
8
  rescue LoadError
9
- raise if RUBY_PLATFORM =~ /darwin/
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.map { |k, v| [k.to_s, v] }.to_h
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(STDIN).to receive(:gets) { "#{secret}\n" }
40
- expect(STDOUT).to receive(:print).with('Question? ')
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'
@@ -50,7 +50,7 @@ module Keychain
50
50
  end
51
51
 
52
52
  def create(params)
53
- struct = OpenStruct.new(params)
53
+ struct = OpenStruct.new(params) # rubocop:disable Style/OpenStructUse
54
54
  struct.keychain = @keychain
55
55
  cache << struct
56
56
  struct
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.2.1
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: 2018-03-24 00:00:00.000000000 Z
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.3.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.3.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.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.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.4.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: 3.7.0
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
- - ".circle-ruby"
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: '0'
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
- rubyforge_project:
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
@@ -1,4 +0,0 @@
1
- 2.5.0
2
- 2.4.3
3
- 2.3.6
4
- 2.2.9
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'