cowtech-rails 3.0.0 → 3.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,3 @@
1
+ pkg/
2
+ .idea/
3
+ Gemfile.lock
data/Gemfile ADDED
@@ -0,0 +1,9 @@
1
+ # encoding: utf-8
2
+ #
3
+ # This file is part of the cowtech-rails gem. Copyright (C) 2011 and above Shogun <shogun_panda@me.com>.
4
+ # Licensed under the MIT license, which can be found at http://www.opensource.org/licenses/mit-license.php.
5
+ #
6
+
7
+ source "http://rubygems.org"
8
+
9
+ gemspec
@@ -0,0 +1,7 @@
1
+ # encoding: utf-8
2
+ #
3
+ # This file is part of the cowtech-rails gem. Copyright (C) 2011 and above Shogun <shogun_panda@me.com>.
4
+ # Licensed under the MIT license, which can be found at http://www.opensource.org/licenses/mit-license.php.
5
+ #
6
+
7
+ require "bundler/gem_tasks"
@@ -74,36 +74,29 @@ module Cowtech
74
74
  end
75
75
  end
76
76
 
77
- module InstanceMethods
78
- # Decommentare for numeric type ids
79
- # def safe_id
80
- # self.id ? self.id : 0
81
- # end
82
-
83
- def editable?(user = nil)
84
- true
85
- end
77
+ def editable?(user = nil)
78
+ true
79
+ end
86
80
 
87
- def deletable?(user = nil)
88
- true
89
- end
81
+ def deletable?(user = nil)
82
+ true
83
+ end
90
84
 
91
- def delete(definitive = false)
92
- if definitive != true then
93
- if self.deletable? then
94
- super()
95
- true
96
- else
97
- false
98
- end
85
+ def delete(definitive = false)
86
+ if definitive != true then
87
+ if self.deletable? then
88
+ super()
89
+ true
99
90
  else
100
- self.delete!
91
+ false
101
92
  end
93
+ else
94
+ self.delete!
102
95
  end
96
+ end
103
97
 
104
- def is?(other)
105
- other ? (self.id == self.class.__safe_index_find(other).id) : false
106
- end
98
+ def is?(other)
99
+ other ? (self.id == self.class.__safe_index_find(other).id) : false
107
100
  end
108
101
  end
109
102
  end
@@ -16,16 +16,14 @@ module Cowtech
16
16
  set_callback(:update, :after) { |d| d.log_activity(:update) }
17
17
  end
18
18
 
19
- module InstanceMethods
20
- def delete(options = {})
21
- log_activity(:delete)
22
- super(options)
23
- end
19
+ def delete(options = {})
20
+ log_activity(:delete)
21
+ super(options)
22
+ end
24
23
 
25
- def restore
26
- log_activity(:restore)
27
- super
28
- end
24
+ def restore
25
+ log_activity(:restore)
26
+ super
29
27
  end
30
28
  end
31
29
  end
@@ -0,0 +1,32 @@
1
+ # encoding: utf-8
2
+ #
3
+ # This file is part of the cowtech-rails gem. Copyright (C) 2011 and above Shogun <shogun_panda@me.com>.
4
+ # Licensed under the MIT license, which can be found at http://www.opensource.org/licenses/mit-license.php.
5
+ #
6
+
7
+ require "./lib/cowtech/version"
8
+
9
+ Gem::Specification.new do |s|
10
+ s.name = "cowtech-rails"
11
+ s.version = Cowtech::Rails::Version::STRING
12
+ s.authors = ["Shogun"]
13
+ s.email = ["shogun_panda@me.com"]
14
+ s.homepage = "http://github.com/ShogunPanda/cowtech-lib"
15
+ s.summary = %q{A general purpose Rails utility plugin.}
16
+ s.description = %q{A general purpose Rails utility plugin.}
17
+
18
+ s.rubyforge_project = "cowtech-rails"
19
+ s.files = `git ls-files`.split("\n")
20
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
21
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
22
+ s.require_paths = ["lib"]
23
+
24
+ s.required_ruby_version = ">= 1.9.2"
25
+ s.add_dependency "actionmailer"
26
+ s.add_dependency "actionpack"
27
+ s.add_dependency "activerecord"
28
+ s.add_dependency "bson_ext"
29
+ s.add_dependency "cowtech-extensions"
30
+ s.add_dependency "mongoid"
31
+ s.add_dependency "rake"
32
+ end
@@ -4,9 +4,11 @@
4
4
  # Licensed under the MIT license, which can be found at http://www.opensource.org/licenses/mit-license.php.
5
5
  #
6
6
 
7
- module SubdomainFu
8
- def self.override_only_path?
9
- true
7
+ if defined?(SubdomainFu) then
8
+ module SubdomainFu
9
+ def self.override_only_path?
10
+ true
11
+ end
10
12
  end
11
13
  end
12
14
 
@@ -9,7 +9,7 @@ module Cowtech
9
9
  module Version
10
10
  MAJOR = 3
11
11
  MINOR = 0
12
- PATCH = 0
12
+ PATCH = 1
13
13
 
14
14
  STRING = [MAJOR, MINOR, PATCH].compact.join(".")
15
15
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cowtech-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0
4
+ version: 3.0.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-04-16 00:00:00.000000000Z
12
+ date: 2012-04-20 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
- name: jeweler
16
- requirement: &70184745284020 !ruby/object:Gem::Requirement
15
+ name: actionmailer
16
+ requirement: &70322457722140 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,43 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70184745284020
24
+ version_requirements: *70322457722140
25
+ - !ruby/object:Gem::Dependency
26
+ name: actionpack
27
+ requirement: &70322457721680 !ruby/object:Gem::Requirement
28
+ none: false
29
+ requirements:
30
+ - - ! '>='
31
+ - !ruby/object:Gem::Version
32
+ version: '0'
33
+ type: :runtime
34
+ prerelease: false
35
+ version_requirements: *70322457721680
36
+ - !ruby/object:Gem::Dependency
37
+ name: activerecord
38
+ requirement: &70322457721260 !ruby/object:Gem::Requirement
39
+ none: false
40
+ requirements:
41
+ - - ! '>='
42
+ - !ruby/object:Gem::Version
43
+ version: '0'
44
+ type: :runtime
45
+ prerelease: false
46
+ version_requirements: *70322457721260
47
+ - !ruby/object:Gem::Dependency
48
+ name: bson_ext
49
+ requirement: &70322457720840 !ruby/object:Gem::Requirement
50
+ none: false
51
+ requirements:
52
+ - - ! '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ type: :runtime
56
+ prerelease: false
57
+ version_requirements: *70322457720840
25
58
  - !ruby/object:Gem::Dependency
26
59
  name: cowtech-extensions
27
- requirement: &70184745283180 !ruby/object:Gem::Requirement
60
+ requirement: &70322457720420 !ruby/object:Gem::Requirement
28
61
  none: false
29
62
  requirements:
30
63
  - - ! '>='
@@ -32,14 +65,40 @@ dependencies:
32
65
  version: '0'
33
66
  type: :runtime
34
67
  prerelease: false
35
- version_requirements: *70184745283180
68
+ version_requirements: *70322457720420
69
+ - !ruby/object:Gem::Dependency
70
+ name: mongoid
71
+ requirement: &70322457720000 !ruby/object:Gem::Requirement
72
+ none: false
73
+ requirements:
74
+ - - ! '>='
75
+ - !ruby/object:Gem::Version
76
+ version: '0'
77
+ type: :runtime
78
+ prerelease: false
79
+ version_requirements: *70322457720000
80
+ - !ruby/object:Gem::Dependency
81
+ name: rake
82
+ requirement: &70322457719580 !ruby/object:Gem::Requirement
83
+ none: false
84
+ requirements:
85
+ - - ! '>='
86
+ - !ruby/object:Gem::Version
87
+ version: '0'
88
+ type: :runtime
89
+ prerelease: false
90
+ version_requirements: *70322457719580
36
91
  description: A general purpose Rails utility plugin.
37
- email: shogun_panda@me.com
92
+ email:
93
+ - shogun_panda@me.com
38
94
  executables: []
39
95
  extensions: []
40
- extra_rdoc_files:
41
- - README.rdoc
96
+ extra_rdoc_files: []
42
97
  files:
98
+ - .gitignore
99
+ - Gemfile
100
+ - README.rdoc
101
+ - Rakefile
43
102
  - app/helpers/cowtech/ruby_on_rails/helpers/application_helper.rb
44
103
  - app/helpers/cowtech/ruby_on_rails/helpers/ar_crud_helper.rb
45
104
  - app/helpers/cowtech/ruby_on_rails/helpers/browser_helper.rb
@@ -52,6 +111,7 @@ files:
52
111
  - app/models/cowtech/ruby_on_rails/models/mongoid/cowtech.rb
53
112
  - app/models/cowtech/ruby_on_rails/models/mongoid/logging.rb
54
113
  - app/models/cowtech/ruby_on_rails/models/mongoid/sequence.rb
114
+ - cowtech-rails.gemspec
55
115
  - lib/cowtech.rb
56
116
  - lib/cowtech/extensions.rb
57
117
  - lib/cowtech/monkey_patches.rb
@@ -63,10 +123,8 @@ files:
63
123
  - lib/cowtech/tasks/sql.rake
64
124
  - lib/cowtech/version.rb
65
125
  - rails/init.rb
66
- - README.rdoc
67
- homepage: http://github.com/ShogunPanda/cowtech-rails
68
- licenses:
69
- - MIT
126
+ homepage: http://github.com/ShogunPanda/cowtech-lib
127
+ licenses: []
70
128
  post_install_message:
71
129
  rdoc_options: []
72
130
  require_paths:
@@ -84,7 +142,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
84
142
  - !ruby/object:Gem::Version
85
143
  version: '0'
86
144
  requirements: []
87
- rubyforge_project:
145
+ rubyforge_project: cowtech-rails
88
146
  rubygems_version: 1.8.15
89
147
  signing_key:
90
148
  specification_version: 3