timezone_detection 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/README.rdoc CHANGED
@@ -1,5 +1,31 @@
1
- = TimezoneDetection
1
+ == INTRODUCTION
2
2
 
3
- This project rocks and uses MIT-LICENSE.
3
+ This gem used for setting client's timezone based on his/her IP.
4
4
 
5
- More description will be available soon.
5
+ == INSTALLATION
6
+
7
+ Write it in your Gemfile
8
+
9
+ gem "timezone_detection"
10
+
11
+ Next, execute following sequences of commands:
12
+
13
+ rails generate timezone_detection:install
14
+
15
+ rake db:migrate
16
+
17
+ This gem uses IpInfoDb web service to determine your timezone. API KEY required for dealing with site API, so you should register your own and set it in initializer file ( for this visit http://ipinfodb.com/ ):
18
+
19
+ For example: *config/initializers/my_own_timezone_initializer.rb*
20
+
21
+ TimezoneDetection.config do |cnf|
22
+ cnf.api_key = "SOME_API_KEY_PROVIDED_FROM_IP_INFO_DB_SITE"
23
+ end
24
+
25
+ == USAGE
26
+
27
+ Set before_filter in your ApplicationController or wherever you need.
28
+
29
+ before_filter :set_timezone
30
+
31
+ That's it. You are ready to go!
@@ -1,3 +1,3 @@
1
1
  module TimezoneDetection
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: timezone_detection
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -11,7 +11,7 @@ bindir: bin
11
11
  cert_chain: []
12
12
  date: 2012-08-09 00:00:00.000000000 Z
13
13
  dependencies: []
14
- description: Gem for detecting users timezone by IP address.
14
+ description: Visit https://github.com/Bor1s/timezone-detection for more information.
15
15
  email:
16
16
  - boris.bbk@gmail.com
17
17
  executables: []