never_wastes 0.0.6 → 0.0.7

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: 1e0cc58ce583493943546b8be381efee31dd739f
4
+ data.tar.gz: 39ed990d9e2afe0b9736a310bc5f8081fe61e434
5
+ SHA512:
6
+ metadata.gz: f14b5a37fcb42b11bb6dc13a96a15fb2804f4c4b9010797e48c649bf5c7c7d6a41fbf439af7519e903aacf3675e541f728dbbe8c39204be86b8aed1080dd085e
7
+ data.tar.gz: e25fc6d3963feba0e963f96318dc8563e93af1ff4589bdcd91e586076c03c1e6ec015c8e785596e316ef85fae966afcc9cccf02e39d4ebdcd260036c96d20c1a
data/README.md CHANGED
@@ -51,12 +51,12 @@ If you need to get models with deleted ones, you can use with_deleted.
51
51
 
52
52
  models = YourModel.with_deleted.all
53
53
 
54
- In your destroy callbacks, you can use softly_destroying? to check if you are in soft delete or hard delete.
54
+ In your destroy callbacks, you can use destroying_softly? to check if you are in soft delete or hard delete.
55
55
 
56
56
  after_destroy :delete_files
57
57
  private
58
58
  def delete_files
59
- return if sortly_destroying?
59
+ return if destroying_softly?
60
60
  # delete files associated with the model object
61
61
  end
62
62
 
@@ -1,3 +1,4 @@
1
+ require 'active_record'
1
2
  require "never_wastes/version"
2
3
 
3
4
  module NeverWastes
@@ -1,3 +1,3 @@
1
1
  module NeverWastes
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.7"
3
3
  end
@@ -18,16 +18,13 @@ Gem::Specification.new do |s|
18
18
  s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
19
19
  s.require_paths = ["lib"]
20
20
 
21
- %w{ activesupport actionpack railties }.each do |gem|
21
+ %w{ activesupport activerecord }.each do |gem|
22
22
  s.add_dependency gem, ['>= 3.0.0']
23
23
  end
24
+
24
25
  s.add_development_dependency 'bundler', ['>= 1.0.0']
25
26
  s.add_development_dependency 'sqlite3', ['>= 0']
26
- %w{ activerecord activemodel }.each do |gem|
27
- s.add_development_dependency gem, ['>= 3.0.0']
28
- end
29
27
  s.add_development_dependency 'rspec', ['>= 0']
30
- s.add_development_dependency 'rspec-rails', ['>= 0']
31
- s.add_development_dependency 'factory_girl_rails', ['>= 0']
28
+ s.add_development_dependency 'factory_girl', ['< 3']
32
29
  s.add_development_dependency 'database_cleaner', ['>= 0']
33
30
  end
@@ -1,4 +1,3 @@
1
- require 'action_controller/railtie'
2
1
  require 'factory_girl'
3
2
  require 'database_cleaner'
4
3
 
@@ -1,6 +1,5 @@
1
1
  $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
2
2
  $LOAD_PATH.unshift(File.dirname(__FILE__))
3
- require 'rails'
4
3
  # Ensure we use 'syck' instead of 'psych' in 1.9.2
5
4
  # RubyGems >= 1.5.0 uses 'psych' on 1.9.2, but
6
5
  # Psych does not yet support YAML 1.1 merge keys.
@@ -13,7 +12,6 @@ require 'active_record'
13
12
  require 'never_wastes'
14
13
  require 'fake_app'
15
14
 
16
- require 'rspec/rails'
17
15
  # Requires supporting files with custom matchers and macros, etc,
18
16
  # in ./support/ and its subdirectories.
19
17
  Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
metadata CHANGED
@@ -1,190 +1,111 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: never_wastes
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
5
- prerelease:
4
+ version: 0.0.7
6
5
  platform: ruby
7
6
  authors:
8
7
  - nay3
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2012-05-31 00:00:00.000000000 Z
11
+ date: 2013-10-24 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: activesupport
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ! '>='
17
+ - - '>='
20
18
  - !ruby/object:Gem::Version
21
19
  version: 3.0.0
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
- - - ! '>='
24
+ - - '>='
28
25
  - !ruby/object:Gem::Version
29
26
  version: 3.0.0
30
27
  - !ruby/object:Gem::Dependency
31
- name: actionpack
32
- requirement: !ruby/object:Gem::Requirement
33
- none: false
34
- requirements:
35
- - - ! '>='
36
- - !ruby/object:Gem::Version
37
- version: 3.0.0
38
- type: :runtime
39
- prerelease: false
40
- version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
- requirements:
43
- - - ! '>='
44
- - !ruby/object:Gem::Version
45
- version: 3.0.0
46
- - !ruby/object:Gem::Dependency
47
- name: railties
28
+ name: activerecord
48
29
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
30
  requirements:
51
- - - ! '>='
31
+ - - '>='
52
32
  - !ruby/object:Gem::Version
53
33
  version: 3.0.0
54
34
  type: :runtime
55
35
  prerelease: false
56
36
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
37
  requirements:
59
- - - ! '>='
38
+ - - '>='
60
39
  - !ruby/object:Gem::Version
61
40
  version: 3.0.0
62
41
  - !ruby/object:Gem::Dependency
63
42
  name: bundler
64
43
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
44
  requirements:
67
- - - ! '>='
45
+ - - '>='
68
46
  - !ruby/object:Gem::Version
69
47
  version: 1.0.0
70
48
  type: :development
71
49
  prerelease: false
72
50
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
51
  requirements:
75
- - - ! '>='
52
+ - - '>='
76
53
  - !ruby/object:Gem::Version
77
54
  version: 1.0.0
78
55
  - !ruby/object:Gem::Dependency
79
56
  name: sqlite3
80
57
  requirement: !ruby/object:Gem::Requirement
81
- none: false
82
58
  requirements:
83
- - - ! '>='
59
+ - - '>='
84
60
  - !ruby/object:Gem::Version
85
61
  version: '0'
86
62
  type: :development
87
63
  prerelease: false
88
64
  version_requirements: !ruby/object:Gem::Requirement
89
- none: false
90
65
  requirements:
91
- - - ! '>='
66
+ - - '>='
92
67
  - !ruby/object:Gem::Version
93
68
  version: '0'
94
- - !ruby/object:Gem::Dependency
95
- name: activerecord
96
- requirement: !ruby/object:Gem::Requirement
97
- none: false
98
- requirements:
99
- - - ! '>='
100
- - !ruby/object:Gem::Version
101
- version: 3.0.0
102
- type: :development
103
- prerelease: false
104
- version_requirements: !ruby/object:Gem::Requirement
105
- none: false
106
- requirements:
107
- - - ! '>='
108
- - !ruby/object:Gem::Version
109
- version: 3.0.0
110
- - !ruby/object:Gem::Dependency
111
- name: activemodel
112
- requirement: !ruby/object:Gem::Requirement
113
- none: false
114
- requirements:
115
- - - ! '>='
116
- - !ruby/object:Gem::Version
117
- version: 3.0.0
118
- type: :development
119
- prerelease: false
120
- version_requirements: !ruby/object:Gem::Requirement
121
- none: false
122
- requirements:
123
- - - ! '>='
124
- - !ruby/object:Gem::Version
125
- version: 3.0.0
126
69
  - !ruby/object:Gem::Dependency
127
70
  name: rspec
128
71
  requirement: !ruby/object:Gem::Requirement
129
- none: false
130
- requirements:
131
- - - ! '>='
132
- - !ruby/object:Gem::Version
133
- version: '0'
134
- type: :development
135
- prerelease: false
136
- version_requirements: !ruby/object:Gem::Requirement
137
- none: false
138
- requirements:
139
- - - ! '>='
140
- - !ruby/object:Gem::Version
141
- version: '0'
142
- - !ruby/object:Gem::Dependency
143
- name: rspec-rails
144
- requirement: !ruby/object:Gem::Requirement
145
- none: false
146
72
  requirements:
147
- - - ! '>='
73
+ - - '>='
148
74
  - !ruby/object:Gem::Version
149
75
  version: '0'
150
76
  type: :development
151
77
  prerelease: false
152
78
  version_requirements: !ruby/object:Gem::Requirement
153
- none: false
154
79
  requirements:
155
- - - ! '>='
80
+ - - '>='
156
81
  - !ruby/object:Gem::Version
157
82
  version: '0'
158
83
  - !ruby/object:Gem::Dependency
159
- name: factory_girl_rails
84
+ name: factory_girl
160
85
  requirement: !ruby/object:Gem::Requirement
161
- none: false
162
86
  requirements:
163
- - - ! '>='
87
+ - - <
164
88
  - !ruby/object:Gem::Version
165
- version: '0'
89
+ version: '3'
166
90
  type: :development
167
91
  prerelease: false
168
92
  version_requirements: !ruby/object:Gem::Requirement
169
- none: false
170
93
  requirements:
171
- - - ! '>='
94
+ - - <
172
95
  - !ruby/object:Gem::Version
173
- version: '0'
96
+ version: '3'
174
97
  - !ruby/object:Gem::Dependency
175
98
  name: database_cleaner
176
99
  requirement: !ruby/object:Gem::Requirement
177
- none: false
178
100
  requirements:
179
- - - ! '>='
101
+ - - '>='
180
102
  - !ruby/object:Gem::Version
181
103
  version: '0'
182
104
  type: :development
183
105
  prerelease: false
184
106
  version_requirements: !ruby/object:Gem::Requirement
185
- none: false
186
107
  requirements:
187
- - - ! '>='
108
+ - - '>='
188
109
  - !ruby/object:Gem::Version
189
110
  version: '0'
190
111
  description: It changes ActiveRecord::Base#destroy to support soft delete. Kind of
@@ -210,27 +131,26 @@ files:
210
131
  - spec/support/database_cleaner.rb
211
132
  homepage: ''
212
133
  licenses: []
134
+ metadata: {}
213
135
  post_install_message:
214
136
  rdoc_options: []
215
137
  require_paths:
216
138
  - lib
217
139
  required_ruby_version: !ruby/object:Gem::Requirement
218
- none: false
219
140
  requirements:
220
- - - ! '>='
141
+ - - '>='
221
142
  - !ruby/object:Gem::Version
222
143
  version: '0'
223
144
  required_rubygems_version: !ruby/object:Gem::Requirement
224
- none: false
225
145
  requirements:
226
- - - ! '>='
146
+ - - '>='
227
147
  - !ruby/object:Gem::Version
228
148
  version: '0'
229
149
  requirements: []
230
150
  rubyforge_project: never_wastes
231
- rubygems_version: 1.8.23
151
+ rubygems_version: 2.0.4
232
152
  signing_key:
233
- specification_version: 3
153
+ specification_version: 4
234
154
  summary: simple soft delete for ActiveRecord
235
155
  test_files:
236
156
  - spec/fake_app.rb