sparkplugg 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: a95f171a1e4ee3a8f689ade8aa6e4004d3088875
4
+ data.tar.gz: 0ff4de48b44711800bac56e777194b4da9898f0c
5
+ SHA512:
6
+ metadata.gz: cf08d14c11c14ec9af7b5c6e5ab8557d47d1be7b3961a00acb1fbc4e0ab67a4177fa442321b81dde94454f9a78100b8f2dd7c22e54b1988732929545b53aa69f
7
+ data.tar.gz: 9a03253e24e747342f0b1cdfc22870fe804be28f11d7cc516a03b8e04507dec9e99ed7a748130ac37cf80797852298ea58061106b5f7fdbdd631baad313a5fe4
@@ -0,0 +1,9 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
@@ -0,0 +1,8 @@
1
+ Metrics/LineLength:
2
+ Max: 125
3
+
4
+ Style/Documentation:
5
+ Exclude:
6
+ - 'spec/**/*'
7
+ - 'test/**/*'
8
+ - 'lib/sparkplug/version.rb'
data/Gemfile ADDED
@@ -0,0 +1,3 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2016 Boris Bügling
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,33 @@
1
+ # Sparkplug
2
+
3
+ ![Sparkplug from Transformers](sparkplug.jpg)
4
+
5
+ Quickly try out fastlane plugins.
6
+
7
+ ## Installation
8
+
9
+ Install this using:
10
+
11
+ $ gem install sparkplugg
12
+
13
+ ## Usage
14
+
15
+ Simply run it with a plugin name as argument, in a fresh directory:
16
+
17
+ ```bash
18
+ $ mkdir test
19
+ $ cd test
20
+ $ sparkplug ascii_art
21
+ $ bundle exec fastlane yolo
22
+ ```
23
+
24
+ If you are still developing your plugin, this will ask you for a local path or GitHub URL. A `Fastfile` with all the options will be automatically created, so you are immediately good to go!
25
+
26
+ ## Contributing
27
+
28
+ Bug reports and pull requests are welcome on GitHub at <https://github.com/neonichu/sparkplug>.
29
+
30
+
31
+ ## License
32
+
33
+ The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
@@ -0,0 +1,5 @@
1
+ require 'bundler/gem_tasks'
2
+ task default: :rubocop
3
+
4
+ require 'rubocop/rake_task'
5
+ RuboCop::RakeTask.new(:rubocop)
@@ -0,0 +1,65 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'fastlane_core'
4
+ require 'fastlane'
5
+ require 'fastlane/documentation/actions_list'
6
+ require 'terminal-table'
7
+
8
+ if ARGV.length == 0
9
+ FastlaneCore::UI.error('Usage: sparkplug [plugin-name]')
10
+ exit(1)
11
+ end
12
+
13
+ plugin = ARGV[0]
14
+
15
+ all_platforms = Fastlane::SupportedPlatforms.all
16
+ used_fastlane_version = Fastlane::VERSION
17
+
18
+ fastfile = "fastlane_version \"#{used_fastlane_version}\"\n"
19
+
20
+ FileUtils.mkdir_p('fastlane')
21
+ FileUtils.touch('fastlane/Fastfile')
22
+
23
+ pm = Fastlane::PluginManager.new
24
+ pm.add_dependency(plugin)
25
+
26
+ # we need this for the beta only
27
+ gemfile = File.read('Gemfile')
28
+ gemfile = gemfile.gsub(/gem 'fastlane'/, "gem 'fastlane', '#{used_fastlane_version}'")
29
+ File.open('Gemfile', 'w') { |file| file.puts gemfile }
30
+
31
+ Fastlane::PluginManager.load_plugins
32
+ refs = Fastlane::PluginManager.plugin_references
33
+ plugin_key = refs.keys.select { |key| key.end_with?(plugin) }[0]
34
+ plugin_ref = refs[plugin_key]
35
+ platform = nil
36
+
37
+ plugin_ref[:actions].each do |action_name|
38
+ action = Fastlane::ActionsList.find_action_named(action_name.to_s)
39
+
40
+ if platform.nil?
41
+ platform = all_platforms.select { |p| action.is_supported?(p) }[0]
42
+
43
+ fastfile << ''"
44
+ default_platform :#{platform}
45
+
46
+ platform :#{platform} do
47
+ lane :yolo do
48
+ "''
49
+ end
50
+
51
+ fastfile << " #{action_name}(\n"
52
+
53
+ action.available_options.each do |option|
54
+ default_value = option.default_value.nil? ? 'nil' : option.default_value
55
+ fastfile << " #{option.key}: #{default_value},\n"
56
+ end
57
+
58
+ fastfile << " )\n"
59
+ end
60
+
61
+ fastfile << " end\nend\n"
62
+ File.open('fastlane/Fastfile', 'w') { |file| file.write(fastfile) }
63
+
64
+ FastlaneCore::UI.message('Run `bundle exec fastlane yolo` after the dependencies have been installed to run your action.')
65
+ pm.install_dependencies!
@@ -0,0 +1,3 @@
1
+ module Sparkplug
2
+ VERSION = '0.1.0'
3
+ end
@@ -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 'sparkplug/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = 'sparkplugg'
8
+ spec.version = Sparkplug::VERSION
9
+ spec.authors = ['Boris Bügling']
10
+ spec.email = ['boris@icculus.org']
11
+
12
+ spec.summary = 'Quickly try out fastlane plugins.'
13
+ spec.homepage = 'https://github.com/neonichu/sparkplug'
14
+ spec.license = 'MIT'
15
+
16
+ spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
17
+ spec.bindir = 'exe'
18
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
19
+ spec.require_paths = ['lib']
20
+
21
+ spec.add_dependency 'fastlane', '1.92.0.beta2'
22
+
23
+ spec.add_development_dependency 'bundler', '~> 1.12'
24
+ spec.add_development_dependency 'rake', '~> 10.0'
25
+ spec.add_development_dependency 'rubocop', '~> 0.35.0'
26
+ end
Binary file
metadata ADDED
@@ -0,0 +1,112 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: sparkplugg
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Boris Bügling
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2016-06-01 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: fastlane
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - '='
18
+ - !ruby/object:Gem::Version
19
+ version: 1.92.0.beta2
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - '='
25
+ - !ruby/object:Gem::Version
26
+ version: 1.92.0.beta2
27
+ - !ruby/object:Gem::Dependency
28
+ name: bundler
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ~>
32
+ - !ruby/object:Gem::Version
33
+ version: '1.12'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ~>
39
+ - !ruby/object:Gem::Version
40
+ version: '1.12'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rake
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ~>
46
+ - !ruby/object:Gem::Version
47
+ version: '10.0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ~>
53
+ - !ruby/object:Gem::Version
54
+ version: '10.0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rubocop
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ~>
60
+ - !ruby/object:Gem::Version
61
+ version: 0.35.0
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ~>
67
+ - !ruby/object:Gem::Version
68
+ version: 0.35.0
69
+ description:
70
+ email:
71
+ - boris@icculus.org
72
+ executables:
73
+ - sparkplug
74
+ extensions: []
75
+ extra_rdoc_files: []
76
+ files:
77
+ - .gitignore
78
+ - .rubocop.yml
79
+ - Gemfile
80
+ - LICENSE.txt
81
+ - README.md
82
+ - Rakefile
83
+ - exe/sparkplug
84
+ - lib/sparkplug/version.rb
85
+ - sparkplug.gemspec
86
+ - sparkplug.jpg
87
+ homepage: https://github.com/neonichu/sparkplug
88
+ licenses:
89
+ - MIT
90
+ metadata: {}
91
+ post_install_message:
92
+ rdoc_options: []
93
+ require_paths:
94
+ - lib
95
+ required_ruby_version: !ruby/object:Gem::Requirement
96
+ requirements:
97
+ - - '>='
98
+ - !ruby/object:Gem::Version
99
+ version: '0'
100
+ required_rubygems_version: !ruby/object:Gem::Requirement
101
+ requirements:
102
+ - - '>='
103
+ - !ruby/object:Gem::Version
104
+ version: '0'
105
+ requirements: []
106
+ rubyforge_project:
107
+ rubygems_version: 2.0.14
108
+ signing_key:
109
+ specification_version: 4
110
+ summary: Quickly try out fastlane plugins.
111
+ test_files: []
112
+ has_rdoc: