checklister 0.9.6 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8d92fa9a6032808dad696f66b30035e18ab4d147
4
- data.tar.gz: e3b58c1b41cbc79d4c5c4a475d4fec7356eafeb1
3
+ metadata.gz: a8d6b606fff092b1cab881102d621ea1a820034f
4
+ data.tar.gz: 7f657346d699f5ab56cbaaefae9b6e663c908546
5
5
  SHA512:
6
- metadata.gz: 536e179b42b17e1a3a05f16918283b358e77520b8ab593251bdef7cb9ede85e2b912b81265be7cc3e8b804ffaed3327bd4affc86406a8d88877325441ce42516
7
- data.tar.gz: 2e84eb8d43fdd27ade4825b40bc9b233d61e4ef68de05424b51c0aee1a15656a36143c029d9a980f511cf081394e187598af11095dd0ebdd0490d474ba30064e
6
+ metadata.gz: 84a7331feddecafb412c3dc379a67abed9740257bcd62b5a2adf9bb2dc8d97e8ee68402894e0f2581052e4c0571ecdaf4ff09ecad32475457df6f72f931353eb
7
+ data.tar.gz: 71c3e3a913357c7f4832214e39d54963a9b7e26e7b7a65cf545d1199b55b4c9eab4adb477857212bdf0328d81312998222676bd929cd41ee893a01f5cc6016ad
data/.gitignore CHANGED
@@ -8,4 +8,5 @@
8
8
  /pkg/
9
9
  /spec/reports/
10
10
  /tmp/
11
-
11
+ tags
12
+ gems.tags
data/Guardfile CHANGED
@@ -23,3 +23,8 @@ guard :rspec, cmd: "bundle exec rspec" do
23
23
  ruby = dsl.ruby
24
24
  dsl.watch_spec_files_for(ruby.lib_files)
25
25
  end
26
+
27
+ guard 'ctags-bundler', :src_path => ["lib", "spec/support"] do
28
+ watch(/^(lib|spec\/support)\/.*\.rb$/)
29
+ watch('Gemfile.lock')
30
+ end
data/README.md CHANGED
@@ -1,13 +1,10 @@
1
1
  # Checklister
2
2
 
3
- > STILL UNDER ACTIVE DEVELOPMENT
4
-
5
3
  [![Build Status](https://travis-ci.org/benichu/checklister.svg)](https://travis-ci.org/benichu/checklister)
6
4
  [![Dependency Status](https://gemnasium.com/benichu/checklister.svg)](https://gemnasium.com/benichu/checklister)
7
5
  [![Gem Version](https://badge.fury.io/rb/checklister.svg)](http://badge.fury.io/rb/checklister)
8
6
  [![Code Climate](https://codeclimate.com/github/benichu/checklister/badges/gpa.svg)](https://codeclimate.com/github/benichu/checklister)
9
7
  [![Coverage Status](https://coveralls.io/repos/benichu/checklister/badge.svg?branch=master&service=github)](https://coveralls.io/github/benichu/checklister?branch=master)
10
- [![MIT license](https://img.shields.io/github/license/mashape/apistatus.svg)](https://github.com/benichu/checklister/blob/master/LICENSE)
11
8
 
12
9
  ## Description
13
10
 
@@ -36,15 +33,15 @@ Source: http://atulgawande.com/book/the-checklist-manifesto/
36
33
 
37
34
  #### Find your Github token
38
35
 
39
- [Follow this video tutorial.](https://www.dropbox.com/s/smnc1qdklwadvzu/Github%20token.mp4?dl=0)
36
+ <a href="https://www.dropbox.com/s/smnc1qdklwadvzu/Github%20token.mp4?dl=0" target="_blank">Follow this video tutorial.</a>
40
37
 
41
38
  #### Find your Gitlab token (v7)
42
39
 
43
- [Follow this video tutorial.](https://www.dropbox.com/s/cob01skd1jbp2ha/Old%20Gitbal%20token.mp4?dl=0)
40
+ <a href="https://www.dropbox.com/s/cob01skd1jbp2ha/Old%20Gitbal%20token.mp4?dl=0" target="_blank">Follow this video tutorial.</a>
44
41
 
45
42
  #### Find your Gitlab token (v8)
46
43
 
47
- [Follow this video tutorial.](https://www.dropbox.com/s/e12pmlk5416hlac/Gitlab%20token.mp4?dl=0)
44
+ <a href="https://www.dropbox.com/s/e12pmlk5416hlac/Gitlab%20token.mp4?dl=0" target="_blank">Follow this video tutorial.</a>
48
45
 
49
46
  ### Install/Update gem
50
47
 
@@ -94,6 +91,7 @@ $ checklister new --checklist /path/to/simple-checklist.md --title "A custom tit
94
91
  * Ruby 2.0+
95
92
  * RubyGems 1.9+ (`gem update --system `)
96
93
  * Bundler 1.10+
94
+ * [ctags](http://ctags.sourceforge.net/)
97
95
 
98
96
  ### Bootstrap
99
97
 
@@ -136,19 +134,9 @@ To prepare a release, run `script/release`. This will package a new version of t
136
134
 
137
135
  ## Roadmap
138
136
 
139
- ### Version 0.9
140
-
141
- - [x] [feature] Create a new Issue based on a specific markdown file (local path)
142
- - [x] [feature] Connect to gitlab account
143
-
144
- ### Version 1.0
145
-
146
- - [x] [improvements] CLI improvements based on first test run with real users
147
- - [ ] [documentation] Yard documentation updated
148
- - [x] [feature] Connect to github account
149
-
150
137
  ### Wishlist
151
138
 
139
+ - [ ] [documentation] Yard documentation updated
152
140
  - [ ] [dev] Better step by step DSL for CLI interactions with user
153
141
  - [ ] [feature] Select a milestone from a list populated based on github/gitlab API
154
142
  - [ ] [feature] Select a checklist from an history list
@@ -26,12 +26,13 @@ Gem::Specification.new do |spec|
26
26
  spec.add_dependency "gli" , "~> 2.13"
27
27
  spec.add_dependency "octokit" , "~> 4.0"
28
28
 
29
- spec.add_development_dependency "bundler" , "~> 1.10"
30
- spec.add_development_dependency "coveralls" , "~> 0.8.2"
31
- spec.add_development_dependency "guard" , "~> 2.13"
32
- spec.add_development_dependency "guard-rspec" , "~> 4.6"
33
- spec.add_development_dependency "rake" , "~> 10.4"
34
- spec.add_development_dependency "rspec" , "~> 3.3"
35
- spec.add_development_dependency "yard" , "~> 0.8"
36
- spec.add_development_dependency "webmock" , "~> 1.21"
29
+ spec.add_development_dependency "bundler" , "~> 1.10"
30
+ spec.add_development_dependency "coveralls" , "~> 0.8.2"
31
+ spec.add_development_dependency "guard" , "~> 2.13"
32
+ spec.add_development_dependency "guard-rspec" , "~> 4.6"
33
+ spec.add_development_dependency "guard-ctags-bundler"
34
+ spec.add_development_dependency "rake" , "~> 10.4"
35
+ spec.add_development_dependency "rspec" , "~> 3.3"
36
+ spec.add_development_dependency "yard" , "~> 0.8"
37
+ spec.add_development_dependency "webmock" , "~> 1.21"
37
38
  end
@@ -73,9 +73,7 @@ module Checklister
73
73
  # List of all the configuration attributes stored for use within the gem
74
74
  ATTRIBUTES = [:endpoint, :private_token, :label, :kind]
75
75
 
76
- # List of accessor attributes
77
76
  attr_accessor :endpoint, :private_token, :kind
78
- # List of writer attributes (with a reader defined in the class definition)
79
77
  attr_writer :label
80
78
 
81
79
  # Apply a configuration hash to a configuration instance
@@ -2,7 +2,9 @@ module Checklister
2
2
  module Github
3
3
  class ProjectDecorator
4
4
  def initialize(object)
5
- @object = object
5
+ @object = Checklister::Sanitizer.symbolize JSON.parse(object)
6
+ rescue TypeError
7
+ @object = Checklister::Sanitizer.symbolize object
6
8
  end
7
9
 
8
10
  def id
@@ -49,7 +51,8 @@ module Checklister
49
51
  # @return [Array] and array of project's properties as Hash
50
52
  def all(options = {})
51
53
  query_options = DEFAULT_OPTIONS.merge options
52
- @client.repositories(query_options).map { |p| ProjectDecorator.new(p).to_hash }
54
+ repositories = @client.repositories(query_options)
55
+ repositories.map { |p| ProjectDecorator.new(p).to_hash }
53
56
  end
54
57
 
55
58
  # Get github's projects based on a search string (LIKE on project#name)
@@ -53,10 +53,12 @@ module Checklister
53
53
  projects = []
54
54
  page = 1
55
55
  while page <= MAX_PAGES
56
- projects += @client.projects(query_options.merge(page: page)).map { |p| ProjectDecorator.new(p).to_hash }
57
- if projects.empty?
56
+ projects_per_page = @client.projects(query_options.merge(page: page))
57
+ if projects_per_page == false || projects_per_page.empty?
58
58
  page = MAX_PAGES
59
+ return projects
59
60
  else
61
+ projects += projects_per_page.map { |p| ProjectDecorator.new(p).to_hash }
60
62
  page += 1
61
63
  end
62
64
  end
@@ -1,10 +1,17 @@
1
1
  module Checklister
2
2
  class Issue
3
- # - project_id (required) - The ID of a project
4
- # - title (required) - The title of an issue
5
- # - description (required) - The description of an issue
6
- attr_reader :project_id, :title, :description
3
+ # project_id (required) - The ID of a project
4
+ attr_reader :project_id
5
+ # title (required) - The title of an issue
6
+ attr_reader :title
7
+ # description (required) - The description of an issue
8
+ attr_reader :description
7
9
 
10
+ # Initialize an instance of Issue
11
+ #
12
+ # @param attributes [Hash] list of key/values
13
+ # @return [Object] the issue object
14
+ #
8
15
  def initialize(attributes = {})
9
16
  @project_id = attributes.fetch(:project_id) { raise ArgumentError, "Missing project_id" }
10
17
  @title = attributes.fetch(:title) { raise ArgumentError, "Missing title" }
@@ -1,3 +1,3 @@
1
1
  module Checklister
2
- VERSION = "0.9.6"
2
+ VERSION = "1.0.0"
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: 0.9.6
4
+ version: 1.0.0
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-09-30 00:00:00.000000000 Z
12
+ date: 2015-10-08 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: gitlab
@@ -109,6 +109,20 @@ dependencies:
109
109
  - - "~>"
110
110
  - !ruby/object:Gem::Version
111
111
  version: '4.6'
112
+ - !ruby/object:Gem::Dependency
113
+ name: guard-ctags-bundler
114
+ requirement: !ruby/object:Gem::Requirement
115
+ requirements:
116
+ - - ">="
117
+ - !ruby/object:Gem::Version
118
+ version: '0'
119
+ type: :development
120
+ prerelease: false
121
+ version_requirements: !ruby/object:Gem::Requirement
122
+ requirements:
123
+ - - ">="
124
+ - !ruby/object:Gem::Version
125
+ version: '0'
112
126
  - !ruby/object:Gem::Dependency
113
127
  name: rake
114
128
  requirement: !ruby/object:Gem::Requirement