checklister 1.0.0 → 1.0.1

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: a8d6b606fff092b1cab881102d621ea1a820034f
4
- data.tar.gz: 7f657346d699f5ab56cbaaefae9b6e663c908546
3
+ metadata.gz: 9eb47f6a87c7f66d9be921c83dc8529375e055ee
4
+ data.tar.gz: 805ba3f312d823ed0c3920512b9ef7cb5057b75d
5
5
  SHA512:
6
- metadata.gz: 84a7331feddecafb412c3dc379a67abed9740257bcd62b5a2adf9bb2dc8d97e8ee68402894e0f2581052e4c0571ecdaf4ff09ecad32475457df6f72f931353eb
7
- data.tar.gz: 71c3e3a913357c7f4832214e39d54963a9b7e26e7b7a65cf545d1199b55b4c9eab4adb477857212bdf0328d81312998222676bd929cd41ee893a01f5cc6016ad
6
+ metadata.gz: 868c91ec0980ca21975dfe3c10f641af614a3eaab4a5ff80a4bae9543e54d8b176d464106c62dd2111a9aa3fcbcc098abe9485229fd0caab920c3a31864e9230
7
+ data.tar.gz: cde6105e16111617a4ff86cf5abaa45ec3c8757a5ea61e6cb09645d44f2caff8dc1dc59a08086169e6bffebe975c5cbf2da83a3dfed70e4ad400a51a75c38293
data/.gitignore CHANGED
@@ -10,3 +10,4 @@
10
10
  /tmp/
11
11
  tags
12
12
  gems.tags
13
+ .DS_Store
@@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file.
3
3
 
4
4
  NOTE: the project follows [Semantic Versioning](http://semver.org/).
5
5
 
6
+ ## 1.0.1 - 2015-11-06
7
+
8
+ - [improvement] Remove h1 from checklist if custom title is given
9
+
10
+ ## 1.0.0 - 2015-10-08
11
+
12
+ First Official Release
13
+
6
14
  ## 0.9.6 - 2015-09-30
7
15
 
8
16
  - [improvement] When displaying a list of projects to select from, display and pick index instead of project's id
@@ -126,12 +126,25 @@ command :new do |c|
126
126
  puts "* Type some letters of your project's name..."
127
127
  project_like = STDIN.gets.chomp
128
128
  projects = project_client.filtered_by_name(project_like)
129
+
130
+ while projects.empty?
131
+ puts "* We couldn't find any project matching your request. Please be more specific, and make sure that the project exists."
132
+ project_like = STDIN.gets.chomp
133
+ projects = project_client.filtered_by_name(project_like)
134
+ end
135
+
129
136
  default_project_id = projects.first[:id]
130
137
  projects.each_with_index do |project, index|
131
138
  puts "%-5s %-100s" % ["[#{index}]", project[:name]]
132
139
  end
133
140
  puts "* Pick your project, defaults to [0]"
134
141
  choice = STDIN.gets.chomp
142
+
143
+ while !(0...projects.size).to_a.include?(choice.to_i)
144
+ puts "* You need to select a project from this list. Please choose again."
145
+ choice = STDIN.gets.chomp
146
+ end
147
+
135
148
  project_id = choice == "" ? default_project_id : projects[choice.to_i][:id]
136
149
  project = project_client.get(project_id)
137
150
  puts "* Creating a checklist issue from #{checklist_path}"
@@ -22,6 +22,8 @@ module Checklister
22
22
  # Extract a title, when we find the first <h1> header
23
23
  if @title.nil? && line.start_with?("# ")
24
24
  @title = line.sub("# ", "").sub("\n", "")
25
+ elsif @title && line.start_with?("# ")
26
+ next
25
27
  else
26
28
  # Then, keep the text intact until the end of the file
27
29
  checklist << line
@@ -1,3 +1,3 @@
1
1
  module Checklister
2
- VERSION = "1.0.0"
2
+ VERSION = "1.0.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: checklister
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Benjamin Thouret
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-10-08 00:00:00.000000000 Z
12
+ date: 2015-11-06 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: gitlab
@@ -244,7 +244,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
244
244
  version: '1.9'
245
245
  requirements: []
246
246
  rubyforge_project:
247
- rubygems_version: 2.2.2
247
+ rubygems_version: 2.4.5
248
248
  signing_key:
249
249
  specification_version: 4
250
250
  summary: Markdown checklists to gitlab or github issue.