pt_papersize 0.1.1 → 0.1.2

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: ad68ee4834a02400b9a43d814d91d8592b7883d1
4
- data.tar.gz: c23153b8d1b63c549739338529387d5460b63066
3
+ metadata.gz: a61de8951ccc5521a08cd4ab93f3133340db93d2
4
+ data.tar.gz: e78020bb142f80c6e43dc14e45d036675e64de92
5
5
  SHA512:
6
- metadata.gz: 06d220e7e0e2e78ebcb692ab59b12f0d4cbfd0cdfaef2bfadeb35e31d39ca086407dbdf194cc7d88cb4c135b9139abc600954759ded386d599a721ff02bb6ca5
7
- data.tar.gz: 7fcb4c07fd686f8e7c249807940b91d87332da311573c2e51664c0329685ad829203b0118961a0f916348dba9579e70ee2111ee5072df037f585d39877cff414
6
+ metadata.gz: daa1c628ed1ea10be3952808009f032699fb5af161277664ed3385a4da2eed4b7f0b31a6f26baa45b4aa9f5de4f54e62cee0f3535ad33423bd1b5c1272d86092
7
+ data.tar.gz: 6af774bcadb2a5a37de4d700512685ce1fc000749ba81d0998955311b4fe7e2a989504ab71035bd8bc66082ea45af08cc0ec6cc4c81ff15b5eadb4d4883b8a14
data/README.md CHANGED
@@ -22,8 +22,9 @@ Or install it yourself as:
22
22
 
23
23
  ```ruby
24
24
  require 'pt/papersize'
25
- papersize = PT::PaperSize.new(595,842)
26
- puts papersize.name
25
+
26
+ papersize = PT::PaperSize.find(595,842)
27
+ puts papersize[:name]
27
28
  ```
28
29
 
29
30
  ## Contributing
@@ -38,6 +38,10 @@ module PT
38
38
  { name: 'C9', standard: 'ISO216', width: 40, height: 57 },
39
39
  { name: 'C10', standard: 'ISO216', width: 28, height: 40 },
40
40
 
41
+ # DIN476 (ISO precursor)
42
+ { name: '4A0', standard: 'DIN476', width: 1682, height: 2378 },
43
+ { name: '2A0', standard: 'DIN476', width: 1189, height: 1682 },
44
+
41
45
  # Other metric sizes
42
46
  { name: 'DL', width: 99, height: 210 },
43
47
  { name: 'DLE', width: 110, height: 220 },
@@ -1,5 +1,5 @@
1
1
  module PT
2
2
  class PaperSize
3
- VERSION = "0.1.1"
3
+ VERSION = "0.1.2"
4
4
  end
5
5
  end
@@ -12,6 +12,12 @@ describe PT::PaperSize do
12
12
  PT::PaperSize.find(12.6,17.7,:inch)[:name].should eq('SRA3')
13
13
  end
14
14
 
15
+ it "name different standards across types" do
16
+ PT::PaperSize.find(595,842,:pt)[:standard].should eq('ISO216')
17
+ PT::PaperSize.find(1682,2378,:mm)[:standard].should eq('DIN476')
18
+ PT::PaperSize.find(907,1276,:mm)[:standard].should eq(nil)
19
+ end
20
+
15
21
  it "names random size as Custom" do
16
22
  PT::PaperSize.find(120,20,:mm)[:name].should eq('Custom')
17
23
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pt_papersize
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Paul Chilton
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-04-21 00:00:00.000000000 Z
11
+ date: 2014-06-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler