set_time_zone 0.0.1 → 0.0.2
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 +15 -0
- data/README.md +26 -4
- data/lib/set_time_zone/version.rb +1 -1
- data/set_time_zone.gemspec +2 -2
- metadata +48 -69
checksums.yaml
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
---
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
ZDRhMmE3MDAwN2JiZTc3OTBjZGI0YTIyZTU5NTdiMTI5Mjc4NzM0OA==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
NDEyODczZjU2MDQ0Zjk0OGRhMDkwNTZmZTA2YTExOGJiZmJlODQ3ZA==
|
7
|
+
SHA512:
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
YTU2OWZiZDQ2N2JlNzE2OGJmMmRmYTg3OTllNThiNGIzOGNkZjQ4OGE0NzQ3
|
10
|
+
MTVmYzlmZTgyMTMwY2RhMDM3N2MxN2QzNzlhNTVmNTg3YzNiZGU4OTZhODli
|
11
|
+
NjEzNDcyNzMzNmFjOTI0MWY1MWE2ZjM2YjVhMDUzYzcwZDgwODE=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
OTc2NTMzY2NlYjM4ZjRjM2I5N2U5M2JlYzQ3NGU4ODIyYzNiYjEwYTZiNDhk
|
14
|
+
YjA4MGI5OTBkYWI2Y2UyZjliZGIxZjA1MDlmODcwMDI2ZmZiMmZlMWQ5ODE4
|
15
|
+
MzFiZDM4Y2UwOTQ5Yzc2MDM0NzVlNmVmMjAyNTlkMTUwYzcxYTE=
|
data/README.md
CHANGED
@@ -1,7 +1,19 @@
|
|
1
1
|
# SetTimeZone
|
2
2
|
|
3
|
-
|
3
|
+
Set the Current Time Zone in accordance to the User's Location.
|
4
|
+
Include this line in application.html.erb
|
4
5
|
|
6
|
+
<code><%= hidden_field_tag :timezone %>
|
7
|
+
</code>
|
8
|
+
|
9
|
+
And before the body tag place this
|
10
|
+
|
11
|
+
<code><%= SetTimeZone::set_cookie.html_safe %>
|
12
|
+
</code>
|
13
|
+
|
14
|
+
<pre>
|
15
|
+
Refresh the view and check for a cookie named time_zone for users current time zone
|
16
|
+
</pre>
|
5
17
|
## Installation
|
6
18
|
|
7
19
|
Add this line to your application's Gemfile:
|
@@ -17,9 +29,19 @@ Or install it yourself as:
|
|
17
29
|
$ gem install set_time_zone
|
18
30
|
|
19
31
|
## Usage
|
20
|
-
|
21
|
-
|
22
|
-
|
32
|
+
<pre>Go to your Controller use </pre>
|
33
|
+
<code>
|
34
|
+
@time_zone = cookies[:time_zone]
|
35
|
+
</code>
|
36
|
+
<pre>on call of the method eg.</pre>
|
37
|
+
<code>
|
38
|
+
before_filter :time_zone
|
39
|
+
|
40
|
+
def time_zone
|
41
|
+
@time_zone = cookies[:time_zone]
|
42
|
+
end
|
43
|
+
|
44
|
+
</code>
|
23
45
|
## Contributing
|
24
46
|
|
25
47
|
1. Fork it ( http://github.com/<my-github-username>/set_time_zone/fork )
|
data/set_time_zone.gemspec
CHANGED
@@ -9,8 +9,8 @@ Gem::Specification.new do |spec|
|
|
9
9
|
spec.authors = ["Arpit Kulshrestha"]
|
10
10
|
spec.email = ["speak2arpit@gmail.com"]
|
11
11
|
spec.summary = %q{set the current Time zone in Application as per users current location.}
|
12
|
-
spec.description = %q{Time Zone
|
13
|
-
spec.homepage = ""
|
12
|
+
spec.description = %q{Set the Time Zone As per users current location / Browser Time}
|
13
|
+
spec.homepage = "https://github.com/Arpit1989"
|
14
14
|
spec.license = "MIT"
|
15
15
|
|
16
16
|
spec.files = `git ls-files -z`.split("\x0")
|
metadata
CHANGED
@@ -1,61 +1,50 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: set_time_zone
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
prerelease:
|
6
|
-
segments:
|
7
|
-
- 0
|
8
|
-
- 0
|
9
|
-
- 1
|
10
|
-
version: 0.0.1
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.2
|
11
5
|
platform: ruby
|
12
|
-
authors:
|
6
|
+
authors:
|
13
7
|
- Arpit Kulshrestha
|
14
8
|
autorequire:
|
15
9
|
bindir: bin
|
16
10
|
cert_chain: []
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
- !ruby/object:Gem::Dependency
|
21
|
-
type: :development
|
11
|
+
date: 2014-09-09 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
22
14
|
name: bundler
|
23
|
-
|
24
|
-
|
25
|
-
requirements:
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
26
17
|
- - ~>
|
27
|
-
- !ruby/object:Gem::Version
|
28
|
-
|
29
|
-
segments:
|
30
|
-
- 1
|
31
|
-
- 5
|
32
|
-
version: "1.5"
|
33
|
-
prerelease: false
|
34
|
-
requirement: *id001
|
35
|
-
- !ruby/object:Gem::Dependency
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.5'
|
36
20
|
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ~>
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.5'
|
27
|
+
- !ruby/object:Gem::Dependency
|
37
28
|
name: rake
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
segments:
|
45
|
-
- 0
|
46
|
-
version: "0"
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ! '>='
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
47
35
|
prerelease: false
|
48
|
-
|
49
|
-
|
50
|
-
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ! '>='
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
description: Set the Time Zone As per users current location / Browser Time
|
42
|
+
email:
|
51
43
|
- speak2arpit@gmail.com
|
52
44
|
executables: []
|
53
|
-
|
54
45
|
extensions: []
|
55
|
-
|
56
46
|
extra_rdoc_files: []
|
57
|
-
|
58
|
-
files:
|
47
|
+
files:
|
59
48
|
- .gitignore
|
60
49
|
- Gemfile
|
61
50
|
- LICENSE.txt
|
@@ -64,38 +53,28 @@ files:
|
|
64
53
|
- lib/set_time_zone.rb
|
65
54
|
- lib/set_time_zone/version.rb
|
66
55
|
- set_time_zone.gemspec
|
67
|
-
homepage:
|
68
|
-
licenses:
|
56
|
+
homepage: https://github.com/Arpit1989
|
57
|
+
licenses:
|
69
58
|
- MIT
|
59
|
+
metadata: {}
|
70
60
|
post_install_message:
|
71
61
|
rdoc_options: []
|
72
|
-
|
73
|
-
require_paths:
|
62
|
+
require_paths:
|
74
63
|
- lib
|
75
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
none: false
|
86
|
-
requirements:
|
87
|
-
- - ">="
|
88
|
-
- !ruby/object:Gem::Version
|
89
|
-
hash: 3
|
90
|
-
segments:
|
91
|
-
- 0
|
92
|
-
version: "0"
|
64
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ! '>='
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
70
|
+
requirements:
|
71
|
+
- - ! '>='
|
72
|
+
- !ruby/object:Gem::Version
|
73
|
+
version: '0'
|
93
74
|
requirements: []
|
94
|
-
|
95
75
|
rubyforge_project:
|
96
|
-
rubygems_version:
|
76
|
+
rubygems_version: 2.2.2
|
97
77
|
signing_key:
|
98
|
-
specification_version:
|
78
|
+
specification_version: 4
|
99
79
|
summary: set the current Time zone in Application as per users current location.
|
100
80
|
test_files: []
|
101
|
-
|