birthday 0.2.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 0beab021ffb059d11117877106093599a92031bb
4
+ data.tar.gz: cc85206916ef94982552cf0601ca75857a10e348
5
+ SHA512:
6
+ metadata.gz: 0c4d919c36a8afc054bedba02461284794d4495df66984740bd37867eb1a1054f1264b6a8798a3376c9e3f8fbc020ac8c187565bd42e5672bca1c13836bd977b
7
+ data.tar.gz: da904bd18f6b327ddb98a21c6b02e0379e18ba9224eabfae48c36fddda54658e888f93b871775450f1b21ee0b5e811387fbd9688183908e0edff1e0c54daae91
@@ -1,13 +1,17 @@
1
1
  rvm:
2
- - 1.8.7 # (current default)
3
- - 1.9.2
2
+ - 1.9.3 # (current default)
3
+ - 2.0.0
4
+ branches:
5
+ only:
6
+ - master
7
+ - rails_4
4
8
  before_script:
5
9
  - "psql -c 'create database birthday_plugin_test;' -U postgres"
6
10
  - "mysql -e 'create database birthday_plugin_test;'"
7
- - "gem install rails -v 3.0.9"
8
- - "gem install rails -v 2.3.8"
11
+ - "gem install rails -v 3.2.14"
12
+ - "gem install rails -v 4.0.0"
9
13
  env:
10
- - DB=mysql RAILS=3.0.9
11
- - DB=postgres RAILS=3.0.9
12
- - DB=mysql RAILS=2.3.8
13
- - DB=postgres RAILS=2.3.8
14
+ - DB=mysql RAILS=4.0.0
15
+ - DB=postgres RAILS=4.0.0
16
+ - DB=mysql RAILS=3.2.14
17
+ - DB=postgres RAILS=3.2.14
data/README.md CHANGED
@@ -116,6 +116,25 @@ If you happen to write one of the adapters, don't hesitate to [make a pull reque
116
116
  * Commit, do not mess with Rakefile, version, or history.
117
117
  * Send me a pull request.
118
118
 
119
+ ## Changelog
120
+
121
+ * [v0.2.0](https://github.com/railslove/birthday/compare/v0.1.1...v0.2.0)
122
+ * added `*field*_today` scopes to quickly look up anniversaries for today (acts like `find_*field*s_for(Date.today)`)
123
+
124
+ * [v0.1.1](https://github.com/railslove/birthday/compare/v0.1.0...v0.1.1)
125
+ * fixed autoloading of `Adapter` class in Rails 2 environment
126
+ * updated README to include examples
127
+
128
+ * [v0.1.0](https://github.com/railslove/birthday/compare/v0.0.2...v0.1.0)
129
+ * big batch of refactoring (still no changes in availalbe methods)
130
+
131
+ * [v0.0.2](https://github.com/railslove/birthday/compare/v0.0.1...v0.0.2)
132
+ * moving custom adapter definition from `acts_as_birthday` method params to a separate scope
133
+ * first batch of refactoring (no changes in available methods)
134
+
135
+ * v0.0.1
136
+ * initial version
137
+
119
138
  ## Copyright
120
139
 
121
140
  Copyright (c) 2011 Railslove
@@ -28,13 +28,13 @@ module Railslove
28
28
  # person.created_at_today? => true/false
29
29
  def acts_as_birthday(*birthday_fields)
30
30
 
31
- scope_method = ActiveRecord::VERSION::MAJOR == 3 ? 'scope' : 'named_scope'
31
+ scope_method = ActiveRecord::VERSION::MAJOR >= 3 ? 'scope' : 'named_scope'
32
32
 
33
33
  birthday_fields.each do |field|
34
34
  self.send(scope_method, :"find_#{field.to_s.pluralize}_for", lambda{ |*scope_args|
35
35
  raise ArgumentError if scope_args.empty? or scope_args.size > 2
36
36
  date_start, date_end = *scope_args
37
- ::Railslove::Acts::Birthday::Adapter.adapter_for(self.connection).scope_hash(field, date_start, date_end)
37
+ where ::Railslove::Acts::Birthday::Adapter.adapter_for(self.connection).scope_hash(field, date_start, date_end)[:conditions]
38
38
  })
39
39
 
40
40
  self.send(scope_method, :"#{field.to_s}_today", lambda{ self.send(:"find_#{field.to_s.pluralize}_for", Date.today) })
@@ -1,7 +1,7 @@
1
1
  module Railslove
2
2
  module Acts
3
3
  module Birthday
4
- VERSION = "0.2.0"
4
+ VERSION = "0.3.0"
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,146 +1,135 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: birthday
3
- version: !ruby/object:Gem::Version
4
- hash: 23
5
- prerelease:
6
- segments:
7
- - 0
8
- - 2
9
- - 0
10
- version: 0.2.0
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.3.0
11
5
  platform: ruby
12
- authors:
13
- - "Mike Po\xC5\x82tyn"
6
+ authors:
7
+ - Mike Połtyn
14
8
  autorequire:
15
9
  bindir: bin
16
10
  cert_chain: []
17
-
18
- date: 2011-12-09 00:00:00 Z
19
- dependencies:
20
- - !ruby/object:Gem::Dependency
11
+ date: 2013-11-25 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
21
14
  name: rake
22
- prerelease: false
23
- requirement: &id001 !ruby/object:Gem::Requirement
24
- none: false
25
- requirements:
26
- - - ">="
27
- - !ruby/object:Gem::Version
28
- hash: 3
29
- segments:
30
- - 0
31
- version: "0"
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - '>='
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
32
20
  type: :development
33
- version_requirements: *id001
34
- - !ruby/object:Gem::Dependency
35
- name: rspec
36
21
  prerelease: false
37
- requirement: &id002 !ruby/object:Gem::Requirement
38
- none: false
39
- requirements:
40
- - - ">="
41
- - !ruby/object:Gem::Version
42
- hash: 3
43
- segments:
44
- - 0
45
- version: "0"
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - '>='
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rspec
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - '>='
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
46
34
  type: :development
47
- version_requirements: *id002
48
- - !ruby/object:Gem::Dependency
49
- name: mysql2
50
35
  prerelease: false
51
- requirement: &id003 !ruby/object:Gem::Requirement
52
- none: false
53
- requirements:
54
- - - "="
55
- - !ruby/object:Gem::Version
56
- hash: 31
57
- segments:
58
- - 0
59
- - 3
60
- - 6
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - '>='
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: mysql2
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - '='
46
+ - !ruby/object:Gem::Version
61
47
  version: 0.3.6
62
48
  type: :development
63
- version_requirements: *id003
64
- - !ruby/object:Gem::Dependency
65
- name: mysql
66
49
  prerelease: false
67
- requirement: &id004 !ruby/object:Gem::Requirement
68
- none: false
69
- requirements:
70
- - - ">="
71
- - !ruby/object:Gem::Version
72
- hash: 3
73
- segments:
74
- - 0
75
- version: "0"
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - '='
53
+ - !ruby/object:Gem::Version
54
+ version: 0.3.6
55
+ - !ruby/object:Gem::Dependency
56
+ name: mysql
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
76
62
  type: :development
77
- version_requirements: *id004
78
- - !ruby/object:Gem::Dependency
79
- name: delorean
80
63
  prerelease: false
81
- requirement: &id005 !ruby/object:Gem::Requirement
82
- none: false
83
- requirements:
84
- - - ">="
85
- - !ruby/object:Gem::Version
86
- hash: 3
87
- segments:
88
- - 0
89
- version: "0"
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - '>='
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: delorean
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - '>='
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
90
76
  type: :development
91
- version_requirements: *id005
92
- - !ruby/object:Gem::Dependency
93
- name: pg
94
77
  prerelease: false
95
- requirement: &id006 !ruby/object:Gem::Requirement
96
- none: false
97
- requirements:
98
- - - ">="
99
- - !ruby/object:Gem::Version
100
- hash: 3
101
- segments:
102
- - 0
103
- version: "0"
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - '>='
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: pg
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - '>='
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
104
90
  type: :development
105
- version_requirements: *id006
106
- - !ruby/object:Gem::Dependency
107
- name: activerecord
108
91
  prerelease: false
109
- requirement: &id007 !ruby/object:Gem::Requirement
110
- none: false
111
- requirements:
112
- - - ">="
113
- - !ruby/object:Gem::Version
114
- hash: 3
115
- segments:
116
- - 0
117
- version: "0"
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - '>='
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: activerecord
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - '>='
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
118
104
  type: :runtime
119
- version_requirements: *id007
120
- - !ruby/object:Gem::Dependency
121
- name: activesupport
122
105
  prerelease: false
123
- requirement: &id008 !ruby/object:Gem::Requirement
124
- none: false
125
- requirements:
126
- - - ">="
127
- - !ruby/object:Gem::Version
128
- hash: 3
129
- segments:
130
- - 0
131
- version: "0"
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - '>='
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ - !ruby/object:Gem::Dependency
112
+ name: activesupport
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - '>='
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
132
118
  type: :runtime
133
- version_requirements: *id008
134
- description: Birthday gem creates convienent methods for date and datetime fields in ActiveRecord, making it possible to look for birthdays without a hassle.
135
- email:
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - '>='
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
125
+ description: Birthday gem creates convienent methods for date and datetime fields
126
+ in ActiveRecord, making it possible to look for birthdays without a hassle.
127
+ email:
136
128
  - mike@railslove.com
137
129
  executables: []
138
-
139
130
  extensions: []
140
-
141
131
  extra_rdoc_files: []
142
-
143
- files:
132
+ files:
144
133
  - .gitignore
145
134
  - .rspec
146
135
  - .travis.yml
@@ -160,42 +149,31 @@ files:
160
149
  - spec/database.yml
161
150
  - spec/schema.rb
162
151
  - spec/spec_helper.rb
163
- homepage: ""
152
+ homepage: ''
164
153
  licenses: []
165
-
154
+ metadata: {}
166
155
  post_install_message:
167
156
  rdoc_options: []
168
-
169
- require_paths:
157
+ require_paths:
170
158
  - lib
171
- required_ruby_version: !ruby/object:Gem::Requirement
172
- none: false
173
- requirements:
174
- - - ">="
175
- - !ruby/object:Gem::Version
176
- hash: 3
177
- segments:
178
- - 0
179
- version: "0"
180
- required_rubygems_version: !ruby/object:Gem::Requirement
181
- none: false
182
- requirements:
183
- - - ">="
184
- - !ruby/object:Gem::Version
185
- hash: 3
186
- segments:
187
- - 0
188
- version: "0"
159
+ required_ruby_version: !ruby/object:Gem::Requirement
160
+ requirements:
161
+ - - '>='
162
+ - !ruby/object:Gem::Version
163
+ version: '0'
164
+ required_rubygems_version: !ruby/object:Gem::Requirement
165
+ requirements:
166
+ - - '>='
167
+ - !ruby/object:Gem::Version
168
+ version: '0'
189
169
  requirements: []
190
-
191
170
  rubyforge_project: birthday
192
- rubygems_version: 1.8.6
171
+ rubygems_version: 2.0.3
193
172
  signing_key:
194
- specification_version: 3
173
+ specification_version: 4
195
174
  summary: Birthday gem allows to tag date and datetime fields in ActiveRecord
196
- test_files:
175
+ test_files:
197
176
  - spec/birthday_spec.rb
198
177
  - spec/database.yml
199
178
  - spec/schema.rb
200
179
  - spec/spec_helper.rb
201
- has_rdoc: