cenit_cmd 0.0.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.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 45c4b08097a176c1e0796260e2ac0b947c741dcd
4
+ data.tar.gz: 019e2ed3e351ee7af637468355192d1443004000
5
+ SHA512:
6
+ metadata.gz: d3d8be220de6f1df0028f7cdcdf91c8499a95664d1286e8e47a83223a2577c609ed756483f9c7f2a9cc38450f8a6a3f9b452f1840860e0a64ad3cf10652a7797
7
+ data.tar.gz: 93cb7ce0af1f077c0a57df4dfeaf99b97b840e7b3fff06e96afd3b52e546fe0c21a830361128a35c02254d6a3bfc60675615586553b9087dde8c60d063ecd5b5
data/LICENSE ADDED
@@ -0,0 +1,26 @@
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.
@@ -0,0 +1,7 @@
1
+ Collections
2
+ -----------
3
+
4
+ To build a new repo for a Cenit Collection, you can run
5
+ ```ruby
6
+ cenit collection my_collection
7
+ ```
@@ -0,0 +1,6 @@
1
+ require "bundler/gem_tasks"
2
+
3
+ desc 'alias for :build to work with other cenit collections'
4
+ task :gem => :build do
5
+
6
+ end
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env ruby
2
+ require 'cenit_cmd'
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env ruby
2
+ require 'cenit_cmd'
@@ -0,0 +1,21 @@
1
+ Gem::Specification.new do |s|
2
+ s.name = "cenit_cmd"
3
+ s.version = "0.0.3"
4
+ s.authors = ["Miguel Sancho"]
5
+ s.email = ["sanchojaf@gmail.com"]
6
+ s.homepage = "https://github.com/openjaf/cenit_cmd"
7
+ s.license = %q{MIT}
8
+ s.summary = %q{Cenit Hub command line utility}
9
+ s.description = %q{tools to create new collections}
10
+
11
+ s.rubyforge_project = "cenit_cmd"
12
+
13
+ s.files = `git ls-files`.split("\n")
14
+ s.test_files = `git ls-files -- {spec}/*`.split("\n")
15
+ s.bindir = 'bin'
16
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
17
+ s.require_paths = ["lib"]
18
+
19
+ s.add_development_dependency 'rspec'
20
+ s.add_dependency 'thor', '~> 0.14'
21
+ end
@@ -0,0 +1,12 @@
1
+ require 'thor'
2
+ require 'thor/group'
3
+
4
+ case ARGV.first
5
+ when 'version', '-v', '--version'
6
+ puts Gem.loaded_specs['cenit_cmd'].version
7
+ when 'collection'
8
+ ARGV.shift
9
+ require 'cenit_cmd/collection'
10
+ CenitCmd::Collection.start
11
+ end
12
+
@@ -0,0 +1,52 @@
1
+ module CenitCmd
2
+
3
+ class Collection < Thor::Group
4
+ include Thor::Actions
5
+
6
+ desc "builds a cenit_hub collection"
7
+ argument :file_name, :type => :string, :desc => '', :default => '.' #rails app_path
8
+
9
+ source_root File.expand_path('../templates/collection', __FILE__)
10
+
11
+ def generate
12
+ use_suffix '_collection'
13
+
14
+ empty_directory file_name
15
+
16
+ directory 'lib', "#{file_name}/lib"
17
+ directory 'bin', "#{file_name}/bin"
18
+
19
+ template 'collection.gemspec', "#{file_name}/#{file_name}.gemspec"
20
+ template 'Gemfile', "#{file_name}/Gemfile"
21
+ template 'gitignore', "#{file_name}/.gitignore"
22
+ template 'LICENSE', "#{file_name}/LICENSE"
23
+ template 'Rakefile', "#{file_name}/Rakefile"
24
+ template 'README.md', "#{file_name}/README.md"
25
+ template 'rspec', "#{file_name}/.rspec"
26
+ template 'spec/spec_helper.rb.tt', "#{file_name}/spec/spec_helper.rb"
27
+ end
28
+
29
+ def final_banner
30
+ say %Q{
31
+ #{'*' * 80}
32
+
33
+ Consider listing your collection in https://rubygems.org
34
+
35
+ #{'*' * 80}
36
+ }
37
+ end
38
+
39
+ no_tasks do
40
+ def class_name
41
+ Thor::Util.camel_case file_name
42
+ end
43
+
44
+ def use_suffix(suffix)
45
+ unless file_name =~ /#{suffix}$/
46
+ @file_name = Thor::Util.snake_case(file_name) + suffix
47
+ end
48
+ end
49
+ end
50
+
51
+ end
52
+ end
@@ -0,0 +1,57 @@
1
+ # How to contribute
2
+
3
+ Third-party patches are essential to any great open source project. We want
4
+ to keep it as easy as possible to contribute changes that get things working
5
+ in your environment. There are a few guidelines that we need contributors to
6
+ follow so that we can have a chance of keeping on top of things.
7
+
8
+ ## Getting Started
9
+
10
+ * Make sure you have a [GitHub account](https://github.com/signup/free)
11
+ * Submit a ticket for your issue, assuming one does not already exist.
12
+ * Clearly describe the issue including steps to reproduce when it is a bug.
13
+ * Make sure you fill in the earliest version that you know has the issue.
14
+ * Fork the repository on GitHub
15
+
16
+ ## Making Changes
17
+
18
+ * Create a topic branch from where you want to base your work.
19
+ * This is usually the master branch.
20
+ * Only target release branches if you are certain your fix must be on that
21
+ branch.
22
+ * To quickly create a topic branch based on master; `git branch
23
+ fix/master/my_contribution master` then checkout the new branch with `git
24
+ checkout fix/master/my_contribution`. Please avoid working directly on the
25
+ `master` branch.
26
+ * Make commits of logical units.
27
+ * Check for unnecessary whitespace with `git diff --check` before committing.
28
+ * Make sure your commit messages are in the proper format.
29
+
30
+ ````
31
+ (#99999) Make the example in CONTRIBUTING imperative and concrete
32
+
33
+ Without this patch applied the example commit message in the CONTRIBUTING
34
+ document is not a concrete example. This is a problem because the
35
+ contributor is left to imagine what the commit message should look like
36
+ based on a description rather than an example. This patch fixes the
37
+ problem by making the example concrete and imperative.
38
+
39
+ The first line is a real life imperative statement with a ticket number
40
+ from our issue tracker. The body describes the behavior without the patch,
41
+ why this is a problem, and how the patch fixes the problem when applied.
42
+ ````
43
+
44
+ * Make sure you have added the necessary tests for your changes.
45
+ * Run _all_ the tests to assure nothing else was accidentally broken.
46
+
47
+ ## Submitting Changes
48
+
49
+ * Push your changes to a topic branch in your fork of the repository.
50
+ * Submit a pull request to the extensions repository.
51
+ * Update any Github issues to mark that you have submitted code and are ready for it to be reviewed.
52
+ * Include a link to the pull request in the ticket
53
+
54
+ # Additional Resources
55
+
56
+ * [General GitHub documentation](http://help.github.com/)
57
+ * [GitHub pull request documentation](http://help.github.com/send-pull-requests/)
@@ -0,0 +1,3 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec
@@ -0,0 +1,26 @@
1
+ Copyright (c) <%= Time.now.year %> [name of plugin creator]
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.
@@ -0,0 +1,39 @@
1
+ <%= class_name %>
2
+ <%= "=" * class_name.size %>
3
+
4
+ Introduction goes here.
5
+
6
+ Installation
7
+ ------------
8
+
9
+ Add <%= file_name %> to your Gemfile:
10
+
11
+ ```ruby
12
+ gem '<%= file_name %>'
13
+ ```
14
+
15
+ Bundle your dependencies and run the installation generator:
16
+
17
+ ```shell
18
+ bundle
19
+ bundle exec rails g <%= file_name %>:install
20
+ ```
21
+
22
+ Testing
23
+ -------
24
+
25
+ First bundle your dependencies, then run `rake`. `rake` will default to building the dummy app if it does not exist, then it will run specs. The dummy app can be regenerated by using `rake test_app`.
26
+
27
+ ```shell
28
+ bundle
29
+ bundle exec rake
30
+ ```
31
+
32
+ When testing your applications integration with this extension you may use it's factories.
33
+ Simply add this require statement to your spec_helper:
34
+
35
+ ```ruby
36
+ require '<%= file_name %>/factories'
37
+ ```
38
+
39
+ Copyright (c) <%= Time.now.year %> [name of extension creator], released under the New BSD License
@@ -0,0 +1,14 @@
1
+ require 'bundler'
2
+ Bundler::GemHelper.install_tasks
3
+
4
+ require 'rspec/core/rake_task'
5
+
6
+ RSpec::Core::RakeTask.new
7
+
8
+ task :default do
9
+ if Dir["spec/dummy"].empty?
10
+ Rake::Task[:test_app].invoke
11
+ Dir.chdir("../../")
12
+ end
13
+ Rake::Task[:spec].invoke
14
+ end
@@ -0,0 +1,18 @@
1
+ # encoding: UTF-8
2
+ Gem::Specification.new do |s|
3
+ s.platform = Gem::Platform::RUBY
4
+ s.name = '<%= file_name %>'
5
+ s.version = '0.0.1'
6
+ s.summary = 'TODO: Add gem summary here'
7
+ s.description = 'TODO: Add (optional) gem description here'
8
+ s.required_ruby_version = '>= 2.0.0'
9
+
10
+ # s.author = 'You'
11
+ # s.email = 'you@example.com'
12
+ # s.homepage = 'http://www.cenitsaas.com'
13
+
14
+ #s.files = `git ls-files`.split("\n")
15
+ #s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
16
+ s.require_path = 'lib'
17
+ s.requirements << 'none'
18
+ end
@@ -0,0 +1,13 @@
1
+ \#*
2
+ *~
3
+ .#*
4
+ .DS_Store
5
+ .idea
6
+ .project
7
+ .sass-cache
8
+ coverage
9
+ Gemfile.lock
10
+ tmp
11
+ nbproject
12
+ pkg
13
+ *.swp
@@ -0,0 +1 @@
1
+ require '<%=file_name%>'
@@ -0,0 +1,8 @@
1
+ {
2
+ "name": "#{file_name} Collection",
3
+ "description": "#{file_name} Collection package for install integration in CenitHub",
4
+ "category": "Collection",
5
+ "data": {"name": "#{file_name} collection"},
6
+ "pull_parameters": [
7
+ ]
8
+ }
@@ -0,0 +1,3 @@
1
+ module TwilioCollection
2
+ VERSION = "0.1.0"
3
+ end
@@ -0,0 +1,19 @@
1
+ # Run Coverage report
2
+ require 'simplecov'
3
+ SimpleCov.start do
4
+ add_group 'Libraries', 'lib'
5
+ end
6
+
7
+
8
+ # Requires supporting ruby files with custom matchers and macros, etc,
9
+ # in spec/support/ and its subdirectories.
10
+ Dir[File.join(File.dirname(__FILE__), 'support/**/*.rb')].each { |f| require f }
11
+
12
+ RSpec.configure do |config|
13
+
14
+ # Infer an example group's spec type from the file location.
15
+ config.infer_spec_type_from_file_location!
16
+
17
+ config.mock_with :rspec
18
+ config.color = true
19
+ end
@@ -0,0 +1,18 @@
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
metadata ADDED
@@ -0,0 +1,97 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: cenit_cmd
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.3
5
+ platform: ruby
6
+ authors:
7
+ - Miguel Sancho
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-05-07 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rspec
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :development
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: thor
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '0.14'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '0.14'
41
+ description: tools to create new collections
42
+ email:
43
+ - sanchojaf@gmail.com
44
+ executables:
45
+ - cenit
46
+ - cenit_cmd
47
+ extensions: []
48
+ extra_rdoc_files: []
49
+ files:
50
+ - LICENSE
51
+ - README.md
52
+ - Rakefile
53
+ - bin/cenit
54
+ - bin/cenit_cmd
55
+ - cenit_cmd.gemspec
56
+ - lib/cenit_cmd.rb
57
+ - lib/cenit_cmd/collection.rb
58
+ - lib/cenit_cmd/templates/collection/CONTRIBUTING.md
59
+ - lib/cenit_cmd/templates/collection/Gemfile
60
+ - lib/cenit_cmd/templates/collection/LICENSE
61
+ - lib/cenit_cmd/templates/collection/README.md
62
+ - lib/cenit_cmd/templates/collection/Rakefile
63
+ - lib/cenit_cmd/templates/collection/collection.gemspec
64
+ - lib/cenit_cmd/templates/collection/gitignore
65
+ - lib/cenit_cmd/templates/collection/lib/%file_name%.rb.tt
66
+ - lib/cenit_cmd/templates/collection/lib/%file_name%/base.rb
67
+ - lib/cenit_cmd/templates/collection/lib/%file_name%/index.json
68
+ - lib/cenit_cmd/templates/collection/lib/%file_name%/libraries/index.json
69
+ - lib/cenit_cmd/templates/collection/lib/%file_name%/version.rb
70
+ - lib/cenit_cmd/templates/collection/rspec
71
+ - lib/cenit_cmd/templates/collection/spec/spec_helper.rb.tt
72
+ - spec/spec_helper.rb
73
+ homepage: https://github.com/openjaf/cenit_cmd
74
+ licenses:
75
+ - MIT
76
+ metadata: {}
77
+ post_install_message:
78
+ rdoc_options: []
79
+ require_paths:
80
+ - lib
81
+ required_ruby_version: !ruby/object:Gem::Requirement
82
+ requirements:
83
+ - - ">="
84
+ - !ruby/object:Gem::Version
85
+ version: '0'
86
+ required_rubygems_version: !ruby/object:Gem::Requirement
87
+ requirements:
88
+ - - ">="
89
+ - !ruby/object:Gem::Version
90
+ version: '0'
91
+ requirements: []
92
+ rubyforge_project: cenit_cmd
93
+ rubygems_version: 2.2.2
94
+ signing_key:
95
+ specification_version: 4
96
+ summary: Cenit Hub command line utility
97
+ test_files: []