fuel 0.4.4 → 0.4.5

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: cf1beac23b85c647487bfae44f9728e0cd17b852
4
- data.tar.gz: f6e19882c5b378a855fa9af748b3f4658aa54c87
3
+ metadata.gz: b8e8a89c308a846a23bb2c1ef406b6f927e79660
4
+ data.tar.gz: 84d0908974fb71d54c6eb58ad56813e680d4b096
5
5
  SHA512:
6
- metadata.gz: d2ec4e4298199ec3530d32990b68a260d315beac138cfa9f3ba161caf707e34772b96460072fe772dcf94f906bd2c3b52b531f9e87689040dcee8277816ec0a5
7
- data.tar.gz: c955df2949e1f0e81c719ac2104a3f5bf8e4564342ed9e75cf3e6231c8eb18bbadc89e86588057dfcf56211abe3729748b9fd7392d87bab18a29a053cd523bc8
6
+ metadata.gz: 46e7ffb95aea51f734544c09dc652330a07876cd9091056587da8cc9e1b424dd346bf126bd992516985e0fa00273167bf2b2a4e4e4ca0522b397b2d4a0ea9a74
7
+ data.tar.gz: b6e0aa800d0de281182914fc7274031cbfd2ec4a9306f8a44ff35c88a8262880b1635a70ae02e83c1c704cda95ac57d92dd6eedf994e87cda4a5290fc0587c83
@@ -51,6 +51,11 @@ module Fuel
51
51
  end
52
52
 
53
53
  def show
54
+ @author = Fuel::Author.find(params[:id])
55
+
56
+ respond_to do |format|
57
+ format.json { render json: @author }
58
+ end
54
59
  end
55
60
 
56
61
  private
@@ -80,4 +85,4 @@ module Fuel
80
85
 
81
86
  end
82
87
  end
83
- end
88
+ end
@@ -12,6 +12,11 @@ module Fuel
12
12
  @posts = Fuel::Post.recent_published_posts.page(params[:page])
13
13
  @title = Fuel.configuration.blog_title
14
14
  @description = Fuel.configuration.blog_description
15
+
16
+ respond_to do |format|
17
+ format.html
18
+ format.json { render json: @posts, :methods => [:avatar_url, :featured_image_url] }
19
+ end
15
20
  end
16
21
 
17
22
  def show
@@ -19,6 +24,11 @@ module Fuel
19
24
  @title = truncate_on_space(@post.seo_title || @post.title, 70)
20
25
  @description = @post.seo_description
21
26
  @disqus_name = Fuel.configuration.disqus_name
27
+
28
+ respond_to do |format|
29
+ format.html
30
+ format.json { render json: @post, :methods => [:avatar_url, :featured_image_url] }
31
+ end
22
32
  end
23
33
 
24
34
  def preview
@@ -33,7 +33,7 @@ module Fuel
33
33
  end
34
34
 
35
35
  def s3_credentials
36
- {:bucket => Fuel.configuration.aws_bucket, :access_key_id => Fuel.configuration.aws_access_key, :secret_access_key => Fuel.configuration.aws_secret_access_key}
36
+ { :bucket => Fuel.configuration.aws_bucket, :access_key_id => Fuel.configuration.aws_access_key, :secret_access_key => Fuel.configuration.aws_secret_access_key, :s3_protocol => 'https' }
37
37
  end
38
38
 
39
39
  def next
@@ -86,5 +86,13 @@ module Fuel
86
86
  format == Formats::MARKDOWN
87
87
  end
88
88
 
89
+ def featured_image_url
90
+ featured_image.url(:medium)
91
+ end
92
+
93
+ def avatar_url
94
+ return unless author.present?
95
+ author.avatar.url(:medium)
96
+ end
89
97
  end
90
98
  end
data/lib/fuel/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Fuel
2
- VERSION = "0.4.4"
2
+ VERSION = "0.4.5"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fuel
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.4
4
+ version: 0.4.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Francis
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-12-15 00:00:00.000000000 Z
11
+ date: 2016-03-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails