temperature_nvdb 1.0.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.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 7f7ce2e94fe9c0c5e4c77795bb42434eb0c0fb7c
4
+ data.tar.gz: 29a89769ad9bc8e128000e4f33bd3756e3f51cb5
5
+ SHA512:
6
+ metadata.gz: 211dcbf4dbfa5a7d3e7a991e500265f81ceb2a9b579cb58714e8201004a232229d97de2fd328b1aeb02a9ca9c07228e8c2aea2815e0e5397a352d55d1df2b76f
7
+ data.tar.gz: fcd418552569d7a11f3dc8e081d9ca1cf30aadbf17f793ba957e67c8e2f4ca8dbf4b93ecaaff4359fdd9add3d30610a258e9c62ab80597347de073e44f379173
@@ -0,0 +1,58 @@
1
+ #!usr/bin/env ruby
2
+
3
+ #require "./lib/temperature_converter_nicovdb"
4
+ require "./lib/converter."
5
+ require 'net/http'
6
+ require 'uri'
7
+ require 'optparse'
8
+
9
+ # input = ARGV.first.to_f
10
+ # temp = TemperatureConverter.new input
11
+
12
+ # #cmd
13
+ # temp.to_text
14
+ # temp.to_json
15
+ # temp.to_html
16
+ # #file
17
+ # temp.file_temperature
18
+ # temp.to_text
19
+ # temp.to_json
20
+ # temp.to_html
21
+ # #url
22
+ # temp.url_temperature ("http://labict.be/software-engineering/temperature/api/temperature/fake")
23
+ # temp.to_text
24
+ # temp.to_json
25
+ # temp.to_html
26
+
27
+ OptionParser.new do |opts|
28
+ opts.banner = "Usage: ruby app.rb [options]"
29
+
30
+ opts.on("-t [FLOAT]","--temperature [FLOAT]",Float,"Give number to convert") do |t|
31
+ @newt = Celsius.new(t).normal
32
+ @newf = Fahrenheit.new(@newt).ctof
33
+ @newk = Kelvin.new(@newt).ctok
34
+ end
35
+ opts.on("-f","--file","convert from file") do |f|
36
+ @newt =Celsius.file_temperature
37
+ @newf = Fahrenheit.new(@newt).ctof
38
+ @newk = Kelvin.new(@newt).ctok
39
+
40
+ end
41
+ opts.on("-u","--url","convert from url") do |u|
42
+ @newt =Celsius.url_temperature ("http://labict.be/software-engineering/temperature/api/temperature/fake")
43
+ @newf = Fahrenheit.new(@newt).ctof
44
+ @newk = Kelvin.new(@newt).ctok
45
+ end
46
+
47
+ opts.on("-c","--cmd","give output in plain text") do |c|
48
+ puts Screen.new(@newt,@newf,@newk).to_text
49
+ end
50
+
51
+ opts.on("-j","--json","give output in JSON string") do |j|
52
+ puts Screen.new(@newt,@newf,@newk).to_json
53
+ end
54
+
55
+ opts.on("-h","--html","give output in html format") do |h|
56
+ puts Screen.new(@newt,@newf,@newk).to_html
57
+ end
58
+ end.parse!
@@ -0,0 +1 @@
1
+ #all requires for reader, writer, converter
metadata ADDED
@@ -0,0 +1,47 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: temperature_nvdb
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Nicolas Vandenbroucke
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2016-11-18 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: commandline application to convert temperatures from different sources,
14
+ and output them in different ways
15
+ email: nicolas.vandenbroucke@vdb.be
16
+ executables:
17
+ - temp-conv
18
+ extensions: []
19
+ extra_rdoc_files: []
20
+ files:
21
+ - bin/temp-conv
22
+ - lib/temperature_converter_nicovdb.rb
23
+ homepage: https://github.com/gsmman7/temperature.git
24
+ licenses:
25
+ - MIT
26
+ metadata: {}
27
+ post_install_message:
28
+ rdoc_options: []
29
+ require_paths:
30
+ - lib
31
+ required_ruby_version: !ruby/object:Gem::Requirement
32
+ requirements:
33
+ - - ">="
34
+ - !ruby/object:Gem::Version
35
+ version: '0'
36
+ required_rubygems_version: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ requirements: []
42
+ rubyforge_project:
43
+ rubygems_version: 2.4.5.1
44
+ signing_key:
45
+ specification_version: 4
46
+ summary: commands to convert temperature!
47
+ test_files: []