ruby-xcdm 0.0.8 → 0.0.9

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: d0204d65d8ce9337517bcd02c0c7e8dde186c9e8
4
+ data.tar.gz: 9b844dcedb2995d97530c7c6959c2218f9fcff90
5
+ SHA512:
6
+ metadata.gz: a9d535376949a9e3af6b5ecc69f4dd2ad00ba23b799eb461c8df90f6e0991fc9fd2d4e53e3629b3c25ae32652a4e29445e404e5739f636b2631f8b5b49080d6a
7
+ data.tar.gz: 10e7477d6e55262f1c5c0a3149ba631c951e4fecf68c5afd398592a8423c60946ed61f8ded98e771fff6b4abbd5137cd08d497604afffa72ce730f9520be7c13
@@ -1 +1 @@
1
- 1.9.3-p392
1
+ 2.1.0
data/Gemfile CHANGED
@@ -8,5 +8,5 @@ gem 'plist'
8
8
  gem 'ruby-xcdm', path: '.'
9
9
 
10
10
  group :test do
11
- gem 'turn'
11
+ gem 'minitest'
12
12
  end
@@ -1,25 +1,29 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ruby-xcdm (0.0.8)
5
- activesupport (~> 3.2)
4
+ ruby-xcdm (0.0.9)
5
+ activesupport (~> 4.1)
6
6
  builder (~> 3.2)
7
7
  plist (~> 3.1)
8
8
 
9
9
  GEM
10
10
  remote: https://rubygems.org/
11
11
  specs:
12
- activesupport (3.2.17)
13
- i18n (~> 0.6, >= 0.6.4)
14
- multi_json (~> 1.0)
15
- ansi (1.4.3)
16
- builder (3.2.0)
17
- i18n (0.6.9)
18
- multi_json (1.9.2)
12
+ activesupport (4.1.8)
13
+ i18n (~> 0.6, >= 0.6.9)
14
+ json (~> 1.7, >= 1.7.7)
15
+ minitest (~> 5.1)
16
+ thread_safe (~> 0.1)
17
+ tzinfo (~> 1.1)
18
+ builder (3.2.2)
19
+ i18n (0.7.0)
20
+ json (1.8.1)
21
+ minitest (5.5.0)
19
22
  plist (3.1.0)
20
- rake (10.0.4)
21
- turn (0.9.6)
22
- ansi
23
+ rake (10.4.2)
24
+ thread_safe (0.3.4)
25
+ tzinfo (1.2.2)
26
+ thread_safe (~> 0.1)
23
27
 
24
28
  PLATFORMS
25
29
  ruby
@@ -27,7 +31,7 @@ PLATFORMS
27
31
  DEPENDENCIES
28
32
  activesupport
29
33
  builder
34
+ minitest
30
35
  plist
31
36
  rake
32
37
  ruby-xcdm!
33
- turn
data/README.md CHANGED
@@ -1,9 +1,9 @@
1
1
  # ruby-xcdm
2
2
 
3
- This is a tool for generating the same xcdatamodeld files that XCode
3
+ This is a tool for generating the same xcdatamodeld files that Xcode
4
4
  does when designing a datamodel for Core Data. It is written in pure
5
5
  ruby, but it will be of particular interest to RubyMotion developers.
6
- It offers the essential features that XCode does, plus a text-based
6
+ It offers the essential features that Xcode does, plus a text-based
7
7
  workflow and some niceties, like automatic inverse relationships.
8
8
 
9
9
  [![Dependency Status](https://gemnasium.com/infinitered/ruby-xcdm.png)](https://gemnasium.com/infinitered/ruby-xcdm)
@@ -152,6 +152,18 @@ scenes. If you want more control, you can make the intermediate table yourself:
152
152
  end
153
153
  ```
154
154
 
155
+ You can also have symmetric one-to-one relationships via has_one:
156
+
157
+ ```ruby
158
+ entity "Person" do
159
+ has_one :ego
160
+ end
161
+
162
+ entity "Ego" do
163
+ has_one :person
164
+ end
165
+ ```
166
+
155
167
  Core Data has no equivalent of ```:through``` in ActiveRecord, so you'll
156
168
  need to handle that relation yourself.
157
169
 
@@ -1,3 +1,3 @@
1
1
  module XCDM
2
- VERSION = "0.0.8"
2
+ VERSION = "0.0.9"
3
3
  end
@@ -19,7 +19,7 @@ Gem::Specification.new do |spec|
19
19
  spec.require_paths = ["lib"]
20
20
 
21
21
  spec.add_dependency "builder", "~> 3.2"
22
- spec.add_dependency "activesupport", "~> 3.2"
22
+ spec.add_dependency "activesupport", "~> 4.1"
23
23
  spec.add_dependency "plist", "~> 3.1"
24
24
 
25
25
  spec.add_development_dependency "bundler", "~> 1.3"
@@ -1,16 +1,15 @@
1
-
2
- require 'test/unit'
1
+ require 'minitest/autorun'
3
2
  require 'xcdm/entity'
4
- require 'turn'
3
+ require 'xcdm/schema'
5
4
  require 'rexml/document'
6
5
 
7
6
  module XCDM
8
- class EntityTest < Test::Unit::TestCase
7
+ class EntityTest < Minitest::Test
9
8
 
10
9
  attr_reader :e, :pub
11
10
 
12
11
  def setup
13
- s = Schema.new("0.0.1", "4.6")
12
+ s = XCDM::Schema.new("0.0.1", "4.6")
14
13
  @pub ||= Entity.new(s, "Publication", abstract: true)
15
14
  @e ||= Entity.new(s, "Article", parent: "Publication")
16
15
  end
@@ -1,11 +1,11 @@
1
-
2
- require 'test/unit'
1
+ require 'minitest/autorun'
2
+ require 'xcdm/entity'
3
3
  require 'xcdm/schema'
4
4
  require 'rexml/document'
5
5
  require 'active_support/all'
6
6
 
7
7
  module XCDM
8
- class SchemaTest < Test::Unit::TestCase
8
+ class SchemaTest < Minitest::Test
9
9
 
10
10
  def test_initialize
11
11
  s = Schema.new("0.0.1", "4.6")
@@ -26,7 +26,7 @@ module XCDM
26
26
 
27
27
  loader = Schema::Loader.new("4.6")
28
28
  schema = loader.load_file(fixture)
29
- assert_not_nil schema
29
+ assert_equal schema.nil?, false
30
30
  assert_equal '0.0.1', schema.version
31
31
  assert_equal schema, loader.schemas.first
32
32
  assert_equal ['Article', 'Author'], schema.entities.map(&:name)
metadata CHANGED
@@ -1,110 +1,97 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-xcdm
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
5
- prerelease:
4
+ version: 0.0.9
6
5
  platform: ruby
7
6
  authors:
8
7
  - Ken Miller
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2014-11-11 00:00:00.000000000 Z
11
+ date: 2015-06-20 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: builder
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ~>
17
+ - - "~>"
20
18
  - !ruby/object:Gem::Version
21
19
  version: '3.2'
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
- - - ~>
24
+ - - "~>"
28
25
  - !ruby/object:Gem::Version
29
26
  version: '3.2'
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: activesupport
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
- - - ~>
31
+ - - "~>"
36
32
  - !ruby/object:Gem::Version
37
- version: '3.2'
33
+ version: '4.1'
38
34
  type: :runtime
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
- - - ~>
38
+ - - "~>"
44
39
  - !ruby/object:Gem::Version
45
- version: '3.2'
40
+ version: '4.1'
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: plist
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
- - - ~>
45
+ - - "~>"
52
46
  - !ruby/object:Gem::Version
53
47
  version: '3.1'
54
48
  type: :runtime
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
51
  requirements:
59
- - - ~>
52
+ - - "~>"
60
53
  - !ruby/object:Gem::Version
61
54
  version: '3.1'
62
55
  - !ruby/object:Gem::Dependency
63
56
  name: bundler
64
57
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
58
  requirements:
67
- - - ~>
59
+ - - "~>"
68
60
  - !ruby/object:Gem::Version
69
61
  version: '1.3'
70
62
  type: :development
71
63
  prerelease: false
72
64
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
65
  requirements:
75
- - - ~>
66
+ - - "~>"
76
67
  - !ruby/object:Gem::Version
77
68
  version: '1.3'
78
69
  - !ruby/object:Gem::Dependency
79
70
  name: rake
80
71
  requirement: !ruby/object:Gem::Requirement
81
- none: false
82
72
  requirements:
83
- - - ! '>='
73
+ - - ">="
84
74
  - !ruby/object:Gem::Version
85
75
  version: '0'
86
76
  type: :development
87
77
  prerelease: false
88
78
  version_requirements: !ruby/object:Gem::Requirement
89
- none: false
90
79
  requirements:
91
- - - ! '>='
80
+ - - ">="
92
81
  - !ruby/object:Gem::Version
93
82
  version: '0'
94
83
  - !ruby/object:Gem::Dependency
95
84
  name: turn
96
85
  requirement: !ruby/object:Gem::Requirement
97
- none: false
98
86
  requirements:
99
- - - ! '>='
87
+ - - ">="
100
88
  - !ruby/object:Gem::Version
101
89
  version: '0'
102
90
  type: :development
103
91
  prerelease: false
104
92
  version_requirements: !ruby/object:Gem::Requirement
105
- none: false
106
93
  requirements:
107
- - - ! '>='
94
+ - - ">="
108
95
  - !ruby/object:Gem::Version
109
96
  version: '0'
110
97
  description: Ruby DSL for creating Core Data Data Model files without XCode
@@ -115,8 +102,8 @@ executables:
115
102
  extensions: []
116
103
  extra_rdoc_files: []
117
104
  files:
118
- - .gitignore
119
- - .ruby-version
105
+ - ".gitignore"
106
+ - ".ruby-version"
120
107
  - Gemfile
121
108
  - Gemfile.lock
122
109
  - LICENSE.txt
@@ -136,33 +123,26 @@ files:
136
123
  homepage: https://github.com/infinitered/ruby-xcdm
137
124
  licenses:
138
125
  - MIT
126
+ metadata: {}
139
127
  post_install_message:
140
128
  rdoc_options: []
141
129
  require_paths:
142
130
  - lib
143
131
  required_ruby_version: !ruby/object:Gem::Requirement
144
- none: false
145
132
  requirements:
146
- - - ! '>='
133
+ - - ">="
147
134
  - !ruby/object:Gem::Version
148
135
  version: '0'
149
- segments:
150
- - 0
151
- hash: -2545899322055109517
152
136
  required_rubygems_version: !ruby/object:Gem::Requirement
153
- none: false
154
137
  requirements:
155
- - - ! '>='
138
+ - - ">="
156
139
  - !ruby/object:Gem::Version
157
140
  version: '0'
158
- segments:
159
- - 0
160
- hash: -2545899322055109517
161
141
  requirements: []
162
142
  rubyforge_project:
163
- rubygems_version: 1.8.23
143
+ rubygems_version: 2.2.0
164
144
  signing_key:
165
- specification_version: 3
145
+ specification_version: 4
166
146
  summary: Ruby XCDM
167
147
  test_files:
168
148
  - test/entity_test.rb