by_star 0.6.3 → 0.6.4
Sign up to get free protection for your applications and to get access to all the features.
- data/README.markdown +92 -84
- data/VERSION +1 -1
- data/by_star.gemspec +3 -2
- data/cleaner.rb +25 -0
- data/lib/by_star.rb +3 -3
- data/lib/calculations.rb +1 -1
- data/lib/calculations/count.rb +1 -1
- data/lib/calculations/sum.rb +1 -1
- data/lib/range_calculations.rb +5 -5
- data/lib/shared.rb +1 -1
- data/lib/time_ext.rb +1 -1
- data/lib/vanilla.rb +26 -32
- data/spec/by_star_spec.rb +171 -140
- data/spec/fixtures/models.rb +2 -2
- data/spec/fixtures/schema.rb +7 -7
- metadata +4 -3
data/spec/fixtures/models.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
class Post < ActiveRecord::Base
|
2
2
|
default_scope :order => "#{quoted_table_name}.created_at ASC"
|
3
3
|
has_and_belongs_to_many :tags
|
4
|
-
|
4
|
+
|
5
5
|
def self.factory(text, created_at = nil)
|
6
6
|
create!(:text => text, :created_at => created_at)
|
7
7
|
end
|
@@ -23,7 +23,7 @@ class Invoice < ActiveRecord::Base
|
|
23
23
|
end
|
24
24
|
|
25
25
|
class DayEntry < ActiveRecord::Base
|
26
|
-
|
26
|
+
|
27
27
|
end
|
28
28
|
|
29
29
|
## seed data:
|
data/spec/fixtures/schema.rb
CHANGED
@@ -1,36 +1,36 @@
|
|
1
1
|
ActiveRecord::Schema.define do
|
2
2
|
self.verbose = false
|
3
|
-
|
3
|
+
|
4
4
|
create_table :invoices, :force => true do |t|
|
5
5
|
t.integer :value
|
6
6
|
t.integer :number
|
7
7
|
t.timestamps
|
8
8
|
end
|
9
|
-
|
9
|
+
|
10
10
|
create_table :posts, :force => true do |t|
|
11
11
|
t.string :text
|
12
12
|
t.timestamps
|
13
13
|
end
|
14
|
-
|
14
|
+
|
15
15
|
create_table :posts_tags, :force => true, :id => false do |t|
|
16
16
|
t.integer :post_id, :tag_id
|
17
17
|
end
|
18
|
-
|
18
|
+
|
19
19
|
create_table :tags, :force => true do |t|
|
20
20
|
t.string :name
|
21
21
|
t.timestamps
|
22
22
|
end
|
23
|
-
|
23
|
+
|
24
24
|
create_table :events, :force => true do |t|
|
25
25
|
t.datetime :start_time, :end_time
|
26
26
|
t.string :name
|
27
27
|
t.boolean :public, :default => true
|
28
28
|
end
|
29
|
-
|
29
|
+
|
30
30
|
create_table :day_entries, :force => true do |t|
|
31
31
|
t.references :invoice
|
32
32
|
t.datetime :spent_at
|
33
33
|
t.string :name
|
34
34
|
end
|
35
|
-
|
35
|
+
|
36
36
|
end
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 6
|
8
|
-
-
|
9
|
-
version: 0.6.
|
8
|
+
- 4
|
9
|
+
version: 0.6.4
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Ryan Bigg
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-03-
|
18
|
+
date: 2010-03-25 00:00:00 +00:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -59,6 +59,7 @@ files:
|
|
59
59
|
- Rakefile
|
60
60
|
- VERSION
|
61
61
|
- by_star.gemspec
|
62
|
+
- cleaner.rb
|
62
63
|
- init.rb
|
63
64
|
- lib/by_star.rb
|
64
65
|
- lib/calculations.rb
|