paragoz 2.2.4 → 2.2.5

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: 7aff7f0022377132836dd7074876244e9968529e
4
- data.tar.gz: 26aa423c8aa6ed94a784d0eec80e2c3c5a7165e1
3
+ metadata.gz: 2e257811bbc19b414706bc9085fee893ed001610
4
+ data.tar.gz: 399fca4a2b9b936495b1c14800941589d11a4eee
5
5
  SHA512:
6
- metadata.gz: d7e5abf3f685b6c1015cf69a06db89eb399a74987066418b6c1a8973001fbeab2adb2236ae5f8d8c55f3f0dafcbf57c28b4fc3522bfe4afda6c46b00396a8f7c
7
- data.tar.gz: 948b1f1a82e41c2e7d0ed06ef0421f7995b6968db1a0b6822e79275730fed91f4725c6b096f3b3c8f818ab23cf2ebfa94299655e5a1e1b20f5c7efcdac45ffb9
6
+ metadata.gz: 8bdd6feb4d7a1da1d1dce99fe4c3d178edfcfa54b26dac620d2f5b64acbc18194284542529f75b18b96657c12a32997acdc13c02ae638344c63839eea056a859
7
+ data.tar.gz: 874b2948743ad67b304828258ae50a5afccaec9fb79c23e9abb6ac4ea8766dd0889a9e0829fbbb306cf15cdee7b164d3de773ab7abf827641317678c74acec72
@@ -527,7 +527,7 @@
527
527
  <workItem from="1497127707096" duration="95000" />
528
528
  <workItem from="1497128333571" duration="422000" />
529
529
  <workItem from="1497168135499" duration="267000" />
530
- <workItem from="1497168489322" duration="497000" />
530
+ <workItem from="1497168489322" duration="561000" />
531
531
  </task>
532
532
  <task id="LOCAL-00001" summary="test updated">
533
533
  <created>1497026998790</created>
@@ -607,7 +607,7 @@
607
607
  </history-entry>
608
608
  </component>
609
609
  <component name="TimeTrackingManager">
610
- <option name="totallyTimeSpent" value="52444000" />
610
+ <option name="totallyTimeSpent" value="52508000" />
611
611
  </component>
612
612
  <component name="TodoView">
613
613
  <todo-panel id="selected-file">
@@ -627,7 +627,7 @@
627
627
  <window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32979852" sideWeight="0.50213677" order="9" side_tool="true" content_ui="tabs" />
628
628
  <window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
629
629
  <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32979852" sideWeight="0.49786323" order="7" side_tool="false" content_ui="tabs" />
630
- <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25874868" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
630
+ <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.25874868" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
631
631
  <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
632
632
  <window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.21102864" sideWeight="0.5" order="8" side_tool="false" content_ui="tabs" />
633
633
  <window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" />
@@ -0,0 +1,46 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
6
+
7
+ ## Our Standards
8
+
9
+ Examples of behavior that contributes to creating a positive environment include:
10
+
11
+ * Using welcoming and inclusive language
12
+ * Being respectful of differing viewpoints and experiences
13
+ * Gracefully accepting constructive criticism
14
+ * Focusing on what is best for the community
15
+ * Showing empathy towards other community members
16
+
17
+ Examples of unacceptable behavior by participants include:
18
+
19
+ * The use of sexualized language or imagery and unwelcome sexual attention or advances
20
+ * Trolling, insulting/derogatory comments, and personal or political attacks
21
+ * Public or private harassment
22
+ * Publishing others' private information, such as a physical or electronic address, without explicit permission
23
+ * Other conduct which could reasonably be considered inappropriate in a professional setting
24
+
25
+ ## Our Responsibilities
26
+
27
+ Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
28
+
29
+ Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
30
+
31
+ ## Scope
32
+
33
+ This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
34
+
35
+ ## Enforcement
36
+
37
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at caglar.gokhan@gmail.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
38
+
39
+ Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
40
+
41
+ ## Attribution
42
+
43
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
44
+
45
+ [homepage]: http://contributor-covenant.org
46
+ [version]: http://contributor-covenant.org/version/1/4/
data/README.md CHANGED
@@ -89,7 +89,7 @@ currency.exchange_to('eur', 5) # Returns 5 USD's currency value
89
89
  # you can give second parameter as true to see more info
90
90
  sell = tr_other.currency_to_currency(usd)
91
91
  buy = usd_other.currency_to_currency(euro_other)
92
- test = buy = usd_other.currency_to_currency(euro, true)
92
+ test = usd_other.currency_to_currency(euro, true)
93
93
 
94
94
  ```
95
95
 
@@ -16,7 +16,7 @@ module Paragoz
16
16
 
17
17
  def initialize(code, amount, data, date)
18
18
  @data = data || parse_data(take_response(code.upcase, date))
19
- @time_array = @data["date"].split('-').map {|i| i = i.to_i}
19
+ @time_array = @data["date"].split('-').map(&:to_i)
20
20
  @base = @data["base"]
21
21
  @date = @time_array && @time_array.is_a?(Array) ? Time.new(*@time_array) : Time.now
22
22
  @rates = @data["rates"]
@@ -27,8 +27,8 @@ module Paragoz
27
27
  end
28
28
 
29
29
  def amount=(value)
30
- if value.is_a?(Numeric) && value > 0
31
- @amount = value
30
+ if value.is_a?(Numeric) && value.to_i > 0
31
+ @amount = value.to_i
32
32
  else
33
33
  puts "ERROR! Amount must be a Number and greater than 0."
34
34
  end
@@ -60,15 +60,14 @@ module Paragoz
60
60
  costs
61
61
  end
62
62
 
63
- def calculate_cost(currency_code ,calculate_amount = 1.0, info = false)
64
- cost = self.costs[currency_code.upcase] * calculate_amount || self.amount
65
- if amount.is_a?(Float) && amount > 0 && CURRENCY_CODES.include?(currency_code.upcase)
63
+ def calculate_cost(currency_code ,calculation_amount = 1.0, info = false)
64
+ cost = 0.0
65
+ if amount.is_a?(Numeric) && amount > 0 && CURRENCY_CODES.include?(currency_code.upcase)
66
+ cost = self.costs[currency_code.upcase] * calculation_amount || self.amount
66
67
  puts "You need #{cost} #{@base} to buy #{amount} #{currency_code}" if info
67
68
  cost
68
69
  else
69
70
  puts "ERROR! You need to give 2 parameters >> currency_code & calculate_amount"
70
- puts "Use 'Paragoz::CURRENCY_CODES' for see all defined currency codes."
71
- puts "Amount has to be an float and greater than 0."
72
71
  end
73
72
  end
74
73
 
@@ -118,10 +117,10 @@ module Paragoz
118
117
  attr_reader :time_difference, :comparation_rates, :comparation_costs
119
118
 
120
119
  def initialize(currency_object, currency_object_to_compare)
121
- @time_difference = currency_object.date > currency_object_to_compare.date ? "Currency Object's Rates Are Newer" :
122
- "Currency Object's Rates Are Older"
123
- @comparation_rates = compare_rates(currency_object.rates, currency_object_to_compare.rates)
124
- @comparation_costs = compare_costs(currency_object.costs, currency_object_to_compare.costs)
120
+ @time_difference = currency_object.date > currency_object_to_compare.date ? "Currency Object's Rates Are Newer" :
121
+ "Currency Object's Rates Are Older"
122
+ @comparation_rates = compare_rates(currency_object.rates, currency_object_to_compare.rates)
123
+ @comparation_costs = compare_costs(currency_object.costs, currency_object_to_compare.costs)
125
124
  end
126
125
 
127
126
  private def compare_rates(rates, rates_to_cmpr)
@@ -181,11 +180,11 @@ module Paragoz
181
180
  Currency.new(code, amount, data, date)
182
181
  else
183
182
  puts "ERROR!"
184
- puts "to define a currency you have to give at least two named parameters:"
185
- puts "code: 'currency code as a string' & amount: 'and float greater than 0'"
186
- puts "Use 'Paragoz::CURRENCY_CODES' for see all defined currency codes."
187
- puts "date: parameter format 'YYYY-MM-DD'"
188
- puts "You can use customized data formated as fixer.io JSON"
183
+ puts "to define a currency you have to give at least two named parameters:
184
+ code: 'currency code as a string' & amount: 'and float greater than 0'
185
+ Use 'Paragoz::CURRENCY_CODES' for see all defined currency codes.
186
+ date: parameter format 'YYYY-MM-DD'
187
+ You can use customized data formated as fixer.io JSON"
189
188
  end
190
189
  end
191
190
  end
@@ -1,3 +1,3 @@
1
1
  module Paragoz
2
- VERSION = "2.2.4"
2
+ VERSION = "2.2.5"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: paragoz
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.4
4
+ version: 2.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gökhan Çağlar
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-06-11 00:00:00.000000000 Z
11
+ date: 2017-07-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -84,6 +84,7 @@ files:
84
84
  - ".idea/vcs.xml"
85
85
  - ".idea/workspace.xml"
86
86
  - ".travis.yml"
87
+ - CODE_OF_CONDUCT.md
87
88
  - Gemfile
88
89
  - LICENSE.txt
89
90
  - README.md