rufus-scheduler 3.3.0 → 3.3.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f5efdaec8fd127103673241abfcb7a14d9135aef
4
- data.tar.gz: 95b4b8f72eaea194b946e9b6738fa42b9086fc2a
3
+ metadata.gz: 3e5ea35fe943c7476c883886d37a31dad2490747
4
+ data.tar.gz: 4f117b63d048e7c5e4f30e54fe2274c07be6f213
5
5
  SHA512:
6
- metadata.gz: d511d09f4a9c0deffd90a97005d0824b891a55a92236cf885fde676830960ebbaad407d1a4fd4817b81d20d0f7ef9a504ad35b96a58b7a195e30bae89eda0046
7
- data.tar.gz: d4da5209b9d01d6a4c861ed022b36971377762ae31ec785d068c0070af3e098e0ff0f6939cd128a96f5752deb74c49daf798a074d6a7557fa80d125f4286dcd5
6
+ metadata.gz: 2aed463e8e97e249abd63490163107cbe3a88ae1fae63fc8f0eee7cda0c65a804c0fa4867efa5f156fbae6fa0bb7b939749096d979011897452c512b0ed4cedd
7
+ data.tar.gz: 262817bfd8f0e4ea38061b0858ea303ec31d493872aeb45ca8c091c9634814a63b320b1ecf0c3254b028e79cc8451937016f01978bb3563bd4567d795f3ca13d
data/CHANGELOG.txt CHANGED
@@ -2,6 +2,13 @@
2
2
  = rufus-scheduler CHANGELOG.txt
3
3
 
4
4
 
5
+ == rufus-scheduler - 3.3.1 released 2016-12-03
6
+
7
+ - gh-222 fall back on ENV['TZ'] when Time.now.zone is something
8
+ like "中国标准时间" (ask for "Asia/Shanghai"), thanks to
9
+ https://github.com/lovingyu
10
+
11
+
5
12
  == rufus-scheduler - 3.3.0 released 2016-11-28
6
13
 
7
14
  - Bring in Piavka's Job#trigger_off_schedule, gh-214
data/CREDITS.txt CHANGED
@@ -51,6 +51,7 @@
51
51
 
52
52
  == Feedback
53
53
 
54
+ - lovingyu - https://github.com/lovingyu - fallback to ENV['TZ'] - gh-222
54
55
  - Ramon Tayag - https://github.com/ramontayag - prevent day 0 in cronlines
55
56
  - Akinori Musha - https://github.com/knu - ENV['TZ'] setting is harmful
56
57
  - Nicolás Satragno - https://twitter.com/nsatragno - parse_to_time vs Date
data/README.md CHANGED
@@ -129,6 +129,7 @@ Yes, issues can be reported in [rufus-scheduler issues](https://github.com/jmett
129
129
  * [Passenger in-depth spawn methods (smart spawning)](https://www.phusionpassenger.com/library/indepth/ruby/spawn_methods/#smart-spawning-hooks)
130
130
  * [The scheduler comes up when running the Rails console or a Rake task](https://github.com/jmettraux/rufus-scheduler#avoid-scheduling-when-running-the-ruby-on-rails-console)
131
131
  * [I don't get any of this, I just want it to work in my Rails application](#so-rails)
132
+ * [I get "zotime.rb:41:in `initialize': cannot determine timezone from nil"](#i-get-zotimerb41in-initialize-cannot-determine-timezone-from-nil)
132
133
 
133
134
 
134
135
  ## scheduling
@@ -1417,7 +1418,39 @@ end
1417
1418
  # or even
1418
1419
 
1419
1420
  Rufus::Scheduler.parse("2013-12-12 14:00 Pacific/Saipan")
1420
- # => 2013-12-12 04:00:00 UTC
1421
+ # => #<Rufus::Scheduler::ZoTime:0x007fb424abf4e8 @seconds=1386820800.0, @zone=#<TZInfo::DataTimezone: Pacific/Saipan>, @time=nil>
1422
+ ```
1423
+
1424
+ ### I get "zotime.rb:41:in `initialize': cannot determine timezone from nil"
1425
+
1426
+ For when you see an error like:
1427
+ ```
1428
+ rufus-scheduler/lib/rufus/scheduler/zotime.rb:41:
1429
+ in `initialize':
1430
+ cannot determine timezone from nil (etz:nil,tnz:"中国标准时间",tzid:nil)
1431
+ (ArgumentError)
1432
+ from rufus-scheduler/lib/rufus/scheduler/zotime.rb:198:in `new'
1433
+ from rufus-scheduler/lib/rufus/scheduler/zotime.rb:198:in `now'
1434
+ from rufus-scheduler/lib/rufus/scheduler.rb:561:in `start'
1435
+ ...
1436
+ ```
1437
+
1438
+ It may happen on Windows or on systems that poor hints to Ruby on which timezone to use. It should be solved by setting explicitely the `ENV['TZ']` before the scheduler instantiation:
1439
+ ```ruby
1440
+ ENV['TZ'] = 'Asia/Shanghai'
1441
+ scheduler = Rufus::Scheduler.new
1442
+ scheduler.every '2s' do
1443
+ puts "#{Time.now} Hello #{ENV['TZ']}!"
1444
+ end
1445
+ ```
1446
+
1447
+ The value can be determined thanks to [https://en.wikipedia.org/wiki/List_of_tz_database_time_zones](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).
1448
+
1449
+ Use a "continent/city" identifier (for example "Asia/Shanghai"). Do not use an abbreviation (not "CST") and do not use a local time zone name (not "中国标准时间").
1450
+
1451
+ If the error persists, try to add the `tzinfo-data` to your Gemfile, as in:
1452
+ ```ruby
1453
+ gem 'tzinfo-data'
1421
1454
  ```
1422
1455
 
1423
1456
 
@@ -39,7 +39,7 @@ module Rufus
39
39
  require 'rufus/scheduler/job_array'
40
40
  require 'rufus/scheduler/locks'
41
41
 
42
- VERSION = '3.3.0'
42
+ VERSION = '3.3.1'
43
43
 
44
44
  #
45
45
  # A common error class for rufus-scheduler
@@ -39,7 +39,9 @@ class Rufus::Scheduler
39
39
  @zone = self.class.get_tzone(zone || :current)
40
40
 
41
41
  fail ArgumentError.new(
42
- "cannot determine timezone from #{zone.inspect}"
42
+ "cannot determine timezone from #{zone.inspect}" +
43
+ " (etz:#{ENV['TZ'].inspect},tnz:#{Time.now.zone.inspect}," +
44
+ "tzid:#{defined?(TZInfo::Data).inspect})"
43
45
  ) unless @zone
44
46
 
45
47
  @time = nil # cache for #to_time result
@@ -282,6 +284,7 @@ class Rufus::Scheduler
282
284
 
283
285
  # ok, it's a timezone then
284
286
 
287
+ ostr = str
285
288
  str = Time.now.zone if str == :current || str == :local
286
289
 
287
290
  # utc_offset
@@ -344,6 +347,13 @@ class Rufus::Scheduler
344
347
  ) if hr
345
348
  end
346
349
 
350
+ # last try with ENV['TZ']
351
+
352
+ z =
353
+ (ostr == :local || ostr == :current) &&
354
+ (::TZInfo::Timezone.get(ENV['TZ']) rescue nil)
355
+ return z if z
356
+
347
357
  # so it's not a timezone.
348
358
 
349
359
  nil
data/n.txt ADDED
@@ -0,0 +1,38 @@
1
+
2
+ Chisels – Nomi (鑿)
3
+ Striking chisel – Tataki-nomi (叩鑿)
4
+ Primary striking chisel – Hon-tataki (本叩き)
5
+ Wide chisel – Hiro-nomi (広鑿)
6
+ Mid-thin chisel – Chu-usu-nomi (中薄鑿)
7
+ Mid-sized striking chisel – Chu-tataki-nomi (中叩鑿)
8
+ Butt chisel – Oire-nomi (大入鑿)
9
+ Mortise chisel – Mukoumachi-nomi (向う区鑿)
10
+ Double blade mortise chisel – Nihon-mukoumachi-nomi (二本向う区鑿)
11
+ Teverse round chisel – Ura-maru-nomi (裏丸鑿)
12
+ Tsubo type round chisel – Tsubo-maru-nomi (壺丸鑿)
13
+ Finishing chisel – Shiage-nomi (仕上鑿)
14
+ Paring chisel – Tsuki-nomi (突鑿)
15
+ Acute angles chisel – Ari-nomi (蟻鑿) or Shinogi-nomi (鎬鑿)
16
+ Thin chisel – Usu-nomi (薄鑿)
17
+ Trowel chisel – Kote-nomi (鏝鑿)
18
+ Special chisel’s
19
+ Sword guard chisel – Tsuba-nomi (鐔鑿)
20
+ Punching-out chisel – Uchinuki (打抜)
21
+ Chip-removing chisel – Sokosarae-nomi (底さらえ鑿)
22
+ Harpoon chisel – Mori-nomi (銛鑿)
23
+ Sickle chisel – Kama-nomi (鎌鑿)
24
+ Chisel parts and other names
25
+ Front side of blade – Ko ()
26
+ Back side of blade – Ura (裏)
27
+ Sharp edge – Kissaki ()
28
+ Blade facet – Kireba ()
29
+ Blade corners – Mimi ()
30
+ Side edge – Kobashi ()
31
+ Hollow back of chisel – Ura-suki (裏透き)
32
+ The flat back of the chisel – Beta-ura () // Beta is optimal size for chisels
33
+ Blade shaft – Kubi ()
34
+ Tang – Nakago ()
35
+ Ring between blade and handle – Kuchigane ()
36
+ Handle – E ()
37
+ Capping ring – Katsura ()
38
+
data/t.txt ADDED
@@ -0,0 +1,92 @@
1
+
2
+ Smoothing planes – Hira-ganna (平鉋) // General name for the “standard plane type”
3
+ Extremely rough smoothing plane – Oni-arashiko-ganna (鬼荒しこ鉋)
4
+ Rough smoothing plane – Arashiko-ganna (荒しこ鉋)
5
+ Uneven smoothing plane – Muratori-ganna (むらとり鉋)
6
+ Middle smoothing plane – Chushiko-ganna (中しこ鉋)
7
+ Before finish smoothing plane – Jyoshiko-ganna (上しこ鉋)
8
+ Finish smoothing plane – Shiage-ganna (仕上げ鉋)
9
+ Mid-length plane – Chudai-ganna (中台鉋) // Around 35 cm long dai
10
+ Jointer plane – Nagadai-ganna (長台鉋) // At-least 40 cm long dai
11
+ Block plane or Small plane – Ko-ganna (小鉋) // Less than 5.5cm long blade
12
+ Big plane – O-ganna (大鉋) // Blade wider than 9 cm
13
+ Mini plane / Bean plane – Mame-ganna (豆鉋) // Unusually small plane
14
+ Sole tuning plane – Dainaoshi ganna (台直し鉋)
15
+ “Aircraft” plane – Hikōki kanna (飛行機鉋) // Used in Shoji and Kumiko
16
+ Shoulder planes or Groove planes – Jyakuri-ganna (決り鉋) or Mizo-ganna (溝鉋)
17
+ Rough shoulder plane – Ara-jyakuri-ganna (荒決り鉋)
18
+ Shoulder plane – Soko-jyakuri-ganna (底決り鉋)
19
+ Western Japan type – Nishi-gata (西型)
20
+ Eastern Japan type – Higashi-gata (東型)
21
+ The comb type – Kushi-gata (櫛型)
22
+ The Osaka type – Osaka-gata (大阪型)
23
+ Wide groove plane – Motoichi-jyakuri-ganna (基市決り鉋)
24
+ Groove plane – Kikai-jyakuri-ganna (機械決り鉋)
25
+ Curved grooves plane – Dabo-jyakuri-ganna (ダボ決り鉋)
26
+ Lap or halving joint plane – Ai-jyakuri-ganna (相決り鉋)
27
+ Dovetail plane – Ari-jyakuri-ganna (蟻決り鉋)
28
+ Groove plane – Kude-jyakuri-ganna (組手決り鉋) // Specially for making Shoji screen dividers joints
29
+ Wide groove plane – Madowaku-jyakuri-ganna (窓枠決り鉋) // Specially for windows in western architecture
30
+ Rebate or Rabbet plane – Kiwa-ganna (際鉋)
31
+ Right cutting type – hidari-gatte (左勝手型)
32
+ Left cutting type – migi-gatte (右勝手型)
33
+ Groove sides planes – Wakitori-ganna (脇取鉋)
34
+ Groove sides plane – Wakitori-ganna (脇取鉋) or Hibukura-ganna (ひぶくら鉋)
35
+ “Double usages” plane – Nitoku-ganna (二徳鉋)
36
+ “5 different usages” plane – Gotoku-ganna (五徳鉋)
37
+ Chamfer planes, Moulding planes and Compass planes – Mentori-ganna (面取り鉋)
38
+ Convex rounding plane – Sotomaru-ganna (外丸鉋)
39
+ Concave rounding plane – Uchimaru-ganna (内丸鉋)
40
+ Spoon-bottomed plane – Soridai-ganna (反り台鉋)
41
+ 4 directionally convex plane – Shiho-sori-ganna (四方反り台鉋)
42
+ 4 directionally concave plane – Funa-zoko-ganna (舟底鉋)
43
+ Chamfer planes and Moulding planes – Mentori-ganna (面取り鉋)
44
+ Point of a sword chamfer – Mentori-ganna kensaki (面取鉋-剣先面)
45
+ Pointed edges chamfer – Mentori-ganna kicho-men (面取鉋-几帳面)
46
+ Flat chamfer – Mentori-ganna hirakicho-men (面取鉋-平几帳面)
47
+ Monk’s head chamfer – Mentori-ganna bozu-men (面取鉋-坊主面)
48
+ Gingko chamfer – Mentori-ganna ginnan-men (面取鉋-銀杏面)
49
+ Calabash chamfer – Mentori-ganna hyotan-men (面取鉋-瓢箪面)
50
+ Free form flat chamfer – Mentori-ganna jiyu-kaku-men (面取鉋-自由角面)
51
+ Free form monk’s head chamfer – Mentori-ganna jiyu-saru-men (面取鉋-角面・猿頬面兼用)
52
+ UNKNOWN chamfer – Mentori-ganna gomae-men (面取鉋-胡麻柄面)
53
+ UNKNOWN chamfer – Mentori-ganna hikikake-men (面取鉋-引掛面)
54
+ UNKNOWN chamfer – Mentori-ganna iriko-men (面取鉋-入子面)
55
+ Single thread chamfer – Mentori-ganna katahimo-men (面取鉋-片紐面)
56
+ Double thread chamfer – Mentori-ganna ryohimo-men (面取鉋-両紐面)
57
+ Mullion chamfer – Mentori-ganna kumiko-men (面取鉋-組子面)
58
+ Double shape changing chamfer – Mentori-ganna nichobori-henkei-men (面取鉋-二丁掘変形面)
59
+ Shape changing chamfer – Mentori-ganna henkei-men (面取鉋-変形面)
60
+ UNKNOWN chamfer – Mentori-ganna sumimaru-yokokezuri (面取鉋-隅丸横削り)
61
+ UNKNOWN chamfer – Mentori-ganna sumimaru-hyotan-men (面取鉋-隅丸瓢箪面)
62
+ UNKNOWN chamfer – Mentori-ganna bozu-men (面取鉋-坊主面)
63
+ UNKNOWN chamfer – Mentori-ganna kenyo-bozu-men (面取鉋-兼用坊主面)
64
+ UNKNOWN chamfer – Mentori-ganna hira-bozu-men (面取鉋-平坊主面)
65
+ Kumiko angle planes – Ha-ganna (葉鉋) // Four planes designed to cut at 60°, 45°, 30°, and 15°
66
+ 60° Ha-ganna – Gomagara-ganna (ゴマガラ鉋)
67
+ 45° Ha-ganna – 45 Do-ganna (45度鉋)
68
+ 30° Ha-ganna – Asanoha-ganna (麻ノ葉鉋)
69
+ 15° Ha-ganna – Yae Asa-ganna (八重麻鉋)
70
+ Special planes
71
+ Tongue and groove plane – Maru-inrō kanna (丸印籠鉋) // Specially used where Shoji doors meet
72
+ Tongue and groove plane – Inrō-ganna (印籠鉋) // General Tongue and groove planes
73
+ Tongue plane – Sane-ganna (さね鉋)
74
+ Free form tongue plane – jiyu-sane-ganna (自由さね鉋)
75
+ End grain surface plane – Koguchi-ganna (木口鉋)
76
+ Round corner rebate or rabbet plane – Naguri-ganna (なぐり鉋)
77
+ Spokeshave – Nankin-ganna (南京鉋)
78
+ UNKNOWN groove plane – Umegashi-yo-yokomizu-ganna (埋樫用横溝鉋)
79
+ Handplane parts and other names
80
+ Plane blade – Ganna-ba ()
81
+ Plane block – Ganna-dai or Dai ()
82
+ White oak for Dai – Kashi ()
83
+ Common laminated plane blade – Awase-ganna ()
84
+ Hard steel – Hagane (鋼)
85
+ Soft iron – Jigane (地金)
86
+ Front side of blade – Ko ()
87
+ Back side of blade – Ura (裏)
88
+ Hollow back of plane blade – Ura-suki (裏透き)
89
+ The flat of the plane blade – Ito-ura () // Ito is optimal size for planes
90
+ The mouth – Ha-guchi ()
91
+ The sole – Shitaba ()
92
+
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rufus-scheduler
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.3.0
4
+ version: 3.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Mettraux
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-11-28 00:00:00.000000000 Z
11
+ date: 2016-12-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: tzinfo
@@ -74,8 +74,10 @@ files:
74
74
  - lib/rufus/scheduler/locks.rb
75
75
  - lib/rufus/scheduler/util.rb
76
76
  - lib/rufus/scheduler/zotime.rb
77
+ - n.txt
77
78
  - pics.txt
78
79
  - rufus-scheduler.gemspec
80
+ - t.txt
79
81
  homepage: http://github.com/jmettraux/rufus-scheduler
80
82
  licenses:
81
83
  - MIT