itamae-plugin-recipe-lltsv 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: 684ffc6ae3a054506248c2840113e0d8d2a1dcb1eab9e4dd4adec709d514d8b2
4
+ data.tar.gz: 5c0a093753940312c5991de56a1b2bfc48044cace1a7c17b403b1363c0c92ad6
5
+ SHA512:
6
+ metadata.gz: d20dc7ee65c3951b5048987d83ce1d0dd4ae5bdf3554664bd5d1a230d483df6c6a8d93a73597a3ce002489982af9952414e5da11c1e376518cc7353f898d19d4
7
+ data.tar.gz: 5cf2eee7210448d59a59fb4138d6fcc5b76392f8f72bdbe33f2fb0b7c4d44cf3393a0c54eff7f96f91929edd9ccfb9aa00b92c27416cfd847c52414125c06894
data/.gitignore ADDED
@@ -0,0 +1,14 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /_yardoc/
4
+ /coverage/
5
+ /doc/
6
+ /pkg/
7
+ /spec/reports/
8
+ /tmp/
9
+
10
+ # rspec failure tracking
11
+ .rspec_status
12
+
13
+ Gemfile.lock
14
+ vendor/
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --format documentation
2
+ --color
3
+ --require spec_helper
data/.travis.yml ADDED
@@ -0,0 +1,20 @@
1
+ language: ruby
2
+ sudo: required
3
+ services:
4
+ - docker
5
+ rvm:
6
+ - 2.6
7
+ env:
8
+ - IMAGE=centos:7
9
+ - IMAGE=debian:jessie
10
+ bundler_args: "--jobs=4"
11
+ cache: bundler
12
+ before_install: gem install bundler -v 2.0.1
13
+ before_script:
14
+ - docker run --privileged -d --name container-with-service $IMAGE /sbin/init
15
+ script:
16
+ - bundle exec itamae docker --node-yaml=recipes/node.yml recipes/install.rb --container=container-with-service --tag itamae-plugin:latest
17
+ - DOCKER_CONTAINER=container-with-service bundle exec rspec
18
+ branches:
19
+ only:
20
+ - master
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source "https://rubygems.org"
2
+
3
+ # Specify your gem's dependencies in itamae-plugin-recipe-lltsv.gemspec
4
+ gemspec
data/LICENSE ADDED
@@ -0,0 +1,22 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2019 Takahiro Ooishi
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.
22
+
data/README.md ADDED
@@ -0,0 +1,56 @@
1
+ # Itamae::Plugin::Recipe::Lltsv
2
+
3
+ itamae recipe plugin for [lltsv](https://github.com/sonots/lltsv).
4
+
5
+ [![Gem Version](https://badge.fury.io/rb/itamae-plugin-recipe-lltsv.svg)](https://badge.fury.io/rb/itamae-plugin-recipe-lltsv)
6
+ [![Build Status](https://travis-ci.com/taka0125/itamae-plugin-recipe-lltsv.svg?branch=master)](https://travis-ci.com/taka0125/itamae-plugin-recipe-lltsv)
7
+
8
+ ## Installation
9
+
10
+ Add this line to your application's Gemfile:
11
+
12
+ ```ruby
13
+ gem 'itamae-plugin-recipe-lltsv'
14
+ ```
15
+
16
+ And then execute:
17
+
18
+ $ bundle
19
+
20
+ Or install it yourself as:
21
+
22
+ $ gem install itamae-plugin-recipe-lltsv
23
+
24
+
25
+ ## Testing
26
+
27
+ requirements [Docker](https://www.docker.com/)
28
+
29
+ - Build image
30
+
31
+
32
+ ```sh
33
+ bundle exec itamae docker --node-yaml=recipes/node.yml recipes/install.rb --image=centos:7 --tag itamae-plugin-recipe-lltsv:latest
34
+ ```
35
+
36
+ or
37
+
38
+ ```sh
39
+ bundle exec itamae docker --node-yaml=recipes/node.yml recipes/install.rb --image=debian:jessie --tag itamae-plugin-recipe-lltsv:latest
40
+ ```
41
+
42
+ - Run rspec
43
+
44
+ ```sh
45
+ DOCKER_IMAGE=itamae-plugin-recipe-lltsv:latest bundle exec rspec
46
+ ```
47
+
48
+ ## Development
49
+
50
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
51
+
52
+ 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 tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
53
+
54
+ ## Contributing
55
+
56
+ Bug reports and pull requests are welcome on GitHub at https://github.com/taka0125/itamae-plugin-recipe-lltsv.
data/Rakefile ADDED
@@ -0,0 +1,6 @@
1
+ require "bundler/gem_tasks"
2
+ require "rspec/core/rake_task"
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+
6
+ task :default => :spec
data/bin/console ADDED
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "itamae/plugin/recipe/lltsv"
5
+
6
+ # You can add fixtures and/or initialization code here to make experimenting
7
+ # with your gem easier. You can also use a different console, if you like.
8
+
9
+ # (If you use this, don't forget to add pry to your Gemfile!)
10
+ # require "pry"
11
+ # Pry.start
12
+
13
+ require "irb"
14
+ 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,33 @@
1
+
2
+ lib = File.expand_path("../lib", __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require "itamae/plugin/recipe/lltsv/version"
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "itamae-plugin-recipe-lltsv"
8
+ spec.version = Itamae::Plugin::Recipe::Lltsv::VERSION
9
+ spec.authors = ["Takahiro Ooishi"]
10
+ spec.email = ["taka0125@gmail.com"]
11
+
12
+ spec.summary = %q{itamae recipe plugin for lltsv.}
13
+ spec.description = spec.summary
14
+ spec.homepage = "https://github.com/taka0125/itamae-plugin-recipe-lltsv"
15
+
16
+ # Specify which files should be added to the gem when it is released.
17
+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
18
+ spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
19
+ `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
20
+ end
21
+ spec.bindir = "exe"
22
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
23
+ spec.require_paths = ["lib"]
24
+
25
+ spec.add_dependency "itamae"
26
+
27
+ spec.add_development_dependency "bundler", "~> 2.0"
28
+ spec.add_development_dependency "rake", "~> 10.0"
29
+ spec.add_development_dependency "rspec", "~> 3.0"
30
+
31
+ spec.add_development_dependency "docker-api"
32
+ spec.add_development_dependency "serverspec"
33
+ end
@@ -0,0 +1,12 @@
1
+ require "itamae/plugin/recipe/lltsv/version"
2
+
3
+ module Itamae
4
+ module Plugin
5
+ module Recipe
6
+ module Lltsv
7
+ class Error < StandardError; end
8
+ # Your code goes here...
9
+ end
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,4 @@
1
+ node[:lltsv] ||= {}
2
+ node[:lltsv][:version] ||= '0.6.1'
3
+ node[:lltsv][:arch] ||= 'linux_amd64'
4
+ node[:lltsv][:install_path] ||= '/usr/local/bin'
@@ -0,0 +1,12 @@
1
+ include_recipe 'lltsv::attributes'
2
+
3
+ execute 'install lltsv' do
4
+ command <<-EOC
5
+ rm -f /tmp/lltsv && \
6
+ curl https://github.com/sonots/lltsv/releases/download/v#{node[:lltsv][:version]}/lltsv_#{node[:lltsv][:arch]} -o /tmp/lltsv && \
7
+ chmod a+x /tmp/lltsv && \
8
+ mv /tmp/lltsv #{node[:lltsv][:install_path]}/lltsv
9
+ EOC
10
+
11
+ not_if "lltsv --version 2>/dev/null | grep -w 'lltsv version #{node[:lltsv][:version]}'"
12
+ end
@@ -0,0 +1,9 @@
1
+ module Itamae
2
+ module Plugin
3
+ module Recipe
4
+ module Lltsv
5
+ VERSION = "0.1.0"
6
+ end
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,8 @@
1
+ case node[:platform]
2
+ when "debian", "ubuntu"
3
+ execute "apt-get update"
4
+ end
5
+
6
+ package 'curl'
7
+
8
+ include_recipe "lltsv"
data/recipes/node.yml ADDED
@@ -0,0 +1,4 @@
1
+ lltsv:
2
+ version: 0.6.1
3
+ arch: linux_amd64
4
+ install_path: /usr/local/bin
metadata ADDED
@@ -0,0 +1,142 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: itamae-plugin-recipe-lltsv
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Takahiro Ooishi
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2019-05-24 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: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: bundler
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '2.0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '2.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rake
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '10.0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '10.0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rspec
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '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: '3.0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: docker-api
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !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'
83
+ - !ruby/object:Gem::Dependency
84
+ name: serverspec
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ description: itamae recipe plugin for lltsv.
98
+ email:
99
+ - taka0125@gmail.com
100
+ executables: []
101
+ extensions: []
102
+ extra_rdoc_files: []
103
+ files:
104
+ - ".gitignore"
105
+ - ".rspec"
106
+ - ".travis.yml"
107
+ - Gemfile
108
+ - LICENSE
109
+ - README.md
110
+ - Rakefile
111
+ - bin/console
112
+ - bin/setup
113
+ - itamae-plugin-recipe-lltsv.gemspec
114
+ - lib/itamae/plugin/recipe/lltsv.rb
115
+ - lib/itamae/plugin/recipe/lltsv/attributes.rb
116
+ - lib/itamae/plugin/recipe/lltsv/default.rb
117
+ - lib/itamae/plugin/recipe/lltsv/version.rb
118
+ - recipes/install.rb
119
+ - recipes/node.yml
120
+ homepage: https://github.com/taka0125/itamae-plugin-recipe-lltsv
121
+ licenses: []
122
+ metadata: {}
123
+ post_install_message:
124
+ rdoc_options: []
125
+ require_paths:
126
+ - lib
127
+ required_ruby_version: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - ">="
130
+ - !ruby/object:Gem::Version
131
+ version: '0'
132
+ required_rubygems_version: !ruby/object:Gem::Requirement
133
+ requirements:
134
+ - - ">="
135
+ - !ruby/object:Gem::Version
136
+ version: '0'
137
+ requirements: []
138
+ rubygems_version: 3.0.3
139
+ signing_key:
140
+ specification_version: 4
141
+ summary: itamae recipe plugin for lltsv.
142
+ test_files: []