capsulecd 1.0.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 +7 -0
- data/.coveralls.yml +2 -0
- data/.dockerignore +5 -0
- data/.gitignore +95 -0
- data/.rspec +3 -0
- data/.simplecov +9 -0
- data/Dockerfile +16 -0
- data/Dockerfile.chef +26 -0
- data/Dockerfile.javascript +7 -0
- data/Dockerfile.node +7 -0
- data/Dockerfile.python +7 -0
- data/Dockerfile.ruby +4 -0
- data/FEATURES.md +12 -0
- data/Gemfile +26 -0
- data/LICENSE.md +22 -0
- data/README.md +227 -0
- data/Rakefile +43 -0
- data/bin/capsulecd +4 -0
- data/capsulecd.gemspec +27 -0
- data/circle.yml +24 -0
- data/lib/capsulecd/base/common/git_utils.rb +90 -0
- data/lib/capsulecd/base/common/validation_utils.rb +22 -0
- data/lib/capsulecd/base/configuration.rb +151 -0
- data/lib/capsulecd/base/engine.rb +163 -0
- data/lib/capsulecd/base/runner/circleci.rb +37 -0
- data/lib/capsulecd/base/runner/default.rb +38 -0
- data/lib/capsulecd/base/source/github.rb +183 -0
- data/lib/capsulecd/base/transform_engine.rb +62 -0
- data/lib/capsulecd/chef/chef_engine.rb +172 -0
- data/lib/capsulecd/chef/chef_helper.rb +29 -0
- data/lib/capsulecd/cli.rb +64 -0
- data/lib/capsulecd/error.rb +51 -0
- data/lib/capsulecd/javascript/javascript_engine.rb +213 -0
- data/lib/capsulecd/node/node_engine.rb +141 -0
- data/lib/capsulecd/python/python_engine.rb +157 -0
- data/lib/capsulecd/ruby/ruby_engine.rb +191 -0
- data/lib/capsulecd/ruby/ruby_helper.rb +60 -0
- data/lib/capsulecd/version.rb +3 -0
- data/lib/capsulecd.rb +16 -0
- data/logo.svg +1 -0
- data/spec/fixtures/chef/cookbook_analogj_test/CHANGELOG.md +3 -0
- data/spec/fixtures/chef/cookbook_analogj_test/Gemfile +18 -0
- data/spec/fixtures/chef/cookbook_analogj_test/LICENSE +21 -0
- data/spec/fixtures/chef/cookbook_analogj_test/README.md +13 -0
- data/spec/fixtures/chef/cookbook_analogj_test/Rakefile +1 -0
- data/spec/fixtures/chef/cookbook_analogj_test/Thorfile +12 -0
- data/spec/fixtures/chef/cookbook_analogj_test/chefignore +94 -0
- data/spec/fixtures/chef/cookbook_analogj_test/metadata.rb +5 -0
- data/spec/fixtures/chef/cookbook_analogj_test/recipes/default.rb +6 -0
- data/spec/fixtures/incorrect_configuration.yml +4 -0
- data/spec/fixtures/javascript/javascript_analogj_test/LICENSE +21 -0
- data/spec/fixtures/javascript/javascript_analogj_test/README.md +2 -0
- data/spec/fixtures/javascript/javascript_analogj_test/package.json +19 -0
- data/spec/fixtures/node/npm_analogj_test/LICENSE +21 -0
- data/spec/fixtures/node/npm_analogj_test/README.md +2 -0
- data/spec/fixtures/node/npm_analogj_test/package.json +19 -0
- data/spec/fixtures/python/pip_analogj_test/LICENSE +21 -0
- data/spec/fixtures/python/pip_analogj_test/MANIFEST.in +1 -0
- data/spec/fixtures/python/pip_analogj_test/README.md +1 -0
- data/spec/fixtures/python/pip_analogj_test/VERSION +1 -0
- data/spec/fixtures/python/pip_analogj_test/setup.cfg +5 -0
- data/spec/fixtures/python/pip_analogj_test/setup.py +80 -0
- data/spec/fixtures/python/pip_analogj_test/tox.ini +14 -0
- data/spec/fixtures/ruby/gem_analogj_test/Gemfile +4 -0
- data/spec/fixtures/ruby/gem_analogj_test/LICENSE.txt +21 -0
- data/spec/fixtures/ruby/gem_analogj_test/README.md +41 -0
- data/spec/fixtures/ruby/gem_analogj_test/Rakefile +6 -0
- data/spec/fixtures/ruby/gem_analogj_test/bin/console +14 -0
- data/spec/fixtures/ruby/gem_analogj_test/bin/setup +8 -0
- data/spec/fixtures/ruby/gem_analogj_test/gem_analogj_test.gemspec +25 -0
- data/spec/fixtures/ruby/gem_analogj_test/lib/gem_analogj_test/version.rb +3 -0
- data/spec/fixtures/ruby/gem_analogj_test/lib/gem_analogj_test.rb +5 -0
- data/spec/fixtures/ruby/gem_analogj_test/spec/gem_analogj_test_spec.rb +7 -0
- data/spec/fixtures/ruby/gem_analogj_test/spec/spec_helper.rb +2 -0
- data/spec/fixtures/ruby/gem_analogj_test-0.1.4.gem +0 -0
- data/spec/fixtures/sample_chef_configuration.yml +8 -0
- data/spec/fixtures/sample_configuration.yml +7 -0
- data/spec/fixtures/sample_global_configuration.yml +23 -0
- data/spec/fixtures/sample_node_configuration.yml +7 -0
- data/spec/fixtures/sample_python_configuration.yml +8 -0
- data/spec/fixtures/sample_repo_configuration.yml +22 -0
- data/spec/fixtures/sample_ruby_configuration.yml +5 -0
- data/spec/fixtures/vcr_cassettes/chef_build_step.yml +636 -0
- data/spec/fixtures/vcr_cassettes/gem_build_step.yml +653 -0
- data/spec/fixtures/vcr_cassettes/gem_build_step_without_version_rb.yml +653 -0
- data/spec/fixtures/vcr_cassettes/integration_chef.yml +1399 -0
- data/spec/fixtures/vcr_cassettes/integration_node.yml +1388 -0
- data/spec/fixtures/vcr_cassettes/integration_python.yml +1388 -0
- data/spec/fixtures/vcr_cassettes/integration_ruby.yml +1377 -0
- data/spec/fixtures/vcr_cassettes/node_build_step.yml +647 -0
- data/spec/fixtures/vcr_cassettes/pip_build_step.yml +653 -0
- data/spec/lib/capsulecd/base/configuration_spec.rb +75 -0
- data/spec/lib/capsulecd/base/engine_spec.rb +51 -0
- data/spec/lib/capsulecd/base/source/github_spec.rb +253 -0
- data/spec/lib/capsulecd/base/transform_engine_spec.rb +55 -0
- data/spec/lib/capsulecd/chef/chef_engine_spec.rb +114 -0
- data/spec/lib/capsulecd/cli_spec.rb +57 -0
- data/spec/lib/capsulecd/node/node_engine_spec.rb +113 -0
- data/spec/lib/capsulecd/python/python_engine_spec.rb +118 -0
- data/spec/lib/capsulecd/ruby/ruby_engine_spec.rb +128 -0
- data/spec/spec_helper.rb +105 -0
- data/spec/support/file_system.rb +21 -0
- data/spec/support/package_types.rb +11 -0
- metadata +281 -0
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"""A setuptools based setup module.
|
|
2
|
+
|
|
3
|
+
See:
|
|
4
|
+
https://packaging.python.org/en/latest/distributing.html
|
|
5
|
+
https://github.com/pypa/sampleproject
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
# Always prefer setuptools over distutils
|
|
9
|
+
from setuptools import setup, find_packages
|
|
10
|
+
# To use a consistent encoding
|
|
11
|
+
from codecs import open
|
|
12
|
+
from os import path, listdir
|
|
13
|
+
|
|
14
|
+
version = 'unknown'
|
|
15
|
+
with open(path.join(path.dirname(path.abspath(__file__)), 'VERSION')) as version_file:
|
|
16
|
+
version = version_file.read().strip()
|
|
17
|
+
|
|
18
|
+
here = path.abspath(path.dirname(__file__))
|
|
19
|
+
|
|
20
|
+
# Get the long description from the README file
|
|
21
|
+
with open(path.join(here, 'README.md'), encoding='utf-8') as f:
|
|
22
|
+
long_description = f.read()
|
|
23
|
+
|
|
24
|
+
setup(
|
|
25
|
+
name='pip_analogj_test',
|
|
26
|
+
|
|
27
|
+
# Versions should comply with PEP440. For a discussion on single-sourcing
|
|
28
|
+
# the version across setup.py and the project code, see
|
|
29
|
+
# https://packaging.python.org/en/latest/single_source_version.html
|
|
30
|
+
version=version,
|
|
31
|
+
|
|
32
|
+
description='test package',
|
|
33
|
+
long_description=long_description,
|
|
34
|
+
|
|
35
|
+
# The project's main homepage.
|
|
36
|
+
url='https://github.com/AnalogJ/pip_analogj_test',
|
|
37
|
+
|
|
38
|
+
# Author details
|
|
39
|
+
author='Jason Kulatunga',
|
|
40
|
+
author_email='jason@thesparktree.com',
|
|
41
|
+
|
|
42
|
+
# Choose your license
|
|
43
|
+
license='MIT',
|
|
44
|
+
|
|
45
|
+
# See https://pypi.python.org/pypi?%3Aaction=list_classifiers
|
|
46
|
+
classifiers=[
|
|
47
|
+
# How mature is this project? Common values are
|
|
48
|
+
# 3 - Alpha
|
|
49
|
+
# 4 - Beta
|
|
50
|
+
# 5 - Production/Stable
|
|
51
|
+
'Development Status :: 5 - Production/Stable'
|
|
52
|
+
],
|
|
53
|
+
|
|
54
|
+
# What does your project relate to?
|
|
55
|
+
keywords='pip_analogj_test',
|
|
56
|
+
|
|
57
|
+
# You can just specify the packages manually here if your project is
|
|
58
|
+
# simple. Or you can use find_packages().
|
|
59
|
+
packages=find_packages(exclude=['contrib', 'docs', 'tests']),
|
|
60
|
+
|
|
61
|
+
# Alternatively, if you want to distribute just a my_module.py, uncomment
|
|
62
|
+
# this:
|
|
63
|
+
# py_modules=["my_module"],
|
|
64
|
+
|
|
65
|
+
# List run-time dependencies here. These will be installed by pip when
|
|
66
|
+
# your project is installed. For an analysis of "install_requires" vs pip's
|
|
67
|
+
# requirements files see:
|
|
68
|
+
# https://packaging.python.org/en/latest/requirements.html
|
|
69
|
+
install_requires=['pip_analogj_test']
|
|
70
|
+
|
|
71
|
+
# Although 'package_data' is the preferred approach, in some case you may
|
|
72
|
+
# need to place data files outside of your packages. See:
|
|
73
|
+
# http://docs.python.org/3.4/distutils/setupscript.html#installing-additional-files # noqa
|
|
74
|
+
# In this case, 'data_file' will be installed into '<sys.prefix>/my_data'
|
|
75
|
+
#data_files=[('my_data', ['data/data_file'])],
|
|
76
|
+
|
|
77
|
+
# To provide executable scripts, use entry points in preference to the
|
|
78
|
+
# "scripts" keyword. Entry points provide cross-platform support and allow
|
|
79
|
+
# pip to create the appropriate form of executable for the target platform.
|
|
80
|
+
)
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Tox (http://tox.testrun.org/) is a tool for running tests
|
|
2
|
+
# in multiple virtualenvs. This configuration file will run the
|
|
3
|
+
# test suite on all supported python versions. To use it, "pip install tox"
|
|
4
|
+
# and then run "tox" from this directory.
|
|
5
|
+
|
|
6
|
+
[tox]
|
|
7
|
+
envlist = py27
|
|
8
|
+
usedevelop = True
|
|
9
|
+
|
|
10
|
+
[testenv]
|
|
11
|
+
# commands = py.test tests # we're not using py.test here because when running py.test with no test cases causes an error exit code.
|
|
12
|
+
commands = echo "success"
|
|
13
|
+
deps =
|
|
14
|
+
pytest
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2016 Jason Kulatunga
|
|
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.
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# GemTest
|
|
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/gem_test`. 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 'gem_test'
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
And then execute:
|
|
16
|
+
|
|
17
|
+
$ bundle
|
|
18
|
+
|
|
19
|
+
Or install it yourself as:
|
|
20
|
+
|
|
21
|
+
$ gem install gem_test
|
|
22
|
+
|
|
23
|
+
## Usage
|
|
24
|
+
|
|
25
|
+
TODO: Write usage instructions here
|
|
26
|
+
|
|
27
|
+
## Development
|
|
28
|
+
|
|
29
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
|
30
|
+
|
|
31
|
+
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`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
|
32
|
+
|
|
33
|
+
## Contributing
|
|
34
|
+
|
|
35
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/gem_test.
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
## License
|
|
39
|
+
|
|
40
|
+
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
|
41
|
+
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
#!/usr/bin/env ruby
|
|
2
|
+
|
|
3
|
+
require "bundler/setup"
|
|
4
|
+
require "gem_analogj_test"
|
|
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,25 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
|
+
require 'gem_analogj_test/version'
|
|
5
|
+
|
|
6
|
+
Gem::Specification.new do |spec|
|
|
7
|
+
spec.name = "gem_analogj_test"
|
|
8
|
+
spec.version = GemTest::VERSION
|
|
9
|
+
spec.authors = ["Jason Kulatunga"]
|
|
10
|
+
spec.email = ["jk17@ualberta.ca"]
|
|
11
|
+
|
|
12
|
+
spec.summary = 'this is my test summary'
|
|
13
|
+
spec.description = 'this is my test description'
|
|
14
|
+
spec.homepage = "http://www.github.com/Analogj/gem_analogj_test"
|
|
15
|
+
spec.license = "MIT"
|
|
16
|
+
|
|
17
|
+
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
|
18
|
+
spec.bindir = "exe"
|
|
19
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
|
20
|
+
spec.require_paths = ["lib"]
|
|
21
|
+
|
|
22
|
+
spec.add_development_dependency "bundler", "~> 1.11"
|
|
23
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
|
24
|
+
spec.add_development_dependency "rspec", "~> 3.0"
|
|
25
|
+
end
|
|
Binary file
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
source_github_access_token: sample_test_token
|
|
3
|
+
chef_supermarket_username: sample_supermarket_username
|
|
4
|
+
chef_supermarket_key: LS0tLS1CRUdJTiBSU0EgUFJJVkFURSBLRVktLS0tLQpzYW1wbGVfc3VwZXJtYXJrZXRfa2V5Ci0tLS0tRU5EIFJTQSBQUklWQVRFIEtFWS0tLS0tCg==
|
|
5
|
+
runner_pull_request: 11
|
|
6
|
+
runner_clone_url: http://github.com/AnalogJ/cookbook_analogj_test.git
|
|
7
|
+
runner_repo_name: cookbook_analogj_test
|
|
8
|
+
runner_repo_full_name: AnalogJ/cookbook_analogj_test
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
npm_auth_token: sample_auth_token
|
|
3
|
+
source_github_access_token: sample_test_token
|
|
4
|
+
pypi_username: sample_pypi_username
|
|
5
|
+
pypi_password: sample_pypi_password
|
|
6
|
+
chef_supermarket_username: sample_supermarket_username
|
|
7
|
+
chef_supermarket_key: LS0tLS1CRUdJTiBSU0EgUFJJVkFURSBLRVktLS0tLQpzYW1wbGVfc3VwZXJtYXJrZXRfa2V5Ci0tLS0tRU5EIFJTQSBQUklWQVRFIEtFWS0tLS0tCg==
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
source_configure:
|
|
3
|
+
pre: |
|
|
4
|
+
# this is my multiline ruby script
|
|
5
|
+
# the pre hook script runs before the actual step (source_configure) executes
|
|
6
|
+
# we have access to any of the specified instance variables here.
|
|
7
|
+
# check the documentation for more information.
|
|
8
|
+
"override pre_source_configure"
|
|
9
|
+
override: |
|
|
10
|
+
# override scripts can be used to completely replace the built-in step script.
|
|
11
|
+
# to ensure that you are compatible with the capsulecd runner, please ensure that you
|
|
12
|
+
# populate all the correct instance variables.
|
|
13
|
+
# see the documentation for more information
|
|
14
|
+
"override source_configure"
|
|
15
|
+
post: |
|
|
16
|
+
# post scripts run after the step (source_configure) executes
|
|
17
|
+
# you can override any instance variables here, do additional cleanup or anything else you want.
|
|
18
|
+
"override post_source_configure"
|
|
19
|
+
build_step:
|
|
20
|
+
post: |
|
|
21
|
+
# post build step runs after the build_step runs
|
|
22
|
+
# within the script you have access to all instance variables and other methods defined in the engine.
|
|
23
|
+
"override post_build_step" + @source_git_local_path
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
source_github_access_token: sample_test_token
|
|
3
|
+
pypi_username: sample_pypi_username
|
|
4
|
+
pypi_password: sample_pypi_password
|
|
5
|
+
runner_pull_request: 7
|
|
6
|
+
runner_clone_url: https://github.com/AnalogJ/pip_analogj_test.git
|
|
7
|
+
runner_repo_name: pip_analogj_test
|
|
8
|
+
runner_repo_full_name: AnalogJ/pip_analogj_test
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
---
|
|
2
|
+
source_configure:
|
|
3
|
+
pre: >
|
|
4
|
+
# this is my multiline ruby script
|
|
5
|
+
# the pre hook script runs before the actual step (source_configure) executes
|
|
6
|
+
# we have access to any of the specified instance variables here.
|
|
7
|
+
# check the documentation for more information.
|
|
8
|
+
"override pre_source_configure"
|
|
9
|
+
override: >
|
|
10
|
+
# override scripts can be used to completely replace the built-in step script.
|
|
11
|
+
# to ensure that you are compatible with the capsulecd runner, please ensure that you
|
|
12
|
+
# populate all the correct instance variables.
|
|
13
|
+
# see the documentation for more information
|
|
14
|
+
"override source_configure"
|
|
15
|
+
post: >
|
|
16
|
+
# post scripts run after the step (source_configure) executes
|
|
17
|
+
# you can override any instance variables here, do additional cleanup or anything else you want.
|
|
18
|
+
"override post_source_configure"
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|