alula 0.4.5 → 0.4.6

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/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.5
1
+ 0.4.6
data/lib/alula/config.rb CHANGED
@@ -78,26 +78,24 @@ module Alula
78
78
  production: { hosts: ["/"] },
79
79
  },
80
80
 
81
- # Content generators
82
- generators: {
83
- paginate: {
84
- items: 10,
85
- template: "/:locale/page/:page/",
86
- },
87
- feedbuilder: {
88
- items: 10,
89
- name: "feed.xml",
90
- slug: "feed",
91
- template: "/:locale/:name",
92
- },
93
- sitemap: {}
94
- },
95
-
96
81
  # Plugins
97
82
  plugins: {},
98
83
 
99
84
  # Blog Content options
100
85
  content: {
86
+ generators: {
87
+ paginate: {
88
+ items: 10,
89
+ template: "/:locale/page/:page/",
90
+ },
91
+ feedbuilder: {
92
+ items: 10,
93
+ name: "feed.xml",
94
+ slug: "feed",
95
+ template: "/:locale/:name",
96
+ },
97
+ sitemap: {}
98
+ },
101
99
  filters: {
102
100
  smilies: nil,
103
101
  },
data/lib/alula/content.rb CHANGED
@@ -65,7 +65,7 @@ module Alula
65
65
  end
66
66
 
67
67
  def generate_content
68
- @site.config.generators.each do |type, options|
68
+ @site.config.content.generators.each do |type, options|
69
69
 
70
70
  generator = Alula::Generator.load(type: type, options: options, site: @site)
71
71
  if generator
@@ -72,11 +72,12 @@ module Alula
72
72
  info = Dimensions.dimensions(self.item.filepath)
73
73
  info ||= begin
74
74
  _info = MiniExiftool.new self.item.filepath
75
- [_info.imagewidth, _info.imageheight]
75
+ [_info.imagewidth, _info.imageheight, _info.rotation]
76
76
  end
77
77
  Hashie::Mash.new({
78
78
  width: info[0],
79
79
  height: info[1],
80
+ rotation: info[2] || 0,
80
81
  })
81
82
  end
82
83
  end
@@ -8,7 +8,11 @@ module Alula
8
8
  # Check if video requires rotating
9
9
  if self.info.rotation == 90 or self.info.rotation == 270
10
10
  size.reverse!
11
+ # elsif self.info.height > self.info.width # We have pre-rotated portait video, match framesize
12
+ # size.reverse!
11
13
  end
14
+ # Write rotated values back
15
+ format[:size] = size.join("x")
12
16
  width, height = size
13
17
 
14
18
  # Generate attachment name hash
@@ -40,7 +44,7 @@ module Alula
40
44
  .select{|tn|
41
45
  width, height = tn[:size].split("x").collect{|i| i.to_i};
42
46
  !File.exists?(tn[:output]) and !((width > self.info.width and height > self.info.height) and tn[:hires])
43
- }
47
+ }
44
48
 
45
49
  thumbnails = Hash[thumbnails.collect{|tn| [tn[:label], tn]}]
46
50
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: alula
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.5
4
+ version: 0.4.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -643,7 +643,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
643
643
  version: '0'
644
644
  segments:
645
645
  - 0
646
- hash: 1137735401138233003
646
+ hash: -1337494601730845437
647
647
  required_rubygems_version: !ruby/object:Gem::Requirement
648
648
  none: false
649
649
  requirements:
@@ -652,7 +652,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
652
652
  version: '0'
653
653
  segments:
654
654
  - 0
655
- hash: 1137735401138233003
655
+ hash: -1337494601730845437
656
656
  requirements: []
657
657
  rubyforge_project:
658
658
  rubygems_version: 1.8.23