cenit_cmd 0.0.4 → 0.0.5
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 +4 -4
- data/Gemfile +5 -0
- data/Gemfile.lock +34 -0
- data/LICENSE.txt +21 -0
- data/cenit_cmd.gemspec +15 -6
- data/lib/cenit_cmd/collection.rb +8 -0
- data/lib/cenit_cmd/templates/bin/console.tt +10 -0
- data/lib/cenit_cmd/templates/bin/setup.tt +10 -0
- data/lib/cenit_cmd/templates/collection/CONTRIBUTING.md +1 -1
- data/lib/cenit_cmd/templates/collection/Gemfile +7 -0
- data/lib/cenit_cmd/templates/collection/collection.gemspec +13 -5
- data/lib/cenit_cmd/templates/collection/gitignore +8 -1
- data/lib/cenit_cmd/templates/collection/lib/%file_name%.rb.tt +49 -1
- data/lib/cenit_cmd/templates/collection/lib/%file_name%/base.rb.tt +9 -0
- data/lib/cenit_cmd/templates/collection/lib/%file_name%/libraries/index.json +1 -1
- data/lib/cenit_cmd/templates/collection/lib/%file_name%/version.rb.tt +3 -0
- data/lib/cenit_cmd/version.rb +3 -0
- metadata +32 -11
- data/LICENSE +0 -26
- data/lib/cenit_cmd/templates/collection/lib/%file_name%/base.rb +0 -0
- data/spec/spec_helper.rb +0 -18
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8187a758bf10c38249f25d0d321a7f530d4ca4d9
|
4
|
+
data.tar.gz: 99d5fd770e2e8cf05c9c16701c0b011f1744ffdb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 362ca27104a63956ca9729c487c8fe64caddcbc10eed73e559d2e382a20dc53c942006b4b8e1df213008d7cd25c45149fbeea1d2645cac26a5c7ca5c40bf5b37
|
7
|
+
data.tar.gz: 99d0cd6885e5be420ec7a7693788be8d24183c8637f4ec67c15a439150cbbf27a912c7c8e050f783596c49e8a12f12e7b085b4b1d8868d7f96eac23b302ce376
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,34 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
cenit_cmd (0.0.5)
|
5
|
+
thor (~> 0.14)
|
6
|
+
|
7
|
+
GEM
|
8
|
+
remote: https://rubygems.org/
|
9
|
+
specs:
|
10
|
+
diff-lcs (1.2.5)
|
11
|
+
rake (10.4.2)
|
12
|
+
rspec (3.2.0)
|
13
|
+
rspec-core (~> 3.2.0)
|
14
|
+
rspec-expectations (~> 3.2.0)
|
15
|
+
rspec-mocks (~> 3.2.0)
|
16
|
+
rspec-core (3.2.3)
|
17
|
+
rspec-support (~> 3.2.0)
|
18
|
+
rspec-expectations (3.2.1)
|
19
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
20
|
+
rspec-support (~> 3.2.0)
|
21
|
+
rspec-mocks (3.2.1)
|
22
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
23
|
+
rspec-support (~> 3.2.0)
|
24
|
+
rspec-support (3.2.2)
|
25
|
+
thor (0.19.1)
|
26
|
+
|
27
|
+
PLATFORMS
|
28
|
+
ruby
|
29
|
+
|
30
|
+
DEPENDENCIES
|
31
|
+
bundler (~> 1.9)
|
32
|
+
cenit_cmd!
|
33
|
+
rake (~> 10.0)
|
34
|
+
rspec
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2015 Cenit, LLC
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/cenit_cmd.gemspec
CHANGED
@@ -1,21 +1,30 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'cenit_cmd/version'
|
5
|
+
|
1
6
|
Gem::Specification.new do |s|
|
7
|
+
s.platform = Gem::Platform::RUBY
|
2
8
|
s.name = "cenit_cmd"
|
3
|
-
s.version =
|
4
|
-
s.authors = [
|
5
|
-
s.email = [
|
9
|
+
s.version = CenitCmd::VERSION
|
10
|
+
s.authors = ['Miguel Sancho','Asnioby Hernandez']
|
11
|
+
s.email = ['sanchojaf@gmail.com','asnioby@gmail.com']
|
6
12
|
s.homepage = "https://github.com/openjaf/cenit_cmd"
|
7
13
|
s.license = %q{MIT}
|
8
14
|
s.summary = %q{Cenit Hub command line utility}
|
9
15
|
s.description = %q{tools to create new collections}
|
16
|
+
s.required_ruby_version = '>= 2.0.0'
|
10
17
|
|
11
18
|
s.rubyforge_project = "cenit_cmd"
|
12
19
|
|
13
|
-
s.files = `git ls-files`.split("\
|
14
|
-
s.test_files = `git ls-files -- {spec}/*`.split("\n")
|
20
|
+
s.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
15
21
|
s.bindir = 'bin'
|
16
22
|
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
17
23
|
s.require_paths = ["lib"]
|
18
24
|
|
19
|
-
s.add_development_dependency
|
25
|
+
s.add_development_dependency "bundler", "~> 1.9"
|
26
|
+
s.add_development_dependency "rake", "~> 10.0"
|
27
|
+
|
20
28
|
s.add_dependency 'thor', '~> 0.14'
|
21
29
|
end
|
30
|
+
|
data/lib/cenit_cmd/collection.rb
CHANGED
@@ -14,6 +14,14 @@ module CenitCmd
|
|
14
14
|
empty_directory file_name
|
15
15
|
|
16
16
|
directory 'lib', "#{file_name}/lib"
|
17
|
+
empty_directory "#{file_name}/lib/#{file_name}/connections"
|
18
|
+
empty_directory "#{file_name}/lib/#{file_name}/webhooks"
|
19
|
+
empty_directory "#{file_name}/lib/#{file_name}/connection_roles"
|
20
|
+
empty_directory "#{file_name}/lib/#{file_name}/events"
|
21
|
+
empty_directory "#{file_name}/lib/#{file_name}/flows"
|
22
|
+
empty_directory "#{file_name}/lib/#{file_name}/translators"
|
23
|
+
empty_directory "#{file_name}/lib/#{file_name}/support"
|
24
|
+
empty_directory "#{file_name}/lib/#{file_name}/support/sample"
|
17
25
|
|
18
26
|
template 'collection.gemspec', "#{file_name}/#{file_name}.gemspec"
|
19
27
|
template 'Gemfile', "#{file_name}/Gemfile"
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# How to contribute
|
2
2
|
|
3
|
-
|
3
|
+
Extension are essential to any great open source project. We want
|
4
4
|
to keep it as easy as possible to contribute changes that get things working
|
5
5
|
in your environment. There are a few guidelines that we need contributors to
|
6
6
|
follow so that we can have a chance of keeping on top of things.
|
@@ -1,8 +1,12 @@
|
|
1
|
-
#
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require '<%= file_name %>/version'
|
5
|
+
|
2
6
|
Gem::Specification.new do |s|
|
3
7
|
s.platform = Gem::Platform::RUBY
|
4
8
|
s.name = '<%= file_name %>'
|
5
|
-
s.version =
|
9
|
+
s.version = <%= class_name %>::VERSION
|
6
10
|
s.summary = 'TODO: Add gem summary here'
|
7
11
|
s.description = 'TODO: Add (optional) gem description here'
|
8
12
|
s.required_ruby_version = '>= 2.0.0'
|
@@ -11,8 +15,12 @@ Gem::Specification.new do |s|
|
|
11
15
|
# s.email = 'you@example.com'
|
12
16
|
# s.homepage = 'http://www.cenitsaas.com'
|
13
17
|
|
14
|
-
|
15
|
-
s.
|
16
|
-
s.
|
18
|
+
s.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
19
|
+
s.bindir = 'bin'
|
20
|
+
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
21
|
+
s.require_paths = ["lib"]
|
22
|
+
|
23
|
+
s.add_development_dependency "bundler", "~> 1.9"
|
24
|
+
s.add_development_dependency "rake", "~> 10.0"
|
17
25
|
s.requirements << 'none'
|
18
26
|
end
|
@@ -1 +1,49 @@
|
|
1
|
-
require '<%=file_name
|
1
|
+
require '<%=file_name%>/version'
|
2
|
+
require 'json'
|
3
|
+
|
4
|
+
module <%=class_name%>
|
5
|
+
|
6
|
+
require '<%=file_name%>/base'
|
7
|
+
require 'cenit_client/client'
|
8
|
+
require 'collection_base'
|
9
|
+
#require 'my_dependency_collection/base'
|
10
|
+
|
11
|
+
@c = <%=class_name%>::Collection.new
|
12
|
+
|
13
|
+
@collection_dep = []
|
14
|
+
# @collection_dep << MyDepCollection::Collection.new
|
15
|
+
|
16
|
+
def self.build_collection
|
17
|
+
shared = {}
|
18
|
+
models = ['flows','connection_roles','translators','events','connections','webhooks']
|
19
|
+
models.collect do |model|
|
20
|
+
hash =[]
|
21
|
+
@collection_dep.collect do |collection|
|
22
|
+
hash = hash + collection.process_model(model)
|
23
|
+
end
|
24
|
+
shared.merge!({model => hash + @c.process_model(model)})
|
25
|
+
end
|
26
|
+
hash =[]
|
27
|
+
@collection_dep.collect do |collection|
|
28
|
+
hash = hash + collection.process_libraries
|
29
|
+
end
|
30
|
+
shared.merge!({'libraries' => hash + @c.process_libraries})
|
31
|
+
{"data" => shared}
|
32
|
+
end
|
33
|
+
|
34
|
+
def self.shared_collection
|
35
|
+
shared = @c.shared_base
|
36
|
+
shared.merge!(build_collection)
|
37
|
+
{"shared_collection" => shared}
|
38
|
+
end
|
39
|
+
|
40
|
+
def self.push_collection (config)
|
41
|
+
Cenithub::Client.push(shared_collection.to_json, config)
|
42
|
+
end
|
43
|
+
|
44
|
+
def self.push_sample(model, config)
|
45
|
+
sample_data = @c.sample_data(model)
|
46
|
+
Cenithub::Client.push(sample_data.to_json, config)
|
47
|
+
end
|
48
|
+
|
49
|
+
end
|
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
[{"name": "MyLibrary","file": "my_library"}]
|
metadata
CHANGED
@@ -1,29 +1,44 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cenit_cmd
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Miguel Sancho
|
8
|
+
- Asnioby Hernandez
|
8
9
|
autorequire:
|
9
10
|
bindir: bin
|
10
11
|
cert_chain: []
|
11
|
-
date: 2015-05-
|
12
|
+
date: 2015-05-09 00:00:00.000000000 Z
|
12
13
|
dependencies:
|
13
14
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
15
|
+
name: bundler
|
15
16
|
requirement: !ruby/object:Gem::Requirement
|
16
17
|
requirements:
|
17
|
-
- - "
|
18
|
+
- - "~>"
|
19
|
+
- !ruby/object:Gem::Version
|
20
|
+
version: '1.9'
|
21
|
+
type: :development
|
22
|
+
prerelease: false
|
23
|
+
version_requirements: !ruby/object:Gem::Requirement
|
24
|
+
requirements:
|
25
|
+
- - "~>"
|
18
26
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
27
|
+
version: '1.9'
|
28
|
+
- !ruby/object:Gem::Dependency
|
29
|
+
name: rake
|
30
|
+
requirement: !ruby/object:Gem::Requirement
|
31
|
+
requirements:
|
32
|
+
- - "~>"
|
33
|
+
- !ruby/object:Gem::Version
|
34
|
+
version: '10.0'
|
20
35
|
type: :development
|
21
36
|
prerelease: false
|
22
37
|
version_requirements: !ruby/object:Gem::Requirement
|
23
38
|
requirements:
|
24
|
-
- - "
|
39
|
+
- - "~>"
|
25
40
|
- !ruby/object:Gem::Version
|
26
|
-
version: '0'
|
41
|
+
version: '10.0'
|
27
42
|
- !ruby/object:Gem::Dependency
|
28
43
|
name: thor
|
29
44
|
requirement: !ruby/object:Gem::Requirement
|
@@ -41,13 +56,16 @@ dependencies:
|
|
41
56
|
description: tools to create new collections
|
42
57
|
email:
|
43
58
|
- sanchojaf@gmail.com
|
59
|
+
- asnioby@gmail.com
|
44
60
|
executables:
|
45
61
|
- cenit
|
46
62
|
- cenit_cmd
|
47
63
|
extensions: []
|
48
64
|
extra_rdoc_files: []
|
49
65
|
files:
|
50
|
-
-
|
66
|
+
- Gemfile
|
67
|
+
- Gemfile.lock
|
68
|
+
- LICENSE.txt
|
51
69
|
- README.md
|
52
70
|
- Rakefile
|
53
71
|
- bin/cenit
|
@@ -55,6 +73,8 @@ files:
|
|
55
73
|
- cenit_cmd.gemspec
|
56
74
|
- lib/cenit_cmd.rb
|
57
75
|
- lib/cenit_cmd/collection.rb
|
76
|
+
- lib/cenit_cmd/templates/bin/console.tt
|
77
|
+
- lib/cenit_cmd/templates/bin/setup.tt
|
58
78
|
- lib/cenit_cmd/templates/collection/CONTRIBUTING.md
|
59
79
|
- lib/cenit_cmd/templates/collection/Gemfile
|
60
80
|
- lib/cenit_cmd/templates/collection/LICENSE
|
@@ -63,12 +83,13 @@ files:
|
|
63
83
|
- lib/cenit_cmd/templates/collection/collection.gemspec
|
64
84
|
- lib/cenit_cmd/templates/collection/gitignore
|
65
85
|
- lib/cenit_cmd/templates/collection/lib/%file_name%.rb.tt
|
66
|
-
- lib/cenit_cmd/templates/collection/lib/%file_name%/base.rb
|
86
|
+
- lib/cenit_cmd/templates/collection/lib/%file_name%/base.rb.tt
|
67
87
|
- lib/cenit_cmd/templates/collection/lib/%file_name%/index.json
|
68
88
|
- lib/cenit_cmd/templates/collection/lib/%file_name%/libraries/index.json
|
89
|
+
- lib/cenit_cmd/templates/collection/lib/%file_name%/version.rb.tt
|
69
90
|
- lib/cenit_cmd/templates/collection/rspec
|
70
91
|
- lib/cenit_cmd/templates/collection/spec/spec_helper.rb.tt
|
71
|
-
-
|
92
|
+
- lib/cenit_cmd/version.rb
|
72
93
|
homepage: https://github.com/openjaf/cenit_cmd
|
73
94
|
licenses:
|
74
95
|
- MIT
|
@@ -81,7 +102,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
81
102
|
requirements:
|
82
103
|
- - ">="
|
83
104
|
- !ruby/object:Gem::Version
|
84
|
-
version:
|
105
|
+
version: 2.0.0
|
85
106
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
86
107
|
requirements:
|
87
108
|
- - ">="
|
data/LICENSE
DELETED
@@ -1,26 +0,0 @@
|
|
1
|
-
Copyright (c) 2007-2015, Spree Commerce, Inc. and other contributors
|
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.
|
File without changes
|
data/spec/spec_helper.rb
DELETED
@@ -1,18 +0,0 @@
|
|
1
|
-
if ENV["COVERAGE"]
|
2
|
-
# Run Coverage report
|
3
|
-
require 'simplecov'
|
4
|
-
SimpleCov.start do
|
5
|
-
add_group 'Libraries', 'lib'
|
6
|
-
end
|
7
|
-
end
|
8
|
-
|
9
|
-
|
10
|
-
RSpec.configure do |config|
|
11
|
-
config.color = true
|
12
|
-
config.mock_with :rspec
|
13
|
-
config.raise_errors_for_deprecations!
|
14
|
-
|
15
|
-
config.use_transactional_fixtures = false
|
16
|
-
|
17
|
-
config.fail_fast = ENV['FAIL_FAST'] || false
|
18
|
-
end
|