comparison 0.1.0 → 0.1.99
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 +5 -5
- data/MIT-LICENSE +1 -1
- data/README.md +30 -11
- data/Rakefile +4 -5
- data/app/helpers/comparison/application_helper.rb +6 -1
- data/config/locales/en.yml +7 -4
- data/lib/comparison.rb +3 -1
- data/lib/comparison/comparator.rb +12 -2
- data/lib/comparison/engine.rb +4 -2
- data/lib/comparison/presenter.rb +126 -98
- data/lib/comparison/version.rb +3 -1
- metadata +19 -6
- data/lib/tasks/comparison_tasks.rake +0 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 3a1be3dfdb9956ab89e40615d7e019ac31cefb24596e236acb5a99c4e30ff15a
|
4
|
+
data.tar.gz: b8fce566958ce9801c2ccdab4adce9bbe9739e48b2fd92464763886702f918a6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5a252e4fd07af9024f0972b5a42b5665fac54f1807cbd7f88affd2236bbd9448ad57ae79bc9c78ba31901c723015a0b50fae6ffd46cf78af0d2e8468c6d83ff0
|
7
|
+
data.tar.gz: f9d8b42bfed576f00e8bb200272b001f64a123f709603445e4a6fe165e7f6d4132f967308b3747cf5364c489d74b1b0647e18ebc1f1b78dd40282ec2ffd51f97
|
data/MIT-LICENSE
CHANGED
data/README.md
CHANGED
@@ -1,17 +1,32 @@
|
|
1
|
+
# [](https://badge.fury.io/rb/comparison) [](https://travis-ci.org/jparker/comparison)
|
2
|
+
|
1
3
|
# Comparison
|
2
4
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
5
|
+
Comparison bundles up into Rails helpers the logic for rendering visually
|
6
|
+
informative comparisons of numbers. For example, say you were comparing the
|
7
|
+
sales figures from one quarter to the same quarter in a previous year. You
|
8
|
+
might want to show the percentage change, accompanied by an arrow or icon and
|
9
|
+
color-coded to indicate positive or negative growth. This plugin provides
|
10
|
+
helpers that abstract the logic of deciding what to show into a handful of
|
11
|
+
simple methods and leveraging I18n.
|
12
|
+
|
13
|
+
## Upgrade Notes
|
14
|
+
|
15
|
+
This gem has been getting a facelift, and this has resulted in some changes
|
16
|
+
from the old behavior.
|
10
17
|
|
11
|
-
|
12
|
-
|
18
|
+
`Comparison::Presenter#classes` has been renamed to
|
19
|
+
`Comparison::Presenter#dom_classes`, and `Comparison::Presenter#css` has been
|
20
|
+
renamed to `Comparison::Presenter#style`. The old method names continue to
|
21
|
+
work, but they will emit deprecation warnings.
|
22
|
+
|
23
|
+
The I18n keys used by the above methods have been similarly renamed, but the
|
24
|
+
methods will continue to fall back on the old keys. Going forward, use
|
25
|
+
`comparison.dom_classes` instead of `comparison.classes` and `comparison.style`
|
26
|
+
instead of `comparison.css`.
|
13
27
|
|
14
28
|
## Usage
|
29
|
+
|
15
30
|
The library has three components: the Comparison class for performing the
|
16
31
|
actual math, the Presenter class for decorating the Comparison with
|
17
32
|
view-friendly output, and a helper module for using the Presenter with the
|
@@ -53,6 +68,7 @@ change, an empty string).
|
|
53
68
|
|
54
69
|
|
55
70
|
## Configuration
|
71
|
+
|
56
72
|
Comparison uses I18n to configure the output of some of the Presenter methods.
|
57
73
|
Default implementations are provided where it makes sense. You can provide your
|
58
74
|
own implementations by adding translations to your application.
|
@@ -60,11 +76,11 @@ own implementations by adding translations to your application.
|
|
60
76
|
```yml
|
61
77
|
en:
|
62
78
|
comparison:
|
63
|
-
|
79
|
+
dom_classes:
|
64
80
|
positive: 'comparison positive'
|
65
81
|
negative: 'comparison negative'
|
66
82
|
nochange: 'comparison nochange'
|
67
|
-
|
83
|
+
style:
|
68
84
|
positive_html: 'color: #3c763d; background-color: #dff0d8;'
|
69
85
|
negative_html: 'color: #a94442; background-color: #f2dede;'
|
70
86
|
nochange_html: 'color: #777777;'
|
@@ -79,6 +95,7 @@ en:
|
|
79
95
|
```
|
80
96
|
|
81
97
|
## Installation
|
98
|
+
|
82
99
|
Add this line to your application's Gemfile:
|
83
100
|
|
84
101
|
```ruby
|
@@ -96,9 +113,11 @@ $ gem install comparison
|
|
96
113
|
```
|
97
114
|
|
98
115
|
## Contributing
|
116
|
+
|
99
117
|
Open an GitHub issue for problems and suggestions. This library is in its
|
100
118
|
infancy, so use it at your own risk.
|
101
119
|
|
102
120
|
## License
|
121
|
+
|
103
122
|
The gem is available as open source under the terms of the
|
104
123
|
[MIT License](http://opensource.org/licenses/MIT).
|
data/Rakefile
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen-string-literal: true
|
2
|
+
|
1
3
|
begin
|
2
4
|
require 'bundler/setup'
|
3
5
|
rescue LoadError
|
@@ -14,22 +16,19 @@ RDoc::Task.new(:rdoc) do |rdoc|
|
|
14
16
|
rdoc.rdoc_files.include('lib/**/*.rb')
|
15
17
|
end
|
16
18
|
|
17
|
-
|
19
|
+
APP_RAKEFILE = File.expand_path('test/dummy/Rakefile', __dir__)
|
20
|
+
load 'rails/tasks/engine.rake'
|
18
21
|
|
19
22
|
load 'rails/tasks/statistics.rake'
|
20
23
|
|
21
|
-
|
22
|
-
|
23
24
|
require 'bundler/gem_tasks'
|
24
25
|
|
25
26
|
require 'rake/testtask'
|
26
27
|
|
27
28
|
Rake::TestTask.new(:test) do |t|
|
28
|
-
t.libs << 'lib'
|
29
29
|
t.libs << 'test'
|
30
30
|
t.pattern = 'test/**/*_test.rb'
|
31
31
|
t.verbose = false
|
32
32
|
end
|
33
33
|
|
34
|
-
|
35
34
|
task default: :test
|
@@ -1,13 +1,18 @@
|
|
1
|
+
# frozen-string-literal: true
|
2
|
+
|
1
3
|
module Comparison
|
2
|
-
module ApplicationHelper
|
4
|
+
module ApplicationHelper # :nodoc:
|
3
5
|
##
|
4
6
|
# Returns a Presenter for a Comparator for +m+ and +n+.
|
5
7
|
#
|
6
8
|
# If a block is given, the Presenter is yielded to the block.
|
9
|
+
#
|
10
|
+
# rubocop:disable Naming/UncommunicativeMethodParamName
|
7
11
|
def compare(m, n)
|
8
12
|
comparison = Presenter.new Comparator.new m, n
|
9
13
|
yield comparison if block_given?
|
10
14
|
comparison
|
11
15
|
end
|
16
|
+
# rubocop:enable Naming/UncommunicativeMethodParamName
|
12
17
|
end
|
13
18
|
end
|
data/config/locales/en.yml
CHANGED
@@ -4,14 +4,17 @@ en:
|
|
4
4
|
# positive: 'comparison positive'
|
5
5
|
# negative: 'comparison negative'
|
6
6
|
# nochange: 'comparison nochange'
|
7
|
-
|
8
|
-
positive_html: ''
|
9
|
-
negative_html: ''
|
10
|
-
nochange_html: ''
|
7
|
+
|
11
8
|
# icons:
|
12
9
|
# positive_html: '<span class="glyphicon glyphicon-arrow-up"></span>'
|
13
10
|
# negative_html: '<span class="glyphicon glyphicon-arrow-down"></span>'
|
14
11
|
# nochange_html: '<span class="glyphicon glyphicon-minus"></span>'
|
12
|
+
|
13
|
+
style:
|
14
|
+
positive_html: ''
|
15
|
+
negative_html: ''
|
16
|
+
nochange_html: ''
|
17
|
+
|
15
18
|
arrows:
|
16
19
|
positive_html: '↑'
|
17
20
|
negative_html: '↓'
|
data/lib/comparison.rb
CHANGED
@@ -1,16 +1,26 @@
|
|
1
|
+
# frozen-string-literal: true
|
2
|
+
|
1
3
|
require 'bigdecimal'
|
2
4
|
require 'forwardable'
|
3
5
|
|
4
6
|
module Comparison
|
7
|
+
##
|
8
|
+
# The Comparator object compares two numbers to each other and exposes the
|
9
|
+
# raw and percentage differences.
|
5
10
|
class Comparator
|
6
11
|
extend Forwardable
|
7
12
|
|
8
13
|
##
|
9
14
|
# Instantiates a new Comparator to compare two numbers, +m+ and +n+.
|
15
|
+
#
|
16
|
+
# Both numbers will be converted to instances of `BigDecimal`.
|
17
|
+
#
|
18
|
+
# rubocop:disable Naming/UncommunicativeMethodParamName
|
10
19
|
def initialize(m, n)
|
11
20
|
@m = m.to_d
|
12
21
|
@n = n.to_d
|
13
22
|
end
|
23
|
+
# rubocop:enable Naming/UncommunicativeMethodParamName
|
14
24
|
|
15
25
|
attr_reader :m, :n
|
16
26
|
|
@@ -22,7 +32,7 @@ module Comparison
|
|
22
32
|
@absolute ||= m - n
|
23
33
|
end
|
24
34
|
|
25
|
-
|
35
|
+
alias difference absolute
|
26
36
|
|
27
37
|
##
|
28
38
|
# Returns the percentage difference of +@m+ to +@n+.
|
@@ -34,6 +44,6 @@ module Comparison
|
|
34
44
|
end
|
35
45
|
end
|
36
46
|
|
37
|
-
|
47
|
+
alias percentage relative
|
38
48
|
end
|
39
49
|
end
|
data/lib/comparison/engine.rb
CHANGED
@@ -1,9 +1,11 @@
|
|
1
|
+
# frozen-string-literal: true
|
2
|
+
|
1
3
|
module Comparison
|
2
|
-
class Engine < ::Rails::Engine
|
4
|
+
class Engine < ::Rails::Engine # :nodoc:
|
3
5
|
isolate_namespace Comparison
|
4
6
|
|
5
7
|
initializer 'comparison.view_helpers' do
|
6
|
-
ActionView::Base.send :include,
|
8
|
+
ActionView::Base.send :include, helpers
|
7
9
|
end
|
8
10
|
end
|
9
11
|
end
|
data/lib/comparison/presenter.rb
CHANGED
@@ -1,19 +1,20 @@
|
|
1
1
|
# frozen-string-literal: true
|
2
2
|
|
3
3
|
require 'delegate'
|
4
|
-
require 'forwardable'
|
5
4
|
|
6
5
|
module Comparison
|
6
|
+
##
|
7
|
+
# The Presenter object wraps a Comparator with methods that return
|
8
|
+
# view-friendly output.
|
7
9
|
class Presenter < DelegateClass(Comparator)
|
8
|
-
extend Forwardable
|
9
10
|
include ActionView::Helpers::TranslationHelper
|
10
11
|
|
11
|
-
ARROWS = { up: '↑', down: '↓', none: '' }
|
12
|
+
ARROWS = { up: '↑', down: '↓', none: '' }.freeze
|
12
13
|
|
13
14
|
# TODO: This shouldn't necessarily return a currency representation.
|
14
15
|
|
15
16
|
##
|
16
|
-
# Returns
|
17
|
+
# Returns Comparator#absolute presented as currency.
|
17
18
|
def difference(**options)
|
18
19
|
if positive?
|
19
20
|
number_to_currency absolute, format: '+%u%n', **options
|
@@ -23,33 +24,26 @@ module Comparison
|
|
23
24
|
end
|
24
25
|
|
25
26
|
##
|
26
|
-
# Returns
|
27
|
+
# Returns Comparator#relative formatted as a percentage.
|
27
28
|
#
|
28
29
|
# If the relative percentage evaluates to Infinity or -Infinity, +nil+ is
|
29
30
|
# returned. If it evaluates to NaN, 0 is returned.
|
30
|
-
def percentage(
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
when infinite?
|
31
|
+
def percentage(**options)
|
32
|
+
if nan? || zero?
|
33
|
+
number_to_percentage 0, **options
|
34
|
+
elsif infinite?
|
35
35
|
# TODO: Return nil, or lookup an optional representation in I18n?
|
36
36
|
nil
|
37
|
-
|
38
|
-
number_to_percentage relative,
|
39
|
-
precision: precision, format: '+%n%', **options
|
37
|
+
elsif positive?
|
38
|
+
number_to_percentage relative, format: '+%n%', **options
|
40
39
|
else
|
41
|
-
number_to_percentage relative,
|
42
|
-
precision: precision, **options
|
40
|
+
number_to_percentage relative, **options
|
43
41
|
end
|
44
42
|
end
|
45
43
|
|
46
|
-
|
47
|
-
deprecate :change
|
48
|
-
|
49
|
-
delegate %i[number_to_currency number_to_percentage] => :'ActiveSupport::NumberHelper'
|
50
|
-
|
44
|
+
# rubocop:disable Metrics/LineLength
|
51
45
|
##
|
52
|
-
# Returns the I18n translation for `comparison.icons`. (See also
|
46
|
+
# Returns the I18n translation for `comparison.icons`. (See also #arrow.)
|
53
47
|
#
|
54
48
|
# This method is intended to display a graphical representation of the
|
55
49
|
# comparison. Typically this would be an arrow pointing up or down.
|
@@ -61,17 +55,18 @@ module Comparison
|
|
61
55
|
# with Bootstrap, you could add the following translations to your
|
62
56
|
# application:
|
63
57
|
#
|
64
|
-
#
|
65
|
-
#
|
66
|
-
#
|
67
|
-
#
|
68
|
-
#
|
69
|
-
#
|
58
|
+
# en:
|
59
|
+
# comparison:
|
60
|
+
# icons:
|
61
|
+
# positive_html: '<span class="glyphicon glyphicon-arrow-up"></span>'
|
62
|
+
# negative_html: '<span class="glyphicon glyphicon-arrow-down"></span>'
|
63
|
+
# nochange_html: '<span class="glyphicon glyphicon-minus"></span>'
|
64
|
+
#
|
65
|
+
# rubocop:enable Metrics/LineLength
|
70
66
|
def icon
|
71
|
-
|
72
|
-
when positive?
|
67
|
+
if positive?
|
73
68
|
t 'comparison.icons.positive_html'
|
74
|
-
|
69
|
+
elsif negative?
|
75
70
|
t 'comparison.icons.negative_html'
|
76
71
|
else
|
77
72
|
t 'comparison.icons.nochange_html'
|
@@ -79,40 +74,39 @@ module Comparison
|
|
79
74
|
end
|
80
75
|
|
81
76
|
##
|
82
|
-
# Returns the I18n translation for `comparison.icons`. (See also
|
77
|
+
# Returns the I18n translation for `comparison.icons`. (See also #icon.)
|
83
78
|
#
|
84
79
|
# This method is intended to display a graphical representation of the
|
85
80
|
# comparison. Typically this would be an arrow pointing up or down.
|
86
81
|
#
|
87
82
|
# The default implementation is as follows:
|
88
83
|
#
|
89
|
-
#
|
90
|
-
#
|
91
|
-
#
|
92
|
-
#
|
93
|
-
#
|
94
|
-
#
|
84
|
+
# en:
|
85
|
+
# comparison:
|
86
|
+
# arrows:
|
87
|
+
# positive_html: '↑'
|
88
|
+
# negative_html: '↓'
|
89
|
+
# nochange_html: ''
|
95
90
|
#
|
96
91
|
# For example, to generate up and down arrows using Glyphicons included
|
97
92
|
# with Bootstrap, you could add the following translations to your
|
98
93
|
# application:
|
99
94
|
#
|
100
|
-
#
|
101
|
-
#
|
102
|
-
#
|
95
|
+
# #arrows and its sister method #icon perform roughly identical tasks with
|
96
|
+
# roughly identical intentions. The difference between the two methods is
|
97
|
+
# in the context in which they are intended to be used.
|
103
98
|
#
|
104
|
-
#
|
105
|
-
#
|
106
|
-
#
|
107
|
-
#
|
99
|
+
# #arrows is meant to be used from view contexts with limited functionality
|
100
|
+
# such as an HTML email. As such, the translations you specify should be
|
101
|
+
# simple enough, like HTML character entities, to work within said view
|
102
|
+
# context.
|
108
103
|
#
|
109
|
-
#
|
110
|
-
#
|
104
|
+
# #icons is meant to be used from full-featured view contexts. As such,
|
105
|
+
# #icons is the one to use to generate HTML tags.
|
111
106
|
def arrow
|
112
|
-
|
113
|
-
when positive?
|
107
|
+
if positive?
|
114
108
|
t 'comparison.arrows.positive_html', default: ARROWS[:up]
|
115
|
-
|
109
|
+
elsif negative?
|
116
110
|
t 'comparison.arrows.negative_html', default: ARROWS[:down]
|
117
111
|
else
|
118
112
|
t 'comparison.arrows.nochange_html', default: ARROWS[:none]
|
@@ -120,72 +114,106 @@ module Comparison
|
|
120
114
|
end
|
121
115
|
|
122
116
|
##
|
123
|
-
# Returns the I18n translation for `comparison.
|
117
|
+
# Returns the I18n translation for `comparison.dom_classes`.
|
124
118
|
#
|
125
119
|
# Use these translations to specify CSS classes for tags that contain
|
126
120
|
# comparison data. For example:
|
127
121
|
#
|
128
|
-
#
|
129
|
-
#
|
130
|
-
#
|
131
|
-
#
|
132
|
-
#
|
133
|
-
#
|
134
|
-
#
|
135
|
-
#
|
136
|
-
#
|
137
|
-
#
|
138
|
-
#
|
139
|
-
#
|
140
|
-
#
|
141
|
-
#
|
142
|
-
#
|
143
|
-
#
|
144
|
-
#
|
145
|
-
#
|
146
|
-
#
|
147
|
-
#
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
122
|
+
# en:
|
123
|
+
# comparison:
|
124
|
+
# dom_classes:
|
125
|
+
# positive: 'comparison positive'
|
126
|
+
# negative: 'comparison negative'
|
127
|
+
# nochange: 'comparison nochange'
|
128
|
+
#
|
129
|
+
# .comparison.positive {
|
130
|
+
# color: #3c763d;
|
131
|
+
# background-color: #dff0d8;
|
132
|
+
# }
|
133
|
+
# .comparison.negative {
|
134
|
+
# color: #a94442;
|
135
|
+
# background-color: #f2dede;
|
136
|
+
# }
|
137
|
+
# .comparison.nochange {
|
138
|
+
# color: #777777;
|
139
|
+
# }
|
140
|
+
#
|
141
|
+
# content_tag :span, cmp.difference, class: cmp.dom_classes
|
142
|
+
# # => "<span class=\"comparison positive\">+10%</span>"
|
143
|
+
#
|
144
|
+
# If you need to work with inline styles instead of CSS classes, see the
|
145
|
+
# `#style` method.
|
146
|
+
def dom_classes
|
147
|
+
if positive?
|
148
|
+
t 'comparison.dom_classes.positive',
|
149
|
+
default: %i[comparison.classes.positive]
|
150
|
+
elsif negative?
|
151
|
+
t 'comparison.dom_classes.negative',
|
152
|
+
default: %i[comparison.classes.negative]
|
154
153
|
else
|
155
|
-
t 'comparison.
|
154
|
+
t 'comparison.dom_classes.nochange',
|
155
|
+
default: %i[comparison.classes.nochange]
|
156
156
|
end
|
157
157
|
end
|
158
158
|
|
159
|
+
def classes
|
160
|
+
Kernel.warn '[DEPRECATION WARNING] #classes is deprecated: ' \
|
161
|
+
"use #dom_classes instead: #{caller(3..3).first}"
|
162
|
+
dom_classes
|
163
|
+
end
|
164
|
+
|
165
|
+
# rubocop:disable Metrics/LineLength
|
159
166
|
##
|
160
|
-
# Returns the I18n translation for `comparison.
|
167
|
+
# Returns the I18n translation for `comparison.style`.
|
161
168
|
#
|
162
|
-
# Use these translations to specify
|
169
|
+
# Use these translations to specify inline CSS style rules to be used when
|
163
170
|
# formatting comparison data. For example:
|
164
171
|
#
|
165
|
-
#
|
166
|
-
#
|
167
|
-
#
|
168
|
-
#
|
169
|
-
#
|
170
|
-
#
|
172
|
+
# en:
|
173
|
+
# comparison:
|
174
|
+
# style:
|
175
|
+
# positive: 'color: #3c763d; background-color: #dff0d8;'
|
176
|
+
# negative: 'color: #a94442; background-color: #f2dede;'
|
177
|
+
# nochange: 'color: #777777;'
|
171
178
|
#
|
172
|
-
#
|
179
|
+
# content_tag :span, cmp.difference, style: cmp.style
|
180
|
+
# # => "<span style=\"color: #3c763d; background-color: #dff0d8;\">+10%</span>"
|
173
181
|
#
|
174
|
-
#
|
175
|
-
#
|
176
|
-
#
|
177
|
-
#
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
t 'comparison.
|
182
|
-
|
183
|
-
|
182
|
+
# In general, it's probably preferable to use `#dom_classes` in conjunction
|
183
|
+
# with CSS style rules defined separate CSS files, but this isn't always
|
184
|
+
# possible.
|
185
|
+
#
|
186
|
+
# rubocop:enable Metrics/LineLength
|
187
|
+
def style
|
188
|
+
if positive?
|
189
|
+
t 'comparison.style.positive',
|
190
|
+
default: [:'comparison.css.positive', '']
|
191
|
+
elsif negative?
|
192
|
+
t 'comparison.style.negative',
|
193
|
+
default: [:'comparison.css.negative', '']
|
184
194
|
else
|
185
|
-
t 'comparison.
|
195
|
+
t 'comparison.style.nochange',
|
196
|
+
default: [:'comparison.css.nochange', '']
|
186
197
|
end
|
187
198
|
end
|
188
199
|
|
189
|
-
|
200
|
+
def css
|
201
|
+
Kernel.warn '[DEPRECATION WARNING] #css is deprecated: ' \
|
202
|
+
"use #style instead: #{caller(3..3).first}"
|
203
|
+
style
|
204
|
+
end
|
205
|
+
|
206
|
+
private
|
207
|
+
|
208
|
+
def number_to_percentage(value, delimiter: ',', precision: 0, **options)
|
209
|
+
ActiveSupport::NumberHelper.number_to_percentage value,
|
210
|
+
delimiter: delimiter,
|
211
|
+
precision: precision,
|
212
|
+
**options
|
213
|
+
end
|
214
|
+
|
215
|
+
def number_to_currency(*args)
|
216
|
+
ActiveSupport::NumberHelper.number_to_currency(*args)
|
217
|
+
end
|
190
218
|
end
|
191
219
|
end
|
data/lib/comparison/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: comparison
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.99
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- John Parker
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-10-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -45,7 +45,21 @@ dependencies:
|
|
45
45
|
- !ruby/object:Gem::Version
|
46
46
|
version: '0'
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
|
-
name: pry
|
48
|
+
name: pry
|
49
|
+
requirement: !ruby/object:Gem::Requirement
|
50
|
+
requirements:
|
51
|
+
- - ">="
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '0'
|
54
|
+
type: :development
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
requirements:
|
58
|
+
- - ">="
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: '0'
|
61
|
+
- !ruby/object:Gem::Dependency
|
62
|
+
name: rubocop
|
49
63
|
requirement: !ruby/object:Gem::Requirement
|
50
64
|
requirements:
|
51
65
|
- - ">="
|
@@ -75,7 +89,6 @@ files:
|
|
75
89
|
- lib/comparison/engine.rb
|
76
90
|
- lib/comparison/presenter.rb
|
77
91
|
- lib/comparison/version.rb
|
78
|
-
- lib/tasks/comparison_tasks.rake
|
79
92
|
homepage: https://github.com/jparker/comparison
|
80
93
|
licenses:
|
81
94
|
- MIT
|
@@ -88,7 +101,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
88
101
|
requirements:
|
89
102
|
- - ">="
|
90
103
|
- !ruby/object:Gem::Version
|
91
|
-
version: '
|
104
|
+
version: '2.3'
|
92
105
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
93
106
|
requirements:
|
94
107
|
- - ">="
|
@@ -96,7 +109,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
96
109
|
version: '0'
|
97
110
|
requirements: []
|
98
111
|
rubyforge_project:
|
99
|
-
rubygems_version: 2.
|
112
|
+
rubygems_version: 2.7.7
|
100
113
|
signing_key:
|
101
114
|
specification_version: 4
|
102
115
|
summary: Helpers for displaying details of comparing two numbers.
|