darkroom 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,21 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative('asset_error')
4
+
5
+ class Darkroom
6
+ ##
7
+ # Error class used when a reference is made to a file with an unrecognized extension.
8
+ #
9
+ class UnrecognizedExtensionError < AssetError
10
+ ##
11
+ # Creates a new instance.
12
+ #
13
+ # * +file+ - File with the unrecognized extension.
14
+ # * +source_path+ - Path of the asset that contains the error (optional).
15
+ # * +source_line_num+ - Line number in the asset where the error is located (optional).
16
+ #
17
+ def initialize(file, source_path = nil, source_line_num = nil)
18
+ super('File extension not recognized', file, source_path, source_line_num)
19
+ end
20
+ end
21
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class Darkroom
4
- VERSION = '0.0.3'
4
+ VERSION = '0.0.4'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: darkroom
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nate Pickens
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-03-27 00:00:00.000000000 Z
11
+ date: 2021-08-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -59,11 +59,18 @@ files:
59
59
  - lib/darkroom.rb
60
60
  - lib/darkroom/asset.rb
61
61
  - lib/darkroom/darkroom.rb
62
+ - lib/darkroom/delegates/css.rb
63
+ - lib/darkroom/delegates/html.rb
64
+ - lib/darkroom/delegates/htx.rb
65
+ - lib/darkroom/delegates/javascript.rb
66
+ - lib/darkroom/errors/asset_error.rb
62
67
  - lib/darkroom/errors/asset_not_found_error.rb
68
+ - lib/darkroom/errors/circular_reference_error.rb
63
69
  - lib/darkroom/errors/duplicate_asset_error.rb
70
+ - lib/darkroom/errors/invalid_path_error.rb
64
71
  - lib/darkroom/errors/missing_library_error.rb
65
72
  - lib/darkroom/errors/processing_error.rb
66
- - lib/darkroom/errors/spec_not_defined_error.rb
73
+ - lib/darkroom/errors/unrecognized_extension_error.rb
67
74
  - lib/darkroom/version.rb
68
75
  homepage: https://github.com/npickens/darkroom
69
76
  licenses:
@@ -1,28 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- class Darkroom
4
- ##
5
- # Error class used when a spec is not defined for a particular file extension.
6
- #
7
- class SpecNotDefinedError < StandardError
8
- attr_reader(:extension, :file)
9
-
10
- ##
11
- # Creates a new instance.
12
- #
13
- # * +extension+ - Extension for which there is no spec defined.
14
- # * +file+ - File path of the asset whose loading was attempted.
15
- #
16
- def initialize(extension, file = nil)
17
- @extension = extension
18
- @file = file
19
- end
20
-
21
- ##
22
- # Returns a string representation of the error.
23
- #
24
- def to_s
25
- "Spec not defined for #{@extension} files#{" (#{@file})" if @file}"
26
- end
27
- end
28
- end