c80_news 0.1.0.14 → 0.1.0.15

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: b49821c617380dba546bf7ec724581695da4bc94
4
- data.tar.gz: e08dc54b99d63f4cd4616c4a591e00760bdf64c4
3
+ metadata.gz: 23ce1e61b0aaee39b9ed0244593db1d21de6c75f
4
+ data.tar.gz: fdb31abfc9337db979c1b02cf4af64b1aa54a2b2
5
5
  SHA512:
6
- metadata.gz: cd2598f228122ec05d37af050b8b1eb22decb77e2ce64aee3ee5df94f6d521d16f2d05fab3f039582ae5da1bb164533c1ecbebc1bc78ca495615334306d3089d
7
- data.tar.gz: 4c7dd9183f80f2f3cc9b120dfbc235a4259859900575a1925f65f7428059da7bc8c354c0e9bfa93e4c1a420c0d36c298cfb68e7727c3cf65176ae4ada4d253d7
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
- # puts "<PageArtUploader.resize_to_limit_big>"
50
- manipulate! do |img|
49
+ # byebug
51
50
 
52
- w = SiteProp.first.page_content_width
53
- h = calc_height_of_image(w)
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
- manipulate! do |img|
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(model.image.current_path)
140
+ model_image = ::MiniMagick::Image.open(current_path)
141
141
  calc_height(w, model_image["width"], model_image["height"])
142
142
  end
143
143
 
@@ -1,3 +1,3 @@
1
1
  module C80News
2
- VERSION = '0.1.0.14'
2
+ VERSION = '0.1.0.15'
3
3
  end
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.14
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-06-26 00:00:00.000000000 Z
11
+ date: 2017-07-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler