imposition 0.9.5.1 → 0.9.5.4
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.
- data/lib/imposition/metodos.rb +13 -13
- data/lib/locales/en.yml +1 -1
- data/lib/locales/es.yml +1 -1
- metadata +7 -7
data/lib/imposition/metodos.rb
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
# encoding: utf-8
|
3
3
|
|
4
4
|
module Metodos
|
5
|
-
|
5
|
+
require 'pry'
|
6
6
|
#WORK
|
7
7
|
def funcionar(w_,h_,wP_,hP_,nX,nY,nPaginas,nPliegos,cuadernillos,preguntas,temp,locale)
|
8
8
|
localize(locale)
|
@@ -475,8 +475,8 @@ def self.validacion(impostor, preguntas)
|
|
475
475
|
if impostor.w!=0.point then
|
476
476
|
if impostor.wP!=0.point then
|
477
477
|
if impostor.nX==0 then
|
478
|
-
impostor.nX=(impostor.wP/impostor.w).floor
|
479
|
-
impostor.wP=impostor.wP_["numero"].send(impostor.wP_["unidad"])#operacion alchemist cambia el operando
|
478
|
+
impostor.nX=(impostor.wP/(impostor.w.to.send(impostor.wP_['unidad']))).floor
|
479
|
+
impostor.wP=impostor.wP_["numero"].send(impostor.wP_["unidad"])#operacion alchemist cambia el operando
|
480
480
|
if impostor.nX==0 then
|
481
481
|
mensajes.push(Clases::MensajeDato.new(3, "horizontal", 5))#error
|
482
482
|
else
|
@@ -497,7 +497,7 @@ def self.validacion(impostor, preguntas)
|
|
497
497
|
if impostor.nX!=0 then
|
498
498
|
if preguntas["escaladoH"]==nil or !preguntas["escaladoH"].ok then
|
499
499
|
preguntas["escaladoH"]=Clases::PreguntaEscalado.new("horizontalmente")
|
500
|
-
else
|
500
|
+
else
|
501
501
|
if preguntas["escaladoH"].yn then
|
502
502
|
impostor.w=(impostor.wP.to_f/(impostor.nX*(impostor.cuadernillos ? 2 : 1))).send(impostor.wP_["unidad"])#divido en 2 porque ya lo multiplique
|
503
503
|
impostor.w_["numero"]=impostor.w
|
@@ -522,7 +522,7 @@ def self.validacion(impostor, preguntas)
|
|
522
522
|
end
|
523
523
|
impostor.w_["unidad"]=impostor.size["unidad"]
|
524
524
|
mensajes.push(Clases::MensajeDato.new(1, "horizontal", 4))#info
|
525
|
-
impostor.nX=(impostor.wP/impostor.w).floor
|
525
|
+
impostor.nX=(impostor.wP/(impostor.w.to.send(impostor.wP_['unidad']))).floor
|
526
526
|
impostor.wP=impostor.wP_["numero"].send(impostor.wP_["unidad"])
|
527
527
|
if impostor.nX==0 then
|
528
528
|
mensajes.push(Clases::MensajeDato.new(3, "horizontal", 5))#error
|
@@ -549,8 +549,8 @@ def self.validacion(impostor, preguntas)
|
|
549
549
|
if impostor.h!=0.point then
|
550
550
|
if impostor.hP!=0.point then
|
551
551
|
if impostor.nY==0 then
|
552
|
-
impostor.nY=(impostor.hP/impostor.h).floor
|
553
|
-
impostor.hP=impostor.hP_["numero"].send(impostor.hP_["unidad"])
|
552
|
+
impostor.nY=(impostor.hP/(impostor.h.to.send(impostor.hP_['unidad']))).floor
|
553
|
+
impostor.hP=impostor.hP_["numero"].send(impostor.hP_["unidad"])
|
554
554
|
if impostor.nY==0 then
|
555
555
|
mensajes.push(Clases::MensajeDato.new(3, "vertical", 5))#error
|
556
556
|
else
|
@@ -590,7 +590,7 @@ def self.validacion(impostor, preguntas)
|
|
590
590
|
impostor.h_["numero"]=impostor.h
|
591
591
|
impostor.h_["unidad"]=impostor.size["unidad"]
|
592
592
|
mensajes.push(Clases::MensajeDato.new(1, "vertical", 4))#info
|
593
|
-
impostor.nY=(impostor.hP/impostor.h).floor
|
593
|
+
impostor.nY=(impostor.hP/(impostor.h.to.send(impostor.hP_['unidad']))).floor
|
594
594
|
impostor.hP=impostor.hP_["numero"].send(impostor.hP_["unidad"])
|
595
595
|
if impostor.nY==0 then
|
596
596
|
mensajes.push(Clases::MensajeDato.new(3, "vertical", 5))#error
|
@@ -612,18 +612,18 @@ def self.validacion(impostor, preguntas)
|
|
612
612
|
end
|
613
613
|
#MEDIDAS
|
614
614
|
wPDummy=impostor.wP_["numero"].send(impostor.wP_["unidad"])#bug alchemist
|
615
|
-
hPDummy=impostor.hP_["numero"].send(impostor.hP_["unidad"])
|
615
|
+
hPDummy=impostor.hP_["numero"].send(impostor.hP_["unidad"])
|
616
616
|
if redondear(impostor.nX*impostor.w.to_f) > redondear(impostor.wP.to(impostor.w_["unidad"]).to_f) then
|
617
617
|
mensajes.push(Clases::MensajeMedida.new(3, "horizontal", [impostor.nX, impostor.w_, impostor.wP_]))#error
|
618
|
-
elsif impostor.nX>0 and wPDummy -
|
619
|
-
sobra=impostor.wP-
|
618
|
+
elsif impostor.nX>0 and impostor.w.to_f!=0 and wPDummy - impostor.w.to(impostor.wP_["unidad"])*impostor.nX > 1.point then
|
619
|
+
sobra=impostor.wP - impostor.w.to(impostor.wP_["unidad"])*impostor.nX
|
620
620
|
impostor.wP=impostor.wP_["numero"].send(impostor.wP_["unidad"])
|
621
621
|
mensajes.push(Clases::MensajeMedida.new(2, "horizontal", [sobra, impostor.wP_["unidad"]]))#warn
|
622
622
|
end
|
623
623
|
if redondear(impostor.nY*impostor.h.to_f) > redondear(impostor.hP.to(impostor.h_["unidad"]).to_f) then
|
624
624
|
mensajes.push(Clases::MensajeMedida.new(3, "vertical", [impostor.nY, impostor.h_, impostor.hP_]))#error
|
625
|
-
elsif impostor.nY>0 and hPDummy -
|
626
|
-
sobra=impostor.hP-
|
625
|
+
elsif impostor.nY>0 and impostor.h.to_f!=0 and hPDummy - impostor.h.to(impostor.hP_["unidad"])*impostor.nY > 1.point then
|
626
|
+
sobra=impostor.hP - impostor.h.to(impostor.hP_["unidad"])*impostor.nY
|
627
627
|
impostor.hP=impostor.hP_["numero"].send(impostor.hP_["unidad"])
|
628
628
|
mensajes.push(Clases::MensajeMedida.new(2, "vertical", [sobra, impostor.hP_["unidad"]]))#warn
|
629
629
|
end
|
data/lib/locales/en.yml
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
en:
|
2
|
-
welcome: "- Welcome human, let's print a book. says :::impostor::0.9.5::"
|
2
|
+
welcome: "- Welcome human, let's print a book. says :::impostor::0.9.5.4::"
|
3
3
|
badunit: "%{input}'s unit is incorrect."
|
4
4
|
bookletsq: "order for booklets? (y/n)"
|
5
5
|
WnX: "You didn't specify Page width but you specified Sheet width and how many Pages per Sheet"
|
data/lib/locales/es.yml
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
es:
|
2
|
-
welcome: "- Bienvenido ser humano, leer es volar al centro de los tiempos... \n Dice :::impostor::0.9.5:::"
|
2
|
+
welcome: "- Bienvenido ser humano, leer es volar al centro de los tiempos... \n Dice :::impostor::0.9.5.4:::"
|
3
3
|
badunit: "La unidad de %{input} no es correcta."
|
4
4
|
bookletsq: "¿imponer en cuadernillos? (y/n)"
|
5
5
|
WnX: "No especificó ancho de Página pero sí ancho de Pliego y número de páginas por Pliego"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: imposition
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 27
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 9
|
9
9
|
- 5
|
10
|
-
-
|
11
|
-
version: 0.9.5.
|
10
|
+
- 4
|
11
|
+
version: 0.9.5.4
|
12
12
|
platform: ruby
|
13
13
|
authors:
|
14
14
|
- numerico
|
@@ -16,7 +16,7 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date: 2013-
|
19
|
+
date: 2013-02-22 00:00:00 Z
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
22
22
|
name: alchemist
|
@@ -102,7 +102,7 @@ dependencies:
|
|
102
102
|
version: "0"
|
103
103
|
type: :development
|
104
104
|
version_requirements: *id006
|
105
|
-
description:
|
105
|
+
description: nUp & booklets
|
106
106
|
email: webmaster@numerica.cl
|
107
107
|
executables:
|
108
108
|
- impostor
|
@@ -117,7 +117,7 @@ files:
|
|
117
117
|
- lib/locales/en.yml
|
118
118
|
- lib/locales/es.yml
|
119
119
|
- bin/impostor
|
120
|
-
homepage:
|
120
|
+
homepage: http://impostor.herokuapp.com
|
121
121
|
licenses: []
|
122
122
|
|
123
123
|
post_install_message:
|
@@ -149,6 +149,6 @@ rubyforge_project:
|
|
149
149
|
rubygems_version: 1.8.25
|
150
150
|
signing_key:
|
151
151
|
specification_version: 3
|
152
|
-
summary:
|
152
|
+
summary: editorial imposition script in nUp & booklets
|
153
153
|
test_files: []
|
154
154
|
|