squid 1.1.0 → 1.2.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +1 -1
- data/examples/squid/labels.rb +1 -1
- data/examples/squid/two_axis.rb +3 -3
- data/lib/squid/graph.rb +2 -2
- data/lib/squid/plotter.rb +0 -2
- data/lib/squid/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c3dc51ece86164cc4d867267f0c6a3b841203f6b
|
4
|
+
data.tar.gz: 145712670157ccbc63b0a29842e28ffb93bf1eb4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 767ad2393bbdd8f510fd34d3d54644d595458fbf2a607a44207bbee362db9ed4f79766230c1e21e815f963d7c67e6df413629b24864e1e322fda90884a830d82
|
7
|
+
data.tar.gz: ae90aabc59b92441042ed2c2da1865a670e6c4d87a62b3fc5184143646c34b1d0003bf940e9ce2e1d63717d3af10fca97771401ee23904edc4420298235f150a
|
data/CHANGELOG.md
CHANGED
@@ -6,6 +6,10 @@ For more information about changelogs, check
|
|
6
6
|
[Keep a Changelog](http://keepachangelog.com) and
|
7
7
|
[Vandamme](http://tech-angels.github.io/vandamme).
|
8
8
|
|
9
|
+
## 1.2.0 - 2016.01.24
|
10
|
+
|
11
|
+
* [ENHANCEMENT] Do not titleize the chart labels (see issue #39)
|
12
|
+
|
9
13
|
## 1.1.0 - 2015.18.12
|
10
14
|
|
11
15
|
* [ENHANCEMENT] Support ActiveSupport/Rails >= 5.0.0.beta1
|
data/README.md
CHANGED
@@ -43,7 +43,7 @@ How to install
|
|
43
43
|
Squid requires **Ruby 2.1 or higher**.
|
44
44
|
If used in a Rails project, requires **Rails 4.0 or higher**.
|
45
45
|
|
46
|
-
To include in your project, add `gem 'squid', ~> '1.
|
46
|
+
To include in your project, add `gem 'squid', ~> '1.2'` to the `Gemfile` file of your Ruby project.
|
47
47
|
|
48
48
|
How to generate the manual
|
49
49
|
==========================
|
data/examples/squid/labels.rb
CHANGED
@@ -4,6 +4,6 @@
|
|
4
4
|
#
|
5
5
|
filename = File.basename(__FILE__).gsub('.rb', '.pdf')
|
6
6
|
Prawn::ManualBuilder::Example.generate(filename) do
|
7
|
-
data = {
|
7
|
+
data = {'A very long label to test padding with labels' => {2013 => 182000, 2014 => -182000, 2015 => 182000}}
|
8
8
|
chart data, label: true
|
9
9
|
end
|
data/examples/squid/two_axis.rb
CHANGED
@@ -3,8 +3,8 @@
|
|
3
3
|
# You can use ..
|
4
4
|
filename = File.basename(__FILE__).gsub('.rb', '.pdf')
|
5
5
|
Prawn::ManualBuilder::Example.generate(filename) do
|
6
|
-
data = {
|
7
|
-
|
8
|
-
|
6
|
+
data = {'Earnings' => {2013 => 104_323, 2014 => 27_234, 2015 => 34_123},
|
7
|
+
'Views' => {2013 => 182, 2014 => 46, 2015 => 88},
|
8
|
+
'Uniques' => {2013 => 104, 2014 => 27, 2015 => 14}}
|
9
9
|
chart data, type: :two_axis, height: 150, labels: [true, false, false], formats: [:currency], line_width: 0.5, colors: ['6f3d79', '7d807f']
|
10
10
|
end
|
data/lib/squid/graph.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
require 'active_support'
|
2
|
-
require 'active_support/core_ext/string/inflections' # for
|
2
|
+
require 'active_support/core_ext/string/inflections' # for singularize
|
3
3
|
|
4
4
|
require 'squid/axis'
|
5
5
|
require 'squid/axis_label'
|
@@ -36,7 +36,7 @@ module Squid
|
|
36
36
|
end
|
37
37
|
|
38
38
|
def draw_legend
|
39
|
-
labels = @data.keys.reverse.map{|key| key.to_s
|
39
|
+
labels = @data.keys.reverse.map{|key| key.to_s}
|
40
40
|
right = legend.is_a?(Hash) ? legend.fetch(:right, 0) : 0
|
41
41
|
@plot.legend labels, right: right, colors: colors, height: legend_height
|
42
42
|
end
|
data/lib/squid/plotter.rb
CHANGED
data/lib/squid/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: squid
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- claudiob
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-01-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: prawn
|