active_archive 2.0.0 → 2.1.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: e158692b2725211de2ba8c52ada0675633373507
4
- data.tar.gz: d013e8165bd6a583a2180ee941b21955c97e01d0
3
+ metadata.gz: 420630d4334e8eb9d2569e03eb0dd86e0f4bc18c
4
+ data.tar.gz: 2110f415e412e419e3158d4091606f62f05e90d2
5
5
  SHA512:
6
- metadata.gz: ebc6c31649e47dea958f7942de7cf6141e6ecedf85427a73e1670f8d3b42d87fd302a90a3138f606dd63dd0f4526654f8294756494242d5c5641f05328f9acac
7
- data.tar.gz: 482ae6a55ff1487ed27b3d5f2aae329cfb386b51e4013e5b2be9e99daed4337928cd167b4bcc6595dd236caa296d62002ab949a1eafd50538b033392ddf45aa7
6
+ metadata.gz: 991d79220026aaf5a458d8aceccf6216a243239a400cc1baa028a33f9c1fd7a1575a860c2ecaee21b9496920ee118f7ffd55d820e2235427f7b7970947ac10f2
7
+ data.tar.gz: ca9baca6861948dae80df4000c0a05878dce376ad47a5938b6e1d82d10ac0f77a7d46339de38baeb7ba5da39defabc1f50f7cd9f130f30c4306d20d6192e7073
data/README.md CHANGED
@@ -34,7 +34,11 @@ Or install it yourself as:
34
34
  * all_records_archivable
35
35
  * dependent_record_window
36
36
 
37
+ `rails generate active_archive:install` will generate the following `active_archive.rb` file:
38
+
37
39
  ```ruby
40
+ # config/initalizers/active_archive.rb
41
+
38
42
  ActiveArchive.configure do |config|
39
43
  # option = default
40
44
 
@@ -18,8 +18,7 @@ Gem::Specification.new do |spec|
18
18
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
19
19
  spec.require_paths = ["lib", "support"]
20
20
 
21
- spec.add_runtime_dependency "activerecord"
22
- spec.add_runtime_dependency "activesupport"
21
+ spec.add_runtime_dependency "rails"
23
22
 
24
23
  spec.add_development_dependency "bundler"
25
24
  spec.add_development_dependency "coveralls"
@@ -27,4 +26,5 @@ Gem::Specification.new do |spec|
27
26
  spec.add_development_dependency "rspec"
28
27
  spec.add_development_dependency "sqlite3"
29
28
  spec.add_development_dependency "database_cleaner"
29
+ spec.add_development_dependency "generator_spec"
30
30
  end
@@ -1,3 +1,3 @@
1
1
  module ActiveArchive
2
- VERSION = "2.0.0"
2
+ VERSION = "2.1.0"
3
3
  end
@@ -4,6 +4,7 @@ require "active_archive/table_definition"
4
4
  require "active_archive/methods"
5
5
  require "active_archive/scopes"
6
6
  require "active_archive/base"
7
+ require "generators/active_archive/install_generator"
7
8
 
8
9
  module ActiveArchive
9
10
 
@@ -0,0 +1,12 @@
1
+ require "rails/generators"
2
+
3
+ module ActiveArchive
4
+ class InstallGenerator < Rails::Generators::Base
5
+ source_root File.expand_path('../templates', __FILE__)
6
+
7
+ def copy_initializer_file
8
+ copy_file("install.rb", "config/initializers/active_archive.rb")
9
+ end
10
+
11
+ end
12
+ end
@@ -0,0 +1,4 @@
1
+ ActiveArchive.configure do |config|
2
+ config.all_records_archivable = false
3
+ config.dependent_record_window = 3.seconds
4
+ end
metadata CHANGED
@@ -1,17 +1,17 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_archive
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Juan Gomez
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-08-19 00:00:00.000000000 Z
11
+ date: 2015-08-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: activerecord
14
+ name: rails
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - ">="
@@ -25,13 +25,13 @@ dependencies:
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
- name: activesupport
28
+ name: bundler
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
- type: :runtime
34
+ type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
@@ -39,7 +39,7 @@ dependencies:
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
- name: bundler
42
+ name: coveralls
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - ">="
@@ -53,7 +53,7 @@ dependencies:
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
- name: coveralls
56
+ name: rake
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - ">="
@@ -67,7 +67,7 @@ dependencies:
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
69
  - !ruby/object:Gem::Dependency
70
- name: rake
70
+ name: rspec
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - ">="
@@ -81,7 +81,7 @@ dependencies:
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
83
  - !ruby/object:Gem::Dependency
84
- name: rspec
84
+ name: sqlite3
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
87
  - - ">="
@@ -95,7 +95,7 @@ dependencies:
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
97
  - !ruby/object:Gem::Dependency
98
- name: sqlite3
98
+ name: database_cleaner
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
101
  - - ">="
@@ -109,7 +109,7 @@ dependencies:
109
109
  - !ruby/object:Gem::Version
110
110
  version: '0'
111
111
  - !ruby/object:Gem::Dependency
112
- name: database_cleaner
112
+ name: generator_spec
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
115
  - - ">="
@@ -149,6 +149,8 @@ files:
149
149
  - lib/active_archive/scopes.rb
150
150
  - lib/active_archive/table_definition.rb
151
151
  - lib/active_archive/version.rb
152
+ - lib/generators/active_archive/install_generator.rb
153
+ - lib/generators/active_archive/templates/install.rb
152
154
  homepage: https://github.com/drexed/active_archive
153
155
  licenses: []
154
156
  metadata: {}