indolib_rails 1.2.0 → 1.3.0

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
  SHA256:
3
- metadata.gz: 54a103452ae6eecd9610c509eedb6852d45f30a86a724ee8f4b767ecf30e2a4d
4
- data.tar.gz: fe7449378f1c990cd5bedb2c715b4af6853da7f8dc32294116399b9affcba824
3
+ metadata.gz: ceb3694637db050dff99968f398619fbf7da904d84900bab06cc69bb7f2e1fea
4
+ data.tar.gz: 8a7bc67abe0bb54655f4cb0c7618fbd7622792b3a8c182394a39e78fe43ed036
5
5
  SHA512:
6
- metadata.gz: 3a4178f197ac0bff565faf1ba658feb2e00ff6e277118f6e7b94d1f7f486111d34e8b65ca7c8f0447699f383413276effbb921058fc9977218c1cd2e07ccef48
7
- data.tar.gz: 328da32de36a22e8da2e7b001c5dc772d8a06f5920f5c58f4936b03fc8c5868f89e22696ac9d52b44ec057444434fb7bb8600ed2ac1c197ab8f0acd94db974ce
6
+ metadata.gz: 394d0280232b032e05abd698b323ec274dcff85a7682bec3578a1601c8ad260ed32a8416ca9790caae7a136f4b3c82bc091edecc21e0f72e348ad8a40ac13193
7
+ data.tar.gz: 7b67067de57c306adada42ba1556d64895263bce7ec264c2f520ef59ac92aebc57a3d3e5a83d0a4d8da22bf9813407d59f79169947da027ffda131a8421527cd
data/Rakefile ADDED
File without changes
@@ -1,7 +1,7 @@
1
1
  require File.expand_path('lib/indolib_rails/version', __dir__)
2
2
  Gem::Specification.new do |spec|
3
3
  spec.name = 'indolib_rails'
4
- spec.version = '1.2.0'
4
+ spec.version = '1.3.0'
5
5
  spec.authors = ['Megha Rana']
6
6
  spec.email = ['megha.rana@iwcts.com']
7
7
  spec.summary = 'Indolib integration for Ruby on Rails'
@@ -0,0 +1,19 @@
1
+ require 'active_support/core_ext/time'
2
+ class IndolibRails::Timezone
3
+
4
+
5
+ def initialize(dttime)
6
+ @dttime = dttime
7
+ end
8
+
9
+ def hi
10
+ date = Time.now
11
+ if @dttime.present?
12
+ date_est = date.in_time_zone(ActiveSupport::TimeZone["#{@dttime}"])
13
+ @date_ist = date_est.in_time_zone("Chennai")
14
+ puts @date_ist
15
+ else
16
+ alert "Cannot convert @dttime into local timezone"
17
+ end
18
+ end
19
+ end
@@ -1,14 +1,14 @@
1
- class IndolibRails::Translator
2
- def initialize(langauage)
3
- @langauage = langauage
4
- end
1
+ # class IndolibRails::Translator
2
+ # def initialize(langauage)
3
+ # @langauage = langauage
4
+ # end
5
5
 
6
- def hi
7
- case @langauage
8
- when "spanish"
9
- "hola mundo"
10
- else
11
- "hello world !"
12
- end
13
- end
14
- end
6
+ # def hi
7
+ # case @langauage
8
+ # when "spanish"
9
+ # "hola mundo"
10
+ # else
11
+ # "hello world !"
12
+ # end
13
+ # end
14
+ # end
data/lib/indolib_rails.rb CHANGED
@@ -1,8 +1,11 @@
1
1
  class IndolibRails
2
- def self.hi(langauage= "english")
3
- translator = Translator.new(langauage)
4
- translator.hi
2
+ def self.hi(dttime = "Eastern Time (US & Canada)")
3
+ #translator = Translator.new(langauage)
4
+ #translator.hi
5
+ timezone = Timezone.new(dttime)
6
+ timezone.hi
5
7
  end
6
8
  end
7
9
 
8
- require 'indolib_rails/translator'
10
+ #require 'indolib_rails/translator'
11
+ require 'indolib_rails/timezone'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: indolib_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Megha Rana
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-11-10 00:00:00.000000000 Z
11
+ date: 2022-11-14 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: This gem allows to convert different time zones to local server time
14
14
  zone
@@ -23,8 +23,10 @@ files:
23
23
  - Gemfile
24
24
  - LICENSE
25
25
  - README.md
26
+ - Rakefile
26
27
  - indolib_rails.gemspec
27
28
  - lib/indolib_rails.rb
29
+ - lib/indolib_rails/timezone.rb
28
30
  - lib/indolib_rails/translator.rb
29
31
  - lib/indolib_rails/version.rb
30
32
  homepage: https://github.com/megharana412/indolib_rails.git