recurrence 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore ADDED
@@ -0,0 +1,2 @@
1
+ *.gem
2
+ .bundle
data/.rspec ADDED
@@ -0,0 +1 @@
1
+ --color --format documentation
data/.rvmrc ADDED
@@ -0,0 +1 @@
1
+ rvm 1.9.2@base
data/Gemfile ADDED
@@ -0,0 +1,6 @@
1
+ source :rubygems
2
+
3
+ gem "rake"
4
+ gem "rspec", "2.0.0.beta.22"
5
+ gem "activesupport", :require => "active_support/all"
6
+ gem "i18n"
data/Gemfile.lock ADDED
@@ -0,0 +1,26 @@
1
+ GEM
2
+ remote: http://rubygems.org/
3
+ specs:
4
+ activesupport (3.0.0)
5
+ diff-lcs (1.1.2)
6
+ i18n (0.4.1)
7
+ rake (0.8.7)
8
+ rspec (2.0.0.beta.22)
9
+ rspec-core (= 2.0.0.beta.22)
10
+ rspec-expectations (= 2.0.0.beta.22)
11
+ rspec-mocks (= 2.0.0.beta.22)
12
+ rspec-core (2.0.0.beta.22)
13
+ rspec-expectations (2.0.0.beta.22)
14
+ diff-lcs (>= 1.1.2)
15
+ rspec-mocks (2.0.0.beta.22)
16
+ rspec-core (= 2.0.0.beta.22)
17
+ rspec-expectations (= 2.0.0.beta.22)
18
+
19
+ PLATFORMS
20
+ ruby
21
+
22
+ DEPENDENCIES
23
+ activesupport
24
+ i18n
25
+ rake
26
+ rspec (= 2.0.0.beta.22)
data/README.markdown CHANGED
@@ -87,7 +87,7 @@ USAGE:
87
87
  TROUBLESHOOTING
88
88
  ---------------
89
89
 
90
- If you're having problems because already have a class/module called Recurrence that is conflicting with this gem, you can require the namespace and inherit from the `SimplesIdeias::Recurrence` class.
90
+ If you're having problems because already have a class/module called Recurrence that is conflicting with this gem, you can require the namespace and create a class that inherits from `SimplesIdeias::Recurrence`.
91
91
 
92
92
  require "recurrence/namespace"
93
93
 
data/Rakefile CHANGED
@@ -1,28 +1,5 @@
1
- $LOAD_PATH.unshift File.dirname(__FILE__) + "/lib"
1
+ require "bundler"
2
+ Bundler::GemHelper.install_tasks
2
3
 
3
4
  require "rspec/core/rake_task"
4
- require "recurrence"
5
-
6
5
  RSpec::Core::RakeTask.new
7
-
8
- begin
9
- require "jeweler"
10
-
11
- JEWEL = Jeweler::Tasks.new do |gem|
12
- gem.name = "recurrence"
13
- gem.version = Recurrence::Version::STRING
14
- gem.summary = "A simple library to handle recurring events"
15
- gem.description = ""
16
- gem.authors = ["Nando Vieira"]
17
- gem.email = "fnando.vieira@gmail.com"
18
- gem.homepage = "http://github.com/fnando/recurrence"
19
- gem.has_rdoc = false
20
- gem.files = FileList["History.txt", "init.rb", "License.txt", "Rakefile", "README.markdown", "recurrence.gemspec", "{lib,spec}/**/*"]
21
- gem.add_development_dependency "rspec", ">= 2.0.0"
22
- gem.add_dependency "activesupport"
23
- end
24
-
25
- Jeweler::GemcutterTasks.new
26
- rescue LoadError => e
27
- puts "You don't have Jeweler installed, so you won't be able to build gems."
28
- end
@@ -25,7 +25,7 @@ module SimplesIdeias
25
25
  valid_month?(@options[:on].first)
26
26
  else
27
27
  valid_month_name?(@options[:on].first)
28
- @options[:on] = [ MONTHS[@options[:on].first.to_s], @options.last ]
28
+ @options[:on] = [MONTHS[@options[:on].first.to_s], @options[:on].last]
29
29
  end
30
30
  end
31
31
 
@@ -3,7 +3,7 @@ module SimplesIdeias
3
3
  module Version
4
4
  MAJOR = 0
5
5
  MINOR = 1
6
- PATCH = 3
6
+ PATCH = 4
7
7
  STRING = "#{MAJOR}.#{MINOR}.#{PATCH}"
8
8
  end
9
9
  end
data/recurrence.gemspec CHANGED
@@ -1,63 +1,24 @@
1
- # Generated by jeweler
2
- # DO NOT EDIT THIS FILE DIRECTLY
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
4
1
  # -*- encoding: utf-8 -*-
2
+ $:.push File.expand_path("../lib", __FILE__)
3
+ require "recurrence"
5
4
 
6
5
  Gem::Specification.new do |s|
7
- s.name = %q{recurrence}
8
- s.version = "0.1.3"
6
+ s.name = "recurrence"
7
+ s.version = Recurrence::Version::STRING
8
+ s.platform = Gem::Platform::RUBY
9
+ s.authors = ["Nando Vieira"]
10
+ s.email = ["fnando.vieira@gmail.com"]
11
+ s.homepage = "http://rubygems.org/gems/recurrence"
12
+ s.summary = "A simple library to handle recurring events"
13
+ s.description = "A simple library to handle recurring events"
9
14
 
10
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
- s.authors = ["Nando Vieira"]
12
- s.date = %q{2010-09-14}
13
- s.description = %q{}
14
- s.email = %q{fnando.vieira@gmail.com}
15
- s.extra_rdoc_files = [
16
- "README.markdown"
17
- ]
18
- s.files = [
19
- "History.txt",
20
- "License.txt",
21
- "README.markdown",
22
- "Rakefile",
23
- "init.rb",
24
- "lib/recurrence.rb",
25
- "lib/recurrence/event.rb",
26
- "lib/recurrence/event/base.rb",
27
- "lib/recurrence/event/daily.rb",
28
- "lib/recurrence/event/monthly.rb",
29
- "lib/recurrence/event/weekly.rb",
30
- "lib/recurrence/event/yearly.rb",
31
- "lib/recurrence/namespace.rb",
32
- "lib/recurrence/version.rb",
33
- "recurrence.gemspec",
34
- "spec/recurrence_spec.rb",
35
- "spec/spec_helper.rb"
36
- ]
37
- s.homepage = %q{http://github.com/fnando/recurrence}
38
- s.rdoc_options = ["--charset=UTF-8"]
39
- s.require_paths = ["lib"]
40
- s.rubygems_version = %q{1.3.7}
41
- s.summary = %q{A simple library to handle recurring events}
42
- s.test_files = [
43
- "spec/recurrence_spec.rb",
44
- "spec/spec_helper.rb"
45
- ]
15
+ s.rubyforge_project = "recurrence"
46
16
 
47
- if s.respond_to? :specification_version then
48
- current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
49
- s.specification_version = 3
17
+ s.files = `git ls-files`.split("\n")
18
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
19
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
20
+ s.require_paths = ["lib"]
50
21
 
51
- if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
52
- s.add_development_dependency(%q<rspec>, [">= 2.0.0"])
53
- s.add_runtime_dependency(%q<activesupport>, [">= 0"])
54
- else
55
- s.add_dependency(%q<rspec>, [">= 2.0.0"])
56
- s.add_dependency(%q<activesupport>, [">= 0"])
57
- end
58
- else
59
- s.add_dependency(%q<rspec>, [">= 2.0.0"])
60
- s.add_dependency(%q<activesupport>, [">= 0"])
61
- end
22
+ s.add_dependency "activesupport"
23
+ s.add_development_dependency "rspec-rails", ">= 2.0.0"
62
24
  end
63
-
@@ -511,6 +511,14 @@ describe "recurrence" do
511
511
  @events.size.should == 3
512
512
  @events[-1].to_s.should == "2009-01-08"
513
513
  end
514
+
515
+ context "bug fixes" do
516
+ specify "using name as symbol [http://github.com/fnando/recurrence/issues#issue/3]" do
517
+ expect {
518
+ @recurrence = recurrence(:every => :year, :on => [:jan, 31])
519
+ }.to_not raise_error
520
+ end
521
+ end
514
522
  end
515
523
 
516
524
  private
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 1
8
- - 3
9
- version: 0.1.3
8
+ - 4
9
+ version: 0.1.4
10
10
  platform: ruby
11
11
  authors:
12
12
  - Nando Vieira
@@ -14,11 +14,11 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-09-14 00:00:00 -03:00
17
+ date: 2010-10-19 00:00:00 -02:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
- name: rspec
21
+ name: activesupport
22
22
  prerelease: false
23
23
  requirement: &id001 !ruby/object:Gem::Requirement
24
24
  none: false
@@ -26,14 +26,12 @@ dependencies:
26
26
  - - ">="
27
27
  - !ruby/object:Gem::Version
28
28
  segments:
29
- - 2
30
- - 0
31
29
  - 0
32
- version: 2.0.0
33
- type: :development
30
+ version: "0"
31
+ type: :runtime
34
32
  version_requirements: *id001
35
33
  - !ruby/object:Gem::Dependency
36
- name: activesupport
34
+ name: rspec-rails
37
35
  prerelease: false
38
36
  requirement: &id002 !ruby/object:Gem::Requirement
39
37
  none: false
@@ -41,19 +39,27 @@ dependencies:
41
39
  - - ">="
42
40
  - !ruby/object:Gem::Version
43
41
  segments:
42
+ - 2
44
43
  - 0
45
- version: "0"
46
- type: :runtime
44
+ - 0
45
+ version: 2.0.0
46
+ type: :development
47
47
  version_requirements: *id002
48
- description: ""
49
- email: fnando.vieira@gmail.com
48
+ description: A simple library to handle recurring events
49
+ email:
50
+ - fnando.vieira@gmail.com
50
51
  executables: []
51
52
 
52
53
  extensions: []
53
54
 
54
- extra_rdoc_files:
55
- - README.markdown
55
+ extra_rdoc_files: []
56
+
56
57
  files:
58
+ - .gitignore
59
+ - .rspec
60
+ - .rvmrc
61
+ - Gemfile
62
+ - Gemfile.lock
57
63
  - History.txt
58
64
  - License.txt
59
65
  - README.markdown
@@ -72,12 +78,12 @@ files:
72
78
  - spec/recurrence_spec.rb
73
79
  - spec/spec_helper.rb
74
80
  has_rdoc: true
75
- homepage: http://github.com/fnando/recurrence
81
+ homepage: http://rubygems.org/gems/recurrence
76
82
  licenses: []
77
83
 
78
84
  post_install_message:
79
- rdoc_options:
80
- - --charset=UTF-8
85
+ rdoc_options: []
86
+
81
87
  require_paths:
82
88
  - lib
83
89
  required_ruby_version: !ruby/object:Gem::Requirement
@@ -98,7 +104,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
98
104
  version: "0"
99
105
  requirements: []
100
106
 
101
- rubyforge_project:
107
+ rubyforge_project: recurrence
102
108
  rubygems_version: 1.3.7
103
109
  signing_key:
104
110
  specification_version: 3