qb 0.3.19 → 0.3.20

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: 826c3553e9e69c10b5f413f9d72a3dd24467886a
4
- data.tar.gz: 147cb053b57b0190f6874de992bc8eec0f5b1dec
3
+ metadata.gz: 85f1f3cd75304ea28284a8a7e9cea53dcae4c7f2
4
+ data.tar.gz: ccd49744cc2b48260201e38bed1776998ab3b13d
5
5
  SHA512:
6
- metadata.gz: 2f66deb75554195bb7949d44c9bbe08ec9103cb40cdaf383d9a5aefe99e449a80d58fee7b6ca8471ba53f934b1da16db4d30d7576a195b14000873618a381c27
7
- data.tar.gz: 11d2976e88461d1c61cfe6036078e3e077bba0825118d3726c92197dcec58eeb0dad0ce4e8887c801812fb57b891f1dbf954cf2aa6caa1c1277a701063a78d5d
6
+ metadata.gz: 6a8f68092bb909d9a743c22c76e1a7c3a183105b45da634a19e6d428a6282363299d7d0033ea866e45b870a72f3e47098e1806290b8735d385ccd391a3f382ac
7
+ data.tar.gz: 2251cdc6d535d543826906478caa30b277e243695b980f40d18d5c8def5bf9630fe904c3bc046f605224b9e82027981fcc05a86892228941bd06d6901d8eca33
@@ -4,7 +4,7 @@ module QB
4
4
 
5
5
  GEM_NAME = 'qb'
6
6
 
7
- VERSION = "0.3.19"
7
+ VERSION = "0.3.20"
8
8
 
9
9
  MIN_ANSIBLE_VERSION = Gem::Version.new '2.1.2'
10
10
 
@@ -3,3 +3,5 @@
3
3
 
4
4
  gem_root: >-
5
5
  {{ qb_dir }}
6
+
7
+ gem_version_file: null
@@ -25,3 +25,10 @@ options:
25
25
  # required: false
26
26
  # type: boolean # boolean (default) | string
27
27
  # short: e
28
+
29
+ - name: version_file
30
+ var_name: gem_version_file
31
+ description: >-
32
+ Specify where the version file is for cases where it can't be inferred
33
+ required: false
34
+ type: path
@@ -1,6 +1,18 @@
1
1
  ---
2
2
  # tasks file for qb/ruby/gem/release
3
3
 
4
+ # NOTE We do this because the `release` Rake task `bundler/gem_tasks`
5
+ # provides **will** fail if there are any uncommitted files...
6
+ # which is annoying as all hell when the dirt is just a dev submod that
7
+ # is not used in the release version, but there does not seem to be
8
+ # any options to ignore files or paths:
9
+ #
10
+ # https://github.com/bundler/bundler/blob/c4fc79a2bfed38335a3371300bea49286a371d83/lib/bundler/gem_helper.rb#L151
11
+ #
12
+ # So, we do the check first so we don't both with anything else if it's
13
+ # going to fail (and it's the most common thing that gets in the way,
14
+ # so it's nice to catch it early).
15
+ #
4
16
  - name: >-
5
17
  Check that the git repo at {{ gem_root }} is clean.
6
18
  include_role:
@@ -49,6 +61,8 @@
49
61
  namespace: gem
50
62
  bind:
51
63
  gem_root: "{{ gem_root }}"
64
+ version_file: "{{ gem_version_file }}"
65
+ cwd: "{{ qb_cwd }}"
52
66
  src: |
53
67
  spec_pattern = "#{ gem_root }/*.gemspec"
54
68
  spec_path = Dir.glob(spec_pattern)[0]
@@ -86,12 +100,25 @@
86
100
 
87
101
  next_version = segments.join('.')
88
102
 
103
+ version_path = if version_file.nil?
104
+ # quick hack to deal with `a-b => a/b` gem names
105
+ name_path = name.gsub '-', '/'
106
+
107
+ File.join gem_root, 'lib', name_path, 'version.rb'
108
+ else
109
+ File.expand_path version_file, cwd
110
+ end
111
+
112
+ unless File.file?( version_path )
113
+ raise "Version file not found at #{ version_path }"
114
+ end
115
+
89
116
  {
90
117
  'name' => name,
91
118
  'current_version' => version.version,
92
119
  'release_version' => version.release,
93
120
  'next_version' => next_version,
94
- 'version_path' => "#{ gem_root }/lib/#{ name }/version.rb",
121
+ 'version_path' => version_path,
95
122
  'spec_path' => spec_path,
96
123
  }
97
124
 
@@ -107,7 +134,7 @@
107
134
  # - spec_path: >-
108
135
  # {{ gem_spec_path }}
109
136
  # - version_path: >-
110
- # {{ gem_version_path }}
137
+ # {{ gem_version_path }
111
138
 
112
139
 
113
140
  - when: gem_current_version != gem_release_version
@@ -126,14 +153,14 @@
126
153
  VERSION = "{{ gem_release_version }}"
127
154
 
128
155
 
129
- - name: >-
156
+ - when: gem_current_version != gem_release_version
157
+ name: >-
130
158
  Add version file `{{ gem_version_path }}` to Git.
131
159
  command: >-
132
160
  git add {{ gem_version_path }}
133
161
  args:
134
162
  chdir: >-
135
163
  {{ gem_root }}
136
- when: gem_current_version != gem_release_version
137
164
 
138
165
 
139
166
  - name: >-
@@ -33,10 +33,10 @@
33
33
  stream:
34
34
  chdir: >-
35
35
  {{ gem_root }}
36
- stream:
37
- log: true
38
- cmd: bundle exec ruby -e <%= script %>
39
- kwds:
40
- script: |
41
- Bundler::GemHelper.install_tasks
42
- Rake::Task['release'].execute
36
+ log: true
37
+ cmd: bundle exec ruby
38
+ input: |
39
+ require 'rake'
40
+ require 'bundler/gem_tasks'
41
+
42
+ Rake::Task['release'].invoke
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: qb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.19
4
+ version: 0.3.20
5
5
  platform: ruby
6
6
  authors:
7
7
  - nrser
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-02-03 00:00:00.000000000 Z
11
+ date: 2018-02-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler