dl-nippo-helper 0.9.1 → 0.9.2

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: 605fc3bf2cfd40c402db750a27f0251a7a9b33ba
4
- data.tar.gz: 5c33fe6ff9c4bd0e4fa5cd156f452d01b89aa9e3
3
+ metadata.gz: eb39b821751c8472e7d654f8f4b2f1c5379ef297
4
+ data.tar.gz: 25e58c85a82502f6b92cdd104ce282214e6bbf32
5
5
  SHA512:
6
- metadata.gz: e40743cae051ec262128b1266555d2ef112982c691561606de832de8b014c80cad698213e16fb7c2383cb269eda884317bbec54f5e91701ad0e126d61625aaa4
7
- data.tar.gz: 41d7d93b7c9f5b2ded61e1128a1bf0d153da30dcc30c69fed5dca58c797b37645ff75ea0d5f3aee2549bcec8dbd3bcc83944621d0b1788b6b72c00602d9921c4
6
+ metadata.gz: 2108e37d39a90d96c2aacc86da377397c9335fb927a722f6947ec4a758d7ed0454f0b26b8526878fafebe4cf5ef88cab0eeb0088d9ca01d7261d42db5c537363
7
+ data.tar.gz: 2cfce04c54eb414e4c2038d26541f443b20e049cd094cc8af32f23b5d85afa4e01e4fc45eceee677acec508a009e9c5f928198978430d1683f9deaca769fe46a
data/README.md CHANGED
@@ -1,15 +1,15 @@
1
1
  # Nippo
2
+ Nippo release the pain of registering daily task records (so-called `Nippo`) at the end of each month.
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/nippo`. To experiment with that code, run `bin/console` for an interactive prompt.
4
-
5
- TODO: Delete this and the text above, and describe your gem
4
+ ## Prerequisite
5
+ * Ruby 2.0.0 or higher
6
6
 
7
7
  ## Installation
8
8
 
9
9
  Add this line to your application's Gemfile:
10
10
 
11
- ```ruby
12
- gem 'nippo'
11
+ ```
12
+ gem 'dl-nippo-helper'
13
13
  ```
14
14
 
15
15
  And then execute:
@@ -18,24 +18,33 @@ And then execute:
18
18
 
19
19
  Or install it yourself as:
20
20
 
21
- $ gem install nippo
21
+ $ gem install dl-nippo-helper
22
22
 
23
23
  ## Usage
24
+ You can register a `Nippo` from `nippo-register`. Here is the usage.
25
+ ```
26
+ Usage: register [parameters]
27
+
28
+ Parameters (All parameters are mandatory for registry):
29
+ -d, --day [day] the day to register (DEFAULT: today)
30
+ -m, --month [mon] the month to register (DEFAULT: current month)
31
+ -y, --year [year] the year to register (DEFAULT: current year)
32
+ -s, --server hostaddr host address of Nippo servalueice
33
+ -U, --basic_user uid userid of BASIC authentication
34
+ -P, --basic_password passwd password to access Nippo servalueice
35
+ -u, --login_user uid userid of your-self to login
36
+ -p, --login_password passwd password which is related to your account
37
+ ```
24
38
 
25
- TODO: Write usage instructions here
26
-
27
- ## Development
28
-
29
- 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.
30
-
31
- 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).
32
-
33
- ## Contributing
34
-
35
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/nippo. 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.
36
-
39
+ To register a `Nippo` on current day, you can do it with following. Context of `Nippo` would be specified from STDIN.
40
+ ```
41
+ $ nippo-register -s 203.209.xxx.yyy \
42
+ -U nippo-user \
43
+ -P password \
44
+ -u ohyama-hiroyasu\
45
+ -p XXXXXXX < context-file
46
+ ```
37
47
 
38
48
  ## License
39
49
 
40
50
  The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
41
-
@@ -17,8 +17,8 @@ module Nippo
17
17
  :day => opts[:day],
18
18
  :month => opts[:month],
19
19
  :year => opts[:year],
20
- :code => TASK_CODE,
21
- :title => TASK_TITLE,
20
+ :code => opts[:task_code],
21
+ :title => opts[:task_title],
22
22
  :context => Nippo::Task.get_context,
23
23
  })
24
24
  begin
@@ -34,6 +34,7 @@ module Nippo
34
34
  end
35
35
  rescue Exception => e
36
36
  p e
37
+ puts e.backtrace
37
38
  end
38
39
  end
39
40
  end
@@ -62,11 +63,15 @@ Parameters (All parameters are mandatory for registry):
62
63
  options[:login_u] = value }
63
64
  opt.on('-p passwd', '--login_password', 'password which is related to your account') { |value|
64
65
  options[:login_p] = value }
66
+ opt.on('-c code', '--task_code', 'task-code which is configured in company (DEFAULT: 03000800159)') { |value|
67
+ options[:task_code] = value }
68
+ opt.on('-t title', '--task_title', 'describes the title of creating task (DEFAULT: 定常業務)') { |value|
69
+ options[:task_title] = value }
65
70
 
66
71
  opt.parse! ARGV
67
72
  end
68
73
 
69
- DEFAULT_KEYS = [:day, :month, :year, :server, :auth_u, :auth_p, :login_u, :login_p]
74
+ DEFAULT_KEYS = [:day, :month, :year, :server, :auth_u, :auth_p, :login_u, :login_p, :task_code, :task_title]
70
75
  def set_default_params(opts)
71
76
  ret = {}
72
77
  DEFAULT_KEYS.each do |key|
@@ -79,6 +84,10 @@ def set_default_params(opts)
79
84
  value != nil ? value : Time.now.month
80
85
  when :year
81
86
  value != nil ? value : Time.now.year
87
+ when :task_title
88
+ value != nil ? value : Nippo::TASK_TITLE
89
+ when :task_code
90
+ value != nil ? value : Nippo::TASK_CODE
82
91
  else
83
92
  value
84
93
  end
@@ -1,3 +1,3 @@
1
1
  module Nippo
2
- VERSION = "0.9.1"
2
+ VERSION = "0.9.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dl-nippo-helper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.1
4
+ version: 0.9.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hiroyasu OHYAMA
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-12-21 00:00:00.000000000 Z
11
+ date: 2015-12-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -74,7 +74,6 @@ files:
74
74
  - lib/nippo/task.rb
75
75
  - lib/nippo/version.rb
76
76
  - lib/plugin/.gitkeep
77
- - lib/plugin/xaas.rb
78
77
  - nippo.gemspec
79
78
  homepage: https://rubygems.org/gems/dl-nippo-helper
80
79
  licenses:
@@ -1,27 +0,0 @@
1
- module Nippo
2
- # this class generate random task
3
- class Task
4
- DEFAULT_LENGTH = 4
5
-
6
- PATTERN = [
7
- '* タスク整理',
8
- '* チームミーティング',
9
- '* ドキュメント整理',
10
- '* 1on1',
11
- '* 社外ミーティング',
12
- '* 資料作成',
13
- '* 打ち合わせ',
14
- '* 開発',
15
- '* 報告書作成',
16
- '* 案件対応',
17
- ]
18
-
19
- def self.get_context
20
- ret = ""
21
- DEFAULT_LENGTH.times do
22
- ret += PATTERN[rand(PATTERN.size)] + "\n"
23
- end
24
- ret
25
- end
26
- end
27
- end