dragoon_system 0.1.0 → 0.1.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.
data/Rakefile CHANGED
@@ -17,7 +17,7 @@ Jeweler::Tasks.new do |gem|
17
17
  gem.license = "MIT"
18
18
  gem.summary = %Q{personal suit}
19
19
  gem.description = %Q{personal suit}
20
- gem.email = "zhanyinan@sungomedical.com"
20
+ gem.email = "toward7seas@gmail.com"
21
21
  gem.authors = ["zhanyinan"]
22
22
  # Include your dependencies below. Runtime dependencies are required when using your gem,
23
23
  # and development dependencies are only needed for development (ie running rake tasks, tests, etc)
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.0
1
+ 0.1.1
@@ -5,13 +5,13 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{dragoon_system}
8
- s.version = "0.1.0"
8
+ s.version = "0.1.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["zhanyinan"]
12
- s.date = %q{2011-02-28}
12
+ s.date = %q{2011-03-01}
13
13
  s.description = %q{personal suit}
14
- s.email = %q{zhanyinan@sungomedical.com}
14
+ s.email = %q{toward7seas@gmail.com}
15
15
  s.extra_rdoc_files = [
16
16
  "LICENSE.txt",
17
17
  "README.rdoc"
@@ -25,9 +25,9 @@ Gem::Specification.new do |s|
25
25
  "Rakefile",
26
26
  "VERSION",
27
27
  "dragoon_system.gemspec",
28
- "lib/active_record/base.rb",
28
+ "lib/active_record/base_patch.rb",
29
29
  "lib/dragoon_system.rb",
30
- "lib/string.rb",
30
+ "lib/string_path.rb",
31
31
  "test/helper.rb",
32
32
  "test/test_dragoon_system.rb"
33
33
  ]
@@ -0,0 +1,46 @@
1
+ module ActiveRecord
2
+ class Base
3
+ extend ActiveSupport::Memoizable
4
+
5
+ def error_messages
6
+ errors.full_messages.join("<br />")
7
+ end
8
+
9
+ private
10
+
11
+ def helpers
12
+ ApplicationController.helpers
13
+ end
14
+
15
+ class << self
16
+
17
+ def method_chains(params, *method_names)
18
+ method_names.inject(scoped) do |result, method_name|
19
+ result.send(method_name, params[method_name])
20
+ end
21
+ end
22
+
23
+ private
24
+
25
+ def or_empty_hash(param)
26
+ unless param.blank?
27
+ yield
28
+ else
29
+ {}
30
+ end
31
+ end
32
+
33
+ def handle_input(input)
34
+ if input.blank?
35
+ []
36
+ else
37
+ input.split(" ").uniq
38
+ end
39
+ end
40
+ end
41
+
42
+
43
+ end
44
+ end
45
+
46
+
@@ -13,7 +13,6 @@ Dir["#{File.dirname(__FILE__)}/**/*.rb"].each do |file|
13
13
  unless file == __FILE__
14
14
  require file
15
15
  end
16
-
17
16
  end
18
17
 
19
18
 
File without changes
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dragoon_system
3
3
  version: !ruby/object:Gem::Version
4
- hash: 27
4
+ hash: 25
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 0
10
- version: 0.1.0
9
+ - 1
10
+ version: 0.1.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - zhanyinan
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-02-28 00:00:00 +08:00
18
+ date: 2011-03-01 00:00:00 +08:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -81,7 +81,7 @@ dependencies:
81
81
  type: :development
82
82
  requirement: *id004
83
83
  description: personal suit
84
- email: zhanyinan@sungomedical.com
84
+ email: toward7seas@gmail.com
85
85
  executables: []
86
86
 
87
87
  extensions: []
@@ -98,9 +98,9 @@ files:
98
98
  - Rakefile
99
99
  - VERSION
100
100
  - dragoon_system.gemspec
101
- - lib/active_record/base.rb
101
+ - lib/active_record/base_patch.rb
102
102
  - lib/dragoon_system.rb
103
- - lib/string.rb
103
+ - lib/string_path.rb
104
104
  - test/helper.rb
105
105
  - test/test_dragoon_system.rb
106
106
  has_rdoc: true
@@ -1,15 +0,0 @@
1
- require 'active_record'
2
-
3
- module ActiveRecord
4
- class Base
5
- extend ActiveSupport::Memoizable
6
-
7
- def helpers
8
- ApplicationController.helpers
9
- end
10
-
11
-
12
- end
13
- end
14
-
15
-