thorero 0.9.4 → 0.9.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,26 +0,0 @@
1
- require File.dirname(__FILE__) + '/spec_helper'
2
-
3
- describe Extlib::SimpleSet do
4
-
5
- before do
6
- @s = Extlib::SimpleSet.new("Foo")
7
- end
8
-
9
- it "should support <<" do
10
- @s << "Hello"
11
- @s.should be_include("Hello")
12
- end
13
-
14
- it "should support merge" do
15
- @s.should include("Foo")
16
- @t = @s.merge(["Bar"])
17
- @t.should be_kind_of(Extlib::SimpleSet)
18
- @t.should include("Foo")
19
- @t.should include("Bar")
20
- end
21
-
22
- it "should support inspect" do
23
- @s.inspect.should == "#<SimpleSet: {\"Foo\"}>"
24
- end
25
-
26
- end
@@ -1,8 +0,0 @@
1
-
2
- $TESTING=true
3
- require "rubygems"
4
- require "spec"
5
- require "yaml"
6
-
7
- require File.join(File.dirname(__FILE__), '..', 'lib', 'extlib')
8
-
@@ -1,200 +0,0 @@
1
- require File.expand_path(File.join(File.dirname(__FILE__), 'spec_helper'))
2
-
3
- describe String, "#to_const_string" do
4
- it "swaps slashes with ::" do
5
- "foo/bar".to_const_string.should == "Foo::Bar"
6
- end
7
-
8
- it "replaces snake_case with CamelCase" do
9
- "foo/bar/baz_bat".to_const_string.should == "Foo::Bar::BazBat"
10
- end
11
-
12
- it "leaves constant string as is" do
13
- "Merb::Test".to_const_string.should == "Merb::Test"
14
- end
15
- end
16
-
17
-
18
-
19
- describe String, "#to_const_path" do
20
- it "swaps :: with slash" do
21
- "Foo::Bar".to_const_path.should == "foo/bar"
22
- end
23
-
24
- it "snake_cases string" do
25
- "Merb::Test::ViewHelper".to_const_path.should == "merb/test/view_helper"
26
- end
27
-
28
- it "leaves slash-separated snake case string as is" do
29
- "merb/test/view_helper".to_const_path.should == "merb/test/view_helper"
30
- end
31
- end
32
-
33
-
34
-
35
- describe String, "#camel_case" do
36
- it "handles lowercase without underscore" do
37
- "merb".camel_case.should == "Merb"
38
- end
39
-
40
- it "handles lowercase with 1 underscore" do
41
- "merb_core".camel_case.should == "MerbCore"
42
- end
43
-
44
- it "handles lowercase with more than 1 underscore" do
45
- "so_you_want_contribute_to_merb_core".camel_case.should == "SoYouWantContributeToMerbCore"
46
- end
47
-
48
- it "handles lowercase with more than 1 underscore in a row" do
49
- "__python__is__like__this".camel_case.should == "PythonIsLikeThis"
50
- end
51
-
52
- it "handle first capital letter with underscores" do
53
- "Python__Is__Like__This".camel_case.should == "PythonIsLikeThis"
54
- end
55
-
56
- it "leaves CamelCase as is" do
57
- "TestController".camel_case.should == "TestController"
58
- end
59
- end
60
-
61
-
62
-
63
- describe String, "#snake_case" do
64
- it "lowercases one word CamelCase" do
65
- "Merb".snake_case.should == "merb"
66
- end
67
-
68
- it "makes one underscore snake_case two word CamelCase" do
69
- "MerbCore".snake_case.should == "merb_core"
70
- end
71
-
72
- it "handles CamelCase with more than 2 words" do
73
- "SoYouWantContributeToMerbCore".snake_case.should == "so_you_want_contribute_to_merb_core"
74
- end
75
-
76
- it "handles CamelCase with more than 2 capital letter in a row" do
77
- "CNN".snake_case.should == "cnn"
78
- "CNNNews".snake_case.should == "cnn_news"
79
- "HeadlineCNNNews".snake_case.should == "headline_cnn_news"
80
- end
81
-
82
- it "does NOT change one word lowercase" do
83
- "merb".snake_case.should == "merb"
84
- end
85
-
86
- it "leaves snake_case as is" do
87
- "merb_core".snake_case.should == "merb_core"
88
- end
89
- end
90
-
91
-
92
-
93
- describe String, "#escape_regexp" do
94
- it "escapes all * in a string" do
95
- "*and*".escape_regexp.should == "\\*and\\*"
96
- end
97
-
98
- it "escapes all ? in a string" do
99
- "?and?".escape_regexp.should == "\\?and\\?"
100
- end
101
-
102
- it "escapes all { in a string" do
103
- "{and{".escape_regexp.should == "\\{and\\{"
104
- end
105
-
106
- it "escapes all } in a string" do
107
- "}and}".escape_regexp.should == "\\}and\\}"
108
- end
109
-
110
- it "escapes all . in a string" do
111
- ".and.".escape_regexp.should == "\\.and\\."
112
- end
113
-
114
- it "escapes all regexp special characters used in a string" do
115
- "*?{}.".escape_regexp.should == "\\*\\?\\{\\}\\."
116
- end
117
- end
118
-
119
-
120
-
121
- describe String, "#unescape_regexp" do
122
- it "unescapes all \\* in a string" do
123
- "\\*and\\*".unescape_regexp.should == "*and*"
124
- end
125
-
126
- it "unescapes all \\? in a string" do
127
- "\\?and\\?".unescape_regexp.should == "?and?"
128
- end
129
-
130
- it "unescapes all \\{ in a string" do
131
- "\\{and\\{".unescape_regexp.should == "{and{"
132
- end
133
-
134
- it "unescapes all \\} in a string" do
135
- "\\}and\\}".unescape_regexp.should == "}and}"
136
- end
137
-
138
- it "unescapes all \\. in a string" do
139
- "\\.and\\.".unescape_regexp.should == ".and."
140
- end
141
-
142
- it "unescapes all regexp special characters used in a string" do
143
- "\\*\\?\\{\\}\\.".unescape_regexp.should == "*?{}."
144
- end
145
- end
146
-
147
-
148
-
149
- describe String, "#/" do
150
- it "concanates operands with File::SEPARATOR" do
151
- ("merb" / "core").should == "merb#{File::SEPARATOR}core"
152
- end
153
- end
154
-
155
-
156
- require 'rbconfig'
157
- describe String, "#relative_path_from" do
158
- it "uses other operand as base for path calculation" do
159
- site_dir = Config::CONFIG["sitedir"]
160
-
161
- two_levels_up = site_dir.split(File::SEPARATOR)
162
- 2.times { two_levels_up.pop } # remove two deepest directories
163
- two_levels_up = File::SEPARATOR + two_levels_up.join(File::SEPARATOR)
164
-
165
- two_levels_up.relative_path_from(site_dir).should == "../.."
166
- end
167
- end
168
-
169
-
170
- describe String, ".translate" do
171
- before(:each) do
172
- String.stub!(:translations).and_return({ "on snakes and rubies" => "a serpenti e rubini" })
173
- end
174
-
175
- it 'looks up for translation in translations dictionary' do
176
- String.translate("on snakes and rubies").should == "a serpenti e rubini"
177
- end
178
-
179
- it 'returns string that has no translations as it is' do
180
- String.translate("shapes").should == "shapes"
181
- String.translate("kalopsia").should == "kalopsia"
182
- String.translate("holding on to nothing").should == "holding on to nothing"
183
- end
184
- end
185
-
186
-
187
-
188
- describe String, ".translations" do
189
- before(:each) do
190
-
191
- end
192
-
193
- it 'returns empty hash by default' do
194
- String.translations.should == {}
195
- end
196
-
197
- it 'returns @translations if set' do
198
- pending "is it @translations on metaclass or @@translations? leaving it out for now"
199
- end
200
- end
@@ -1,12 +0,0 @@
1
- require File.expand_path(File.join(File.dirname(__FILE__), 'spec_helper'))
2
-
3
- describe Struct do
4
-
5
- it "should have attributes" do
6
-
7
- s = Struct.new(:name).new('bob')
8
- s.attributes.should == { :name => 'bob' }
9
-
10
- end
11
-
12
- end
@@ -1,16 +0,0 @@
1
- require File.dirname(__FILE__) + '/spec_helper'
2
- require 'json'
3
-
4
- describe Time, "#to_json" do
5
-
6
- before do
7
- @expected = "\"2008-03-28T22:54:20Z\""
8
- end
9
-
10
- it "should transform itself into a ISO 8601 compatible string" do
11
- Time.utc(2008, 3, 28, 22, 54, 20).to_json.should == @expected
12
- Time.xmlschema("2008-03-28T22:54:20Z").to_json.should == @expected
13
- Time.xmlschema("2008-03-28T17:54:20-05:00").to_json.should == @expected
14
- end
15
-
16
- end
@@ -1,21 +0,0 @@
1
- require File.expand_path(File.join(File.dirname(__FILE__), 'spec_helper'))
2
-
3
- describe VirtualFile do
4
- it 'inherits from StringIO' do
5
- VirtualFile.superclass.should == StringIO
6
- end
7
-
8
- it 'has path reader' do
9
- @vf = VirtualFile.new("virtual", "elvenpath")
10
-
11
- # =~ /#{Dir::tmpdir}/ causes RegExp to fail with nested *?+ on 1.8.6
12
- @vf.path.should == "elvenpath"
13
- end
14
-
15
- it 'has path writer' do
16
- @vf = VirtualFile.new("virtual", "elvenpath")
17
-
18
- @vf.path = "newbase"
19
- @vf.path.should == "newbase"
20
- end
21
- end
@@ -1,147 +0,0 @@
1
-
2
- # Gem::Specification for Thorero-0.9.4
3
- # Originally generated by Echoe
4
-
5
- --- !ruby/object:Gem::Specification
6
- name: thorero
7
- version: !ruby/object:Gem::Version
8
- version: 0.9.4
9
- platform: ruby
10
- authors:
11
- - Test Test
12
- autorequire:
13
- bindir: bin
14
-
15
- date: 2008-08-01 00:00:00 +03:00
16
- default_executable:
17
- dependencies:
18
- - !ruby/object:Gem::Dependency
19
- name: english
20
- type: :runtime
21
- version_requirement:
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - ">="
25
- - !ruby/object:Gem::Version
26
- version: 0.2.0
27
- version:
28
- - !ruby/object:Gem::Dependency
29
- name: echoe
30
- type: :development
31
- version_requirement:
32
- version_requirements: !ruby/object:Gem::Requirement
33
- requirements:
34
- - - ">="
35
- - !ruby/object:Gem::Version
36
- version: "0"
37
- version:
38
- description: Support Library for DataMapper and DataObjects
39
- email: test.test@gmail.com
40
- executables: []
41
-
42
- extensions: []
43
-
44
- extra_rdoc_files:
45
- - lib/extlib/assertions.rb
46
- - lib/extlib/blank.rb
47
- - lib/extlib/class.rb
48
- - lib/extlib/hash.rb
49
- - lib/extlib/hook.rb
50
- - lib/extlib/inflection.rb
51
- - lib/extlib/lazy_array.rb
52
- - lib/extlib/logger.rb
53
- - lib/extlib/mash.rb
54
- - lib/extlib/module.rb
55
- - lib/extlib/object.rb
56
- - lib/extlib/object_space.rb
57
- - lib/extlib/pathname.rb
58
- - lib/extlib/pooling.rb
59
- - lib/extlib/rubygems.rb
60
- - lib/extlib/simple_set.rb
61
- - lib/extlib/string.rb
62
- - lib/extlib/struct.rb
63
- - lib/extlib/tasks/release.rb
64
- - lib/extlib/time.rb
65
- - lib/extlib/version.rb
66
- - lib/extlib/virtual_file.rb
67
- - lib/extlib.rb
68
- - LICENSE
69
- - README.txt
70
- files:
71
- - History.txt
72
- - lib/extlib/assertions.rb
73
- - lib/extlib/blank.rb
74
- - lib/extlib/class.rb
75
- - lib/extlib/hash.rb
76
- - lib/extlib/hook.rb
77
- - lib/extlib/inflection.rb
78
- - lib/extlib/lazy_array.rb
79
- - lib/extlib/logger.rb
80
- - lib/extlib/mash.rb
81
- - lib/extlib/module.rb
82
- - lib/extlib/object.rb
83
- - lib/extlib/object_space.rb
84
- - lib/extlib/pathname.rb
85
- - lib/extlib/pooling.rb
86
- - lib/extlib/rubygems.rb
87
- - lib/extlib/simple_set.rb
88
- - lib/extlib/string.rb
89
- - lib/extlib/struct.rb
90
- - lib/extlib/tasks/release.rb
91
- - lib/extlib/time.rb
92
- - lib/extlib/version.rb
93
- - lib/extlib/virtual_file.rb
94
- - lib/extlib.rb
95
- - LICENSE
96
- - Manifest.txt
97
- - Rakefile
98
- - README.txt
99
- - spec/blank_spec.rb
100
- - spec/hash_spec.rb
101
- - spec/hook_spec.rb
102
- - spec/inflection_spec.rb
103
- - spec/lazy_array_spec.rb
104
- - spec/mash_spec.rb
105
- - spec/module_spec.rb
106
- - spec/object_space_spec.rb
107
- - spec/object_spec.rb
108
- - spec/pooling_spec.rb
109
- - spec/simple_set_spec.rb
110
- - spec/spec_helper.rb
111
- - spec/string_spec.rb
112
- - spec/struct_spec.rb
113
- - spec/time_spec.rb
114
- - spec/virtual_file_spec.rb
115
- - Manifest
116
- - thorero.gemspec
117
- has_rdoc: false
118
- homepage: http://thorero.rubyforge.org
119
- post_install_message:
120
- rdoc_options:
121
- - --line-numbers
122
- - --inline-source
123
- - --title
124
- - Thorero
125
- - --main
126
- - README.txt
127
- require_paths:
128
- - lib
129
- required_ruby_version: !ruby/object:Gem::Requirement
130
- requirements:
131
- - - ">="
132
- - !ruby/object:Gem::Version
133
- version: "0"
134
- version:
135
- required_rubygems_version: !ruby/object:Gem::Requirement
136
- requirements:
137
- - - "="
138
- - !ruby/object:Gem::Version
139
- version: "1.2"
140
- version:
141
- requirements: []
142
-
143
- rubyforge_project: thorero
144
- rubygems_version: 1.2.0
145
- specification_version: 2
146
- summary: Support Library for DataMapper and DataObjects
147
- test_files: []