timezone_local 0.1.2 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. data/README.md +11 -0
  2. data/VERSION +1 -1
  3. data/lib/unix.rb +2 -2
  4. data/timezone_local.gemspec +13 -10
  5. metadata +34 -51
data/README.md ADDED
@@ -0,0 +1,11 @@
1
+ # timezone_local
2
+
3
+ timezone_local is a Ruby port of the Perl CPAN module [DateTime::TimeZone::Local](https://metacpan.org/module/DateTime::TimeZone::Local) for determining the local system's timezone. Currently only Unix platforms are supported but pull requests are welcome!
4
+
5
+ ## Usage
6
+
7
+ $ gem install timezone_local
8
+
9
+ require 'timezone_local'
10
+ tz = TimeZone::Local.get() # => #<TZInfo::LinkedTimezone: US/Eastern>
11
+
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.2
1
+ 0.1.4
data/lib/unix.rb CHANGED
@@ -1,6 +1,6 @@
1
1
 
2
2
  require 'find'
3
- require 'ftools'
3
+ require 'fileutils'
4
4
 
5
5
  module TimeZone::Local
6
6
  module Unix
@@ -53,7 +53,7 @@ module TimeZone::Local
53
53
  if File.file? path and
54
54
  File.size(path) == size and
55
55
  File.basename(path) != 'posixrules' and
56
- File.compare(file_to_match, path) then
56
+ FileUtils.compare_file(file_to_match, path) then
57
57
 
58
58
  match = path
59
59
  end
@@ -4,31 +4,34 @@
4
4
  # -*- encoding: utf-8 -*-
5
5
 
6
6
  Gem::Specification.new do |s|
7
- s.name = %q{timezone_local}
8
- s.version = "0.1.2"
7
+ s.name = "timezone_local"
8
+ s.version = "0.1.4"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Chetan Sarva"]
12
- s.date = %q{2011-04-01}
13
- s.description = %q{}
14
- s.email = %q{chetan@evidon.com}
12
+ s.date = "2012-05-04"
13
+ s.description = ""
14
+ s.email = "chetan@evidon.com"
15
+ s.extra_rdoc_files = [
16
+ "README.md"
17
+ ]
15
18
  s.files = [
19
+ "README.md",
16
20
  "Rakefile",
17
21
  "VERSION",
18
22
  "lib/timezone_local.rb",
19
23
  "lib/unix.rb",
20
24
  "timezone_local.gemspec"
21
25
  ]
22
- s.homepage = %q{http://github.com/chetan/timezone_local}
26
+ s.homepage = "http://github.com/chetan/timezone_local"
23
27
  s.require_paths = ["lib"]
24
- s.rubygems_version = %q{1.3.6}
25
- s.summary = %q{Determine the local system's time zone}
28
+ s.rubygems_version = "1.8.15"
29
+ s.summary = "Determine the local system's time zone"
26
30
 
27
31
  if s.respond_to? :specification_version then
28
- current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
29
32
  s.specification_version = 3
30
33
 
31
- if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
34
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
32
35
  s.add_runtime_dependency(%q<tzinfo>, [">= 0.3.24"])
33
36
  else
34
37
  s.add_dependency(%q<tzinfo>, [">= 0.3.24"])
metadata CHANGED
@@ -1,79 +1,62 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: timezone_local
3
- version: !ruby/object:Gem::Version
4
- prerelease: false
5
- segments:
6
- - 0
7
- - 1
8
- - 2
9
- version: 0.1.2
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.4
5
+ prerelease:
10
6
  platform: ruby
11
- authors:
7
+ authors:
12
8
  - Chetan Sarva
13
9
  autorequire:
14
10
  bindir: bin
15
11
  cert_chain: []
16
-
17
- date: 2011-04-01 00:00:00 -04:00
18
- default_executable:
19
- dependencies:
20
- - !ruby/object:Gem::Dependency
12
+ date: 2012-05-04 00:00:00.000000000Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
21
15
  name: tzinfo
22
- prerelease: false
23
- requirement: &id001 !ruby/object:Gem::Requirement
24
- requirements:
25
- - - ">="
26
- - !ruby/object:Gem::Version
27
- segments:
28
- - 0
29
- - 3
30
- - 24
16
+ requirement: &2157349520 !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
31
21
  version: 0.3.24
32
22
  type: :runtime
33
- version_requirements: *id001
34
- description: ""
23
+ prerelease: false
24
+ version_requirements: *2157349520
25
+ description: ''
35
26
  email: chetan@evidon.com
36
27
  executables: []
37
-
38
28
  extensions: []
39
-
40
- extra_rdoc_files: []
41
-
42
- files:
29
+ extra_rdoc_files:
30
+ - README.md
31
+ files:
32
+ - README.md
43
33
  - Rakefile
44
34
  - VERSION
45
35
  - lib/timezone_local.rb
46
36
  - lib/unix.rb
47
37
  - timezone_local.gemspec
48
- has_rdoc: true
49
38
  homepage: http://github.com/chetan/timezone_local
50
39
  licenses: []
51
-
52
40
  post_install_message:
53
41
  rdoc_options: []
54
-
55
- require_paths:
42
+ require_paths:
56
43
  - lib
57
- required_ruby_version: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - ">="
60
- - !ruby/object:Gem::Version
61
- segments:
62
- - 0
63
- version: "0"
64
- required_rubygems_version: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - ">="
67
- - !ruby/object:Gem::Version
68
- segments:
69
- - 0
70
- version: "0"
44
+ required_ruby_version: !ruby/object:Gem::Requirement
45
+ none: false
46
+ requirements:
47
+ - - ! '>='
48
+ - !ruby/object:Gem::Version
49
+ version: '0'
50
+ required_rubygems_version: !ruby/object:Gem::Requirement
51
+ none: false
52
+ requirements:
53
+ - - ! '>='
54
+ - !ruby/object:Gem::Version
55
+ version: '0'
71
56
  requirements: []
72
-
73
57
  rubyforge_project:
74
- rubygems_version: 1.3.6
58
+ rubygems_version: 1.8.15
75
59
  signing_key:
76
60
  specification_version: 3
77
61
  summary: Determine the local system's time zone
78
62
  test_files: []
79
-