gem_toys 0.3.0 → 0.4.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 +2 -0
- data/README.md +1 -2
- data/lib/gem_toys/template.rb +10 -7
- data/lib/gem_toys/version.rb +1 -1
- metadata +10 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6726b77757e83675406164f809d24df97db7c6f62ccc868fb3bf36cc10345c05
|
4
|
+
data.tar.gz: 3fa707cd47180bcb0783cfa4442aff662874cccdd5450287f33551b5de67c66a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ac8fbbde1b554d7cff6d8b05003f2529a140d89269ec43412817d4ddfc0dfa8b104ad85378ebad470207fbe9c8cae1cfc7ff7dc984c484ffad2955156139105d
|
7
|
+
data.tar.gz: 80708ae0701092648c7caa9f489a3477b88047ab1f5d970299e0ef8e376812b114d77656c55438b46ed863b5c376be01faf7bf1ebee90b8f158f3887abd20eda
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -73,8 +73,7 @@ Then, run `toys rspec` to run the tests.
|
|
73
73
|
|
74
74
|
To install this gem onto your local machine, run `toys gem install`.
|
75
75
|
|
76
|
-
To release a new version, run `toys gem release %version%`.
|
77
|
-
See how it works [here](https://github.com/AlexWayfer/gem_toys#release).
|
76
|
+
To release a new version, run `toys gem release %version%`. See how it works [here](#release).
|
78
77
|
|
79
78
|
## Contributing
|
80
79
|
|
data/lib/gem_toys/template.rb
CHANGED
@@ -52,6 +52,8 @@ module GemToys
|
|
52
52
|
to_run do
|
53
53
|
@template = template
|
54
54
|
|
55
|
+
@today = Date.today.to_s
|
56
|
+
|
55
57
|
update_version_file
|
56
58
|
|
57
59
|
## Update CHANGELOG
|
@@ -88,11 +90,12 @@ module GemToys
|
|
88
90
|
def update_version_file
|
89
91
|
puts 'Updating version file...'
|
90
92
|
|
91
|
-
File.write
|
93
|
+
File.write(
|
94
|
+
version_file_path,
|
95
|
+
version_file_content.sub(/(VERSION = )'.+'/, "\\1'#{version}'")
|
96
|
+
)
|
92
97
|
end
|
93
98
|
|
94
|
-
TODAY = Date.today.to_s
|
95
|
-
|
96
99
|
def update_changelog_file
|
97
100
|
puts 'Updating changelog file...'
|
98
101
|
|
@@ -101,7 +104,7 @@ module GemToys
|
|
101
104
|
existing_line = find_version_line_in_changelog_file
|
102
105
|
|
103
106
|
if existing_line
|
104
|
-
return if (existing_date = existing_line.match(/\((.*)\)/)[1]) ==
|
107
|
+
return if (existing_date = existing_line.match(/\((.*)\)/)[1]) == @today
|
105
108
|
|
106
109
|
abort "There is already #{version} version with date #{existing_date}"
|
107
110
|
end
|
@@ -117,7 +120,7 @@ module GemToys
|
|
117
120
|
unreleased_title = @template.unreleased_title
|
118
121
|
@changelog_lines.insert(
|
119
122
|
@changelog_lines.index("#{unreleased_title}\n") + 2,
|
120
|
-
'#' * unreleased_title.scan(/^#+/).first.size + " #{version} (#{
|
123
|
+
'#' * unreleased_title.scan(/^#+/).first.size + " #{version} (#{@today})\n\n"
|
121
124
|
).join
|
122
125
|
end
|
123
126
|
|
@@ -130,8 +133,8 @@ module GemToys
|
|
130
133
|
end
|
131
134
|
|
132
135
|
def wait_for_manual_check
|
133
|
-
|
134
|
-
|
136
|
+
$stdout.puts 'Please, validate files and commits before pushing.'
|
137
|
+
$stdin.gets
|
135
138
|
end
|
136
139
|
end
|
137
140
|
end
|
data/lib/gem_toys/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gem_toys
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alexander Popov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-09-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pry-byebug
|
@@ -44,28 +44,28 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 0.
|
47
|
+
version: 0.11.0
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 0.
|
54
|
+
version: 0.11.0
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: codecov
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: 0.
|
61
|
+
version: 0.2.0
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: 0.
|
68
|
+
version: 0.2.0
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: rspec
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -86,28 +86,28 @@ dependencies:
|
|
86
86
|
requirements:
|
87
87
|
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: 0.
|
89
|
+
version: 0.19.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.19.0
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: rubocop
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
101
|
- - "~>"
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version: 0.
|
103
|
+
version: 0.91.0
|
104
104
|
type: :development
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
108
|
- - "~>"
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version: 0.
|
110
|
+
version: 0.91.0
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
112
|
name: rubocop-performance
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|