rsgem 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/LICENSE.txt +1 -1
- data/lib/rsgem.rb +2 -0
- data/lib/rsgem/context.rb +4 -0
- data/lib/rsgem/gem.rb +5 -0
- data/lib/rsgem/support/rubocop.yml +12 -0
- data/lib/rsgem/tasks/set_license_file.rb +29 -0
- data/lib/rsgem/version.rb +1 -1
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ad493db4ccc39d3453ed0f1dd0d4e4b594809c2c322b8907c187e53a01e33425
|
4
|
+
data.tar.gz: 59855a9d4d9efc2d2d28849bbafa1f172634ae5e9d84ec88d2569e7c0698bdb4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 223a728398f98c295676a9ca723149a01668df08582eb686fb4cebac2255cf12ce0e632406836f6d784db474c515523d85fab30049ef142530400280ca7a1e7e
|
7
|
+
data.tar.gz: 26ffb08fe6eea56092c4eca3976e42cde0bdeac8ac3f14b9e15a9aa737819ca4e5430f6f1826c19a29352dc5eb910ecb8679fa33568b4dfa14ca898e4f375237
|
data/CHANGELOG.md
CHANGED
data/LICENSE.txt
CHANGED
data/lib/rsgem.rb
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require 'date'
|
3
4
|
require 'rsgem/version'
|
4
5
|
require 'rsgem/gem'
|
5
6
|
require 'rsgem/errors/missing_gem_name_error'
|
@@ -16,6 +17,7 @@ require 'rsgem/tasks/clean_gemspec'
|
|
16
17
|
require 'rsgem/tasks/bundle_dependencies'
|
17
18
|
require 'rsgem/tasks/run_rubocop'
|
18
19
|
require 'rsgem/tasks/set_bundled_files'
|
20
|
+
require 'rsgem/tasks/set_license_file'
|
19
21
|
require 'rsgem/tasks/simple_cov_post_install'
|
20
22
|
require 'rsgem/dependencies/base'
|
21
23
|
require 'rsgem/dependencies/rake'
|
data/lib/rsgem/context.rb
CHANGED
data/lib/rsgem/gem.rb
CHANGED
@@ -17,6 +17,7 @@ module RSGem
|
|
17
17
|
add_ci_provider
|
18
18
|
clean_gemspec
|
19
19
|
set_bundled_files
|
20
|
+
set_license_file
|
20
21
|
bundle_dependencies
|
21
22
|
run_rubocop
|
22
23
|
end
|
@@ -74,5 +75,9 @@ module RSGem
|
|
74
75
|
def set_bundled_files
|
75
76
|
Tasks::SetBundledFiles.new(context: context).perform
|
76
77
|
end
|
78
|
+
|
79
|
+
def set_license_file
|
80
|
+
Tasks::SetLicenseFile.new(context: context).perform
|
81
|
+
end
|
77
82
|
end
|
78
83
|
end
|
@@ -4,10 +4,19 @@ Style/Documentation:
|
|
4
4
|
Layout/SpaceBeforeFirstArg:
|
5
5
|
Exclude:
|
6
6
|
|
7
|
+
Layout/SpaceAroundMethodCallOperator:
|
8
|
+
Enabled: true
|
9
|
+
|
7
10
|
Lint/AmbiguousBlockAssociation:
|
8
11
|
Exclude:
|
9
12
|
- spec/**/*
|
10
13
|
|
14
|
+
Lint/RaiseException:
|
15
|
+
Enabled: true
|
16
|
+
|
17
|
+
Lint/StructNewOverride:
|
18
|
+
Enabled: true
|
19
|
+
|
11
20
|
Metrics/AbcSize:
|
12
21
|
# The ABC size is a calculated magnitude, so this number can be an Integer or
|
13
22
|
# a Float.
|
@@ -58,6 +67,9 @@ Metrics/ParameterLists:
|
|
58
67
|
Metrics/PerceivedComplexity:
|
59
68
|
Max: 12
|
60
69
|
|
70
|
+
Style/ExponentialNotation:
|
71
|
+
Enabled: true
|
72
|
+
|
61
73
|
Style/FrozenStringLiteralComment:
|
62
74
|
Enabled: true
|
63
75
|
|
@@ -0,0 +1,29 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module RSGem
|
4
|
+
module Tasks
|
5
|
+
class SetLicenseFile < Base
|
6
|
+
def perform
|
7
|
+
license.gsub!(
|
8
|
+
/.*Copyright.*/,
|
9
|
+
"Copyright (c) #{Date.today.year} Rootstrap"
|
10
|
+
)
|
11
|
+
write
|
12
|
+
|
13
|
+
puts "\tLICENSE file updated"
|
14
|
+
end
|
15
|
+
|
16
|
+
private
|
17
|
+
|
18
|
+
def license
|
19
|
+
@license ||= File.read(context.license_path)
|
20
|
+
end
|
21
|
+
|
22
|
+
def write
|
23
|
+
File.open(context.license_path, 'w') do |file|
|
24
|
+
file.puts license
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
data/lib/rsgem/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rsgem
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Juan Manuel Ramallo
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-06-
|
11
|
+
date: 2020-06-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dry-cli
|
@@ -86,14 +86,14 @@ dependencies:
|
|
86
86
|
requirements:
|
87
87
|
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: 0.
|
89
|
+
version: 0.82.0
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
94
|
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: 0.
|
96
|
+
version: 0.82.0
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: simplecov
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
@@ -154,6 +154,7 @@ files:
|
|
154
154
|
- lib/rsgem/tasks/ignore_gemfile_lock.rb
|
155
155
|
- lib/rsgem/tasks/run_rubocop.rb
|
156
156
|
- lib/rsgem/tasks/set_bundled_files.rb
|
157
|
+
- lib/rsgem/tasks/set_license_file.rb
|
157
158
|
- lib/rsgem/tasks/simple_cov_post_install.rb
|
158
159
|
- lib/rsgem/version.rb
|
159
160
|
homepage: https://github.com/rootstrap/rsgem
|