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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4d6566a07c7807fb22a8e9404fb880595c380f765c7da639fd702fe60bc58afe
4
- data.tar.gz: 69861affb47ecb5cda3220ddfe3bb76d4ade05a8c689bfbf739e7a69e09d5512
3
+ metadata.gz: bc24b49b7f663d776fb593f9767227d3269719b66ff51401d0940c005794a03c
4
+ data.tar.gz: 207e3e8d662f3bc569d6a36e407231ab9455e4228cc7698f9a4d7dd963e0f640
5
5
  SHA512:
6
- metadata.gz: 97baa0a76b30b5e8af8d73c41a4b84a7dfa8104ef536e89bba76a04392f719f2914935b0878112c0cb6009a5ebf3cefd7061f891aec9d58267e306d64a525697
7
- data.tar.gz: f1b0d482be9d18761a0137558b327afd74641b411d59d0d172a29adef641283e7cca4983764ae22d4befcc6bbb506162a81035f290cf4e49abee10e5c027d86a
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
- Option | Default
39
- --:|:--
40
- gem_name | must be provided
41
- github_owner | `appium`
42
- github_name | `#{gem_name}`
43
- version_file | `lib/#{gem_name}/version.rb`
44
- docs_block | no docs are generated
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
 
@@ -1,4 +1,4 @@
1
- ##### [_build_gem](https://github.com/appium/appium_thor/blob/014fa19e5a2cf8d2d8d85fbd3d139b9c7d67fb50/lib/appium_thor/helpers.rb#L6) common
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/014fa19e5a2cf8d2d8d85fbd3d139b9c7d67fb50/lib/appium_thor/helpers.rb#L12) common
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/014fa19e5a2cf8d2d8d85fbd3d139b9c7d67fb50/lib/appium_thor/helpers.rb#L18) common
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/014fa19e5a2cf8d2d8d85fbd3d139b9c7d67fb50/lib/appium_thor/helpers.rb#L30) common
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/014fa19e5a2cf8d2d8d85fbd3d139b9c7d67fb50/lib/appium_thor/helpers.rb#L35) common
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/014fa19e5a2cf8d2d8d85fbd3d139b9c7d67fb50/lib/appium_thor/helpers.rb#L46) common
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/014fa19e5a2cf8d2d8d85fbd3d139b9c7d67fb50/lib/appium_thor/helpers.rb#L86) common
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/014fa19e5a2cf8d2d8d85fbd3d139b9c7d67fb50/lib/appium_thor/helpers.rb#L150) common
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/014fa19e5a2cf8d2d8d85fbd3d139b9c7d67fb50/lib/appium_thor/helpers.rb#L157) common
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/014fa19e5a2cf8d2d8d85fbd3d139b9c7d67fb50/lib/appium_thor/helpers.rb#L168) common
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/014fa19e5a2cf8d2d8d85fbd3d139b9c7d67fb50/lib/appium_thor/helpers.rb#L200) common
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
 
@@ -6,6 +6,7 @@ class Default < Thor
6
6
  gem_name: #{gem_name}
7
7
  github_name: #{github_name}
8
8
  github_owner: #{github_owner}
9
+ branch: #{branch}
9
10
  version_file: #{version_file}
10
11
  MSG
11
12
  end
@@ -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)
@@ -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? '* master'
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? '* master'
170
- puts 'Master branch required to release.'
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 'git push origin master'
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'"
@@ -1,6 +1,6 @@
1
1
  module Appium
2
2
  module Thor
3
- VERSION = '1.1.6' unless defined? ::Appium::Thor::VERSION
4
- DATE = '2019-11-08' unless defined? ::Appium::Thor::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
@@ -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.1.6
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: 2019-11-08 00:00:00.000000000 Z
11
+ date: 2020-06-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: redcarpet