sawaal 1.0.0 → 1.0.1

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: 6951a118f49374178545e4c34d8e19341b872542
4
- data.tar.gz: a6d932398b2d7c1c7ef6eb9eab3e13eae45d6df1
3
+ metadata.gz: 5e978a9b6e143d26214406463c01e71a451e7a68
4
+ data.tar.gz: 71902ca54956076caad312c058a26417018f8b50
5
5
  SHA512:
6
- metadata.gz: 35d8afd33063c9dda00824903d1b1ca78e9ba4ffd89f557454e68119464fa64c29bc96d315b88fd6356628127cadbab8f2ae8868e09bb410aa1199298909dc5f
7
- data.tar.gz: 3e45020160d7867a1d908dde9ef0821632c10512e90643b34a0c96b6421a230380c628aaf8584fda1b410797303593505e5b9284ac260b43a174fd19165c6f74
6
+ metadata.gz: 52ac2030ccee6a5e821e23178ed0e713d2574c59c73e32ac25a424a89aabd260c761478d2855e7cfefdb4fb67e38b9c1feb7172127488b0075a434a40e984e64
7
+ data.tar.gz: 22a8352be84bc657308306c2be8c7443c7231c8ca20f4f5ff33247410ae10cda5c3f25e33d61dd8eda959787f9ce392714524583166ffbbd44fa9aadb79550f7
data/CHANGELOG.md CHANGED
@@ -14,6 +14,11 @@ List of changes so far that have been released to ruby gems.
14
14
 
15
15
  <!-- markdown-toc end -->
16
16
 
17
+ 1.0.1 / 2015-07-29
18
+ ==================
19
+
20
+ Bugfixes and minor improvements
21
+
17
22
  1.0.0 / 2015-07-27
18
23
  ==================
19
24
 
data/README.md CHANGED
@@ -3,7 +3,6 @@
3
3
  [![Build](http://img.shields.io/travis-ci/anshulverma/sawaal.svg?style=flat-square)](https://travis-ci.org/anshulverma/sawaal)
4
4
  [![Coverage](http://img.shields.io/codeclimate/coverage/github/anshulverma/sawaal.svg?style=flat-square)](https://codeclimate.com/github/anshulverma/sawaal)
5
5
  [![Quality](http://img.shields.io/codeclimate/github/anshulverma/sawaal.svg?style=flat-square)](https://codeclimate.com/github/anshulverma/sawaal)
6
- [![Dependencies](http://img.shields.io/gemnasium/anshulverma/sawaal.svg?style=flat-square)](https://gemnasium.com/anshulverma/sawaal)
7
6
  [![Inline docs](http://inch-ci.org/github/anshulverma/sawaal.svg?style=flat-square)](http://inch-ci.org/github/anshulverma/sawaal)
8
7
  [![Downloads](http://img.shields.io/gem/dt/sawaal.svg?style=flat-square)](https://rubygems.org/gems/sawaal)
9
8
 
@@ -11,16 +10,35 @@
11
10
  **Table of Contents**
12
11
 
13
12
  - [sawaal](#sawaal)
14
- - [Summary](#summary)
13
+ - [Quickstart](#quickstart)
15
14
  - [Installation](#installation)
16
- - [Usage](#usage)
17
15
  - [Contributing](#contributing)
18
16
 
19
17
  <!-- markdown-toc end -->
20
18
 
21
- # Summary
19
+ # Quickstart
22
20
 
23
- TODO: Write a gem description
21
+ Here is an example usage of this gem. This should be enough to get
22
+ started with `sawaal`.
23
+
24
+ ``` ruby
25
+ require 'sawaal'
26
+
27
+ selected = Sawaal::Selector.choose(
28
+ 'which key is the best?', {
29
+ :key1 => 'key1 is the best',
30
+ :key2 => 'key2 is the best for sure',
31
+ :key3 => 'key3 might be the one',
32
+ :key4 => 'key4 is surely the best',
33
+ :key5 => 'key5'
34
+ })
35
+
36
+ puts selected
37
+ ```
38
+
39
+ The only thing to remember is that in the choose call, you can use
40
+ either a hash of options or an array. If you used an array, the return
41
+ selected value will be the 0-based index of the selected item.
24
42
 
25
43
  ## Installation
26
44
 
@@ -38,10 +56,6 @@ Or install it yourself as:
38
56
 
39
57
  $ gem install sawaal
40
58
 
41
- ## Usage
42
-
43
- TODO: Write usage instructions here
44
-
45
59
  ## Contributing
46
60
 
47
61
  1. Fork it ( https://github.com/[my-github-username]/sawaal/fork )
data/lib/sawaal.rb CHANGED
@@ -1,7 +1,13 @@
1
1
  # encoding: utf-8
2
2
 
3
- require 'sawaal/version'
3
+ require 'io/console'
4
+
5
+ require 'sawaal/color'
6
+ require 'sawaal/cursor'
7
+ require 'sawaal/selections'
4
8
  require 'sawaal/selector'
9
+ require 'sawaal/tty'
10
+ require 'sawaal/version'
5
11
 
6
12
  # Helps a command line application by allowing it to ask
7
13
  # multiple choice questions
data/lib/sawaal/cursor.rb CHANGED
@@ -1,8 +1,5 @@
1
1
  # encoding: utf-8
2
2
 
3
- require 'sawaal/color'
4
- require 'sawaal/tty'
5
-
6
3
  module Sawaal
7
4
  # Handle cursor movements and text highlighting
8
5
  #
@@ -1,10 +1,5 @@
1
1
  # encoding: utf-8
2
2
 
3
- require 'io/console'
4
-
5
- require 'sawaal/cursor'
6
- require 'sawaal/selections'
7
-
8
3
  module Sawaal
9
4
  # Way into invoking the selection
10
5
  #
@@ -2,5 +2,5 @@
2
2
 
3
3
  # Track version of the module
4
4
  module Sawaal
5
- VERSION = '1.0.0'
5
+ VERSION = '1.0.1'
6
6
  end
data/spec/spec_helper.rb CHANGED
@@ -7,10 +7,6 @@ if ENV['CI']
7
7
  config.logger.level = Logger::WARN
8
8
  end
9
9
  CodeClimate::TestReporter.start
10
-
11
- # enable coveralls
12
- require 'coveralls'
13
- Coveralls.wear!
14
10
  end
15
11
 
16
12
  # enable simplecov for code coverage
data/spec/version_spec.rb CHANGED
@@ -2,6 +2,6 @@
2
2
 
3
3
  describe Sawaal do
4
4
  it 'has a valid version tag' do
5
- expect(Sawaal::VERSION).to(eq('1.0.0'))
5
+ expect(Sawaal::VERSION).to(eq('1.0.1'))
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,27 +1,27 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sawaal
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
  - Anshul Verma
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-07-28 00:00:00.000000000 Z
11
+ date: 2015-07-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ~>
18
18
  - !ruby/object:Gem::Version
19
19
  version: '1.6'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ~>
25
25
  - !ruby/object:Gem::Version
26
26
  version: '1.6'
27
27
  description: |2
@@ -61,17 +61,17 @@ require_paths:
61
61
  - lib
62
62
  required_ruby_version: !ruby/object:Gem::Requirement
63
63
  requirements:
64
- - - ">="
64
+ - - '>='
65
65
  - !ruby/object:Gem::Version
66
66
  version: 1.9.3
67
67
  required_rubygems_version: !ruby/object:Gem::Requirement
68
68
  requirements:
69
- - - ">="
69
+ - - '>='
70
70
  - !ruby/object:Gem::Version
71
71
  version: 1.3.6
72
72
  requirements: []
73
73
  rubyforge_project:
74
- rubygems_version: 2.2.2
74
+ rubygems_version: 2.4.6
75
75
  signing_key:
76
76
  specification_version: 4
77
77
  summary: Helper gem for asking questions on terminal