slack-smart-bot 1.1.1 → 1.1.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
  SHA256:
3
- metadata.gz: f19a34da68467369374e1e2bdf6a59413b95c97c27f8a7a975282c1e94ec04f6
4
- data.tar.gz: bceb757371af914f3c3182c6c51bdc28b759f5dbb7e83392f032bc91f5a44bfe
3
+ metadata.gz: e95f2ae2ff93b7b14be4183854b013429cb80d330637540d378d803f81f4de1a
4
+ data.tar.gz: d2fec7504227143986243386a573677de783aefac8ea23d5212d3a407ff5aade
5
5
  SHA512:
6
- metadata.gz: 2f94184d31ab800e6d21405c6886b2469b8c4e38effedd6e23be84b5af2b4d00ad2f908e2ae74c7d8e7574b7fd62427bbb94c305760294430370d7547326425f
7
- data.tar.gz: 52a4d5228a5f4ef0725711e0356b49010f04750c939cdcd6bb1d56556633692ba610145f04626af1375764fcf8677427ac720bd0eeb26872a57587482c9d664a
6
+ metadata.gz: 52cee63935fe5d5ea229d4c09a78353e8b2da14c6f21a797e16f8aa580bb484f328d998c28a605bc44618236aa10fa668e372b55dc03ab27a9fdf57e28b3fda4
7
+ data.tar.gz: 469207f67515b2dab8a451a281bdc316b6482e59469359c60da2b675c5a6e3a10336e29f8421f35c3670927f11c1e0a839aeee0cda3c5c09c3e82264d5300217
@@ -48,7 +48,7 @@ class SlackSmartBot
48
48
  every_in_seconds = number_time.to_i
49
49
  else # time
50
50
  at = number_time
51
- if next_run.strftime("%k:%M:%S") < number_time
51
+ if next_run.strftime("%H:%M:%S") < number_time
52
52
  nt = number_time.split(":")
53
53
  next_run = Time.new(next_run.year, next_run.month, next_run.day, nt[0], nt[1], nt[2])
54
54
  else
@@ -17,7 +17,7 @@ class SlackSmartBot
17
17
  @routines[@channel_id][name][:status] = :on
18
18
  if @routines[@channel_id][name][:at]!=''
19
19
  started = Time.now
20
- if started.strftime("%k:%M:%S") < @routines[@channel_id][name][:at]
20
+ if started.strftime("%H:%M:%S") < @routines[@channel_id][name][:at]
21
21
  nt = @routines[@channel_id][name][:at].split(":")
22
22
  next_run = Time.new(started.year, started.month, started.day, nt[0], nt[1], nt[2])
23
23
  else
@@ -75,9 +75,9 @@ class SlackSmartBot
75
75
  def create_routine_thread(name)
76
76
  t = Thread.new do
77
77
  while @routines.key?(@channel_id) and @routines[@channel_id].key?(name)
78
- @logger.info "Routine: #{@routines[@channel_id][name].inspect}"
79
78
  started = Time.now
80
79
  if @status == :on and @routines[@channel_id][name][:status] == :on
80
+ @logger.info "Routine: #{@routines[@channel_id][name].inspect}"
81
81
  if @routines[@channel_id][name][:file_path].match?(/\.rb$/i)
82
82
  ruby = "ruby "
83
83
  else
@@ -117,7 +117,7 @@ class SlackSmartBot
117
117
  require "time"
118
118
  every_in_seconds = Time.parse(@routines[@channel_id][name][:next_run]) - Time.now
119
119
  elsif @routines[@channel_id][name][:at] != "" #coming from start after pause for 'at'
120
- if started.strftime("%k:%M:%S") < @routines[@channel_id][name][:at]
120
+ if started.strftime("%H:%M:%S") < @routines[@channel_id][name][:at]
121
121
  nt = @routines[@channel_id][name][:at].split(":")
122
122
  next_run = Time.new(started.year, started.month, started.day, nt[0], nt[1], nt[2])
123
123
  else
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: slack-smart-bot
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mario Ruiz
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-10-28 00:00:00.000000000 Z
11
+ date: 2019-10-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: slack-ruby-client