ruby-seasons 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.0
1
+ 0.1.1
@@ -10,11 +10,11 @@ module RubySeasons
10
10
  def get_season(date)
11
11
  datetime = date.class == DateTime ? date : DateTime.parse(date.to_s)
12
12
  year = datetime.strftime('%Y')
13
- if (@@season_lookup_table[year][:spring_start]..@@season_lookup_table[year][:summer_start]).cover?(datetime)
13
+ if (season_lookup_table[year][:spring_start]..season_lookup_table[year][:summer_start]).cover?(datetime)
14
14
  'spring'
15
- elsif (@@season_lookup_table[year][:summer_start]..@@season_lookup_table[year][:autumn_start]).cover?(datetime)
15
+ elsif (season_lookup_table[year][:summer_start]..season_lookup_table[year][:autumn_start]).cover?(datetime)
16
16
  'summer'
17
- elsif (@@season_lookup_table[year][:autumn_start]..@@season_lookup_table[year][:winter_start]).cover?(datetime)
17
+ elsif (season_lookup_table[year][:autumn_start]..season_lookup_table[year][:winter_start]).cover?(datetime)
18
18
  'autumn'
19
19
  else
20
20
  'winter'
@@ -0,0 +1,66 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
+ # -*- encoding: utf-8 -*-
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = "ruby-seasons"
8
+ s.version = "0.1.1"
9
+
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
+ s.authors = ["Jules Copeland"]
12
+ s.date = "2013-02-13"
13
+ s.description = "Adds methods to Date and DateTime objects that returns the season as a string. Currently only accurately supports London from 1900-2100"
14
+ s.email = "jules@julescopeland.com"
15
+ s.extra_rdoc_files = [
16
+ "LICENSE.txt",
17
+ "README.rdoc"
18
+ ]
19
+ s.files = [
20
+ ".document",
21
+ ".rspec",
22
+ "Gemfile",
23
+ "Gemfile.lock",
24
+ "LICENSE.txt",
25
+ "README.rdoc",
26
+ "Rakefile",
27
+ "VERSION",
28
+ "lib/lookup_tables/london_seasons.csv",
29
+ "lib/ruby-seasons.rb",
30
+ "lib/ruby_seasons/ruby_seasons.rb",
31
+ "ruby-seasons.gemspec",
32
+ "spec/lib/ruby_seasons/ruby_seasons_spec.rb",
33
+ "spec/ruby-seasons_spec.rb",
34
+ "spec/spec_helper.rb"
35
+ ]
36
+ s.homepage = "http://github.com/julescopeland/ruby-seasons"
37
+ s.licenses = ["MIT"]
38
+ s.require_paths = ["lib"]
39
+ s.rubygems_version = "1.8.25"
40
+ s.summary = "Get the season name from a date or datetime object"
41
+
42
+ if s.respond_to? :specification_version then
43
+ s.specification_version = 3
44
+
45
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
46
+ s.add_development_dependency(%q<rspec>, ["~> 2.8.0"])
47
+ s.add_development_dependency(%q<rdoc>, ["~> 3.12"])
48
+ s.add_development_dependency(%q<bundler>, ["~> 1.2"])
49
+ s.add_development_dependency(%q<jeweler>, ["~> 1.8.4"])
50
+ s.add_development_dependency(%q<simplecov>, [">= 0"])
51
+ else
52
+ s.add_dependency(%q<rspec>, ["~> 2.8.0"])
53
+ s.add_dependency(%q<rdoc>, ["~> 3.12"])
54
+ s.add_dependency(%q<bundler>, ["~> 1.2"])
55
+ s.add_dependency(%q<jeweler>, ["~> 1.8.4"])
56
+ s.add_dependency(%q<simplecov>, [">= 0"])
57
+ end
58
+ else
59
+ s.add_dependency(%q<rspec>, ["~> 2.8.0"])
60
+ s.add_dependency(%q<rdoc>, ["~> 3.12"])
61
+ s.add_dependency(%q<bundler>, ["~> 1.2"])
62
+ s.add_dependency(%q<jeweler>, ["~> 1.8.4"])
63
+ s.add_dependency(%q<simplecov>, [">= 0"])
64
+ end
65
+ end
66
+
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-seasons
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -111,6 +111,7 @@ files:
111
111
  - lib/lookup_tables/london_seasons.csv
112
112
  - lib/ruby-seasons.rb
113
113
  - lib/ruby_seasons/ruby_seasons.rb
114
+ - ruby-seasons.gemspec
114
115
  - spec/lib/ruby_seasons/ruby_seasons_spec.rb
115
116
  - spec/ruby-seasons_spec.rb
116
117
  - spec/spec_helper.rb
@@ -129,7 +130,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
129
130
  version: '0'
130
131
  segments:
131
132
  - 0
132
- hash: -3729820967527438863
133
+ hash: 2461840683278543314
133
134
  required_rubygems_version: !ruby/object:Gem::Requirement
134
135
  none: false
135
136
  requirements: