cenit-collection-communication 0.0.1

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.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: f6953b812ddbfbbc998822f468ee203fca624fd2
4
+ data.tar.gz: 96f19d6b3b78f5aaa59e2c2942cb1d24b8cd4146
5
+ SHA512:
6
+ metadata.gz: 4a4765240d5014862621d2fe734f558d03e90d6dec1da4a847f8e56d538e9ec4ef529eb538b28fd04c1a9cdc4f65142ed6925402c974ed3e579df1487a8fd278
7
+ data.tar.gz: 59fb1413cda828b6580aa6435c30968d28c73ca8661ecbec4d90d7fd5a40e845fad1a066a491ad3cc8404e47c79d1713d88d0d89333817bd24ba317f04200559
@@ -0,0 +1,10 @@
1
+ .idea/
2
+ /.bundle/
3
+ /.yardoc
4
+ /Gemfile.lock
5
+ /_yardoc/
6
+ /coverage/
7
+ /doc/
8
+ /pkg/
9
+ /spec/reports/
10
+ /tmp/
@@ -0,0 +1,3 @@
1
+ language: ruby
2
+ rvm:
3
+ - 2.1.2
data/Gemfile ADDED
@@ -0,0 +1,6 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in cenit-collection-communication.gemspec
4
+ gemspec
5
+ gem 'cenit-client'
6
+ gem 'cenit-collection-base'
@@ -0,0 +1,83 @@
1
+ # Cenit::Collection::Communication
2
+
3
+ Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/cenit/collection/communication`. To experiment with that code, run `bin/console` for an interactive prompt.
4
+
5
+ TODO: Delete this and the text above, and describe your gem
6
+
7
+ ## Installation
8
+
9
+ Add this line to your application's Gemfile:
10
+
11
+ ```ruby
12
+ gem 'cenit-collection-communication'
13
+ ```
14
+
15
+ And then execute:
16
+
17
+ $ bundle
18
+
19
+ Or install it yourself as:
20
+
21
+ $ gem install cenit-collection-communication
22
+
23
+ ###Structure
24
+
25
+ |Cenit
26
+ |Collection
27
+ | Connection Roles
28
+ | Connections
29
+ | Webhooks
30
+ | Libraries
31
+ | Flows
32
+ | Translators
33
+ | Events
34
+
35
+ ###Install Shared Collection
36
+
37
+ run `bundle exec irb -I lib -r 'cenit/collection/communication'`
38
+
39
+ Configure your Cenithub Client API
40
+
41
+ ```ruby
42
+ config = {push_url: 'https://www.cenithub.com/api/v1/push',connection_key: 'My Conn Key',connection_token: 'My Conn Token'}
43
+ ```
44
+ OR
45
+
46
+ ```ruby
47
+ config = {push_url: 'https://www.cenithub.com/api/v1/push',user_key: 'My User Key',user_token: 'My User Token'}
48
+ ```
49
+ Show Hash Collection
50
+
51
+ ```ruby
52
+ Cenit::Collection::Communication.show_collection(config)
53
+ ```
54
+
55
+ Load Shared Collection into Cenithub
56
+
57
+ ```ruby
58
+ Cenit::Collection::Communication.push_collection(config)
59
+ ```
60
+
61
+ Setup Shared Collection into Cenithub
62
+
63
+ ```ruby
64
+ Cenit::Collection::Communication.pull_collection(config)
65
+ ```
66
+ Push sample data into Cenithub
67
+
68
+ ```ruby
69
+ Cenit::Collection::Communication.push_sample('sms',config)
70
+
71
+ ## Development
72
+
73
+ 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.
74
+
75
+ 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).
76
+
77
+ ## Contributing
78
+
79
+ 1. Fork it ( https://github.com/[my-github-username]/cenit-collection-communication/fork )
80
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
81
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
82
+ 4. Push to the branch (`git push origin my-new-feature`)
83
+ 5. Create a new Pull Request
@@ -0,0 +1 @@
1
+ require "bundler/gem_tasks"
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "cenit/collection/communication"
5
+
6
+ # You can add fixtures and/or initialization code here to make experimenting
7
+ # with your gem easier. You can also use a different console, if you like.
8
+
9
+ # (If you use this, don't forget to add pry to your Gemfile!)
10
+ # require "pry"
11
+ # Pry.start
12
+
13
+ require "irb"
14
+ IRB.start
@@ -0,0 +1,7 @@
1
+ #!/bin/bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+
5
+ bundle install
6
+
7
+ # Do any other automated setup that you need to do here
@@ -0,0 +1,26 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'cenit/collection/communication/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "cenit-collection-communication"
8
+ spec.version = Cenit::Collection::Communication::VERSION
9
+ spec.authors = ["asnioby"]
10
+ spec.email = ["asnioby@gmail.com"]
11
+ spec.license = %q{MIT}
12
+
13
+ spec.summary = %q{Cenit Library Communication}
14
+ spec.description = %q{Collection for Cenit Library Communication}
15
+ spec.homepage = "https://github.com/openjaf/cenit-collection-communication"
16
+
17
+ spec.rubyforge_project = "cenit-collection"
18
+
19
+ spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
20
+ spec.bindir = 'bin'
21
+ spec.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
22
+ spec.require_paths = ["lib"]
23
+
24
+ spec.add_development_dependency "bundler", "~> 1.9"
25
+ spec.add_development_dependency "rake", "~> 10.0"
26
+ end
@@ -0,0 +1,28 @@
1
+ require "cenit/collection/communication/version"
2
+
3
+ module Cenit
4
+ module Collection
5
+ module Communication
6
+
7
+ require "cenit/collection/communication/build"
8
+ require "cenit/client"
9
+ #bundle exec irb -I lib -r 'cenit/collection/communication'
10
+ #config = {:push_url => "http://localhost:3000/api/v1/push", :connection_token => "BKjD6BiNijY8y9UwUjsR", :connection_id => "C597517142"}
11
+ #Cenit::Collection::Communication.push_collection
12
+
13
+ @communication= Cenit::Collection::Communication::Build.new
14
+
15
+ def self.push_collection (config)
16
+ Cenit::Client.push(@communication.shared_collection.to_json, config)
17
+ end
18
+
19
+ def self.shared_collection ()
20
+ @communication.shared_collection
21
+ end
22
+
23
+ def self.push_sample(model, config)
24
+ Cenit::Client.push(@communication.sample_data(model).to_json, config)
25
+ end
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,13 @@
1
+ require 'cenit/collection/base/build'
2
+
3
+ module Cenit
4
+ module Collection
5
+ module Communication
6
+ class Build < Cenit::Collection::Base::Build
7
+ def initialize
8
+ super(__dir__)
9
+ end
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,6 @@
1
+ {
2
+ "name": "Communication Collection",
3
+ "description": "Communication Collection",
4
+ "category": "Library",
5
+ "data": {"name": "Communication Collection"}
6
+ }
@@ -0,0 +1,27 @@
1
+ {
2
+ "title": "Email",
3
+ "type": "object",
4
+ "properties": {
5
+ "to": {
6
+ "type": "string"
7
+ },
8
+ "from": {
9
+ "type": "string"
10
+ },
11
+ "from_name": {
12
+ "type": "string"
13
+ },
14
+ "subject": {
15
+ "type": "string"
16
+ },
17
+ "body_text": {
18
+ "type": "string"
19
+ },
20
+ "body_html": {
21
+ "type": "string"
22
+ },
23
+ "template": {
24
+ "type": "string"
25
+ }
26
+ }
27
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "title": "Member",
3
+ "type": "object",
4
+ "properties": {
5
+ "email": {
6
+ "type": "string"
7
+ },
8
+ "first_name": {
9
+ "type": "string"
10
+ },
11
+ "last_name": {
12
+ "type": "string"
13
+ }
14
+ }
15
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "title": "Message",
3
+ "type": "object",
4
+ "properties": {
5
+ "text": {
6
+ "type": "string"
7
+ }
8
+ }
9
+ }
@@ -0,0 +1,18 @@
1
+ {
2
+ "title": "SMS",
3
+ "type": "object",
4
+ "properties": {
5
+ "id": {
6
+ "type": "string"
7
+ },
8
+ "from": {
9
+ "type": "string"
10
+ },
11
+ "message": {
12
+ "type": "string"
13
+ },
14
+ "phone": {
15
+ "type": "string"
16
+ }
17
+ }
18
+ }
@@ -0,0 +1,12 @@
1
+ {
2
+ "title": "Ticket",
3
+ "type": "object",
4
+ "properties": {
5
+ "subject": {
6
+ "type": "string"
7
+ },
8
+ "description": {
9
+ "type": "string"
10
+ }
11
+ }
12
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "title": "Tweet",
3
+ "type": "object",
4
+ "properties": {
5
+ "body": {
6
+ "type": "string"
7
+ }
8
+ }
9
+ }
@@ -0,0 +1 @@
1
+ [{"name": "Communication", "file": "communication"}]
@@ -0,0 +1,14 @@
1
+ {
2
+ "sms": [
3
+ {
4
+ "from": "+000000000",
5
+ "message": "Order ID R154085346 status complete!",
6
+ "phone": "+000000000"
7
+ },
8
+ {
9
+ "from": "+00000000",
10
+ "message": "Order ID R154085347 status canceled!",
11
+ "phone": "+000000000"
12
+ }
13
+ ]
14
+ }
@@ -0,0 +1,7 @@
1
+ module Cenit
2
+ module Collection
3
+ module Communication
4
+ VERSION = "0.0.1"
5
+ end
6
+ end
7
+ end
metadata ADDED
@@ -0,0 +1,94 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: cenit-collection-communication
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - asnioby
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-05-14 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.9'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.9'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '10.0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '10.0'
41
+ description: Collection for Cenit Library Communication
42
+ email:
43
+ - asnioby@gmail.com
44
+ executables:
45
+ - console
46
+ - setup
47
+ extensions: []
48
+ extra_rdoc_files: []
49
+ files:
50
+ - ".gitignore"
51
+ - ".travis.yml"
52
+ - Gemfile
53
+ - README.md
54
+ - Rakefile
55
+ - bin/console
56
+ - bin/setup
57
+ - cenit-collection-communication.gemspec
58
+ - lib/cenit/collection/communication.rb
59
+ - lib/cenit/collection/communication/build.rb
60
+ - lib/cenit/collection/communication/index.json
61
+ - lib/cenit/collection/communication/libraries/communication/email.json
62
+ - lib/cenit/collection/communication/libraries/communication/member.json
63
+ - lib/cenit/collection/communication/libraries/communication/message.json
64
+ - lib/cenit/collection/communication/libraries/communication/sms.json
65
+ - lib/cenit/collection/communication/libraries/communication/ticket.json
66
+ - lib/cenit/collection/communication/libraries/communication/tweet.json
67
+ - lib/cenit/collection/communication/libraries/index.json
68
+ - lib/cenit/collection/communication/support/sample/sms.json
69
+ - lib/cenit/collection/communication/version.rb
70
+ homepage: https://github.com/openjaf/cenit-collection-communication
71
+ licenses:
72
+ - MIT
73
+ metadata: {}
74
+ post_install_message:
75
+ rdoc_options: []
76
+ require_paths:
77
+ - lib
78
+ required_ruby_version: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ required_rubygems_version: !ruby/object:Gem::Requirement
84
+ requirements:
85
+ - - ">="
86
+ - !ruby/object:Gem::Version
87
+ version: '0'
88
+ requirements: []
89
+ rubyforge_project: cenit-collection
90
+ rubygems_version: 2.2.2
91
+ signing_key:
92
+ specification_version: 4
93
+ summary: Cenit Library Communication
94
+ test_files: []