testin 0.1.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.
Files changed (36) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +11 -0
  3. data/.idea/.rakeTasks +7 -0
  4. data/.idea/testin.iml +83 -0
  5. data/.rspec +3 -0
  6. data/.travis.yml +7 -0
  7. data/CODE_OF_CONDUCT.md +74 -0
  8. data/Gemfile +6 -0
  9. data/Gemfile.lock +182 -0
  10. data/LICENSE.txt +21 -0
  11. data/README.md +43 -0
  12. data/Rakefile +6 -0
  13. data/bin/console +14 -0
  14. data/bin/setup +8 -0
  15. data/fastlane-plugin-testintask/.circleci/config.yml +43 -0
  16. data/fastlane-plugin-testintask/.gitignore +12 -0
  17. data/fastlane-plugin-testintask/.rspec +5 -0
  18. data/fastlane-plugin-testintask/.rubocop.yml +180 -0
  19. data/fastlane-plugin-testintask/.travis.yml +4 -0
  20. data/fastlane-plugin-testintask/Gemfile +6 -0
  21. data/fastlane-plugin-testintask/LICENSE +21 -0
  22. data/fastlane-plugin-testintask/README.md +52 -0
  23. data/fastlane-plugin-testintask/Rakefile +9 -0
  24. data/fastlane-plugin-testintask/fastlane/Fastfile +3 -0
  25. data/fastlane-plugin-testintask/fastlane/Pluginfile +1 -0
  26. data/fastlane-plugin-testintask/fastlane-plugin-testintask.gemspec +35 -0
  27. data/fastlane-plugin-testintask/lib/fastlane/plugin/testintask/actions/testintask_action.rb +67 -0
  28. data/fastlane-plugin-testintask/lib/fastlane/plugin/testintask/helper/testintask_helper.rb +16 -0
  29. data/fastlane-plugin-testintask/lib/fastlane/plugin/testintask/version.rb +5 -0
  30. data/fastlane-plugin-testintask/lib/fastlane/plugin/testintask.rb +16 -0
  31. data/fastlane-plugin-testintask/spec/spec_helper.rb +15 -0
  32. data/fastlane-plugin-testintask/spec/testintask_action_spec.rb +9 -0
  33. data/lib/testin/version.rb +3 -0
  34. data/lib/testin.rb +436 -0
  35. data/testin.gemspec +31 -0
  36. metadata +120 -0
@@ -0,0 +1,180 @@
1
+ ---
2
+ Style/MultipleComparison:
3
+ Enabled: false
4
+ Style/PercentLiteralDelimiters:
5
+ Enabled: false
6
+ Style/ClassCheck:
7
+ EnforcedStyle: kind_of?
8
+ Style/FrozenStringLiteralComment:
9
+ Enabled: false
10
+ Style/SafeNavigation:
11
+ Enabled: false
12
+ Performance/RegexpMatch:
13
+ Enabled: false
14
+ Performance/StringReplacement:
15
+ Enabled: false
16
+ Style/NumericPredicate:
17
+ Enabled: false
18
+ Metrics/BlockLength:
19
+ Enabled: false
20
+ Metrics/ModuleLength:
21
+ Enabled: false
22
+ Style/VariableNumber:
23
+ Enabled: false
24
+ Style/MethodMissing:
25
+ Enabled: false
26
+ MultilineBlockChain:
27
+ Enabled: false
28
+ Style/NumericLiteralPrefix:
29
+ Enabled: false
30
+ Style/TernaryParentheses:
31
+ Enabled: false
32
+ Style/EmptyMethod:
33
+ Enabled: false
34
+ Style/BracesAroundHashParameters:
35
+ Enabled: false
36
+ Lint/UselessAssignment:
37
+ Exclude:
38
+ - "**/spec/**/*"
39
+ Require/MissingRequireStatement:
40
+ Exclude:
41
+ - "**/spec/**/*.rb"
42
+ - "**/spec_helper.rb"
43
+ - spaceship/lib/spaceship/babosa_fix.rb
44
+ - "**/Fastfile"
45
+ - "**/*.gemspec"
46
+ - rakelib/**/*
47
+ - "**/*.rake"
48
+ - "**/Rakefile"
49
+ - fastlane/**/*
50
+ - supply/**/*
51
+ Layout/IndentHash:
52
+ Enabled: false
53
+ Layout/AlignHash:
54
+ Enabled: false
55
+ Layout/DotPosition:
56
+ Enabled: false
57
+ Style/DoubleNegation:
58
+ Enabled: false
59
+ Style/SymbolArray:
60
+ Enabled: false
61
+ Layout/IndentHeredoc:
62
+ Enabled: false
63
+ Style/MixinGrouping:
64
+ Exclude:
65
+ - "**/spec/**/*"
66
+ Lint/HandleExceptions:
67
+ Enabled: false
68
+ Lint/UnusedBlockArgument:
69
+ Enabled: false
70
+ Lint/AmbiguousBlockAssociation:
71
+ Enabled: false
72
+ Style/GlobalVars:
73
+ Enabled: false
74
+ Style/ClassAndModuleChildren:
75
+ Enabled: false
76
+ Style/SpecialGlobalVars:
77
+ Enabled: false
78
+ Metrics/AbcSize:
79
+ Enabled: false
80
+ Metrics/MethodLength:
81
+ Enabled: false
82
+ Metrics/CyclomaticComplexity:
83
+ Enabled: false
84
+ Style/WordArray:
85
+ MinSize: 19
86
+ Style/SignalException:
87
+ Enabled: false
88
+ Style/RedundantReturn:
89
+ Enabled: false
90
+ Style/IfUnlessModifier:
91
+ Enabled: false
92
+ Style/AndOr:
93
+ Enabled: true
94
+ EnforcedStyle: conditionals
95
+ Metrics/ClassLength:
96
+ Max: 320
97
+ Metrics/LineLength:
98
+ Max: 370
99
+ Metrics/ParameterLists:
100
+ Max: 17
101
+ Metrics/PerceivedComplexity:
102
+ Max: 18
103
+ Style/GuardClause:
104
+ Enabled: false
105
+ Style/StringLiterals:
106
+ Enabled: false
107
+ Style/ConditionalAssignment:
108
+ Enabled: false
109
+ Style/RedundantSelf:
110
+ Enabled: false
111
+ Lint/UnusedMethodArgument:
112
+ Enabled: false
113
+ Lint/ParenthesesAsGroupedExpression:
114
+ Exclude:
115
+ - "**/spec/**/*"
116
+ Style/PredicateName:
117
+ Enabled: false
118
+ Style/PerlBackrefs:
119
+ Enabled: false
120
+ Layout/SpaceAroundOperators:
121
+ Exclude:
122
+ - "**/spec/actions_specs/xcodebuild_spec.rb"
123
+ AllCops:
124
+ TargetRubyVersion: 2.0
125
+ Include:
126
+ - "*/lib/assets/*Template"
127
+ - "*/lib/assets/*TemplateAndroid"
128
+ Exclude:
129
+ - "**/lib/assets/custom_action_template.rb"
130
+ - "./vendor/**/*"
131
+ - "**/lib/assets/DefaultFastfileTemplate"
132
+ - "**/lib/assets/MatchfileTemplate"
133
+ - "**/spec/fixtures/broken_files/broken_file.rb"
134
+ Style/FileName:
135
+ Exclude:
136
+ - "**/Dangerfile"
137
+ - "**/Brewfile"
138
+ - "**/Gemfile"
139
+ - "**/Podfile"
140
+ - "**/Rakefile"
141
+ - "**/Fastfile"
142
+ - "**/Deliverfile"
143
+ - "**/Snapfile"
144
+ - "**/*.gemspec"
145
+ Style/Documentation:
146
+ Enabled: false
147
+ Style/MutableConstant:
148
+ Enabled: false
149
+ Style/ZeroLengthPredicate:
150
+ Enabled: false
151
+ Style/IfInsideElse:
152
+ Enabled: false
153
+ Style/CollectionMethods:
154
+ Enabled: false
155
+ CrossPlatform/ForkUsage:
156
+ Exclude:
157
+ - "**/plugins/template/**/*"
158
+ Style/MethodCallWithArgsParentheses:
159
+ Enabled: true
160
+ IgnoredMethods:
161
+ - require
162
+ - require_relative
163
+ - fastlane_require
164
+ - gem
165
+ - program
166
+ - command
167
+ - raise
168
+ - attr_accessor
169
+ - attr_reader
170
+ - desc
171
+ - lane
172
+ - private_lane
173
+ - platform
174
+ - to
175
+ - describe
176
+ - it
177
+ - be
178
+ - context
179
+ - before
180
+ - after
@@ -0,0 +1,4 @@
1
+ # os: osx # enable this if you need macOS support
2
+ language: ruby
3
+ rvm:
4
+ - 2.2.4
@@ -0,0 +1,6 @@
1
+ source('https://rubygems.org')
2
+
3
+ gemspec
4
+
5
+ plugins_path = File.join(File.dirname(__FILE__), 'fastlane', 'Pluginfile')
6
+ eval_gemfile(plugins_path) if File.exist?(plugins_path)
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2019 rudy.li <rudy.li@connext.com.cn>
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 all
13
+ 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 THE
21
+ SOFTWARE.
@@ -0,0 +1,52 @@
1
+ # testintask plugin
2
+
3
+ [![fastlane Plugin Badge](https://rawcdn.githack.com/fastlane/fastlane/master/fastlane/assets/plugin-badge.svg)](https://rubygems.org/gems/fastlane-plugin-testintask)
4
+
5
+ ## Getting Started
6
+
7
+ This project is a [_fastlane_](https://github.com/fastlane/fastlane) plugin. To get started with `fastlane-plugin-testintask`, add it to your project by running:
8
+
9
+ ```bash
10
+ fastlane add_plugin testintask
11
+ ```
12
+
13
+ ## About testintask
14
+
15
+ testin
16
+
17
+ **Note to author:** Add a more detailed description about this plugin here. If your plugin contains multiple actions, make sure to mention them here.
18
+
19
+ ## Example
20
+
21
+ 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`.
22
+
23
+ **Note to author:** Please set up a sample project to make it easy for users to explore what your plugin does. Provide everything that is necessary to try out the plugin in this project (including a sample Xcode/Android project if necessary)
24
+
25
+ ## Run tests for this plugin
26
+
27
+ To run both the tests, and code style validation, run
28
+
29
+ ```
30
+ rake
31
+ ```
32
+
33
+ To automatically fix many of the styling issues, use
34
+ ```
35
+ rubocop -a
36
+ ```
37
+
38
+ ## Issues and Feedback
39
+
40
+ For any other issues and feedback about this plugin, please submit it to this repository.
41
+
42
+ ## Troubleshooting
43
+
44
+ If you have trouble using plugins, check out the [Plugins Troubleshooting](https://docs.fastlane.tools/plugins/plugins-troubleshooting/) guide.
45
+
46
+ ## Using _fastlane_ Plugins
47
+
48
+ For more information about how the `fastlane` plugin system works, check out the [Plugins documentation](https://docs.fastlane.tools/plugins/create-plugin/).
49
+
50
+ ## About _fastlane_
51
+
52
+ _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).
@@ -0,0 +1,9 @@
1
+ require 'bundler/gem_tasks'
2
+
3
+ require 'rspec/core/rake_task'
4
+ RSpec::Core::RakeTask.new
5
+
6
+ require 'rubocop/rake_task'
7
+ RuboCop::RakeTask.new(:rubocop)
8
+
9
+ task(default: [:spec, :rubocop])
@@ -0,0 +1,3 @@
1
+ lane :test do
2
+ testintask
3
+ end
@@ -0,0 +1 @@
1
+ # Autogenerated by fastlane
@@ -0,0 +1,35 @@
1
+ # coding: utf-8
2
+
3
+ lib = File.expand_path("../lib", __FILE__)
4
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
+ require 'fastlane/plugin/testintask/version'
6
+
7
+ Gem::Specification.new do |spec|
8
+ spec.name = 'fastlane-plugin-testintask'
9
+ spec.version = Fastlane::Testintask::VERSION
10
+ spec.author = 'rudy.li'
11
+ spec.email = 'rudy.li@connext.com.cn'
12
+
13
+ spec.summary = 'testin'
14
+ # spec.homepage = "https://github.com/<GITHUB_USERNAME>/fastlane-plugin-testintask"
15
+ spec.license = "MIT"
16
+
17
+ spec.files = Dir["lib/**/*"] + %w(README.md LICENSE)
18
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
+ spec.require_paths = ['lib']
20
+
21
+ # Don't add a dependency to fastlane or fastlane_re
22
+ # since this would cause a circular dependency
23
+
24
+ spec.add_dependency 'testin'
25
+
26
+ spec.add_development_dependency('pry')
27
+ spec.add_development_dependency('bundler')
28
+ spec.add_development_dependency('rspec')
29
+ spec.add_development_dependency('rspec_junit_formatter')
30
+ spec.add_development_dependency('rake')
31
+ spec.add_development_dependency('rubocop', '0.49.1')
32
+ spec.add_development_dependency('rubocop-require_tools')
33
+ spec.add_development_dependency('simplecov')
34
+ spec.add_development_dependency('fastlane', '>= 2.122.0')
35
+ end
@@ -0,0 +1,67 @@
1
+ require 'fastlane/action'
2
+ require_relative '../helper/testintask_helper'
3
+
4
+ module Fastlane
5
+ module Actions
6
+ class TestintaskAction < Action
7
+ def self.run(params)
8
+ UI.message("The testintask plugin is working!")
9
+ require 'testin'
10
+ global_options = {
11
+ :email => 'sephora06@sephora.cn',
12
+ :pwd => 'e10adc3949ba59abbe56e057f20f883e',
13
+ :path => '/Users/rudy.li/Desktop/Sephora-6.3.0.4151.ipa',
14
+ :devices => [
15
+ {
16
+ "deviceid":'709173f92e1e2f9e450b657fa43c970e28495cf8'
17
+ }
18
+ ],
19
+ :project_name => '丝芙兰',
20
+ :api_key => '0cc70ef717d01b48ebfef5868a60cdd9',
21
+ :app_version => '6.3.0'
22
+ }
23
+ begin
24
+ result = Testin.set_task(global_options).create_task_for_normal
25
+ UI.message("Testin Plugin Successed: #{result}")
26
+ rescue StandardError => e
27
+ UI.user_error!("Testin Plugin Error: #{e.to_s}")
28
+ end
29
+ end
30
+
31
+ def self.description
32
+ "testin"
33
+ end
34
+
35
+ def self.authors
36
+ ["rudy.li"]
37
+ end
38
+
39
+ def self.return_value
40
+ # If your method provides a return value, you can describe here what it does
41
+ end
42
+
43
+ def self.details
44
+ # Optional:
45
+ "testin plugin"
46
+ end
47
+
48
+ def self.available_options
49
+ [
50
+ # FastlaneCore::ConfigItem.new(key: :your_option,
51
+ # env_name: "TESTINTASK_YOUR_OPTION",
52
+ # description: "A description of your option",
53
+ # optional: false,
54
+ # type: String)
55
+ ]
56
+ end
57
+
58
+ def self.is_supported?(platform)
59
+ # Adjust this if your plugin only works for a particular platform (iOS vs. Android, for example)
60
+ # See: https://docs.fastlane.tools/advanced/#control-configuration-by-lane-and-by-platform
61
+ #
62
+ # [:ios, :mac, :android].include?(platform)
63
+ true
64
+ end
65
+ end
66
+ end
67
+ end
@@ -0,0 +1,16 @@
1
+ require 'fastlane_core/ui/ui'
2
+
3
+ module Fastlane
4
+ UI = FastlaneCore::UI unless Fastlane.const_defined?("UI")
5
+
6
+ module Helper
7
+ class TestintaskHelper
8
+ # class methods that you define here become available in your action
9
+ # as `Helper::TestintaskHelper.your_method`
10
+ #
11
+ def self.show_message
12
+ UI.message("Hello from the testintask plugin helper!")
13
+ end
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,5 @@
1
+ module Fastlane
2
+ module Testintask
3
+ VERSION = "0.1.0"
4
+ end
5
+ end
@@ -0,0 +1,16 @@
1
+ require 'fastlane/plugin/testintask/version'
2
+
3
+ module Fastlane
4
+ module Testintask
5
+ # Return all .rb files inside the "actions" and "helper" directory
6
+ def self.all_classes
7
+ Dir[File.expand_path('**/{actions,helper}/*.rb', File.dirname(__FILE__))]
8
+ end
9
+ end
10
+ end
11
+
12
+ # By default we want to import all available actions and helpers
13
+ # A plugin can contain any number of actions and plugins
14
+ Fastlane::Testintask.all_classes.each do |current|
15
+ require current
16
+ end
@@ -0,0 +1,15 @@
1
+ $LOAD_PATH.unshift(File.expand_path('../../lib', __FILE__))
2
+
3
+ require 'simplecov'
4
+
5
+ # SimpleCov.minimum_coverage 95
6
+ SimpleCov.start
7
+
8
+ # This module is only used to check the environment is currently a testing env
9
+ module SpecHelper
10
+ end
11
+
12
+ require 'fastlane' # to import the Action super class
13
+ require 'fastlane/plugin/testintask' # import the actual plugin
14
+
15
+ Fastlane.load_actions # load other actions (in case your plugin calls other actions or shared values)
@@ -0,0 +1,9 @@
1
+ describe Fastlane::Actions::TestintaskAction do
2
+ describe '#run' do
3
+ it 'prints a message' do
4
+ expect(Fastlane::UI).to receive(:message).with("The testintask plugin is working!")
5
+
6
+ Fastlane::Actions::TestintaskAction.run(nil)
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,3 @@
1
+ module Testin
2
+ VERSION = "0.1.0"
3
+ end