homesteading_helpers 0.0.15 → 0.0.16
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 83246b1e03ca948fffa75e040a506a46dc1a3847
|
4
|
+
data.tar.gz: 439fa72a982aba8cd336451e8e47d731cce2aa6b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7ca870b593e614315d67fe26859ec87209d8d37c059636d760ad97c5fc1148f12b35d81fa7db9b76eb5f6cbf1f092d50f09056e174e18575700f6c1d6945d82e
|
7
|
+
data.tar.gz: aee7a2d2d991d88cee6e2d91a12715267c30a8e39087213c3c1f23316faf5732526cb1dc05c1b3e1e9b412b68b7061c79555a85bfd3bc7b4d2332917b57a606c
|
@@ -103,8 +103,7 @@ module HomesteadingHelpers
|
|
103
103
|
end
|
104
104
|
|
105
105
|
def logged_in?
|
106
|
-
|
107
|
-
false
|
106
|
+
Rails.env.development?
|
108
107
|
end
|
109
108
|
|
110
109
|
def autofocus_value
|
@@ -209,7 +208,7 @@ module HomesteadingHelpers
|
|
209
208
|
site_url + "/tags/" + tag.gsub(/ /, "+")
|
210
209
|
end
|
211
210
|
|
212
|
-
def
|
211
|
+
def license_html
|
213
212
|
output = []
|
214
213
|
|
215
214
|
# license
|
@@ -243,5 +242,38 @@ module HomesteadingHelpers
|
|
243
242
|
output.join(" ").html_safe
|
244
243
|
end
|
245
244
|
|
245
|
+
def license_text
|
246
|
+
output = []
|
247
|
+
|
248
|
+
# license
|
249
|
+
license = ::License.find(setting(:license))
|
250
|
+
|
251
|
+
if license.name == "All Rights Reserved"
|
252
|
+
# Default
|
253
|
+
output << "#{license.name} #{license.short_code}"
|
254
|
+
else
|
255
|
+
# Creative Commons and Public Domain (CC0)
|
256
|
+
output << "#{license.name} (#{license.short_code})"
|
257
|
+
output << license.url
|
258
|
+
end
|
259
|
+
|
260
|
+
# range of years
|
261
|
+
years_range = Time.now.year
|
262
|
+
|
263
|
+
first_post = Post.first
|
264
|
+
first_post_year = first_post.nil? ? years_range : first_post.published_at.year
|
265
|
+
|
266
|
+
if first_post_year == years_range
|
267
|
+
output << years_range
|
268
|
+
else
|
269
|
+
output << "#{first_post_year}–#{years_range}"
|
270
|
+
end
|
271
|
+
|
272
|
+
# author's name
|
273
|
+
output << setting(:author_name)
|
274
|
+
|
275
|
+
output.join("\n")
|
276
|
+
end
|
277
|
+
|
246
278
|
end
|
247
279
|
end
|
@@ -20,7 +20,7 @@ Rails.application.configure do
|
|
20
20
|
# config.action_dispatch.rack_cache = true
|
21
21
|
|
22
22
|
# Disable Rails's static asset server (Apache or nginx will already do this).
|
23
|
-
config.
|
23
|
+
config.serve_static_files = false
|
24
24
|
|
25
25
|
# Compress JavaScripts and CSS.
|
26
26
|
config.assets.js_compressor = :uglifier
|
@@ -13,7 +13,7 @@ Rails.application.configure do
|
|
13
13
|
config.eager_load = false
|
14
14
|
|
15
15
|
# Configure static asset server for tests with Cache-Control for performance.
|
16
|
-
config.
|
16
|
+
config.serve_static_files = true
|
17
17
|
config.static_cache_control = 'public, max-age=3600'
|
18
18
|
|
19
19
|
# Show full error reports and disable caching.
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: homesteading_helpers
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.16
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shane Becker
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2015-03-15 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -114,7 +114,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
114
114
|
version: '0'
|
115
115
|
requirements: []
|
116
116
|
rubyforge_project:
|
117
|
-
rubygems_version: 2.
|
117
|
+
rubygems_version: 2.4.6
|
118
118
|
signing_key:
|
119
119
|
specification_version: 4
|
120
120
|
summary: A collection of Rails controller/view helpers shared across multiple Homesteading
|