paper_trail_manager 0.5.0 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (27) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +16 -8
  3. data/Appraisals +17 -36
  4. data/CHANGES.md +8 -2
  5. data/README.md +10 -1
  6. data/app/helpers/paper_trail_manager/changes_helper.rb +23 -44
  7. data/app/views/paper_trail_manager/changes/_version.html.erb +7 -3
  8. data/gemfiles/rails_3.2.0_paper_trail_3.0_kaminari.gemfile +10 -0
  9. data/gemfiles/rails_3.2.0_paper_trail_3.0_will_paginate.gemfile +10 -0
  10. data/gemfiles/rails_3.2.0_paper_trail_4.0_kaminari.gemfile +10 -0
  11. data/gemfiles/rails_3.2.0_paper_trail_4.0_will_paginate.gemfile +10 -0
  12. data/gemfiles/{rails_3.2_kaminari.gemfile → rails_4.0.0_paper_trail_3.0_kaminari.gemfile} +2 -1
  13. data/gemfiles/{rails_4.1_will_paginate.gemfile → rails_4.0.0_paper_trail_3.0_will_paginate.gemfile} +2 -1
  14. data/gemfiles/{rails_4.1_kaminari.gemfile → rails_4.0.0_paper_trail_4.0_kaminari.gemfile} +2 -1
  15. data/gemfiles/{rails_3.2_will_paginate.gemfile → rails_4.0.0_paper_trail_4.0_will_paginate.gemfile} +2 -1
  16. data/gemfiles/{rails_4.0_kaminari.gemfile → rails_4.1.0_paper_trail_3.0_kaminari.gemfile} +2 -1
  17. data/gemfiles/{rails_4.0_will_paginate.gemfile → rails_4.1.0_paper_trail_3.0_will_paginate.gemfile} +2 -1
  18. data/gemfiles/rails_4.1.0_paper_trail_4.0_kaminari.gemfile +9 -0
  19. data/gemfiles/rails_4.1.0_paper_trail_4.0_will_paginate.gemfile +9 -0
  20. data/gemfiles/{rails_4.2_kaminari.gemfile → rails_4.2.2_paper_trail_3.0_kaminari.gemfile} +1 -0
  21. data/gemfiles/{rails_4.2_will_paginate.gemfile → rails_4.2.2_paper_trail_3.0_will_paginate.gemfile} +1 -0
  22. data/gemfiles/rails_4.2.2_paper_trail_4.0_kaminari.gemfile +9 -0
  23. data/gemfiles/rails_4.2.2_paper_trail_4.0_will_paginate.gemfile +9 -0
  24. data/lib/paper_trail_manager.rb +14 -19
  25. data/paper_trail_manager.gemspec +2 -2
  26. data/spec/dummy/Gemfile +1 -1
  27. metadata +26 -12
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2549171549b22c9328db417189798ea21871029c
4
- data.tar.gz: 150cc4d55fbf5db0818687c333c6df8d463226af
3
+ metadata.gz: 35fba5ebc680f50b0e7ce1caaf6078516a961172
4
+ data.tar.gz: 683db80277392f81fdc645725e4461b5ab0c168b
5
5
  SHA512:
6
- metadata.gz: fea549305c1d60b72b0ee0cb7638967f5618789b8ee4fe709c200706a118ed4e5d6a7a63dfb30228313008ac41e61cbbd083fd663f03610108b73b409c257775
7
- data.tar.gz: 2b3e7b426fd66283adabdfee001ce2415eec56537fdbc8c249509fb3428c893f2b736db4a3ad5e10e1739c70094aba8e0678b9042026fa13f00cdb2dd863a5d8
6
+ metadata.gz: ce56dc3af2eda372dd4d48c0ca627938cc8d8ff6e56110039debc108fe21af56b37f419a11d04ab1165102020cd7defd12324fee3fe6087d71a88fdc2f5d48b6
7
+ data.tar.gz: 20802255bfba5b797940ba22da1c6adda96ebdbe628290e71bd1ca80e9c79e643d32b34eb56fde02afe53625bb63eb6ab90342759cfb96563e1d7e9c0224a69a
@@ -4,12 +4,20 @@ rvm:
4
4
  - 2.0
5
5
  - 2.1
6
6
  gemfile:
7
- - gemfiles/rails_3.2_will_paginate.gemfile
8
- - gemfiles/rails_4.0_will_paginate.gemfile
9
- - gemfiles/rails_4.1_will_paginate.gemfile
10
- - gemfiles/rails_4.2_will_paginate.gemfile
11
- - gemfiles/rails_3.2_kaminari.gemfile
12
- - gemfiles/rails_4.0_kaminari.gemfile
13
- - gemfiles/rails_4.1_kaminari.gemfile
14
- - gemfiles/rails_4.2_kaminari.gemfile
7
+ - gemfiles/rails_3.2.0_paper_trail_3.0_kaminari.gemfile
8
+ - gemfiles/rails_3.2.0_paper_trail_3.0_will_paginate.gemfile
9
+ - gemfiles/rails_3.2.0_paper_trail_4.0_kaminari.gemfile
10
+ - gemfiles/rails_3.2.0_paper_trail_4.0_will_paginate.gemfile
11
+ - gemfiles/rails_4.0.0_paper_trail_3.0_kaminari.gemfile
12
+ - gemfiles/rails_4.0.0_paper_trail_3.0_will_paginate.gemfile
13
+ - gemfiles/rails_4.0.0_paper_trail_4.0_kaminari.gemfile
14
+ - gemfiles/rails_4.0.0_paper_trail_4.0_will_paginate.gemfile
15
+ - gemfiles/rails_4.1.0_paper_trail_3.0_kaminari.gemfile
16
+ - gemfiles/rails_4.1.0_paper_trail_3.0_will_paginate.gemfile
17
+ - gemfiles/rails_4.1.0_paper_trail_4.0_kaminari.gemfile
18
+ - gemfiles/rails_4.1.0_paper_trail_4.0_will_paginate.gemfile
19
+ - gemfiles/rails_4.2.2_paper_trail_3.0_kaminari.gemfile
20
+ - gemfiles/rails_4.2.2_paper_trail_3.0_will_paginate.gemfile
21
+ - gemfiles/rails_4.2.2_paper_trail_4.0_kaminari.gemfile
22
+ - gemfiles/rails_4.2.2_paper_trail_4.0_will_paginate.gemfile
15
23
  cache: bundler
data/Appraisals CHANGED
@@ -1,39 +1,20 @@
1
- appraise "rails-3.2-will-paginate" do
2
- gem "rails", "~> 3.2.21"
3
- gem "will_paginate", "~> 3.0"
4
- end
5
-
6
- appraise "rails-4.0-will-paginate" do
7
- gem "rails", "~> 4.0.13"
8
- gem "will_paginate", "~> 3.0"
9
- end
10
-
11
- appraise "rails-4.1-will-paginate" do
12
- gem "rails", "~> 4.1.11"
13
- gem "will_paginate", "~> 3.0"
14
- end
15
-
16
- appraise "rails-4.2-will-paginate" do
17
- gem "rails", "~> 4.2.2"
18
- gem "will_paginate", "~> 3.0"
19
- end
20
-
21
- appraise "rails-3.2-kaminari" do
22
- gem "rails", "~> 3.2.21"
23
- gem "kaminari", "~> 0.16"
24
- end
1
+ RAILS_VERSIONS = ["3.2.0", "4.0.0", "4.1.0", "4.2.2"]
2
+ PAPER_TRAIL_VERSIONS = ["3.0", "4.0"]
25
3
 
26
- appraise "rails-4.0-kaminari" do
27
- gem "rails", "~> 4.0.13"
28
- gem "kaminari", "~> 0.16"
29
- end
30
-
31
- appraise "rails-4.1-kaminari" do
32
- gem "rails", "~> 4.1.11"
33
- gem "kaminari", "~> 0.16"
34
- end
4
+ RAILS_VERSIONS.each do |rails_version|
5
+ PAPER_TRAIL_VERSIONS.each do |paper_trail_version|
6
+ appraise "rails-#{rails_version}-paper_trail-#{paper_trail_version}-will-paginate" do
7
+ gem "rails", "~> #{rails_version}"
8
+ gem "paper_trail", "~> #{paper_trail_version}"
9
+ gem "will_paginate", "~> 3.0"
10
+ gem "test-unit", "~> 3.0" if rails_version == "3.2.0"
11
+ end
35
12
 
36
- appraise "rails-4.2-kaminari" do
37
- gem "rails", "~> 4.2.2"
38
- gem "kaminari", "~> 0.16"
13
+ appraise "rails-#{rails_version}-paper_trail-#{paper_trail_version}-kaminari" do
14
+ gem "rails", "~> #{rails_version}"
15
+ gem "paper_trail", "~> #{paper_trail_version}"
16
+ gem "kaminari", "~> 0.16"
17
+ gem "test-unit", "~> 3.0" if rails_version == "3.2.0"
18
+ end
19
+ end
39
20
  end
data/CHANGES.md CHANGED
@@ -1,10 +1,16 @@
1
1
  Changes to `paper_trail_manager`
2
2
  ================================
3
3
 
4
+ * 0.6.0
5
+ * Add support for linking changes to user records via `PaperTrailManager.whodunnit_name_method` and `PaperTrailManager.user_path_method`
6
+ * Add new `PaperTrailManager.item_name_method` configuration option
7
+ * Add support for paper_trail 4.x
8
+ * Refactoring, code simplification, and performance improvements
9
+
4
10
  * 0.5.0
5
- * Added support for pagination with [Kaminari](https://github.com/amatsuda/kaminari) in addition to [will_paginate](https://github.com/mislav/will_paginate).
11
+ * Add support for pagination with [Kaminari](https://github.com/amatsuda/kaminari) in addition to [will_paginate](https://github.com/mislav/will_paginate).
6
12
  * **[!]** Removed direct dependency on will_paginate. You must now include either `will_paginate` or `kaminari` in your Gemfile.
7
- * Fixed a bug with route generation when paper_trail_manager is used within another Rails engine.
13
+ * Fix a bug with route generation when paper_trail_manager is used within another Rails engine.
8
14
 
9
15
  * 0.4.0
10
16
  * Allow configuration of ChangesController's parent class, route helpers, and layout
data/README.md CHANGED
@@ -35,7 +35,7 @@ Restart the server and go to the `/changes` URI to browse, subscribe, view and r
35
35
  ### Configuration
36
36
 
37
37
  Several aspects of PaperTrailManager may be optionally configured
38
- by creating an initializer in your application
38
+ by creating an initializer in your application
39
39
  (e.g. `config/initializers/paper_trail_manager.rb`).
40
40
 
41
41
  To specify when reverts are allowed:
@@ -49,6 +49,15 @@ To specify how to look up users/memebers/etc specified in Paper Trail's 'whodunn
49
49
  PaperTrailManager.whodunnit_class = User
50
50
  PaperTrailManager.whodunnit_name_method = :nicename # defaults to :name
51
51
 
52
+ To specify a method to call to identify an item on an index page:
53
+
54
+ PaperTrailManager.item_name_method = :nicename
55
+
56
+ And for linking (or not) to the user with a custom path helper:
57
+
58
+ PaperTrailManager.user_path_method = :admin_path # defaults to :user_path
59
+ PaperTrailManager.user_path_method = nil # no "show user" page in app
60
+
52
61
  When including PaperTrailManager within another Rails engine, you may need to
53
62
  override PaperTrailManager::ChangesController's parent class to reference the
54
63
  engine's ApplicationController configure it to use your engine's url helpers:
@@ -25,66 +25,39 @@ class PaperTrailManager
25
25
  # ...
26
26
  # }
27
27
  def changes_for(version)
28
- changes = {}
29
- current = version.next.try(:reify)
30
- # FIXME #reify randomly throws "ArgumentError Exception: syntax error on line 13, col 30:" -- why?
31
- previous = version.reify rescue nil
32
- record = \
33
- begin
34
- version.item_type.constantize.find(version.item_id)
35
- rescue ActiveRecord::RecordNotFound
36
- previous || current
37
- end
38
-
39
- # Bail out if no changes are available
40
- return changes unless record
41
-
42
28
  case version.event
43
29
  when "create", "update"
44
- current ||= record
30
+ return {} unless version.changeset
31
+ version.changeset.inject({}) do |changes, (attr, (prev, curr))|
32
+ changes.store(attr, {previous: prev, current: curr}) && changes
33
+ end
45
34
  when "destroy"
46
- previous ||= record
35
+ record = version_reify(version)
36
+ return {} unless record
37
+ record.attributes.reject{|k,v| v.nil?}.inject({}) do |changes, (attr, value)|
38
+ changes.store(attr, {previous: value, current: nil}) && changes
39
+ end
47
40
  else
48
41
  raise ArgumentError, "Unknown event: #{version.event}"
49
42
  end
50
-
51
- (current or previous).attribute_names.each do |name|
52
- next if name == "updated_at"
53
- next if name == "created_at"
54
- current_value = current.read_attribute(name) if current
55
- previous_value = previous.read_attribute(name) if previous
56
- unless current_value == previous_value || (version.event == "create" && current_value.blank?)
57
- changes[name] = {
58
- :previous => previous_value,
59
- :current => current_value,
60
- }
61
- end
62
- end
63
-
64
- return changes
65
43
  end
66
44
 
67
45
  # Returns string title for the versioned record.
68
46
  def change_title_for(version)
69
- current = version.next.try(:reify)
70
- previous = version.reify rescue nil
71
- record = version.item_type.constantize.find(version.item_id) rescue nil
72
-
73
- name = nil
74
- [:name, :title, :to_s].each do |name_method|
75
- [previous, current, record].each do |obj|
76
- name = obj.send(name_method) if obj.respond_to?(name_method)
77
- break if name
78
- end
79
- break if name
47
+ if PaperTrailManager.item_name_method
48
+ record = version_reify(version) || version.next.try(:reify) || version.item
49
+ name = record.send(PaperTrailManager.item_name_method)
50
+ else
51
+ name = "#{version.item_type} #{version.item_id}"
80
52
  end
81
53
 
82
54
  return h(name)
83
55
  end
84
56
 
85
- # Returns sorted array of types of items that there are changes for.
86
57
  def change_item_types
87
- return ActiveRecord::Base.connection.select_values('SELECT DISTINCT(item_type) FROM versions ORDER BY item_type')
58
+ ActiveRecord::Base.subclasses.select do |klass|
59
+ klass.include?(PaperTrail::Model::InstanceMethods)
60
+ end.map(&:to_s)
88
61
  end
89
62
 
90
63
  # Returns HTML link for the item stored in the version, e.g. a link to a Company record stored in the version.
@@ -95,5 +68,11 @@ class PaperTrailManager
95
68
  return content_tag(:span, change_title_for(version), :class => 'change_item')
96
69
  end
97
70
  end
71
+
72
+ def version_reify(version)
73
+ version.reify
74
+ rescue ArgumentError
75
+ nil
76
+ end
98
77
  end
99
78
  end
@@ -7,12 +7,16 @@
7
7
  <td class='change_details'>
8
8
  <p class='change_details_description'>
9
9
  <strong class='event'><%= version.event %></strong>
10
- <span class='item_type'><%= version.item_type %></span>
11
- <span class='item_id'><%= version.item_id %></span>
12
10
  <%= change_item_link(version) %>
13
11
  <% if PaperTrailManager.whodunnit_class && version.whodunnit %>
14
12
  <% if user = PaperTrailManager.whodunnit_class.find(version.whodunnit) rescue nil %>
15
- by <%= link_to(h(user.send(PaperTrailManager.whodunnit_name_method)), user_path(user)) %>
13
+ <% if PaperTrailManager.user_path_method && user %>
14
+ by <%= link_to(h(user.send(PaperTrailManager.whodunnit_name_method)), send(:user_path_method, user)) %>
15
+ <% else %>
16
+ by <%= h(user.send(PaperTrailManager.whodunnit_name_method)) %>
17
+ <% end %>
18
+ <% else %>
19
+ by <%= version.whodunnit %>
16
20
  <% end %>
17
21
  <% end %>
18
22
  <% if change_revert_allowed?(version) %>
@@ -0,0 +1,10 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "rails", "~> 3.2.0"
6
+ gem "paper_trail", "~> 3.0"
7
+ gem "kaminari", "~> 0.16"
8
+ gem "test-unit", "~> 3.0"
9
+
10
+ gemspec :path => "../"
@@ -0,0 +1,10 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "rails", "~> 3.2.0"
6
+ gem "paper_trail", "~> 3.0"
7
+ gem "will_paginate", "~> 3.0"
8
+ gem "test-unit", "~> 3.0"
9
+
10
+ gemspec :path => "../"
@@ -0,0 +1,10 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "rails", "~> 3.2.0"
6
+ gem "paper_trail", "~> 4.0"
7
+ gem "kaminari", "~> 0.16"
8
+ gem "test-unit", "~> 3.0"
9
+
10
+ gemspec :path => "../"
@@ -0,0 +1,10 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "rails", "~> 3.2.0"
6
+ gem "paper_trail", "~> 4.0"
7
+ gem "will_paginate", "~> 3.0"
8
+ gem "test-unit", "~> 3.0"
9
+
10
+ gemspec :path => "../"
@@ -2,7 +2,8 @@
2
2
 
3
3
  source "https://rubygems.org"
4
4
 
5
- gem "rails", "~> 3.2.21"
5
+ gem "rails", "~> 4.0.0"
6
+ gem "paper_trail", "~> 3.0"
6
7
  gem "kaminari", "~> 0.16"
7
8
 
8
9
  gemspec :path => "../"
@@ -2,7 +2,8 @@
2
2
 
3
3
  source "https://rubygems.org"
4
4
 
5
- gem "rails", "~> 4.1.11"
5
+ gem "rails", "~> 4.0.0"
6
+ gem "paper_trail", "~> 3.0"
6
7
  gem "will_paginate", "~> 3.0"
7
8
 
8
9
  gemspec :path => "../"
@@ -2,7 +2,8 @@
2
2
 
3
3
  source "https://rubygems.org"
4
4
 
5
- gem "rails", "~> 4.1.11"
5
+ gem "rails", "~> 4.0.0"
6
+ gem "paper_trail", "~> 4.0"
6
7
  gem "kaminari", "~> 0.16"
7
8
 
8
9
  gemspec :path => "../"
@@ -2,7 +2,8 @@
2
2
 
3
3
  source "https://rubygems.org"
4
4
 
5
- gem "rails", "~> 3.2.21"
5
+ gem "rails", "~> 4.0.0"
6
+ gem "paper_trail", "~> 4.0"
6
7
  gem "will_paginate", "~> 3.0"
7
8
 
8
9
  gemspec :path => "../"
@@ -2,7 +2,8 @@
2
2
 
3
3
  source "https://rubygems.org"
4
4
 
5
- gem "rails", "~> 4.0.13"
5
+ gem "rails", "~> 4.1.0"
6
+ gem "paper_trail", "~> 3.0"
6
7
  gem "kaminari", "~> 0.16"
7
8
 
8
9
  gemspec :path => "../"
@@ -2,7 +2,8 @@
2
2
 
3
3
  source "https://rubygems.org"
4
4
 
5
- gem "rails", "~> 4.0.13"
5
+ gem "rails", "~> 4.1.0"
6
+ gem "paper_trail", "~> 3.0"
6
7
  gem "will_paginate", "~> 3.0"
7
8
 
8
9
  gemspec :path => "../"
@@ -0,0 +1,9 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "rails", "~> 4.1.0"
6
+ gem "paper_trail", "~> 4.0"
7
+ gem "kaminari", "~> 0.16"
8
+
9
+ gemspec :path => "../"
@@ -0,0 +1,9 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "rails", "~> 4.1.0"
6
+ gem "paper_trail", "~> 4.0"
7
+ gem "will_paginate", "~> 3.0"
8
+
9
+ gemspec :path => "../"
@@ -3,6 +3,7 @@
3
3
  source "https://rubygems.org"
4
4
 
5
5
  gem "rails", "~> 4.2.2"
6
+ gem "paper_trail", "~> 3.0"
6
7
  gem "kaminari", "~> 0.16"
7
8
 
8
9
  gemspec :path => "../"
@@ -3,6 +3,7 @@
3
3
  source "https://rubygems.org"
4
4
 
5
5
  gem "rails", "~> 4.2.2"
6
+ gem "paper_trail", "~> 3.0"
6
7
  gem "will_paginate", "~> 3.0"
7
8
 
8
9
  gemspec :path => "../"
@@ -0,0 +1,9 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "rails", "~> 4.2.2"
6
+ gem "paper_trail", "~> 4.0"
7
+ gem "kaminari", "~> 0.16"
8
+
9
+ gemspec :path => "../"
@@ -0,0 +1,9 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "rails", "~> 4.2.2"
6
+ gem "paper_trail", "~> 4.0"
7
+ gem "will_paginate", "~> 3.0"
8
+
9
+ gemspec :path => "../"
@@ -19,54 +19,49 @@ class PaperTrailManager < Rails::Engine
19
19
  end
20
20
 
21
21
  @@whodunnit_name_method = :name
22
- cattr_accessor :whodunnit_class, :whodunnit_name_method, :route_helpers, :layout, :base_controller
22
+ cattr_accessor :whodunnit_class, :whodunnit_name_method, :route_helpers,
23
+ :layout, :base_controller, :user_path_method, :item_name_method
23
24
 
24
25
  self.base_controller = "ApplicationController"
26
+ self.user_path_method = :user_path
25
27
 
26
28
  (Pathname(__FILE__).dirname + '..').tap do |base|
27
29
  paths["app/controller"] = base + 'app/controllers'
28
30
  paths["app/view"] = base + 'app/views'
29
31
  end
30
32
 
31
- def self._allow_set(action, block)
32
- send(:class_variable_set, "@@allow_#{action}_block", block)
33
- end
34
-
35
- def self._allow_check(action, *args)
36
- begin
37
- block = send(:class_variable_get, "@@allow_#{action}_block")
38
- rescue NameError => e
39
- return true
40
- end
33
+ cattr_accessor :allow_index_block, :allow_show_block, :allow_revert_block
41
34
 
42
- return block.call(*args)
43
- end
35
+ block = Proc.new { true }
36
+ self.allow_index_block = block
37
+ self.allow_show_block = block
38
+ self.allow_revert_block = block
44
39
 
45
40
  def self.allow_index_when(&block)
46
- _allow_set(:index, block)
41
+ self.allow_index_block = block
47
42
  end
48
43
 
49
44
  def self.allow_index?(controller)
50
- _allow_check(:index, controller)
45
+ allow_index_block.call controller
51
46
  end
52
47
 
53
48
  def self.allow_show_when(&block)
54
- _allow_set(:show, block)
49
+ self.allow_show_block = block
55
50
  end
56
51
 
57
52
  def self.allow_show?(controller, version)
58
- _allow_check(:index, controller, version)
53
+ allow_index_block.call controller, version
59
54
  end
60
55
 
61
56
  # Describe when to allow reverts. Call this with a block that accepts
62
57
  # arguments for +controller+ and +version+.
63
58
  def self.allow_revert_when(&block)
64
- _allow_set(:revert, block)
59
+ self.allow_revert_block = block
65
60
  end
66
61
 
67
62
  # Allow revert given the +controller+ and +version+? If no
68
63
  # ::allow_revert_when was specified, always return +true+.
69
64
  def self.allow_revert?(controller, version)
70
- _allow_check(:revert, controller, version)
65
+ allow_revert_block.call controller, version
71
66
  end
72
67
  end
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = "paper_trail_manager"
7
- spec.version = "0.5.0"
7
+ spec.version = "0.6.0"
8
8
  spec.authors = ["Igal Koshevoy", "Reid Beels"]
9
9
  spec.authors = ["mail@reidbeels.com"]
10
10
  spec.summary = "A user interface for `paper_trail` versioning data in Ruby on Rails 3 applications."
@@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
18
18
  spec.require_paths = ["lib"]
19
19
 
20
20
  spec.add_dependency "rails", [">= 3.0", "< 5.0"]
21
- spec.add_dependency "paper_trail", "~> 3.0"
21
+ spec.add_dependency "paper_trail", [">= 3.0", "< 5.0"]
22
22
 
23
23
  spec.add_development_dependency "rake", "~> 10.4"
24
24
  spec.add_development_dependency "sqlite3", "~> 1.3"
@@ -4,6 +4,6 @@
4
4
  gem "sqlite3-ruby", :require => "sqlite3"
5
5
  gem "rake"
6
6
  gem "will_paginate", "~> 3.0.pre2"
7
- gem "paper_trail_manager", :path => "/home/micah/work/paper_trail_manager"
7
+ gem "paper_trail_manager", :path => __FILE__ + "/../../../"
8
8
  gem 'factory_girl_rails', '~> 1.7.0'
9
9
  gem 'rspec-rails', '~> 2.11.0'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: paper_trail_manager
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - mail@reidbeels.com
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-06-20 00:00:00.000000000 Z
11
+ date: 2015-09-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -34,16 +34,22 @@ dependencies:
34
34
  name: paper_trail
35
35
  requirement: !ruby/object:Gem::Requirement
36
36
  requirements:
37
- - - "~>"
37
+ - - ">="
38
38
  - !ruby/object:Gem::Version
39
39
  version: '3.0'
40
+ - - "<"
41
+ - !ruby/object:Gem::Version
42
+ version: '5.0'
40
43
  type: :runtime
41
44
  prerelease: false
42
45
  version_requirements: !ruby/object:Gem::Requirement
43
46
  requirements:
44
- - - "~>"
47
+ - - ">="
45
48
  - !ruby/object:Gem::Version
46
49
  version: '3.0'
50
+ - - "<"
51
+ - !ruby/object:Gem::Version
52
+ version: '5.0'
47
53
  - !ruby/object:Gem::Dependency
48
54
  name: rake
49
55
  requirement: !ruby/object:Gem::Requirement
@@ -163,14 +169,22 @@ files:
163
169
  - app/views/paper_trail_manager/changes/index.atom.builder
164
170
  - app/views/paper_trail_manager/changes/index.html.erb
165
171
  - app/views/paper_trail_manager/changes/show.html.erb
166
- - gemfiles/rails_3.2_kaminari.gemfile
167
- - gemfiles/rails_3.2_will_paginate.gemfile
168
- - gemfiles/rails_4.0_kaminari.gemfile
169
- - gemfiles/rails_4.0_will_paginate.gemfile
170
- - gemfiles/rails_4.1_kaminari.gemfile
171
- - gemfiles/rails_4.1_will_paginate.gemfile
172
- - gemfiles/rails_4.2_kaminari.gemfile
173
- - gemfiles/rails_4.2_will_paginate.gemfile
172
+ - gemfiles/rails_3.2.0_paper_trail_3.0_kaminari.gemfile
173
+ - gemfiles/rails_3.2.0_paper_trail_3.0_will_paginate.gemfile
174
+ - gemfiles/rails_3.2.0_paper_trail_4.0_kaminari.gemfile
175
+ - gemfiles/rails_3.2.0_paper_trail_4.0_will_paginate.gemfile
176
+ - gemfiles/rails_4.0.0_paper_trail_3.0_kaminari.gemfile
177
+ - gemfiles/rails_4.0.0_paper_trail_3.0_will_paginate.gemfile
178
+ - gemfiles/rails_4.0.0_paper_trail_4.0_kaminari.gemfile
179
+ - gemfiles/rails_4.0.0_paper_trail_4.0_will_paginate.gemfile
180
+ - gemfiles/rails_4.1.0_paper_trail_3.0_kaminari.gemfile
181
+ - gemfiles/rails_4.1.0_paper_trail_3.0_will_paginate.gemfile
182
+ - gemfiles/rails_4.1.0_paper_trail_4.0_kaminari.gemfile
183
+ - gemfiles/rails_4.1.0_paper_trail_4.0_will_paginate.gemfile
184
+ - gemfiles/rails_4.2.2_paper_trail_3.0_kaminari.gemfile
185
+ - gemfiles/rails_4.2.2_paper_trail_3.0_will_paginate.gemfile
186
+ - gemfiles/rails_4.2.2_paper_trail_4.0_kaminari.gemfile
187
+ - gemfiles/rails_4.2.2_paper_trail_4.0_will_paginate.gemfile
174
188
  - lib/paper_trail_manager.rb
175
189
  - paper_trail_manager.gemspec
176
190
  - spec/controllers/entities_controller_spec.rb