mustermann-contrib 1.0.3 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 7c4fb01c4d827fa7b26bd135492eb854f172a216
4
- data.tar.gz: 9a3e80282e743761446e52ce626ac47a524c25e1
2
+ SHA256:
3
+ metadata.gz: 5150a0fe9cf6b9f33d2c3be42a3358c2466a6df37fb007ace903a5d5be53df8a
4
+ data.tar.gz: 263ce51ded872c7ebaa95143b652a78f83030d515589367ff1ee6d4df97c53cb
5
5
  SHA512:
6
- metadata.gz: ea76ed8cf7c2f627e67701c2f78486ebb28da9abb36fa611a4928f79a21e2fbcdc1560a0f609914d5178e1feedac33b28ca3667d32d2b8a32406defdc93371a9
7
- data.tar.gz: 5a44ca4926a319b89cfb2aaab2727ce1e823267d4820ad05c2bf119b43c72fdc7150ba626f8a0bd37d86f42ec068fda7d1d51bdb0915f28a01810a8f13e4d1f7
6
+ metadata.gz: 0341a1e7eca327e4b13db4d0b18b77e265c96a175d40a2c9ddcf7aaef483d36d05673ff18f5193519bffb8d84fcee351b0e389fa9fc1826a33de8ed7ddb7ae6d
7
+ data.tar.gz: 4be2c1d0333cc44f959009d502a68548ddab8afdc4f08baebf33e7eee2577dd632924c8f2ea65494abcfcbd6916dec45ba50664bbc5f1e6c262b1a32103e82b2
data/README.md CHANGED
@@ -579,7 +579,7 @@ pattern.to_templates # => ['/{name}']
579
579
  <a name="-mustermann-rails"></a>
580
580
  # Rails Syntax for Mustermann
581
581
 
582
- This gem implements the `rails` pattern type for Mustermann. It is compatible with [Ruby on Rails](http://rubyonrails.org/), [Journey](https://github.com/rails/journey), the [http_router gem](https://github.com/joshbuddy/http_router), [Lotus](http://lotusrb.org/) and [Scalatra](http://www.scalatra.org/) (if [configured](http://www.scalatra.org/2.3/guides/http/routes.html#toc_248))</td>
582
+ This gem implements the `rails` pattern type for Mustermann. It is compatible with [Ruby on Rails](http://rubyonrails.org/), [Journey](https://github.com/rails/journey), the [http_router gem](https://github.com/joshbuddy/http_router), [Lotus](http://lotusrb.org/) and [Scalatra](http://scalatra.org/) (if [configured](http://scalatra.org/2.3/guides/http/routes.html#toc_248))</td>
583
583
 
584
584
  ## Overview
585
585
 
@@ -751,7 +751,7 @@ pattern === "/baz" # => false
751
751
  <a name="-mustermann-simple"></a>
752
752
  # Simple Syntax for Mustermann
753
753
 
754
- This gem implements the `simple` pattern type for Mustermann. It is compatible with [Sinatra](http://www.sinatrarb.com/) (1.x), [Scalatra](http://www.scalatra.org/) and [Dancer](http://perldancer.org/).
754
+ This gem implements the `simple` pattern type for Mustermann. It is compatible with [Sinatra](http://www.sinatrarb.com/) (1.x), [Scalatra](http://scalatra.org/) and [Dancer](http://perldancer.org/).
755
755
 
756
756
  ## Overview
757
757
 
@@ -16,7 +16,7 @@ module Mustermann
16
16
  attr_reader :pattern, :theme
17
17
 
18
18
  # @!visibility private
19
- DEFAULT_THEME = Hansi::Theme.new(:solarized, {
19
+ DEFAULT_THEME = Hansi::Theme.new(:solarized,
20
20
  default: :base0,
21
21
  separator: :base1,
22
22
  escaped: :base1,
@@ -25,10 +25,10 @@ module Mustermann
25
25
  special: :blue,
26
26
  quote: :red,
27
27
  illegal: :darkred
28
- })
28
+ )
29
29
 
30
30
  # @!visibility private
31
- BASE_THEME = Hansi::Theme.new({
31
+ BASE_THEME = Hansi::Theme.new(
32
32
  special: :default,
33
33
  capture: :special,
34
34
  char: :default,
@@ -46,13 +46,13 @@ module Mustermann
46
46
  quote: :special,
47
47
  type: :special,
48
48
  illegal: :special
49
- })
49
+ )
50
50
 
51
51
  # @!visibility private
52
52
  def initialize(pattern, type: nil, inspect: nil, **theme)
53
53
  @pattern = Mustermann.new(pattern, type: type)
54
54
  @inspect = inspect.nil? ? pattern.is_a?(Mustermann::Composite) : inspect
55
- theme = theme.any? ? Hansi::Theme.new(theme) : DEFAULT_THEME
55
+ theme = theme.any? ? Hansi::Theme.new(**theme) : DEFAULT_THEME
56
56
  @theme = BASE_THEME.merge(theme)
57
57
  end
58
58
 
@@ -53,7 +53,7 @@ module Mustermann
53
53
  def color_inspect(base_color = nil, **theme)
54
54
  base_color ||= Highlight::DEFAULT_THEME[:base01]
55
55
  template = is_a?(Composite) ? "*#<%p:(*%s*)>*" : "*#<%p:*%s*>*"
56
- Hansi.render(template, self.class, to_ansi(inspect: true, **theme), "*" => base_color)
56
+ Hansi.render(template, self.class, to_ansi(inspect: true, **theme), {"*" => base_color})
57
57
  end
58
58
 
59
59
  # If invoked directly by IRB, same as {#color_inspect}, otherwise same as Object#pretty_print.
@@ -10,7 +10,7 @@ module Mustermann
10
10
  # @!visibility private
11
11
  class HansiTemplate < Generic
12
12
  # @!visibility private
13
- def initialize(*)
13
+ def initialize(*, **)
14
14
  @hansi = Hansi::StringRenderer.new(tags: true)
15
15
  super
16
16
  end
@@ -53,7 +53,7 @@ describe Mustermann::FileUtils do
53
53
 
54
54
  describe :glob_map do
55
55
  example do
56
- utils.glob_map(':name.rb' => ':name/init.rb').should be == {
56
+ utils.glob_map({':name.rb' => ':name/init.rb'}).should be == {
57
57
  "bar.rb" => "bar/init.rb",
58
58
  "foo.rb" => "foo/init.rb"
59
59
  }
@@ -61,7 +61,7 @@ describe Mustermann::FileUtils do
61
61
 
62
62
  example do
63
63
  result = {}
64
- returned = utils.glob_map(':name.rb' => ':name/init.rb') { |k, v| result[v] = k.upcase }
64
+ returned = utils.glob_map({':name.rb' => ':name/init.rb'}) { |k, v| result[v] = k.upcase }
65
65
  returned.sort .should be == ["BAR.RB", "FOO.RB"]
66
66
  result["bar/init.rb"] .should be == "BAR.RB"
67
67
  end
@@ -69,7 +69,7 @@ describe Mustermann::FileUtils do
69
69
 
70
70
  describe :cp do
71
71
  example do
72
- utils.cp(':name.rb' => ':name.ruby', ':name.txt' => ':name.md')
72
+ utils.cp({':name.rb' => ':name.ruby', ':name.txt' => ':name.md'})
73
73
  File.should be_exist('foo.ruby')
74
74
  File.should be_exist('bar.md')
75
75
  File.should be_exist('bar.txt')
@@ -79,14 +79,14 @@ describe Mustermann::FileUtils do
79
79
  describe :cp_r do
80
80
  example do
81
81
  mkdir_p "foo/bar"
82
- utils.cp_r('foo/:name' => :name)
82
+ utils.cp_r({'foo/:name' => :name})
83
83
  File.should be_directory('bar')
84
84
  end
85
85
  end
86
86
 
87
87
  describe :mv do
88
88
  example do
89
- utils.mv(':name.rb' => ':name.ruby', ':name.txt' => ':name.md')
89
+ utils.mv({':name.rb' => ':name.ruby', ':name.txt' => ':name.md'})
90
90
  File.should be_exist('foo.ruby')
91
91
  File.should be_exist('bar.md')
92
92
  File.should_not be_exist('bar.txt')
@@ -95,7 +95,7 @@ describe Mustermann::FileUtils do
95
95
 
96
96
  describe :ln do
97
97
  example do
98
- utils.ln(':name.rb' => ':name.ruby', ':name.txt' => ':name.md')
98
+ utils.ln({':name.rb' => ':name.ruby', ':name.txt' => ':name.md'})
99
99
  File.should be_exist('foo.ruby')
100
100
  File.should be_exist('bar.md')
101
101
  File.should be_exist('bar.txt')
@@ -104,7 +104,7 @@ describe Mustermann::FileUtils do
104
104
 
105
105
  describe :ln_s do
106
106
  example do
107
- utils.ln_s(':name.rb' => ':name.ruby', ':name.txt' => ':name.md')
107
+ utils.ln_s({':name.rb' => ':name.ruby', ':name.txt' => ':name.md'})
108
108
  File.should be_symlink('foo.ruby')
109
109
  File.should be_symlink('bar.md')
110
110
  File.should be_exist('bar.txt')
@@ -113,7 +113,7 @@ describe Mustermann::FileUtils do
113
113
 
114
114
  describe :ln_sf do
115
115
  example do
116
- utils.ln_sf(':name.rb' => ':name.txt')
116
+ utils.ln_sf({':name.rb' => ':name.txt'})
117
117
  File.should be_symlink('foo.txt')
118
118
  end
119
119
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mustermann-contrib
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Konstantin Haase
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2018-08-16 00:00:00.000000000 Z
12
+ date: 2019-12-30 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: mustermann
@@ -17,14 +17,14 @@ dependencies:
17
17
  requirements:
18
18
  - - '='
19
19
  - !ruby/object:Gem::Version
20
- version: 1.0.3
20
+ version: 1.1.0
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
25
  - - '='
26
26
  - !ruby/object:Gem::Version
27
- version: 1.0.3
27
+ version: 1.1.0
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: hansi
30
30
  requirement: !ruby/object:Gem::Requirement
@@ -116,8 +116,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
116
116
  - !ruby/object:Gem::Version
117
117
  version: '0'
118
118
  requirements: []
119
- rubyforge_project:
120
- rubygems_version: 2.6.8
119
+ rubygems_version: 3.0.3
121
120
  signing_key:
122
121
  specification_version: 4
123
122
  summary: Collection of extensions for Mustermann