ruboty-chinachu 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/README.md +4 -0
- data/lib/ruboty/chinachu/actions/program.rb +19 -2
- data/lib/ruboty/chinachu/actions/reserves.rb +1 -1
- data/lib/ruboty/chinachu/version.rb +1 -1
- data/ruboty-chinachu.gemspec +1 -1
- metadata +24 -24
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ba003e813b068db6cd771978c52c7d0637057ad6
|
4
|
+
data.tar.gz: 14ef604604772d698c252b09135c739111af009d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f300f21c6d4376fb368b52fae8f1b1911002a07938da312975a448e26832796ae88854e4b32ce1ead3feadfe1164c6f28d821b475bcd6000d749e6b84ee3fbf2
|
7
|
+
data.tar.gz: 219153a308829fb2f526c55cefa9a616eee0e9bdef335e9b8218936a146abeb6b92ebf0b098f50a3d443db1f1b04963c4e908b4f87172cb933f880c9a4ba88c5
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -5,7 +5,12 @@ module Ruboty
|
|
5
5
|
|
6
6
|
def reserve
|
7
7
|
begin
|
8
|
-
|
8
|
+
if is_reserved?(program_id)
|
9
|
+
chinachu.unskip_reserved_program(program_id)
|
10
|
+
else
|
11
|
+
chinachu.reserve_program(program_id)
|
12
|
+
end
|
13
|
+
|
9
14
|
program = chinachu.program(program_id)
|
10
15
|
message.reply("Reserved #{summary(program, PROGRAM_FORMAT)}")
|
11
16
|
rescue Goraku::Status409
|
@@ -18,7 +23,11 @@ module Ruboty
|
|
18
23
|
def delete_reservation
|
19
24
|
begin
|
20
25
|
program = chinachu.reserves_program(program_id)
|
21
|
-
|
26
|
+
if program.isManualReserved
|
27
|
+
chinachu.delete_reserved_program(program_id)
|
28
|
+
else
|
29
|
+
chinachu.skip_reserved_program(program_id)
|
30
|
+
end
|
22
31
|
message.reply("Delete reservation #{summary(program, PROGRAM_FORMAT)}")
|
23
32
|
rescue Goraku::Status404
|
24
33
|
message.reply("Id #{program_id} is not reserved")
|
@@ -32,6 +41,14 @@ module Ruboty
|
|
32
41
|
def program_id
|
33
42
|
message[:program_id]
|
34
43
|
end
|
44
|
+
|
45
|
+
def is_reserved?(program_id)
|
46
|
+
begin
|
47
|
+
!! chinachu.reserves_program(program_id)
|
48
|
+
rescue
|
49
|
+
false
|
50
|
+
end
|
51
|
+
end
|
35
52
|
end
|
36
53
|
end
|
37
54
|
end
|
@@ -14,7 +14,7 @@ module Ruboty
|
|
14
14
|
after_twenty_four_hour = current + (60 * 60 * 24)
|
15
15
|
reservation_list.select do |program|
|
16
16
|
record_start_at = Time.at(program.start / 1000)
|
17
|
-
current < record_start_at && record_start_at < after_twenty_four_hour
|
17
|
+
! program.isSkip && current < record_start_at && record_start_at < after_twenty_four_hour
|
18
18
|
end
|
19
19
|
end
|
20
20
|
|
data/ruboty-chinachu.gemspec
CHANGED
@@ -17,7 +17,7 @@ Gem::Specification.new do |spec|
|
|
17
17
|
spec.require_paths = ["lib"]
|
18
18
|
|
19
19
|
spec.add_runtime_dependency "ruboty", "~> 1.2"
|
20
|
-
spec.add_runtime_dependency "goraku", "~> 0.
|
20
|
+
spec.add_runtime_dependency "goraku", "~> 0.2"
|
21
21
|
spec.add_development_dependency "bundler", "~> 1.10"
|
22
22
|
spec.add_development_dependency "rake", "~> 10.0"
|
23
23
|
spec.add_development_dependency "rspec"
|
metadata
CHANGED
@@ -1,111 +1,111 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruboty-chinachu
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kinoshita.Yasuhiro
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-10-
|
11
|
+
date: 2015-10-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ruboty
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ~>
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '1.2'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ~>
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '1.2'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: goraku
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ~>
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 0.
|
33
|
+
version: '0.2'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ~>
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 0.
|
40
|
+
version: '0.2'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: bundler
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - ~>
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '1.10'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - ~>
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '1.10'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rake
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - ~>
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '10.0'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- -
|
66
|
+
- - ~>
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '10.0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: rspec
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- -
|
73
|
+
- - '>='
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: '0'
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- -
|
80
|
+
- - '>='
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: pry
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- -
|
87
|
+
- - '>='
|
88
88
|
- !ruby/object:Gem::Version
|
89
89
|
version: '0'
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- -
|
94
|
+
- - '>='
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: wtfpl_init
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
|
-
- -
|
101
|
+
- - '>='
|
102
102
|
- !ruby/object:Gem::Version
|
103
103
|
version: '0'
|
104
104
|
type: :development
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
|
-
- -
|
108
|
+
- - '>='
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '0'
|
111
111
|
description: Ruboty plugin work with Chinachu server
|
@@ -115,9 +115,9 @@ executables: []
|
|
115
115
|
extensions: []
|
116
116
|
extra_rdoc_files: []
|
117
117
|
files:
|
118
|
-
-
|
119
|
-
-
|
120
|
-
-
|
118
|
+
- .gitignore
|
119
|
+
- .rspec
|
120
|
+
- .travis.yml
|
121
121
|
- CHANGELOG.md
|
122
122
|
- CODE_OF_CONDUCT.md
|
123
123
|
- Gemfile
|
@@ -143,17 +143,17 @@ require_paths:
|
|
143
143
|
- lib
|
144
144
|
required_ruby_version: !ruby/object:Gem::Requirement
|
145
145
|
requirements:
|
146
|
-
- -
|
146
|
+
- - '>='
|
147
147
|
- !ruby/object:Gem::Version
|
148
148
|
version: '0'
|
149
149
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
150
150
|
requirements:
|
151
|
-
- -
|
151
|
+
- - '>='
|
152
152
|
- !ruby/object:Gem::Version
|
153
153
|
version: '0'
|
154
154
|
requirements: []
|
155
155
|
rubyforge_project:
|
156
|
-
rubygems_version: 2.
|
156
|
+
rubygems_version: 2.0.14
|
157
157
|
signing_key:
|
158
158
|
specification_version: 4
|
159
159
|
summary: Ruboty plugin work with Chinachu server
|