blueprint-api-rails 0.2.2 → 0.2.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fd69fecfafc263457f71226574e988cbf5c046f9
4
- data.tar.gz: c2396ddb00cf85ba8eb12c7a91c7e4d10697c8a6
3
+ metadata.gz: 7d8f08fc6a6a16a012f97f982ce8242f8910ff19
4
+ data.tar.gz: b0d2f3ada82b8565ad8cf11a455ddf5293a9df60
5
5
  SHA512:
6
- metadata.gz: ffa146bee921db725fae60b231320757e1ad90dc16d444ad567478261c85b61b8b4f5936ac64d7bbb1bfe67ea0413138c391432e4c9228f1d800840c9b213fa7
7
- data.tar.gz: e380daf5929d7d198f583f08a2a75fc21c5764b05606d7ef178a3e50a422ee92d159eb8df6ff677853ac35638edb8809a1e3e90bfe611b03e5b4311d714bce88
6
+ metadata.gz: 1752120fbf82f5c3dc59aa472af6353888b624d632850929e09d5fc6e7ecebdafee092d55228f30939fd5301eda79061d6b0209a7614440e7b1cd2b7961956c0
7
+ data.tar.gz: 53024cf284cbbc36d52179fd59cdb52c57296a4b0301bf11465edcf166cc155edbb8dfdad68b1a0c6dc23c3f95e087c915be04734f8894f7eee92b4c583c0099
@@ -18,6 +18,8 @@ module Blueprint
18
18
  DESCRIBE_ELEMENT = 'describe-element'
19
19
  DESCRIBE_CONCEPT = 'describe-concept'
20
20
 
21
+ CONTAINS = 'contains'
22
+
21
23
  # allow users to set the API key
22
24
  def self.set_api_key api_key
23
25
  @api_key = api_key
@@ -104,8 +106,7 @@ module Blueprint
104
106
 
105
107
  # send the controllers to Blueprint
106
108
  controllers.each { |c|
107
- self.element(c) # register the element
108
- # self.log nil, nil, nil, c
109
+ self.element(c) # register the element
109
110
  }
110
111
 
111
112
  # now scan for models
@@ -116,8 +117,7 @@ module Blueprint
116
117
  p "Found #{models.length} models - sending to Blueprint"
117
118
 
118
119
  models.each { |m|
119
- self.concept(m) # register the concept
120
- # self.log nil, nil, m
120
+ self.concept(m) # register the concept
121
121
  }
122
122
 
123
123
  p 'Scan complete'
@@ -190,7 +190,7 @@ module Blueprint
190
190
  faraday.adapter Faraday.default_adapter # make requests with Net::HTTP
191
191
  end
192
192
 
193
- # we register the structural element immediately (so that it appears on the structural even though it has no description / messages)
193
+ # we register the structural element immediately (so that it appears on the structure even though it has no description / messages)
194
194
  self.send DESCRIBE_ELEMENT,
195
195
  {
196
196
  :name => @name
@@ -205,7 +205,16 @@ module Blueprint
205
205
  :description => description,
206
206
  :stereotype => stereotype
207
207
  }
208
- nil
208
+ self
209
+ end
210
+
211
+ def contains(constituent)
212
+ self.send CONTAINS,
213
+ {
214
+ :parent => @name,
215
+ :constituent => constituent
216
+ }
217
+ self
209
218
  end
210
219
 
211
220
  end
@@ -224,7 +233,7 @@ module Blueprint
224
233
  faraday.adapter Faraday.default_adapter # make requests with Net::HTTP
225
234
  end
226
235
 
227
- # we register the concept immediately (so that it appears on the structural even though it has no description / messages)
236
+ # we register the concept immediately (so that it appears even though it has no description / messages)
228
237
  self.send DESCRIBE_CONCEPT,
229
238
  {
230
239
  :name => @name
@@ -239,7 +248,7 @@ module Blueprint
239
248
  :description => description,
240
249
  :stereotype => stereotype
241
250
  }
242
- nil
251
+ self
243
252
  end
244
253
 
245
254
  end
@@ -1,7 +1,7 @@
1
1
  module Blueprint
2
2
  module Api
3
3
  module Rails
4
- VERSION = '0.2.2'
4
+ VERSION = '0.2.3'
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: blueprint-api-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - benjii
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-07-01 00:00:00.000000000 Z
11
+ date: 2016-07-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler