pastel-cli 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.codeclimate.yml +10 -0
- data/CHANGELOG.md +6 -0
- data/Gemfile +4 -7
- data/README.md +3 -0
- data/bin/pastel +1 -1
- data/pastel-cli.gemspec +1 -1
- data/spec/spec_helper.rb +4 -2
- data/spec/unit/pastel_command_spec.rb +12 -7
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4e967a73d4b4239fcc3a89d9d96ca72fa57a3162
|
4
|
+
data.tar.gz: a94b8ddf623418430a14a47f6c20a6f6277daa85
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dc3650c54b2bb1721292aeada353aff4756bfdc14eff43a9e2d5d9302a4c3d9b71ca4e3efbc91eeb70c23b2807c090be4493ebc44bf624f5b9cc24439e76928c
|
7
|
+
data.tar.gz: ce7a3900f50ee239850a1b355a5784de7789517dd06ee8ff053293cd9b51e6ede367b6c8744596ae8fb7f18c2e37c8027f684336ea7bfcb9b05b08b27ebadcdf
|
data/.codeclimate.yml
ADDED
data/CHANGELOG.md
CHANGED
@@ -1,7 +1,13 @@
|
|
1
1
|
# Change log
|
2
2
|
|
3
|
+
## [v0.2.0] - 2016-03-05
|
4
|
+
|
5
|
+
### Added
|
6
|
+
* Add --help/-h flags
|
7
|
+
|
3
8
|
## [v0.1.0] - 2016-01-15
|
4
9
|
|
5
10
|
Initial release
|
6
11
|
|
12
|
+
[v0.2.0]: https://github.com/peter-murach/pastel-cli/compare/v0.1.0...v0.2.0
|
7
13
|
[v0.1.0]: https://github.com/peter-murach/pastel-cli/compare/v0.1.0
|
data/Gemfile
CHANGED
@@ -2,11 +2,8 @@ source 'https://rubygems.org'
|
|
2
2
|
|
3
3
|
gemspec
|
4
4
|
|
5
|
-
group :
|
6
|
-
gem 'rspec',
|
7
|
-
|
8
|
-
|
9
|
-
group :metrics do
|
10
|
-
gem 'coveralls', '~> 0.8.9'
|
11
|
-
gem 'simplecov', '~> 0.10.0'
|
5
|
+
group :test do
|
6
|
+
gem 'rspec', '~> 3.4.0'
|
7
|
+
gem 'simplecov', '~> 0.11.2'
|
8
|
+
gem 'codeclimate-test-reporter', '~> 0.4.8'
|
12
9
|
end
|
data/README.md
CHANGED
@@ -1,9 +1,12 @@
|
|
1
1
|
# Pastel CLI
|
2
2
|
[![Gem Version](https://badge.fury.io/rb/pastel-cli.svg)][gem]
|
3
3
|
[![Build Status](https://secure.travis-ci.org/peter-murach/pastel-cli.svg?branch=master)][travis]
|
4
|
+
[![Code Climate](https://codeclimate.com/github/peter-murach/pastel-cli/badges/gpa.svg)][codeclimate]
|
5
|
+
[![Coverage Status](https://codeclimate.com/github/peter-murach/pastel-cli/badges/coverage.svg)][codeclimate]
|
4
6
|
|
5
7
|
[gem]: http://badge.fury.io/rb/pastel-cli
|
6
8
|
[travis]: http://travis-ci.org/peter-murach/pastel-cli
|
9
|
+
[codeclimate]: https://codeclimate.com/github/peter-murach/pastel-cli
|
7
10
|
|
8
11
|
> CLI tool for intuitive terminal output styling
|
9
12
|
|
data/bin/pastel
CHANGED
data/pastel-cli.gemspec
CHANGED
data/spec/spec_helper.rb
CHANGED
@@ -1,12 +1,14 @@
|
|
1
1
|
# encoding: utf-8
|
2
2
|
|
3
|
+
$:.unshift File.expand_path("../../bin", __FILE__)
|
4
|
+
|
3
5
|
if RUBY_VERSION > '1.9' and (ENV['COVERAGE'] || ENV['TRAVIS'])
|
4
6
|
require 'simplecov'
|
5
|
-
require '
|
7
|
+
require 'codeclimate-test-reporter'
|
6
8
|
|
7
9
|
SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
|
8
10
|
SimpleCov::Formatter::HTMLFormatter,
|
9
|
-
|
11
|
+
CodeClimate::TestReporter::Formatter
|
10
12
|
]
|
11
13
|
|
12
14
|
SimpleCov.start do
|
@@ -3,37 +3,42 @@
|
|
3
3
|
RSpec.describe 'pastel command' do
|
4
4
|
|
5
5
|
it 'runs without arguments and shows help' do
|
6
|
-
expect(`pastel`).to match(/PASTEL\(1\)/)
|
6
|
+
expect(`bin/pastel`).to match(/PASTEL\(1\)/)
|
7
|
+
expect($?.exitstatus).to eq(0)
|
8
|
+
end
|
9
|
+
|
10
|
+
it "runs with --help/-h flags" do
|
11
|
+
expect(`bin/pastel`).to match(/PASTEL\(1\)/)
|
7
12
|
expect($?.exitstatus).to eq(0)
|
8
13
|
end
|
9
14
|
|
10
15
|
it 'runs with text only' do
|
11
|
-
expect(`pastel foo`).to match(/foo/)
|
16
|
+
expect(`bin/pastel foo`).to match(/foo/)
|
12
17
|
expect($?.exitstatus).to eq(0)
|
13
18
|
end
|
14
19
|
|
15
20
|
it 'runs with foreground option' do
|
16
|
-
expect(`pastel green foo`).to match(/\e\[32mfoo\e\[0m/)
|
21
|
+
expect(`bin/pastel green foo`).to match(/\e\[32mfoo\e\[0m/)
|
17
22
|
expect($?.exitstatus).to eq(0)
|
18
23
|
end
|
19
24
|
|
20
25
|
it "runs with foreground & background options" do
|
21
|
-
expect(`pastel green on_red foo`).to match(/\e\[32;41mfoo\e\[0m/)
|
26
|
+
expect(`bin/pastel green on_red foo`).to match(/\e\[32;41mfoo\e\[0m/)
|
22
27
|
expect($?.exitstatus).to eq(0)
|
23
28
|
end
|
24
29
|
|
25
30
|
it "runs with foreground & background & style options" do
|
26
|
-
expect(`pastel green on_red bold foo`).to match(/\e\[32;41;1mfoo\e\[0m/)
|
31
|
+
expect(`bin/pastel green on_red bold foo`).to match(/\e\[32;41;1mfoo\e\[0m/)
|
27
32
|
expect($?.exitstatus).to eq(0)
|
28
33
|
end
|
29
34
|
|
30
35
|
it "runs with piped input" do
|
31
|
-
expect(`echo foo | pastel green`).to match(/\e\[32mfoo\e\[0m/)
|
36
|
+
expect(`echo foo | bin/pastel green`).to match(/\e\[32mfoo\e\[0m/)
|
32
37
|
expect($?.exitstatus).to eq(0)
|
33
38
|
end
|
34
39
|
|
35
40
|
it "runs with --enabled option" do
|
36
|
-
expect(`pastel --enabled green foo`).to match(/\e\[32mfoo\e\[0m/)
|
41
|
+
expect(`bin/pastel --enabled green foo`).to match(/\e\[32mfoo\e\[0m/)
|
37
42
|
expect($?.exitstatus).to eq(0)
|
38
43
|
end
|
39
44
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pastel-cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Piotr Murach
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-03-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pastel
|
@@ -66,6 +66,7 @@ executables:
|
|
66
66
|
extensions: []
|
67
67
|
extra_rdoc_files: []
|
68
68
|
files:
|
69
|
+
- .codeclimate.yml
|
69
70
|
- .gitignore
|
70
71
|
- .rspec
|
71
72
|
- .ruby-version
|