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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 118dc51b1e8cef7481205fc789643bbb5e90e033eb84a20f18b20df73bca1efc
4
- data.tar.gz: bc24898da5bd9b1047a67d24349e72aa6e7432aa15f040c2981e42790376991b
3
+ metadata.gz: ad493db4ccc39d3453ed0f1dd0d4e4b594809c2c322b8907c187e53a01e33425
4
+ data.tar.gz: 59855a9d4d9efc2d2d28849bbafa1f172634ae5e9d84ec88d2569e7c0698bdb4
5
5
  SHA512:
6
- metadata.gz: d280d17fb9f125345d21e4ebb1d1fbfc445ca69b063fff66c2c80a00c0c89767fe3b5afeec2f025b92a0136e7ab3df7642133d0abf6db692f8b6148a2824bbee
7
- data.tar.gz: a90e71674a3613857b19867b79787ffdc41783103a517a776be9ec4a35ac159e19bbc8f2a81d50acd2ba91f325a4b69032ee9b8459e80c442f532765c46e8d1b
6
+ metadata.gz: 223a728398f98c295676a9ca723149a01668df08582eb686fb4cebac2255cf12ce0e632406836f6d784db474c515523d85fab30049ef142530400280ca7a1e7e
7
+ data.tar.gz: 26ffb08fe6eea56092c4eca3976e42cde0bdeac8ac3f14b9e15a9aa737819ca4e5430f6f1826c19a29352dc5eb910ecb8679fa33568b4dfa14ca898e4f375237
@@ -1,5 +1,11 @@
1
1
  # master
2
2
 
3
+ # 0.3.0
4
+
5
+ * Add task to replace system user name in LICENSE.txt with Rootstrap name
6
+
7
+ *Juan Francisco Ferrari*
8
+
3
9
  # 0.2.0
4
10
 
5
11
  * Add default configuration for simplecov in spec_helper.rb
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2020 Juan Manuel Ramallo
3
+ Copyright (c) 2020 Rootstrap
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -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'
@@ -36,6 +36,10 @@ module RSGem
36
36
  "#{folder_path}/#{gem_name}.gemspec"
37
37
  end
38
38
 
39
+ def license_path
40
+ "#{folder_path}/LICENSE.txt"
41
+ end
42
+
39
43
  def folder_path
40
44
  `pwd`.sub("\n", '/') + gem_name
41
45
  end
@@ -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
@@ -2,7 +2,7 @@
2
2
 
3
3
  module RSGem
4
4
  MAJOR = 0
5
- MINOR = 2
5
+ MINOR = 3
6
6
  PATCH = 0
7
7
  VERSION = [MAJOR, MINOR, PATCH].join('.')
8
8
  end
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.2.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-15 00:00:00.000000000 Z
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.80.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.80.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