uh-layout 0.2.3 → 0.3.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: c6b79e33e24afa90cb3ac6e5164d8a4603c18da5
4
- data.tar.gz: d6ffed19ae70a74ea34b95e47c4b1ab1aec61435
3
+ metadata.gz: 0c12d5f1f5d194450159e0d830f3ed574f3a6334
4
+ data.tar.gz: 63432f78d31078399ddc9a83d3e4021d9739f033
5
5
  SHA512:
6
- metadata.gz: e61af32c594c778693f78bee48d76ab19183c0a30944f614ad158a15808f446211f16ee1b537de3fd418af79098d7730f9c7b7f14638941b591df87ba1253c37
7
- data.tar.gz: ff18fa02b66dd28f38cac8072d8d6749accc54dc675b923cd55861dfc0ea564bf89c541cb8ad432d5e0394430430a4882f863fb6301b1914179de89eb110d0fd
6
+ metadata.gz: 254059d976bc47da8974ebf8d3b611b6bba615b2bfe361af2726f23606fc85e5181b322c08d2821a84e5721e9c90b52fd0ba935c9397e71d20a1aa4d00b4495d
7
+ data.tar.gz: e69b1862080d58d023fe2f1ed4c74fe9685213250a58bc1af26433c9f34bdc2a28227b68c7b94e93d5724241205264056c8516c3c2e4be8ec03f9f7e914ceb34
data/README.md ADDED
@@ -0,0 +1,18 @@
1
+ uh-layout
2
+ =========
3
+
4
+ [![Version ][badge-version-img]][badge-version-uri]
5
+ [![Build status ][badge-build-img]][badge-build-uri]
6
+ [![Code Climate ][badge-cclimate-img]][badge-cclimate-uri]
7
+
8
+
9
+ Tiling and stacking layout for `uh-wm` ruby gem.
10
+
11
+
12
+
13
+ [badge-version-img]: https://img.shields.io/gem/v/uh-layout.svg?style=flat-square
14
+ [badge-version-uri]: https://rubygems.org/gems/uh-layout
15
+ [badge-build-img]: https://img.shields.io/travis/tjouan/uh-layout/master.svg?style=flat-square
16
+ [badge-build-uri]: https://travis-ci.org/tjouan/uh-layout
17
+ [badge-cclimate-img]: https://img.shields.io/codeclimate/github/tjouan/uh-layout.svg?style=flat-square
18
+ [badge-cclimate-uri]: https://codeclimate.com/github/tjouan/uh-layout
@@ -1,5 +1,5 @@
1
1
  module Uh
2
2
  class Layout
3
- VERSION = '0.2.3'
3
+ VERSION = '0.3.0'
4
4
  end
5
5
  end
data/lib/uh/layout.rb CHANGED
@@ -34,11 +34,13 @@ module Uh
34
34
 
35
35
  attr_reader :screens, :widgets, :colors, :history
36
36
 
37
- def initialize
37
+ def initialize **options
38
38
  @screens = Container.new
39
39
  @widgets = []
40
40
  @colors = COLORS
41
41
  @history = History.new
42
+
43
+ @colors = @colors.merge options[:colors] if options.key? :colors
42
44
  end
43
45
 
44
46
  def register(display)
@@ -4,7 +4,8 @@ module Uh
4
4
  let(:client) { build_client }
5
5
  let(:other_client) { build_client }
6
6
  let(:widget) { double('widget').as_null_object }
7
- subject(:layout) { described_class.new }
7
+ let(:options) { { } }
8
+ subject(:layout) { described_class.new options }
8
9
 
9
10
  before do
10
11
  layout.screens << Layout::Screen.new(0, geo)
@@ -12,6 +13,14 @@ module Uh
12
13
  layout.widgets << widget
13
14
  end
14
15
 
16
+ context 'when given colors option' do
17
+ let(:options) { { colors: { fg: 'rgb:42/42/42' } } }
18
+
19
+ it 'merges given colors with default ones' do
20
+ expect(layout.colors).to include fg: 'rgb:42/42/42', bg: 'rgb:0c/0c/0c'
21
+ end
22
+ end
23
+
15
24
  describe '#register' do
16
25
  it 'uses a registrant to register the layout with given display' do
17
26
  display = double 'display'
data/uh-layout.gemspec CHANGED
@@ -1,19 +1,17 @@
1
1
  require File.expand_path('../lib/uh/layout/version', __FILE__)
2
2
 
3
3
  Gem::Specification.new do |s|
4
- s.name = 'uh-layout'
5
- s.version = Uh::Layout::VERSION.dup
6
- s.summary = 'simple tiling and stacking layout for uh-wm'
4
+ s.name = 'uh-layout'
5
+ s.version = Uh::Layout::VERSION.dup
6
+ s.summary = 'simple tiling and stacking layout for uh-wm'
7
7
  s.description = s.name
8
- s.license = 'BSD-3-Clause'
9
- s.homepage = 'https://rubygems.org/gems/uh-layout'
8
+ s.license = 'BSD-3-Clause'
9
+ s.homepage = 'https://rubygems.org/gems/uh-layout'
10
10
 
11
- s.authors = 'Thibault Jouan'
12
- s.email = 'tj@a13.fr'
11
+ s.authors = 'Thibault Jouan'
12
+ s.email = 'tj@a13.fr'
13
13
 
14
14
  s.files = `git ls-files`.split $/
15
- s.test_files = s.files.grep /\A(spec|features)\//
16
- s.executables = s.files.grep(/\Abin\//) { |f| File.basename(f) }
17
15
 
18
16
 
19
17
  s.add_development_dependency 'uh', '~> 1.0'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: uh-layout
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thibault Jouan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-22 00:00:00.000000000 Z
11
+ date: 2015-04-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: uh
@@ -64,6 +64,7 @@ files:
64
64
  - Gemfile
65
65
  - Guardfile
66
66
  - LICENSE
67
+ - README.md
67
68
  - Rakefile
68
69
  - lib/uh/layout.rb
69
70
  - lib/uh/layout/arrangers/fixed_width.rb
@@ -117,17 +118,4 @@ rubygems_version: 2.4.5
117
118
  signing_key:
118
119
  specification_version: 4
119
120
  summary: simple tiling and stacking layout for uh-wm
120
- test_files:
121
- - spec/spec_helper.rb
122
- - spec/support/factories.rb
123
- - spec/uh/layout/arrangers/fixed_width_spec.rb
124
- - spec/uh/layout/arrangers/stack_spec.rb
125
- - spec/uh/layout/arrangers/vert_tile_spec.rb
126
- - spec/uh/layout/client_column_mover_spec.rb
127
- - spec/uh/layout/column_spec.rb
128
- - spec/uh/layout/container_spec.rb
129
- - spec/uh/layout/history_spec.rb
130
- - spec/uh/layout/registrant_spec.rb
131
- - spec/uh/layout/screen_spec.rb
132
- - spec/uh/layout/tag_spec.rb
133
- - spec/uh/layout_spec.rb
121
+ test_files: []