smart_tuple 0.1.0 → 0.1.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.
- data/MIT-LICENSE +20 -0
- data/README.html +4 -1
- data/README.md +4 -1
- data/Rakefile +51 -0
- data/VERSION.yml +1 -1
- data/smart_tuple.gemspec +7 -5
- data/spec/smart_tuple_spec.rb +3 -3
- metadata +21 -5
data/MIT-LICENSE
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright (c) 2010 Alex Fortuna
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.html
CHANGED
@@ -13,7 +13,8 @@
|
|
13
13
|
|
14
14
|
<h2 id="setup">Setup</h2>
|
15
15
|
|
16
|
-
<pre><code
|
16
|
+
<pre><code>$ gem sources --add http://rubygems.org
|
17
|
+
$ gem install smart_tuple
|
17
18
|
</code></pre>
|
18
19
|
|
19
20
|
<p>In your app's <code>config/environment.rb</code> do a:</p>
|
@@ -292,3 +293,5 @@ tup.args
|
|
292
293
|
<h2 id="feedback">Feedback</h2>
|
293
294
|
|
294
295
|
<p>Send bug reports, suggestions and criticisms through <a href="http://github.com/dadooda/smart_tuple">project's page on GitHub</a>.</p>
|
296
|
+
|
297
|
+
<p>Licensed under the MIT License.</p>
|
data/README.md
CHANGED
@@ -14,7 +14,8 @@ SmartTuple is suitable for use with Ruby on Rails (ActiveRecord) and other Ruby
|
|
14
14
|
Setup
|
15
15
|
-----
|
16
16
|
|
17
|
-
gem
|
17
|
+
$ gem sources --add http://rubygems.org
|
18
|
+
$ gem install smart_tuple
|
18
19
|
|
19
20
|
In your app's `config/environment.rb` do a:
|
20
21
|
|
@@ -276,3 +277,5 @@ Feedback
|
|
276
277
|
--------
|
277
278
|
|
278
279
|
Send bug reports, suggestions and criticisms through [project's page on GitHub](http://github.com/dadooda/smart_tuple).
|
280
|
+
|
281
|
+
Licensed under the MIT License.
|
data/Rakefile
ADDED
@@ -0,0 +1,51 @@
|
|
1
|
+
require "rake/rdoctask"
|
2
|
+
|
3
|
+
GEM_NAME = "smart_tuple"
|
4
|
+
|
5
|
+
begin
|
6
|
+
require "jeweler"
|
7
|
+
Jeweler::Tasks.new do |gem|
|
8
|
+
gem.name = GEM_NAME
|
9
|
+
gem.summary = "A Simple Yet Smart SQL Conditions Builder"
|
10
|
+
gem.description = "A Simple Yet Smart SQL Conditions Builder"
|
11
|
+
gem.email = "alex.r@askit.org"
|
12
|
+
gem.homepage = "http://github.com/dadooda/smart_tuple"
|
13
|
+
gem.authors = ["Alex Fortuna"]
|
14
|
+
gem.files = FileList[
|
15
|
+
"[A-Z]*",
|
16
|
+
"*.gemspec",
|
17
|
+
"generators/**/*",
|
18
|
+
"lib/**/*.rb",
|
19
|
+
"init.rb",
|
20
|
+
]
|
21
|
+
end
|
22
|
+
rescue LoadError
|
23
|
+
STDERR.puts "This gem requires Jeweler to be built"
|
24
|
+
end
|
25
|
+
|
26
|
+
desc "Rebuild gemspec and package"
|
27
|
+
task :rebuild => [:gemspec, :build]
|
28
|
+
|
29
|
+
desc "Push (publish) gem to RubyGems (aka Gemcutter)"
|
30
|
+
task :push => :rebuild do
|
31
|
+
# Yet found no way to ask Jeweler forge a complete version string for us.
|
32
|
+
vh = YAML.load(File.read("VERSION.yml"))
|
33
|
+
version = [vh[:major], vh[:minor], vh[:patch]].join(".")
|
34
|
+
pkgfile = File.join("pkg", [GEM_NAME, "-", version, ".gem"].to_s)
|
35
|
+
system("gem", "push", pkgfile)
|
36
|
+
end
|
37
|
+
|
38
|
+
desc "Compile README preview"
|
39
|
+
task :readme do
|
40
|
+
require "kramdown"
|
41
|
+
|
42
|
+
doc = Kramdown::Document.new(File.read "README.md")
|
43
|
+
|
44
|
+
fn = "README.html"
|
45
|
+
puts "Writing '#{fn}'..."
|
46
|
+
File.open(fn, "w") do |f|
|
47
|
+
f.write(File.read "dev/head.html")
|
48
|
+
f.write(doc.to_html)
|
49
|
+
end
|
50
|
+
puts ": ok"
|
51
|
+
end
|
data/VERSION.yml
CHANGED
data/smart_tuple.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{smart_tuple}
|
8
|
-
s.version = "0.1.
|
8
|
+
s.version = "0.1.1"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Alex Fortuna"]
|
12
|
-
s.date = %q{2010-
|
12
|
+
s.date = %q{2010-11-16}
|
13
13
|
s.description = %q{A Simple Yet Smart SQL Conditions Builder}
|
14
14
|
s.email = %q{alex.r@askit.org}
|
15
15
|
s.extra_rdoc_files = [
|
@@ -17,8 +17,10 @@ Gem::Specification.new do |s|
|
|
17
17
|
"README.md"
|
18
18
|
]
|
19
19
|
s.files = [
|
20
|
-
"
|
20
|
+
"MIT-LICENSE",
|
21
|
+
"README.html",
|
21
22
|
"README.md",
|
23
|
+
"Rakefile",
|
22
24
|
"VERSION.yml",
|
23
25
|
"init.rb",
|
24
26
|
"lib/smart_tuple.rb",
|
@@ -27,7 +29,7 @@ Gem::Specification.new do |s|
|
|
27
29
|
s.homepage = %q{http://github.com/dadooda/smart_tuple}
|
28
30
|
s.rdoc_options = ["--charset=UTF-8"]
|
29
31
|
s.require_paths = ["lib"]
|
30
|
-
s.rubygems_version = %q{1.3.
|
32
|
+
s.rubygems_version = %q{1.3.7}
|
31
33
|
s.summary = %q{A Simple Yet Smart SQL Conditions Builder}
|
32
34
|
s.test_files = [
|
33
35
|
"spec/spec_helper.rb",
|
@@ -38,7 +40,7 @@ Gem::Specification.new do |s|
|
|
38
40
|
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
39
41
|
s.specification_version = 3
|
40
42
|
|
41
|
-
if Gem::Version.new(Gem::
|
43
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
42
44
|
else
|
43
45
|
end
|
44
46
|
else
|
data/spec/smart_tuple_spec.rb
CHANGED
@@ -164,9 +164,9 @@ describe (klass = SmartTuple) do
|
|
164
164
|
|
165
165
|
#--------------------------------------- Method tests
|
166
166
|
|
167
|
-
# NOTE: Alphabetical order, except for #
|
167
|
+
# NOTE: Alphabetical order, except for #new.
|
168
168
|
|
169
|
-
describe "#
|
169
|
+
describe "#new" do
|
170
170
|
it "requires an argument" do
|
171
171
|
Proc.new do
|
172
172
|
klass.new
|
@@ -176,7 +176,7 @@ describe (klass = SmartTuple) do
|
|
176
176
|
klass.new(" AND ")
|
177
177
|
end.should_not raise_error
|
178
178
|
end
|
179
|
-
end # #
|
179
|
+
end # #new
|
180
180
|
|
181
181
|
describe "#+" do
|
182
182
|
it "returns a copy" do
|
metadata
CHANGED
@@ -1,7 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: smart_tuple
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
4
|
+
hash: 25
|
5
|
+
prerelease: false
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 1
|
9
|
+
- 1
|
10
|
+
version: 0.1.1
|
5
11
|
platform: ruby
|
6
12
|
authors:
|
7
13
|
- Alex Fortuna
|
@@ -9,7 +15,7 @@ autorequire:
|
|
9
15
|
bindir: bin
|
10
16
|
cert_chain: []
|
11
17
|
|
12
|
-
date: 2010-
|
18
|
+
date: 2010-11-16 00:00:00 +03:00
|
13
19
|
default_executable:
|
14
20
|
dependencies: []
|
15
21
|
|
@@ -23,12 +29,16 @@ extra_rdoc_files:
|
|
23
29
|
- README.html
|
24
30
|
- README.md
|
25
31
|
files:
|
32
|
+
- MIT-LICENSE
|
26
33
|
- README.html
|
27
34
|
- README.md
|
35
|
+
- Rakefile
|
28
36
|
- VERSION.yml
|
29
37
|
- init.rb
|
30
38
|
- lib/smart_tuple.rb
|
31
39
|
- smart_tuple.gemspec
|
40
|
+
- spec/spec_helper.rb
|
41
|
+
- spec/smart_tuple_spec.rb
|
32
42
|
has_rdoc: true
|
33
43
|
homepage: http://github.com/dadooda/smart_tuple
|
34
44
|
licenses: []
|
@@ -39,21 +49,27 @@ rdoc_options:
|
|
39
49
|
require_paths:
|
40
50
|
- lib
|
41
51
|
required_ruby_version: !ruby/object:Gem::Requirement
|
52
|
+
none: false
|
42
53
|
requirements:
|
43
54
|
- - ">="
|
44
55
|
- !ruby/object:Gem::Version
|
56
|
+
hash: 3
|
57
|
+
segments:
|
58
|
+
- 0
|
45
59
|
version: "0"
|
46
|
-
version:
|
47
60
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
61
|
+
none: false
|
48
62
|
requirements:
|
49
63
|
- - ">="
|
50
64
|
- !ruby/object:Gem::Version
|
65
|
+
hash: 3
|
66
|
+
segments:
|
67
|
+
- 0
|
51
68
|
version: "0"
|
52
|
-
version:
|
53
69
|
requirements: []
|
54
70
|
|
55
71
|
rubyforge_project:
|
56
|
-
rubygems_version: 1.3.
|
72
|
+
rubygems_version: 1.3.7
|
57
73
|
signing_key:
|
58
74
|
specification_version: 3
|
59
75
|
summary: A Simple Yet Smart SQL Conditions Builder
|