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 +4 -4
- data/Temperature_Converter.gemspec +23 -23
- data/bin/Temperature_Converter.rb +25 -0
- data/lib/Temperature_Converter/version.rb +3 -3
- metadata +2 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7b756c201c249985ec00f61be5d40add13e5d30a
|
|
4
|
+
data.tar.gz: 2a3438b16ccbe482d9d651fce514eb1d49b9f02d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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.
|
|
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.
|
|
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.
|
|
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
|