graph_starter 0.2.1 → 0.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
  SHA1:
3
- metadata.gz: 9e3cb6569a3ccc4e443bc052a109ef9e72a6554a
4
- data.tar.gz: be29217c2e8783a128fea3f39d5b512d20ab47ee
3
+ metadata.gz: 39794eb0d0df1788618e78fefa3b3ec2fa41e80d
4
+ data.tar.gz: 2b8f7dd5e79a3de4cf86929a5203c17377d9ee19
5
5
  SHA512:
6
- metadata.gz: 827296f2a570b1aaee411c9bda8095ea21de1ced12a88c41fa2698bdac5b195eb0dedd210c4558168d28cb277f9a4d1111dc26c3446f8deb9fee77a8b3e544f0
7
- data.tar.gz: b955f96ca5b0876e7d611e7f52e73dabd7754f59b74822f3c43df7d8acba1e1e098c14cc25fac0a308b3cf2628e47308ee2226b1640c6cff6e68d4f6a98ee640
6
+ metadata.gz: 81a7742da6c3cc7586c6754ff7cad43ed49fe14800d0b777984eb3a42c96365f52007f3fc5f0b18080f2491a0a65cba4c7f44898ec70181a919857d5801e4bf7
7
+ data.tar.gz: ed50b31f0eb1b7a1a0b93f1458670c670332b52409027ac85499dd676462085f0800ffccf6bfbdfe2238d9566313afc5d13b219d46fa7ad27a06100355bf107b
@@ -37,8 +37,8 @@ module GraphStarter
37
37
  GraphStarter::Asset::IMAGE_MODELS.include?(self)
38
38
  end
39
39
 
40
- def first_image_source
41
- images.first && images.first.source
40
+ def first_image_source_url
41
+ images.first && images.first.source_url
42
42
  end
43
43
 
44
44
  def self.category_association
@@ -158,4 +158,4 @@ module GraphStarter
158
158
  'bookmark'
159
159
  end
160
160
  end
161
- end
161
+ end
@@ -12,5 +12,9 @@ module GraphStarter
12
12
 
13
13
  has_neo4jrb_attached_file :source
14
14
  validates_attachment_content_type :source, content_type: ['image/jpg', 'image/jpeg', 'image/png', 'image/gif']
15
+
16
+ def source_url
17
+ source.present? ? source.url : original_url
18
+ end
15
19
  end
16
- end
20
+ end
@@ -16,8 +16,8 @@
16
16
  .header = link_to asset.title, asset_path(asset)
17
17
  - if asset.class.has_images?
18
18
  .image
19
- - if asset.first_image_source && asset.first_image_source.url.present?
20
- = image_tag asset.first_image_source.url
19
+ - if asset.first_image_source_url.present?
20
+ = image_tag asset.first_image_source_url
21
21
  - else
22
22
  img src="missing"
23
23
  - categories = Array(asset.categories).sort_by(&:name)
@@ -57,13 +57,13 @@
57
57
  .ui.link.cards
58
58
  - @asset.images.each do |image|
59
59
  .card
60
- .image = image_tag image.source.url, class: 'ui image tiny rounded'
60
+ .image = image_tag image.source_url, class: 'ui image tiny rounded'
61
61
  .content
62
62
  .header = image.title if image.title.present?
63
63
  - if image.description.present?
64
64
  .meta = image.description
65
65
  .extra.content
66
- a.ui.large.green.button href="#{image.source.url}" Full Size
66
+ a.ui.large.green.button href="#{image.source_url}" Full Size
67
67
 
68
68
 
69
69
  div class="#{side_column_width} wide column"
@@ -12,6 +12,6 @@ meta name="twitter:domain" content="http://neo4j.org"
12
12
  meta name="twitter:description" content="#{@asset.summary}"
13
13
 
14
14
  - if @asset.class.has_images?
15
- meta name="twitter:card" content="#{(@asset.first_image_source ? 'summary_large_image' : 'summary')}"
15
+ meta name="twitter:card" content="#{(@asset.first_image_source_url.present? ? 'summary_large_image' : 'summary')}"
16
16
 
17
- meta name="twitter:image:src" content="#{@asset.first_image_source ? @asset.first_image_source.url : '/assets/img/neo4j/neo4j-logo.png'}"
17
+ meta name="twitter:image:src" content="#{@asset.first_image_source_url ? @asset.first_image_source_url : '/assets/img/neo4j/neo4j-logo.png'}"
@@ -1,3 +1,3 @@
1
1
  module GraphStarter
2
- VERSION = "0.2.1"
2
+ VERSION = "0.3.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: graph_starter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Underwood
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-10-20 00:00:00.000000000 Z
11
+ date: 2015-10-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails