by_star 2.1.0.beta2 → 2.2.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +5 -4
- data/.travis.yml +35 -25
- data/CHANGELOG.md +21 -0
- data/Gemfile +25 -4
- data/MIT-LICENSE +20 -20
- data/{README.markdown → README.md} +414 -348
- data/Rakefile +18 -2
- data/UPGRADING +10 -0
- data/by_star.gemspec +32 -31
- data/cleaner.rb +24 -24
- data/lib/by_star.rb +15 -71
- data/lib/by_star/base.rb +53 -0
- data/lib/by_star/between.rb +80 -0
- data/lib/by_star/directional.rb +21 -0
- data/lib/by_star/kernel.rb +41 -0
- data/lib/by_star/normalization.rb +118 -0
- data/lib/by_star/orm/active_record/by_star.rb +52 -0
- data/lib/by_star/orm/mongoid/by_star.rb +59 -0
- data/lib/by_star/version.rb +3 -3
- data/spec/database.yml +15 -15
- data/spec/fixtures/active_record/models.rb +6 -13
- data/spec/fixtures/active_record/schema.rb +11 -36
- data/spec/fixtures/mongoid/models.rb +15 -65
- data/spec/fixtures/shared/seeds.rb +16 -35
- data/spec/integration/active_record/active_record_spec.rb +50 -0
- data/spec/integration/mongoid/mongoid_spec.rb +43 -0
- data/spec/integration/shared/by_calendar_month.rb +55 -0
- data/spec/integration/shared/by_day.rb +84 -0
- data/spec/integration/shared/by_direction.rb +55 -0
- data/spec/integration/shared/by_fortnight.rb +48 -0
- data/spec/integration/shared/by_month.rb +50 -0
- data/spec/integration/shared/by_quarter.rb +49 -0
- data/spec/integration/shared/by_week.rb +54 -0
- data/spec/integration/shared/by_weekend.rb +49 -0
- data/spec/integration/shared/by_year.rb +48 -0
- data/spec/integration/shared/offset_parameter.rb +31 -0
- data/spec/spec_helper.rb +29 -35
- data/spec/unit/kernel_time_spec.rb +57 -0
- data/spec/unit/normalization_spec.rb +255 -0
- metadata +131 -56
- data/Gemfile.lock +0 -94
- data/lib/by_star/by_day.rb +0 -34
- data/lib/by_star/by_direction.rb +0 -52
- data/lib/by_star/by_fortnight.rb +0 -58
- data/lib/by_star/by_month.rb +0 -47
- data/lib/by_star/by_quarter.rb +0 -32
- data/lib/by_star/by_week.rb +0 -32
- data/lib/by_star/by_weekend.rb +0 -20
- data/lib/by_star/by_year.rb +0 -62
- data/lib/by_star/instance_methods.rb +0 -13
- data/lib/by_star/time_ext.rb +0 -21
- data/lib/mongoid/by_star.rb +0 -83
- data/spec/by_star/active_record/active_record_spec.rb +0 -50
- data/spec/by_star/mongoid/mongoid_spec.rb +0 -44
- data/spec/by_star/shared/by_day.rb +0 -62
- data/spec/by_star/shared/by_direction.rb +0 -85
- data/spec/by_star/shared/by_fortnight.rb +0 -47
- data/spec/by_star/shared/by_month.rb +0 -109
- data/spec/by_star/shared/by_quarter.rb +0 -33
- data/spec/by_star/shared/by_week.rb +0 -41
- data/spec/by_star/shared/by_weekend.rb +0 -13
- data/spec/by_star/shared/by_year.rb +0 -54
- data/spec/time_ext_spec.rb +0 -10
data/spec/time_ext_spec.rb
DELETED
@@ -1,10 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
describe Time do
|
3
|
-
it "should work out the beginning of a weekend (Friday 3pm)" do
|
4
|
-
Time.now.beginning_of_weekend.strftime("%A %I:%M%p").should eql("Friday 03:00PM")
|
5
|
-
end
|
6
|
-
|
7
|
-
it "should work out the end of a weekend (Monday 3am)" do
|
8
|
-
Time.now.end_of_weekend.strftime("%A %I:%M%p").should eql("Monday 03:00AM")
|
9
|
-
end
|
10
|
-
end
|