itamae-plugin-resource-pip 1.1.0 → 1.1.1
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 +4 -4
- data/.github/workflows/ci.yml +24 -0
- data/itamae-plugin-resource-pip.gemspec +2 -2
- data/lib/itamae/plugin/resource/pip.rb +11 -3
- data/manifest.scm +1 -0
- metadata +6 -8
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8a250de02caaf7daf33b92f88076e553bafbe74e6456ef914dc454673871ca6d
|
|
4
|
+
data.tar.gz: 115d1208995fe916a229225d8781374beafc503e6fc92fba61bc885928835b36
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 127b3abf84d251e8872fce78170af70c316cef5f0180383bff4e1efe6b6a6fd83df47263d4e19883f71e1d18e2cb2c6b098914e223ce898d7b13104878e1a46a
|
|
7
|
+
data.tar.gz: c1edb4cffcebceffcef490109ae9408c7587acd442d9b5478d7ca157a5050c8b8b53b1bbee190f4f64a9e171084f57c584e5c7170884f7d444f5ef246fa43b18
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
'on':
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- master
|
|
7
|
+
- main
|
|
8
|
+
pull_request:
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
test:
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
strategy:
|
|
14
|
+
fail-fast: false
|
|
15
|
+
matrix:
|
|
16
|
+
ruby-version:
|
|
17
|
+
- '3.1'
|
|
18
|
+
steps:
|
|
19
|
+
- uses: actions/checkout@v4
|
|
20
|
+
- uses: ruby/setup-ruby@v1
|
|
21
|
+
with:
|
|
22
|
+
ruby-version: ${{ matrix.ruby-version }}
|
|
23
|
+
bundler-cache: true
|
|
24
|
+
- run: bundle exec rake
|
|
@@ -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-pip"
|
|
7
|
-
spec.version = "1.1.
|
|
7
|
+
spec.version = "1.1.1"
|
|
8
8
|
spec.authors = ["MATSUMOTO, Katsuyoshi"]
|
|
9
9
|
spec.email = ["github@katsyoshi.org"]
|
|
10
10
|
|
|
@@ -22,5 +22,5 @@ Gem::Specification.new do |spec|
|
|
|
22
22
|
|
|
23
23
|
spec.add_development_dependency "bundler"
|
|
24
24
|
spec.add_development_dependency "rake"
|
|
25
|
-
spec.add_development_dependency "
|
|
25
|
+
spec.add_development_dependency "rspec"
|
|
26
26
|
end
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
require 'itamae/resource/base'
|
|
2
|
+
require 'strscan'
|
|
2
3
|
|
|
3
4
|
module Itamae
|
|
4
5
|
module Plugin
|
|
@@ -7,7 +8,7 @@ module Itamae
|
|
|
7
8
|
define_attribute :action, default: :install
|
|
8
9
|
define_attribute :pip_binary, type: [String, Array], default: ['pip', '--disable-pip-version-check']
|
|
9
10
|
define_attribute :package_name, type: String, default_name: true
|
|
10
|
-
define_attribute :options, type: [String, Array], default:
|
|
11
|
+
define_attribute :options, type: [String, Array], default: false
|
|
11
12
|
define_attribute :version, type: String, default: false
|
|
12
13
|
|
|
13
14
|
def pre_action
|
|
@@ -57,8 +58,15 @@ module Itamae
|
|
|
57
58
|
def installed_pips
|
|
58
59
|
pips = []
|
|
59
60
|
run_command([*Array(attributes.pip_binary), 'freeze']).stdout.each_line do |line|
|
|
60
|
-
|
|
61
|
-
|
|
61
|
+
scanner = StringScanner.new(line)
|
|
62
|
+
pip = { name: scanner.scan(/[^= ]+/) }
|
|
63
|
+
if scanner.skip('==')
|
|
64
|
+
pip[:version] = scanner.rest.chomp
|
|
65
|
+
elsif scanner.skip(' @ file://') # nop
|
|
66
|
+
else
|
|
67
|
+
raise "unknown package format #{line}"
|
|
68
|
+
end
|
|
69
|
+
pips << pip
|
|
62
70
|
end
|
|
63
71
|
pips
|
|
64
72
|
rescue Backend::CommandExecutionError
|
data/manifest.scm
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(specifications->manifest (list "python@3" "python-mkdocs" "ruby@3.1" "ruby-rspec" "itamae"))
|
metadata
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: itamae-plugin-resource-pip
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.1.
|
|
4
|
+
version: 1.1.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- MATSUMOTO, Katsuyoshi
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: exe
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
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:
|
|
55
|
+
name: rspec
|
|
57
56
|
requirement: !ruby/object:Gem::Requirement
|
|
58
57
|
requirements:
|
|
59
58
|
- - ">="
|
|
@@ -73,6 +72,7 @@ executables: []
|
|
|
73
72
|
extensions: []
|
|
74
73
|
extra_rdoc_files: []
|
|
75
74
|
files:
|
|
75
|
+
- ".github/workflows/ci.yml"
|
|
76
76
|
- ".gitignore"
|
|
77
77
|
- ".rspec"
|
|
78
78
|
- ".travis.yml"
|
|
@@ -83,6 +83,7 @@ files:
|
|
|
83
83
|
- Rakefile
|
|
84
84
|
- itamae-plugin-resource-pip.gemspec
|
|
85
85
|
- lib/itamae/plugin/resource/pip.rb
|
|
86
|
+
- manifest.scm
|
|
86
87
|
- mrblib/itamae/plugin/resource/pip.rb
|
|
87
88
|
- mrblib/itamae/plugin/resource_executor/pip.rb
|
|
88
89
|
- samples/recipe.rb
|
|
@@ -90,7 +91,6 @@ homepage: https://github.com/katsyoshi/itamae-plugin-resource-pip
|
|
|
90
91
|
licenses:
|
|
91
92
|
- MIT
|
|
92
93
|
metadata: {}
|
|
93
|
-
post_install_message:
|
|
94
94
|
rdoc_options: []
|
|
95
95
|
require_paths:
|
|
96
96
|
- lib
|
|
@@ -105,9 +105,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
105
105
|
- !ruby/object:Gem::Version
|
|
106
106
|
version: '0'
|
|
107
107
|
requirements: []
|
|
108
|
-
|
|
109
|
-
rubygems_version: 2.7.6
|
|
110
|
-
signing_key:
|
|
108
|
+
rubygems_version: 4.0.6
|
|
111
109
|
specification_version: 4
|
|
112
110
|
summary: itamae plugin resource pip
|
|
113
111
|
test_files: []
|