cenit-collection-super 0.1.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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 9f069b4788c74736f50a0ac1e1af919992be36b2
4
+ data.tar.gz: 8a7221be5f04333a59902e12f17d83aebeb5c7c9
5
+ SHA512:
6
+ metadata.gz: ca02bb1eb64f12e8dc1fd93fa8e0d005dc64781ba560ca84c8dc74a49cac59eebda25fff4aa8730e6a84c32731ba12e3437fff59055aa939ce03ea72eee693c8
7
+ data.tar.gz: 0cfec93bf887d588a54aded7fcba0a030280b0bca7d0673ba1eb1e1f9d0fd680cd9280a68e93d8a1cd8aca09f98dec3d8f260e594586077932ef8aa7e1bc4fd2
data/.rspec ADDED
@@ -0,0 +1 @@
1
+ --color
data/Gemfile ADDED
@@ -0,0 +1,22 @@
1
+ #source 'https://rubygems.org'
2
+ source 'http://s3.amazonaws.com/production.s3.rubygems.org/'
3
+
4
+ # Add dependencies required to use your gem here.
5
+ gem 'cenit-collection-base'
6
+ gem 'cenit-client'
7
+ gem 'activesupport'
8
+
9
+ # Include Cenit Collection Gem dependency
10
+ # gem 'cenit-collection-[My Dependency]'
11
+
12
+ # Add dependencies to develop your gem here.
13
+ # Include everything needed to run rake, tests, features, etc.
14
+ group :development do
15
+ gem "rspec", "~> 2.8.0"
16
+ gem "rdoc", "~> 3.12"
17
+ gem "bundler", "~> 1.0"
18
+ gem "jeweler", "~> 2.0.1"
19
+ gem "simplecov", ">= 0"
20
+ end
21
+
22
+
data/LICENSE ADDED
@@ -0,0 +1,26 @@
1
+ Copyright (c) 2015 Asnioby Hdez
2
+ All rights reserved.
3
+
4
+ Redistribution and use in source and binary forms, with or without modification,
5
+ are permitted provided that the following conditions are met:
6
+
7
+ * Redistributions of source code must retain the above copyright notice,
8
+ this list of conditions and the following disclaimer.
9
+ * Redistributions in binary form must reproduce the above copyright notice,
10
+ this list of conditions and the following disclaimer in the documentation
11
+ and/or other materials provided with the distribution.
12
+ * Neither the name Spree nor the names of its contributors may be used to
13
+ endorse or promote products derived from this software without specific
14
+ prior written permission.
15
+
16
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
20
+ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
21
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
22
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
23
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
24
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
25
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
26
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
data/README.md ADDED
@@ -0,0 +1,330 @@
1
+ This is a new Shared Collection (integration settgings) to be use in Cenit, named cenit-collection-super.
2
+
3
+ Cenit is an open source social platform as a service for data and business integration.
4
+
5
+ # CenitCollectionSuper
6
+
7
+ You'll find the files you need to be able to package up your Collection library into a gem. To experiment with that collection use `rake console` for an interactive prompt.
8
+
9
+ ## Installation
10
+
11
+ Add this line to your application's Gemfile:
12
+
13
+ ```ruby
14
+ gem 'cenit-collection-super'
15
+ ```
16
+
17
+ And then execute:
18
+
19
+ $ bundle
20
+
21
+ Or install it yourself as:
22
+
23
+ $ gem install cenit-collection-super
24
+
25
+ ### Structure
26
+
27
+ ```
28
+ % tree
29
+ .
30
+ ├── cenit-collection-cenit-collection-super.gemspec
31
+ ├── Gemfile
32
+ ├── .gitignore
33
+ ├── .rspec
34
+ ├── README.md
35
+ ├── Rakefile
36
+ ├── LICENSE
37
+ └── lib
38
+ └── cenit
39
+ └── collection
40
+ └── cenit-collection-super
41
+ └── connections
42
+ └── webhooks
43
+ └── connection_sets
44
+ └── translators
45
+ └── events
46
+ └── flows
47
+ └── libraries
48
+ └── index.json
49
+ └── build.rb
50
+ └── version.rb
51
+ └── cenit-collection-super.rb
52
+ └── spec
53
+ └── cenit
54
+ └── collection
55
+ └── cenit-collection-super_spec.rb
56
+ └── spec_helper.rb
57
+ └── support
58
+ └── samples
59
+ ```
60
+
61
+ ### Upload your Shared Collection to Cenit Hub.
62
+
63
+ run `rake console`
64
+
65
+ Configure your Cenithub Client API
66
+
67
+ ```ruby
68
+ config = {push_url: 'https://www.cenithub.com/api/v1/push',connection_key: 'My Conn Key',connection_token: 'My Conn Token'}
69
+ ```
70
+ OR
71
+
72
+ ```ruby
73
+ config = {push_url: 'https://www.cenithub.com/api/v1/push',user_key: 'My User Key',user_token: 'My User Token'}
74
+ ```
75
+ Show Hash Collection
76
+
77
+ ```ruby
78
+ Cenit::Collection::Super.show_collection(config)
79
+ ```
80
+
81
+ Load Shared Collection into CenitHub
82
+
83
+ ```ruby
84
+ Cenit::Collection::Super.push_collection(config)
85
+ ```
86
+
87
+ Setup Shared Collection into CenitHub
88
+
89
+ ```ruby
90
+ Cenit::Collection::Super.pull_collection(config)
91
+ ```
92
+ Push sample data into Cenithub
93
+
94
+ ```ruby
95
+ Cenit::Collection::Super.push_sample(config)
96
+ ```
97
+ ## Hello, rake tasks
98
+
99
+ Beyond just editing source code, you'll be interacting with your gem using `rake` a lot. To see all the tasks available with a brief description, you can run:
100
+
101
+ $ rake -T
102
+
103
+ You'll need a version before you can start installing your gem locally. The easiest way is with the `version:write` Rake task. Let's imagine you start with 0.1.0
104
+
105
+ $ rake version:write MAJOR=0 MINOR=1 PATCH=0
106
+
107
+ You can now go forth and develop, now that there's an initial version defined. Eventually, you should install and test the gem:
108
+
109
+ $ rake install
110
+
111
+ The `install` rake task builds the gem and `gem install`s it. You're all set if you're using [RVM](http://rvm.beginrescueend.com/), but you may need to run it with sudo if you have a system-installed ruby:
112
+
113
+ $ sudo rake install
114
+
115
+ ### Create Git and Github repos
116
+
117
+ $ rake create_git_and_github_repo
118
+
119
+ ### Releasing
120
+
121
+ At last, it's time to [ship it](http://shipitsquirrel.github.com/)! Make sure you have everything committed and pushed, then go wild:
122
+
123
+ $ rake release
124
+
125
+ This will automatically:
126
+
127
+ * Generate `hello-gem.gemspec` and commit it
128
+ * Use `git` to tag `v0.1.0` and push it
129
+ * Build `hello-gem-0.1.0.gem` and push it to [rubygems.org](http://rubygems.org/gems/)
130
+
131
+ `rake release` accepts REMOTE(default: `origin`), LOCAL_BRANCH(default: `master`), REMOTE_BRANCH(default: `master`) and BRANCH(default: master)as options.
132
+
133
+ $ rake release REMOTE=upstream LOCAL_BRANCH=critical-security-fix REMOTE_BRANCH=v3
134
+
135
+ This will tag and push the commits on your local branch named `critical-security-fix` to branch named `v3` in remote named `upstream` (if you have commit rights
136
+ on `upstream`) and release the gem.
137
+
138
+ $ rake release BRANCH=v3
139
+
140
+ If both remote and local branches are the same, use `BRANCH` option to simplify.
141
+ This will tag and push the commits on your local branch named `v3` to branch named `v3` in remote named `origin` (if you have commit rights
142
+ on `origin`) and release the gem.
143
+
144
+ ### Version bumping
145
+
146
+ It feels good to release code. Do it, do it often. But before that, bump the version. Then release it. There's a few ways to update the version:
147
+
148
+ # version:write like before
149
+ $ rake version:write MAJOR=0 MINOR=3 PATCH=0
150
+
151
+ # bump just major, ie 0.1.0 -> 1.0.0
152
+ $ rake version:bump:major
153
+
154
+ # bump just minor, ie 0.1.0 -> 0.2.0
155
+ $ rake version:bump:minor
156
+
157
+ # bump just patch, ie 0.1.0 -> 0.1.1
158
+ $ rake version:bump:patch
159
+
160
+ Then it's the same `release` we used before:
161
+
162
+ $ rake release
163
+
164
+ ## Customizing your gem
165
+
166
+ If you've been following along so far, your gem is just a blank slate. You're going to need to make it colorful and full of metadata.
167
+
168
+ You can customize your gem by updating your `Rakefile`. With a newly generated project, it will look something like this:
169
+
170
+ require 'jeweler'
171
+ Jeweler::Tasks.new do |gem|
172
+ # gem is a Gem::Specification... see http://guides.rubygems.org/specification-reference/ for more options
173
+ gem.name = "whatwhatwhat"
174
+ gem.summary = %Q{TODO: one-line summary of your gem}
175
+ gem.description = %Q{TODO: longer description of your gem}
176
+ gem.email = "josh@technicalpickles.com"
177
+ gem.homepage = "http://github.com/technicalpickles/whatwhatwhat"
178
+ gem.authors = ["Joshua Nichols"]
179
+ end
180
+ Jeweler::RubygemsDotOrgTasks.new
181
+
182
+ It's crucial to understand the `gem` object is just a Gem::Specification. You can read up about it at [guides.rubygems.org/specification-reference](http://guides.rubygems.org/specification-reference/). This is the most basic way of specifying a gem, Jeweler-managed or not. Jeweler just exposes this to you, in addition to providing some reasonable defaults, which we'll explore now.
183
+
184
+ ### Project information
185
+
186
+ gem.name = "whatwhatwhat"
187
+
188
+ Every gem has a name. Among other things, the gem name is how you are able to `gem install` it. [Reference](http://guides.rubygems.org/specification-reference/#name)
189
+
190
+ gem.summary = %Q{TODO: one-line summary of your gem}
191
+
192
+ This is a one line summary of your gem. This is displayed, for example, when you use `gem list --details` or view it on [rubygems.org](http://rubygems.org/gems/).
193
+
194
+ gem.description = %Q{TODO: longer description of your gem}
195
+
196
+ Description is a longer description. Scholars ascertain that knowledge of where the description is used was lost centuries ago.
197
+
198
+ gem.email = "josh@technicalpickles.com"
199
+
200
+ This should be a way to get a hold of you regarding the gem.
201
+
202
+ gem.homepage = "http://github.com/technicalpickles/whatwhatwhat"
203
+
204
+ The homepage should have more information about your gem. The jeweler generator guesses this based on the assumption your code lives on [GitHub](http://github.com/), using your Git configuration to find your GitHub username. This is displayed by `gem list --details` and on rubygems.org.
205
+
206
+ gem.authors = ["Joshua Nichols"]
207
+
208
+ Hey, this is you, the author (or me in this case). The `jeweler` generator also guesses this from your Git configuration. This is displayed by `gem list --details` and on rubygems.org.
209
+
210
+ ### Files
211
+
212
+ The quickest way to add more files is to `git add` them. Jeweler uses your Git repository to populate your gem's files by including added and committed and excluding `.gitignore`d. In most cases, this is reasonable enough.
213
+
214
+ If you need to tweak the files, that's cool. Jeweler populates `gem.files` as a `Rake::FileList`. It's like a normal array, except you can `include` and `exclude` file globs:
215
+
216
+ gem.files.exclude 'tmp' # exclude temporary directory
217
+ gem.files.include 'lib/foo/bar.rb' # explicitly include lib/foo/bar.rb
218
+
219
+ If that's not enough, you can just set `gem.files` outright
220
+
221
+ gem.files = Dir.glob('lib/**/*.rb')
222
+
223
+ ### Dependencies
224
+
225
+ Dependencies let you define other gems that your gem needs to function. `gem install your-gem` will install your-gem's dependencies along with it, and when you use your-gem in an application, the dependencies will be made available. Use `gem.add_dependency` to register them. [Reference](http://guides.rubygems.org/specification-reference/#add_development_dependency)
226
+
227
+ gem.add_dependency 'nokogiri'
228
+
229
+ This will ensure a version of `nokogiri` is installed, but it doesn't require anything more than that. You can provide extra args to be more specific:
230
+
231
+ gem.add_dependency 'nokogiri', '= 1.2.1' # exactly version 1.2.1
232
+ gem.add_dependency 'nokogiri', '>= 1.2.1' # greater than or equal to 1.2.1, ie, 1.2.1, 1.2.2, 1.3.0, 2.0.0, etc
233
+ gem.add_dependency 'nokogiri', '>= 1.2.1', '< 1.3.0' # greater than or equal to 1.2.1, but less than 1.3.0
234
+ gem.add_dependency 'nokogiri', '~> 1.2.1' # same thing, but more concise
235
+
236
+ When specifying which version is required, there's a bit of the condunrum. You want to allow the most versions possible, but you want to be sure they are compatible. Using `>= 1.2.1` is fine most of the time, except until the point that 2.0.0 comes out and totally breaks backwards the API. That's when it's good to use `~> 1.2.1`, which requires any version in the `1.2` family, starting with `1.2.1`.
237
+
238
+ ### Executables
239
+
240
+ Executables let your gem install shell commands. Just put any executable scripts in the `bin/` directory, make sure they are added using `git`, and Jeweler will take care of the rest.
241
+
242
+ When you need more finely grained control over it, you can set it yourself:
243
+
244
+ gem.executables = ['foo'] # note, it's the file name relative to `bin/`, not the project root
245
+
246
+ ### Versioning
247
+
248
+ We discussed earlier how to bump the version. The rake tasks are really just convience methods for manipulating the `VERSION` file. It just contains a version string, like `1.2.3`.
249
+
250
+ `VERSION` is a convention used by Jeweler, and is used to populate `gem.version`. You can actually set this yourself, and Jeweler won't try to override it:
251
+
252
+ gem.version = '1.2.3'
253
+
254
+ A common pattern is to have this in a version constant in your library. This is convenient, because users of the library can query the version they are using at runtime.
255
+
256
+ # in lib/foo/version.rb
257
+ class Foo
258
+ module Version
259
+ MAJOR = 1
260
+ MINOR = 2
261
+ PATCH = 3
262
+ BUILD = 'pre3'
263
+
264
+ STRING = [MAJOR, MINOR, PATCH, BUILD].compact.join('.')
265
+ end
266
+ end
267
+
268
+ # in Rakefile
269
+ require 'jeweler'
270
+ require './lib/foo/version.rb'
271
+ Jeweler::Tasks.new do |gem|
272
+ # snip
273
+ gem.version = Foo::Version::STRING
274
+ end
275
+
276
+ ## Development
277
+
278
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `bin/console` for an interactive prompt that will allow you to experiment.
279
+
280
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release` to create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
281
+
282
+ ## Contributing
283
+
284
+ 1. Fork it ( https://github.com/[my-github-username]/cenit-collection-super/fork )
285
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
286
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
287
+ 4. Push to the branch (`git push origin my-new-feature`)
288
+ 5. Create a new Pull Request
289
+
290
+ ## Cenit
291
+
292
+ Cenit is an open source social platform as a service for data and business integration.
293
+
294
+ ### What is
295
+
296
+ Cenit is a social platform as a service for data and business integration. It makes possible
297
+ the automation of all operational processes, connecting legacy apps and internet services.
298
+
299
+ ### Why were doing this
300
+
301
+ A common story for companies is the blending of solutions around its core business value.
302
+ Features developed by them, third-party's adaptations and other SaaS to facilitate operations.
303
+
304
+ Once grown enough a new expansion requires a huge integration effort. But available integration
305
+ solutions are heavy process. Some of them also need B2B transactions using complex EDI standards
306
+ required for large companies or business sectors.
307
+
308
+ This facts overkill many companies that can’t overcome these challenges.
309
+
310
+ ### General Feature
311
+
312
+ * 100% Open Source platform as a service (Open-PaaS).
313
+ * Hub with a great design that provides powerful yet simple abstractions, making a complex problem tractable.
314
+ * Primary concepts are: Data Type, Webhook, Flow, Event, Connection and Transform.
315
+ * Dynamic load schemas: XSD, JSON and EDI grammars.
316
+ * Powerful transform to translates and modified any formats to any format.
317
+ * Full Stack HTTP API and incremental API's helper libraries in several languages.
318
+ * Export and import integration settings (collections), and automatically saves its as a repo on github.
319
+ * Social networking features to share collections.
320
+
321
+ ### Shared Collections
322
+
323
+ There are now over 25 pre-built shared integration collections out the box for connecting
324
+ to internet services, fulfilment solutions, accounting, communications, ERP, multi-channels, etc.
325
+
326
+ ### Join us
327
+
328
+ * Github project: https://github.com/openjaf/cenit
329
+ * Email: support@cenitsaas.com
330
+ * Website: http://www.cenitsaas.com
data/Rakefile ADDED
@@ -0,0 +1,78 @@
1
+ # encoding: utf-8
2
+
3
+ require 'rubygems'
4
+ require 'bundler'
5
+ begin
6
+ Bundler.setup(:default, :development)
7
+ rescue Bundler::BundlerError => e
8
+ $stderr.puts e.message
9
+ $stderr.puts "Run `bundle install` to install missing gems"
10
+ exit e.status_code
11
+ end
12
+
13
+ require 'rake'
14
+ require 'jeweler'
15
+ Jeweler::Tasks.new do |gem|
16
+ # gem is a Gem::Specification... see http://guides.rubygems.org/specification-reference/ for more options
17
+ gem.name = 'cenit-collection-super'
18
+ gem.license = "MIT"
19
+ gem.summary = 'Shared Collection cenit-collection-super to be use in Cenit'
20
+ gem.description = 'Shared Collection cenit-collection-super to be use in Cenit'
21
+ gem.author = 'Asnioby Hdez'
22
+ gem.email = 'asnioby@gmail.com'
23
+ gem.homepage = 'https://github.com/asnioby/cenit-collection-super'
24
+
25
+ # dependencies defined in Gemfile
26
+ end
27
+ Jeweler::RubygemsDotOrgTasks.new
28
+
29
+ class Jeweler::Generator
30
+ def target_dir
31
+ '.'
32
+ end
33
+ def create_git_and_github_repo
34
+ create_version_control
35
+ create_and_push_repo
36
+ end
37
+ end
38
+
39
+ desc "create a new git and related GitHub's repository'"
40
+ task :create_repo do
41
+ options = {
42
+ project_name: 'cenit-collection-super',
43
+ user_name: 'Asnioby Hdez',
44
+ user_email: 'asnioby@gmail.com',
45
+ github_username: 'asnioby',
46
+ summary: 'Shared Collection cenit-collection-super to be use in Cenit',
47
+ description: 'Shared Collection cenit-collection-super to be use in Cenit',
48
+ homepage: 'https://github.com/asnioby/cenit-collection-super',
49
+ testing_framework: :rspec,
50
+ documentation_framework: :rdoc
51
+ }
52
+ g = Jeweler::Generator.new(options)
53
+ g.create_git_and_github_repo
54
+ end
55
+
56
+ require 'rspec/core'
57
+ require 'rspec/core/rake_task'
58
+ RSpec::Core::RakeTask.new(:spec) do |spec|
59
+ spec.pattern = FileList['spec/**/*_spec.rb']
60
+ end
61
+
62
+ desc "Code coverage detail"
63
+ task :simplecov do
64
+ ENV['COVERAGE'] = "true"
65
+ Rake::Task['spec'].execute
66
+ end
67
+
68
+ task :default => :spec
69
+
70
+ require 'rdoc/task'
71
+ Rake::RDocTask.new do |rdoc|
72
+ version = File.exist?('VERSION') ? File.read('VERSION') : ""
73
+
74
+ rdoc.rdoc_dir = 'rdoc'
75
+ rdoc.title = "cenit-collection-super #{version}"
76
+ rdoc.rdoc_files.include('README*')
77
+ rdoc.rdoc_files.include('lib/**/*.rb')
78
+ end
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 0.1.0
@@ -0,0 +1,37 @@
1
+ require "cenit/collection/super/version"
2
+
3
+ module Cenit
4
+ module Collection
5
+ require "cenit/collection/super/build"
6
+ require "cenit/client"
7
+
8
+ # bundle exec irb -I lib -r 'cenit/collection/super'
9
+ # config = {:push_url => "https://www.cenithub.com/api/v1/push", :connection_token => "My Conn Token", :connection_key => "My Conn Key"}
10
+ # config = {:push_url => "https://www.cenithub.com/api/v1/push", :user_token => "My User Token", :user_key => "My User Key"}
11
+ # Cenit::Collection::Super.push_collection config
12
+ # Cenit::Collection::Super.shared_collection
13
+
14
+ @super = Cenit::Collection::Super::Build.new
15
+
16
+ # Include Collection Gem dependency
17
+ # require "cenit/collection/[My Dependency Collection]/build"
18
+ # Collection dependency
19
+ # @super.register_dep(Cenit::Collection::[My Dependency Collection]::Build.new)
20
+
21
+ def self.push_collection (config)
22
+ Cenit::Client.push(@super.shared_collection.to_json, config)
23
+ end
24
+
25
+ def self.show_collection
26
+ @super.shared_collection
27
+ end
28
+
29
+ def self.pull_collection (parameters,config)
30
+ @super.shared_collection
31
+ end
32
+
33
+ def self.push_sample(model, config)
34
+ Cenit::Client.push(@super.sample_data(model).to_json, config)
35
+ end
36
+ end
37
+ end
@@ -0,0 +1,14 @@
1
+ require 'cenit/collection/super/version'
2
+ require 'cenit/collection/base/build'
3
+
4
+ module Cenit
5
+ module Collection
6
+ module Super
7
+ class Build < Cenit::Collection::Base::Build
8
+ def initialize
9
+ super(__dir__)
10
+ end
11
+ end
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,15 @@
1
+ {
2
+ "name": "Twilio API Rol",
3
+ "webhooks": [
4
+ {
5
+ "_reference": true,
6
+ "name": "Twilio API | Send SMS"
7
+ }
8
+ ],
9
+ "connections": [
10
+ {
11
+ "_reference": true,
12
+ "name": "Twilio API Connection"
13
+ }
14
+ ]
15
+ }
@@ -0,0 +1,28 @@
1
+ {
2
+ "name": "Twilio API Connection",
3
+ "url": "https://api.twilio.com/2010-04-01/Accounts/{{account_sid}}",
4
+ "headers": [
5
+ {
6
+ "key": "Accept-Charset:",
7
+ "value": "utf-8"
8
+ },
9
+ {
10
+ "key": "Accept",
11
+ "value": "application/json"
12
+ },
13
+ {
14
+ "key": "Authorization",
15
+ "value": "Basic {% base64 account_sid + ':' + auth_token %}"
16
+ }
17
+ ],
18
+ "template_parameters": [
19
+ {
20
+ "key": "auth_token",
21
+ "value": "A"
22
+ },
23
+ {
24
+ "key": "account_sid",
25
+ "value": "B"
26
+ }
27
+ ]
28
+ }
@@ -0,0 +1,17 @@
1
+ {
2
+ "name": "Communication | SMS on created_at",
3
+ "_type": "Setup::Observer",
4
+ "triggers": "{\"created_at\":{\"0\":{\"o\":\"_not_null\",\"v\":[\"\",\"\",\"\"]}}}",
5
+ "data_type": {
6
+ "_reference": true,
7
+ "name": "Sms",
8
+ "schema": {
9
+ "_reference": true,
10
+ "uri": "sms.json",
11
+ "library": {
12
+ "_reference": true,
13
+ "name": "Communication"
14
+ }
15
+ }
16
+ }
17
+ }
@@ -0,0 +1,19 @@
1
+ {
2
+ "name": "Send SMS with Twilio API",
3
+ "active": true,
4
+ "discard_events": false,
5
+ "data_type_scope": "Event source",
6
+ "last_trigger_timestamps": "2015-04-29T17:49:18+00:00",
7
+ "event": {
8
+ "_reference": true,
9
+ "name": "Communication | SMS on created_at"
10
+ },
11
+ "translator": {
12
+ "_reference": true,
13
+ "name": "SMS to Twilio API"
14
+ },
15
+ "webhook": {
16
+ "_reference": true,
17
+ "name": "Twilio API | Send SMS"
18
+ }
19
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "name": "Super Collection",
3
+ "description": "Super Collection package for install integration in CenitHub",
4
+ "category": "Collection",
5
+ "data": {"name": "Super Collection"},
6
+ "pull_parameters": []
7
+ }
@@ -0,0 +1 @@
1
+ [{"name": "Library Name","file": "library_dir"}]
@@ -0,0 +1,20 @@
1
+ {
2
+ "name": "SMS to Twilio API",
3
+ "type": "Export",
4
+ "style": "ruby",
5
+ "mime_type": "application/x-www-form-urlencoded",
6
+ "bulk_source": false,
7
+ "transformation": "\"Body=#{source.message}&To=#{source.phone}&From=#{source.from}\"",
8
+ "source_data_type": {
9
+ "_reference": true,
10
+ "name": "Sms",
11
+ "schema": {
12
+ "_reference": true,
13
+ "uri": "sms.json",
14
+ "library": {
15
+ "_reference": true,
16
+ "name": "Communication"
17
+ }
18
+ }
19
+ }
20
+ }
@@ -0,0 +1,7 @@
1
+ module Cenit
2
+ module Collection
3
+ module Super
4
+ VERSION = "0.0.1"
5
+ end
6
+ end
7
+ end
@@ -0,0 +1,6 @@
1
+ {
2
+ "name": "Twilio API | Send SMS",
3
+ "path": "Messages.json",
4
+ "purpose": "send",
5
+ "method": "post"
6
+ }
@@ -0,0 +1,37 @@
1
+ require 'simplecov'
2
+
3
+ module SimpleCov::Configuration
4
+ def clean_filters
5
+ @filters = []
6
+ end
7
+ end
8
+
9
+ SimpleCov.configure do
10
+ clean_filters
11
+ load_adapter 'test_frameworks'
12
+ end
13
+
14
+ ENV["COVERAGE"] && SimpleCov.start do
15
+ add_filter "/.rvm/"
16
+ end
17
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
18
+ $LOAD_PATH.unshift(File.dirname(__FILE__))
19
+
20
+ require 'rspec'
21
+ require 'hello-gem'
22
+
23
+ require "cenit/collection/super/build"
24
+ require 'cenit/client'
25
+
26
+ # Requires supporting files with custom matchers and macros, etc,
27
+ # in ./support/ and its subdirectories.
28
+ Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
29
+
30
+ RSpec.configure do |config|
31
+
32
+ # Infer an example group's spec type from the file location.
33
+ config.infer_spec_type_from_file_location!
34
+
35
+ config.mock_with :rspec
36
+ config.color = true
37
+ end
metadata ADDED
@@ -0,0 +1,175 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: cenit-collection-super
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Asnioby Hdez
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-05-20 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: cenit-collection-base
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
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: cenit-client
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: activesupport
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rspec
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: 2.8.0
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: 2.8.0
69
+ - !ruby/object:Gem::Dependency
70
+ name: rdoc
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: '3.12'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: '3.12'
83
+ - !ruby/object:Gem::Dependency
84
+ name: bundler
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: '1.0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: '1.0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: jeweler
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - "~>"
102
+ - !ruby/object:Gem::Version
103
+ version: 2.0.1
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - "~>"
109
+ - !ruby/object:Gem::Version
110
+ version: 2.0.1
111
+ - !ruby/object:Gem::Dependency
112
+ name: simplecov
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
125
+ description: Shared Collection cenit-collection-super to be use in Cenit
126
+ email: asnioby@gmail.com
127
+ executables: []
128
+ extensions: []
129
+ extra_rdoc_files:
130
+ - LICENSE
131
+ - README.md
132
+ files:
133
+ - ".rspec"
134
+ - Gemfile
135
+ - LICENSE
136
+ - README.md
137
+ - Rakefile
138
+ - VERSION
139
+ - lib/cenit/collection/super.rb
140
+ - lib/cenit/collection/super/build.rb
141
+ - lib/cenit/collection/super/connection_roles/twilio_api_rol.json
142
+ - lib/cenit/collection/super/connections/twilio_api_connection.json
143
+ - lib/cenit/collection/super/events/communication_sms_on_created_at.json
144
+ - lib/cenit/collection/super/flows/send_sms_with_twilio_api.json
145
+ - lib/cenit/collection/super/index.json
146
+ - lib/cenit/collection/super/libraries/index.json
147
+ - lib/cenit/collection/super/translators/sms_to_twilio_api.json
148
+ - lib/cenit/collection/super/version.rb
149
+ - lib/cenit/collection/super/webhooks/twilio_api_send_sms.json
150
+ - spec/spec_helper.rb
151
+ homepage: https://github.com/asnioby/cenit-collection-super
152
+ licenses:
153
+ - MIT
154
+ metadata: {}
155
+ post_install_message:
156
+ rdoc_options: []
157
+ require_paths:
158
+ - lib
159
+ required_ruby_version: !ruby/object:Gem::Requirement
160
+ requirements:
161
+ - - ">="
162
+ - !ruby/object:Gem::Version
163
+ version: '0'
164
+ required_rubygems_version: !ruby/object:Gem::Requirement
165
+ requirements:
166
+ - - ">="
167
+ - !ruby/object:Gem::Version
168
+ version: '0'
169
+ requirements: []
170
+ rubyforge_project:
171
+ rubygems_version: 2.2.2
172
+ signing_key:
173
+ specification_version: 4
174
+ summary: Shared Collection cenit-collection-super to be use in Cenit
175
+ test_files: []