rubynovice 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 +7 -0
- data/.gitignore +11 -0
- data/.rspec +2 -0
- data/.travis.yml +4 -0
- data/.yardopts +5 -0
- data/CODE_OF_CONDUCT.md +49 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +21 -0
- data/README.md +19 -0
- data/Rakefile +46 -0
- data/doc/Donkey.html +297 -0
- data/doc/Rubynovice.html +466 -0
- data/doc/_index.html +138 -0
- data/doc/class_list.html +58 -0
- data/doc/css/common.css +1 -0
- data/doc/css/full_list.css +57 -0
- data/doc/css/style.css +339 -0
- data/doc/file.README.en.html +104 -0
- data/doc/file.README.html +101 -0
- data/doc/file.README.ja.html +80 -0
- data/doc/file.README_en.html +104 -0
- data/doc/file.README_ja.html +101 -0
- data/doc/file.ex1.html +100 -0
- data/doc/file.ex2.html +147 -0
- data/doc/file.ex3.html +139 -0
- data/doc/file_list.html +75 -0
- data/doc/frames.html +26 -0
- data/doc/index.html +101 -0
- data/doc/js/app.js +219 -0
- data/doc/js/full_list.js +181 -0
- data/doc/js/jquery.js +4 -0
- data/doc/method_list.html +105 -0
- data/doc/top-level-namespace.html +112 -0
- data/docs/README_en.hiki +35 -0
- data/docs/README_en.md +31 -0
- data/docs/README_ja.hiki +19 -0
- data/docs/README_ja.md +19 -0
- data/docs/ex1.hiki +26 -0
- data/docs/ex1.md +26 -0
- data/docs/ex2.hiki +71 -0
- data/docs/ex2.md +71 -0
- data/docs/ex3.hiki +61 -0
- data/docs/ex3.md +61 -0
- data/exe/rubynovice +3 -0
- data/lib/rubynovice.rb +27 -0
- data/lib/rubynovice/donkey.rb +17 -0
- data/lib/rubynovice/version.rb +3 -0
- data/rubynovice.gemspec +36 -0
- metadata +163 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 57e24778d3e6af27e6cb7126a76a59f9ce59e631
|
4
|
+
data.tar.gz: 15a52c00aa98fbdc008080004b9b007fe6a29011
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 2f87db1e9ece56345c7a31ddd7fc12e329380eab0ced905d84dea1ec2a1bfd1e70273ea8a2c46254711269955898faab9d47f3fdc70b3837ec9f2e120cc3b786
|
7
|
+
data.tar.gz: 4e97691af0016b1aaafc9684fb21bc74bdd8fb42398b15edbe40524e85095b144d38a255c188e4fc20de9ed4f9c8174f41911854323b396bbfffaf0629e902d2
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.travis.yml
ADDED
data/CODE_OF_CONDUCT.md
ADDED
@@ -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 shigeto_nishitani@me.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
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2016 Shigeto R. Nishitani
|
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,19 @@
|
|
1
|
+
# Rubynovice
|
2
|
+
|
3
|
+
Ruby programming mastering platform using Github
|
4
|
+
|
5
|
+
## インストール法
|
6
|
+
- githubで自分のところにdaddygongon/rubynoviceをforkする
|
7
|
+
- cloneする
|
8
|
+
|
9
|
+
## 使用法
|
10
|
+
- docにある課題を解いていく.
|
11
|
+
- specをかける
|
12
|
+
- 自分の名前をつけたファイルを./lib/rubynovice/donkey.rbなどとして準備する.
|
13
|
+
- class Donkeyに解答をつくる
|
14
|
+
- 書き方はdonkey.rbを参照のこと.
|
15
|
+
|
16
|
+
## 課題
|
17
|
+
1. [ex1](file.ex1.html)
|
18
|
+
1. [ex2](file.ex2.html)
|
19
|
+
1. [ex3](file.ex3.html)
|
data/Rakefile
ADDED
@@ -0,0 +1,46 @@
|
|
1
|
+
require "bundler/gem_tasks"
|
2
|
+
require "rspec/core/rake_task"
|
3
|
+
require 'yard'
|
4
|
+
|
5
|
+
task :default do
|
6
|
+
system 'rake -T'
|
7
|
+
end
|
8
|
+
|
9
|
+
desc "make documents by yard"
|
10
|
+
task :yard do
|
11
|
+
|
12
|
+
files = Dir.entries('docs')
|
13
|
+
files.each{|file|
|
14
|
+
name=file.split('.')
|
15
|
+
if name[1]=='hiki' then
|
16
|
+
p command="hiki2md docs/#{name[0]}.hiki > docs/#{name[0]}.md"
|
17
|
+
system command
|
18
|
+
end
|
19
|
+
}
|
20
|
+
system "cp docs/README_ja.md README.md"
|
21
|
+
YARD::Rake::YardocTask.new
|
22
|
+
end
|
23
|
+
|
24
|
+
RSpec::Core::RakeTask.new(:spec)
|
25
|
+
|
26
|
+
desc "all procedure for release."
|
27
|
+
task :update =>[:setenv] do
|
28
|
+
system 'emacs ./lib/rubynovice/version.rb'
|
29
|
+
system 'git add -A'
|
30
|
+
system 'git commit'
|
31
|
+
system 'git push -u origin master'
|
32
|
+
system 'bundle exec rake release'
|
33
|
+
end
|
34
|
+
|
35
|
+
desc "setenv for release from Kwansei gakuin."
|
36
|
+
task :setenv do
|
37
|
+
# status, stdout, stderr = systemu "scselect \| grep \'\*\' |grep KG"
|
38
|
+
# puts stdout
|
39
|
+
# p stdout != nil
|
40
|
+
# if stdout != nil then
|
41
|
+
p command='setenv HTTP_PROXY http://proxy.ksc.kwansei.ac.jp:8080'
|
42
|
+
system command
|
43
|
+
p command='setenv HTTPS_PROXY http://proxy.ksc.kwansei.ac.jp:8080'
|
44
|
+
system command
|
45
|
+
# end
|
46
|
+
end
|
data/doc/Donkey.html
ADDED
@@ -0,0 +1,297 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
2
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
3
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
4
|
+
<head>
|
5
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
6
|
+
<title>
|
7
|
+
Class: Donkey
|
8
|
+
|
9
|
+
— Documentation by YARD 0.8.7.6
|
10
|
+
|
11
|
+
</title>
|
12
|
+
|
13
|
+
<link rel="stylesheet" href="css/style.css" type="text/css" charset="utf-8" />
|
14
|
+
|
15
|
+
<link rel="stylesheet" href="css/common.css" type="text/css" charset="utf-8" />
|
16
|
+
|
17
|
+
<script type="text/javascript" charset="utf-8">
|
18
|
+
hasFrames = window.top.frames.main ? true : false;
|
19
|
+
relpath = '';
|
20
|
+
framesUrl = "frames.html#!Donkey.html";
|
21
|
+
</script>
|
22
|
+
|
23
|
+
|
24
|
+
<script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
|
25
|
+
|
26
|
+
<script type="text/javascript" charset="utf-8" src="js/app.js"></script>
|
27
|
+
|
28
|
+
|
29
|
+
</head>
|
30
|
+
<body>
|
31
|
+
<div id="header">
|
32
|
+
<div id="menu">
|
33
|
+
|
34
|
+
<a href="_index.html">Index (D)</a> »
|
35
|
+
|
36
|
+
|
37
|
+
<span class="title">Donkey</span>
|
38
|
+
|
39
|
+
|
40
|
+
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
41
|
+
</div>
|
42
|
+
|
43
|
+
<div id="search">
|
44
|
+
|
45
|
+
<a class="full_list_link" id="class_list_link"
|
46
|
+
href="class_list.html">
|
47
|
+
Class List
|
48
|
+
</a>
|
49
|
+
|
50
|
+
<a class="full_list_link" id="method_list_link"
|
51
|
+
href="method_list.html">
|
52
|
+
Method List
|
53
|
+
</a>
|
54
|
+
|
55
|
+
<a class="full_list_link" id="file_list_link"
|
56
|
+
href="file_list.html">
|
57
|
+
File List
|
58
|
+
</a>
|
59
|
+
|
60
|
+
</div>
|
61
|
+
<div class="clear"></div>
|
62
|
+
</div>
|
63
|
+
|
64
|
+
<iframe id="search_frame"></iframe>
|
65
|
+
|
66
|
+
<div id="content"><h1>Class: Donkey
|
67
|
+
|
68
|
+
|
69
|
+
|
70
|
+
</h1>
|
71
|
+
|
72
|
+
<dl class="box">
|
73
|
+
|
74
|
+
<dt class="r1">Inherits:</dt>
|
75
|
+
<dd class="r1">
|
76
|
+
<span class="inheritName">Object</span>
|
77
|
+
|
78
|
+
<ul class="fullTree">
|
79
|
+
<li>Object</li>
|
80
|
+
|
81
|
+
<li class="next">Donkey</li>
|
82
|
+
|
83
|
+
</ul>
|
84
|
+
<a href="#" class="inheritanceTree">show all</a>
|
85
|
+
|
86
|
+
</dd>
|
87
|
+
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
|
96
|
+
<dt class="r2 last">Defined in:</dt>
|
97
|
+
<dd class="r2 last">lib/rubynovice/donkey.rb</dd>
|
98
|
+
|
99
|
+
</dl>
|
100
|
+
<div class="clear"></div>
|
101
|
+
|
102
|
+
|
103
|
+
|
104
|
+
|
105
|
+
|
106
|
+
|
107
|
+
|
108
|
+
|
109
|
+
|
110
|
+
<h2>
|
111
|
+
Instance Method Summary
|
112
|
+
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
113
|
+
</h2>
|
114
|
+
|
115
|
+
<ul class="summary">
|
116
|
+
|
117
|
+
<li class="public ">
|
118
|
+
<span class="summary_signature">
|
119
|
+
|
120
|
+
<a href="#ex1_1-instance_method" title="#ex1_1 (instance method)">- (Object) <strong>ex1_1</strong> </a>
|
121
|
+
|
122
|
+
|
123
|
+
|
124
|
+
</span>
|
125
|
+
|
126
|
+
|
127
|
+
|
128
|
+
|
129
|
+
|
130
|
+
|
131
|
+
|
132
|
+
|
133
|
+
|
134
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
135
|
+
|
136
|
+
</li>
|
137
|
+
|
138
|
+
|
139
|
+
<li class="public ">
|
140
|
+
<span class="summary_signature">
|
141
|
+
|
142
|
+
<a href="#ex1_2-instance_method" title="#ex1_2 (instance method)">- (Object) <strong>ex1_2</strong> </a>
|
143
|
+
|
144
|
+
|
145
|
+
|
146
|
+
</span>
|
147
|
+
|
148
|
+
|
149
|
+
|
150
|
+
|
151
|
+
|
152
|
+
|
153
|
+
|
154
|
+
|
155
|
+
|
156
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
157
|
+
|
158
|
+
</li>
|
159
|
+
|
160
|
+
|
161
|
+
<li class="public ">
|
162
|
+
<span class="summary_signature">
|
163
|
+
|
164
|
+
<a href="#ex1_3-instance_method" title="#ex1_3 (instance method)">- (Object) <strong>ex1_3</strong> </a>
|
165
|
+
|
166
|
+
|
167
|
+
|
168
|
+
</span>
|
169
|
+
|
170
|
+
|
171
|
+
|
172
|
+
|
173
|
+
|
174
|
+
|
175
|
+
|
176
|
+
|
177
|
+
|
178
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
179
|
+
|
180
|
+
</li>
|
181
|
+
|
182
|
+
|
183
|
+
</ul>
|
184
|
+
|
185
|
+
|
186
|
+
|
187
|
+
|
188
|
+
<div id="instance_method_details" class="method_details_list">
|
189
|
+
<h2>Instance Method Details</h2>
|
190
|
+
|
191
|
+
|
192
|
+
<div class="method_details first">
|
193
|
+
<h3 class="signature first" id="ex1_1-instance_method">
|
194
|
+
|
195
|
+
- (<tt>Object</tt>) <strong>ex1_1</strong>
|
196
|
+
|
197
|
+
|
198
|
+
|
199
|
+
|
200
|
+
|
201
|
+
</h3><table class="source_code">
|
202
|
+
<tr>
|
203
|
+
<td>
|
204
|
+
<pre class="lines">
|
205
|
+
|
206
|
+
|
207
|
+
3
|
208
|
+
4
|
209
|
+
5</pre>
|
210
|
+
</td>
|
211
|
+
<td>
|
212
|
+
<pre class="code"><span class="info file"># File 'lib/rubynovice/donkey.rb', line 3</span>
|
213
|
+
|
214
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_ex1_1'>ex1_1</span>
|
215
|
+
<span class='kw'>return</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>hello world.\n</span><span class='tstring_end'>"</span></span>
|
216
|
+
<span class='kw'>end</span></pre>
|
217
|
+
</td>
|
218
|
+
</tr>
|
219
|
+
</table>
|
220
|
+
</div>
|
221
|
+
|
222
|
+
<div class="method_details ">
|
223
|
+
<h3 class="signature " id="ex1_2-instance_method">
|
224
|
+
|
225
|
+
- (<tt>Object</tt>) <strong>ex1_2</strong>
|
226
|
+
|
227
|
+
|
228
|
+
|
229
|
+
|
230
|
+
|
231
|
+
</h3><table class="source_code">
|
232
|
+
<tr>
|
233
|
+
<td>
|
234
|
+
<pre class="lines">
|
235
|
+
|
236
|
+
|
237
|
+
7
|
238
|
+
8
|
239
|
+
9</pre>
|
240
|
+
</td>
|
241
|
+
<td>
|
242
|
+
<pre class="code"><span class="info file"># File 'lib/rubynovice/donkey.rb', line 7</span>
|
243
|
+
|
244
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_ex1_2'>ex1_2</span>
|
245
|
+
<span class='kw'>return</span> <span class='int'>1</span><span class='op'>+</span><span class='int'>1</span>
|
246
|
+
<span class='kw'>end</span></pre>
|
247
|
+
</td>
|
248
|
+
</tr>
|
249
|
+
</table>
|
250
|
+
</div>
|
251
|
+
|
252
|
+
<div class="method_details ">
|
253
|
+
<h3 class="signature " id="ex1_3-instance_method">
|
254
|
+
|
255
|
+
- (<tt>Object</tt>) <strong>ex1_3</strong>
|
256
|
+
|
257
|
+
|
258
|
+
|
259
|
+
|
260
|
+
|
261
|
+
</h3><table class="source_code">
|
262
|
+
<tr>
|
263
|
+
<td>
|
264
|
+
<pre class="lines">
|
265
|
+
|
266
|
+
|
267
|
+
11
|
268
|
+
12
|
269
|
+
13
|
270
|
+
14
|
271
|
+
15</pre>
|
272
|
+
</td>
|
273
|
+
<td>
|
274
|
+
<pre class="code"><span class="info file"># File 'lib/rubynovice/donkey.rb', line 11</span>
|
275
|
+
|
276
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_ex1_3'>ex1_3</span>
|
277
|
+
<span class='id identifier rubyid_ans'>ans</span> <span class='op'>=</span> <span class='int'>1</span><span class='op'>+</span><span class='int'>1</span>
|
278
|
+
<span class='id identifier rubyid_text'>text</span> <span class='op'>=</span> <span class='id identifier rubyid_sprintf'>sprintf</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>ans=%i\n</span><span class='tstring_end'>"</span></span><span class='comma'>,</span><span class='id identifier rubyid_ans'>ans</span><span class='rparen'>)</span>
|
279
|
+
<span class='kw'>return</span> <span class='id identifier rubyid_text'>text</span>
|
280
|
+
<span class='kw'>end</span></pre>
|
281
|
+
</td>
|
282
|
+
</tr>
|
283
|
+
</table>
|
284
|
+
</div>
|
285
|
+
|
286
|
+
</div>
|
287
|
+
|
288
|
+
</div>
|
289
|
+
|
290
|
+
<div id="footer">
|
291
|
+
Generated on Tue May 17 20:56:14 2016 by
|
292
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
293
|
+
0.8.7.6 (ruby-2.2.2).
|
294
|
+
</div>
|
295
|
+
|
296
|
+
</body>
|
297
|
+
</html>
|