itamae-plugin-recipe-h2o 0.0.2

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.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: d8c8274b54449b825bac6acba24578c6bdba85e2
4
+ data.tar.gz: b3d927f4362df0f3660ee64683f71479b27a264b
5
+ SHA512:
6
+ metadata.gz: e34be213ccdf30b31642a71be9260f6ce20496aa2419443fc1ec08a8f2cbb0102d866d6999ffce4d0cb4950296a68375ed5c041987c600d753f9b3efb9e6380e
7
+ data.tar.gz: a800c5d7ee2463298c5328208f3fa835fe816ceb871bf0ae978b5893dbd02149940ac886443d4db5938c78a77ec1d54dd37ef3dea0f3f463cf5c042dea441c42
@@ -0,0 +1,113 @@
1
+ ### https://raw.github.com/github/gitignore/9779d87d3d81ffacd90ae2470e7b3ffe566ffc71/Ruby.gitignore
2
+
3
+ *.gem
4
+ *.rbc
5
+ /.config
6
+ /coverage/
7
+ /InstalledFiles
8
+ /pkg/
9
+ /spec/reports/
10
+ /spec/examples.txt
11
+ /test/tmp/
12
+ /test/version_tmp/
13
+ /tmp/
14
+
15
+ # Used by dotenv library to load environment variables.
16
+ # .env
17
+
18
+ ## Specific to RubyMotion:
19
+ .dat*
20
+ .repl_history
21
+ build/
22
+ *.bridgesupport
23
+ build-iPhoneOS/
24
+ build-iPhoneSimulator/
25
+
26
+ ## Specific to RubyMotion (use of CocoaPods):
27
+ #
28
+ # We recommend against adding the Pods directory to your .gitignore. However
29
+ # you should judge for yourself, the pros and cons are mentioned at:
30
+ # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
31
+ #
32
+ # vendor/Pods/
33
+
34
+ ## Documentation cache and generated files:
35
+ /.yardoc/
36
+ /_yardoc/
37
+ /doc/
38
+ /rdoc/
39
+
40
+ ## Environment normalization:
41
+ /.bundle/
42
+ /vendor/bundle
43
+ /lib/bundler/man/
44
+
45
+ # for a library or gem, you might want to ignore these files since the code is
46
+ # intended to run in multiple environments; otherwise, check them in:
47
+ /Gemfile.lock
48
+ # .ruby-version
49
+ # .ruby-gemset
50
+
51
+ # unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
52
+ .rvmrc
53
+
54
+
55
+ ### https://raw.github.com/github/gitignore/9779d87d3d81ffacd90ae2470e7b3ffe566ffc71/Global/Emacs.gitignore
56
+
57
+ # -*- mode: gitignore; -*-
58
+ *~
59
+ \#*\#
60
+ /.emacs.desktop
61
+ /.emacs.desktop.lock
62
+ *.elc
63
+ auto-save-list
64
+ tramp
65
+ .\#*
66
+
67
+ # Org-mode
68
+ .org-id-locations
69
+ *_archive
70
+
71
+ # flymake-mode
72
+ *_flymake.*
73
+
74
+ # eshell files
75
+ /eshell/history
76
+ /eshell/lastdir
77
+
78
+ # elpa packages
79
+ /elpa/
80
+
81
+ # reftex files
82
+ *.rel
83
+
84
+ # AUCTeX auto folder
85
+ /auto/
86
+
87
+ # cask packages
88
+ .cask/
89
+ dist/
90
+
91
+ # Flycheck
92
+ flycheck_*.el
93
+
94
+ # server auth directory
95
+ /server/
96
+
97
+ # projectiles files
98
+ .projectile
99
+
100
+ ### https://raw.github.com/github/gitignore/9779d87d3d81ffacd90ae2470e7b3ffe566ffc71/Global/Vim.gitignore
101
+
102
+ # swap
103
+ [._]*.s[a-w][a-z]
104
+ [._]s[a-w][a-z]
105
+ # session
106
+ Session.vim
107
+ # temporary
108
+ .netrwhist
109
+ *~
110
+ # auto-generated tag files
111
+ tags
112
+
113
+
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --format documentation
2
+ --color
@@ -0,0 +1,4 @@
1
+ language: ruby
2
+ rvm:
3
+ - 2.3.0
4
+ before_install: gem install bundler -v 1.11.2
@@ -0,0 +1,49 @@
1
+ # Contributor Code of Conduct
2
+
3
+ As contributors and maintainers of this project, and in the interest of
4
+ fostering an open and welcoming community, we pledge to respect all people who
5
+ contribute through reporting issues, posting feature requests, updating
6
+ documentation, submitting pull requests or patches, and other activities.
7
+
8
+ We are committed to making participation in this project a harassment-free
9
+ experience for everyone, regardless of level of experience, gender, gender
10
+ identity and expression, sexual orientation, disability, personal appearance,
11
+ body size, race, ethnicity, age, religion, or nationality.
12
+
13
+ Examples of unacceptable behavior by participants include:
14
+
15
+ * The use of sexualized language or imagery
16
+ * Personal attacks
17
+ * Trolling or insulting/derogatory comments
18
+ * Public or private harassment
19
+ * Publishing other's private information, such as physical or electronic
20
+ addresses, without explicit permission
21
+ * Other unethical or unprofessional conduct
22
+
23
+ Project maintainers have the right and responsibility to remove, edit, or
24
+ reject comments, commits, code, wiki edits, issues, and other contributions
25
+ that are not aligned to this Code of Conduct, or to ban temporarily or
26
+ permanently any contributor for other behaviors that they deem inappropriate,
27
+ threatening, offensive, or harmful.
28
+
29
+ By adopting this Code of Conduct, project maintainers commit themselves to
30
+ fairly and consistently applying these principles to every aspect of managing
31
+ this project. Project maintainers who do not follow or enforce the Code of
32
+ Conduct may be permanently removed from the project team.
33
+
34
+ This code of conduct applies both within project spaces and in public spaces
35
+ when an individual is representing the project or its community.
36
+
37
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
38
+ reported by contacting a project maintainer at sugryo1109@gmail.com. All
39
+ complaints will be reviewed and investigated and will result in a response that
40
+ is deemed necessary and appropriate to the circumstances. Maintainers are
41
+ obligated to maintain confidentiality with regard to the reporter of an
42
+ incident.
43
+
44
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage],
45
+ version 1.3.0, available at
46
+ [http://contributor-covenant.org/version/1/3/0/][version]
47
+
48
+ [homepage]: http://contributor-covenant.org
49
+ [version]: http://contributor-covenant.org/version/1/3/0/
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in itamae-plugin-recipe-h2o.gemspec
4
+ gemspec
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2016 Ryo Sugimoto
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
13
+ all 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
21
+ THE SOFTWARE.
@@ -0,0 +1,55 @@
1
+ # Itamae::Plugin::Recipe::H2o
2
+
3
+ [Itamae](https://github.com/ryotarai/itamae) plugin to install [H2O](https://h2o.examp1e.net)
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ ```ruby
10
+ gem 'itamae-plugin-recipe-h2o'
11
+ ```
12
+
13
+ And then execute:
14
+
15
+ $ bundle
16
+
17
+ Or install it yourself as:
18
+
19
+ $ gem install itamae-plugin-recipe-h2o
20
+
21
+ ## Usage
22
+ ## System wide installation
23
+
24
+ Install H2O to /usr/local
25
+
26
+ ### Recipe
27
+
28
+ ```ruby
29
+ # your recipe
30
+ include_recipe "h2o::install"
31
+ ```
32
+
33
+ ### Node
34
+
35
+ Use this with `itamae -y node.yml`
36
+
37
+ ```yaml
38
+ # node.yml
39
+ h2o:
40
+ version: 2.0.0
41
+
42
+ # H2O install dir, optional (default: /usr/local)
43
+ h2o_root: "/path/to/h2o"
44
+
45
+ # `on` if H2O use bundled LibreSSL.
46
+ bundled_ssl: on
47
+
48
+ # `on` if H2O use mruby.
49
+ mruby: on
50
+ ```
51
+
52
+ ## License
53
+
54
+ The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
55
+
@@ -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
@@ -0,0 +1,26 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'itamae/plugin/recipe/h2o/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "itamae-plugin-recipe-h2o"
8
+ spec.version = Itamae::Plugin::Recipe::H2o::VERSION
9
+ spec.authors = ["Ryo Sugimoto"]
10
+ spec.email = ["sugryo1109@gmail.com"]
11
+
12
+ spec.summary = %q{Itamae plugin to install h2o}
13
+ spec.description = %q{Itamae plugin to install h2o}
14
+ spec.homepage = "https://github.com/sugryo/itamae-plugin-recipe-h2o"
15
+ spec.license = "MIT"
16
+
17
+ spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
18
+ spec.bindir = "exe"
19
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
20
+ spec.require_paths = ["lib"]
21
+
22
+ spec.add_dependency "itamae", "~> 1.2"
23
+
24
+ spec.add_development_dependency "bundler", "~> 1.11"
25
+ spec.add_development_dependency "rake", "~> 10.0"
26
+ end
@@ -0,0 +1 @@
1
+ require "itamae/plugin/recipe/h2o"
@@ -0,0 +1,11 @@
1
+ require "itamae/plugin/recipe/h2o/version"
2
+
3
+ module Itamae
4
+ module Plugin
5
+ module Recipe
6
+ module H2o
7
+ # Your code goes here...
8
+ end
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,17 @@
1
+ # cf) https://h2o.examp1e.net/install.html
2
+ case node[:platform]
3
+ when 'debian', 'ubuntu', 'mint'
4
+ package 'wget'
5
+ package 'cmake'
6
+ if node[:h2o][:mruby]
7
+ package 'bison'
8
+ package 'ruby-dev'
9
+ end
10
+ else
11
+ package 'wget'
12
+ package 'cmake'
13
+ if node[:h2o][:mruby]
14
+ package 'bison'
15
+ package 'ruby'
16
+ end
17
+ end
@@ -0,0 +1,56 @@
1
+ include_recipe 'h2o::dependency'
2
+
3
+ version = node[:h2o][:version]
4
+
5
+ execute 'Download a H2O' do
6
+ command "wget https://github.com/h2o/h2o/archive/v#{version}.tar.gz"
7
+ cwd "/tmp"
8
+ not_if "test -e /tmp/v#{version}.tar.gz"
9
+ end
10
+
11
+ execute 'Unzip Tar file' do
12
+ command "tar xzvf v#{version}.tar.gz"
13
+ cwd "/tmp"
14
+ not_if "test -e /tmp/h2o-#{version}"
15
+ end
16
+
17
+ execute 'Cmake a h2o' do
18
+ options = []
19
+ if node[:h2o][:bundled_ssl]
20
+ options << ' -DWITH_BUNDLED_SSL=on'
21
+ else
22
+ options << ' -DWITH_BUNDLED_SSL=off'
23
+ end
24
+ # Default: off if OpenSSL version >= 1.0.2 is found, on if otherwise.
25
+
26
+ if node[:h2o][:mruby]
27
+ options << ' -DWITH_MRUBY=on'
28
+ else
29
+ options << ' -DWITH_MRUBY=off'
30
+ end
31
+ # Default: on if bison, ruby and development files is found, off if otherwise.
32
+
33
+ install_prefix ||= node[:h2o][:install_prefix]
34
+ options << " -DCMAKE_INSTALL_PREFIX=#{install_prefix}" if install_prefix
35
+
36
+
37
+ command "cmake#{options.join} ."
38
+ cwd "/tmp/h2o-#{version}"
39
+ only_if "test -e /tmp/h2o-#{version}"
40
+ end
41
+
42
+ execute 'Make a h2o' do
43
+ if node[:platform] == 'osx' && node[:platform] == 'darwin'
44
+ command "make -j$(/usr/sbin/sysctl -n hw.ncpu)"
45
+ else
46
+ command "make -j$(grep '^processor' /proc/cpuinfo | wc -l)"
47
+ end
48
+ cwd "/tmp/h2o-#{version}"
49
+ only_if "test -e /tmp/h2o-#{version}"
50
+ end
51
+
52
+ execute 'Install a h2o' do
53
+ command 'sudo make install'
54
+ cwd "/tmp/h2o-#{version}"
55
+ only_if "test -e /tmp/h2o-#{version}"
56
+ end
@@ -0,0 +1,9 @@
1
+ module Itamae
2
+ module Plugin
3
+ module Recipe
4
+ module H2o
5
+ VERSION = "0.0.2"
6
+ end
7
+ end
8
+ end
9
+ end
metadata ADDED
@@ -0,0 +1,100 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: itamae-plugin-recipe-h2o
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.2
5
+ platform: ruby
6
+ authors:
7
+ - Ryo Sugimoto
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2016-06-11 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.2'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.2'
27
+ - !ruby/object:Gem::Dependency
28
+ name: bundler
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '1.11'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '1.11'
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
+ description: Itamae plugin to install h2o
56
+ email:
57
+ - sugryo1109@gmail.com
58
+ executables: []
59
+ extensions: []
60
+ extra_rdoc_files: []
61
+ files:
62
+ - ".gitignore"
63
+ - ".rspec"
64
+ - ".travis.yml"
65
+ - CODE_OF_CONDUCT.md
66
+ - Gemfile
67
+ - LICENSE.txt
68
+ - README.md
69
+ - Rakefile
70
+ - itamae-plugin-recipe-h2o.gemspec
71
+ - lib/itamae-plugin-recipe-h2o.rb
72
+ - lib/itamae/plugin/recipe/h2o.rb
73
+ - lib/itamae/plugin/recipe/h2o/dependency.rb
74
+ - lib/itamae/plugin/recipe/h2o/install.rb
75
+ - lib/itamae/plugin/recipe/h2o/version.rb
76
+ homepage: https://github.com/sugryo/itamae-plugin-recipe-h2o
77
+ licenses:
78
+ - MIT
79
+ metadata: {}
80
+ post_install_message:
81
+ rdoc_options: []
82
+ require_paths:
83
+ - lib
84
+ required_ruby_version: !ruby/object:Gem::Requirement
85
+ requirements:
86
+ - - ">="
87
+ - !ruby/object:Gem::Version
88
+ version: '0'
89
+ required_rubygems_version: !ruby/object:Gem::Requirement
90
+ requirements:
91
+ - - ">="
92
+ - !ruby/object:Gem::Version
93
+ version: '0'
94
+ requirements: []
95
+ rubyforge_project:
96
+ rubygems_version: 2.6.3
97
+ signing_key:
98
+ specification_version: 4
99
+ summary: Itamae plugin to install h2o
100
+ test_files: []