cyclid-bundler-plugin 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 35d3fa33ec15bb56aa423ebed055dcf58a6b2f15
4
+ data.tar.gz: 78ac9f54514ee5f8cda67e7f2c65fea61d9e9161
5
+ SHA512:
6
+ metadata.gz: a9edf193710b47a3ada9b390305a9e723f6cf77337dcd8ef73a0d3484003b83e93764bea40f840511341a06c47eb1e3551a3fdefd5dad98a50473e9f6eddb470
7
+ data.tar.gz: 1deddf64ef98ec065369c748d48eb031005fd5386ed0969a40196f9ccda3bbfadc750b866a3385e0ae0455710ccf93d8150a65ac6514e8b373404b86b1576130
@@ -0,0 +1,54 @@
1
+ # frozen_string_literal: true
2
+ # Copyright 2016 Liqwyd Ltd.
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License");
5
+ # you may not use this file except in compliance with the License.
6
+ # You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ # See the License for the specific language governing permissions and
14
+ # limitations under the License.
15
+
16
+ # Top level module for the core Cyclid code.
17
+ module Cyclid
18
+ # Module for the Cyclid API
19
+ module API
20
+ # Module for Cyclid Plugins
21
+ module Plugins
22
+ # "Bundler" plugin; wraps the command plugin to run commands under
23
+ # "bundle exec"
24
+ class Bundler < Action
25
+ Cyclid.logger.debug 'in the Bundler plugin'
26
+
27
+ def initialize(args = {})
28
+ args.symbolize_keys!
29
+
30
+ # At a bare minimum there has to be a command to execute.
31
+ raise 'a command action requires a command' unless args.include? :cmd
32
+
33
+ # Prepend 'bundle exec' and pass it through to the 'command' plugin
34
+ args[:cmd] = "bundle exec #{args[:cmd]}"
35
+
36
+ plugin = Cyclid.plugins.find('command', Cyclid::API::Plugins::Action)
37
+ @command = plugin.new(args)
38
+ end
39
+
40
+ # Reflect methods to the command plugin
41
+ def perform(log)
42
+ @command.perform(log)
43
+ end
44
+
45
+ def prepare(args)
46
+ @command.prepare(args)
47
+ end
48
+
49
+ # Register this plugin
50
+ register_plugin 'bundler'
51
+ end
52
+ end
53
+ end
54
+ end
metadata ADDED
@@ -0,0 +1,44 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: cyclid-bundler-plugin
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Kristian Van Der Vliet
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2016-10-25 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: Run commands in Cyclid under "bundle exec"
14
+ email: contact@cyclid.io
15
+ executables: []
16
+ extensions: []
17
+ extra_rdoc_files: []
18
+ files:
19
+ - lib/cyclid/plugins/action/bundler.rb
20
+ homepage: https://cyclid.io
21
+ licenses:
22
+ - Apache-2.0
23
+ metadata: {}
24
+ post_install_message:
25
+ rdoc_options: []
26
+ require_paths:
27
+ - lib
28
+ required_ruby_version: !ruby/object:Gem::Requirement
29
+ requirements:
30
+ - - ">="
31
+ - !ruby/object:Gem::Version
32
+ version: '0'
33
+ required_rubygems_version: !ruby/object:Gem::Requirement
34
+ requirements:
35
+ - - ">="
36
+ - !ruby/object:Gem::Version
37
+ version: '0'
38
+ requirements: []
39
+ rubyforge_project:
40
+ rubygems_version: 2.5.1
41
+ signing_key:
42
+ specification_version: 4
43
+ summary: Cyclid bundler plugin
44
+ test_files: []