appium_thor 1.1.2 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/README.md +12 -8
- data/appium_thor.gemspec +2 -2
- data/docs/helpers_docs.md +36 -13
- data/lib/appium_thor/commands/commands.rb +1 -0
- data/lib/appium_thor/config.rb +4 -1
- data/lib/appium_thor/docs.rb +3 -3
- data/lib/appium_thor/helpers.rb +5 -5
- data/lib/appium_thor/version.rb +2 -2
- data/release_notes.md +32 -0
- metadata +5 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: bc24b49b7f663d776fb593f9767227d3269719b66ff51401d0940c005794a03c
|
4
|
+
data.tar.gz: 207e3e8d662f3bc569d6a36e407231ab9455e4228cc7698f9a4d7dd963e0f640
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 118622a121311f5fe6e16c21ff9918e6eece9d43c2940a106e6d67b34220bdcffdcc2ba755bbe210fd9489564922695d53c63c7b7c37808f062dba4f162e281e
|
7
|
+
data.tar.gz: 880766372aab982e0de70bd875884b6bed2c231ece910d458cf36deca4ec1f8cb8b29d8a71310da942c634619b1003e5226af3817c94906be2e92264a7a278d5
|
data/README.md
CHANGED
@@ -14,6 +14,7 @@ Appium::Thor::Config.set do
|
|
14
14
|
gem_name 'appium_thor'
|
15
15
|
github_owner 'appium'
|
16
16
|
github_name 'appium_thor'
|
17
|
+
branch 'master'
|
17
18
|
version_file 'lib/appium_thor/version.rb'
|
18
19
|
docs_block do
|
19
20
|
run 'docs/helpers_docs.md', globs('/lib/appium_thor/helpers.rb')
|
@@ -35,14 +36,17 @@ end
|
|
35
36
|
|
36
37
|
# Defaults
|
37
38
|
|
38
|
-
|
39
|
-
|
40
|
-
gem_name | must be provided
|
41
|
-
github_owner | `appium
|
42
|
-
github_name | `#{gem_name}
|
43
|
-
|
44
|
-
|
45
|
-
|
39
|
+
|Option | Default|
|
40
|
+
|---:|:---|
|
41
|
+
|gem_name | must be provided|
|
42
|
+
|github_owner | `appium`|
|
43
|
+
|github_name | `#{gem_name}`|
|
44
|
+
|branch | `master`|
|
45
|
+
|version_file | `lib/#{gem_name}/version.rb`|
|
46
|
+
|docs_block | no docs are generated|
|
47
|
+
|
48
|
+
`branch` customises the target branch to push changes.
|
49
|
+
Defaults to `master`
|
46
50
|
|
47
51
|
--
|
48
52
|
|
data/appium_thor.gemspec
CHANGED
@@ -14,7 +14,7 @@ Gem::Specification.new do |s|
|
|
14
14
|
|
15
15
|
s.add_runtime_dependency 'redcarpet', '~> 3.1', '>= 3.1.2'
|
16
16
|
s.add_runtime_dependency 'posix-spawn', '~> 0.3', '>= 0.3.8'
|
17
|
-
s.add_runtime_dependency 'yard', '~> 0.
|
17
|
+
s.add_runtime_dependency 'yard', '~> 0.9.11'
|
18
18
|
|
19
19
|
s.files = `git ls-files`.split "\n"
|
20
|
-
end
|
20
|
+
end
|
data/docs/helpers_docs.md
CHANGED
@@ -1,35 +1,45 @@
|
|
1
|
-
##### [_build_gem](https://github.com/appium/appium_thor/blob/
|
1
|
+
##### [_build_gem](https://github.com/appium/appium_thor/blob/5c7025a14e9a6dba1ff0f69b733983d965e9c2ee/lib/appium_thor/helpers.rb#L6) common
|
2
2
|
|
3
3
|
> def _build_gem
|
4
4
|
|
5
5
|
Sets the permissions on the gem credentials
|
6
6
|
Runs gem build gemspec
|
7
7
|
|
8
|
-
|
8
|
+
--
|
9
|
+
|
10
|
+
##### [tag_exists](https://github.com/appium/appium_thor/blob/5c7025a14e9a6dba1ff0f69b733983d965e9c2ee/lib/appium_thor/helpers.rb#L12) common
|
9
11
|
|
10
12
|
> def tag_exists(tag_name)
|
11
13
|
|
12
14
|
Returns true if the tag exists on the master branch.
|
13
15
|
|
14
|
-
|
16
|
+
--
|
17
|
+
|
18
|
+
##### [sh](https://github.com/appium/appium_thor/blob/5c7025a14e9a6dba1ff0f69b733983d965e9c2ee/lib/appium_thor/helpers.rb#L18) common
|
15
19
|
|
16
20
|
> def sh(command)
|
17
21
|
|
18
22
|
Runs command. Raises an exception if the command doesn't execute successfully.
|
19
23
|
|
20
|
-
|
24
|
+
--
|
25
|
+
|
26
|
+
##### [version_rgx](https://github.com/appium/appium_thor/blob/5c7025a14e9a6dba1ff0f69b733983d965e9c2ee/lib/appium_thor/helpers.rb#L30) common
|
21
27
|
|
22
28
|
> def version_rgx
|
23
29
|
|
24
30
|
Used to parse the version number from version_file
|
25
31
|
|
26
|
-
|
32
|
+
--
|
33
|
+
|
34
|
+
##### [version](https://github.com/appium/appium_thor/blob/5c7025a14e9a6dba1ff0f69b733983d965e9c2ee/lib/appium_thor/helpers.rb#L35) common
|
27
35
|
|
28
36
|
> def version
|
29
37
|
|
30
38
|
Returns the version number from version_file as a string
|
31
39
|
|
32
|
-
|
40
|
+
--
|
41
|
+
|
42
|
+
##### [_bump](https://github.com/appium/appium_thor/blob/5c7025a14e9a6dba1ff0f69b733983d965e9c2ee/lib/appium_thor/helpers.rb#L46) common
|
33
43
|
|
34
44
|
> def _bump(value)
|
35
45
|
|
@@ -39,16 +49,22 @@ The date is not printed if it hasn't changed.
|
|
39
49
|
|
40
50
|
x.y.z
|
41
51
|
|
42
|
-
__Parameters:__
|
52
|
+
__Parameters:__
|
53
|
+
|
54
|
+
[symbol] value - value is either :x, :y, or :z. Default is z.
|
43
55
|
|
44
|
-
|
56
|
+
--
|
57
|
+
|
58
|
+
##### [update_release_notes](https://github.com/appium/appium_thor/blob/5c7025a14e9a6dba1ff0f69b733983d965e9c2ee/lib/appium_thor/helpers.rb#L86) common
|
45
59
|
|
46
60
|
> def update_release_notes
|
47
61
|
|
48
62
|
Creates release_notes.md based on changes between tags.
|
49
63
|
Note that the first tag won't contain notes.
|
50
64
|
|
51
|
-
|
65
|
+
--
|
66
|
+
|
67
|
+
##### [_install](https://github.com/appium/appium_thor/blob/5c7025a14e9a6dba1ff0f69b733983d965e9c2ee/lib/appium_thor/helpers.rb#L150) common
|
52
68
|
|
53
69
|
> def _install
|
54
70
|
|
@@ -58,13 +74,17 @@ Installs the local gem. It's fast due to the flags
|
|
58
74
|
--no-ri = skip ri
|
59
75
|
--local = only install from the local disk
|
60
76
|
|
61
|
-
|
77
|
+
--
|
78
|
+
|
79
|
+
##### [_uninstall](https://github.com/appium/appium_thor/blob/5c7025a14e9a6dba1ff0f69b733983d965e9c2ee/lib/appium_thor/helpers.rb#L157) common
|
62
80
|
|
63
81
|
> def _uninstall
|
64
82
|
|
65
83
|
Uninstalls all versions of the gem
|
66
84
|
|
67
|
-
|
85
|
+
--
|
86
|
+
|
87
|
+
##### [_publish](https://github.com/appium/appium_thor/blob/5c7025a14e9a6dba1ff0f69b733983d965e9c2ee/lib/appium_thor/helpers.rb#L168) common
|
68
88
|
|
69
89
|
> def _publish
|
70
90
|
|
@@ -74,11 +94,14 @@ Updates release notes and documentation
|
|
74
94
|
Builds the gem
|
75
95
|
Publishes the gem to rubygems
|
76
96
|
|
77
|
-
|
97
|
+
--
|
98
|
+
|
99
|
+
##### [remove_non_ascii_from_cwd](https://github.com/appium/appium_thor/blob/5c7025a14e9a6dba1ff0f69b733983d965e9c2ee/lib/appium_thor/helpers.rb#L200) common
|
78
100
|
|
79
101
|
> def remove_non_ascii_from_cwd
|
80
102
|
|
81
103
|
Remove non-ascii bytes from all rb files in the current working directory.
|
82
104
|
Used to purge byte order marks that mess up YARD
|
83
105
|
|
84
|
-
|
106
|
+
--
|
107
|
+
|
data/lib/appium_thor/config.rb
CHANGED
@@ -11,6 +11,8 @@ module Appium
|
|
11
11
|
@version_file ||= "lib/#{@gem_name}/version.rb"
|
12
12
|
end
|
13
13
|
|
14
|
+
@branch ||= 'master'
|
15
|
+
|
14
16
|
@github_owner ||= 'appium'
|
15
17
|
|
16
18
|
# ensure all options are set
|
@@ -33,7 +35,7 @@ module Appium
|
|
33
35
|
|
34
36
|
# the subset of options that operate on strings
|
35
37
|
def self.string_options
|
36
|
-
%w[gem_name github_name github_owner version_file].map(&:to_sym)
|
38
|
+
%w[gem_name github_name github_owner branch version_file].map(&:to_sym)
|
37
39
|
end
|
38
40
|
|
39
41
|
string_options.each do |option|
|
@@ -51,6 +53,7 @@ module Appium
|
|
51
53
|
# gem_name 'appium_thor'
|
52
54
|
# github_owner 'appium'
|
53
55
|
# github_name 'appium_thor'
|
56
|
+
# branch 'master'
|
54
57
|
# version_file 'path/to/version.rb'
|
55
58
|
# end
|
56
59
|
def self.set(&block)
|
data/lib/appium_thor/docs.rb
CHANGED
@@ -35,7 +35,7 @@ module Appium
|
|
35
35
|
indent = space 5
|
36
36
|
params = obj.tags.select { |tag| tag.tag_name == 'param' }
|
37
37
|
unless params.empty?
|
38
|
-
out.concat(
|
38
|
+
out.concat("__Parameters:__\n\n")
|
39
39
|
params.each do |param|
|
40
40
|
out.concat("#{indent}[#{param.types.join(', ') unless param.types.nil?}] ")
|
41
41
|
out.concat("#{param.name} - #{param.text}\n\n")
|
@@ -44,10 +44,10 @@ module Appium
|
|
44
44
|
|
45
45
|
ret = obj.tag 'return'
|
46
46
|
if ret
|
47
|
-
out.concat(
|
47
|
+
out.concat("__Returns:__\n\n")
|
48
48
|
out.concat("#{indent}[#{ret.types.join(', ') unless ret.types.nil?}] #{ret.text}\n\n")
|
49
49
|
end
|
50
|
-
out.concat(
|
50
|
+
out.concat("--\n\n")
|
51
51
|
|
52
52
|
out
|
53
53
|
end
|
data/lib/appium_thor/helpers.rb
CHANGED
@@ -11,7 +11,7 @@ module Appium
|
|
11
11
|
# Returns true if the tag exists on the master branch.
|
12
12
|
def tag_exists(tag_name)
|
13
13
|
cmd = %Q(git branch -a --contains "#{tag_name}")
|
14
|
-
POSIX::Spawn::Child.new(cmd).out.include?
|
14
|
+
POSIX::Spawn::Child.new(cmd).out.include? "* #{branch}"
|
15
15
|
end
|
16
16
|
|
17
17
|
# Runs command. Raises an exception if the command doesn't execute successfully.
|
@@ -166,8 +166,8 @@ module Appium
|
|
166
166
|
# Builds the gem
|
167
167
|
# Publishes the gem to rubygems
|
168
168
|
def _publish
|
169
|
-
unless `git branch`.include?
|
170
|
-
puts '
|
169
|
+
unless `git branch`.include? "* #{branch}"
|
170
|
+
puts "'#{branch}' branch required to release."
|
171
171
|
exit!
|
172
172
|
end
|
173
173
|
|
@@ -189,10 +189,10 @@ module Appium
|
|
189
189
|
notes rescue notes_failed = true
|
190
190
|
docs
|
191
191
|
sh "git commit --allow-empty -am 'Update release notes'" unless notes_failed
|
192
|
-
sh
|
192
|
+
sh "git push origin #{branch}"
|
193
193
|
sh "git push origin #{tag_name}"
|
194
194
|
_build_gem
|
195
|
-
|
195
|
+
puts "Please run 'gem push #{gem_name}-#{version}.gem'"
|
196
196
|
end
|
197
197
|
|
198
198
|
# Remove non-ascii bytes from all rb files in the current working directory.
|
data/lib/appium_thor/version.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
module Appium
|
2
2
|
module Thor
|
3
|
-
VERSION = '1.
|
4
|
-
DATE = '
|
3
|
+
VERSION = '1.2.0' unless defined? ::Appium::Thor::VERSION
|
4
|
+
DATE = '2020-06-14' unless defined? ::Appium::Thor::DATE
|
5
5
|
end
|
6
6
|
end
|
data/release_notes.md
CHANGED
@@ -1,3 +1,35 @@
|
|
1
|
+
#### v1.2.0 2020-06-14
|
2
|
+
|
3
|
+
- [5c7025a](https://github.com/appium/appium_thor/commit/5c7025a14e9a6dba1ff0f69b733983d965e9c2ee) Release 1.2.0
|
4
|
+
- [d334d3a](https://github.com/appium/appium_thor/commit/d334d3af298f2bde9dd828d015ac8fd6a096a8e4) feat: Allow to customise the target branch (#7)
|
5
|
+
|
6
|
+
|
7
|
+
#### v1.1.6 2019-11-08
|
8
|
+
|
9
|
+
- [014fa19](https://github.com/appium/appium_thor/commit/014fa19e5a2cf8d2d8d85fbd3d139b9c7d67fb50) Release 1.1.6
|
10
|
+
- [7cde986](https://github.com/appium/appium_thor/commit/7cde98641bef47ed92ecb5f5be03418283175bc6) do not run push
|
11
|
+
|
12
|
+
|
13
|
+
#### v1.1.5 2019-05-28
|
14
|
+
|
15
|
+
- [ab32d98](https://github.com/appium/appium_thor/commit/ab32d98572d23a69e17355fb831485c3fd51405d) Release 1.1.5
|
16
|
+
- [c50ac40](https://github.com/appium/appium_thor/commit/c50ac40a5b5a8fd1533dc1a177130a72dc4e69ff) Merge pull request #5 from KazuCocoa/bump-yard
|
17
|
+
- [8711b02](https://github.com/appium/appium_thor/commit/8711b02cd57602eea636f4df0c97bd24fdd5e8a8) update yard
|
18
|
+
|
19
|
+
|
20
|
+
#### v1.1.4 2018-11-22
|
21
|
+
|
22
|
+
- [1758415](https://github.com/appium/appium_thor/commit/1758415f0676af855b8a522e647e1d5eebfc71ad) Release 1.1.4
|
23
|
+
- [4adda4f](https://github.com/appium/appium_thor/commit/4adda4f099e75d4c97cdd69a5db69bfb029fd390) add new line
|
24
|
+
|
25
|
+
|
26
|
+
#### v1.1.3 2018-11-22
|
27
|
+
|
28
|
+
- [d264716](https://github.com/appium/appium_thor/commit/d264716b17dd0bca5ca704712084b7a5500d9d4a) Release 1.1.3
|
29
|
+
- [b35fc7b](https://github.com/appium/appium_thor/commit/b35fc7bc84151def687c430f91948a1dc3509dbc) Merge pull request #4 from KazuCocoa/fix-newline
|
30
|
+
- [fc48890](https://github.com/appium/appium_thor/commit/fc4889026ae92b828ce8be98ad67a5a46dca2af3) fix newline
|
31
|
+
|
32
|
+
|
1
33
|
#### v1.1.2 2018-11-12
|
2
34
|
|
3
35
|
- [b04599e](https://github.com/appium/appium_thor/commit/b04599e462699083201e21ae6d7e4a0b4e90a1e9) Release 1.1.2
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: appium_thor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- code@bootstraponline.com
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-06-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: redcarpet
|
@@ -56,20 +56,14 @@ dependencies:
|
|
56
56
|
requirements:
|
57
57
|
- - "~>"
|
58
58
|
- !ruby/object:Gem::Version
|
59
|
-
version:
|
60
|
-
- - ">="
|
61
|
-
- !ruby/object:Gem::Version
|
62
|
-
version: 0.8.7.4
|
59
|
+
version: 0.9.11
|
63
60
|
type: :runtime
|
64
61
|
prerelease: false
|
65
62
|
version_requirements: !ruby/object:Gem::Requirement
|
66
63
|
requirements:
|
67
64
|
- - "~>"
|
68
65
|
- !ruby/object:Gem::Version
|
69
|
-
version:
|
70
|
-
- - ">="
|
71
|
-
- !ruby/object:Gem::Version
|
72
|
-
version: 0.8.7.4
|
66
|
+
version: 0.9.11
|
73
67
|
description: Thor tasks for Appium gems.
|
74
68
|
email:
|
75
69
|
- code@bootstraponline.com
|
@@ -111,8 +105,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
111
105
|
- !ruby/object:Gem::Version
|
112
106
|
version: '0'
|
113
107
|
requirements: []
|
114
|
-
|
115
|
-
rubygems_version: 2.6.14
|
108
|
+
rubygems_version: 3.0.3
|
116
109
|
signing_key:
|
117
110
|
specification_version: 4
|
118
111
|
summary: Thor tasks for Appium gems.
|