itamae-plugin-recipe-conftest 0.1.0

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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: acdacca7f4e551321fbc6e23b2b0157f513c7da638e97c69c2cefa5034577deb
4
+ data.tar.gz: f44fc96484934dbdbe57fc7c9159b1afba97a6e34bf98149af8685d59dc8f3fa
5
+ SHA512:
6
+ metadata.gz: 54b20a93fa2c51ede33217645cca47d58fa2006088632fdbdc21264e079edd273ca658bca43095e3c8444d733d2e534a24f15c91bce76645cfef618abb817041
7
+ data.tar.gz: 93f7549e90c25ee404c3ff6b87ffee5dc92481b7eb88e5e758de5a774604f3a1695b7c536e59b2b612b259a5eba862d18429d935bb1649d56312f9979d195122
data/.gitignore ADDED
@@ -0,0 +1,56 @@
1
+ *.gem
2
+ *.rbc
3
+ /.config
4
+ /coverage/
5
+ /InstalledFiles
6
+ /pkg/
7
+ /spec/reports/
8
+ /spec/examples.txt
9
+ /test/tmp/
10
+ /test/version_tmp/
11
+ /tmp/
12
+
13
+ # Used by dotenv library to load environment variables.
14
+ # .env
15
+
16
+ # Ignore Byebug command history file.
17
+ .byebug_history
18
+
19
+ ## Specific to RubyMotion:
20
+ .dat*
21
+ .repl_history
22
+ build/
23
+ *.bridgesupport
24
+ build-iPhoneOS/
25
+ build-iPhoneSimulator/
26
+
27
+ ## Specific to RubyMotion (use of CocoaPods):
28
+ #
29
+ # We recommend against adding the Pods directory to your .gitignore. However
30
+ # you should judge for yourself, the pros and cons are mentioned at:
31
+ # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
32
+ #
33
+ # vendor/Pods/
34
+
35
+ ## Documentation cache and generated files:
36
+ /.yardoc/
37
+ /_yardoc/
38
+ /doc/
39
+ /rdoc/
40
+
41
+ ## Environment normalization:
42
+ /.bundle/
43
+ /vendor/bundle
44
+ /lib/bundler/man/
45
+
46
+ # for a library or gem, you might want to ignore these files since the code is
47
+ # intended to run in multiple environments; otherwise, check them in:
48
+ # Gemfile.lock
49
+ # .ruby-version
50
+ # .ruby-gemset
51
+
52
+ # unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
53
+ .rvmrc
54
+
55
+ # Used by RuboCop. Remote config files pulled in from inherit_from directive.
56
+ # .rubocop-https?--*
data/.project ADDED
@@ -0,0 +1,11 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <projectDescription>
3
+ <name>itamae-plugin-recipe-conftest</name>
4
+ <comment></comment>
5
+ <projects>
6
+ </projects>
7
+ <buildSpec>
8
+ </buildSpec>
9
+ <natures>
10
+ </natures>
11
+ </projectDescription>
data/Gemfile ADDED
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ source "https://rubygems.org"
4
+
5
+ # Specify your gem's dependencies in itamae-plugin-recipe-conftest.gemspec
6
+ gemspec
7
+
8
+ gem "rake", "~> 13.0"
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2021 maedadev
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,37 @@
1
+ # Itamae::Plugin::Recipe::Conftest
2
+
3
+ itamae recipe for conftest
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ ```ruby
10
+ gem 'itamae-plugin-recipe-conftest'
11
+ ```
12
+
13
+ And then execute:
14
+
15
+ $ bundle install
16
+
17
+ Or install it yourself as:
18
+
19
+ $ gem install itamae-plugin-recipe-conftest
20
+
21
+ ## Usage
22
+
23
+ Include this recpie as:
24
+
25
+ include_recipe 'conftest'
26
+
27
+ This recipe installs conftest as /usr/local/bin/conftest.
28
+
29
+ ## Development
30
+
31
+ After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
32
+
33
+ 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`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
34
+
35
+ ## Contributing
36
+
37
+ Bug reports and pull requests are welcome on GitHub at https://github.com/maedadev/itamae-plugin-recipe-conftest.
data/Rakefile ADDED
@@ -0,0 +1,4 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "bundler/gem_tasks"
4
+ task default: %i[]
data/bin/console ADDED
@@ -0,0 +1,15 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ require "bundler/setup"
5
+ require "itamae/plugin/recipe/conftest"
6
+
7
+ # You can add fixtures and/or initialization code here to make experimenting
8
+ # with your gem easier. You can also use a different console, if you like.
9
+
10
+ # (If you use this, don't forget to add pry to your Gemfile!)
11
+ # require "pry"
12
+ # Pry.start
13
+
14
+ require "irb"
15
+ IRB.start(__FILE__)
data/bin/setup ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
@@ -0,0 +1,30 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "lib/itamae/plugin/recipe/conftest/version"
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = "itamae-plugin-recipe-conftest"
7
+ spec.version = Itamae::Plugin::Recipe::Conftest::VERSION
8
+ spec.authors = ["ichylinux"]
9
+ spec.email = ["ichylinux@gmail.com"]
10
+
11
+ spec.summary = %q{itamae recipe for conftest installation}
12
+ spec.description = %q{itamae recipe for conftest installation}
13
+ spec.homepage = "https://github.com/maedadev/itamae-plugin-recipe-conftest"
14
+ spec.license = "MIT"
15
+ spec.required_ruby_version = ">= 2.5.0"
16
+
17
+ spec.metadata["homepage_uri"] = spec.homepage
18
+ spec.metadata["source_code_uri"] = spec.homepage
19
+
20
+ # Specify which files should be added to the gem when it is released.
21
+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
22
+ spec.files = Dir.chdir(File.expand_path(__dir__)) do
23
+ `git ls-files -z`.split("\x0").reject { |f| f.match(%r{\A(?:test|spec|features)/}) }
24
+ end
25
+ spec.bindir = "exe"
26
+ spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
27
+ spec.require_paths = ["lib"]
28
+
29
+ spec.add_dependency 'itamae', '~> 1.10', '>= 1.10.4'
30
+ end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "conftest/version"
4
+
5
+ include_recipe './conftest/install.rb'
@@ -0,0 +1,20 @@
1
+ version = ENV['CONFTEST_VERSION'] || Itamae::Plugin::Recipe::Conftest::CONFTEST_VERSION
2
+
3
+ execute "download conftest v#{version}" do
4
+ cwd '/tmp'
5
+ command <<-EOF
6
+ rm -f conftest_#{version}_Linux_x86_64.tar.gz
7
+ wget https://github.com/open-policy-agent/conftest/releases/download/v#{version}/conftest_#{version}_Linux_x86_64.tar.gz
8
+ EOF
9
+ not_if "test -e /usr/local/bin/conftest && /usr/local/bin/conftest -v | egrep '.* #{version}$'"
10
+ end
11
+
12
+ execute "install conftest v#{version}" do
13
+ cwd '/tmp'
14
+ command <<-EOF
15
+ rm -f conftest
16
+ tar xzf conftest_#{version}_Linux_x86_64.tar.gz
17
+ sudo mv -f conftest /usr/local/bin/
18
+ EOF
19
+ not_if "test -e /usr/local/bin/conftest && /usr/local/bin/conftest -v | egrep '.* #{version}$'"
20
+ end
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Itamae
4
+ module Plugin
5
+ module Recipe
6
+ module Conftest
7
+ VERSION = "0.1.0"
8
+
9
+ CONFTEST_VERSION = [
10
+ CONFTEST_VERSION_MAJOR = '0',
11
+ CONFTEST_VERSION_MINOR = '25',
12
+ CONFTEST_VERSION_REVISION = '0'
13
+ ].join('.')
14
+ end
15
+ end
16
+ end
17
+ end
metadata ADDED
@@ -0,0 +1,77 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: itamae-plugin-recipe-conftest
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - ichylinux
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2021-08-01 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: itamae
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.10'
20
+ - - ">="
21
+ - !ruby/object:Gem::Version
22
+ version: 1.10.4
23
+ type: :runtime
24
+ prerelease: false
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ requirements:
27
+ - - "~>"
28
+ - !ruby/object:Gem::Version
29
+ version: '1.10'
30
+ - - ">="
31
+ - !ruby/object:Gem::Version
32
+ version: 1.10.4
33
+ description: itamae recipe for conftest installation
34
+ email:
35
+ - ichylinux@gmail.com
36
+ executables: []
37
+ extensions: []
38
+ extra_rdoc_files: []
39
+ files:
40
+ - ".gitignore"
41
+ - ".project"
42
+ - Gemfile
43
+ - LICENSE
44
+ - README.md
45
+ - Rakefile
46
+ - bin/console
47
+ - bin/setup
48
+ - itamae-plugin-recipe-conftest.gemspec
49
+ - lib/itamae/plugin/recipe/conftest.rb
50
+ - lib/itamae/plugin/recipe/conftest/install.rb
51
+ - lib/itamae/plugin/recipe/conftest/version.rb
52
+ homepage: https://github.com/maedadev/itamae-plugin-recipe-conftest
53
+ licenses:
54
+ - MIT
55
+ metadata:
56
+ homepage_uri: https://github.com/maedadev/itamae-plugin-recipe-conftest
57
+ source_code_uri: https://github.com/maedadev/itamae-plugin-recipe-conftest
58
+ post_install_message:
59
+ rdoc_options: []
60
+ require_paths:
61
+ - lib
62
+ required_ruby_version: !ruby/object:Gem::Requirement
63
+ requirements:
64
+ - - ">="
65
+ - !ruby/object:Gem::Version
66
+ version: 2.5.0
67
+ required_rubygems_version: !ruby/object:Gem::Requirement
68
+ requirements:
69
+ - - ">="
70
+ - !ruby/object:Gem::Version
71
+ version: '0'
72
+ requirements: []
73
+ rubygems_version: 3.2.21
74
+ signing_key:
75
+ specification_version: 4
76
+ summary: itamae recipe for conftest installation
77
+ test_files: []