freshtrack 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +4 -0
- data/License.txt +20 -0
- data/Manifest.txt +37 -0
- data/README.txt +30 -0
- data/Rakefile +4 -0
- data/bin/freshtrack +23 -0
- data/config/hoe.rb +74 -0
- data/config/requirements.rb +17 -0
- data/lib/freshbooks/extensions/base_object.rb +31 -0
- data/lib/freshbooks/extensions/project.rb +58 -0
- data/lib/freshbooks/extensions/task.rb +50 -0
- data/lib/freshbooks/extensions/time_entry.rb +53 -0
- data/lib/freshbooks/extensions.rb +5 -0
- data/lib/freshtrack/core_ext/array.rb +11 -0
- data/lib/freshtrack/core_ext/numeric.rb +5 -0
- data/lib/freshtrack/core_ext/time.rb +3 -0
- data/lib/freshtrack/core_ext.rb +3 -0
- data/lib/freshtrack/version.rb +9 -0
- data/lib/freshtrack.rb +107 -0
- data/log/debug.log +0 -0
- data/script/destroy +14 -0
- data/script/generate +14 -0
- data/setup.rb +1585 -0
- data/spec/array_spec.rb +35 -0
- data/spec/base_object_spec.rb +51 -0
- data/spec/freshtrack_spec.rb +566 -0
- data/spec/numeric_spec.rb +21 -0
- data/spec/project_spec.rb +400 -0
- data/spec/spec.opts +3 -0
- data/spec/spec_helper.rb +24 -0
- data/spec/task_spec.rb +350 -0
- data/spec/time_entry_spec.rb +351 -0
- data/spec/time_spec.rb +37 -0
- data/tasks/deployment.rake +34 -0
- data/tasks/environment.rake +7 -0
- data/tasks/rspec.rake +21 -0
- data/tasks/website.rake +9 -0
- metadata +110 -0
data/spec/time_spec.rb
ADDED
@@ -0,0 +1,37 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/spec_helper.rb'
|
2
|
+
|
3
|
+
describe Time do
|
4
|
+
it 'should be convertible to date' do
|
5
|
+
Time.now.should respond_to(:to_date)
|
6
|
+
end
|
7
|
+
|
8
|
+
describe 'when converting to date' do
|
9
|
+
before :each do
|
10
|
+
@time = Time.now
|
11
|
+
@date = @time.to_date
|
12
|
+
end
|
13
|
+
|
14
|
+
it 'should return a date' do
|
15
|
+
@date.should be_kind_of(Date)
|
16
|
+
end
|
17
|
+
|
18
|
+
it 'should return an date with matching year' do
|
19
|
+
@date.year.should == @time.year
|
20
|
+
end
|
21
|
+
|
22
|
+
it 'should return a date with matching month' do
|
23
|
+
@date.month.should == @time.month
|
24
|
+
end
|
25
|
+
|
26
|
+
it 'should return a date with matching day' do
|
27
|
+
@date.day.should == @time.day
|
28
|
+
end
|
29
|
+
|
30
|
+
it 'should return the same date for two times on the same day' do
|
31
|
+
@time1 = Time.local(2008, 1, 25, 0, 0, 0)
|
32
|
+
@time2 = Time.local(2008, 1, 25, 23, 59, 59)
|
33
|
+
|
34
|
+
@time1.to_date.should == @time2.to_date
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
desc 'Release the website and new gem version'
|
2
|
+
task :deploy => [:check_version, :website, :release] do
|
3
|
+
puts "Remember to create SVN tag:"
|
4
|
+
puts "svn copy svn+ssh://#{rubyforge_username}@rubyforge.org/var/svn/#{PATH}/trunk " +
|
5
|
+
"svn+ssh://#{rubyforge_username}@rubyforge.org/var/svn/#{PATH}/tags/REL-#{VERS} "
|
6
|
+
puts "Suggested comment:"
|
7
|
+
puts "Tagging release #{CHANGES}"
|
8
|
+
end
|
9
|
+
|
10
|
+
desc 'Runs tasks website_generate and install_gem as a local deployment of the gem'
|
11
|
+
task :local_deploy => [:website_generate, :install_gem]
|
12
|
+
|
13
|
+
task :check_version do
|
14
|
+
unless ENV['VERSION']
|
15
|
+
puts 'Must pass a VERSION=x.y.z release version'
|
16
|
+
exit
|
17
|
+
end
|
18
|
+
unless ENV['VERSION'] == VERS
|
19
|
+
puts "Please update your version.rb to match the release version, currently #{VERS}"
|
20
|
+
exit
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
desc 'Install the package as a gem, without generating documentation(ri/rdoc)'
|
25
|
+
task :install_gem_no_doc => [:clean, :package] do
|
26
|
+
sh "#{'sudo ' unless Hoe::WINDOZE }gem install pkg/*.gem --no-rdoc --no-ri"
|
27
|
+
end
|
28
|
+
|
29
|
+
namespace :manifest do
|
30
|
+
desc 'Recreate Manifest.txt to include ALL files'
|
31
|
+
task :refresh do
|
32
|
+
`rake check_manifest | patch -p0 > Manifest.txt`
|
33
|
+
end
|
34
|
+
end
|
data/tasks/rspec.rake
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
begin
|
2
|
+
require 'spec'
|
3
|
+
rescue LoadError
|
4
|
+
require 'rubygems'
|
5
|
+
require 'spec'
|
6
|
+
end
|
7
|
+
begin
|
8
|
+
require 'spec/rake/spectask'
|
9
|
+
rescue LoadError
|
10
|
+
puts <<-EOS
|
11
|
+
To use rspec for testing you must install rspec gem:
|
12
|
+
gem install rspec
|
13
|
+
EOS
|
14
|
+
exit(0)
|
15
|
+
end
|
16
|
+
|
17
|
+
desc "Run the specs under spec/models"
|
18
|
+
Spec::Rake::SpecTask.new do |t|
|
19
|
+
t.spec_opts = ['--options', "spec/spec.opts"]
|
20
|
+
t.spec_files = FileList['spec/*_spec.rb']
|
21
|
+
end
|
data/tasks/website.rake
ADDED
metadata
ADDED
@@ -0,0 +1,110 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: freshtrack
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.2.0
|
5
|
+
platform: ""
|
6
|
+
authors:
|
7
|
+
- Yossef Mendelssohn
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
|
12
|
+
date: 2008-01-30 00:00:00 -06:00
|
13
|
+
default_executable:
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: freshbooks
|
17
|
+
version_requirement:
|
18
|
+
version_requirements: !ruby/object:Gem::Requirement
|
19
|
+
requirements:
|
20
|
+
- - ">="
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: 1.0.0
|
23
|
+
version:
|
24
|
+
- !ruby/object:Gem::Dependency
|
25
|
+
name: punch
|
26
|
+
version_requirement:
|
27
|
+
version_requirements: !ruby/object:Gem::Requirement
|
28
|
+
requirements:
|
29
|
+
- - ">="
|
30
|
+
- !ruby/object:Gem::Version
|
31
|
+
version: 0.0.1
|
32
|
+
version:
|
33
|
+
description: description of gem
|
34
|
+
email: ymendel@pobox.com
|
35
|
+
executables:
|
36
|
+
- freshtrack
|
37
|
+
extensions: []
|
38
|
+
|
39
|
+
extra_rdoc_files:
|
40
|
+
- History.txt
|
41
|
+
- License.txt
|
42
|
+
- Manifest.txt
|
43
|
+
- README.txt
|
44
|
+
files:
|
45
|
+
- History.txt
|
46
|
+
- License.txt
|
47
|
+
- Manifest.txt
|
48
|
+
- README.txt
|
49
|
+
- Rakefile
|
50
|
+
- bin/freshtrack
|
51
|
+
- config/hoe.rb
|
52
|
+
- config/requirements.rb
|
53
|
+
- lib/freshtrack.rb
|
54
|
+
- lib/freshtrack/version.rb
|
55
|
+
- lib/freshtrack/core_ext.rb
|
56
|
+
- lib/freshtrack/core_ext/array.rb
|
57
|
+
- lib/freshtrack/core_ext/numeric.rb
|
58
|
+
- lib/freshtrack/core_ext/time.rb
|
59
|
+
- lib/freshbooks/extensions.rb
|
60
|
+
- lib/freshbooks/extensions/base_object.rb
|
61
|
+
- lib/freshbooks/extensions/project.rb
|
62
|
+
- lib/freshbooks/extensions/task.rb
|
63
|
+
- lib/freshbooks/extensions/time_entry.rb
|
64
|
+
- log/debug.log
|
65
|
+
- script/destroy
|
66
|
+
- script/generate
|
67
|
+
- setup.rb
|
68
|
+
- spec/base_object_spec.rb
|
69
|
+
- spec/freshtrack_spec.rb
|
70
|
+
- spec/project_spec.rb
|
71
|
+
- spec/task_spec.rb
|
72
|
+
- spec/time_entry_spec.rb
|
73
|
+
- spec/array_spec.rb
|
74
|
+
- spec/numeric_spec.rb
|
75
|
+
- spec/time_spec.rb
|
76
|
+
- spec/spec.opts
|
77
|
+
- spec/spec_helper.rb
|
78
|
+
- tasks/deployment.rake
|
79
|
+
- tasks/environment.rake
|
80
|
+
- tasks/rspec.rake
|
81
|
+
- tasks/website.rake
|
82
|
+
has_rdoc: true
|
83
|
+
homepage: http://yomendel.rubyforge.org
|
84
|
+
post_install_message:
|
85
|
+
rdoc_options:
|
86
|
+
- --main
|
87
|
+
- README.txt
|
88
|
+
require_paths:
|
89
|
+
- lib
|
90
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
91
|
+
requirements:
|
92
|
+
- - ">="
|
93
|
+
- !ruby/object:Gem::Version
|
94
|
+
version: "0"
|
95
|
+
version:
|
96
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
97
|
+
requirements:
|
98
|
+
- - ">="
|
99
|
+
- !ruby/object:Gem::Version
|
100
|
+
version: "0"
|
101
|
+
version:
|
102
|
+
requirements: []
|
103
|
+
|
104
|
+
rubyforge_project: yomendel
|
105
|
+
rubygems_version: 0.9.5
|
106
|
+
signing_key:
|
107
|
+
specification_version: 2
|
108
|
+
summary: description of gem
|
109
|
+
test_files: []
|
110
|
+
|