appium_thor 1.1.6 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +12 -8
- data/docs/helpers_docs.md +11 -11
- data/lib/appium_thor/commands/commands.rb +1 -0
- data/lib/appium_thor/config.rb +4 -1
- data/lib/appium_thor/helpers.rb +4 -4
- data/lib/appium_thor/version.rb +2 -2
- data/release_notes.md +6 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
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/docs/helpers_docs.md
CHANGED
@@ -1,4 +1,4 @@
|
|
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
|
|
@@ -7,7 +7,7 @@ Runs gem build gemspec
|
|
7
7
|
|
8
8
|
--
|
9
9
|
|
10
|
-
##### [tag_exists](https://github.com/appium/appium_thor/blob/
|
10
|
+
##### [tag_exists](https://github.com/appium/appium_thor/blob/5c7025a14e9a6dba1ff0f69b733983d965e9c2ee/lib/appium_thor/helpers.rb#L12) common
|
11
11
|
|
12
12
|
> def tag_exists(tag_name)
|
13
13
|
|
@@ -15,7 +15,7 @@ Returns true if the tag exists on the master branch.
|
|
15
15
|
|
16
16
|
--
|
17
17
|
|
18
|
-
##### [sh](https://github.com/appium/appium_thor/blob/
|
18
|
+
##### [sh](https://github.com/appium/appium_thor/blob/5c7025a14e9a6dba1ff0f69b733983d965e9c2ee/lib/appium_thor/helpers.rb#L18) common
|
19
19
|
|
20
20
|
> def sh(command)
|
21
21
|
|
@@ -23,7 +23,7 @@ Runs command. Raises an exception if the command doesn't execute successfully.
|
|
23
23
|
|
24
24
|
--
|
25
25
|
|
26
|
-
##### [version_rgx](https://github.com/appium/appium_thor/blob/
|
26
|
+
##### [version_rgx](https://github.com/appium/appium_thor/blob/5c7025a14e9a6dba1ff0f69b733983d965e9c2ee/lib/appium_thor/helpers.rb#L30) common
|
27
27
|
|
28
28
|
> def version_rgx
|
29
29
|
|
@@ -31,7 +31,7 @@ Used to parse the version number from version_file
|
|
31
31
|
|
32
32
|
--
|
33
33
|
|
34
|
-
##### [version](https://github.com/appium/appium_thor/blob/
|
34
|
+
##### [version](https://github.com/appium/appium_thor/blob/5c7025a14e9a6dba1ff0f69b733983d965e9c2ee/lib/appium_thor/helpers.rb#L35) common
|
35
35
|
|
36
36
|
> def version
|
37
37
|
|
@@ -39,7 +39,7 @@ Returns the version number from version_file as a string
|
|
39
39
|
|
40
40
|
--
|
41
41
|
|
42
|
-
##### [_bump](https://github.com/appium/appium_thor/blob/
|
42
|
+
##### [_bump](https://github.com/appium/appium_thor/blob/5c7025a14e9a6dba1ff0f69b733983d965e9c2ee/lib/appium_thor/helpers.rb#L46) common
|
43
43
|
|
44
44
|
> def _bump(value)
|
45
45
|
|
@@ -55,7 +55,7 @@ __Parameters:__
|
|
55
55
|
|
56
56
|
--
|
57
57
|
|
58
|
-
##### [update_release_notes](https://github.com/appium/appium_thor/blob/
|
58
|
+
##### [update_release_notes](https://github.com/appium/appium_thor/blob/5c7025a14e9a6dba1ff0f69b733983d965e9c2ee/lib/appium_thor/helpers.rb#L86) common
|
59
59
|
|
60
60
|
> def update_release_notes
|
61
61
|
|
@@ -64,7 +64,7 @@ Note that the first tag won't contain notes.
|
|
64
64
|
|
65
65
|
--
|
66
66
|
|
67
|
-
##### [_install](https://github.com/appium/appium_thor/blob/
|
67
|
+
##### [_install](https://github.com/appium/appium_thor/blob/5c7025a14e9a6dba1ff0f69b733983d965e9c2ee/lib/appium_thor/helpers.rb#L150) common
|
68
68
|
|
69
69
|
> def _install
|
70
70
|
|
@@ -76,7 +76,7 @@ Installs the local gem. It's fast due to the flags
|
|
76
76
|
|
77
77
|
--
|
78
78
|
|
79
|
-
##### [_uninstall](https://github.com/appium/appium_thor/blob/
|
79
|
+
##### [_uninstall](https://github.com/appium/appium_thor/blob/5c7025a14e9a6dba1ff0f69b733983d965e9c2ee/lib/appium_thor/helpers.rb#L157) common
|
80
80
|
|
81
81
|
> def _uninstall
|
82
82
|
|
@@ -84,7 +84,7 @@ Uninstalls all versions of the gem
|
|
84
84
|
|
85
85
|
--
|
86
86
|
|
87
|
-
##### [_publish](https://github.com/appium/appium_thor/blob/
|
87
|
+
##### [_publish](https://github.com/appium/appium_thor/blob/5c7025a14e9a6dba1ff0f69b733983d965e9c2ee/lib/appium_thor/helpers.rb#L168) common
|
88
88
|
|
89
89
|
> def _publish
|
90
90
|
|
@@ -96,7 +96,7 @@ Publishes the gem to rubygems
|
|
96
96
|
|
97
97
|
--
|
98
98
|
|
99
|
-
##### [remove_non_ascii_from_cwd](https://github.com/appium/appium_thor/blob/
|
99
|
+
##### [remove_non_ascii_from_cwd](https://github.com/appium/appium_thor/blob/5c7025a14e9a6dba1ff0f69b733983d965e9c2ee/lib/appium_thor/helpers.rb#L200) common
|
100
100
|
|
101
101
|
> def remove_non_ascii_from_cwd
|
102
102
|
|
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/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,7 +189,7 @@ 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'"
|
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,9 @@
|
|
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
|
+
|
1
7
|
#### v1.1.6 2019-11-08
|
2
8
|
|
3
9
|
- [014fa19](https://github.com/appium/appium_thor/commit/014fa19e5a2cf8d2d8d85fbd3d139b9c7d67fb50) Release 1.1.6
|
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
|