squid 1.1.0 → 1.2.0

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: 20f7912ec8ea6377616213e569569c288ac46a86
4
- data.tar.gz: 00604241a9b8fe20136bcb8c41f8ca2ccd6d2d27
3
+ metadata.gz: c3dc51ece86164cc4d867267f0c6a3b841203f6b
4
+ data.tar.gz: 145712670157ccbc63b0a29842e28ffb93bf1eb4
5
5
  SHA512:
6
- metadata.gz: f590b374d01faf3538771f80fc7eaa28da234adcf7ed4bb8b6fe531a02b70260d7a15ee72b7ddd3e9a48896acc950b0cead263211a1628f7a14bb569ddd90bdf
7
- data.tar.gz: fba2b507a33f2796210adb17e992de8df7343b539852d095f4ade5dc4af656922819f4b8084e6f82fe4c166e1f009c467ec426f787e64194277503d1961db463
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.0'` to the `Gemfile` file of your Ruby project.
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
  ==========================
@@ -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 = {a_very_long_label_to_test_padding_with_labels: {2013 => 182000, 2014 => -182000, 2015 => 182000}}
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
@@ -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 = {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}}
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 titleize
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.titleize}
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
@@ -180,8 +180,6 @@ module Squid
180
180
  x - entry_padding
181
181
  end
182
182
 
183
-
184
-
185
183
  # Convenience method to wrap a block by setting and unsetting a Prawn
186
184
  # property such as line_width.
187
185
  def with(new_values = {})
data/lib/squid/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Squid
2
- VERSION = '1.1.0'
2
+ VERSION = '1.2.0'
3
3
  end
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.1.0
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: 2015-12-19 00:00:00.000000000 Z
11
+ date: 2016-01-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: prawn