duct_tape 0.1.2 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -28,34 +28,53 @@ end
28
28
  # Numeric#to_degrees
29
29
  #
30
30
  describe Numeric, "#to_degrees" do
31
- it "remains unchanged" do
32
- # TODO
31
+ it "should have the method defined" do
32
+ expect(Numeric.method_defined?(:to_degrees)).to be(true)
33
33
  end
34
+
35
+ pending "More tests"
34
36
  end
35
37
 
36
38
  #
37
39
  # Numeric#to_radians
38
40
  #
39
41
  describe Numeric, "#to_radians" do
40
- it "remains unchanged" do
41
- # TODO
42
+ it "should have the method defined" do
43
+ expect(Numeric.method_defined?(:to_radians)).to be(true)
42
44
  end
45
+
46
+ pending "More tests"
47
+ end
48
+
49
+ #
50
+ # Numeric#rank
51
+ #
52
+ describe Numeric, "#sqrt" do
53
+ it "should have the method defined" do
54
+ expect(Numeric.method_defined?(:sqrt)).to be(true)
55
+ end
56
+
57
+ pending "More tests"
43
58
  end
44
59
 
45
60
  #
46
61
  # Numeric#rank
47
62
  #
48
63
  describe Numeric, "#rank" do
49
- it "remains unchanged" do
50
- # TODO
64
+ it "should have the method defined" do
65
+ expect(Numeric.method_defined?(:rank)).to be(true)
51
66
  end
67
+
68
+ pending "More tests"
52
69
  end
53
70
 
54
71
  #
55
72
  # Numeric#percentage_of
56
73
  #
57
74
  describe Numeric, "#percentage_of" do
58
- it "remains unchanged" do
59
- # TODO
75
+ it "should have the method defined" do
76
+ expect(Numeric.method_defined?(:percentage_of)).to be(true)
60
77
  end
78
+
79
+ pending "More tests"
61
80
  end
@@ -4,16 +4,20 @@ require File.join(File.dirname(__FILE__), "..", "spec_helper.rb")
4
4
  # Object#deep_dup
5
5
  #
6
6
  describe Object, "#deep_dup" do
7
- it "remains unchanged" do
8
- # TODO
7
+ it "should have the method defined" do
8
+ expect(Object.method_defined?(:deep_dup)).to be(true)
9
9
  end
10
+
11
+ pending "More tests"
10
12
  end
11
13
 
12
14
  #
13
15
  # Object#just_my_methods
14
16
  #
15
17
  describe Object, "#just_my_methods" do
16
- it "remains unchanged" do
17
- # TODO
18
+ it "should have the method defined" do
19
+ expect(Object.method_defined?(:just_my_methods)).to be(true)
18
20
  end
21
+
22
+ pending "More tests"
19
23
  end
@@ -11,3 +11,95 @@ describe Pathname, ".which" do
11
11
  end
12
12
  end
13
13
  end
14
+
15
+ #
16
+ # Pathname.library
17
+ #
18
+ describe Pathname, ".library" do
19
+ it "should have the method defined" do
20
+ expect(Pathname.respond_to?(:library)).to be(true)
21
+ end
22
+
23
+ pending "More tests"
24
+ end
25
+
26
+ #
27
+ # Pathname.header
28
+ #
29
+ describe Pathname, ".header" do
30
+ it "should have the method defined" do
31
+ expect(Pathname.respond_to?(:header)).to be(true)
32
+ end
33
+
34
+ pending "More tests"
35
+ end
36
+
37
+ #
38
+ # Pathname.join
39
+ #
40
+ describe Pathname, ".join" do
41
+ it "should have the method defined" do
42
+ expect(Pathname.respond_to?(:join)).to be(true)
43
+ end
44
+
45
+ pending "More tests"
46
+ end
47
+
48
+ #
49
+ # Pathname#to_file
50
+ #
51
+ describe Pathname, "#to_file" do
52
+ it "should have the method defined" do
53
+ expect(Pathname.method_defined?(:to_file)).to be(true)
54
+ end
55
+
56
+ pending "More tests"
57
+ end
58
+
59
+ #
60
+ # Pathname#to_dir
61
+ #
62
+ describe Pathname, "#to_dir" do
63
+ it "should have the method defined" do
64
+ expect(Pathname.method_defined?(:to_dir)).to be(true)
65
+ end
66
+
67
+ pending "More tests"
68
+ end
69
+
70
+ #
71
+ # Pathname#exist?
72
+ #
73
+ describe Pathname, "#exist?" do
74
+ it "should have the method defined" do
75
+ expect(Pathname.method_defined?(:exist?)).to be(true)
76
+ end
77
+
78
+ pending "More tests"
79
+ end
80
+
81
+ #
82
+ # Pathname.form_name_list
83
+ #
84
+ describe Pathname, ".form_name_list" do
85
+ it "should have the method defined" do
86
+ method_name = :form_name_list
87
+ method_name = method_name.to_s if RUBY_VERSION < "1.9"
88
+ expect(Pathname.private_methods.include?(method_name)).to be(true)
89
+ end
90
+
91
+ pending "More tests"
92
+ end
93
+
94
+ #
95
+ # Pathname.do_search
96
+ #
97
+ describe Pathname, ".do_search" do
98
+ it "should have the method defined" do
99
+ method_name = :do_search
100
+ method_name = method_name.to_s if RUBY_VERSION < "1.9"
101
+ expect(Pathname.private_methods.include?(method_name)).to be(true)
102
+ end
103
+
104
+ pending "More tests"
105
+ end
@@ -4,7 +4,9 @@ require File.join(File.dirname(__FILE__), "..", "spec_helper.rb")
4
4
  # Range#chunk
5
5
  #
6
6
  describe Range, "#chunk" do
7
- it "remains unchanged" do
8
- # TODO
7
+ it "should have the method defined" do
8
+ expect(Range.method_defined?(:chunk)).to be(true)
9
9
  end
10
+
11
+ pending "More tests"
10
12
  end
@@ -4,7 +4,9 @@ require File.join(File.dirname(__FILE__), "..", "spec_helper.rb")
4
4
  # Regexp#invert
5
5
  #
6
6
  describe Regexp, "#invert" do
7
- it "remains unchanged" do
8
- # TODO
7
+ it "should have the method defined" do
8
+ expect(Regexp.method_defined?(:invert)).to be(true)
9
9
  end
10
+
11
+ pending "More tests"
10
12
  end
@@ -4,70 +4,97 @@ require File.join(File.dirname(__FILE__), "..", "spec_helper.rb")
4
4
  # String#uncolorize
5
5
  #
6
6
  describe String, "#uncolorize" do
7
- it "remains unchanged" do
8
- # TODO
7
+ it "should have the method defined" do
8
+ expect(String.method_defined?(:uncolorize)).to be(true)
9
9
  end
10
+
11
+ pending "More tests"
10
12
  end
11
13
 
12
14
  #
13
15
  # String#colorized?
14
16
  #
15
17
  describe String, "#colorized?" do
16
- it "remains unchanged" do
17
- # TODO
18
+ it "should have the method defined" do
19
+ expect(String.method_defined?(:colorized?)).to be(true)
18
20
  end
21
+
22
+ pending "More tests"
19
23
  end
20
24
 
21
25
  #
22
26
  # String#word_wrap
23
27
  #
24
28
  describe String, "#word_wrap" do
25
- it "remains unchanged" do
26
- # TODO
29
+ it "should have the method defined" do
30
+ expect(String.method_defined?(:word_wrap)).to be(true)
27
31
  end
32
+
33
+ pending "More tests"
28
34
  end
29
35
 
30
36
  #
31
37
  # String#word_wrap!
32
38
  #
33
39
  describe String, "#word_wrap!" do
34
- it "remains unchanged" do
35
- # TODO
40
+ it "should have the method defined" do
41
+ expect(String.method_defined?(:word_wrap!)).to be(true)
36
42
  end
43
+
44
+ pending "More tests"
37
45
  end
38
46
 
39
47
  #
40
48
  # String#chunk
41
49
  #
42
50
  describe String, "#chunk" do
43
- it "remains unchanged" do
44
- # TODO
51
+ it "should have the method defined" do
52
+ expect(String.method_defined?(:chunk)).to be(true)
45
53
  end
54
+
55
+ pending "More tests"
46
56
  end
47
57
 
48
58
  #
49
59
  # String#%
50
60
  #
51
61
  describe String, "#%" do
52
- it "remains unchanged" do
53
- # TODO
62
+ it "should have the method defined" do
63
+ expect(String.method_defined?(:%)).to be(true)
54
64
  end
65
+
66
+ pending "More tests"
55
67
  end
56
68
 
57
69
  #
58
70
  # String#to_date
59
71
  #
60
72
  describe String, "#to_date" do
61
- it "remains unchanged" do
62
- # TODO
73
+ it "should have the method defined" do
74
+ expect(String.method_defined?(:to_date)).to be(true)
63
75
  end
76
+
77
+ pending "More tests"
64
78
  end
65
79
 
66
80
  #
67
81
  # String#to_time
68
82
  #
69
83
  describe String, "#to_time" do
70
- it "remains unchanged" do
71
- # TODO
84
+ it "should have the method defined" do
85
+ expect(String.method_defined?(:to_time)).to be(true)
72
86
  end
87
+
88
+ pending "More tests"
89
+ end
90
+
91
+ #
92
+ # String#to_const
93
+ #
94
+ describe String, "#to_const" do
95
+ it "should have the method defined" do
96
+ expect(String.method_defined?(:to_const)).to be(true)
97
+ end
98
+
99
+ pending "More tests"
73
100
  end
@@ -4,7 +4,9 @@ require File.join(File.dirname(__FILE__), "..", "spec_helper.rb")
4
4
  # Symbol#<=>
5
5
  #
6
6
  describe Symbol, "#<=>" do
7
- it "remains unchanged" do
8
- # TODO
7
+ it "should have the method defined" do
8
+ expect(Symbol.method_defined?(:<=>)).to be(true)
9
9
  end
10
+
11
+ pending "More tests"
10
12
  end
@@ -4,16 +4,20 @@ require File.join(File.dirname(__FILE__), "..", "spec_helper.rb")
4
4
  # Time.duration
5
5
  #
6
6
  describe Time, ".duration" do
7
- it "remains unchanged" do
8
- # TODO
7
+ it "should have the method defined" do
8
+ expect(Time.respond_to?(:duration)).to be(true)
9
9
  end
10
+
11
+ pending "More tests"
10
12
  end
11
13
 
12
14
  #
13
15
  # Time#to_datetime
14
16
  #
15
17
  describe Time, "#to_datetime" do
16
- it "remains unchanged" do
17
- # TODO
18
+ it "should have the method defined" do
19
+ expect(Time.method_defined?(:to_datetime)).to be(true)
18
20
  end
21
+
22
+ pending "More tests"
19
23
  end
data/spec/ext/uri_spec.rb CHANGED
@@ -4,25 +4,42 @@ require File.join(File.dirname(__FILE__), "..", "spec_helper.rb")
4
4
  # URI::Generic#relative_path?
5
5
  #
6
6
  describe URI::Generic, "#relative_path?" do
7
- it "remains unchanged" do
8
- # TODO
7
+ it "should have the method defined" do
8
+ expect(URI::Generic.method_defined?(:relative_path?)).to be(true)
9
9
  end
10
+
11
+ pending "More tests"
10
12
  end
11
13
 
12
14
  #
13
15
  # URI::Generic#absolute_path?
14
16
  #
15
17
  describe URI::Generic, "#absolute_path?" do
16
- it "remains unchanged" do
17
- # TODO
18
+ it "should have the method defined" do
19
+ expect(URI::Generic.method_defined?(:absolute_path?)).to be(true)
18
20
  end
21
+
22
+ pending "More tests"
19
23
  end
20
24
 
21
25
  #
22
26
  # URI::Generic#relative_scheme?
23
27
  #
24
28
  describe URI::Generic, "#relative_scheme?" do
25
- it "remains unchanged" do
26
- # TODO
29
+ it "should have the method defined" do
30
+ expect(URI::Generic.method_defined?(:relative_scheme?)).to be(true)
27
31
  end
32
+
33
+ pending "More tests"
34
+ end
35
+
36
+ #
37
+ # URI::Generic#origin
38
+ #
39
+ describe URI::Generic, "#origin" do
40
+ it "should have the method defined" do
41
+ expect(URI::Generic.method_defined?(:origin)).to be(true)
42
+ end
43
+
44
+ pending "More tests"
28
45
  end
data/spec/spec_helper.rb CHANGED
@@ -1,5 +1,10 @@
1
1
  $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
2
2
  $LOAD_PATH.unshift(File.dirname(__FILE__))
3
+ if RUBY_VERSION >= "1.9"
4
+ require 'simplecov'
5
+ SimpleCov.start
6
+ end
7
+
3
8
  require 'rspec'
4
9
  require 'duct_tape'
5
10
 
metadata CHANGED
@@ -1,142 +1,125 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: duct_tape
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
5
- prerelease:
4
+ version: 0.2.0
6
5
  platform: ruby
7
6
  authors:
8
7
  - Tim Rodriguez
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2014-06-17 00:00:00.000000000 Z
11
+ date: 2014-06-21 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: facets
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ! '>='
17
+ - - '>='
20
18
  - !ruby/object:Gem::Version
21
19
  version: 2.9.3
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
29
26
  version: 2.9.3
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: backports
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
- - - ! '>='
31
+ - - '>='
36
32
  - !ruby/object:Gem::Version
37
33
  version: '0'
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: '0'
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: bundler
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'
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'
62
55
  - !ruby/object:Gem::Dependency
63
56
  name: yard
64
57
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
58
  requirements:
67
- - - ! '>='
59
+ - - '>='
68
60
  - !ruby/object:Gem::Version
69
61
  version: '0'
70
62
  type: :development
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
77
68
  version: '0'
78
69
  - !ruby/object:Gem::Dependency
79
70
  name: jeweler
80
71
  requirement: !ruby/object:Gem::Requirement
81
- none: false
82
72
  requirements:
83
- - - ! '>='
73
+ - - '>='
84
74
  - !ruby/object:Gem::Version
85
75
  version: '0'
86
76
  type: :development
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
93
82
  version: '0'
94
83
  - !ruby/object:Gem::Dependency
95
84
  name: rspec
96
85
  requirement: !ruby/object:Gem::Requirement
97
- none: false
98
86
  requirements:
99
- - - ! '>='
87
+ - - '>='
100
88
  - !ruby/object:Gem::Version
101
89
  version: '0'
102
90
  type: :development
103
91
  prerelease: false
104
92
  version_requirements: !ruby/object:Gem::Requirement
105
- none: false
106
93
  requirements:
107
- - - ! '>='
94
+ - - '>='
108
95
  - !ruby/object:Gem::Version
109
96
  version: '0'
110
97
  - !ruby/object:Gem::Dependency
111
98
  name: rake
112
99
  requirement: !ruby/object:Gem::Requirement
113
- none: false
114
100
  requirements:
115
- - - ! '>='
101
+ - - '>='
116
102
  - !ruby/object:Gem::Version
117
103
  version: '0'
118
104
  type: :development
119
105
  prerelease: false
120
106
  version_requirements: !ruby/object:Gem::Requirement
121
- none: false
122
107
  requirements:
123
- - - ! '>='
108
+ - - '>='
124
109
  - !ruby/object:Gem::Version
125
110
  version: '0'
126
111
  - !ruby/object:Gem::Dependency
127
112
  name: simplecov
128
113
  requirement: !ruby/object:Gem::Requirement
129
- none: false
130
114
  requirements:
131
- - - ! '>='
115
+ - - '>='
132
116
  - !ruby/object:Gem::Version
133
117
  version: '0'
134
118
  type: :development
135
119
  prerelease: false
136
120
  version_requirements: !ruby/object:Gem::Requirement
137
- none: false
138
121
  requirements:
139
- - - ! '>='
122
+ - - '>='
140
123
  - !ruby/object:Gem::Version
141
124
  version: '0'
142
125
  description: A general-purpose utility library for Ruby
@@ -149,6 +132,7 @@ extra_rdoc_files:
149
132
  - LICENSE
150
133
  - README.md
151
134
  files:
135
+ - .gitattributes
152
136
  - Gemfile
153
137
  - Gemfile.lock
154
138
  - LICENSE
@@ -163,6 +147,7 @@ files:
163
147
  - lib/algorithms/containers/priority_queue.rb
164
148
  - lib/duct_tape.rb
165
149
  - lib/duct_tape/autoassociative_array.rb
150
+ - lib/duct_tape/autoassociative_hash.rb
166
151
  - lib/ext/array.rb
167
152
  - lib/ext/boolean.rb
168
153
  - lib/ext/datetime.rb
@@ -182,6 +167,7 @@ files:
182
167
  - spec/algorithms/containers/heap_spec.rb
183
168
  - spec/algorithms/containers/priority_queue_spec.rb
184
169
  - spec/duct_tape/autoassociative_array_spec.rb
170
+ - spec/duct_tape/autoassociative_hash_spec.rb
185
171
  - spec/ext/array_spec.rb
186
172
  - spec/ext/boolean_spec.rb
187
173
  - spec/ext/datetime_spec.rb
@@ -202,26 +188,25 @@ files:
202
188
  homepage: http://github.com/twrodriguez/duct_tape
203
189
  licenses:
204
190
  - Simplified BSD
191
+ metadata: {}
205
192
  post_install_message:
206
193
  rdoc_options: []
207
194
  require_paths:
208
195
  - lib
209
196
  required_ruby_version: !ruby/object:Gem::Requirement
210
- none: false
211
197
  requirements:
212
- - - ! '>='
198
+ - - '>='
213
199
  - !ruby/object:Gem::Version
214
200
  version: 1.8.7
215
201
  required_rubygems_version: !ruby/object:Gem::Requirement
216
- none: false
217
202
  requirements:
218
- - - ! '>='
203
+ - - '>='
219
204
  - !ruby/object:Gem::Version
220
205
  version: '0'
221
206
  requirements: []
222
207
  rubyforge_project:
223
- rubygems_version: 1.8.23.2
208
+ rubygems_version: 2.1.11
224
209
  signing_key:
225
- specification_version: 3
210
+ specification_version: 4
226
211
  summary: A bunch of useful patches for core Ruby classes
227
212
  test_files: []