rubyhexagon 1.2.2 → 1.3.0

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
  SHA256:
3
- metadata.gz: c8a91cedb9b96a07c97813b28733d59051c3d607474a849060636b73a568d94c
4
- data.tar.gz: 09aa61e926d1212638d9e196c6e303c47784f17ef9861b75187ca8b5fdec30ea
3
+ metadata.gz: d31432089ab4b468c94966f76cd32f4db815d34a84640115f6fc07e27cf81095
4
+ data.tar.gz: fc239bb33f258b73419a6c110c84480fcb59732e99109431d8591e392fadc486
5
5
  SHA512:
6
- metadata.gz: 9c3703e449a7f3b7a24bfacd98888d9aea0bbef0ec0fe118b3c271c80910e435bf1e0a94beceb14dd34ddcdb8ea14a1c298a5d54610a2e42db40357dce358cb0
7
- data.tar.gz: f216be35a182ae536fccfe8f54d45e8d9b884a6b3e5f5fadd321ecb0a5fa3103468b3332328c209b58e61cd545bff26cdc8ae07b52be6b8030380e1a96b0920a
6
+ metadata.gz: 118cc4709487a0d4a180fa9b9e50a4158bdaf2fe6950e4480d8e6b17de1090f4e89a3732d6a66da03ed87a733933b60673c276e1ddf26d95cb8f24a4ed3b16f0
7
+ data.tar.gz: 4ecfe79a22af4fc728045a2218140ed3aa92f925142ae95be52f9de3cf722229f0e60a4a2a6d513f0b7a5ec76a4b82f9cc972c3d03a692ef5f6574320a561a01
data/lib/rubyhexagon.rb CHANGED
@@ -37,8 +37,8 @@ require 'rubyhexagon/search/tags'
37
37
  # @since 0.4.3
38
38
  module E621
39
39
  MAJOR = 1
40
- MINOR = 2
41
- PATCH = 2
40
+ MINOR = 3
41
+ PATCH = 0
42
42
  NAME = 'rubyhexagon'.freeze
43
43
  VERSION = "#{MAJOR}.#{MINOR}.#{PATCH}".freeze
44
44
  end
@@ -37,6 +37,9 @@ module E621
37
37
  # @return [String] MD5 hash sum
38
38
  attr_reader :md5
39
39
 
40
+ # @return [Integer] file size in bytes
41
+ attr_reader :size
42
+
40
43
  # @author Maxine Michalski
41
44
  #
42
45
  # Initializer for a File. This is not a Ruby file class, but an abstraction
@@ -51,6 +54,7 @@ module E621
51
54
  @ext = file[:ext]
52
55
  @width = file[:width].to_i
53
56
  @height = file[:height].to_i
57
+ @size = file[:size].to_i
54
58
  @user_agent = { 'User-Agent' =>
55
59
  "#{E621::NAME}/#{E621::VERSION} (by maxine_red on e621" }
56
60
  end
@@ -170,7 +170,8 @@ module E621
170
170
  @tag_names = post[:tags].split(/\s+/)
171
171
  @md5 = post[:md5]
172
172
  @image = E621::Image.new(url: post[:file_url], ext: post[:file_ext],
173
- width: post[:width], height: post[:height])
173
+ width: post[:width], height: post[:height],
174
+ size: post[:file_size])
174
175
  setup_sample(post)
175
176
  setup_preview(post)
176
177
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubyhexagon
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.2
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Maxine Michalski