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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b4450ca601d5feb26c8d270e37c60e5add24f213
4
- data.tar.gz: f7816b5d0bf5d653e0c10f8c3772de2443e9c813
3
+ metadata.gz: 0f6b7f99c010a31e97e87b051d5f9a3dc5903138
4
+ data.tar.gz: caf182bb376bbab385901c41321e7306be2cabe4
5
5
  SHA512:
6
- metadata.gz: bea1646596aa170f76d63b497b1c10d170876e56f224e302065fcd24a6ff1b62b16289e7d577daec10fe1cae2e6adcd31d3ac0d75b49b8d1a82eaceb8ccb2c72
7
- data.tar.gz: 340cc22d237c19001adca0f313c057d468126788bb4fecc0599af0fccc871023e0f90f5362f466903b7fff9cf7151e9eed702f7d427b5dd8de9dbf4797128be3
6
+ metadata.gz: 32b010bd6856c713eaa50316573090a1deefd518465a3b467c8fe411e924358e79031161679116678f8c5bcb459c15b5305a457728f4af056b9d7d91dd5bd417
7
+ data.tar.gz: 24919d8909f6dcefac71527f3ef9f9083ff085b7a56f9d2f1a0aa164593dc5d9abe5b52a4ec251bd279b8f9ac724899e60956a6c319eb78a177fb13d77b5a5f6
@@ -1,3 +1,3 @@
1
1
  module CopyrightMafa
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
@@ -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.0
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-07-30 00:00:00.000000000 Z
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.8
91
+ rubygems_version: 2.6.11
92
92
  signing_key:
93
93
  specification_version: 4
94
94
  summary: Simple copyright helper