etude_for_ruby 0.0.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 +7 -0
- data/.gitignore +58 -0
- data/.idea/.rakeTasks +7 -0
- data/.idea/inspectionProfiles/Project_Default.xml +6 -0
- data/.idea/misc.xml +44 -0
- data/.idea/modules.xml +8 -0
- data/.idea/vcs.xml +6 -0
- data/.rspec +2 -0
- data/.travis.yml +5 -0
- data/.yardopts +5 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/Dockerfile +7 -0
- data/Dockerfile-dev +14 -0
- data/Gemfile +4 -0
- data/Jenkinsfile +19 -0
- data/LICENSE.txt +21 -0
- data/README.md +43 -0
- data/Rakefile +8 -0
- data/Vagrantfile +21 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/circle.yml +10 -0
- data/docker-compose.yml +13 -0
- data/docs/README.md +42 -0
- data/docs/dev/images/.keep +0 -0
- data/docs/ops/build_docker.md +22 -0
- data/docs/ops/build_vagrant.md +15 -0
- data/docs/ops/images/.keep +0 -0
- data/docs/ops/ship_circleci.md +8 -0
- data/docs/ops/ship_document.md +15 -0
- data/docs/ops/ship_jenkins.md +15 -0
- data/docs/ops/ship_ruby_gem.md +26 -0
- data/docs/template_catalog.md +6 -0
- data/docs/template_recipe.md +6 -0
- data/docs/template_spec.md +8 -0
- data/etude_for_ruby.gemspec +38 -0
- data/etude_for_ruby.iml +63 -0
- data/lib/etude_for_ruby.rb +5 -0
- data/lib/etude_for_ruby/version.rb +3 -0
- metadata +153 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 052be416d44625c1937f98d5411fc0c09ff30502
|
4
|
+
data.tar.gz: 9b0e6730fabdc8dfcfc621c76d118321d625b33f
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: be298e63f296e4cc89513db1c4ba59accc3f37ee06915eb3be8cf7c42b353ab92314f55746e68b0309a197d98b0fe8e21ea7b369b38350d6d85fc632710b6ac7
|
7
|
+
data.tar.gz: b62c351d1b10029ac314215ca091275521bafd30c07975919f7606d2bdc322c163052f6e1310899a8fbf66e94e8097fc6755df2c62b7eea64d005e6e193a035d
|
data/.gitignore
ADDED
@@ -0,0 +1,58 @@
|
|
1
|
+
/.bundle/
|
2
|
+
/.yardoc
|
3
|
+
/Gemfile.lock
|
4
|
+
/_yardoc/
|
5
|
+
/coverage/
|
6
|
+
/doc/
|
7
|
+
/pkg/
|
8
|
+
/spec/reports/
|
9
|
+
/tmp/
|
10
|
+
|
11
|
+
# rspec failure tracking
|
12
|
+
.rspec_status
|
13
|
+
### JetBrains template
|
14
|
+
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
|
15
|
+
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
|
16
|
+
|
17
|
+
# User-specific stuff:
|
18
|
+
.idea/**/workspace.xml
|
19
|
+
.idea/**/tasks.xml
|
20
|
+
.idea/dictionaries
|
21
|
+
|
22
|
+
# Sensitive or high-churn files:
|
23
|
+
.idea/**/dataSources/
|
24
|
+
.idea/**/dataSources.ids
|
25
|
+
.idea/**/dataSources.xml
|
26
|
+
.idea/**/dataSources.local.xml
|
27
|
+
.idea/**/sqlDataSources.xml
|
28
|
+
.idea/**/dynamic.xml
|
29
|
+
.idea/**/uiDesigner.xml
|
30
|
+
|
31
|
+
# Gradle:
|
32
|
+
.idea/**/gradle.xml
|
33
|
+
.idea/**/libraries
|
34
|
+
|
35
|
+
# Mongo Explorer plugin:
|
36
|
+
.idea/**/mongoSettings.xml
|
37
|
+
|
38
|
+
## File-based project format:
|
39
|
+
*.iws
|
40
|
+
|
41
|
+
## Plugin-specific files:
|
42
|
+
|
43
|
+
# IntelliJ
|
44
|
+
/out/
|
45
|
+
|
46
|
+
# mpeltonen/sbt-idea plugin
|
47
|
+
.idea_modules/
|
48
|
+
|
49
|
+
# JIRA plugin
|
50
|
+
atlassian-ide-plugin.xml
|
51
|
+
|
52
|
+
# Crashlytics plugin (for Android Studio and IntelliJ)
|
53
|
+
com_crashlytics_export_strings.xml
|
54
|
+
crashlytics.properties
|
55
|
+
crashlytics-build.properties
|
56
|
+
fabric.properties
|
57
|
+
.vagrant
|
58
|
+
etude_for_ruby-0.0.0.gem
|
data/.idea/.rakeTasks
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<Settings><!--This file was automatically generated by Ruby plugin.
|
3
|
+
You are allowed to:
|
4
|
+
1. Remove rake task
|
5
|
+
2. Add existing rake tasks
|
6
|
+
To add existing rake tasks automatically delete this file and reload the project.
|
7
|
+
--><RakeGroup description="" fullCmd="" taksId="rake"><RakeTask description="Build etude_for_ruby-0.1.0.gem into the pkg directory" fullCmd="build" taksId="build" /><RakeTask description="Remove any temporary products" fullCmd="clean" taksId="clean" /><RakeTask description="Remove any generated files" fullCmd="clobber" taksId="clobber" /><RakeTask description="Build and install etude_for_ruby-0.1.0.gem into system gems" fullCmd="install" taksId="install" /><RakeGroup description="" fullCmd="" taksId="install"><RakeTask description="Build and install etude_for_ruby-0.1.0.gem into system gems without network access" fullCmd="install:local" taksId="local" /></RakeGroup><RakeTask description="Create tag v0.1.0 and build and push etude_for_ruby-0.1.0.gem to Rubygems" fullCmd="release[remote]" taksId="release[remote]" /><RakeTask description="Run RSpec code examples" fullCmd="spec" taksId="spec" /><RakeTask description="Generate YARD Documentation" fullCmd="yard" taksId="yard" /><RakeTask description="" fullCmd="default" taksId="default" /><RakeTask description="" fullCmd="release" taksId="release" /><RakeGroup description="" fullCmd="" taksId="release"><RakeTask description="" fullCmd="release:guard_clean" taksId="guard_clean" /><RakeTask description="" fullCmd="release:rubygem_push" taksId="rubygem_push" /><RakeTask description="" fullCmd="release:source_control_push" taksId="source_control_push" /></RakeGroup></RakeGroup></Settings>
|
data/.idea/misc.xml
ADDED
@@ -0,0 +1,44 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<project version="4">
|
3
|
+
<component name="ClientPropertiesManager">
|
4
|
+
<properties class="javax.swing.AbstractButton">
|
5
|
+
<property name="hideActionText" class="java.lang.Boolean" />
|
6
|
+
</properties>
|
7
|
+
<properties class="javax.swing.JComponent">
|
8
|
+
<property name="html.disable" class="java.lang.Boolean" />
|
9
|
+
</properties>
|
10
|
+
<properties class="javax.swing.JEditorPane">
|
11
|
+
<property name="JEditorPane.w3cLengthUnits" class="java.lang.Boolean" />
|
12
|
+
<property name="JEditorPane.honorDisplayProperties" class="java.lang.Boolean" />
|
13
|
+
<property name="charset" class="java.lang.String" />
|
14
|
+
</properties>
|
15
|
+
<properties class="javax.swing.JList">
|
16
|
+
<property name="List.isFileList" class="java.lang.Boolean" />
|
17
|
+
</properties>
|
18
|
+
<properties class="javax.swing.JPasswordField">
|
19
|
+
<property name="JPasswordField.cutCopyAllowed" class="java.lang.Boolean" />
|
20
|
+
</properties>
|
21
|
+
<properties class="javax.swing.JSlider">
|
22
|
+
<property name="Slider.paintThumbArrowShape" class="java.lang.Boolean" />
|
23
|
+
<property name="JSlider.isFilled" class="java.lang.Boolean" />
|
24
|
+
</properties>
|
25
|
+
<properties class="javax.swing.JTable">
|
26
|
+
<property name="Table.isFileList" class="java.lang.Boolean" />
|
27
|
+
<property name="JTable.autoStartsEdit" class="java.lang.Boolean" />
|
28
|
+
<property name="terminateEditOnFocusLost" class="java.lang.Boolean" />
|
29
|
+
</properties>
|
30
|
+
<properties class="javax.swing.JToolBar">
|
31
|
+
<property name="JToolBar.isRollover" class="java.lang.Boolean" />
|
32
|
+
</properties>
|
33
|
+
<properties class="javax.swing.JTree">
|
34
|
+
<property name="JTree.lineStyle" class="java.lang.String" />
|
35
|
+
</properties>
|
36
|
+
<properties class="javax.swing.text.JTextComponent">
|
37
|
+
<property name="caretAspectRatio" class="java.lang.Double" />
|
38
|
+
<property name="caretWidth" class="java.lang.Integer" />
|
39
|
+
</properties>
|
40
|
+
</component>
|
41
|
+
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="false" project-jdk-name="Remote:ruby-2.4.1-p111" project-jdk-type="RUBY_SDK">
|
42
|
+
<output url="file://$PROJECT_DIR$/out" />
|
43
|
+
</component>
|
44
|
+
</project>
|
data/.idea/modules.xml
ADDED
data/.idea/vcs.xml
ADDED
data/.rspec
ADDED
data/.travis.yml
ADDED
data/.yardopts
ADDED
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,74 @@
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
2
|
+
|
3
|
+
## Our Pledge
|
4
|
+
|
5
|
+
In the interest of fostering an open and welcoming environment, we as
|
6
|
+
contributors and maintainers pledge to making participation in our project and
|
7
|
+
our community a harassment-free experience for everyone, regardless of age, body
|
8
|
+
size, disability, ethnicity, gender identity and expression, level of experience,
|
9
|
+
nationality, personal appearance, race, religion, or sexual identity and
|
10
|
+
orientation.
|
11
|
+
|
12
|
+
## Our Standards
|
13
|
+
|
14
|
+
Examples of behavior that contributes to creating a positive environment
|
15
|
+
include:
|
16
|
+
|
17
|
+
* Using welcoming and inclusive language
|
18
|
+
* Being respectful of differing viewpoints and experiences
|
19
|
+
* Gracefully accepting constructive criticism
|
20
|
+
* Focusing on what is best for the community
|
21
|
+
* Showing empathy towards other community members
|
22
|
+
|
23
|
+
Examples of unacceptable behavior by participants include:
|
24
|
+
|
25
|
+
* The use of sexualized language or imagery and unwelcome sexual attention or
|
26
|
+
advances
|
27
|
+
* Trolling, insulting/derogatory comments, and personal or political attacks
|
28
|
+
* Public or private harassment
|
29
|
+
* Publishing others' private information, such as a physical or electronic
|
30
|
+
address, without explicit permission
|
31
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
32
|
+
professional setting
|
33
|
+
|
34
|
+
## Our Responsibilities
|
35
|
+
|
36
|
+
Project maintainers are responsible for clarifying the standards of acceptable
|
37
|
+
behavior and are expected to take appropriate and fair corrective action in
|
38
|
+
response to any instances of unacceptable behavior.
|
39
|
+
|
40
|
+
Project maintainers have the right and responsibility to remove, edit, or
|
41
|
+
reject comments, commits, code, wiki edits, issues, and other contributions
|
42
|
+
that are not aligned to this Code of Conduct, or to ban temporarily or
|
43
|
+
permanently any contributor for other behaviors that they deem inappropriate,
|
44
|
+
threatening, offensive, or harmful.
|
45
|
+
|
46
|
+
## Scope
|
47
|
+
|
48
|
+
This Code of Conduct applies both within project spaces and in public spaces
|
49
|
+
when an individual is representing the project or its community. Examples of
|
50
|
+
representing a project or community include using an official project e-mail
|
51
|
+
address, posting via an official social media account, or acting as an appointed
|
52
|
+
representative at an online or offline event. Representation of a project may be
|
53
|
+
further defined and clarified by project maintainers.
|
54
|
+
|
55
|
+
## Enforcement
|
56
|
+
|
57
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
58
|
+
reported by contacting the project team at kakimomokuri@gmail.com. All
|
59
|
+
complaints will be reviewed and investigated and will result in a response that
|
60
|
+
is deemed necessary and appropriate to the circumstances. The project team is
|
61
|
+
obligated to maintain confidentiality with regard to the reporter of an incident.
|
62
|
+
Further details of specific enforcement policies may be posted separately.
|
63
|
+
|
64
|
+
Project maintainers who do not follow or enforce the Code of Conduct in good
|
65
|
+
faith may face temporary or permanent repercussions as determined by other
|
66
|
+
members of the project's leadership.
|
67
|
+
|
68
|
+
## Attribution
|
69
|
+
|
70
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
71
|
+
available at [http://contributor-covenant.org/version/1/4][version]
|
72
|
+
|
73
|
+
[homepage]: http://contributor-covenant.org
|
74
|
+
[version]: http://contributor-covenant.org/version/1/4/
|
data/Dockerfile
ADDED
data/Dockerfile-dev
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
FROM app:base
|
2
|
+
|
3
|
+
ENV APP_ROOT /usr/src/app
|
4
|
+
WORKDIR $APP_ROOT
|
5
|
+
COPY Gemfile $APP_ROOT
|
6
|
+
COPY Gemfile.lock $APP_ROOT
|
7
|
+
COPY etude_for_ruby.gemspec $APP_ROOT
|
8
|
+
|
9
|
+
COPY . $APP_ROOT
|
10
|
+
RUN bundle
|
11
|
+
RUN bundle exec rspec
|
12
|
+
|
13
|
+
EXPOSE 5000
|
14
|
+
CMD ["bin/console"]
|
data/Gemfile
ADDED
data/Jenkinsfile
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
node {
|
2
|
+
stage("Build") {
|
3
|
+
|
4
|
+
checkout scm
|
5
|
+
|
6
|
+
docker.build('app:base').inside {
|
7
|
+
}
|
8
|
+
}
|
9
|
+
|
10
|
+
stage("Test") {
|
11
|
+
|
12
|
+
docker.build('app','. -f Dockerfile-dev').inside {
|
13
|
+
}
|
14
|
+
|
15
|
+
}
|
16
|
+
|
17
|
+
// Clean up workspace
|
18
|
+
step([$class: 'WsCleanup'])
|
19
|
+
}
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2017 k2works
|
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.
|
data/README.md
ADDED
@@ -0,0 +1,43 @@
|
|
1
|
+
# EtudeForRuby
|
2
|
+
|
3
|
+
[](https://circleci.com/gh/k2works/etude_for_ruby)
|
4
|
+
|
5
|
+
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/etude_for_ruby`. To experiment with that code, run `bin/console` for an interactive prompt.
|
6
|
+
|
7
|
+
TODO: Delete this and the text above, and describe your gem
|
8
|
+
|
9
|
+
## Installation
|
10
|
+
|
11
|
+
Add this line to your application's Gemfile:
|
12
|
+
|
13
|
+
```ruby
|
14
|
+
gem 'etude_for_ruby'
|
15
|
+
```
|
16
|
+
|
17
|
+
And then execute:
|
18
|
+
|
19
|
+
$ bundle
|
20
|
+
|
21
|
+
Or install it yourself as:
|
22
|
+
|
23
|
+
$ gem install etude_for_ruby
|
24
|
+
|
25
|
+
## Usage
|
26
|
+
|
27
|
+
TODO: Write usage instructions here
|
28
|
+
|
29
|
+
## Development
|
30
|
+
|
31
|
+
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.
|
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 tags, 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/[USERNAME]/etude_for_ruby. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
38
|
+
|
39
|
+
|
40
|
+
## License
|
41
|
+
|
42
|
+
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
43
|
+
|
data/Rakefile
ADDED
data/Vagrantfile
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
# -*- mode: ruby -*-
|
2
|
+
# vi: set ft=ruby :
|
3
|
+
|
4
|
+
Vagrant.configure("2") do |config|
|
5
|
+
config.vm.box = "hiroshima-arc/manhattan"
|
6
|
+
config.vm.box_version = "1.0.3"
|
7
|
+
|
8
|
+
config.vm.network :forwarded_port, guest:5000, host:5000, id:"ruby"
|
9
|
+
config.vm.network :forwarded_port, guest:8808, host:8808, id:"docs"
|
10
|
+
config.vm.network :forwarded_port, guest:8080, host:9000, id:"jenkins"
|
11
|
+
config.vm.network :forwarded_port, guest:3306, host:3306, id:"mysql"
|
12
|
+
config.vm.network :forwarded_port, guest:5432, host:5432, id:"postgresql"
|
13
|
+
config.vm.network :forwarded_port, guest:6379, host:6379, id:"redis"
|
14
|
+
config.vm.network :forwarded_port, guest:27017, host:27017, id:"mongodb"
|
15
|
+
config.vm.network :private_network, ip:"127.0.0.1"
|
16
|
+
|
17
|
+
config.vm.provider :virtualbox do |vb|
|
18
|
+
vb.customize ["modifyvm", :id, "--natdnsproxy1", "on"]
|
19
|
+
vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
|
20
|
+
end
|
21
|
+
end
|
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "etude_for_ruby"
|
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
data/circle.yml
ADDED
data/docker-compose.yml
ADDED
data/docs/README.md
ADDED
@@ -0,0 +1,42 @@
|
|
1
|
+
Etude for Ruby
|
2
|
+
===================
|
3
|
+
|
4
|
+
# 目的 #
|
5
|
+
Rubyプログラミング練習
|
6
|
+
|
7
|
+
# 前提 #
|
8
|
+
| ソフトウェア | バージョン | 備考 |
|
9
|
+
|:---------------|:-------------|:------------|
|
10
|
+
| ruby |2.4.0 | |
|
11
|
+
| vagrant |1.8.7 | |
|
12
|
+
| docker |17.03.0 | |
|
13
|
+
| docker-compose |1.8.0 | |
|
14
|
+
|
15
|
+
# 構成 #
|
16
|
+
1. [構築](#構築)
|
17
|
+
1. [配置](#配置)
|
18
|
+
1. [開発](#開発)
|
19
|
+
1. [運用](#運用)
|
20
|
+
|
21
|
+
## 構築
|
22
|
+
### [開発用仮想マシン構築](./ops/build_vagrant.md)
|
23
|
+
### [開発用コンテナ構築](./ops/build_docker.md)
|
24
|
+
|
25
|
+
**[⬆ back to top](#構成)**
|
26
|
+
|
27
|
+
## 配置
|
28
|
+
### [CircleCI配置](./ops/ship_circleci.md)
|
29
|
+
### [Jenkins配置](./ops/ship_jenkins.md)
|
30
|
+
### [RubyGemパッケージの配置](./ops/ship_ruby_gem.md)
|
31
|
+
|
32
|
+
**[⬆ back to top](#構成)**
|
33
|
+
|
34
|
+
## 開発
|
35
|
+
**[⬆ back to top](#構成)**
|
36
|
+
|
37
|
+
## 運用
|
38
|
+
### [ドキュメント運用](./ops/ship_document.md)
|
39
|
+
|
40
|
+
**[⬆ back to top](#運用)**
|
41
|
+
|
42
|
+
# 参照 #
|
File without changes
|
@@ -0,0 +1,22 @@
|
|
1
|
+
開発用コンテナ構築
|
2
|
+
---
|
3
|
+
|
4
|
+
## 例
|
5
|
+
コンテナを作成してコンテナ内部でシェルを実行する。
|
6
|
+
```bash
|
7
|
+
docker build . -t app:base
|
8
|
+
docker run --name app --rm -p 5000:5000 -v $(PWD):/container -i -t app:base /bin/bash
|
9
|
+
cd /containe
|
10
|
+
```
|
11
|
+
仮想マシン環境では`$(PWD)`を`/vagrant`に書き換えて実行する。
|
12
|
+
|
13
|
+
docker-composeを使った場合。
|
14
|
+
```bash
|
15
|
+
docker-compose build
|
16
|
+
docker-compose run app bash
|
17
|
+
```
|
18
|
+
|
19
|
+
## 注意
|
20
|
+
+ 仮想マシンと併用は可能だがポートがぶつかる場合があるので設定に注意する。
|
21
|
+
|
22
|
+
## 参照
|
File without changes
|
@@ -0,0 +1,15 @@
|
|
1
|
+
ドキュメント運用
|
2
|
+
---
|
3
|
+
|
4
|
+
## 例
|
5
|
+
```bash
|
6
|
+
bundle exec yard
|
7
|
+
bundle exec yard server -b 0.0.0.0
|
8
|
+
```
|
9
|
+
[http://0.0.0.0:8808/](http://0.0.0.0:8808/)でドキュメントを確認する。
|
10
|
+
|
11
|
+
## 注意
|
12
|
+
+ ドキュメントは`docs`ディレクトリ以下で管理する。
|
13
|
+
+ ドキュメント追加時は追加ドキュメントを`.yardopts`に追記する。
|
14
|
+
|
15
|
+
## 参照
|
@@ -0,0 +1,15 @@
|
|
1
|
+
Jenkins配置
|
2
|
+
---
|
3
|
+
|
4
|
+
## 例
|
5
|
+
```
|
6
|
+
sudo cat /var/lib/jenkins/secrets/initialAdminPassword
|
7
|
+
```
|
8
|
+
`http://0.0.0.0:9000`に接続してJenkinsをセットアップする
|
9
|
+
|
10
|
+
Crumb Dataが必要な場合は`http://0.0.0.0:9000/crumbIssuer/api/json`からcrumbを取得する
|
11
|
+
|
12
|
+
## 注意
|
13
|
+
+ 仮想マシン環境でセットアップする。
|
14
|
+
|
15
|
+
## 参照
|
@@ -0,0 +1,26 @@
|
|
1
|
+
RubyGemパッケージの配置
|
2
|
+
---
|
3
|
+
|
4
|
+
## 例
|
5
|
+
### Gemのビルド
|
6
|
+
```bash
|
7
|
+
gem install bundler
|
8
|
+
bundle install
|
9
|
+
bundle exec rake build
|
10
|
+
```
|
11
|
+
|
12
|
+
### .gemファイルを作る
|
13
|
+
```bash
|
14
|
+
gem build etude_for_ruby.gemspec
|
15
|
+
```
|
16
|
+
|
17
|
+
### Gemの公開
|
18
|
+
```bash
|
19
|
+
gem push etude_for_ruby.1.0.0.gem
|
20
|
+
```
|
21
|
+
|
22
|
+
## 注意
|
23
|
+
+ 公開するバージョンは都度更新する
|
24
|
+
|
25
|
+
## 参照
|
26
|
+
+ [Version Badge](https://badge.fury.io/)
|
@@ -0,0 +1,38 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'etude_for_ruby/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "etude_for_ruby"
|
8
|
+
spec.version = EtudeForRuby::VERSION
|
9
|
+
spec.authors = ["k2works"]
|
10
|
+
spec.email = ["kakimomokuri@gmail.com"]
|
11
|
+
|
12
|
+
spec.summary = %q{Etude for Ruby.}
|
13
|
+
spec.description = %q{Etude for Ruby programing.}
|
14
|
+
spec.homepage = "https://github.com/k2works/etude_for_ruby"
|
15
|
+
spec.license = "MIT"
|
16
|
+
|
17
|
+
# Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
|
18
|
+
# to allow pushing to a single host or delete this section to allow pushing to any host.
|
19
|
+
if spec.respond_to?(:metadata)
|
20
|
+
spec.metadata['allowed_push_host'] = "https://rubygems.org"
|
21
|
+
else
|
22
|
+
raise "RubyGems 2.0 or newer is required to protect against " \
|
23
|
+
"public gem pushes."
|
24
|
+
end
|
25
|
+
|
26
|
+
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
27
|
+
f.match(%r{^(test|spec|features)/})
|
28
|
+
end
|
29
|
+
spec.bindir = "exe"
|
30
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
31
|
+
spec.require_paths = ["lib"]
|
32
|
+
|
33
|
+
spec.add_development_dependency "bundler", "~> 1.14"
|
34
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
35
|
+
spec.add_development_dependency "rspec", "~> 3.0"
|
36
|
+
spec.add_development_dependency "yard", "~> 0.8"
|
37
|
+
spec.add_development_dependency "redcarpet", "~> 3.4"
|
38
|
+
end
|
data/etude_for_ruby.iml
ADDED
@@ -0,0 +1,63 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<module type="RUBY_MODULE" version="4">
|
3
|
+
<component name="ModuleRunConfigurationManager">
|
4
|
+
<configuration default="false" name="Yard" type="CommandRunConfigurationType" factoryName="Gem Command">
|
5
|
+
<module name="etude_for_ruby" />
|
6
|
+
<COMMAND_RUN_CONFIGURATION NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
|
7
|
+
<COMMAND_RUN_CONFIGURATION NAME="WORK DIR" VALUE="$MODULE_DIR$" />
|
8
|
+
<COMMAND_RUN_CONFIGURATION NAME="SHOULD_USE_SDK" VALUE="false" />
|
9
|
+
<COMMAND_RUN_CONFIGURATION NAME="ALTERN_SDK_NAME" VALUE="" />
|
10
|
+
<COMMAND_RUN_CONFIGURATION NAME="myPassParentEnvs" VALUE="true" />
|
11
|
+
<envs />
|
12
|
+
<EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
|
13
|
+
<EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
|
14
|
+
<COMMAND_CONFIG_SETTINGS_ID NAME="GEM_NAME" VALUE="yard" />
|
15
|
+
<COMMAND_CONFIG_SETTINGS_ID NAME="EXECUTABLE_NAME" VALUE="yard" />
|
16
|
+
<COMMAND_CONFIG_SETTINGS_ID NAME="EXECUTABLE_ARGS" VALUE="server -p8888" />
|
17
|
+
<COMMAND_CONFIG_SETTINGS_ID NAME="WORKING_DIR" VALUE="server -p8888" />
|
18
|
+
<method />
|
19
|
+
</configuration>
|
20
|
+
<configuration default="false" name="yard: etude_for_ruby" type="RakeRunConfigurationType" factoryName="Rake" temporary="true">
|
21
|
+
<module name="etude_for_ruby" />
|
22
|
+
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
|
23
|
+
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="$MODULE_DIR$" />
|
24
|
+
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
|
25
|
+
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
|
26
|
+
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
|
27
|
+
<envs />
|
28
|
+
<EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
|
29
|
+
<EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
|
30
|
+
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_NAME" VALUE="yard" />
|
31
|
+
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_ARGS" VALUE="" />
|
32
|
+
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_ATTACHED_TEST_FRAMEWORKS" VALUE="" />
|
33
|
+
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_OPTION_TRACE" VALUE="false" />
|
34
|
+
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_OPTION_DRYRUN" VALUE="false" />
|
35
|
+
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_OPTION_PREREQS" VALUE="false" />
|
36
|
+
<method />
|
37
|
+
</configuration>
|
38
|
+
<configuration default="false" name="build: etude_for_ruby" type="RakeRunConfigurationType" factoryName="Rake" temporary="true">
|
39
|
+
<module name="etude_for_ruby" />
|
40
|
+
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
|
41
|
+
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="$MODULE_DIR$" />
|
42
|
+
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
|
43
|
+
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
|
44
|
+
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
|
45
|
+
<envs />
|
46
|
+
<EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
|
47
|
+
<EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
|
48
|
+
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_NAME" VALUE="build" />
|
49
|
+
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_ARGS" VALUE="" />
|
50
|
+
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_ATTACHED_TEST_FRAMEWORKS" VALUE="" />
|
51
|
+
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_OPTION_TRACE" VALUE="false" />
|
52
|
+
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_OPTION_DRYRUN" VALUE="false" />
|
53
|
+
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_OPTION_PREREQS" VALUE="false" />
|
54
|
+
<method />
|
55
|
+
</configuration>
|
56
|
+
</component>
|
57
|
+
<component name="NewModuleRootManager">
|
58
|
+
<content url="file://$MODULE_DIR$" />
|
59
|
+
<orderEntry type="jdk" jdkName="Remote:ruby-2.4.1-p111" jdkType="RUBY_SDK" />
|
60
|
+
<orderEntry type="sourceFolder" forTests="false" />
|
61
|
+
<orderEntry type="library" scope="PROVIDED" name="bundler (v1.14.6, Remote:ruby-2.4.1-p111) [gem]" level="application" />
|
62
|
+
</component>
|
63
|
+
</module>
|
metadata
ADDED
@@ -0,0 +1,153 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: etude_for_ruby
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- k2works
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2017-04-17 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.14'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.14'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '10.0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '10.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rspec
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '3.0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '3.0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: yard
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0.8'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0.8'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: redcarpet
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '3.4'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '3.4'
|
83
|
+
description: Etude for Ruby programing.
|
84
|
+
email:
|
85
|
+
- kakimomokuri@gmail.com
|
86
|
+
executables: []
|
87
|
+
extensions: []
|
88
|
+
extra_rdoc_files: []
|
89
|
+
files:
|
90
|
+
- ".gitignore"
|
91
|
+
- ".idea/.rakeTasks"
|
92
|
+
- ".idea/inspectionProfiles/Project_Default.xml"
|
93
|
+
- ".idea/misc.xml"
|
94
|
+
- ".idea/modules.xml"
|
95
|
+
- ".idea/vcs.xml"
|
96
|
+
- ".rspec"
|
97
|
+
- ".travis.yml"
|
98
|
+
- ".yardopts"
|
99
|
+
- CODE_OF_CONDUCT.md
|
100
|
+
- Dockerfile
|
101
|
+
- Dockerfile-dev
|
102
|
+
- Gemfile
|
103
|
+
- Jenkinsfile
|
104
|
+
- LICENSE.txt
|
105
|
+
- README.md
|
106
|
+
- Rakefile
|
107
|
+
- Vagrantfile
|
108
|
+
- bin/console
|
109
|
+
- bin/setup
|
110
|
+
- circle.yml
|
111
|
+
- docker-compose.yml
|
112
|
+
- docs/README.md
|
113
|
+
- docs/dev/images/.keep
|
114
|
+
- docs/ops/build_docker.md
|
115
|
+
- docs/ops/build_vagrant.md
|
116
|
+
- docs/ops/images/.keep
|
117
|
+
- docs/ops/ship_circleci.md
|
118
|
+
- docs/ops/ship_document.md
|
119
|
+
- docs/ops/ship_jenkins.md
|
120
|
+
- docs/ops/ship_ruby_gem.md
|
121
|
+
- docs/template_catalog.md
|
122
|
+
- docs/template_recipe.md
|
123
|
+
- docs/template_spec.md
|
124
|
+
- etude_for_ruby.gemspec
|
125
|
+
- etude_for_ruby.iml
|
126
|
+
- lib/etude_for_ruby.rb
|
127
|
+
- lib/etude_for_ruby/version.rb
|
128
|
+
homepage: https://github.com/k2works/etude_for_ruby
|
129
|
+
licenses:
|
130
|
+
- MIT
|
131
|
+
metadata:
|
132
|
+
allowed_push_host: https://rubygems.org
|
133
|
+
post_install_message:
|
134
|
+
rdoc_options: []
|
135
|
+
require_paths:
|
136
|
+
- lib
|
137
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
138
|
+
requirements:
|
139
|
+
- - ">="
|
140
|
+
- !ruby/object:Gem::Version
|
141
|
+
version: '0'
|
142
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
143
|
+
requirements:
|
144
|
+
- - ">="
|
145
|
+
- !ruby/object:Gem::Version
|
146
|
+
version: '0'
|
147
|
+
requirements: []
|
148
|
+
rubyforge_project:
|
149
|
+
rubygems_version: 2.6.8
|
150
|
+
signing_key:
|
151
|
+
specification_version: 4
|
152
|
+
summary: Etude for Ruby.
|
153
|
+
test_files: []
|