Temperature_Converter 1.0.1 → 1.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bfe6b581144dfc2d4ac05175f2e15d1246a5bdf1
4
- data.tar.gz: 62bb583cf40cdc188655ccf1a8c5daa823c16d31
3
+ metadata.gz: 7b756c201c249985ec00f61be5d40add13e5d30a
4
+ data.tar.gz: 2a3438b16ccbe482d9d651fce514eb1d49b9f02d
5
5
  SHA512:
6
- metadata.gz: 5be99b6e4e944d04b88206cae84ecfbf28156f8e30a8f19d2c21b0a4253336a5c536bd324bed80bd058f6dc9a3e8a2f4816d8b7f8612ec84b9ee6226bee018ed
7
- data.tar.gz: 4f89ae3696949d40ba26cd8f88a64cf84bdfafd82e419c087f246f3d47f9fc8960af09485aff704344e0a26700e2832115a918f6028abcdb6c1f3832698349b0
6
+ metadata.gz: b7bc8c19e7db4826e7f883ccf19fbab4ec8214487ef2d44f7b8f37b4bd2e31804b012efe2e61254b877301cfdac1853dbfc8c22bde6f49d00c8a62d7c7cc175f
7
+ data.tar.gz: 8c0ce322ce3501f78a957fcd38d821886b91f8d043f515054e1f2ef7072f8f2075396d0fcafbcdac6e3e98ec78e628c7a141fa12e882b2b0078492f90b01305e
@@ -1,23 +1,23 @@
1
- # coding: utf-8
2
- lib = File.expand_path('../lib', __FILE__)
3
- $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
- require 'Temperature_Converter/version'
5
-
6
- Gem::Specification.new do |spec|
7
- spec.name = "Temperature_Converter"
8
- spec.version = "1.0.1"
9
- spec.authors = ["Victor Rowello"]
10
- spec.email = ["vfrowello@gmail.com"]
11
-
12
- spec.summary = "Converts from Fahrenheit to Celsius and Vice-Versa"
13
- spec.description = "Converts from Fahrenheit to Celsius and Vice-Versa"
14
- spec.homepage = "https://github.com/vrowello/Temperature_Converter.git"
15
- spec.license = "MIT"
16
- spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
17
- spec.bindir = "exe"
18
- spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
19
- spec.require_paths = ["lib"]
20
-
21
- spec.add_development_dependency "bundler", "~> 1.11"
22
- spec.add_development_dependency "rake", "~> 10.0"
23
- end
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'Temperature_Converter/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "Temperature_Converter"
8
+ spec.version = "1.0.2"
9
+ spec.authors = ["Victor Rowello"]
10
+ spec.email = ["vfrowello@gmail.com"]
11
+
12
+ spec.summary = "Converts from Fahrenheit to Celsius and Vice-Versa"
13
+ spec.description = "Converts from Fahrenheit to Celsius and Vice-Versa"
14
+ spec.homepage = "https://github.com/vrowello/Temperature_Converter.git"
15
+ spec.license = "MIT"
16
+ spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
17
+ spec.bindir = "exe"
18
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
19
+ spec.require_paths = ["lib"]
20
+
21
+ spec.add_development_dependency "bundler", "~> 1.11"
22
+ spec.add_development_dependency "rake", "~> 10.0"
23
+ end
@@ -0,0 +1,25 @@
1
+ % cat bin/Tempertaure_Converter
2
+ #!/usr/bin/env ruby
3
+
4
+ def fahrenheit_to_celsius(x)
5
+ x -= 32
6
+ x /= 1.8
7
+ puts x
8
+ end
9
+
10
+ def celsius_to_fahrenheit(x)
11
+ x *= 1.8
12
+ x += 32
13
+ puts x
14
+ end
15
+
16
+ print "Insert Unit to Convert to: "
17
+ unit = gets.chomp.downcase!
18
+
19
+ print "Insert Temperature to Convert: "
20
+ x = gets.chomp.to_f
21
+
22
+ if unit == "celsius" then fahrenheit_to_celsius(x)
23
+ elsif unit == "fahrenheit" then celsius_to_fahrenheit(x)
24
+ else puts "Error:"
25
+ end
@@ -1,3 +1,3 @@
1
- module TemperatureConverter
2
- VERSION = "1.0.1"
3
- end
1
+ module TemperatureConverter
2
+ VERSION = "1.0.2"
3
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: Temperature_Converter
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Victor Rowello
@@ -52,6 +52,7 @@ files:
52
52
  - README.md
53
53
  - Rakefile
54
54
  - Temperature_Converter.gemspec
55
+ - bin/Temperature_Converter.rb
55
56
  - bin/console
56
57
  - bin/setup
57
58
  - lib/Temperature_Converter.rb