active_scaffold_sortable_vho 3.0.0 → 3.0.1

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.
@@ -0,0 +1,94 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
+ # -*- encoding: utf-8 -*-
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = %q{active_scaffold_sortable_vho}
8
+ s.version = "3.0.1"
9
+
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
+ s.authors = ["Volker Hochstein"]
12
+ s.date = %q{2011-02-01}
13
+ s.description = %q{Sort Tree or List Structures by Drag n Drop}
14
+ s.email = %q{activescaffold@googlegroups.com}
15
+ s.extra_rdoc_files = [
16
+ "LICENSE.txt",
17
+ "README.textile"
18
+ ]
19
+ s.files = [
20
+ ".document",
21
+ "LICENSE.txt",
22
+ "README.textile",
23
+ "Rakefile",
24
+ "active_scaffold_sortable_vho.gemspec",
25
+ "frontends/default/stylesheets/sortable.css",
26
+ "frontends/default/views/_list_with_header.html.erb",
27
+ "frontends/default/views/on_create.js.rjs",
28
+ "frontends/default/views/on_update.js.rjs",
29
+ "frontends/default/views/reorder.js.rjs",
30
+ "init.rb",
31
+ "lib/active_scaffold/actions/sortable.rb",
32
+ "lib/active_scaffold/config/sortable.rb",
33
+ "lib/active_scaffold/helpers/sortable_helpers.rb",
34
+ "lib/active_scaffold_sortable.rb",
35
+ "lib/active_scaffold_sortable/config/core.rb",
36
+ "lib/active_scaffold_sortable/core.rb",
37
+ "lib/active_scaffold_sortable/version.rb",
38
+ "lib/active_scaffold_sortable/view_helpers.rb",
39
+ "lib/active_scaffold_sortable_vho.rb",
40
+ "test/auto_models_controller_test.rb",
41
+ "test/config_test.rb",
42
+ "test/controllers/auto_models_controller.rb",
43
+ "test/controllers/models_controller.rb",
44
+ "test/controllers/sortable_models_controller.rb",
45
+ "test/models/auto_model.rb",
46
+ "test/models/model.rb",
47
+ "test/router_test.rb",
48
+ "test/schema.rb",
49
+ "test/test_helper.rb"
50
+ ]
51
+ s.homepage = %q{http://github.com/vhochstein/active_scaffold_sortable}
52
+ s.licenses = ["MIT"]
53
+ s.require_paths = ["lib"]
54
+ s.rubygems_version = %q{1.3.7}
55
+ s.summary = %q{Drag n Drop Sorting for Activescaffold}
56
+ s.test_files = [
57
+ "test/auto_models_controller_test.rb",
58
+ "test/config_test.rb",
59
+ "test/controllers/auto_models_controller.rb",
60
+ "test/controllers/models_controller.rb",
61
+ "test/controllers/sortable_models_controller.rb",
62
+ "test/models/auto_model.rb",
63
+ "test/models/model.rb",
64
+ "test/router_test.rb",
65
+ "test/schema.rb",
66
+ "test/test_helper.rb"
67
+ ]
68
+
69
+ if s.respond_to? :specification_version then
70
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
71
+ s.specification_version = 3
72
+
73
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
74
+ s.add_development_dependency(%q<shoulda>, [">= 0"])
75
+ s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
76
+ s.add_development_dependency(%q<jeweler>, ["~> 1.5.2"])
77
+ s.add_development_dependency(%q<rcov>, [">= 0"])
78
+ s.add_runtime_dependency(%q<active_scaffold_vho>, ["~> 3.0"])
79
+ else
80
+ s.add_dependency(%q<shoulda>, [">= 0"])
81
+ s.add_dependency(%q<bundler>, ["~> 1.0.0"])
82
+ s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
83
+ s.add_dependency(%q<rcov>, [">= 0"])
84
+ s.add_dependency(%q<active_scaffold_vho>, ["~> 3.0"])
85
+ end
86
+ else
87
+ s.add_dependency(%q<shoulda>, [">= 0"])
88
+ s.add_dependency(%q<bundler>, ["~> 1.0.0"])
89
+ s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
90
+ s.add_dependency(%q<rcov>, [">= 0"])
91
+ s.add_dependency(%q<active_scaffold_vho>, ["~> 3.0"])
92
+ end
93
+ end
94
+
@@ -1,5 +1,5 @@
1
1
  page << render(:super, :locals => {:insert_at => :bottom})
2
- unless nested? && (nested.belongs_to? || nested.has_one?)
2
+ unless nested_singular_association?
3
3
  if ActiveScaffold.js_framework == :prototype
4
4
  page.sortable(*sort_params)
5
5
  elsif ActiveScaffold.js_framework == :jquery
@@ -1,6 +1,6 @@
1
1
  page << render(:super)
2
2
  # if we are currently editing a nested belongs_to association do not do any sorting stuff
3
- unless nested? && (nested.belongs_to? || nested.has_one?)
3
+ unless nested_singular_association?
4
4
  if ActiveScaffold.js_framework == :prototype
5
5
  page.sortable(*sort_params)
6
6
  elsif ActiveScaffold.js_framework == :jquery
data/init.rb CHANGED
@@ -1,5 +1,3 @@
1
- ACTIVE_SCAFFOLD_SORTABLE_INSTALLED = :plugin
2
-
3
1
  require 'active_scaffold_sortable'
4
2
 
5
3
  begin
@@ -1,6 +1,6 @@
1
- require "#{File.dirname(__FILE__)}/active_scaffold_sortable/config/core.rb"
2
- require "#{File.dirname(__FILE__)}/active_scaffold_sortable/core.rb"
3
- require "#{File.dirname(__FILE__)}/active_scaffold_sortable/view_helpers.rb"
1
+ require "active_scaffold_sortable/config/core.rb"
2
+ require "active_scaffold_sortable/core.rb"
3
+ require "active_scaffold_sortable/view_helpers.rb"
4
4
 
5
5
 
6
6
  module ActiveScaffoldSortable
@@ -36,4 +36,4 @@ Rails::Application.initializer("active_scaffold_sortable.install_assets", :after
36
36
  rescue
37
37
  raise $! unless Rails.env == 'production'
38
38
  end
39
- end unless defined?(ACTIVE_SCAFFOLD_SORTABLE_INSTALLED) && ACTIVE_SCAFFOLD_SORTABLE_INSTALLED == :plugin
39
+ end if defined?(ACTIVE_SCAFFOLD_SORTABLE_GEM)
@@ -2,7 +2,7 @@ module ActiveScaffoldSortable
2
2
  module Version
3
3
  MAJOR = 3
4
4
  MINOR = 0
5
- PATCH = 0
5
+ PATCH = 1
6
6
 
7
7
  STRING = [MAJOR, MINOR, PATCH].compact.join('.')
8
8
  end
@@ -1,2 +1,2 @@
1
- ACTIVE_SCAFFOLD_SORTABLE_INSTALLED = :gem
1
+ ACTIVE_SCAFFOLD_SORTABLE_GEM = true
2
2
  require 'active_scaffold_sortable'
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_scaffold_sortable_vho
3
3
  version: !ruby/object:Gem::Version
4
- hash: 7
4
+ hash: 5
5
5
  prerelease: false
6
6
  segments:
7
7
  - 3
8
8
  - 0
9
- - 0
10
- version: 3.0.0
9
+ - 1
10
+ version: 3.0.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Volker Hochstein
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-01-27 00:00:00 +01:00
18
+ date: 2011-02-01 00:00:00 +01:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -107,6 +107,7 @@ files:
107
107
  - LICENSE.txt
108
108
  - README.textile
109
109
  - Rakefile
110
+ - active_scaffold_sortable_vho.gemspec
110
111
  - frontends/default/stylesheets/sortable.css
111
112
  - frontends/default/views/_list_with_header.html.erb
112
113
  - frontends/default/views/on_create.js.rjs