cesd_problems 0.1.4.0 → 0.1.4.1
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 +4 -4
- data/README.md +15 -3
- data/lib/cesd_problems/version.rb +1 -1
- data/lib/cesd_problems.rb +8 -8
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 028ddf6e52faf9d246f809dde41345258fb00e05
|
4
|
+
data.tar.gz: da1f01de995b168ccb5cb3b9b9bb028f7d200893
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3135b71619b318c42642b9ed513deeea3472476cda39ca911e7ed27c6c7cf7cc0be2f108acbd4476b276e82deccc4dd0dfc713eeaadbaebe24fbedea624bb3d6
|
7
|
+
data.tar.gz: 59f8249f9cf66fb63a1dc0816a9d693ff0b4ebe42cc90eef39ce7d3ab91319cd6093b5b5986f1931c53f7725aa3c3fd3f888566ed18485dda2edcaee15363a7f
|
data/README.md
CHANGED
@@ -2,7 +2,9 @@
|
|
2
2
|
|
3
3
|
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/cesd_problems`. To experiment with that code, run `bin/console` for an interactive prompt.
|
4
4
|
|
5
|
-
|
5
|
+
This gem provide ces-d problems and points.
|
6
|
+
|
7
|
+
Problems and points return by hash, you can choose problems and points, answers, criteria only.
|
6
8
|
|
7
9
|
## Installation
|
8
10
|
|
@@ -22,7 +24,17 @@ Or install it yourself as:
|
|
22
24
|
|
23
25
|
## Usage
|
24
26
|
|
25
|
-
|
27
|
+
```ruby
|
28
|
+
require 'cesd_problems'
|
29
|
+
|
30
|
+
# get all.
|
31
|
+
ja_problems = CesdProblems.get_ja_problems
|
32
|
+
en_problems = CesdProblems.get_en_problems
|
33
|
+
|
34
|
+
# get problems and points only.
|
35
|
+
ja_problems_only = CesdProblems.get_ja_problems(CesdProblems::PROBLEMS)
|
36
|
+
en_problems_only = CesdProblems.get_en_problems(CesdProblems::PROBLEMS)
|
37
|
+
```
|
26
38
|
|
27
39
|
## Development
|
28
40
|
|
@@ -32,7 +44,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
32
44
|
|
33
45
|
## Contributing
|
34
46
|
|
35
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
47
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/h-shigemoto/cesd_problems. 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.
|
36
48
|
|
37
49
|
|
38
50
|
## License
|
data/lib/cesd_problems.rb
CHANGED
@@ -4,13 +4,13 @@ require "cesd_problems/version"
|
|
4
4
|
module CesdProblems
|
5
5
|
|
6
6
|
# get all problems.
|
7
|
-
|
7
|
+
ALL = 0
|
8
8
|
# get answers only.
|
9
|
-
|
9
|
+
ANSWERS = 1
|
10
10
|
# get problems only.
|
11
|
-
|
11
|
+
PROBLEMS = 2
|
12
12
|
# get criteria only.
|
13
|
-
|
13
|
+
CRITERIA = 3
|
14
14
|
|
15
15
|
# get ces-d problems and points by hash(Japanese)
|
16
16
|
# @param [integer] mode get mode.
|
@@ -94,13 +94,13 @@ module CesdProblems
|
|
94
94
|
extract_problems = nil
|
95
95
|
|
96
96
|
case mode
|
97
|
-
when
|
97
|
+
when ALL then
|
98
98
|
extract_problems = problems
|
99
|
-
when
|
99
|
+
when ANSWERS then
|
100
100
|
extract_problems = { answers: problems[:answers] }
|
101
|
-
when
|
101
|
+
when PROBLEMS then
|
102
102
|
extract_problems = { problems: problems[:problems] }
|
103
|
-
when
|
103
|
+
when CRITERIA then
|
104
104
|
extract_problems = { criteria: problems[:criteria] }
|
105
105
|
else
|
106
106
|
extract_problems = nil
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cesd_problems
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.4.
|
4
|
+
version: 0.1.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- h.shigemoto
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-06-
|
11
|
+
date: 2016-06-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|