valise 1.1.0 → 1.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +14 -6
  2. data/lib/valise/adapters/tilt.rb +16 -1
  3. metadata +12 -13
checksums.yaml CHANGED
@@ -1,7 +1,15 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: adb87f4f5568fa4acb5ffda1cb35bc7d11c3786f
4
- data.tar.gz: f070549c2c75bef9a0996634f6a2ed7ab1b9f1f3
5
- SHA512:
6
- metadata.gz: c84e48d6b133094c9a9592af7b83d9595aba2ca90f191884e3a454b15b179e049115ac071d2b52307d03c5c227f20412031270d9c2894d0ea607dbae04a15fa5
7
- data.tar.gz: 97822fbf48bb4ae92e139f7e9a842d596e1337357a91f8e04f984eebe4a4b3f96dd4bafaec457e1eeb20ff76d6e3b122b34cad5ec1eb5ba7b0407ed2fb82a3a4
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ YTc2N2MyYjJjZGU4YWJkNWY2OTNkOTYyN2Q4YjZiMzAzZTZkNjc5MQ==
5
+ data.tar.gz: !binary |-
6
+ Y2ZjYTA0YzQzYjhiN2MzNzUyNjkyYmJiODQ2NTk4Mjk5MDZiYmRlNQ==
7
+ !binary "U0hBNTEy":
8
+ metadata.gz: !binary |-
9
+ YmMzYmZlNmMwNTc5ZTgyMmEyNmVlN2VhZWI2NDFkYmIyYWI4MzE3YjI4MDhh
10
+ MWMxMzE3Y2Y5NWVmMjBhZDU0YjJiNjViMzE3YjgwNTM5MTcxYmZiODlhYjYx
11
+ OTdkY2M3NGY2ZmQzMGU3NmE2NGUwM2QyOTc5ZmZlYTI1MWEwNDM=
12
+ data.tar.gz: !binary |-
13
+ MDg0YWI1ZDAyMzkzOTU5ODEwNzc0NmU0MDY0YmE5ZWVmOGUwMzQxMzkwNjVl
14
+ ODI1NjliMjQyYmFkYWQxNjhiZDI3MDk4Y2E1NDlkMWJhNjRkZDViOTFhOWQ2
15
+ M2M1MDk1NmFhMDVlYTU2NjM4MTFjZGRkMjI3OTFkOGYyZjk4YTY=
@@ -76,12 +76,27 @@ module Valise
76
76
  config.apply(self)
77
77
  end
78
78
 
79
+ def default_mappings
80
+ if ::Tilt.respond_to? :default_mapping
81
+ mapping = ::Tilt.default_mapping
82
+ mapping.template_map.merge(mapping.lazy_map).keys
83
+ else
84
+ ::Tilt.mappings.keys
85
+ end
86
+ rescue => ex
87
+ warn "Couldn't access Tilt's default template mappings"
88
+ warn " The specific error was #{ex}"
89
+ warn " Falling back to an *empty* template list"
90
+ warn " To add by hand, change #templates to #handle_template{|cfg| cfg.add_type('ext') }"
91
+ []
92
+ end
93
+
79
94
  def templates(rel_path=nil)
80
95
  rel_path ||= "templates"
81
96
  new_set = self.sub_set(rel_path)
82
97
  new_set = new_set.pfxs("", "_")
83
98
  new_set.handle_templates do |config|
84
- ::Tilt.mappings.each do |mapping, _|
99
+ default_mappings.each do |mapping|
85
100
  options = nil
86
101
  if block_given?
87
102
  options = yield(mapping)
metadata CHANGED
@@ -1,34 +1,33 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: valise
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Judson Lester
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-12-30 00:00:00.000000000 Z
11
+ date: 2014-01-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: corundum
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '>='
17
+ - - ! '>='
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0'
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: '0'
27
- description: |2
28
- Valise provides an API for accessing configuration and data files for your
29
- application, including the population of default values, and managing search
30
- paths. Written to encourage a cross-platform approach to maintaining configs
31
- for an application.
27
+ description: ! " Valise provides an API for accessing configuration and data files
28
+ for your\n application, including the population of default values, and managing
29
+ search\n paths. Written to encourage a cross-platform approach to maintaining
30
+ configs\n for an application.\n"
32
31
  email:
33
32
  - nyarly@gmail.com
34
33
  executables: []
@@ -210,22 +209,22 @@ rdoc_options:
210
209
  - --main
211
210
  - doc/README
212
211
  - --title
213
- - valise-1.1.0 RDoc
212
+ - valise-1.1.1 RDoc
214
213
  require_paths:
215
214
  - lib/
216
215
  required_ruby_version: !ruby/object:Gem::Requirement
217
216
  requirements:
218
- - - '>='
217
+ - - ! '>='
219
218
  - !ruby/object:Gem::Version
220
219
  version: '0'
221
220
  required_rubygems_version: !ruby/object:Gem::Requirement
222
221
  requirements:
223
- - - '>='
222
+ - - ! '>='
224
223
  - !ruby/object:Gem::Version
225
224
  version: '0'
226
225
  requirements: []
227
226
  rubyforge_project: valise
228
- rubygems_version: 2.0.3
227
+ rubygems_version: 2.0.14
229
228
  signing_key:
230
229
  specification_version: 3
231
230
  summary: Manage configuration and data files simply