handlebars-helpers 0.0.83 → 0.0.84
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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5bbd839bf09d88142c2f72bb4b2ffb6036d9020419d53aec3ba5a29f2eb5c84f
|
4
|
+
data.tar.gz: 1b5ba67ee8c6e2152412e818ecc69188e240dba633f1c5c84e3746b78d08af9e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1a4a70cec496bc6cd21e57fdd8c67da0ca75c7f7858387153490888a373913447a830e7d40125b746104d16c3fe21abcfecff65eaeaf17de91d6ddf764cc8376
|
7
|
+
data.tar.gz: ecc244845d7fd4ff90547c951ed3ac3236b0776063c921098da99497ea3524edb48537c92d3a6f9a7fe15df18e931d68bb7479c92919ec75119e227698f34d0d
|
data/Rakefile
CHANGED
@@ -1,7 +1,10 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
GEM_NAME = 'handlebars-helpers'
|
4
|
+
|
3
5
|
require 'bundler/gem_tasks'
|
4
6
|
require 'rspec/core/rake_task'
|
7
|
+
require 'handlebars/helpers/version'
|
5
8
|
|
6
9
|
RSpec::Core::RakeTask.new(:spec)
|
7
10
|
|
@@ -14,4 +17,15 @@ Rake::ExtensionTask.new('handlebars_helpers') do |ext|
|
|
14
17
|
ext.lib_dir = 'lib/handlebars_helpers'
|
15
18
|
end
|
16
19
|
|
20
|
+
desc 'Publish the gem to RubyGems.org'
|
21
|
+
task :publish do
|
22
|
+
system 'gem build'
|
23
|
+
system "gem push #{GEM_NAME}-#{Handlebars::Helpers::VERSION}.gem"
|
24
|
+
end
|
25
|
+
|
26
|
+
desc 'Remove old *.gem files'
|
27
|
+
task :clean do
|
28
|
+
system 'rm *.gem'
|
29
|
+
end
|
30
|
+
|
17
31
|
task default: %i[clobber compile spec]
|
data/lib/handlebars/helpers.rb
CHANGED
@@ -15,4 +15,9 @@ module Handlebars
|
|
15
15
|
end
|
16
16
|
end
|
17
17
|
|
18
|
-
|
18
|
+
if ENV['KLUE_DEBUG']&.to_s&.downcase == 'true'
|
19
|
+
namespace = 'Handlebars::Helpers::Version'
|
20
|
+
file_path = $LOADED_FEATURES.find { |f| f.include?('handlebars/helpers/version') }
|
21
|
+
version = Handlebars::Helpers::VERSION.ljust(9)
|
22
|
+
puts "#{namespace.ljust(35)} : #{version.ljust(9)} : #{file_path}"
|
23
|
+
end
|
@@ -40,7 +40,7 @@ module Handlebars
|
|
40
40
|
count = Handlebars::Helpers.configuration.padl_count if count.nil?
|
41
41
|
count = count.to_i if count.is_a?(String)
|
42
42
|
char = Handlebars::Helpers.configuration.padl_char if char.nil?
|
43
|
-
value.rjust(count, char)
|
43
|
+
value.to_s.rjust(count, char)
|
44
44
|
end
|
45
45
|
|
46
46
|
def handlebars_helper
|
@@ -41,7 +41,7 @@ module Handlebars
|
|
41
41
|
count = Handlebars::Helpers.configuration.padr_count if count.nil?
|
42
42
|
count = count.to_i if count.is_a?(String)
|
43
43
|
char = Handlebars::Helpers.configuration.padr_char if char.nil?
|
44
|
-
value.ljust(count, char)
|
44
|
+
value.to_s.ljust(count, char)
|
45
45
|
end
|
46
46
|
|
47
47
|
def handlebars_helper
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: handlebars-helpers
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.84
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Cruwys
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-04-
|
11
|
+
date: 2021-04-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|