tenon 1.0.59 → 1.0.60

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
  SHA1:
3
- metadata.gz: 5e1552d054d34f083ccfc50373dcabadf752fd73
4
- data.tar.gz: c4ceadb0f3c8f00d2112dda9f1c8ff621d1fc914
3
+ metadata.gz: 1d53e72b5baba5b7ebbb44a67898108bb0c0e3c1
4
+ data.tar.gz: dd2d373cf02d70ad9663605f6c15bc2ad4cee705
5
5
  SHA512:
6
- metadata.gz: ae9c6153301dca657825b2e6dff6442cb481258660d95fb152cfaa79261224db2faf9366dab2d77bd62588d190c9bb5f7653572d9ba8fa3f8c4bf85a2be446f0
7
- data.tar.gz: 7f1b2dfaf00b234a737616cee00781664c7a79e346f0849bf564a0503a8c847771420baa21a0e56329cf8eca80eaa2d61f0856f69b89154d9bdb4c01d4ac044e
6
+ metadata.gz: 25ffa3ebba9e761239daebff9b12531489d5fb5d5151872cacedc7504efa18ce78bc2cc193e14120fb44c2e02dec5126b479ca8ba3db1e169eee0b48d7103abc
7
+ data.tar.gz: 5b8d63a1bd0baeb4c8057cd603867aa2bc158be8f83782f81d7bc800588982867525460db32cffb7474ecd671d3ef5085ff41d7d6bd79cd045a7243ec4204425
@@ -35,9 +35,9 @@ module Tenon
35
35
  image_size = image_size.round(-2)
36
36
  image_size += 100 if (image_size / 100).odd?
37
37
 
38
- default_style = computed_style(piece, "x#{image_size}").to_sym
38
+ default_style = "x#{image_size}"
39
39
 
40
- piece.image.attachment.exists?(default_style) ? default_style : :_medium
40
+ piece.image.attachment.exists?(computed_style(piece, default_style.to_sym)) ? default_style : :_medium
41
41
  end
42
42
 
43
43
  # Iterate through the defined breakpoints and lookup the tenon_content
@@ -5,10 +5,10 @@ module Tenon
5
5
  class << self
6
6
  def add_pieces_to(row)
7
7
  if row.pieces.empty?
8
- row.pieces.build(piece_type: 'Image', position: 0)
9
- row.pieces.build(piece_type: 'Image', position: 1)
10
- row.pieces.build(piece_type: 'Image', position: 2)
11
- row.pieces.build(piece_type: 'Image', position: 3)
8
+ row.pieces.build(piece_type: 'Image', position: 0, size: 'three')
9
+ row.pieces.build(piece_type: 'Image', position: 1, size: 'three')
10
+ row.pieces.build(piece_type: 'Image', position: 2, size: 'three')
11
+ row.pieces.build(piece_type: 'Image', position: 3, size: 'three')
12
12
  end
13
13
  end
14
14
  end
@@ -5,10 +5,10 @@ module Tenon
5
5
  class << self
6
6
  def add_pieces_to(row)
7
7
  if row.pieces.empty?
8
- row.pieces.build(piece_type: 'Text', position: 0)
9
- row.pieces.build(piece_type: 'Text', position: 1)
10
- row.pieces.build(piece_type: 'Text', position: 2)
11
- row.pieces.build(piece_type: 'Text', position: 3)
8
+ row.pieces.build(piece_type: 'Text', position: 0, size: 'three')
9
+ row.pieces.build(piece_type: 'Text', position: 1, size: 'three')
10
+ row.pieces.build(piece_type: 'Text', position: 2, size: 'three')
11
+ row.pieces.build(piece_type: 'Text', position: 3, size: 'three')
12
12
  end
13
13
  end
14
14
  end
@@ -4,7 +4,7 @@ module Tenon
4
4
  class FullWidthEmbeddedContent < TenonContent::RowTypes::Base
5
5
  class << self
6
6
  def add_pieces_to(row)
7
- row.pieces.build(piece_type: 'EmbeddedContent', position: 0) if row.pieces.empty?
7
+ row.pieces.build(piece_type: 'EmbeddedContent', position: 0, size: 'twelve') if row.pieces.empty?
8
8
  end
9
9
  end
10
10
  end
@@ -4,7 +4,7 @@ module Tenon
4
4
  class FullWidthImage < TenonContent::RowTypes::Base
5
5
  class << self
6
6
  def add_pieces_to(row)
7
- row.pieces.build(piece_type: 'Image', position: 0) if row.pieces.empty?
7
+ row.pieces.build(piece_type: 'Image', position: 0, size: 'twelve') if row.pieces.empty?
8
8
  end
9
9
  end
10
10
  end
@@ -4,7 +4,7 @@ module Tenon
4
4
  class FullWidthText < TenonContent::RowTypes::Base
5
5
  class << self
6
6
  def add_pieces_to(row)
7
- row.pieces.build(piece_type: 'Text', position: 0) if row.pieces.empty?
7
+ row.pieces.build(piece_type: 'Text', position: 0, size: 'twelve') if row.pieces.empty?
8
8
  end
9
9
  end
10
10
  end
@@ -6,7 +6,7 @@ module Tenon
6
6
  def add_pieces_to(row)
7
7
  if row.pieces.empty?
8
8
  row.pieces.build(piece_type: 'Image', position: 0, size: 'four')
9
- row.pieces.build(piece_type: 'Text', position: 1)
9
+ row.pieces.build(piece_type: 'Text', position: 1, size: 'eight')
10
10
  end
11
11
  end
12
12
  end
@@ -6,7 +6,7 @@ module Tenon
6
6
  def add_pieces_to(row)
7
7
  if row.pieces.empty?
8
8
  row.pieces.build(piece_type: 'Image', position: 0, size: 'four')
9
- row.pieces.build(piece_type: 'Text', position: 1)
9
+ row.pieces.build(piece_type: 'Text', position: 1, size: 'eight')
10
10
  end
11
11
  end
12
12
  end
@@ -5,12 +5,12 @@ module Tenon
5
5
  class << self
6
6
  def add_pieces_to(row)
7
7
  if row.pieces.empty?
8
- row.pieces.build(piece_type: 'Image', position: 0)
9
- row.pieces.build(piece_type: 'Image', position: 1)
10
- row.pieces.build(piece_type: 'Image', position: 2)
11
- row.pieces.build(piece_type: 'Image', position: 3)
12
- row.pieces.build(piece_type: 'Image', position: 4)
13
- row.pieces.build(piece_type: 'Image', position: 5)
8
+ row.pieces.build(piece_type: 'Image', position: 0, size: 'two')
9
+ row.pieces.build(piece_type: 'Image', position: 1, size: 'two')
10
+ row.pieces.build(piece_type: 'Image', position: 2, size: 'two')
11
+ row.pieces.build(piece_type: 'Image', position: 3, size: 'two')
12
+ row.pieces.build(piece_type: 'Image', position: 4, size: 'two')
13
+ row.pieces.build(piece_type: 'Image', position: 5, size: 'two')
14
14
  end
15
15
  end
16
16
  end
@@ -5,9 +5,9 @@ module Tenon
5
5
  class << self
6
6
  def add_pieces_to(row)
7
7
  if row.pieces.empty?
8
- row.pieces.build(piece_type: 'Image', position: 0)
9
- row.pieces.build(piece_type: 'Image', position: 1)
10
- row.pieces.build(piece_type: 'Image', position: 2)
8
+ row.pieces.build(piece_type: 'Image', position: 0, size: 'four')
9
+ row.pieces.build(piece_type: 'Image', position: 1, size: 'four')
10
+ row.pieces.build(piece_type: 'Image', position: 2, size: 'four')
11
11
  end
12
12
  end
13
13
  end
@@ -5,9 +5,9 @@ module Tenon
5
5
  class << self
6
6
  def add_pieces_to(row)
7
7
  if row.pieces.empty?
8
- row.pieces.build(piece_type: 'Text', position: 0)
9
- row.pieces.build(piece_type: 'Text', position: 1)
10
- row.pieces.build(piece_type: 'Text', position: 2)
8
+ row.pieces.build(piece_type: 'Text', position: 0, size: 'four')
9
+ row.pieces.build(piece_type: 'Text', position: 1, size: 'four')
10
+ row.pieces.build(piece_type: 'Text', position: 2, size: 'four')
11
11
  end
12
12
  end
13
13
  end
@@ -5,8 +5,8 @@ module Tenon
5
5
  class << self
6
6
  def add_pieces_to(row)
7
7
  if row.pieces.empty?
8
- row.pieces.build(piece_type: 'Text', position: 0)
9
- row.pieces.build(piece_type: 'Text', position: 1)
8
+ row.pieces.build(piece_type: 'Text', position: 0, size: 'six')
9
+ row.pieces.build(piece_type: 'Text', position: 1, size: 'six')
10
10
  end
11
11
  end
12
12
  end
data/lib/tenon/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Tenon
2
- VERSION = '1.0.59'
2
+ VERSION = '1.0.60'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tenon
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.59
4
+ version: 1.0.60
5
5
  platform: ruby
6
6
  authors:
7
7
  - factor[e] design initiative
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-07 00:00:00.000000000 Z
11
+ date: 2015-02-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: better_errors
@@ -1517,7 +1517,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
1517
1517
  version: '0'
1518
1518
  requirements: []
1519
1519
  rubyforge_project:
1520
- rubygems_version: 2.2.2
1520
+ rubygems_version: 2.4.5
1521
1521
  signing_key:
1522
1522
  specification_version: 4
1523
1523
  summary: A highly flexible mountable Rails CMS built for rapid application development.