tco 0.0.1 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,16 @@
1
+ require "tco"
2
+
3
+ describe Tco do
4
+ describe Tco::Colour do
5
+ before :each do
6
+ @colour = Tco::Colour.new [12, 34, 56]
7
+ end
8
+
9
+ it "converts to HSL" do
10
+ hsl = @colour.hsl
11
+ hsl[0].should be_within(0.1).of 210
12
+ hsl[1].should be_within(0.1).of 64.7
13
+ hsl[2].should be_within(0.1).of 13.3
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,13 @@
1
+ require "tco/style"
2
+
3
+ module Utils
4
+ def get_params(base_style=nil, fg=nil, bg=nil, bright=false, underline=false)
5
+ {
6
+ :base_style => base_style,
7
+ :fg => fg,
8
+ :bg => bg,
9
+ :bright => bright,
10
+ :underline => underline
11
+ }
12
+ end
13
+ end
@@ -0,0 +1,46 @@
1
+ palette: "extended"
2
+
3
+ colour_values:
4
+ "@0": "#3b3b3b"
5
+ "@1": "#cf6a4c"
6
+ "@2": "#99ad6a"
7
+ "@3": "#d8ad4c"
8
+ "@4": "#597bc5"
9
+ "@5": "#a037b0"
10
+ "@6": "#71b9f8"
11
+ "@7": "#adadad"
12
+
13
+ "@8": "#555555"
14
+ "@9": "#ff5555"
15
+ "@10": "#55ff55"
16
+ "@11": "#ffff55"
17
+ "@12": "#5555ff"
18
+ "@13": "#ff55ff"
19
+ "@14": "#55ffff"
20
+ "@15": "#ffffff"
21
+
22
+ names:
23
+ black: "#000000"
24
+ white: "#ffffff"
25
+ red: "#CC333F"
26
+ brown: "#6A4A3C"
27
+ blue: "#4D9EEB"
28
+ yellow: "#EDC951"
29
+ purple: "0xa854e8"
30
+
31
+ styles:
32
+ err:
33
+ fg: "red"
34
+ bg: "default"
35
+ bright: "true"
36
+ underline: "false"
37
+ warn:
38
+ fg: "yellow"
39
+ bg: "default"
40
+ bright: "true"
41
+ underline: "false"
42
+ poison:
43
+ fg: "yellow"
44
+ bg: "purple"
45
+ bright: "false"
46
+ underline: "false"
@@ -0,0 +1,28 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require "tco/version"
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = "tco"
8
+ s.version = Tco::VERSION
9
+ s.authors = ["Radek Pazdera"]
10
+ s.email = ["radek@pazdera.co.uk"]
11
+ s.summary = %q{A tool and a library for terminal output colouring}
12
+ s.description = %q{tco is a commandline tool and also a Ruby module that
13
+ allows its users to easily colourize the terminal
14
+ output of their bash scripts as well as Ruby programs.}
15
+ s.homepage = "https://github.com/pazdera/tco"
16
+ s.license = "MIT"
17
+
18
+ s.rubyforge_project = "tco"
19
+
20
+ s.files = `git ls-files`.split($/)
21
+ s.executables = s.files.grep(%r{^bin/}) { |f| File.basename(f) }
22
+ s.test_files = s.files.grep(%r{^(test|spec|features)/})
23
+ s.require_paths = ["lib"]
24
+
25
+ s.add_development_dependency "bundler", "~> 1.5"
26
+ s.add_development_dependency 'rake'
27
+ s.add_development_dependency 'rspec'
28
+ end
metadata CHANGED
@@ -1,31 +1,31 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tco
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Radek Pazdera
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-02-13 00:00:00.000000000 Z
11
+ date: 2014-03-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: rake
14
+ name: bundler
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '>='
17
+ - - ~>
18
18
  - !ruby/object:Gem::Version
19
- version: '0'
19
+ version: '1.5'
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
- version: '0'
26
+ version: '1.5'
27
27
  - !ruby/object:Gem::Dependency
28
- name: rspec
28
+ name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - '>='
@@ -39,7 +39,7 @@ dependencies:
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
- name: rdoc
42
+ name: rspec
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - '>='
@@ -53,18 +53,42 @@ dependencies:
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  description: |-
56
- The full tco gem will be released in a couple of weeks.
57
- tco is a commandline tool and also a Ruby module that
56
+ tco is a commandline tool and also a Ruby module that
58
57
  allows its users to easily colourize the terminal
59
58
  output of their bash scripts as well as Ruby programs.
60
59
  email:
61
60
  - radek@pazdera.co.uk
62
- executables: []
61
+ executables:
62
+ - tco
63
63
  extensions: []
64
64
  extra_rdoc_files: []
65
- files: []
66
- homepage: http://linuxwell.com
67
- licenses: []
65
+ files:
66
+ - .gitignore
67
+ - Gemfile
68
+ - LICENSE.txt
69
+ - README.md
70
+ - Rakefile
71
+ - bin/tco
72
+ - examples/rainbow.rb
73
+ - examples/tux.png
74
+ - examples/tux.rb
75
+ - examples/union_jack.rb
76
+ - lib/tco.rb
77
+ - lib/tco/colouring.rb
78
+ - lib/tco/config.rb
79
+ - lib/tco/palette.rb
80
+ - lib/tco/parser.rb
81
+ - lib/tco/style.rb
82
+ - lib/tco/version.rb
83
+ - spec/parser_spec.rb
84
+ - spec/string_ext_spec.rb
85
+ - spec/tco_spec.rb
86
+ - spec/utils.rb
87
+ - tco.conf-example
88
+ - tco.gemspec
89
+ homepage: https://github.com/pazdera/tco
90
+ licenses:
91
+ - MIT
68
92
  metadata: {}
69
93
  post_install_message:
70
94
  rdoc_options: []
@@ -85,5 +109,9 @@ rubyforge_project: tco
85
109
  rubygems_version: 2.0.3
86
110
  signing_key:
87
111
  specification_version: 4
88
- summary: A placeholder to reserve name
89
- test_files: []
112
+ summary: A tool and a library for terminal output colouring
113
+ test_files:
114
+ - spec/parser_spec.rb
115
+ - spec/string_ext_spec.rb
116
+ - spec/tco_spec.rb
117
+ - spec/utils.rb