iso_bsd-i18n 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.document +5 -0
- data/.gitignore +28 -0
- data/.rspec +1 -0
- data/.travis.yml +1 -0
- data/Gemfile +5 -0
- data/LICENSE.txt +20 -0
- data/README.md +40 -0
- data/Rakefile +41 -0
- data/iso_bsd-i18n.gemspec +31 -0
- data/lib/iso_bsd-i18n.rb +18 -0
- data/lib/iso_bsd-i18n/division.rb +58 -0
- data/lib/iso_bsd-i18n/iso_bsd-i18n_initializer.rb +7 -0
- data/lib/iso_bsd-i18n/rarity.rb +130 -0
- data/lib/iso_bsd-i18n/size.rb +244 -0
- data/lib/iso_bsd-i18n/version.rb +3 -0
- data/locales/en.yml +177 -0
- data/locales/es.yml +177 -0
- data/spec/division_spec.rb +28 -0
- data/spec/iso_bsd-i18n_spec.rb +8 -0
- data/spec/rarity_spec.rb +112 -0
- data/spec/size_spec.rb +54 -0
- data/spec/spec_helper.rb +12 -0
- metadata +138 -0
data/spec/size_spec.rb
ADDED
@@ -0,0 +1,54 @@
|
|
1
|
+
require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
|
2
|
+
|
3
|
+
require 'iso_bsd-i18n'
|
4
|
+
module IsoBsdI18n
|
5
|
+
describe Size do
|
6
|
+
|
7
|
+
it "should recognize known sizes" do
|
8
|
+
data_set = I18n.translate('isobsd.sizes')
|
9
|
+
s = data_set.first
|
10
|
+
Size.unknown?(s[0]).should == false
|
11
|
+
end
|
12
|
+
|
13
|
+
describe "a new size" do
|
14
|
+
it "should have integer representation of bsd" do
|
15
|
+
bsd = 100
|
16
|
+
s = Size.new(bsd)
|
17
|
+
s.to_i.should == bsd
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
describe "all" do
|
22
|
+
it "should be a collection" do
|
23
|
+
Size.all.class.should == SizeCollection
|
24
|
+
end
|
25
|
+
|
26
|
+
it "should contain Size elements in the collection" do
|
27
|
+
Size.all.first.class.should == Size
|
28
|
+
end
|
29
|
+
|
30
|
+
it "should have sizes with known attributes" do
|
31
|
+
size = Size.all.first
|
32
|
+
u_class = SizeUnknown.new(size.to_i).class
|
33
|
+
|
34
|
+
size.diameter.class.should_not == u_class
|
35
|
+
size.trad.class.should_not == u_class
|
36
|
+
size.app.class.should_not == u_class
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
describe "SizeCollection" do
|
41
|
+
before(:each) do
|
42
|
+
@collection = Size.all
|
43
|
+
end
|
44
|
+
describe "#hash_locale" do
|
45
|
+
it "should have as many top level elements as specified locales" do
|
46
|
+
n = 1
|
47
|
+
h = @collection.hash_locale([I18n::available_locales.first])
|
48
|
+
h.keys.count.should == n
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
end
|
54
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
2
|
+
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
3
|
+
require 'rspec'
|
4
|
+
require 'i18n-spec'
|
5
|
+
|
6
|
+
# Requires supporting files with custom matchers and macros, etc,
|
7
|
+
# in ./support/ and its subdirectories.
|
8
|
+
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
|
9
|
+
|
10
|
+
RSpec.configure do |config|
|
11
|
+
|
12
|
+
end
|
metadata
ADDED
@@ -0,0 +1,138 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: iso_bsd-i18n
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- William Wedler
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2012-11-09 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: rake
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - '>='
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - '>='
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rspec
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - '>='
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 1.3.0
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - '>='
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 1.3.0
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: i18n-spec
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - '>='
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: i18n
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - '>='
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: bundler
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ~>
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '1.2'
|
76
|
+
type: :runtime
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ~>
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '1.2'
|
83
|
+
description: Text describing bicycle wheel size information.
|
84
|
+
email: wedler.w@freeridepgh.org
|
85
|
+
executables: []
|
86
|
+
extensions: []
|
87
|
+
extra_rdoc_files:
|
88
|
+
- LICENSE.txt
|
89
|
+
- README.md
|
90
|
+
files:
|
91
|
+
- .document
|
92
|
+
- .gitignore
|
93
|
+
- .rspec
|
94
|
+
- .travis.yml
|
95
|
+
- Gemfile
|
96
|
+
- LICENSE.txt
|
97
|
+
- README.md
|
98
|
+
- Rakefile
|
99
|
+
- iso_bsd-i18n.gemspec
|
100
|
+
- lib/iso_bsd-i18n.rb
|
101
|
+
- lib/iso_bsd-i18n/division.rb
|
102
|
+
- lib/iso_bsd-i18n/iso_bsd-i18n_initializer.rb
|
103
|
+
- lib/iso_bsd-i18n/rarity.rb
|
104
|
+
- lib/iso_bsd-i18n/size.rb
|
105
|
+
- lib/iso_bsd-i18n/version.rb
|
106
|
+
- locales/en.yml
|
107
|
+
- locales/es.yml
|
108
|
+
- spec/division_spec.rb
|
109
|
+
- spec/iso_bsd-i18n_spec.rb
|
110
|
+
- spec/rarity_spec.rb
|
111
|
+
- spec/size_spec.rb
|
112
|
+
- spec/spec_helper.rb
|
113
|
+
homepage: http://freeridepg.org/
|
114
|
+
licenses:
|
115
|
+
- MIT
|
116
|
+
metadata: {}
|
117
|
+
post_install_message:
|
118
|
+
rdoc_options: []
|
119
|
+
require_paths:
|
120
|
+
- lib
|
121
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
122
|
+
requirements:
|
123
|
+
- - '>='
|
124
|
+
- !ruby/object:Gem::Version
|
125
|
+
version: '0'
|
126
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
127
|
+
requirements:
|
128
|
+
- - '>='
|
129
|
+
- !ruby/object:Gem::Version
|
130
|
+
version: '0'
|
131
|
+
requirements: []
|
132
|
+
rubyforge_project:
|
133
|
+
rubygems_version: 2.2.2
|
134
|
+
signing_key:
|
135
|
+
specification_version: 4
|
136
|
+
summary: Text describing bicycle wheel size information. The purpose of this information
|
137
|
+
is to assist in understanding and identifying a bicycle wheel size.
|
138
|
+
test_files: []
|