Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonnam committed May 2, 2019
0 parents commit 0fc7fc3
Show file tree
Hide file tree
Showing 18 changed files with 443 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
*.gem
Gemfile.lock

## Documentation cache and generated files:
/.yardoc/
/_yardoc/
/doc/
/rdoc/
fastlane/README.md
fastlane/report.xml
coverage
test-results
5 changes: 5 additions & 0 deletions .rspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
--require spec_helper
--color
--format d
--format RspecJunitFormatter
--out test-results/rspec/rspec.xml
180 changes: 180 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,180 @@
---
Style/MultipleComparison:
Enabled: false
Style/PercentLiteralDelimiters:
Enabled: false
Style/ClassCheck:
EnforcedStyle: kind_of?
Style/FrozenStringLiteralComment:
Enabled: false
Style/SafeNavigation:
Enabled: false
Performance/RegexpMatch:
Enabled: false
Performance/StringReplacement:
Enabled: false
Style/NumericPredicate:
Enabled: false
Metrics/BlockLength:
Enabled: false
Metrics/ModuleLength:
Enabled: false
Style/VariableNumber:
Enabled: false
Style/MethodMissing:
Enabled: false
MultilineBlockChain:
Enabled: false
Style/NumericLiteralPrefix:
Enabled: false
Style/TernaryParentheses:
Enabled: false
Style/EmptyMethod:
Enabled: false
Style/BracesAroundHashParameters:
Enabled: false
Lint/UselessAssignment:
Exclude:
- "**/spec/**/*"
Require/MissingRequireStatement:
Exclude:
- "**/spec/**/*.rb"
- "**/spec_helper.rb"
- spaceship/lib/spaceship/babosa_fix.rb
- "**/Fastfile"
- "**/*.gemspec"
- rakelib/**/*
- "**/*.rake"
- "**/Rakefile"
- fastlane/**/*
- supply/**/*
Layout/IndentHash:
Enabled: false
Layout/AlignHash:
Enabled: false
Layout/DotPosition:
Enabled: false
Style/DoubleNegation:
Enabled: false
Style/SymbolArray:
Enabled: false
Layout/IndentHeredoc:
Enabled: false
Style/MixinGrouping:
Exclude:
- "**/spec/**/*"
Lint/HandleExceptions:
Enabled: false
Lint/UnusedBlockArgument:
Enabled: false
Lint/AmbiguousBlockAssociation:
Enabled: false
Style/GlobalVars:
Enabled: false
Style/ClassAndModuleChildren:
Enabled: false
Style/SpecialGlobalVars:
Enabled: false
Metrics/AbcSize:
Enabled: false
Metrics/MethodLength:
Enabled: false
Metrics/CyclomaticComplexity:
Enabled: false
Style/WordArray:
MinSize: 19
Style/SignalException:
Enabled: false
Style/RedundantReturn:
Enabled: false
Style/IfUnlessModifier:
Enabled: false
Style/AndOr:
Enabled: true
EnforcedStyle: conditionals
Metrics/ClassLength:
Max: 320
Metrics/LineLength:
Max: 370
Metrics/ParameterLists:
Max: 17
Metrics/PerceivedComplexity:
Max: 18
Style/GuardClause:
Enabled: false
Style/StringLiterals:
Enabled: false
Style/ConditionalAssignment:
Enabled: false
Style/RedundantSelf:
Enabled: false
Lint/UnusedMethodArgument:
Enabled: false
Lint/ParenthesesAsGroupedExpression:
Exclude:
- "**/spec/**/*"
Style/PredicateName:
Enabled: false
Style/PerlBackrefs:
Enabled: false
Layout/SpaceAroundOperators:
Exclude:
- "**/spec/actions_specs/xcodebuild_spec.rb"
AllCops:
TargetRubyVersion: 2.0
Include:
- "*/lib/assets/*Template"
- "*/lib/assets/*TemplateAndroid"
Exclude:
- "**/lib/assets/custom_action_template.rb"
- "./vendor/**/*"
- "**/lib/assets/DefaultFastfileTemplate"
- "**/lib/assets/MatchfileTemplate"
- "**/spec/fixtures/broken_files/broken_file.rb"
Style/FileName:
Exclude:
- "**/Dangerfile"
- "**/Brewfile"
- "**/Gemfile"
- "**/Podfile"
- "**/Rakefile"
- "**/Fastfile"
- "**/Deliverfile"
- "**/Snapfile"
- "**/*.gemspec"
Style/Documentation:
Enabled: false
Style/MutableConstant:
Enabled: false
Style/ZeroLengthPredicate:
Enabled: false
Style/IfInsideElse:
Enabled: false
Style/CollectionMethods:
Enabled: false
CrossPlatform/ForkUsage:
Exclude:
- "**/plugins/template/**/*"
Style/MethodCallWithArgsParentheses:
Enabled: true
IgnoredMethods:
- require
- require_relative
- fastlane_require
- gem
- program
- command
- raise
- attr_accessor
- attr_reader
- desc
- lane
- private_lane
- platform
- to
- describe
- it
- be
- context
- before
- after
7 changes: 7 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
language: ruby
deploy:
provider: rubygems
gem: fastlane-plugin-copy
api_key: $RUBYGEMS_API_KEY
on:
branch: master
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Changelog
All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## 0.1.0 - 2019-05-02
### Added
- copy action
6 changes: 6 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
source("https://rubygems.org")

gemspec

plugins_path = File.join(File.dirname(__FILE__), "fastlane", "Pluginfile")
eval_gemfile(plugins_path) if File.exist?(plugins_path)
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2019 Jason Nam

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
59 changes: 59 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# fastlane-plugin-copy

[![fastlane plugin badge](https://rawcdn.githack.com/fastlane/fastlane/master/fastlane/assets/plugin-badge.svg)](https://rubygems.org/gems/fastlane-plugin-copy)
[![gem version](https://img.shields.io/gem/v/fastlane-plugin-copy.svg)](https://rubygems.org/gems/fastlane-plugin-copy)
[![travis-ci build status](https://travis-ci.com/jasonnam/fastlane-plugin-copy.svg?branch=master)](https://travis-ci.com/jasonnam/fastlane-plugin-copy)

## Getting Started

This project is a [_fastlane_](https://github.com/fastlane/fastlane) plugin. To get started with `fastlane-plugin-copy`, add it to your project by running:

```bash
fastlane add_plugin copy
```

## About fastlane-plugin-copy

Copy file.

## Example

Check out the [example `Fastfile`](fastlane/Fastfile) to see how to use this plugin. Try it by cloning the repo, running `fastlane install_plugins` and `bundle exec fastlane test`.

```ruby
lane :test do
copy(
source: "test.rb",
destination: "lib"
)
end
```

## Run Tests

To run both the tests, and code style validation, run

```
rake
```

To automatically fix many of the styling issues, use
```
rubocop -a
```

## Issues and Feedback

For any other issues and feedback about this plugin, please submit it to this repository.

## Troubleshooting

If you have trouble using plugins, check out the [Plugins Troubleshooting](https://docs.fastlane.tools/plugins/plugins-troubleshooting/) guide.

## Using _fastlane_ Plugins

For more information about how the `fastlane` plugin system works, check out the [Plugins documentation](https://docs.fastlane.tools/plugins/create-plugin/).

## About _fastlane_

_fastlane_ is the easiest way to automate beta deployments and releases for your iOS and Android apps. To learn more, check out [fastlane.tools](https://fastlane.tools).
9 changes: 9 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
require "bundler/gem_tasks"

require "rspec/core/rake_task"
RSpec::Core::RakeTask.new

require "rubocop/rake_task"
RuboCop::RakeTask.new(:rubocop)

task(default: [:spec, :rubocop])
35 changes: 35 additions & 0 deletions fastlane-plugin-copy.gemspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# coding: utf-8

lib = File.expand_path("../lib", __FILE__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require "fastlane/plugin/copy/version"

Gem::Specification.new do |spec|
spec.name = "fastlane-plugin-copy"
spec.version = Fastlane::Copy::VERSION
spec.author = "Jason Nam"
spec.email = "[email protected]"

spec.summary = "Copy file"
spec.homepage = "https://github.com/jasonnam/fastlane-plugin-copy"
spec.license = "MIT"

spec.files = Dir["lib/**/*"] + %w(README.md LICENSE)
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
spec.require_paths = ["lib"]

# Don"t add a dependency to fastlane or fastlane_re
# since this would cause a circular dependency

# spec.add_dependency "your-dependency", "~> 1.0.0"

spec.add_development_dependency("pry")
spec.add_development_dependency("bundler")
spec.add_development_dependency("rspec")
spec.add_development_dependency("rspec_junit_formatter")
spec.add_development_dependency("rake")
spec.add_development_dependency("rubocop", "0.49.1")
spec.add_development_dependency("rubocop-require_tools")
spec.add_development_dependency("simplecov")
spec.add_development_dependency("fastlane", ">= 2.121.1")
end
6 changes: 6 additions & 0 deletions fastlane/Fastfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
lane :test do
copy(
source: "test.rb",
destination: "lib"
)
end
1 change: 1 addition & 0 deletions fastlane/Pluginfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Autogenerated by fastlane
16 changes: 16 additions & 0 deletions lib/fastlane/plugin/copy.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
require "fastlane/plugin/copy/version"

module Fastlane
module Copy
# Return all .rb files inside the "actions" and "helper" directory
def self.all_classes
Dir[File.expand_path("**/{actions,helper}/*.rb", File.dirname(__FILE__))]
end
end
end

# By default we want to import all available actions and helpers
# A plugin can contain any number of actions and plugins
Fastlane::Copy.all_classes.each do |current|
require current
end
Loading

0 comments on commit 0fc7fc3

Please sign in to comment.