motion_migrate 0.1.0 → 0.2.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.
- checksums.yaml +7 -0
- data/lib/motion_migrate/motion_generate/parser.rb +2 -2
- data/lib/motion_migrate/motion_generate/property.rb +57 -49
- data/lib/version.rb +1 -1
- data/motion_migrate.gemspec +1 -0
- data/spec/property_spec.rb +22 -12
- data/spec_project/Gemfile +2 -2
- data/spec_project/Rakefile +1 -1
- data/spec_project/app/app_delegate.rb +44 -2
- data/spec_project/app/controllers/planes_view_controller.rb +46 -0
- data/spec_project/app/hash_transformer.rb +20 -0
- data/spec_project/app/models/pilot.rb +5 -4
- data/spec_project/app/models/plane.rb +3 -3
- data/spec_project/db/schema.xcdatamodeld/.xccurrentversion +1 -1
- data/spec_project/db/schema.xcdatamodeld/schema.11.xcdatamodel/contents +19 -0
- data/spec_project/spec/property_spec.rb +19 -0
- data/spec_project/vendor/Podfile.lock +4 -5
- metadata +38 -18
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 7549283c381476dee74df55d48360b85abf62524
|
4
|
+
data.tar.gz: f73dfb6e0373195504b4ff7b81eb225b4ac73510
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 834385b7af6c8eaac27f4d605eff98fa276e0776fe85caa18f4093e709c35a6b6d34eec8561fe1b27213875ad7d3539826a5f3834972bc3487ea2bc4772d0acc
|
7
|
+
data.tar.gz: 047f4e2da54a8d373aecd7e79f10cc31aa1882497090755e5a5892b69440b8a74a796ae6273ad82f097b5c9696aae6e9320a41a22f6b1a043aafd9125f89af11
|
@@ -1,5 +1,5 @@
|
|
1
1
|
module MotionMigrate
|
2
|
-
module MotionGenerate
|
2
|
+
module MotionGenerate
|
3
3
|
module Property
|
4
4
|
def self.included(base)
|
5
5
|
base.extend(ClassMethods)
|
@@ -32,75 +32,80 @@ module MotionMigrate
|
|
32
32
|
def raise_if_property_type_not_allowed(type)
|
33
33
|
unless property_type_allowed?(type)
|
34
34
|
raise <<-ERROR
|
35
|
-
! The type must be one of the following:
|
36
|
-
! :string
|
37
|
-
! :integer_16
|
38
|
-
! :integer_32
|
39
|
-
! :integer_64
|
40
|
-
! :decimal
|
41
|
-
! :double
|
42
|
-
! :float
|
43
|
-
! :boolean
|
44
|
-
! :date
|
45
|
-
! :binary_data
|
35
|
+
! The type must be one of the following:
|
36
|
+
! :string
|
37
|
+
! :integer_16
|
38
|
+
! :integer_32
|
39
|
+
! :integer_64
|
40
|
+
! :decimal
|
41
|
+
! :double
|
42
|
+
! :float
|
43
|
+
! :boolean
|
44
|
+
! :date
|
45
|
+
! :binary_data
|
46
|
+
! :transformable
|
46
47
|
ERROR
|
47
48
|
end
|
48
49
|
end
|
49
50
|
|
50
51
|
def property_type_allowed?(type)
|
51
52
|
[
|
52
|
-
:string,
|
53
|
-
:integer_16,
|
54
|
-
:integer_32,
|
55
|
-
:integer_64,
|
56
|
-
:decimal,
|
57
|
-
:double,
|
58
|
-
:float,
|
59
|
-
:boolean,
|
60
|
-
:date,
|
61
|
-
:binary_data
|
53
|
+
:string,
|
54
|
+
:integer_16,
|
55
|
+
:integer_32,
|
56
|
+
:integer_64,
|
57
|
+
:decimal,
|
58
|
+
:double,
|
59
|
+
:float,
|
60
|
+
:boolean,
|
61
|
+
:date,
|
62
|
+
:binary_data,
|
63
|
+
:transformable
|
62
64
|
].include?(type)
|
63
65
|
end
|
64
66
|
|
65
67
|
def raise_if_property_option_not_allowed(type, option)
|
66
68
|
unless property_option_allowed?(type, option)
|
67
69
|
raise <<-ERROR
|
68
|
-
! The option must be one of the following:
|
70
|
+
! The option must be one of the following:
|
71
|
+
!
|
72
|
+
! For type :string:
|
73
|
+
! :min
|
74
|
+
! :max
|
75
|
+
! :default
|
76
|
+
! :regex
|
69
77
|
!
|
70
|
-
! For type :
|
71
|
-
!
|
72
|
-
! :max
|
73
|
-
! :default
|
74
|
-
! :regex
|
78
|
+
! For type :boolean:
|
79
|
+
! :default
|
75
80
|
!
|
76
|
-
! For type :
|
77
|
-
! :
|
81
|
+
! For type :date, :integer_16, :integer_32, :integer_64, :decimal, :double or :float:
|
82
|
+
! :min
|
83
|
+
! :max
|
84
|
+
! :default
|
78
85
|
!
|
79
|
-
! For type :
|
80
|
-
! :
|
81
|
-
! :max
|
82
|
-
! :default
|
86
|
+
! For type :binary_data:
|
87
|
+
! :external_storage
|
83
88
|
!
|
84
|
-
! For type :
|
85
|
-
! :
|
89
|
+
! For type :transformable:
|
90
|
+
! :transformer_name
|
86
91
|
!
|
87
|
-
! Options allowed for all types:
|
88
|
-
! :required
|
89
|
-
! :transient
|
90
|
-
! :indexed
|
91
|
-
! :spotlight
|
92
|
-
! :truth_file
|
92
|
+
! Options allowed for all types:
|
93
|
+
! :required
|
94
|
+
! :transient
|
95
|
+
! :indexed
|
96
|
+
! :spotlight
|
97
|
+
! :truth_file
|
93
98
|
ERROR
|
94
99
|
end
|
95
100
|
end
|
96
101
|
|
97
102
|
def property_option_allowed?(type, option)
|
98
103
|
type = :number if [
|
99
|
-
:integer_16,
|
100
|
-
:integer_32,
|
101
|
-
:integer_64,
|
102
|
-
:decimal,
|
103
|
-
:double,
|
104
|
+
:integer_16,
|
105
|
+
:integer_32,
|
106
|
+
:integer_64,
|
107
|
+
:decimal,
|
108
|
+
:double,
|
104
109
|
:float,
|
105
110
|
:date
|
106
111
|
].include?(type)
|
@@ -109,7 +114,8 @@ module MotionMigrate
|
|
109
114
|
number: [:min, :max, :default],
|
110
115
|
string: [:min, :max, :default, :regex],
|
111
116
|
boolean: [:default],
|
112
|
-
binary_data: [:external_storage]
|
117
|
+
binary_data: [:external_storage],
|
118
|
+
transformable: [:transformer_name]
|
113
119
|
}[type]
|
114
120
|
|
115
121
|
allowed_options += [
|
@@ -161,6 +167,8 @@ module MotionMigrate
|
|
161
167
|
attributes[:regularExpressionString] = value
|
162
168
|
when :external_storage
|
163
169
|
attributes[:allowsExternalBinaryDataStorage] = core_data_boolean(value)
|
170
|
+
when :transformer_name
|
171
|
+
attributes[:valueTransformerName] = value
|
164
172
|
end
|
165
173
|
end
|
166
174
|
attributes
|
@@ -168,4 +176,4 @@ module MotionMigrate
|
|
168
176
|
end
|
169
177
|
end
|
170
178
|
end
|
171
|
-
end
|
179
|
+
end
|
data/lib/version.rb
CHANGED
data/motion_migrate.gemspec
CHANGED
data/spec/property_spec.rb
CHANGED
@@ -26,23 +26,23 @@ module MotionMigrate
|
|
26
26
|
}
|
27
27
|
end
|
28
28
|
|
29
|
-
%w(string integer_16 integer_32 integer_64 decimal double float date binary_data boolean).each do |type|
|
29
|
+
%w(string integer_16 integer_32 integer_64 decimal double float date binary_data boolean transformable).each do |type|
|
30
30
|
it "should be able to define #{type}" do
|
31
31
|
type_string = type.split("_").each{|word| word.capitalize! }.join(" ")
|
32
32
|
type_string = "Binary" if type == "binary_data"
|
33
|
-
MotionMigrate::Model.property(:field, type).should == { :name => :field,
|
34
|
-
:attributeType => type_string,
|
33
|
+
MotionMigrate::Model.property(:field, type).should == { :name => :field,
|
34
|
+
:attributeType => type_string,
|
35
35
|
:optional=>"YES",
|
36
36
|
:syncable => "YES" }
|
37
37
|
end
|
38
38
|
end
|
39
39
|
|
40
|
-
it "should error on
|
40
|
+
it "should error on undefined types" do
|
41
41
|
lambda { MotionMigrate::Model.property(:field, :unknown) }.should raise_error
|
42
42
|
end
|
43
43
|
|
44
|
-
%w(string integer_16 integer_32 integer_64 decimal double float date binary_data boolean).each do |type|
|
45
|
-
it "should error on
|
44
|
+
%w(string integer_16 integer_32 integer_64 decimal double float date binary_data boolean transformable).each do |type|
|
45
|
+
it "should error on undefined options for #{type}" do
|
46
46
|
lambda { MotionMigrate::Model.property(:field, type, :unknown => true) }.should raise_error
|
47
47
|
end
|
48
48
|
end
|
@@ -54,7 +54,7 @@ module MotionMigrate
|
|
54
54
|
default: "motion",
|
55
55
|
regex: "/we/"
|
56
56
|
})
|
57
|
-
MotionMigrate::Model.property(:field, :string, options).should == @filled_allowed_attributes.merge({ :name => :field,
|
57
|
+
MotionMigrate::Model.property(:field, :string, options).should == @filled_allowed_attributes.merge({ :name => :field,
|
58
58
|
:attributeType => "String",
|
59
59
|
:minValueString => "1",
|
60
60
|
:maxValueString => "10",
|
@@ -69,7 +69,7 @@ module MotionMigrate
|
|
69
69
|
max: "10",
|
70
70
|
default: "5"
|
71
71
|
})
|
72
|
-
MotionMigrate::Model.property(:field, type, options).should == @filled_allowed_attributes.merge({ :name => :field,
|
72
|
+
MotionMigrate::Model.property(:field, type, options).should == @filled_allowed_attributes.merge({ :name => :field,
|
73
73
|
:attributeType => type.split("_").each{|word| word.capitalize! }.join(" "),
|
74
74
|
:minValueString => "1",
|
75
75
|
:maxValueString => "10",
|
@@ -81,7 +81,7 @@ module MotionMigrate
|
|
81
81
|
options = @allowed_options.merge({
|
82
82
|
default: true
|
83
83
|
})
|
84
|
-
MotionMigrate::Model.property(:field, :boolean, options).should == @filled_allowed_attributes.merge({ :name => :field,
|
84
|
+
MotionMigrate::Model.property(:field, :boolean, options).should == @filled_allowed_attributes.merge({ :name => :field,
|
85
85
|
:attributeType => "Boolean",
|
86
86
|
:defaultValueString => "YES" })
|
87
87
|
end
|
@@ -90,18 +90,28 @@ module MotionMigrate
|
|
90
90
|
options = @allowed_options.merge({
|
91
91
|
external_storage: true
|
92
92
|
})
|
93
|
-
MotionMigrate::Model.property(:field, :binary_data, options).should == @filled_allowed_attributes.merge({ :name => :field,
|
93
|
+
MotionMigrate::Model.property(:field, :binary_data, options).should == @filled_allowed_attributes.merge({ :name => :field,
|
94
94
|
:attributeType => "Binary",
|
95
95
|
:allowsExternalBinaryDataStorage => "YES" })
|
96
96
|
end
|
97
97
|
|
98
|
+
it "should return the correct options for transformable" do
|
99
|
+
options = @allowed_options.merge({
|
100
|
+
transformer_name: 'JSONTransformer'
|
101
|
+
})
|
102
|
+
|
103
|
+
MotionMigrate::Model.property(:field, :transformable, options).should == @filled_allowed_attributes.merge({ :name => :field,
|
104
|
+
:attributeType => "Transformable",
|
105
|
+
:valueTransformerName => "JSONTransformer" })
|
106
|
+
end
|
107
|
+
|
98
108
|
it "should return the correct options for date" do
|
99
109
|
options = @allowed_options.merge({
|
100
110
|
min: DateTime.new(2013, 1, 1, 12, 0, 0),
|
101
111
|
max: DateTime.new(2013, 1, 31, 12, 0, 0),
|
102
112
|
default: DateTime.new(2013, 1, 5, 12, 0, 0)
|
103
113
|
})
|
104
|
-
MotionMigrate::Model.property(:field, :date, options).should == @filled_allowed_attributes.merge({ :name => :field,
|
114
|
+
MotionMigrate::Model.property(:field, :date, options).should == @filled_allowed_attributes.merge({ :name => :field,
|
105
115
|
:attributeType => "Date",
|
106
116
|
:minDateTimeInterval => "378738000",
|
107
117
|
:maxDateTimeInterval => "381330000",
|
@@ -110,4 +120,4 @@ module MotionMigrate
|
|
110
120
|
end
|
111
121
|
end
|
112
122
|
|
113
|
-
# Test all types + properties
|
123
|
+
# Test all types + properties
|
data/spec_project/Gemfile
CHANGED
data/spec_project/Rakefile
CHANGED
@@ -1,7 +1,49 @@
|
|
1
1
|
class AppDelegate
|
2
2
|
def application(application, didFinishLaunchingWithOptions:launchOptions)
|
3
|
-
|
4
|
-
|
3
|
+
if RUBYMOTION_ENV == 'test'
|
4
|
+
MagicalRecord.setupCoreDataStackWithAutoMigratingSqliteStoreNamed("MotionMigrateSpec.sqlite")
|
5
|
+
else
|
6
|
+
MagicalRecord.setupCoreDataStackWithAutoMigratingSqliteStoreNamed("MotionMigrateExample.sqlite")
|
7
|
+
end
|
8
|
+
|
9
|
+
initialize_data
|
10
|
+
|
11
|
+
@window = UIWindow.alloc.initWithFrame(UIScreen.mainScreen.bounds)
|
12
|
+
controller = PlanesViewController.new
|
13
|
+
navigation_controller = UINavigationController.alloc.initWithRootViewController(controller)
|
14
|
+
@window.rootViewController = navigation_controller
|
15
|
+
@window.makeKeyAndVisible
|
16
|
+
|
5
17
|
true
|
6
18
|
end
|
19
|
+
|
20
|
+
def initialize_data
|
21
|
+
MagicalRecord.saveUsingCurrentThreadContextWithBlockAndWait(lambda do |local_context|
|
22
|
+
Plane.MR_truncateAll
|
23
|
+
Pilot.MR_truncateAll
|
24
|
+
|
25
|
+
buck = Pilot.MR_createInContext(local_context)
|
26
|
+
buck.name = "Buck Danny"
|
27
|
+
sonny = Pilot.MR_createInContext(local_context)
|
28
|
+
sonny.name = "Sonny Tuckson:"
|
29
|
+
jerry = Pilot.MR_createInContext(local_context)
|
30
|
+
jerry.name = "Jerry Tumbler"
|
31
|
+
|
32
|
+
x = Plane.MR_createInContext(local_context)
|
33
|
+
x.name = "Bell X-1"
|
34
|
+
tomcat = Plane.MR_createInContext(local_context)
|
35
|
+
tomcat.name = "Grumman F-14 Tomcat"
|
36
|
+
hornet = Plane.MR_createInContext(local_context)
|
37
|
+
hornet.name = "McDonnell Douglas F/A-18 Hornet"
|
38
|
+
|
39
|
+
x.addFlown_by_pilotsObject buck
|
40
|
+
|
41
|
+
tomcat.addFlown_by_pilotsObject buck
|
42
|
+
tomcat.addFlown_by_pilotsObject sonny
|
43
|
+
|
44
|
+
hornet.addFlown_by_pilotsObject buck
|
45
|
+
hornet.addFlown_by_pilotsObject sonny
|
46
|
+
hornet.addFlown_by_pilotsObject jerry
|
47
|
+
end)
|
48
|
+
end
|
7
49
|
end
|
@@ -0,0 +1,46 @@
|
|
1
|
+
class PlanesViewController < UITableViewController
|
2
|
+
CELL_IDENTIFIER = "CELL"
|
3
|
+
|
4
|
+
def viewDidLoad
|
5
|
+
@planes = Plane.MR_findAll
|
6
|
+
|
7
|
+
self.tableView.registerClass(UITableViewCell, forCellReuseIdentifier:CELL_IDENTIFIER)
|
8
|
+
end
|
9
|
+
|
10
|
+
def viewWillAppear(animated)
|
11
|
+
self.title = "Planes"
|
12
|
+
end
|
13
|
+
|
14
|
+
def numberOfSectionsInTableView(table_view)
|
15
|
+
@planes.count
|
16
|
+
end
|
17
|
+
|
18
|
+
def tableView(table_view, titleForHeaderInSection:section)
|
19
|
+
plane_for_section(section).name
|
20
|
+
end
|
21
|
+
|
22
|
+
def tableView(table_view, numberOfRowsInSection:section)
|
23
|
+
pilots_for_section(section).count
|
24
|
+
end
|
25
|
+
|
26
|
+
def tableView(table_view, cellForRowAtIndexPath:index_path)
|
27
|
+
cell = table_view.dequeueReusableCellWithIdentifier(CELL_IDENTIFIER)
|
28
|
+
cell.selectionStyle = UITableViewCellSelectionStyleNone
|
29
|
+
cell.textLabel.text = pilot_for_index_path(index_path).name
|
30
|
+
cell
|
31
|
+
end
|
32
|
+
|
33
|
+
protected
|
34
|
+
|
35
|
+
def plane_for_section section
|
36
|
+
@planes[section]
|
37
|
+
end
|
38
|
+
|
39
|
+
def pilots_for_section section
|
40
|
+
plane_for_section(section).flown_by_pilots.allObjects
|
41
|
+
end
|
42
|
+
|
43
|
+
def pilot_for_index_path index_path
|
44
|
+
pilots_for_section(index_path.section)[index_path.row]
|
45
|
+
end
|
46
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
class HashTransformer
|
2
|
+
class << self
|
3
|
+
def allowsReverseTransformation
|
4
|
+
true
|
5
|
+
end
|
6
|
+
|
7
|
+
def transformedValueClass
|
8
|
+
NSData
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
def transformedValue(value)
|
13
|
+
NSKeyedArchiver.archivedDataWithRootObject(value)
|
14
|
+
end
|
15
|
+
|
16
|
+
def reverseTransformedValue(value)
|
17
|
+
NSKeyedUnarchiver.unarchiveObjectWithData(value)
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
@@ -1,7 +1,8 @@
|
|
1
1
|
class Pilot < MotionMigrate::Model
|
2
2
|
property :name, :string
|
3
|
+
property :profile, :transformable, transformer_name: 'HashTransformer'
|
3
4
|
|
4
|
-
belongs_to :plane, :class_name => "Plane", :inverse_of => :pilot
|
5
|
-
has_many :owned_planes, :class_name => "Plane", :inverse_of => :owner
|
6
|
-
has_many :flown_planes, :class_name => "Plane", :inverse_of => :flown_by_pilots
|
7
|
-
end
|
5
|
+
belongs_to :plane, :class_name => "Plane", :inverse_of => :pilot, :deletion_rule => :nullify
|
6
|
+
has_many :owned_planes, :class_name => "Plane", :inverse_of => :owner, :deletion_rule => :nullify
|
7
|
+
has_many :flown_planes, :class_name => "Plane", :inverse_of => :flown_by_pilots, :deletion_rule => :nullify
|
8
|
+
end
|
@@ -4,8 +4,8 @@ class Plane < MotionMigrate::Model
|
|
4
4
|
property :first_flight_at, :date
|
5
5
|
property :flight_info, :binary_data
|
6
6
|
|
7
|
-
belongs_to :pilot, :class_name => "Pilot", :inverse_of => :plane
|
8
|
-
belongs_to :owner, :class_name => "Pilot", :inverse_of => :owned_planes
|
7
|
+
belongs_to :pilot, :class_name => "Pilot", :inverse_of => :plane, :deletion_rule => :nullify
|
8
|
+
belongs_to :owner, :class_name => "Pilot", :inverse_of => :owned_planes, :deletion_rule => :nullify
|
9
9
|
|
10
|
-
has_many :flown_by_pilots, :class_name => "Pilot", :inverse_of => :flown_planes
|
10
|
+
has_many :flown_by_pilots, :class_name => "Pilot", :inverse_of => :flown_planes, :deletion_rule => :nullify
|
11
11
|
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<model name="" userDefinedModelVersionIdentifier="" type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="1811" systemVersion="11D50" minimumToolsVersion="Automatic" macOSVersion="Automatic" iOSVersion="Automatic">
|
3
|
+
<entity name="Pilot" representedClassName="Pilot" syncable="YES">
|
4
|
+
<attribute name="name" attributeType="String" optional="YES" syncable="YES"/>
|
5
|
+
<attribute name="profile" attributeType="Transformable" optional="YES" syncable="YES" valueTransformerName="HashTransformer"/>
|
6
|
+
<relationship name="plane" optional="YES" deletionRule="Nullify" syncable="YES" minCount="1" maxCount="1" inverseEntity="Plane" destinationEntity="Plane" inverseName="pilot" toMany="NO"/>
|
7
|
+
<relationship name="owned_planes" optional="YES" deletionRule="Nullify" syncable="YES" inverseEntity="Plane" destinationEntity="Plane" inverseName="owner" toMany="YES"/>
|
8
|
+
<relationship name="flown_planes" optional="YES" deletionRule="Nullify" syncable="YES" inverseEntity="Plane" destinationEntity="Plane" inverseName="flown_by_pilots" toMany="YES"/>
|
9
|
+
</entity>
|
10
|
+
<entity name="Plane" representedClassName="Plane" syncable="YES">
|
11
|
+
<attribute name="name" attributeType="String" optional="YES" syncable="YES"/>
|
12
|
+
<attribute name="multi_engine" attributeType="Boolean" optional="YES" syncable="YES" defaultValueString="NO"/>
|
13
|
+
<attribute name="first_flight_at" attributeType="Date" optional="YES" syncable="YES"/>
|
14
|
+
<attribute name="flight_info" attributeType="Binary" optional="YES" syncable="YES"/>
|
15
|
+
<relationship name="pilot" optional="YES" deletionRule="Nullify" syncable="YES" minCount="1" maxCount="1" inverseEntity="Pilot" destinationEntity="Pilot" inverseName="plane" toMany="NO"/>
|
16
|
+
<relationship name="owner" optional="YES" deletionRule="Nullify" syncable="YES" minCount="1" maxCount="1" inverseEntity="Pilot" destinationEntity="Pilot" inverseName="owned_planes" toMany="NO"/>
|
17
|
+
<relationship name="flown_by_pilots" optional="YES" deletionRule="Nullify" syncable="YES" inverseEntity="Pilot" destinationEntity="Pilot" inverseName="flown_planes" toMany="YES"/>
|
18
|
+
</entity>
|
19
|
+
</model>
|
@@ -54,4 +54,23 @@ describe "properties in a model" do
|
|
54
54
|
fetched_plane = Plane.MR_findFirst
|
55
55
|
fetched_plane.flight_info.should == flight_info
|
56
56
|
end
|
57
|
+
|
58
|
+
it 'should set the transformable property on the model' do
|
59
|
+
reset
|
60
|
+
|
61
|
+
new_pilot = Pilot.MR_createEntity
|
62
|
+
new_pilot.profile.should == nil
|
63
|
+
|
64
|
+
profile = { nickname: 'Chuck'}
|
65
|
+
|
66
|
+
new_pilot.name = 'Chuck Yeager'
|
67
|
+
new_pilot.profile = profile
|
68
|
+
|
69
|
+
save
|
70
|
+
|
71
|
+
fetched_pilot = Pilot.MR_findFirst
|
72
|
+
|
73
|
+
fetched_pilot.profile.should == profile
|
74
|
+
fetched_pilot.profile.class.should == Hash
|
75
|
+
end
|
57
76
|
end
|
@@ -1,11 +1,10 @@
|
|
1
|
-
|
2
1
|
PODS:
|
3
|
-
- MagicalRecord (2.1)
|
2
|
+
- MagicalRecord (2.1)
|
4
3
|
|
5
4
|
DEPENDENCIES:
|
6
|
-
- MagicalRecord (= 2.1)
|
5
|
+
- MagicalRecord (= 2.1)
|
7
6
|
|
8
7
|
SPEC CHECKSUMS:
|
9
|
-
MagicalRecord:
|
8
|
+
MagicalRecord: 64e7184c240087a45e9588a722eaf05b0ad837f7
|
10
9
|
|
11
|
-
COCOAPODS: 0.
|
10
|
+
COCOAPODS: 0.24.0
|
metadata
CHANGED
@@ -1,38 +1,57 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: motion_migrate
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
5
|
-
prerelease:
|
4
|
+
version: 0.2.0
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Jelle Vandebeeck
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date: 2013-
|
11
|
+
date: 2013-10-24 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: rake
|
16
|
-
requirement:
|
17
|
-
none: false
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
18
16
|
requirements:
|
19
|
-
- -
|
17
|
+
- - '>='
|
20
18
|
- !ruby/object:Gem::Version
|
21
19
|
version: '0'
|
22
20
|
type: :development
|
23
21
|
prerelease: false
|
24
|
-
version_requirements:
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - '>='
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rspec
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - '>='
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - '>='
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
25
41
|
- !ruby/object:Gem::Dependency
|
26
42
|
name: nokogiri
|
27
|
-
requirement:
|
28
|
-
none: false
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
29
44
|
requirements:
|
30
|
-
- -
|
45
|
+
- - '>='
|
31
46
|
- !ruby/object:Gem::Version
|
32
47
|
version: '0'
|
33
48
|
type: :runtime
|
34
49
|
prerelease: false
|
35
|
-
version_requirements:
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
36
55
|
description: Generate the Core Data model from your RubyMotion code.
|
37
56
|
email:
|
38
57
|
- jelle@fousa.be
|
@@ -65,11 +84,14 @@ files:
|
|
65
84
|
- spec_project/Gemfile
|
66
85
|
- spec_project/Rakefile
|
67
86
|
- spec_project/app/app_delegate.rb
|
87
|
+
- spec_project/app/controllers/planes_view_controller.rb
|
88
|
+
- spec_project/app/hash_transformer.rb
|
68
89
|
- spec_project/app/models/pilot.rb
|
69
90
|
- spec_project/app/models/plane.rb
|
70
91
|
- spec_project/db/schema.xcdatamodeld/.xccurrentversion
|
71
92
|
- spec_project/db/schema.xcdatamodeld/schema.1.xcdatamodel/contents
|
72
93
|
- spec_project/db/schema.xcdatamodeld/schema.10.xcdatamodel/contents
|
94
|
+
- spec_project/db/schema.xcdatamodeld/schema.11.xcdatamodel/contents
|
73
95
|
- spec_project/db/schema.xcdatamodeld/schema.2.xcdatamodel/contents
|
74
96
|
- spec_project/db/schema.xcdatamodeld/schema.3.xcdatamodel/contents
|
75
97
|
- spec_project/db/schema.xcdatamodeld/schema.4.xcdatamodel/contents
|
@@ -84,30 +106,28 @@ files:
|
|
84
106
|
- spec_project/vendor/Podfile.lock
|
85
107
|
homepage: http://fousa.github.com/motion_migrate/
|
86
108
|
licenses: []
|
109
|
+
metadata: {}
|
87
110
|
post_install_message:
|
88
111
|
rdoc_options: []
|
89
112
|
require_paths:
|
90
113
|
- lib
|
91
114
|
required_ruby_version: !ruby/object:Gem::Requirement
|
92
|
-
none: false
|
93
115
|
requirements:
|
94
|
-
- -
|
116
|
+
- - '>='
|
95
117
|
- !ruby/object:Gem::Version
|
96
118
|
version: '0'
|
97
119
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
98
|
-
none: false
|
99
120
|
requirements:
|
100
|
-
- -
|
121
|
+
- - '>='
|
101
122
|
- !ruby/object:Gem::Version
|
102
123
|
version: '0'
|
103
124
|
requirements: []
|
104
125
|
rubyforge_project:
|
105
|
-
rubygems_version:
|
126
|
+
rubygems_version: 2.0.3
|
106
127
|
signing_key:
|
107
|
-
specification_version:
|
128
|
+
specification_version: 4
|
108
129
|
summary: Generate the Core Data model from your RubyMotion code. Never open XCode
|
109
130
|
again!
|
110
131
|
test_files:
|
111
132
|
- spec/property_spec.rb
|
112
133
|
- spec/relationship_spec.rb
|
113
|
-
has_rdoc:
|