halation 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -6,15 +6,15 @@
6
6
  <title>
7
7
  Top Level Namespace
8
8
 
9
- &mdash; Documentation by YARD 0.8.7.6
9
+ &mdash; Documentation by YARD 0.9.25
10
10
 
11
11
  </title>
12
12
 
13
- <link rel="stylesheet" href="css/style.css" type="text/css" charset="utf-8" />
13
+ <link rel="stylesheet" href="css/style.css" type="text/css" />
14
14
 
15
- <link rel="stylesheet" href="css/common.css" type="text/css" charset="utf-8" />
15
+ <link rel="stylesheet" href="css/common.css" type="text/css" />
16
16
 
17
- <script type="text/javascript" charset="utf-8">
17
+ <script type="text/javascript">
18
18
  pathId = "";
19
19
  relpath = '';
20
20
  </script>
@@ -28,7 +28,7 @@
28
28
  </head>
29
29
  <body>
30
30
  <div class="nav_wrap">
31
- <iframe id="nav" src="class_list.html"></iframe>
31
+ <iframe id="nav" src="class_list.html?1"></iframe>
32
32
  <div id="resizer"></div>
33
33
  </div>
34
34
 
@@ -59,8 +59,6 @@
59
59
  <div class="clear"></div>
60
60
  </div>
61
61
 
62
- <iframe id="search_frame" src="class_list.html"></iframe>
63
-
64
62
  <div id="content"><h1>Top Level Namespace
65
63
 
66
64
 
@@ -102,9 +100,9 @@
102
100
  </div>
103
101
 
104
102
  <div id="footer">
105
- Generated on Sat May 28 22:28:56 2016 by
103
+ Generated on Sun May 10 15:34:33 2020 by
106
104
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
107
- 0.8.7.6 (ruby-2.1.7).
105
+ 0.9.25 (ruby-2.7.1).
108
106
  </div>
109
107
 
110
108
  </div>
@@ -4,12 +4,12 @@ module Halation
4
4
 
5
5
  # @return [String, nil]
6
6
  def self.string(value)
7
- value &&= value.to_s
7
+ value && value.to_s
8
8
  end
9
9
 
10
10
  # @return [Integer, nil]
11
11
  def self.integer(value)
12
- value &&= value.to_i
12
+ value && value.to_i
13
13
  end
14
14
 
15
15
  # @return [Boolean]
@@ -17,5 +17,10 @@ module Halation
17
17
  !!value
18
18
  end
19
19
 
20
+ # @return [Date, nil]
21
+ def self.date(value)
22
+ value && Time.parse(value)
23
+ end
24
+
20
25
  end
21
26
  end
@@ -68,7 +68,7 @@ module Halation
68
68
  exif["Artist"] = @roll.artist || @config.artist
69
69
  exif["Copyright"] = @roll.copyright || @config.copyright
70
70
 
71
- date_created = Time.new(frame.date || @roll.date)
71
+ date_created = frame.date || @roll.date
72
72
  exif["DateTimeOriginal"] = date_created
73
73
  exif["CreateDate"] = date_created
74
74
 
@@ -9,7 +9,7 @@ module Halation
9
9
  attr_reader :artist
10
10
  # Copyright for the roll of film.
11
11
  attr_reader :copyright
12
- # Default date for all frames (optional).
12
+ # Default date for all frames in ISO 8601 format (optional).
13
13
  attr_reader :date
14
14
  # Tag of the cameara used.
15
15
  attr_reader :camera
@@ -42,7 +42,7 @@ module Halation
42
42
  YAML.load_file(file_path).tap do |roll|
43
43
  @artist = Coerce.string(roll["artist"])
44
44
  @copyright = Coerce.string(roll["copyright"])
45
- @date = Coerce.string(roll["date"])
45
+ @date = Coerce.date(roll["date"])
46
46
  @camera = Coerce.string(roll["camera"])
47
47
  @lens = Coerce.string(roll["lens"])
48
48
  @iso = Coerce.integer(roll["iso"])
@@ -6,7 +6,7 @@ module Halation
6
6
  class Frame
7
7
  # Frame number.
8
8
  attr_reader :number
9
- # Date the frame was taken.
9
+ # Date the frame was captured in ISO 8601 format.
10
10
  attr_reader :date
11
11
  # Tag of the lens used.
12
12
  attr_reader :lens
@@ -33,7 +33,7 @@ module Halation
33
33
 
34
34
  def initialize(yaml)
35
35
  @number = Coerce.integer(yaml["number"])
36
- @date = Coerce.string(yaml["date"])
36
+ @date = Coerce.date(yaml["date"])
37
37
  @lens = Coerce.string(yaml["lens"])
38
38
  @focal_length = Coerce.integer(yaml["focal_length"])
39
39
  @shutter = Coerce.string(yaml["shutter"])
@@ -1,4 +1,4 @@
1
1
  module Halation
2
2
  # Current version of Halation.
3
- VERSION = "0.2.0"
3
+ VERSION = "0.2.1"
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: halation
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alex McLain
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-05-28 00:00:00.000000000 Z
11
+ date: 2020-05-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mini_exiftool
@@ -16,7 +16,7 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '2.7'
19
+ version: '2.10'
20
20
  - - ">="
21
21
  - !ruby/object:Gem::Version
22
22
  version: 2.7.2
@@ -26,7 +26,7 @@ dependencies:
26
26
  requirements:
27
27
  - - "~>"
28
28
  - !ruby/object:Gem::Version
29
- version: '2.7'
29
+ version: '2.10'
30
30
  - - ">="
31
31
  - !ruby/object:Gem::Version
32
32
  version: 2.7.2
@@ -140,7 +140,6 @@ files:
140
140
  - README.md
141
141
  - bin/halation
142
142
  - doc/Halation.html
143
- - doc/Halation/AttrHelpers.html
144
143
  - doc/Halation/Coerce.html
145
144
  - doc/Halation/Config.html
146
145
  - doc/Halation/Config/Camera.html
@@ -195,10 +194,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
195
194
  - !ruby/object:Gem::Version
196
195
  version: '0'
197
196
  requirements: []
198
- rubyforge_project:
199
- rubygems_version: 2.6.4
197
+ rubygems_version: 3.1.3
200
198
  signing_key:
201
199
  specification_version: 4
202
200
  summary: Add Exif metadata to film photographs.
203
201
  test_files: []
204
- has_rdoc:
@@ -1,288 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8">
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
- <title>
7
- Module: Halation::AttrHelpers
8
-
9
- &mdash; Documentation by YARD 0.8.7.6
10
-
11
- </title>
12
-
13
- <link rel="stylesheet" href="../css/style.css" type="text/css" charset="utf-8" />
14
-
15
- <link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />
16
-
17
- <script type="text/javascript" charset="utf-8">
18
- pathId = "Halation::AttrHelpers";
19
- relpath = '../';
20
- </script>
21
-
22
-
23
- <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
24
-
25
- <script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
26
-
27
-
28
- </head>
29
- <body>
30
- <div class="nav_wrap">
31
- <iframe id="nav" src="../class_list.html"></iframe>
32
- <div id="resizer"></div>
33
- </div>
34
-
35
- <div id="main" tabindex="-1">
36
- <div id="header">
37
- <div id="menu">
38
-
39
- <a href="../_index.html">Index (A)</a> &raquo;
40
- <span class='title'><span class='object_link'><a href="../Halation.html" title="Halation (module)">Halation</a></span></span>
41
- &raquo;
42
- <span class="title">AttrHelpers</span>
43
-
44
- </div>
45
-
46
- <div id="search">
47
-
48
- <a class="full_list_link" id="class_list_link"
49
- href="../class_list.html">
50
-
51
- <svg width="24" height="24">
52
- <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
53
- <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
54
- <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
55
- </svg>
56
- </a>
57
-
58
- </div>
59
- <div class="clear"></div>
60
- </div>
61
-
62
- <iframe id="search_frame" src="../class_list.html"></iframe>
63
-
64
- <div id="content"><h1>Module: Halation::AttrHelpers
65
-
66
-
67
-
68
- </h1>
69
- <div class="box_info">
70
-
71
-
72
-
73
-
74
-
75
-
76
-
77
-
78
-
79
- <dl>
80
- <dt>Included in:</dt>
81
- <dd><span class='object_link'><a href="Config/Camera.html" title="Halation::Config::Camera (class)">Config::Camera</a></span>, <span class='object_link'><a href="Config/Lens.html" title="Halation::Config::Lens (class)">Config::Lens</a></span></dd>
82
- </dl>
83
-
84
-
85
-
86
- <dl>
87
- <dt>Defined in:</dt>
88
- <dd>lib/halation/attr_helpers.rb</dd>
89
- </dl>
90
-
91
- </div>
92
-
93
- <h2>Overview</h2><div class="docstring">
94
- <div class="discussion">
95
-
96
- <p>Class attr helpers. Extend this module to opt-in to its functionality.</p>
97
-
98
-
99
- </div>
100
- </div>
101
- <div class="tags">
102
-
103
-
104
- </div>
105
-
106
-
107
-
108
-
109
-
110
-
111
-
112
- <h2>
113
- Instance Method Summary
114
- <small><a href="#" class="summary_toggle">collapse</a></small>
115
- </h2>
116
-
117
- <ul class="summary">
118
-
119
- <li class="public ">
120
- <span class="summary_signature">
121
-
122
- <a href="#attr_reader_int_or_nil-instance_method" title="#attr_reader_int_or_nil (instance method)">#<strong>attr_reader_int_or_nil</strong>(*sym) &#x21d2; Integer<sup>?</sup> </a>
123
-
124
-
125
-
126
- </span>
127
-
128
-
129
-
130
-
131
-
132
-
133
-
134
-
135
-
136
- <span class="summary_desc"><div class='inline'></div></span>
137
-
138
- </li>
139
-
140
-
141
- <li class="public ">
142
- <span class="summary_signature">
143
-
144
- <a href="#attr_reader_str_or_nil-instance_method" title="#attr_reader_str_or_nil (instance method)">#<strong>attr_reader_str_or_nil</strong>(*sym) &#x21d2; String<sup>?</sup> </a>
145
-
146
-
147
-
148
- </span>
149
-
150
-
151
-
152
-
153
-
154
-
155
-
156
-
157
-
158
- <span class="summary_desc"><div class='inline'></div></span>
159
-
160
- </li>
161
-
162
-
163
- </ul>
164
-
165
-
166
-
167
-
168
- <div id="instance_method_details" class="method_details_list">
169
- <h2>Instance Method Details</h2>
170
-
171
-
172
- <div class="method_details first">
173
- <h3 class="signature first" id="attr_reader_int_or_nil-instance_method">
174
-
175
- #<strong>attr_reader_int_or_nil</strong>(*sym) &#x21d2; <tt>Integer</tt><sup>?</sup>
176
-
177
-
178
-
179
-
180
-
181
- </h3><div class="docstring">
182
- <div class="discussion">
183
-
184
-
185
- </div>
186
- </div>
187
- <div class="tags">
188
-
189
- <p class="tag_title">Returns:</p>
190
- <ul class="return">
191
-
192
- <li>
193
-
194
-
195
- <span class='type'>(<tt>Integer</tt>, <tt>nil</tt>)</span>
196
-
197
-
198
-
199
- </li>
200
-
201
- </ul>
202
-
203
- </div><table class="source_code">
204
- <tr>
205
- <td>
206
- <pre class="lines">
207
-
208
-
209
- 11
210
- 12
211
- 13</pre>
212
- </td>
213
- <td>
214
- <pre class="code"><span class="info file"># File 'lib/halation/attr_helpers.rb', line 11</span>
215
-
216
- <span class='kw'>def</span> <span class='id identifier rubyid_attr_reader_int_or_nil'>attr_reader_int_or_nil</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_sym'>sym</span><span class='rparen'>)</span>
217
- <span class='id identifier rubyid_with_instance_variables'>with_instance_variables</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_sym'>sym</span><span class='rparen'>)</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_value'>value</span><span class='op'>|</span> <span class='id identifier rubyid_value'>value</span> <span class='op'>&amp;&amp;=</span> <span class='id identifier rubyid_value'>value</span><span class='period'>.</span><span class='id identifier rubyid_to_i'>to_i</span> <span class='rbrace'>}</span>
218
- <span class='kw'>end</span></pre>
219
- </td>
220
- </tr>
221
- </table>
222
- </div>
223
-
224
- <div class="method_details ">
225
- <h3 class="signature " id="attr_reader_str_or_nil-instance_method">
226
-
227
- #<strong>attr_reader_str_or_nil</strong>(*sym) &#x21d2; <tt>String</tt><sup>?</sup>
228
-
229
-
230
-
231
-
232
-
233
- </h3><div class="docstring">
234
- <div class="discussion">
235
-
236
-
237
- </div>
238
- </div>
239
- <div class="tags">
240
-
241
- <p class="tag_title">Returns:</p>
242
- <ul class="return">
243
-
244
- <li>
245
-
246
-
247
- <span class='type'>(<tt>String</tt>, <tt>nil</tt>)</span>
248
-
249
-
250
-
251
- </li>
252
-
253
- </ul>
254
-
255
- </div><table class="source_code">
256
- <tr>
257
- <td>
258
- <pre class="lines">
259
-
260
-
261
- 6
262
- 7
263
- 8</pre>
264
- </td>
265
- <td>
266
- <pre class="code"><span class="info file"># File 'lib/halation/attr_helpers.rb', line 6</span>
267
-
268
- <span class='kw'>def</span> <span class='id identifier rubyid_attr_reader_str_or_nil'>attr_reader_str_or_nil</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_sym'>sym</span><span class='rparen'>)</span>
269
- <span class='id identifier rubyid_with_instance_variables'>with_instance_variables</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_sym'>sym</span><span class='rparen'>)</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_value'>value</span><span class='op'>|</span> <span class='id identifier rubyid_value'>value</span> <span class='op'>&amp;&amp;=</span> <span class='id identifier rubyid_value'>value</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span> <span class='rbrace'>}</span>
270
- <span class='kw'>end</span></pre>
271
- </td>
272
- </tr>
273
- </table>
274
- </div>
275
-
276
- </div>
277
-
278
- </div>
279
-
280
- <div id="footer">
281
- Generated on Thu May 5 23:51:49 2016 by
282
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
283
- 0.8.7.6 (ruby-2.1.7).
284
- </div>
285
-
286
- </div>
287
- </body>
288
- </html>