copyright_mafa 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/copyright_mafa/version.rb +1 -1
- data/lib/copyright_mafa.rb +7 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0f6b7f99c010a31e97e87b051d5f9a3dc5903138
|
4
|
+
data.tar.gz: caf182bb376bbab385901c41321e7306be2cabe4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 32b010bd6856c713eaa50316573090a1deefd518465a3b467c8fe411e924358e79031161679116678f8c5bcb459c15b5305a457728f4af056b9d7d91dd5bd417
|
7
|
+
data.tar.gz: 24919d8909f6dcefac71527f3ef9f9083ff085b7a56f9d2f1a0aa164593dc5d9abe5b52a4ec251bd279b8f9ac724899e60956a6c319eb78a177fb13d77b5a5f6
|
data/lib/copyright_mafa.rb
CHANGED
@@ -1,15 +1,20 @@
|
|
1
1
|
require "copyright_mafa/version"
|
2
2
|
|
3
3
|
module CopyrightMafa
|
4
|
-
def copyright(start_year)
|
4
|
+
def copyright(start_year, company_name = nil)
|
5
5
|
start_year = start_year.to_i
|
6
6
|
current_year = Time.new.year
|
7
|
-
if current_year > start_year && start_year > 2000
|
7
|
+
years = if current_year > start_year && start_year > 2000
|
8
8
|
"#{start_year} - #{current_year}"
|
9
9
|
elsif start_year > 2000
|
10
10
|
start_year.to_s
|
11
11
|
else
|
12
12
|
current_year.to_s
|
13
13
|
end
|
14
|
+
if company_name
|
15
|
+
"© #{company_name} #{years}".html_safe
|
16
|
+
else
|
17
|
+
years
|
18
|
+
end
|
14
19
|
end
|
15
20
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: copyright_mafa
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pavel Kalashnikov
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-10-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -88,7 +88,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
88
88
|
version: '0'
|
89
89
|
requirements: []
|
90
90
|
rubyforge_project:
|
91
|
-
rubygems_version: 2.6.
|
91
|
+
rubygems_version: 2.6.11
|
92
92
|
signing_key:
|
93
93
|
specification_version: 4
|
94
94
|
summary: Simple copyright helper
|