drafting 0.2.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 584bd74179c43b3e4a394351a2960d7bd61c95fa
4
- data.tar.gz: 61be0d4f73ce8309d93c6469d6c891a45290c11a
3
+ metadata.gz: a683068808174f941d9864a55ce115cec45bc760
4
+ data.tar.gz: f2ba964a0df2204d394f88c00d90b8a27d52b4d4
5
5
  SHA512:
6
- metadata.gz: 42dc06da36af1230c2629e4907c23117e5e13092768d724c3a9b7b14f346a148a3154b6d3456768f6ba9e7f2deb8061a4ca0538736c08a8ab3e903bbf599425e
7
- data.tar.gz: 5a6accada57fa8ea9d938634325491405a116b19faf12e678c434c0507ffd73a37dfb65beb1ec29b54c306952457415a736d07b32bc4720fb2e5b8fbe7a60d3b
6
+ metadata.gz: 2cfedf0cf65c13ee6e0119fc3d6a04c37bf54f269ad5071578ef1bb9c5c498ec601a2e661ca9ec065584878105f64d578888d17456765f91118373f556929854
7
+ data.tar.gz: 385955cf04aa80cd3cc21e64835c3d89cf169806991aa0abe421175be9d5c2fa3e62bca97b8b7e6648f3ec1d1a34255286ce0c3dc9667d696eb576981b305120
data/.rspec CHANGED
@@ -1,2 +1 @@
1
- --format documentation
2
1
  --color
data/.travis.yml CHANGED
@@ -1,4 +1,18 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 2.2
4
- before_install: gem install bundler -v 1.10.6
3
+ - 2.0.0
4
+ - 2.1.10
5
+ - 2.2.5
6
+ - 2.3.1
7
+ gemfile:
8
+ - gemfiles/rails_5_0.gemfile
9
+ - gemfiles/rails_4_2.gemfile
10
+ - gemfiles/rails_4_1.gemfile
11
+ matrix:
12
+ exclude:
13
+ - rvm: 2.0.0
14
+ gemfile: gemfiles/rails_5_0.gemfile
15
+ - rvm: 2.1.10
16
+ gemfile: gemfiles/rails_5_0.gemfile
17
+ before_install: gem update bundler
18
+ sudo: false
data/Appraisals ADDED
@@ -0,0 +1,11 @@
1
+ appraise "rails-5-0" do
2
+ gem "activerecord", "~> 5.0.0"
3
+ end
4
+
5
+ appraise "rails-4-2" do
6
+ gem "activerecord", "~> 4.2.6"
7
+ end
8
+
9
+ appraise "rails-4-1" do
10
+ gem "activerecord", "~> 4.1.15"
11
+ end
data/LICENSE.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2015 Georg Ledermann
3
+ Copyright (c) 2016 Georg Ledermann
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
data/README.md CHANGED
@@ -16,6 +16,11 @@ This Ruby gem enhances `ActiveRecord::Base` to save a draft version of the curre
16
16
  * A draft is optionally linked to a parent instance. This helps showing existing drafts in a context (e.g. message drafts for a given topic)
17
17
  * Only 80 lines of code
18
18
 
19
+ ## Requirements
20
+
21
+ * Ruby 2.0.0 or newer
22
+ * ActiveRecord 4.1 or newer (including 5.0)
23
+
19
24
 
20
25
  ## Installation
21
26
 
data/drafting.gemspec CHANGED
@@ -13,18 +13,21 @@ Gem::Specification.new do |spec|
13
13
  spec.description = %q{}
14
14
  spec.homepage = "https://github.com/ledermann/drafting"
15
15
  spec.license = "MIT"
16
+ spec.required_ruby_version = '>= 2.0.0'
16
17
 
17
18
  spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
18
19
  spec.bindir = "exe"
19
20
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
20
21
  spec.require_paths = ["lib"]
21
22
 
22
- spec.add_dependency "activerecord", ">= 3.0"
23
+ spec.add_dependency "activerecord", ">= 4.1"
23
24
 
24
- spec.add_development_dependency "bundler", "~> 1.10"
25
- spec.add_development_dependency "rake", "~> 10.0"
25
+ spec.add_development_dependency "bundler"
26
+ spec.add_development_dependency "rake"
26
27
  spec.add_development_dependency "rspec"
27
28
  spec.add_development_dependency "sqlite3"
28
29
  spec.add_development_dependency "factory_girl"
29
30
  spec.add_development_dependency "coveralls"
31
+ spec.add_development_dependency "simplecov"
32
+ spec.add_development_dependency "appraisal"
30
33
  end
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "activerecord", "~> 4.1.15"
6
+
7
+ gemspec :path => "../"
@@ -0,0 +1,86 @@
1
+ PATH
2
+ remote: ../
3
+ specs:
4
+ drafting (0.2.0)
5
+ activerecord (>= 4.1)
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ activemodel (4.1.15)
11
+ activesupport (= 4.1.15)
12
+ builder (~> 3.1)
13
+ activerecord (4.1.15)
14
+ activemodel (= 4.1.15)
15
+ activesupport (= 4.1.15)
16
+ arel (~> 5.0.0)
17
+ activesupport (4.1.15)
18
+ i18n (~> 0.6, >= 0.6.9)
19
+ json (~> 1.7, >= 1.7.7)
20
+ minitest (~> 5.1)
21
+ thread_safe (~> 0.1)
22
+ tzinfo (~> 1.1)
23
+ appraisal (2.1.0)
24
+ bundler
25
+ rake
26
+ thor (>= 0.14.0)
27
+ arel (5.0.1.20140414130214)
28
+ builder (3.2.2)
29
+ coveralls (0.8.13)
30
+ json (~> 1.8)
31
+ simplecov (~> 0.11.0)
32
+ term-ansicolor (~> 1.3)
33
+ thor (~> 0.19.1)
34
+ tins (~> 1.6.0)
35
+ diff-lcs (1.2.5)
36
+ docile (1.1.5)
37
+ factory_girl (4.7.0)
38
+ activesupport (>= 3.0.0)
39
+ i18n (0.7.0)
40
+ json (1.8.3)
41
+ minitest (5.9.0)
42
+ rake (11.2.2)
43
+ rspec (3.5.0)
44
+ rspec-core (~> 3.5.0)
45
+ rspec-expectations (~> 3.5.0)
46
+ rspec-mocks (~> 3.5.0)
47
+ rspec-core (3.5.0)
48
+ rspec-support (~> 3.5.0)
49
+ rspec-expectations (3.5.0)
50
+ diff-lcs (>= 1.2.0, < 2.0)
51
+ rspec-support (~> 3.5.0)
52
+ rspec-mocks (3.5.0)
53
+ diff-lcs (>= 1.2.0, < 2.0)
54
+ rspec-support (~> 3.5.0)
55
+ rspec-support (3.5.0)
56
+ simplecov (0.11.2)
57
+ docile (~> 1.1.0)
58
+ json (~> 1.8)
59
+ simplecov-html (~> 0.10.0)
60
+ simplecov-html (0.10.0)
61
+ sqlite3 (1.3.11)
62
+ term-ansicolor (1.3.2)
63
+ tins (~> 1.0)
64
+ thor (0.19.1)
65
+ thread_safe (0.3.5)
66
+ tins (1.6.0)
67
+ tzinfo (1.2.2)
68
+ thread_safe (~> 0.1)
69
+
70
+ PLATFORMS
71
+ ruby
72
+
73
+ DEPENDENCIES
74
+ activerecord (~> 4.1.15)
75
+ appraisal
76
+ bundler
77
+ coveralls
78
+ drafting!
79
+ factory_girl
80
+ rake
81
+ rspec
82
+ simplecov
83
+ sqlite3
84
+
85
+ BUNDLED WITH
86
+ 1.12.5
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "activerecord", "~> 4.2.6"
6
+
7
+ gemspec :path => "../"
@@ -0,0 +1,86 @@
1
+ PATH
2
+ remote: ../
3
+ specs:
4
+ drafting (0.2.0)
5
+ activerecord (>= 4.1)
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ activemodel (4.2.6)
11
+ activesupport (= 4.2.6)
12
+ builder (~> 3.1)
13
+ activerecord (4.2.6)
14
+ activemodel (= 4.2.6)
15
+ activesupport (= 4.2.6)
16
+ arel (~> 6.0)
17
+ activesupport (4.2.6)
18
+ i18n (~> 0.7)
19
+ json (~> 1.7, >= 1.7.7)
20
+ minitest (~> 5.1)
21
+ thread_safe (~> 0.3, >= 0.3.4)
22
+ tzinfo (~> 1.1)
23
+ appraisal (2.1.0)
24
+ bundler
25
+ rake
26
+ thor (>= 0.14.0)
27
+ arel (6.0.3)
28
+ builder (3.2.2)
29
+ coveralls (0.8.13)
30
+ json (~> 1.8)
31
+ simplecov (~> 0.11.0)
32
+ term-ansicolor (~> 1.3)
33
+ thor (~> 0.19.1)
34
+ tins (~> 1.6.0)
35
+ diff-lcs (1.2.5)
36
+ docile (1.1.5)
37
+ factory_girl (4.7.0)
38
+ activesupport (>= 3.0.0)
39
+ i18n (0.7.0)
40
+ json (1.8.3)
41
+ minitest (5.9.0)
42
+ rake (11.2.2)
43
+ rspec (3.5.0)
44
+ rspec-core (~> 3.5.0)
45
+ rspec-expectations (~> 3.5.0)
46
+ rspec-mocks (~> 3.5.0)
47
+ rspec-core (3.5.0)
48
+ rspec-support (~> 3.5.0)
49
+ rspec-expectations (3.5.0)
50
+ diff-lcs (>= 1.2.0, < 2.0)
51
+ rspec-support (~> 3.5.0)
52
+ rspec-mocks (3.5.0)
53
+ diff-lcs (>= 1.2.0, < 2.0)
54
+ rspec-support (~> 3.5.0)
55
+ rspec-support (3.5.0)
56
+ simplecov (0.11.2)
57
+ docile (~> 1.1.0)
58
+ json (~> 1.8)
59
+ simplecov-html (~> 0.10.0)
60
+ simplecov-html (0.10.0)
61
+ sqlite3 (1.3.11)
62
+ term-ansicolor (1.3.2)
63
+ tins (~> 1.0)
64
+ thor (0.19.1)
65
+ thread_safe (0.3.5)
66
+ tins (1.6.0)
67
+ tzinfo (1.2.2)
68
+ thread_safe (~> 0.1)
69
+
70
+ PLATFORMS
71
+ ruby
72
+
73
+ DEPENDENCIES
74
+ activerecord (~> 4.2.6)
75
+ appraisal
76
+ bundler
77
+ coveralls
78
+ drafting!
79
+ factory_girl
80
+ rake
81
+ rspec
82
+ simplecov
83
+ sqlite3
84
+
85
+ BUNDLED WITH
86
+ 1.12.5
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "activerecord", "~> 5.0.0"
6
+
7
+ gemspec :path => "../"
@@ -0,0 +1,84 @@
1
+ PATH
2
+ remote: ../
3
+ specs:
4
+ drafting (0.2.0)
5
+ activerecord (>= 4.1)
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ activemodel (5.0.0)
11
+ activesupport (= 5.0.0)
12
+ activerecord (5.0.0)
13
+ activemodel (= 5.0.0)
14
+ activesupport (= 5.0.0)
15
+ arel (~> 7.0)
16
+ activesupport (5.0.0)
17
+ concurrent-ruby (~> 1.0, >= 1.0.2)
18
+ i18n (~> 0.7)
19
+ minitest (~> 5.1)
20
+ tzinfo (~> 1.1)
21
+ appraisal (2.1.0)
22
+ bundler
23
+ rake
24
+ thor (>= 0.14.0)
25
+ arel (7.0.0)
26
+ concurrent-ruby (1.0.2)
27
+ coveralls (0.8.13)
28
+ json (~> 1.8)
29
+ simplecov (~> 0.11.0)
30
+ term-ansicolor (~> 1.3)
31
+ thor (~> 0.19.1)
32
+ tins (~> 1.6.0)
33
+ diff-lcs (1.2.5)
34
+ docile (1.1.5)
35
+ factory_girl (4.7.0)
36
+ activesupport (>= 3.0.0)
37
+ i18n (0.7.0)
38
+ json (1.8.3)
39
+ minitest (5.9.0)
40
+ rake (11.2.2)
41
+ rspec (3.5.0)
42
+ rspec-core (~> 3.5.0)
43
+ rspec-expectations (~> 3.5.0)
44
+ rspec-mocks (~> 3.5.0)
45
+ rspec-core (3.5.0)
46
+ rspec-support (~> 3.5.0)
47
+ rspec-expectations (3.5.0)
48
+ diff-lcs (>= 1.2.0, < 2.0)
49
+ rspec-support (~> 3.5.0)
50
+ rspec-mocks (3.5.0)
51
+ diff-lcs (>= 1.2.0, < 2.0)
52
+ rspec-support (~> 3.5.0)
53
+ rspec-support (3.5.0)
54
+ simplecov (0.11.2)
55
+ docile (~> 1.1.0)
56
+ json (~> 1.8)
57
+ simplecov-html (~> 0.10.0)
58
+ simplecov-html (0.10.0)
59
+ sqlite3 (1.3.11)
60
+ term-ansicolor (1.3.2)
61
+ tins (~> 1.0)
62
+ thor (0.19.1)
63
+ thread_safe (0.3.5)
64
+ tins (1.6.0)
65
+ tzinfo (1.2.2)
66
+ thread_safe (~> 0.1)
67
+
68
+ PLATFORMS
69
+ ruby
70
+
71
+ DEPENDENCIES
72
+ activerecord (~> 5.0.0)
73
+ appraisal
74
+ bundler
75
+ coveralls
76
+ drafting!
77
+ factory_girl
78
+ rake
79
+ rspec
80
+ simplecov
81
+ sqlite3
82
+
83
+ BUNDLED WITH
84
+ 1.12.5
@@ -19,7 +19,7 @@ module Drafting
19
19
  end
20
20
 
21
21
  def self.child_drafts(user)
22
- Draft.where(:user => user, :parent_type => self)
22
+ Draft.where(:user => user, :parent_type => self.base_class.name)
23
23
  end
24
24
  end
25
25
  end
@@ -1,3 +1,3 @@
1
1
  module Drafting
2
- VERSION = "0.2.0"
2
+ VERSION = "0.3.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: drafting
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Georg Ledermann
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-08-21 00:00:00.000000000 Z
11
+ date: 2016-07-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -16,42 +16,42 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '3.0'
19
+ version: '4.1'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: '3.0'
26
+ version: '4.1'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: bundler
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: '1.10'
33
+ version: '0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - "~>"
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
- version: '1.10'
40
+ version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rake
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - "~>"
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
- version: '10.0'
47
+ version: '0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - "~>"
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
- version: '10.0'
54
+ version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rspec
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -108,6 +108,34 @@ dependencies:
108
108
  - - ">="
109
109
  - !ruby/object:Gem::Version
110
110
  version: '0'
111
+ - !ruby/object:Gem::Dependency
112
+ name: simplecov
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
125
+ - !ruby/object:Gem::Dependency
126
+ name: appraisal
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - ">="
130
+ - !ruby/object:Gem::Version
131
+ version: '0'
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - ">="
137
+ - !ruby/object:Gem::Version
138
+ version: '0'
111
139
  description: ''
112
140
  email:
113
141
  - mail@georg-ledermann.de
@@ -118,6 +146,7 @@ files:
118
146
  - ".gitignore"
119
147
  - ".rspec"
120
148
  - ".travis.yml"
149
+ - Appraisals
121
150
  - CODE_OF_CONDUCT.md
122
151
  - Gemfile
123
152
  - LICENSE.txt
@@ -126,6 +155,12 @@ files:
126
155
  - bin/console
127
156
  - bin/setup
128
157
  - drafting.gemspec
158
+ - gemfiles/rails_4_1.gemfile
159
+ - gemfiles/rails_4_1.gemfile.lock
160
+ - gemfiles/rails_4_2.gemfile
161
+ - gemfiles/rails_4_2.gemfile.lock
162
+ - gemfiles/rails_5_0.gemfile
163
+ - gemfiles/rails_5_0.gemfile.lock
129
164
  - lib/drafting.rb
130
165
  - lib/drafting/base_class_methods.rb
131
166
  - lib/drafting/class_methods.rb
@@ -146,7 +181,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
146
181
  requirements:
147
182
  - - ">="
148
183
  - !ruby/object:Gem::Version
149
- version: '0'
184
+ version: 2.0.0
150
185
  required_rubygems_version: !ruby/object:Gem::Requirement
151
186
  requirements:
152
187
  - - ">="
@@ -154,7 +189,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
154
189
  version: '0'
155
190
  requirements: []
156
191
  rubyforge_project:
157
- rubygems_version: 2.4.8
192
+ rubygems_version: 2.6.6
158
193
  signing_key:
159
194
  specification_version: 4
160
195
  summary: Save draft version of any ActiveRecord object