lazier 3.0.0 → 3.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -288,7 +288,7 @@
288
288
  </div>
289
289
 
290
290
  <div id="footer">
291
- Generated on Fri May 17 12:03:21 2013 by
291
+ Generated on Sun May 19 15:32:41 2013 by
292
292
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
293
293
  0.8.6.1 (ruby-1.9.3).
294
294
  </div>
@@ -1542,7 +1542,7 @@ Date.years(1, true, 2010, true)
1542
1542
  </div>
1543
1543
 
1544
1544
  <div id="footer">
1545
- Generated on Fri May 17 12:03:21 2013 by
1545
+ Generated on Sun May 19 15:32:41 2013 by
1546
1546
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
1547
1547
  0.8.6.1 (ruby-1.9.3).
1548
1548
  </div>
@@ -721,7 +721,7 @@ DateTime.civil(2013, 6, 1).in_months(2011)
721
721
  </div>
722
722
 
723
723
  <div id="footer">
724
- Generated on Fri May 17 12:03:21 2013 by
724
+ Generated on Sun May 19 15:32:41 2013 by
725
725
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
726
726
  0.8.6.1 (ruby-1.9.3).
727
727
  </div>
@@ -124,7 +124,7 @@
124
124
  </div>
125
125
 
126
126
  <div id="footer">
127
- Generated on Fri May 17 12:03:22 2013 by
127
+ Generated on Sun May 19 15:32:42 2013 by
128
128
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
129
129
  0.8.6.1 (ruby-1.9.3).
130
130
  </div>
@@ -238,7 +238,7 @@
238
238
  </div>
239
239
 
240
240
  <div id="footer">
241
- Generated on Fri May 17 12:03:22 2013 by
241
+ Generated on Sun May 19 15:32:42 2013 by
242
242
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
243
243
  0.8.6.1 (ruby-1.9.3).
244
244
  </div>
@@ -116,7 +116,7 @@
116
116
  </div>
117
117
 
118
118
  <div id="footer">
119
- Generated on Fri May 17 12:03:22 2013 by
119
+ Generated on Sun May 19 15:32:42 2013 by
120
120
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
121
121
  0.8.6.1 (ruby-1.9.3).
122
122
  </div>
data/doc/Lazier/Hash.html CHANGED
@@ -111,7 +111,7 @@
111
111
  </div>
112
112
 
113
113
  <div id="footer">
114
- Generated on Fri May 17 12:03:20 2013 by
114
+ Generated on Sun May 19 15:32:41 2013 by
115
115
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
116
116
  0.8.6.1 (ruby-1.9.3).
117
117
  </div>
data/doc/Lazier/I18n.html CHANGED
@@ -1056,7 +1056,7 @@
1056
1056
  </div>
1057
1057
 
1058
1058
  <div id="footer">
1059
- Generated on Fri May 17 12:03:20 2013 by
1059
+ Generated on Sun May 19 15:32:41 2013 by
1060
1060
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
1061
1061
  0.8.6.1 (ruby-1.9.3).
1062
1062
  </div>
@@ -536,7 +536,7 @@
536
536
  </div>
537
537
 
538
538
  <div id="footer">
539
- Generated on Fri May 17 12:03:22 2013 by
539
+ Generated on Sun May 19 15:32:42 2013 by
540
540
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
541
541
  0.8.6.1 (ruby-1.9.3).
542
542
  </div>
@@ -321,7 +321,7 @@
321
321
  </div>
322
322
 
323
323
  <div id="footer">
324
- Generated on Fri May 17 12:03:21 2013 by
324
+ Generated on Sun May 19 15:32:41 2013 by
325
325
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
326
326
  0.8.6.1 (ruby-1.9.3).
327
327
  </div>
data/doc/Lazier/Math.html CHANGED
@@ -121,7 +121,7 @@
121
121
  </div>
122
122
 
123
123
  <div id="footer">
124
- Generated on Fri May 17 12:03:20 2013 by
124
+ Generated on Sun May 19 15:32:41 2013 by
125
125
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
126
126
  0.8.6.1 (ruby-1.9.3).
127
127
  </div>
@@ -1871,7 +1871,7 @@
1871
1871
  <pre class="code"><span class="info file"># File 'lib/lazier/object.rb', line 117</span>
1872
1872
 
1873
1873
  <span class='kw'>def</span> <span class='id identifier rubyid_to_boolean'>to_boolean</span>
1874
- <span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>TrueClass</span><span class='rparen'>)</span> <span class='op'>||</span> <span class='kw'>self</span> <span class='op'>==</span> <span class='float'>1.0</span> <span class='op'>||</span> <span class='kw'>self</span> <span class='op'>==</span> <span class='int'>1</span> <span class='op'>||</span> <span class='id identifier rubyid_ensure_string'>ensure_string</span> <span class='op'>=~</span> <span class='op'>::</span><span class='const'>Lazier</span><span class='op'>::</span><span class='const'>Object</span><span class='op'>::</span><span class='const'>BOOLEAN_TRUE_MATCHER</span>
1874
+ <span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>TrueClass</span><span class='rparen'>)</span> <span class='op'>||</span> <span class='kw'>self</span> <span class='op'>==</span> <span class='float'>1.0</span> <span class='op'>||</span> <span class='kw'>self</span> <span class='op'>==</span> <span class='int'>1</span> <span class='op'>||</span> <span class='id identifier rubyid_ensure_string'>ensure_string</span> <span class='op'>=~</span> <span class='op'>::</span><span class='const'>Lazier</span><span class='op'>::</span><span class='const'>Object</span><span class='op'>::</span><span class='const'>BOOLEAN_TRUE_MATCHER</span> <span class='op'>||</span> <span class='kw'>false</span>
1875
1875
  <span class='kw'>end</span></pre>
1876
1876
  </td>
1877
1877
  </tr>
@@ -2039,7 +2039,7 @@
2039
2039
  </div>
2040
2040
 
2041
2041
  <div id="footer">
2042
- Generated on Fri May 17 12:03:21 2013 by
2042
+ Generated on Sun May 19 15:32:41 2013 by
2043
2043
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
2044
2044
  0.8.6.1 (ruby-1.9.3).
2045
2045
  </div>
@@ -213,7 +213,7 @@ Pathname.new("/usr/bin/ruby").components
213
213
  </div>
214
214
 
215
215
  <div id="footer">
216
- Generated on Fri May 17 12:03:22 2013 by
216
+ Generated on Sun May 19 15:32:42 2013 by
217
217
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
218
218
  0.8.6.1 (ruby-1.9.3).
219
219
  </div>
@@ -2405,7 +2405,7 @@
2405
2405
  </div>
2406
2406
 
2407
2407
  <div id="footer">
2408
- Generated on Fri May 17 12:03:22 2013 by
2408
+ Generated on Sun May 19 15:32:42 2013 by
2409
2409
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
2410
2410
  0.8.6.1 (ruby-1.9.3).
2411
2411
  </div>
@@ -460,7 +460,7 @@
460
460
  </div>
461
461
 
462
462
  <div id="footer">
463
- Generated on Fri May 17 12:03:21 2013 by
463
+ Generated on Sun May 19 15:32:41 2013 by
464
464
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
465
465
  0.8.6.1 (ruby-1.9.3).
466
466
  </div>
@@ -1015,7 +1015,7 @@ DateTime.parameterize_zone(ActiveSupport::TimeZone["Pacific Time (US &amp; Canad
1015
1015
  </div>
1016
1016
 
1017
1017
  <div id="footer">
1018
- Generated on Fri May 17 12:03:22 2013 by
1018
+ Generated on Sun May 19 15:32:42 2013 by
1019
1019
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
1020
1020
  0.8.6.1 (ruby-1.9.3).
1021
1021
  </div>
@@ -1663,7 +1663,7 @@
1663
1663
  </div>
1664
1664
 
1665
1665
  <div id="footer">
1666
- Generated on Fri May 17 12:03:22 2013 by
1666
+ Generated on Sun May 19 15:32:42 2013 by
1667
1667
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
1668
1668
  0.8.6.1 (ruby-1.9.3).
1669
1669
  </div>
@@ -149,7 +149,7 @@
149
149
 
150
150
  </div>
151
151
  </dt>
152
- <dd><pre class="code"><span class='int'>0</span></pre></dd>
152
+ <dd><pre class="code"><span class='int'>1</span></pre></dd>
153
153
 
154
154
  <dt id="STRING-constant" class="">STRING =
155
155
  <div class="docstring">
@@ -180,7 +180,7 @@
180
180
  </div>
181
181
 
182
182
  <div id="footer">
183
- Generated on Fri May 17 12:03:21 2013 by
183
+ Generated on Sun May 19 15:32:41 2013 by
184
184
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
185
185
  0.8.6.1 (ruby-1.9.3).
186
186
  </div>
data/doc/Lazier.html CHANGED
@@ -969,7 +969,7 @@ Licensed under the MIT license, which can be found at http://www.opensource.org/
969
969
  </div>
970
970
 
971
971
  <div id="footer">
972
- Generated on Fri May 17 12:03:20 2013 by
972
+ Generated on Sun May 19 15:32:41 2013 by
973
973
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
974
974
  0.8.6.1 (ruby-1.9.3).
975
975
  </div>
data/doc/_index.html CHANGED
@@ -326,7 +326,7 @@
326
326
  </div>
327
327
 
328
328
  <div id="footer">
329
- Generated on Fri May 17 12:03:20 2013 by
329
+ Generated on Sun May 19 15:32:40 2013 by
330
330
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
331
331
  0.8.6.1 (ruby-1.9.3).
332
332
  </div>
data/doc/file.README.html CHANGED
@@ -104,7 +104,7 @@ See documentation for more informations.</p>
104
104
  </div></div>
105
105
 
106
106
  <div id="footer">
107
- Generated on Fri May 17 12:03:20 2013 by
107
+ Generated on Sun May 19 15:32:40 2013 by
108
108
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
109
109
  0.8.6.1 (ruby-1.9.3).
110
110
  </div>
data/doc/index.html CHANGED
@@ -104,7 +104,7 @@ See documentation for more informations.</p>
104
104
  </div></div>
105
105
 
106
106
  <div id="footer">
107
- Generated on Fri May 17 12:03:20 2013 by
107
+ Generated on Sun May 19 15:32:40 2013 by
108
108
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
109
109
  0.8.6.1 (ruby-1.9.3).
110
110
  </div>
@@ -103,7 +103,7 @@
103
103
  </div>
104
104
 
105
105
  <div id="footer">
106
- Generated on Fri May 17 12:03:20 2013 by
106
+ Generated on Sun May 19 15:32:40 2013 by
107
107
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
108
108
  0.8.6.1 (ruby-1.9.3).
109
109
  </div>
data/lib/lazier/object.rb CHANGED
@@ -115,7 +115,7 @@ module Lazier
115
115
  #
116
116
  # @return [Boolean] The boolean representation of the object.
117
117
  def to_boolean
118
- is_a?(TrueClass) || self == 1.0 || self == 1 || ensure_string =~ ::Lazier::Object::BOOLEAN_TRUE_MATCHER
118
+ is_a?(TrueClass) || self == 1.0 || self == 1 || ensure_string =~ ::Lazier::Object::BOOLEAN_TRUE_MATCHER || false
119
119
  end
120
120
 
121
121
  # Converts the object to a integer.
@@ -16,7 +16,7 @@ module Lazier
16
16
  MINOR = 0
17
17
 
18
18
  # The patch version.
19
- PATCH = 0
19
+ PATCH = 1
20
20
 
21
21
  # The current version of lazier.
22
22
  STRING = [MAJOR, MINOR, PATCH].compact.join(".")
@@ -45,7 +45,6 @@ describe Lazier::DateTime do
45
45
  expect(::DateTime.months(false)).to be_a(::Array)
46
46
  expect(::DateTime.months(false)[6]).to eq({value: "07", label: "77"})
47
47
  end
48
-
49
48
  end
50
49
 
51
50
  describe ".years" do
@@ -293,8 +292,8 @@ describe Lazier::TimeZone do
293
292
  describe "#uses_dst?" do
294
293
  it "should correctly detect offset usage" do
295
294
  expect(reference_zone.uses_dst?).to be_true
296
- expect(reference_zone.uses_dst?(DateTime.civil(2012, 7, 15))).to be_true
297
- expect(reference_zone.uses_dst?(DateTime.civil(2012, 1, 15))).to be_false
295
+ expect(reference_zone.uses_dst?(::DateTime.civil(2012, 7, 15))).to be_true
296
+ expect(reference_zone.uses_dst?(::DateTime.civil(2012, 1, 15))).to be_false
298
297
  expect(reference_zone.uses_dst?(1000)).to be_false
299
298
  expect(zone_without_dst.uses_dst?).to be_false
300
299
  end
@@ -16,7 +16,7 @@ describe Lazier::I18n do
16
16
 
17
17
  before(:each) do
18
18
  ENV["LANG"] = "en"
19
- R18n::I18n.stub(:system_locale).and_return("en")
19
+ ::R18n::I18n.stub(:system_locale).and_return("en")
20
20
  end
21
21
 
22
22
  describe "#i18n_setup" do
@@ -41,42 +41,41 @@ describe Lazier::I18n do
41
41
  object.i18n = :en
42
42
  expect(object.instance_variable_get(:@i18n)).to eq("LOCALE")
43
43
  end
44
-
45
44
  end
46
45
 
47
46
  describe "#i18n_load_locale" do
48
47
  it "should set using system locale if called without arguments" do
49
48
  object.i18n_setup("lazier", root_path)
50
- R18n::I18n.should_receive(:new).with([ENV["LANG"]].compact.uniq, root_path).and_call_original
49
+ ::R18n::I18n.should_receive(:new).with([ENV["LANG"]].compact.uniq, root_path).and_call_original
51
50
  object.i18n = nil
52
51
  end
53
52
 
54
53
  it "should set the requested locale" do
55
54
  object.i18n_setup("lazier", root_path)
56
- R18n::I18n.should_receive(:new).with(["it", ENV["LANG"]].compact.uniq, root_path).and_call_original
55
+ ::R18n::I18n.should_receive(:new).with(["it", ENV["LANG"]].compact.uniq, root_path).and_call_original
57
56
  object.i18n = :it
58
57
  end
59
58
 
60
59
  it "should call the root" do
61
60
  Lazier.load!
62
- t = Object.new
61
+ t = ::Object.new
63
62
  object.i18n_setup("ROOT", root_path)
64
- R18n::I18n.any_instance.should_receive(:t).and_return(t)
63
+ ::R18n::I18n.any_instance.should_receive(:t).and_return(t)
65
64
  t.should_receive("ROOT")
66
65
  object.i18n = :it
67
66
  end
68
67
 
69
68
  it "should only pass valid translations" do
70
69
  object.i18n_setup("lazier", root_path)
71
- R18n::I18n.should_receive(:new).with([ENV["LANG"]].compact.uniq, root_path).and_call_original
70
+ ::R18n::I18n.should_receive(:new).with([ENV["LANG"]].compact.uniq, root_path).and_call_original
72
71
  object.i18n = "INVALID"
73
72
  end
74
73
 
75
74
  it "should raise an exception if no valid translation are found" do
76
75
  ENV["LANG"] = "INVALID"
77
- R18n::I18n.stub(:system_locale).and_return("INVALID")
76
+ ::R18n::I18n.stub(:system_locale).and_return("INVALID")
78
77
  object.i18n_setup("ROOT", "/dev/")
79
- expect { object.i18n = "INVALID" }.to raise_error(Lazier::Exceptions::MissingTranslation)
78
+ expect { object.i18n = "INVALID" }.to raise_error(::Lazier::Exceptions::MissingTranslation)
80
79
  end
81
80
  end
82
81
  end
@@ -11,19 +11,19 @@ describe Lazier::Localizer do
11
11
  it "should call i18n_setup and then i18n=" do
12
12
  ::Lazier::Localizer.any_instance.should_receive(:i18n_setup).with("ROOT", "PATH")
13
13
  ::Lazier::Localizer.any_instance.should_receive(:i18n=).with(:it)
14
- Lazier::Localizer.new("ROOT", "PATH", :it)
14
+ ::Lazier::Localizer.new("ROOT", "PATH", :it)
15
15
  end
16
16
 
17
17
  it "should setup default arguments" do
18
18
  ::Lazier::Localizer.any_instance.should_receive(:i18n_setup).with(:lazier, ::File.absolute_path(::Pathname.new(::File.dirname(__FILE__)).to_s + "/../../locales/"))
19
19
  ::Lazier::Localizer.any_instance.should_receive(:i18n=).with(nil)
20
- Lazier::Localizer.new
20
+ ::Lazier::Localizer.new
21
21
  end
22
22
  end
23
23
 
24
24
  describe ".localize" do
25
25
  it "should create a new localizer and forward the message" do
26
- obj = Object.new
26
+ obj = ::Object.new
27
27
  obj.should_receive(:string).with("ARGUMENT")
28
28
  ::Lazier::Localizer.should_receive(:new).and_call_original
29
29
  ::Lazier::Localizer.any_instance.should_receive(:i18n).and_return(obj)
@@ -33,7 +33,7 @@ describe Lazier::Localizer do
33
33
 
34
34
  describe ".localize" do
35
35
  it "should create a new localizer and forward the message" do
36
- obj = Object.new
36
+ obj = ::Object.new
37
37
  obj.should_receive(:string).with("ARGUMENT")
38
38
  ::Lazier::Localizer.should_receive(:new).with(nil, nil, :it).and_call_original
39
39
  ::Lazier::Localizer.any_instance.should_receive(:i18n).and_return(obj)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lazier
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0
4
+ version: 3.0.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-05-17 00:00:00.000000000 Z
12
+ date: 2013-05-19 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: json
@@ -188,7 +188,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
188
188
  version: '0'
189
189
  segments:
190
190
  - 0
191
- hash: -1367305075114908839
191
+ hash: -4341221469039409142
192
192
  requirements: []
193
193
  rubyforge_project: lazier
194
194
  rubygems_version: 1.8.25