acts_as_dynamic 0.0.3 → 0.0.4

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.
@@ -1,6 +1,6 @@
1
1
  # <libraries>
2
2
 
3
- require "acts_as_dynamic/object"
3
+ require "acts_as_dynamic/class"
4
4
  require "acts_as_dynamic/base"
5
5
  require "acts_as_dynamic/version"
6
6
 
@@ -8,7 +8,7 @@ module ActsAsDynamic
8
8
 
9
9
  # Builder
10
10
  def initialize args = {}
11
- args.each_pair do |attribute, value|
11
+ (args || {}).each_pair do |attribute, value|
12
12
  self.send "#{attribute}=", value
13
13
  end
14
14
  self
@@ -33,6 +33,16 @@ module ActsAsDynamic
33
33
  end
34
34
  end
35
35
 
36
+ # New record?
37
+ def new_record?
38
+ true
39
+ end
40
+
41
+ # Persisted?
42
+ def persisted?
43
+ false
44
+ end
45
+
36
46
  # </methods>
37
47
 
38
48
  end
@@ -0,0 +1,20 @@
1
+ # Class
2
+ class Class
3
+
4
+ # <class methods>
5
+
6
+ # Acts as dynamic
7
+ def acts_as_dynamic
8
+ # ActsAsDynamic
9
+ include ActsAsDynamic::Base
10
+
11
+ # ActiveModel
12
+ require "active_model"
13
+ include ActiveModel::Validations
14
+ include ActiveModel::Serialization
15
+ extend ActiveModel::Naming
16
+ end
17
+
18
+ # </class methods>
19
+
20
+ end
@@ -5,7 +5,7 @@ module ActsAsDynamic
5
5
  module VERSION
6
6
  MAJOR = 0
7
7
  MINOR = 0
8
- TINY = 3
8
+ TINY = 4
9
9
 
10
10
  STRING = [
11
11
  MAJOR,
metadata CHANGED
@@ -1,68 +1,60 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: acts_as_dynamic
3
- version: !ruby/object:Gem::Version
4
- hash: 25
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.4
5
5
  prerelease:
6
- segments:
7
- - 0
8
- - 0
9
- - 3
10
- version: 0.0.3
11
6
  platform: ruby
12
- authors:
7
+ authors:
13
8
  - Juan Colacelli
14
9
  autorequire:
15
10
  bindir: bin
16
11
  cert_chain: []
17
-
18
- date: 2012-03-24 00:00:00 Z
19
- dependencies: []
20
-
12
+ date: 2012-04-18 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: activemodel
16
+ requirement: &687350 !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: *687350
21
25
  description: Use dynamic attributes in your classes
22
26
  email: juancolacelli@gmail.com
23
27
  executables: []
24
-
25
28
  extensions: []
26
-
27
29
  extra_rdoc_files: []
28
-
29
- files:
30
- - lib/acts_as_dynamic.rb
30
+ files:
31
31
  - lib/acts_as_dynamic/base.rb
32
+ - lib/acts_as_dynamic/class.rb
32
33
  - lib/acts_as_dynamic/version.rb
33
- - lib/acts_as_dynamic/object.rb
34
+ - lib/acts_as_dynamic.rb
34
35
  homepage: https://github.com/juancolacelli/acts_as_dynamic
35
- licenses:
36
+ licenses:
36
37
  - MIT
37
38
  post_install_message:
38
39
  rdoc_options: []
39
-
40
- require_paths:
40
+ require_paths:
41
41
  - lib
42
- required_ruby_version: !ruby/object:Gem::Requirement
42
+ required_ruby_version: !ruby/object:Gem::Requirement
43
43
  none: false
44
- requirements:
45
- - - ">="
46
- - !ruby/object:Gem::Version
47
- hash: 3
48
- segments:
49
- - 0
50
- version: "0"
51
- required_rubygems_version: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ! '>='
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ required_rubygems_version: !ruby/object:Gem::Requirement
52
49
  none: false
53
- requirements:
54
- - - ">="
55
- - !ruby/object:Gem::Version
56
- hash: 3
57
- segments:
58
- - 0
59
- version: "0"
50
+ requirements:
51
+ - - ! '>='
52
+ - !ruby/object:Gem::Version
53
+ version: '0'
60
54
  requirements: []
61
-
62
55
  rubyforge_project:
63
- rubygems_version: 1.8.10
56
+ rubygems_version: 1.8.15
64
57
  signing_key:
65
58
  specification_version: 3
66
59
  summary: Use dynamic attributes in your classes
67
60
  test_files: []
68
-
@@ -1,13 +0,0 @@
1
- # Class
2
- class Class
3
-
4
- # <class methods>
5
-
6
- # Acts as dynamic
7
- def acts_as_dynamic
8
- include ActsAsDynamic::Base
9
- end
10
-
11
- # </class methods>
12
-
13
- end