lazier 3.3.3 → 3.3.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Gemfile +2 -2
- data/doc/Lazier.html +4 -4
- data/doc/Lazier/Boolean.html +3 -3
- data/doc/Lazier/Configuration.html +5 -5
- data/doc/Lazier/DateTime.html +3 -3
- data/doc/Lazier/DateTime/ClassMethods.html +3 -3
- data/doc/Lazier/Exceptions.html +3 -3
- data/doc/Lazier/Exceptions/Debug.html +3 -3
- data/doc/Lazier/Exceptions/MissingTranslation.html +4 -4
- data/doc/Lazier/Hash.html +3 -3
- data/doc/Lazier/I18n.html +21 -15
- data/doc/Lazier/Localizer.html +5 -5
- data/doc/Lazier/Math.html +3 -3
- data/doc/Lazier/Math/ClassMethods.html +3 -3
- data/doc/Lazier/Object.html +4 -4
- data/doc/Lazier/Pathname.html +3 -3
- data/doc/Lazier/Settings.html +8 -8
- data/doc/Lazier/String.html +3 -3
- data/doc/Lazier/TimeZone.html +6 -6
- data/doc/Lazier/TimeZone/ClassMethods.html +7 -7
- data/doc/Lazier/Version.html +4 -4
- data/doc/_index.html +4 -4
- data/doc/file.README.html +8 -8
- data/doc/frames.html +1 -1
- data/doc/index.html +8 -8
- data/doc/top-level-namespace.html +3 -3
- data/lib/lazier/i18n.rb +2 -1
- data/lib/lazier/localizer.rb +2 -2
- data/lib/lazier/version.rb +1 -1
- data/spec/coverage_helper.rb +2 -2
- data/spec/lazier/configuration_spec.rb +10 -6
- data/spec/lazier/localizer_spec.rb +2 -2
- metadata +11 -26
data/lib/lazier/version.rb
CHANGED
data/spec/coverage_helper.rb
CHANGED
@@ -8,7 +8,7 @@ require "pathname"
|
|
8
8
|
require "simplecov"
|
9
9
|
require "coveralls"
|
10
10
|
|
11
|
-
Coveralls.wear!
|
11
|
+
Coveralls.wear! if ENV["CI"] || ENV["JENKINS_URL"]
|
12
12
|
|
13
13
|
SimpleCov.start do
|
14
14
|
root = Pathname.new(File.dirname(__FILE__)) + ".."
|
@@ -17,4 +17,4 @@ SimpleCov.start do
|
|
17
17
|
path = Pathname.new(src_file.filename).relative_path_from(root).to_s
|
18
18
|
path !~ /^lib/
|
19
19
|
end
|
20
|
-
end
|
20
|
+
end
|
@@ -9,23 +9,27 @@ require "spec_helper"
|
|
9
9
|
describe Lazier::Configuration do
|
10
10
|
class ConfigurationSpecSample < ::Lazier::Configuration
|
11
11
|
property :readwrite, default: "1"
|
12
|
-
property :required,
|
12
|
+
property :required, required: true
|
13
13
|
property :readonly, default: "2", readonly: true
|
14
14
|
end
|
15
15
|
|
16
16
|
describe "#property" do
|
17
17
|
it "should correctly define property and get it defaults" do
|
18
|
-
expect(ConfigurationSpecSample.new.readwrite).to eq("1")
|
19
|
-
expect(ConfigurationSpecSample.new(readwrite: "3").readwrite).to eq("3")
|
20
|
-
expect(ConfigurationSpecSample.new.readonly).to eq("2")
|
21
|
-
expect(ConfigurationSpecSample.new(readonly: "4").readonly).to eq("4")
|
18
|
+
expect(ConfigurationSpecSample.new(required: 1).readwrite).to eq("1")
|
19
|
+
expect(ConfigurationSpecSample.new(required: 1, readwrite: "3").readwrite).to eq("3")
|
20
|
+
expect(ConfigurationSpecSample.new(required: 1).readonly).to eq("2")
|
21
|
+
expect(ConfigurationSpecSample.new(required: 1, readonly: "4").readonly).to eq("4")
|
22
22
|
end
|
23
23
|
|
24
24
|
it "should not allow writing readonly properties" do
|
25
|
-
reference = ConfigurationSpecSample.new
|
25
|
+
reference = ConfigurationSpecSample.new(required: 1)
|
26
26
|
|
27
27
|
expect { reference.readonly = "4" }.to raise_error(ArgumentError)
|
28
28
|
expect(reference.readonly).to eq("2")
|
29
29
|
end
|
30
|
+
|
31
|
+
it "should blow up for require properties" do
|
32
|
+
expect { ConfigurationSpecSample.new }.to raise_error(ArgumentError)
|
33
|
+
end
|
30
34
|
end
|
31
35
|
end
|
@@ -28,11 +28,11 @@ describe Lazier::Localizer do
|
|
28
28
|
|
29
29
|
expect(::Lazier::Localizer).to receive(:new).and_call_original
|
30
30
|
expect_any_instance_of(::Lazier::Localizer).to receive(:i18n).and_return(obj)
|
31
|
-
::Lazier::Localizer.
|
31
|
+
::Lazier::Localizer.localize(:string, "ARGUMENT")
|
32
32
|
end
|
33
33
|
end
|
34
34
|
|
35
|
-
describe ".
|
35
|
+
describe ".localize_on_locale" do
|
36
36
|
it "should create a new localizer and forward the message" do
|
37
37
|
obj = ::Object.new
|
38
38
|
expect(obj).to receive(:string).with("ARGUMENT")
|
metadata
CHANGED
@@ -1,20 +1,18 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lazier
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.3.
|
5
|
-
prerelease:
|
4
|
+
version: 3.3.5
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Shogun
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date: 2013-
|
11
|
+
date: 2013-08-03 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: json
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
17
|
- - ~>
|
20
18
|
- !ruby/object:Gem::Version
|
@@ -22,7 +20,6 @@ dependencies:
|
|
22
20
|
type: :runtime
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
24
|
- - ~>
|
28
25
|
- !ruby/object:Gem::Version
|
@@ -30,39 +27,34 @@ dependencies:
|
|
30
27
|
- !ruby/object:Gem::Dependency
|
31
28
|
name: actionpack
|
32
29
|
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
30
|
requirements:
|
35
|
-
- -
|
31
|
+
- - '>='
|
36
32
|
- !ruby/object:Gem::Version
|
37
33
|
version: 3.2.13
|
38
34
|
type: :runtime
|
39
35
|
prerelease: false
|
40
36
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
37
|
requirements:
|
43
|
-
- -
|
38
|
+
- - '>='
|
44
39
|
- !ruby/object:Gem::Version
|
45
40
|
version: 3.2.13
|
46
41
|
- !ruby/object:Gem::Dependency
|
47
42
|
name: tzinfo
|
48
43
|
requirement: !ruby/object:Gem::Requirement
|
49
|
-
none: false
|
50
44
|
requirements:
|
51
|
-
- -
|
45
|
+
- - '>='
|
52
46
|
- !ruby/object:Gem::Version
|
53
47
|
version: 0.3.37
|
54
48
|
type: :runtime
|
55
49
|
prerelease: false
|
56
50
|
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
none: false
|
58
51
|
requirements:
|
59
|
-
- -
|
52
|
+
- - '>='
|
60
53
|
- !ruby/object:Gem::Version
|
61
54
|
version: 0.3.37
|
62
55
|
- !ruby/object:Gem::Dependency
|
63
56
|
name: r18n-desktop
|
64
57
|
requirement: !ruby/object:Gem::Requirement
|
65
|
-
none: false
|
66
58
|
requirements:
|
67
59
|
- - ~>
|
68
60
|
- !ruby/object:Gem::Version
|
@@ -70,7 +62,6 @@ dependencies:
|
|
70
62
|
type: :runtime
|
71
63
|
prerelease: false
|
72
64
|
version_requirements: !ruby/object:Gem::Requirement
|
73
|
-
none: false
|
74
65
|
requirements:
|
75
66
|
- - ~>
|
76
67
|
- !ruby/object:Gem::Version
|
@@ -78,7 +69,6 @@ dependencies:
|
|
78
69
|
- !ruby/object:Gem::Dependency
|
79
70
|
name: hashie
|
80
71
|
requirement: !ruby/object:Gem::Requirement
|
81
|
-
none: false
|
82
72
|
requirements:
|
83
73
|
- - ~>
|
84
74
|
- !ruby/object:Gem::Version
|
@@ -86,7 +76,6 @@ dependencies:
|
|
86
76
|
type: :runtime
|
87
77
|
prerelease: false
|
88
78
|
version_requirements: !ruby/object:Gem::Requirement
|
89
|
-
none: false
|
90
79
|
requirements:
|
91
80
|
- - ~>
|
92
81
|
- !ruby/object:Gem::Version
|
@@ -173,30 +162,26 @@ files:
|
|
173
162
|
- spec/spec_helper.rb
|
174
163
|
homepage: http://sw.cow.tc/lazier
|
175
164
|
licenses: []
|
165
|
+
metadata: {}
|
176
166
|
post_install_message:
|
177
167
|
rdoc_options: []
|
178
168
|
require_paths:
|
179
169
|
- lib
|
180
170
|
required_ruby_version: !ruby/object:Gem::Requirement
|
181
|
-
none: false
|
182
171
|
requirements:
|
183
|
-
- -
|
172
|
+
- - '>='
|
184
173
|
- !ruby/object:Gem::Version
|
185
174
|
version: 1.9.3
|
186
175
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
187
|
-
none: false
|
188
176
|
requirements:
|
189
|
-
- -
|
177
|
+
- - '>='
|
190
178
|
- !ruby/object:Gem::Version
|
191
179
|
version: '0'
|
192
|
-
segments:
|
193
|
-
- 0
|
194
|
-
hash: -4400869267384068260
|
195
180
|
requirements: []
|
196
181
|
rubyforge_project: lazier
|
197
|
-
rubygems_version:
|
182
|
+
rubygems_version: 2.0.6
|
198
183
|
signing_key:
|
199
|
-
specification_version:
|
184
|
+
specification_version: 4
|
200
185
|
summary: Several Ruby object enhancements.
|
201
186
|
test_files:
|
202
187
|
- spec/coverage_helper.rb
|