gem-release 2.0.0.dev.1 → 2.0.0.dev.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/TODO.txt +18 -173
- data/lib/gem/release/cmds/bump.rb +12 -10
- data/lib/gem/release/cmds/release.rb +10 -4
- data/lib/gem/release/cmds/runner.rb +1 -1
- data/lib/gem/release/cmds/tag.rb +2 -0
- data/lib/gem/release/context/system.rb +4 -0
- data/lib/gem/release/helper.rb +2 -2
- data/lib/gem/release/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2eae2d6d553dc7f227a2d77d312478f9b350fc70
|
4
|
+
data.tar.gz: a9eb400332f183359a9607452f1988870a971765
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7f044bdc3f1e96aeb2e106efffbeb8f30e304f5d7d87ee26255c9e2d3a18c263ce219e2c6046c8bb3e155ecd708f50f56b209cd844e62ec3bed84a43e5c8d14e
|
7
|
+
data.tar.gz: a9411129a69515026f8a9fc51b0a64b216f1224f729ce61ff9345ea4c9075d84f0044cfa1a8cf1fd488c629138ea750659337ed9920496ce860710dc92fb6499
|
data/TODO.txt
CHANGED
@@ -1,23 +1,25 @@
|
|
1
1
|
# Todo
|
2
2
|
|
3
|
-
|
4
|
-
|
3
|
+
- Add defaults to options help output [5]
|
4
|
+
- Add specs for all error conditions [6]
|
5
|
+
- Add a changelog [7]
|
5
6
|
|
6
|
-
|
7
|
+
- Make sure we don't double tag the same repo when several args are given [9]
|
7
8
|
|
8
|
-
|
9
|
+
x Release and tag should fail if there are uncommitted changes done:2017-05-01 [8]
|
9
10
|
https://github.com/svenfuchs/gem-release/issues/34
|
10
11
|
|
11
|
-
|
12
|
-
|
13
|
-
# Fix
|
12
|
+
# Double check
|
14
13
|
|
15
|
-
|
14
|
+
x Misleading success message done:2017-05-01 [4]
|
16
15
|
https://github.com/svenfuchs/gem-release/issues/60
|
16
|
+
Pushing foo-0.0.5.gem
|
17
|
+
Pushing gem to http://localhost:9292...
|
18
|
+
...
|
19
|
+
ERROR: While executing gem ... (Errno::ECONNREFUSED)
|
20
|
+
Failed to open TCP connection to localhost:9292 (Connection refused - connect(2) for "localhost" port 9292)
|
17
21
|
|
18
|
-
|
19
|
-
|
20
|
-
- Issues with in-repo gems [1]
|
22
|
+
x Issues with in-repo gems done:2017-05-01 [1]
|
21
23
|
https://github.com/svenfuchs/gem-release/issues/58
|
22
24
|
|
23
25
|
x bump fails when there is a space in the path to project done:2017-05-01 [2]
|
@@ -29,166 +31,9 @@ x bump fails when there is a space in the path to project done:2017-05-01 [2]
|
|
29
31
|
gem bootstrap foo
|
30
32
|
gem bump --no-push
|
31
33
|
|
32
|
-
|
34
|
+
x gem bump --tag --release pushes the wrong version done:2017-05-01 [3]
|
33
35
|
https://github.com/svenfuchs/gem-release/issues/36
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
cd tmp
|
40
|
-
gem bootstrap foo
|
41
|
-
|
42
|
-
|
43
|
-
should bootstrap a gem foo
|
44
|
-
|
45
|
-
cd foo
|
46
|
-
gem bootstrap
|
47
|
-
|
48
|
-
should fail, as there's no foo.gemspec
|
49
|
-
|
50
|
-
cd tmp
|
51
|
-
gem bump foo
|
52
|
-
|
53
|
-
should bump the first gemspec's gem, no matter the dir name
|
54
|
-
|
55
|
-
cd foo
|
56
|
-
gem bump
|
57
|
-
|
58
|
-
# Scenario: Nested gem with conventional directory name
|
59
|
-
|
60
|
-
### Setup
|
61
|
-
|
62
|
-
```
|
63
|
-
export GEM_RELEASE_PUSH=false
|
64
|
-
cd /tmp
|
65
|
-
rm -rf sinja
|
66
|
-
gem bootstrap sinja
|
67
|
-
cd sinja
|
68
|
-
mkdir extensions
|
69
|
-
cd extensions
|
70
|
-
gem bootstrap sinja-sequel
|
71
|
-
cd /tmp/sinja
|
72
|
-
tree
|
73
|
-
```
|
74
|
-
|
75
|
-
### Directory structure
|
76
|
-
|
77
|
-
```
|
78
|
-
.
|
79
|
-
├── Gemfile
|
80
|
-
├── LICENSE.md
|
81
|
-
├── extensions
|
82
|
-
│ └── sinja-sequel
|
83
|
-
│ ├── Gemfile
|
84
|
-
│ ├── LICENSE.md
|
85
|
-
│ ├── lib
|
86
|
-
│ │ └── sinja
|
87
|
-
│ │ ├── sequel
|
88
|
-
│ │ │ └── version.rb
|
89
|
-
│ │ └── sequel.rb
|
90
|
-
│ └── sinja-sequel.gemspec
|
91
|
-
├── lib
|
92
|
-
│ ├── sinja
|
93
|
-
│ │ └── version.rb
|
94
|
-
│ └── sinja.rb
|
95
|
-
└── sinja.gemspec
|
96
|
-
```
|
97
|
-
|
98
|
-
### Behaviour
|
99
|
-
|
100
|
-
```
|
101
|
-
# this bumps both sinja and sinja-sequel
|
102
|
-
cd /tmp/sinja
|
103
|
-
gem bump --recurse
|
104
|
-
|
105
|
-
# this bumps sinja
|
106
|
-
cd /tmp/sinja
|
107
|
-
gem bump
|
108
|
-
|
109
|
-
# this also bumps sinja
|
110
|
-
cd /tmp/sinja
|
111
|
-
gem bump sinja
|
112
|
-
|
113
|
-
# this bumps sinja-sequel only
|
114
|
-
cd /tmp/sinja
|
115
|
-
gem bump sinja-sequel
|
116
|
-
|
117
|
-
# this also bumps sinja-sequel only
|
118
|
-
cd /tmp/sinja/extensions/sinja-sequel
|
119
|
-
gem bump
|
120
|
-
|
121
|
-
# this also bumps sinja-sequel only
|
122
|
-
cd /tmp/sinja/extensions/sinja-sequel
|
123
|
-
gem bump sinja-sequel
|
124
|
-
```
|
125
|
-
|
126
|
-
## Nested gem with irregular directory name
|
127
|
-
|
128
|
-
### Setup
|
129
|
-
|
130
|
-
```
|
131
|
-
export GEM_RELEASE_PUSH=false
|
132
|
-
cd /tmp
|
133
|
-
rm -rf sinja
|
134
|
-
gem bootstrap sinja
|
135
|
-
cd sinja
|
136
|
-
mkdir -p extensions
|
137
|
-
cd extensions
|
138
|
-
gem bootstrap sinja-sequel
|
139
|
-
mv sinja-sequel sequel
|
140
|
-
cd /tmp/sinja
|
141
|
-
tree
|
142
|
-
```
|
143
|
-
|
144
|
-
### Directory structure
|
145
|
-
|
146
|
-
```
|
147
|
-
.
|
148
|
-
├── Gemfile
|
149
|
-
├── LICENSE.md
|
150
|
-
├── extensions
|
151
|
-
│ └── sequel
|
152
|
-
│ ├── Gemfile
|
153
|
-
│ ├── LICENSE.md
|
154
|
-
│ ├── lib
|
155
|
-
│ │ └── sinja
|
156
|
-
│ │ ├── sequel
|
157
|
-
│ │ │ └── version.rb
|
158
|
-
│ │ └── sequel.rb
|
159
|
-
│ └── sinja-sequel.gemspec
|
160
|
-
├── lib
|
161
|
-
│ ├── sinja
|
162
|
-
│ │ └── version.rb
|
163
|
-
│ └── sinja.rb
|
164
|
-
└── sinja.gemspec
|
165
|
-
```
|
166
|
-
|
167
|
-
### Behaviour
|
168
|
-
|
169
|
-
```
|
170
|
-
# this bumps both sinja and sinja-sequel
|
171
|
-
cd /tmp/sinja
|
172
|
-
gem bump --recurse
|
173
|
-
|
174
|
-
# this bumps sinja
|
175
|
-
cd /tmp/sinja
|
176
|
-
gem bump
|
177
|
-
|
178
|
-
# this also bumps sinja
|
179
|
-
cd /tmp/sinja
|
180
|
-
gem bump sinja
|
181
|
-
|
182
|
-
# this bumps sinja-sequel only
|
183
|
-
cd /tmp/sinja
|
184
|
-
gem bump sinja-sequel
|
185
|
-
|
186
|
-
# this also bumps sinja-sequel only
|
187
|
-
cd /tmp/sinja/extensions/sinja-sequel
|
188
|
-
gem bump
|
189
|
-
|
190
|
-
# this also bumps sinja-sequel only
|
191
|
-
cd /tmp/sinja/extensions/sinja-sequel
|
192
|
-
gem bump sinja-sequel
|
193
|
-
```
|
194
|
-
|
36
|
+
$ gem bump --tag --release
|
37
|
+
Bumping foo from version 0.0.3 to 0.0.4
|
38
|
+
...
|
39
|
+
Pushing foo-0.0.4.gem
|
@@ -53,7 +53,7 @@ module Gem
|
|
53
53
|
|
54
54
|
DEFAULTS = {
|
55
55
|
commit: true,
|
56
|
-
push:
|
56
|
+
push: false,
|
57
57
|
remote: 'origin'
|
58
58
|
}
|
59
59
|
|
@@ -86,13 +86,14 @@ module Gem
|
|
86
86
|
end
|
87
87
|
|
88
88
|
MSGS = {
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
89
|
+
bump: 'Bumping %s from version %s to %s',
|
90
|
+
version: 'Changing version in %s from %s to %s',
|
91
|
+
git_add: 'Staging %s',
|
92
|
+
git_commit: 'Creating commit',
|
93
|
+
git_push: 'Pushing to the %s git repository',
|
94
|
+
git_dirty: 'Uncommitted changes found. Please commit or stash.',
|
95
|
+
not_found: 'Ignoring %s. Version file %s not found.',
|
96
|
+
no_git_remote: 'Cannot push to missing git remote %s.'
|
96
97
|
}
|
97
98
|
|
98
99
|
CMDS = {
|
@@ -116,8 +117,9 @@ module Gem
|
|
116
117
|
private
|
117
118
|
|
118
119
|
def validate
|
119
|
-
abort :
|
120
|
-
abort :
|
120
|
+
abort :git_dirty unless git_clean?
|
121
|
+
abort :not_found, gem.name, version.path || '?' unless version.exists?
|
122
|
+
abort :no_git_remote, remote if push? && !git_remotes.include?(remote.to_s)
|
121
123
|
end
|
122
124
|
|
123
125
|
def bump
|
@@ -46,10 +46,11 @@ module Gem
|
|
46
46
|
end
|
47
47
|
|
48
48
|
MSGS = {
|
49
|
-
release:
|
50
|
-
build:
|
51
|
-
push:
|
52
|
-
cleanup:
|
49
|
+
release: 'Releasing %s with version %s',
|
50
|
+
build: 'Building %s',
|
51
|
+
push: 'Pushing %s',
|
52
|
+
cleanup: 'Deleting left over gem file %s',
|
53
|
+
git_dirty: 'Uncommitted changes found. Please commit or stash.',
|
53
54
|
}
|
54
55
|
|
55
56
|
CMDS = {
|
@@ -58,6 +59,7 @@ module Gem
|
|
58
59
|
|
59
60
|
def run
|
60
61
|
in_gem_dirs do
|
62
|
+
validate
|
61
63
|
release
|
62
64
|
end
|
63
65
|
tag if opts[:tag]
|
@@ -65,6 +67,10 @@ module Gem
|
|
65
67
|
|
66
68
|
private
|
67
69
|
|
70
|
+
def validate
|
71
|
+
abort :git_dirty unless git_clean?
|
72
|
+
end
|
73
|
+
|
68
74
|
def release
|
69
75
|
announce :release, gem.name, gem.version
|
70
76
|
build
|
data/lib/gem/release/cmds/tag.rb
CHANGED
@@ -46,6 +46,7 @@ module Gem
|
|
46
46
|
git_tag: 'Creating git tag %s',
|
47
47
|
git_push: 'Pushing tags to the %s git repository',
|
48
48
|
no_remote: 'Cannot push to missing git remote %s',
|
49
|
+
git_dirty: 'Uncommitted changes found. Please commit or stash.',
|
49
50
|
}
|
50
51
|
|
51
52
|
CMDS = {
|
@@ -65,6 +66,7 @@ module Gem
|
|
65
66
|
private
|
66
67
|
|
67
68
|
def validate
|
69
|
+
abort :git_dirty unless git_clean?
|
68
70
|
abort :no_remote, remote if push? && !git_remotes.include?(remote)
|
69
71
|
end
|
70
72
|
|
data/lib/gem/release/helper.rb
CHANGED
@@ -5,8 +5,8 @@ module Gem
|
|
5
5
|
module Helper
|
6
6
|
extend Forwardable
|
7
7
|
def_delegators :context, :gem, :system
|
8
|
-
def_delegators :system, :git_remotes, :git_user_name,
|
9
|
-
:github_user_name
|
8
|
+
def_delegators :system, :git_clean?, :git_remotes, :git_user_name,
|
9
|
+
:git_user_email, :github_user_name
|
10
10
|
|
11
11
|
def run(cmd)
|
12
12
|
return true if send(cmd)
|
data/lib/gem/release/version.rb
CHANGED