shunkuntype 1.0.2 → 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 73ac5960873c2ccd96d886d20a7ec3f6ca2e6ec2
4
- data.tar.gz: c149a6d1c2af462e5d7261aab6e7e589e6c98105
3
+ metadata.gz: faafb653c6e2c3d232da67f82a8f14af351202ae
4
+ data.tar.gz: b4d22a7dabaf721678634631196790fbe65fa2ef
5
5
  SHA512:
6
- metadata.gz: 28fd40092698ed5557e7c1f549864f22d2e3d81bf60cef22b8ec012e870d038b79a2b4db739ed07b70f0766f235f78b7f8337d862228a60ce2181e96a4f3f0ff
7
- data.tar.gz: 0e178b3638d1c448603769e90294112b179953dbfaf7213fd2bc901542597507042e81d8ba7bc5e6b1b53a75d5e979cef3ade79083a841afef1263b63cb988cc
6
+ metadata.gz: 7ef99c8494bd8ec1e3db0b61769eb0ebe4682e1e2e11c0563df1bf2a1eef16d25f4d2fa492dbfd0805835aaa039e8e49a45ab31d4a163da58d80e64596955f8d
7
+ data.tar.gz: 62181ae061c9c38ac192ad8004259b4081d6fe8b96175a588dbb6a32ea04cde8cd2b17dc2d84484bd4d87d3d7956caa20b1f994cb4b37c46d198a1924f6a60de
data/.yardopts ADDED
@@ -0,0 +1,4 @@
1
+ -
2
+ docs/README.en.md
3
+ docs/README.ja.md
4
+
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Shunkuntype
2
2
 
3
- touch typing習得をめざしたcommand line interface アプリ.Touch type mastering application.
3
+ Touch type mastering application.
4
4
 
5
5
  ## Installation
6
6
 
@@ -11,15 +11,15 @@ gem 'shunkuntype'
11
11
  ```
12
12
 
13
13
  And then execute:
14
-
15
- $ bundle
16
-
14
+ ```
15
+ $ bundle
16
+ ```
17
17
  Or install it yourself as:
18
-
19
- $ gem install shunkuntype
18
+ ```
19
+ $ gem install shunkuntype
20
+ ```
20
21
 
21
22
  ## Usage
22
-
23
23
  ```ruby
24
24
  Usage: shunkuntype [options]
25
25
  -v, --version show program Version.
@@ -28,13 +28,22 @@ Usage: shunkuntype [options]
28
28
  -h, --history view training History
29
29
  -p, --plot Plot personal data
30
30
  -s, --submit Submit data to dmz0
31
- --review [VALUE] Review training, VALUEs=html or hiki
31
+ --review [VALUE] Review training, VALUE=html or hiki
32
+ ```
33
+ For the first time, shunkun makes .shunkuntype directory on the home dir,
34
+ and put three data files(training, speed, server).
35
+ The training and speed data will be sent to the server, when --submit.
36
+ The --review will get the data download, and show the training and speed data in hiki or html formats,
37
+ where the png files created by gnuplot.
38
+
39
+ For activating server all training member has ssh access, and the write permission on the directory.
40
+ The format of the server_data.txt is as follows:
41
+ ```
42
+ [login_name]\@[server_name]:directory
32
43
  ```
33
44
 
34
45
  ## Development
35
46
 
36
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
37
-
38
47
  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).
39
48
 
40
49
  ## Contributing
@@ -45,4 +54,3 @@ Bug reports and pull requests are welcome on GitHub at https://github.com/daddyg
45
54
  ## License
46
55
 
47
56
  The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
48
-
data/Rakefile CHANGED
@@ -1,14 +1,24 @@
1
1
  require "bundler/gem_tasks"
2
2
  require "rake/testtask"
3
3
  require 'yard'
4
+ require "rspec/core/rake_task"
5
+
6
+ RSpec::Core::RakeTask.new(:spec)
4
7
 
5
- #task :default => :test
6
8
  task :default do
7
9
  system 'rake -T'
8
10
  end
9
11
 
10
-
11
- YARD::Rake::YardocTask.new
12
+ desc "make documents by yard"
13
+ task :yard do
14
+ p command="hiki2md docs/readme.en.hiki > docs/README.en.md"
15
+ system command
16
+ p command="hiki2md docs/readme.ja.hiki > docs/README.ja.md"
17
+ system command
18
+ p command="mv docs/README.en.md ./README.md"
19
+ system command
20
+ YARD::Rake::YardocTask.new
21
+ end
12
22
 
13
23
  Rake::TestTask.new(:test) do |test|
14
24
  test.libs << "test"
@@ -17,10 +27,4 @@ Rake::TestTask.new(:test) do |test|
17
27
  test.verbose = true
18
28
  end
19
29
 
20
- desc "setenv for release from Kwansei gakuin."
21
- task :setenv do
22
- p command='setenv HTTP_PROXY http://proxy.ksc.kwansei.ac.jp:8080'
23
- system command
24
- p command='setenv HTTPS_PROXY http://proxy.ksc.kwansei.ac.jp:8080'
25
- system command
26
- end
30
+
data/docs/README.ja.md ADDED
@@ -0,0 +1,106 @@
1
+ # shunkuntype
2
+ touch typing習得をめざしたcommand line interface アプリ.
3
+
4
+ ## 【特徴】
5
+ - 軽い.
6
+ - こまめな練習が可能な一分間練習.
7
+ - 練習履歴のreportによる仲間内の「あおり」をおこなう工夫.
8
+
9
+ ## 【操作法】
10
+
11
+ ```tcsh
12
+ bob% shunkuntype
13
+ Shunkuntype says 'Hello world'.
14
+ Usage: shunkuntype [options]
15
+ -v, --version show program Version.
16
+ -c, --check Check speed
17
+ -d, --drill [VAL] one minute Drill [VAL]
18
+ -h, --history view training History
19
+ -p, --plot Plot personal data
20
+ -s, --submit Submit data to dmz0
21
+ --review [TAG] Review training, TAGs=html or hike
22
+ ```
23
+
24
+ ## 【具体的な手順】
25
+ ### インストール
26
+ 基本的な操作は全てterminalから行う.
27
+ #### 基本の動作
28
+ shunkuntypeが使用する3個のdata(training, speed, server)は~/.shunkuntypeに保存される.
29
+
30
+ #### install
31
+ gemがinstallするdirectoryのownerの権限によってはsudoが必要かもしれない.
32
+ ```
33
+ bob% sudo gem install shunkuntype
34
+ ```
35
+
36
+ ### スピードチェック(-c)
37
+ ```tcsh
38
+ bob% shunkuntype -c
39
+ Shunkuntype says 'Hello world'.
40
+ ./shunkuntype_speed_data.txt opened succcessfully
41
+ require next help directory temporary chomp delete catenate puts kill move working scan line background change exit delete verbose forward meta close quit paste text input suspend previous region output while end list print loop open manual list yank cut save other print foreground file copy current home backward enter ascii gets
42
+
43
+ 20 words should be cleared.
44
+ Type return-key to start.
45
+ q \ w \ e \ r t \ y u \ i \ o \ p
46
+ a \ s \ d \ f g \ h j \ k \ l \ ; enter
47
+ sh z \ x \ c \ v b \ n m \ , \ . \ shift
48
+ 1
49
+ require
50
+ require
51
+ ```
52
+ で20単語を何秒で打てるかをチェックできる.
53
+
54
+ ### one minute drill(-d)
55
+ ```tcsh
56
+ bob% shunkuntype -d 5
57
+ Shunkuntype says 'Hello world'.
58
+ q \ w \ e \ r t \ y u \ i \ o \ p
59
+ a \ s \ d \ f g \ h j \ k \ l \ ; enter
60
+ sh z \ x \ c \ v b \ n m \ , \ . \ shift
61
+ deed did feed freed red deer
62
+ duke did free red deeded dike
63
+ jeered duke fed jeered jeerer
64
+
65
+ Repeat above sentences. Type return-key to start.
66
+ deed did feed freed red deer
67
+ ```
68
+ -dの後の引数で指定したNoのdrillを実行.
69
+
70
+ ### reportのsubmit(-s)
71
+ ~/.shunkuntype/server_data.txtに書かれた提出先server directoryに頭のユーザー名で保存される.
72
+ ```ruby
73
+ login名@sever名:ディレクトリ
74
+ ```
75
+ ```tcsh
76
+ bob% shunkuntype -s
77
+ Shunkuntype says 'Hello world'.
78
+ "bob"
79
+ "bob"
80
+ shunkuntype_training_data.txt 100% 3618 3.5KB/s 00:00
81
+ shunkuntype_speed_data.txt 100% 862 0.8KB/s 00:00
82
+ ```
83
+
84
+
85
+ ### 練習履歴の表示(-h)
86
+ 練習履歴の表示は-hでされる.
87
+ ```tcsh
88
+ bob% shunkuntype --history
89
+ Shunkuntype says 'Hello world'.
90
+ You've finished Basic drills of...
91
+ hour | contents | step
92
+ 0 | frdejuki 1,2,3,4 | 1,2,3,4,
93
+ 1 | tgyh 5,6,7,8,9 | 5,6,7,8,9,
94
+ 2 | vbc 10,11,12,13,14 | 10,11,12,13,14,
95
+ 3 | mn, 15,16,17,18,19 | 15,16,17,18,19,
96
+ 4 | consol 20,21,22,23,24 | 20,
97
+ 5 | swx 25,26,27,28,29 |
98
+ 6 | lo. 30,31,32,33,34 | 32,
99
+ 7 | aqz 35,36,37,38,39 |
100
+ 8 | ;p 40,41,42,43,44,45 |
101
+ 9 | consol 46,47,48,49,50 | 47,48,49,
102
+ To continue one minute training: shunkuntype -d 21.
103
+ ```
104
+
105
+ ### 練習履歴の表示(-p)
106
+ 個人の練習履歴のグラフをplot.gnuplotがないとerrorとなる.
@@ -0,0 +1,53 @@
1
+ ! Shunkuntype
2
+
3
+ Touch type mastering application.
4
+
5
+ !! Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ <<<ruby
10
+ gem 'shunkuntype'
11
+ >>>
12
+
13
+ And then execute:
14
+ $ bundle
15
+ Or install it yourself as:
16
+ $ gem install shunkuntype
17
+
18
+ !! Usage
19
+ <<<ruby
20
+ Usage: shunkuntype [options]
21
+ -v, --version show program Version.
22
+ -c, --check Check speed
23
+ -d, --drill [VAL] one minute Drill [VAL]
24
+ -h, --history view training History
25
+ -p, --plot Plot personal data
26
+ -s, --submit Submit data to dmz0
27
+ --review [VALUE] Review training, VALUE=html or hiki
28
+ >>>
29
+ For the first time, shunkun makes .shunkuntype directory on the home dir,
30
+ and put three data files(training, speed, server).
31
+ The training and speed data will be sent to the server, when --submit.
32
+ The --review will get the data download, and show the training and speed data in hiki or html formats,
33
+ where the png files created by gnuplot.
34
+
35
+ For activating server all training member has ssh access, and the write permission on the directory.
36
+ The format of the server_data.txt is as follows:
37
+ <<<
38
+ [login_name]\@[server_name]:directory
39
+ >>>
40
+
41
+ !! Development
42
+
43
+ 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).
44
+
45
+ !! Contributing
46
+
47
+ Bug reports and pull requests are welcome on GitHub at https://github.com/daddygongon/shunkuntype. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](contributor-covenant.org) code of conduct.
48
+
49
+
50
+ !! License
51
+
52
+ The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
53
+
@@ -0,0 +1,104 @@
1
+ !shunkuntype
2
+ touch typing習得をめざしたcommand line interface アプリ.
3
+
4
+ !!【特徴】
5
+ * 軽い.
6
+ * こまめな練習が可能な一分間練習.
7
+ * 練習履歴のreportによる仲間内の「あおり」をおこなう工夫.
8
+
9
+ !!【操作法】
10
+
11
+ <<< tcsh
12
+ bob% shunkuntype
13
+ Shunkuntype says 'Hello world'.
14
+ Usage: shunkuntype [options]
15
+ -v, --version show program Version.
16
+ -c, --check Check speed
17
+ -d, --drill [VAL] one minute Drill [VAL]
18
+ -h, --history view training History
19
+ -p, --plot Plot personal data
20
+ -s, --submit Submit data to dmz0
21
+ --review [TAG] Review training, TAGs=html or hike
22
+ >>>
23
+
24
+ !!【具体的な手順】
25
+ !!!インストール
26
+ 基本的な操作は全てterminalから行う.
27
+ !!!!基本の動作
28
+ shunkuntypeが使用する3個のdata(training, speed, server)は~/.shunkuntypeに保存される.
29
+
30
+ !!!!install
31
+ gemがinstallするdirectoryのownerの権限によってはsudoが必要かもしれない.
32
+ bob% sudo gem install shunkuntype
33
+
34
+ !!!スピードチェック(-c)
35
+ <<<tcsh
36
+ bob% shunkuntype -c
37
+ Shunkuntype says 'Hello world'.
38
+ ./shunkuntype_speed_data.txt opened succcessfully
39
+ require next help directory temporary chomp delete catenate puts kill move working scan line background change exit delete verbose forward meta close quit paste text input suspend previous region output while end list print loop open manual list yank cut save other print foreground file copy current home backward enter ascii gets
40
+
41
+ 20 words should be cleared.
42
+ Type return-key to start.
43
+ q \ w \ e \ r t \ y u \ i \ o \ p
44
+ a \ s \ d \ f g \ h j \ k \ l \ ; enter
45
+ sh z \ x \ c \ v b \ n m \ , \ . \ shift
46
+ 1
47
+ require
48
+ require
49
+ >>>
50
+ で20単語を何秒で打てるかをチェックできる.
51
+
52
+ !!!one minute drill(-d)
53
+ <<<tcsh
54
+ bob% shunkuntype -d 5
55
+ Shunkuntype says 'Hello world'.
56
+ q \ w \ e \ r t \ y u \ i \ o \ p
57
+ a \ s \ d \ f g \ h j \ k \ l \ ; enter
58
+ sh z \ x \ c \ v b \ n m \ , \ . \ shift
59
+ deed did feed freed red deer
60
+ duke did free red deeded dike
61
+ jeered duke fed jeered jeerer
62
+
63
+ Repeat above sentences. Type return-key to start.
64
+ deed did feed freed red deer
65
+ >>>
66
+ -dの後の引数で指定したNoのdrillを実行.
67
+
68
+ !!! reportのsubmit(-s)
69
+ ~/.shunkuntype/server_data.txtに書かれた提出先server directoryに頭のユーザー名で保存される.
70
+ <<<ruby
71
+ login名@sever名:ディレクトリ
72
+ >>>
73
+ <<< tcsh
74
+ bob% shunkuntype -s
75
+ Shunkuntype says 'Hello world'.
76
+ "bob"
77
+ "bob"
78
+ shunkuntype_training_data.txt 100% 3618 3.5KB/s 00:00
79
+ shunkuntype_speed_data.txt 100% 862 0.8KB/s 00:00
80
+ >>>
81
+
82
+
83
+ !!! 練習履歴の表示(-h)
84
+ 練習履歴の表示は-hでされる.
85
+ <<< tcsh
86
+ bob% shunkuntype --history
87
+ Shunkuntype says 'Hello world'.
88
+ You've finished Basic drills of...
89
+ hour | contents | step
90
+ 0 | frdejuki 1,2,3,4 | 1,2,3,4,
91
+ 1 | tgyh 5,6,7,8,9 | 5,6,7,8,9,
92
+ 2 | vbc 10,11,12,13,14 | 10,11,12,13,14,
93
+ 3 | mn, 15,16,17,18,19 | 15,16,17,18,19,
94
+ 4 | consol 20,21,22,23,24 | 20,
95
+ 5 | swx 25,26,27,28,29 |
96
+ 6 | lo. 30,31,32,33,34 | 32,
97
+ 7 | aqz 35,36,37,38,39 |
98
+ 8 | ;p 40,41,42,43,44,45 |
99
+ 9 | consol 46,47,48,49,50 | 47,48,49,
100
+ To continue one minute training: shunkuntype -d 21.
101
+ >>>
102
+
103
+ !!! 練習履歴の表示(-p)
104
+ 個人の練習履歴のグラフをplot.gnuplotがないとerrorとなる.
data/lib/shunkuntype.rb CHANGED
@@ -53,6 +53,7 @@ module Shunkuntype
53
53
  server_info=File.readlines(Shunkuntype::SERVER_FILE)
54
54
  p server_directory=server_info[0].chomp
55
55
  Dir.mktmpdir('shunkun'){|tmp_dir|
56
+ p tmp_dir
56
57
  FileUtils.mkdir_p(File.join(tmp_dir,'mem_data'))
57
58
  system "scp -r #{server_directory}/* #{tmp_dir}/mem_data"
58
59
  # write data to file
@@ -2,7 +2,7 @@ require 'fileutils'
2
2
  require 'tmpdir'
3
3
 
4
4
  module Shunkuntype
5
- VERSION = "1.0.2"
5
+ VERSION = "1.0.3"
6
6
  data_dir = File.join(ENV['HOME'], '.shunkuntype')
7
7
  # SPEED_FILE="./shunkuntype_speed_data.txt"
8
8
  SPEED_FILE=File.join(data_dir,"speed_data.txt")
data/shunkuntype.gemspec CHANGED
@@ -32,5 +32,6 @@ Gem::Specification.new do |spec|
32
32
  spec.add_development_dependency "bundler", "~> 1.10"
33
33
  spec.add_development_dependency "rake", "~> 10.0"
34
34
  spec.add_development_dependency "yard", "~> 0.8"
35
- spec.add_development_dependency "test-unit"
35
+ # spec.add_development_dependency "test-unit"
36
+ spec.add_development_dependency "rspec"
36
37
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shunkuntype
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shigeto R. Nishitani
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-03-11 00:00:00.000000000 Z
11
+ date: 2016-04-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: systemu
@@ -81,7 +81,7 @@ dependencies:
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0.8'
83
83
  - !ruby/object:Gem::Dependency
84
- name: test-unit
84
+ name: rspec
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
87
  - - ">="
@@ -106,6 +106,7 @@ files:
106
106
  - ".rspec"
107
107
  - ".ruby-version"
108
108
  - ".travis.yml"
109
+ - ".yardopts"
109
110
  - CODE_OF_CONDUCT.md
110
111
  - Gemfile
111
112
  - LICENSE.txt
@@ -114,7 +115,9 @@ files:
114
115
  - Rakefile.rb
115
116
  - bin/console
116
117
  - bin/setup
117
- - config.ru
118
+ - docs/README.ja.md
119
+ - docs/readme.en.hiki
120
+ - docs/readme.ja.hiki
118
121
  - exe/shunkuntype
119
122
  - lib/data/STEP-1.txt
120
123
  - lib/data/STEP-10.txt
@@ -181,9 +184,6 @@ files:
181
184
  - lib/shunkuntype/training.rb
182
185
  - lib/shunkuntype/version.rb
183
186
  - shunkuntype.gemspec
184
- - tmp.data
185
- - tmp.txt
186
- - tmp1/always_restart.txt
187
187
  homepage: https://github.com/daddygongon/shunkuntype
188
188
  licenses:
189
189
  - MIT
data/config.ru DELETED
@@ -1,3 +0,0 @@
1
- require 'application'
2
-
3
- run Shunkuntype::Application
data/tmp.data DELETED
@@ -1,72 +0,0 @@
1
- -114.75 68.00 1.00
2
- -114.75 55.00 2.00
3
- -114.75 52.00 3.00
4
- -114.75 42.00 4.00
5
- -114.75 48.00 5.00
6
- -114.74 57.00 6.00
7
- -114.74 52.00 7.00
8
- -114.74 50.00 8.00
9
- -114.74 55.00 9.00
10
- -114.74 55.00 10.00
11
- -113.94 39.00 11.00
12
- -113.93 48.00 12.00
13
- -112.77 51.00 13.00
14
- -111.91 58.51 16.35
15
- -111.91 57.00 17.35
16
- -111.89 43.54 20.27
17
- -111.77 59.00 21.27
18
- -107.75 49.68 24.37
19
- -107.72 56.00 25.37
20
- -104.91 36.67 25.67
21
- -104.90 39.00 26.67
22
- -104.90 69.00 27.67
23
- -104.76 12.00 27.75
24
- -104.76 24.00 27.83
25
- -104.76 52.06 30.10
26
- -104.76 55.00 31.10
27
- -103.08 57.00 32.10
28
- -103.08 53.00 33.10
29
- -103.08 47.14 33.57
30
- -103.07 60.00 34.57
31
- -103.07 60.00 34.82
32
- -102.81 37.50 35.08
33
- -102.80 60.00 35.33
34
- -102.80 64.00 35.58
35
- -102.80 38.95 36.53
36
- -102.79 45.84 38.02
37
- -102.79 60.00 38.27
38
- -102.79 64.00 38.52
39
- -102.79 36.00 39.27
40
- -102.78 0.00 39.32
41
- -102.78 20.00 39.87
42
- -102.78 56.00 40.12
43
- -102.77 24.00 40.37
44
- -102.68 60.00 40.62
45
- -102.68 40.00 41.67
46
- -102.67 48.00 41.92
47
- -102.67 16.00 42.17
48
- -102.67 32.00 42.42
49
- -102.67 60.00 42.67
50
- -102.67 45.00 43.20
51
- -102.66 37.06 43.77
52
- -102.66 64.00 44.02
53
- -102.66 56.00 44.27
54
- -102.66 56.00 44.52
55
- -102.66 45.88 45.65
56
- -102.66 20.00 45.70
57
- -102.66 20.00 45.95
58
- -102.10 56.00 46.20
59
- -99.96 43.00 49.20
60
- -52.05 69.00 50.20
61
- -51.99 33.00 50.53
62
- -51.07 54.00 50.87
63
- -51.06 51.00 51.20
64
- -51.06 54.00 51.53
65
- -50.99 57.00 52.53
66
- -50.84 48.00 53.53
67
- -50.83 55.00 54.53
68
- -50.83 48.00 55.53
69
- -50.83 49.00 56.53
70
- -50.83 54.00 57.53
71
- -42.07 39.00 58.53
72
- -0.98 44.00 59.53
data/tmp.txt DELETED
@@ -1,6 +0,0 @@
1
- set title "Elapsed time vs Work minutes [min]"
2
- set xlabel "Elapsed time[hrs]"
3
- set ylabel "Work minutes [min]"
4
- set xtics 0 2
5
- plot "./tmp.data" using 1:3 w st
6
-
File without changes