maestrano-connector-rails 0.2.20 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -76,6 +76,7 @@ after_bundle do
76
76
  remove_dir 'test'
77
77
  remove_file 'app/views/layouts/application.html.erb'
78
78
  remove_file 'app/assets/stylesheets/application.css'
79
+ remove_file 'config/routes.rb'
79
80
  copy_file 'spec_helper.rb', 'spec/spec_helper.rb'
80
81
  copy_file 'factories.rb', 'spec/factories.rb'
81
82
  copy_file 'routes.rb', 'config/routes.rb'
@@ -89,10 +90,10 @@ after_bundle do
89
90
  RUBY
90
91
  end
91
92
 
92
- run 'rails g connector:install'
93
+ run 'bundle exec rails g connector:install'
93
94
  run 'bundle exec figaro install'
94
- run 'rake railties:install:migrations'
95
- run 'rake db:migrate'
95
+ run 'bundle exec rake railties:install:migrations'
96
+ run 'bundle exec rake db:migrate'
96
97
 
97
98
  # Init repo and commit
98
99
  git :init
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: maestrano-connector-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.20
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pierre Berard
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-03-11 00:00:00.000000000 Z
11
+ date: 2016-03-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: maestrano-rails
@@ -281,7 +281,6 @@ files:
281
281
  - lib/generators/connector/templates/complex_entity_example/lead.rb
282
282
  - lib/generators/connector/templates/complex_entity_example/lead_mapper.rb
283
283
  - lib/generators/connector/templates/complex_entity_example/person.rb
284
- - lib/generators/connector/templates/contact_and_lead.rb
285
284
  - lib/generators/connector/templates/entity.rb
286
285
  - lib/generators/connector/templates/example_entity.rb
287
286
  - lib/generators/connector/templates/external.rb
@@ -1,55 +0,0 @@
1
- # TODO
2
- # This file is provided as an example and should be removed
3
- # class Entities::ContactAndLead < Maestrano::Connector::Rails::ComplexEntity
4
- # def connec_entities_names
5
- # %w(person)
6
- # end
7
-
8
- # def external_entities_names
9
- # %w(contact lead)
10
- # end
11
-
12
- # # input : {
13
- # # connec_entity_names[0]: [unmapped_connec_entitiy1, unmapped_connec_entitiy2],
14
- # # connec_entity_names[1]: [unmapped_connec_entitiy3, unmapped_connec_entitiy4]
15
- # # }
16
- # # output : {
17
- # # connec_entity_names[0]: {
18
- # # external_entities_names[0]: [unmapped_connec_entitiy1, unmapped_connec_entitiy2]
19
- # # },
20
- # # connec_entity_names[1]: {
21
- # # external_entities_names[0]: [unmapped_connec_entitiy3],
22
- # # external_entities_names[1]: [unmapped_connec_entitiy4]
23
- # # }
24
- # # }
25
- # def connec_model_to_external_model!(connec_hash_of_entities)
26
- # people = connec_hash_of_entities['person']
27
- # connec_hash_of_entities['person'] = { 'lead' => [], 'contact' => [] }
28
-
29
- # people.each do |person|
30
- # if person['is_lead']
31
- # connec_hash_of_entities['person']['lead'] << person
32
- # else
33
- # connec_hash_of_entities['person']['contact'] << person
34
- # end
35
- # end
36
- # end
37
-
38
- # # input : {
39
- # # external_entities_names[0]: [unmapped_external_entity1, unmapped_external_entity2],
40
- # # external_entities_names[1]: [unmapped_external_entity3, unmapped_external_entity4]
41
- # # }
42
- # # output : {
43
- # # external_entities_names[0]: {
44
- # # connec_entity_names[0]: [unmapped_external_entity1],
45
- # # connec_entity_names[1]: [unmapped_external_entity2]
46
- # # },
47
- # # external_entities_names[1]: {
48
- # # connec_entity_names[0]: [unmapped_external_entity3, unmapped_external_entity4]
49
- # # }
50
- # # }
51
- # def external_model_to_connec_model!(external_hash_of_entities)
52
- # external_hash_of_entities['lead'] = { 'person' => external_hash_of_entities['lead'] }
53
- # external_hash_of_entities['contact'] = { 'person' => external_hash_of_entities['contact'] }
54
- # end
55
- # end