annotate-sequel 1.0.0.pre2 → 1.0.0.pre3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.rdoc +20 -17
- data/annotate-sequel.gemspec +1 -1
- data/bin/annotate +3 -1
- data/lib/annotate_sequel/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 545d296445a3fad58b153ede8c76b5c257424a9b
|
4
|
+
data.tar.gz: 48098e18043694db3ef384b2b3261f4b4cbdc73b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4e287d306670a14b652e0ba9c72d2e817e01afe17a6b1bb9b2baebdb0e5f3eb6bef46903649c3c23797723f01351c6d4a5ea9d582663f19259ff7286b21326e5
|
7
|
+
data.tar.gz: 7c6f5ac1c5597aad4dc005c7a2bc93418157b564c45d9caf1c4778de552b698c0b5e665fbdc64c55c8f8c751b66b3db486544dd5ef70aa8496904212e07bccc2
|
data/README.rdoc
CHANGED
@@ -6,34 +6,37 @@ A gem to annotate your Sequel models.
|
|
6
6
|
|
7
7
|
The schema comment looks like this:
|
8
8
|
|
9
|
-
#
|
10
|
-
#
|
11
|
-
# Table name:
|
12
|
-
#
|
13
|
-
# id
|
14
|
-
#
|
15
|
-
#
|
16
|
-
#
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
9
|
+
# Schema Info
|
10
|
+
#
|
11
|
+
# Table name: items
|
12
|
+
#
|
13
|
+
# id :integer, {:allow_null=>false, :default=>nil, :primary_key=>true, :db_type=>"integer", :ruby_default=>nil}
|
14
|
+
# name :string, {:allow_null=>true, :default=>nil, :primary_key=>false, :db_type=>"varchar(255)", :ruby_default=>nil}
|
15
|
+
# price :float, {:allow_null=>true, :default=>nil, :primary_key=>false, :db_type=>"double precision", :ruby_default=>nil}
|
16
|
+
#
|
17
|
+
|
18
|
+
DB.create_table :items do
|
19
|
+
primary_key :id
|
20
|
+
String :name
|
21
|
+
Float :price
|
22
|
+
end
|
23
|
+
|
24
|
+
class Item < Sequel::Model(:items)
|
25
|
+
end
|
23
26
|
|
24
27
|
== Install
|
25
28
|
|
26
29
|
For the `Gemfile`
|
27
30
|
|
28
|
-
gem 'annotate-sequel
|
31
|
+
$ gem 'annotate-sequel'
|
29
32
|
|
30
33
|
To install on your system
|
31
34
|
|
32
|
-
gem install annotate-sequel
|
35
|
+
$ gem install annotate-sequel
|
33
36
|
|
34
37
|
== Usage
|
35
38
|
|
36
|
-
|
39
|
+
$ annotate
|
37
40
|
|
38
41
|
== Contributing to annotate-sequel
|
39
42
|
|
data/annotate-sequel.gemspec
CHANGED
data/bin/annotate
CHANGED
@@ -1,16 +1,18 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
require 'rubygems'
|
3
|
+
require 'annotate-sequel'
|
3
4
|
begin
|
4
5
|
require 'bundler'
|
5
6
|
Bundler.setup
|
6
7
|
rescue Exception => e
|
8
|
+
puts e.backtrace
|
7
9
|
end
|
8
10
|
|
9
11
|
here = File.expand_path(File.dirname __FILE__)
|
10
12
|
$:<< "#{here}/../lib"
|
11
13
|
|
12
14
|
target = {
|
13
|
-
:klass => AnnotateSequel,
|
15
|
+
:klass => AnnotateSequel::Model,
|
14
16
|
:task => :do_annotations,
|
15
17
|
}
|
16
18
|
|