c80_news 0.1.0.14 → 0.1.0.15
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/app/uploaders/c80_news/fphoto_uploader.rb +11 -11
- data/lib/c80_news/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: 23ce1e61b0aaee39b9ed0244593db1d21de6c75f
|
4
|
+
data.tar.gz: fdb31abfc9337db979c1b02cf4af64b1aa54a2b2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0d0e1d137d4e5f4d3ab68bba740114357d3e892151e52592944f5fc727c6d01f473f0a626c12c05ed31d4e7185a44ebd66261ba8ac66792de5d1a0c3a3576699
|
7
|
+
data.tar.gz: 538eb592558d299d52cfdcac517912c01fc25beed70039a524ec3213da2f99ae12fb0bb481265451a4a9c15d370593f5fc13565926ff3b0012dceda1113acf00
|
@@ -46,17 +46,18 @@ module C80News
|
|
46
46
|
# --[ идут в контент новости ]--------------------------------------------------------------------------------------
|
47
47
|
|
48
48
|
def resize_to_thumb_big
|
49
|
-
#
|
50
|
-
manipulate! do |img|
|
49
|
+
# byebug
|
51
50
|
|
52
|
-
|
53
|
-
|
51
|
+
w = SiteProp.first.page_content_width
|
52
|
+
h = calc_height_of_image(w)
|
54
53
|
|
54
|
+
# puts "<PageArtUploader.resize_to_limit_big>"
|
55
|
+
manipulate! do |img|
|
55
56
|
img.resize "#{w}x#{h}>"
|
56
57
|
img = yield(img) if block_given?
|
57
58
|
img
|
58
|
-
|
59
59
|
end
|
60
|
+
|
60
61
|
end
|
61
62
|
|
62
63
|
def resize_to_thumb_small
|
@@ -76,18 +77,17 @@ module C80News
|
|
76
77
|
# ------------------------------------------------------------------------------------------------------------------------
|
77
78
|
|
78
79
|
def resize_to_lg
|
80
|
+
# byebug
|
79
81
|
|
80
|
-
|
81
|
-
|
82
|
-
w = C80News::Prop.first.thumb_lg_width
|
83
|
-
h = C80News::Prop.first.thumb_lg_height
|
82
|
+
w = C80News::Prop.first.thumb_lg_width
|
83
|
+
h = C80News::Prop.first.thumb_lg_height
|
84
84
|
|
85
|
+
manipulate! do |img|
|
85
86
|
img.resize "#{w}x#{h}^"
|
86
87
|
img.gravity 'center'
|
87
88
|
img.extent "#{w}x#{h}"
|
88
89
|
img = yield(img) if block_given?
|
89
90
|
img
|
90
|
-
|
91
91
|
end
|
92
92
|
|
93
93
|
end
|
@@ -137,7 +137,7 @@ module C80News
|
|
137
137
|
private
|
138
138
|
|
139
139
|
def calc_height_of_image(w)
|
140
|
-
model_image = ::MiniMagick::Image.open(
|
140
|
+
model_image = ::MiniMagick::Image.open(current_path)
|
141
141
|
calc_height(w, model_image["width"], model_image["height"])
|
142
142
|
end
|
143
143
|
|
data/lib/c80_news/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: c80_news
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.0.
|
4
|
+
version: 0.1.0.15
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- C80609A
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-07-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|