inox_converter 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 273f9f20df4e38caf13c755db9e3f094f26fc3f1
4
- data.tar.gz: 110bd04f470dcd16ca8482d5831a2cdbb94438ac
3
+ metadata.gz: 6c78b57f5d1239a76763dfc9b654dac1e69eebbd
4
+ data.tar.gz: d3136ea6c36c84cb008d716f2ba0a38ac4bdcff7
5
5
  SHA512:
6
- metadata.gz: daa289f93d854c4e79fefcf369d32a90bb55743b1bdb786352a0d21996a6c442ea343fa5f58846bbf90f5c32eca7679935c2a8b64be42ba30105fbedc4578c2a
7
- data.tar.gz: 8f111944841c32c2f6ef6108a0244fec4583634da5806a1494a70474956812015700997c9f6141a684ab412a091a86796a6b4d2b033e252234bde38e7b7a1c27
6
+ metadata.gz: e174ead0e44e5db780ea6bae44ee8de01652ac7ee0ba1d5e34a15417c8df658af0c43ecc0063c5938b98e006a2f3498767fb395080c6bf37f4b045171059e7ec
7
+ data.tar.gz: 95ddcd4281f39fdb116a0c2be279792a470412ae69eb438ab14fc881482a8cbdd3337b97fe6ab01af68e815a3a515de50be8ff7c9daecd68e9b343a977bbede6
data/README.md CHANGED
@@ -1,12 +1,14 @@
1
1
  # InoxConverter
2
2
 
3
- [![Build Status](https://travis-ci.org/vinisilvacar/InoxConverter.svg?branch=master)](https://travis-ci.org/vinisilvacar/InoxConverter)
3
+ ![Coverage](https://img.shields.io/badge/coverage-97.67%25-brightgreen.svg)
4
+
5
+ ![Gem Version](https://img.shields.io/badge/gem%20version-1.0.0-brightgreen.svg)
4
6
 
5
- [![Gem Version](https://badge.fury.io/rb/inox_converter.svg)](https://badge.fury.io/rb/inox_converter)
7
+ [![Build Status](https://travis-ci.org/vinisilvacar/InoxConverter.svg?branch=master)](https://travis-ci.org/vinisilvacar/InoxConverter)
6
8
 
7
9
  Hi! Welcome to Inox Converter official page!
8
10
  Our gem is created to work like a 'swiss army knife' for Ruby developers, bringing a easy and reliable way to convert some formats and units that commonly appear during the developing process.
9
- You can: convert area, currency, length, mass, volume and format time and date.
11
+ You can: convert area, currency(real time), length, mass, volume and format time and date.
10
12
  You want to use one unit that doesn't exist in our gem? You can add that unit too!
11
13
  And more... As a framework you can extend our gem and create your own convertions type.
12
14
 
@@ -15,39 +17,49 @@ And more... As a framework you can extend our gem and create your own convertion
15
17
  Add this line to your application's Gemfile:
16
18
 
17
19
  ```ruby
18
- gem 'inox_converter'
20
+ gem 'inox_converter'
19
21
  ```
20
22
 
21
23
  And then execute:
22
24
 
23
- $ bundle
25
+ ```script
26
+ bundle install
27
+ ```
24
28
 
25
29
  Or install it yourself as:
26
30
 
27
- $ gem install inox_converter
31
+ ```script
32
+ gem install inox_converter
33
+ ```
28
34
 
29
35
  ## Usage
30
36
 
31
37
  To make a conversion:
32
38
 
33
- <i>
34
39
  - valueToConvert: the value you want to convert
35
40
  - firstUnit: actual unit -> string
36
41
  - secondUnit: the unit you want to convert to -> string
37
- </i>
38
42
 
39
- - InoxConverter.convertCurrency(valueToConvert, firstUnit, secondUnit)
40
- - InoxConverter.convertLenght(valueToConvert, firstUnit, secondUnit)
41
- - InoxConverter.convertVolume(valueToConvert, firstUnit, secondUnit)
42
- - InoxConverter.convertArea(valueToConvert, firstUnit, secondUnit)
43
- - InoxConverter.convertMass(valueToConvert, firstUnit, secondUnit)
44
- - InoxConverter.convertTime(valueToConvert, firstUnit, secondUnit)
43
+ #### Exemplos
44
+
45
+ ```ruby
46
+ InoxConverter.convertCurrency(valueToConvert, firstUnit, secondUnit)
47
+ InoxConverter.convertLenght(valueToConvert, firstUnit, secondUnit)
48
+ InoxConverter.convertVolume(valueToConvert, firstUnit, secondUnit)
49
+ InoxConverter.convertArea(valueToConvert, firstUnit, secondUnit)
50
+ InoxConverter.convertMass(valueToConvert, firstUnit, secondUnit)
51
+ InoxConverter.convertTime(valueToConvert, firstUnit, secondUnit)
52
+ InoxConverter.convertTimeFormat(timeToFormat, desiredFormat)
53
+ InoxConverter.convertDateFormat(dateToFormat, desiredFormat)
54
+ ```
45
55
 
46
- Example:
47
56
  ```ruby
57
+ InoxConverter.convertCurrency(10, "USD", "BRL")
48
58
  InoxConverter.convertLenght(10, 'meter', 'kilometer')
59
+ InoxConverter.convertDateFormat(Date.today, "DMY")
49
60
  ```
50
61
 
62
+
51
63
  To add a unit:
52
64
 
53
65
  <i>
@@ -55,20 +67,22 @@ To add a unit:
55
67
  - newRate: reason between new unit and base unit
56
68
  </i>
57
69
 
58
- - InoxConverter.addLenghtUnit(newUnit, newRate)
59
- - InoxConverter.addVolumeUnit(newUnit, newRate)
60
- - InoxConverter.addAreaUnit(newUnit, newRate)
61
- - InoxConverter.addMassUnit(newUnit, newRate)
62
- - InoxConverter.addTimeUnit(newUnit, newRate)
63
- - InoxConverter.addDateFormat(newFormat, newRate)
64
- - InoxConverter.addTimeFormat(newFormat, newRate)
70
+ ```ruby
71
+ InoxConverter.addLenghtUnit(newUnit, newRate)
72
+ InoxConverter.addVolumeUnit(newUnit, newRate)
73
+ InoxConverter.addAreaUnit(newUnit, newRate)
74
+ InoxConverter.addMassUnit(newUnit, newRate)
75
+ InoxConverter.addTimeUnit(newUnit, newRate)
76
+ InoxConverter.addDateFormat(newFormat, newRate)
77
+ InoxConverter.addTimeFormat(newFormat, newRate)
78
+ ```
65
79
 
66
80
  If you want to add a lenght unit called MyUnit that is ten times greater than the base unit of lenght (meter), you should to this:
81
+
67
82
  ```ruby
68
83
  InoxConverter.addLenghtUnit('MyUnit', 10)
69
84
  ```
70
85
 
71
-
72
86
  ### Base units:
73
87
 
74
88
  - Area: squared meter
@@ -78,16 +92,38 @@ InoxConverter.addLenghtUnit('MyUnit', 10)
78
92
  - Time: second
79
93
  - Volume: liter
80
94
 
81
- ## Development
95
+ ## Usage
96
+ You can see all types and units to convert in this link:
97
+ [List of Units](https://github.com/vinisilvacar/InoxConverter/wiki/Tipos-de-Convers%C3%A3o)
82
98
 
83
- After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
99
+ We also have a full user manual in portuguese: [Manual de Usuário](https://github.com/vinisilvacar/InoxConverter/wiki/Manual-de-Usu%C3%A1rio)
84
100
 
85
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
101
+ Manual in Englise: coming soon.
86
102
 
87
103
  ## Contributing
104
+ First you must choose an issue or request for us to create a new one
105
+
106
+ Then clone or fork our Repository
107
+
108
+ Time to Code!
88
109
 
89
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/inox_converter.
110
+ Run
90
111
 
112
+ ```script
113
+ bundle install
114
+ bash build.sh
115
+ ```
116
+
117
+ That's it inox_converter is install in your machine and ready use.
118
+
119
+ Do your contribution.
120
+ <p style="color: red;">Don't forget to make your test's! </P>
121
+ <p> We use Rspec </P>
122
+ Run your tests with:
123
+
124
+ ```script
125
+ rspec
126
+ ```
91
127
 
92
128
  ## License
93
129
 
@@ -1,3 +1,3 @@
1
1
  module InoxConverter
2
- VERSION = "1.0.0"
2
+ VERSION = "1.0.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: inox_converter
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lucas Andrade
@@ -13,7 +13,7 @@ authors:
13
13
  autorequire:
14
14
  bindir: exe
15
15
  cert_chain: []
16
- date: 2017-06-22 00:00:00.000000000 Z
16
+ date: 2017-06-26 00:00:00.000000000 Z
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency
19
19
  name: bundler
@@ -47,16 +47,16 @@ dependencies:
47
47
  name: activesupport
48
48
  requirement: !ruby/object:Gem::Requirement
49
49
  requirements:
50
- - - "~>"
50
+ - - ">="
51
51
  - !ruby/object:Gem::Version
52
- version: '4.2'
52
+ version: 4.2.0
53
53
  type: :runtime
54
54
  prerelease: false
55
55
  version_requirements: !ruby/object:Gem::Requirement
56
56
  requirements:
57
- - - "~>"
57
+ - - ">="
58
58
  - !ruby/object:Gem::Version
59
- version: '4.2'
59
+ version: 4.2.0
60
60
  description: Convert currency, temperature, lenght...
61
61
  email:
62
62
  - lucasandradeunb@gmail.com