appium_thor 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +41 -19
- data/Thorfile +3 -0
- data/docs/helpers_docs.md +107 -0
- data/lib/appium_thor.rb +1 -0
- data/lib/appium_thor/commands/commands.rb +2 -2
- data/lib/appium_thor/docs.rb +2 -1
- data/lib/appium_thor/version.rb +1 -1
- data/release_notes.md +8 -0
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 19859e26beeb391e168bcf06a81bd175d96d075c
|
4
|
+
data.tar.gz: 73097fc74b2952caf94895b08d102ab61929df64
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fbe246799d8a02f5fbaa8723922375ef7450d934463718808c11dd1733b57fca391c532f293575b562a620ba7db8c4e9d504a55b7079ce56b66b741ae4c2c2ea
|
7
|
+
data.tar.gz: dc8181f546c0083bce4321d15303c381221efc2c6a72252b15f59748fe2dfd08230b4fee685e31d9c1c9b06464a878a1d6f654a839135ab83c31d7024a6445ec
|
data/README.md
CHANGED
@@ -1,34 +1,56 @@
|
|
1
1
|
# appium_thor [![Gem Version](https://badge.fury.io/rb/appium_thor.svg)](http://badge.fury.io/rb/appium_thor)[![Dependency Status](https://gemnasium.com/appium/appium_thor.svg)](https://gemnasium.com/appium/appium_thor)
|
2
2
|
|
3
3
|
|
4
|
-
Appium Thor helpers for appium's gems (appium_lib, appium_capybara)
|
4
|
+
Appium Thor helpers for appium's gems (appium_lib, appium_capybara).
|
5
5
|
|
6
6
|
--
|
7
7
|
|
8
|
-
Example configuration
|
8
|
+
# Example configuration
|
9
9
|
|
10
10
|
```ruby
|
11
11
|
Appium::Thor::Config.set do
|
12
|
-
gem_name
|
13
|
-
github_name
|
14
|
-
version_file '
|
12
|
+
gem_name 'appium_thor'
|
13
|
+
github_name 'appium_thor'
|
14
|
+
version_file 'lib/appium_thor/version.rb'
|
15
|
+
docs_block do
|
16
|
+
run 'docs/helpers_docs.md', globs('/lib/appium_thor/helpers.rb')
|
17
|
+
end
|
15
18
|
end
|
16
19
|
```
|
17
20
|
|
18
|
-
|
21
|
+
--
|
22
|
+
|
23
|
+
# Available tasks
|
24
|
+
|
25
|
+
Note to see gem warnings, run `gem build appium_thor.gemspec` and replace `appium_thor.gemspec` with the gemspec of your gem.
|
19
26
|
|
20
27
|
```
|
21
|
-
thor build
|
22
|
-
thor bump
|
23
|
-
thor bumpx
|
24
|
-
thor bumpy
|
25
|
-
thor byte
|
26
|
-
thor
|
27
|
-
thor
|
28
|
-
thor
|
29
|
-
thor
|
30
|
-
thor notes
|
31
|
-
thor publish
|
32
|
-
thor release
|
33
|
-
thor uninstall # Uninstall gem
|
28
|
+
thor build # Build a new gem
|
29
|
+
thor bump # Bump the z version number and update the date.
|
30
|
+
thor bumpx # Bump the x version number, set y & z to zero, update the date.
|
31
|
+
thor bumpy # Bump the y version number, set z to zero, update the date.
|
32
|
+
thor byte # Remove non-ascii bytes from all *.rb files in the current dir
|
33
|
+
thor docs # Update android and iOS docs
|
34
|
+
thor gem_install # Install gem
|
35
|
+
thor gem_uninstall # Uninstall gem
|
36
|
+
thor info # prints config info for this gem
|
37
|
+
thor notes # Update release notes
|
38
|
+
thor publish # Build and release a new gem to rubygems.org
|
39
|
+
thor release # Build and release a new gem to rubygems.org (same as publish)
|
34
40
|
```
|
41
|
+
|
42
|
+
--
|
43
|
+
|
44
|
+
# docs_block
|
45
|
+
|
46
|
+
The `docs_block` method runs within the `docs.rb` context. Here's a more complex example:
|
47
|
+
|
48
|
+
```ruby
|
49
|
+
common_globs = '/lib/appium_lib/*.rb', '/lib/appium_lib/device/*.rb', '/lib/appium_lib/common/**/*.rb'
|
50
|
+
android_globs = common_globs + ['/lib/appium_lib/android/**/*.rb']
|
51
|
+
ios_globs = common_globs + ['/lib/appium_lib/ios/**/*.rb']
|
52
|
+
|
53
|
+
run 'docs/android_docs.md', globs(android_globs)
|
54
|
+
|
55
|
+
run 'docs/ios_docs.md', globs(ios_globs)
|
56
|
+
```
|
data/Thorfile
CHANGED
@@ -0,0 +1,107 @@
|
|
1
|
+
##### [_build_gem](https://github.com/appium/appium_thor/blob/b6659a4ea55c99cf68707f75d02ef29062760a00/lib/appium_thor/helpers.rb#L6)
|
2
|
+
|
3
|
+
> def _build_gem
|
4
|
+
|
5
|
+
Sets the permissions on the gem credentials
|
6
|
+
Runs gem build gemspec
|
7
|
+
|
8
|
+
--
|
9
|
+
|
10
|
+
##### [tag_exists](https://github.com/appium/appium_thor/blob/b6659a4ea55c99cf68707f75d02ef29062760a00/lib/appium_thor/helpers.rb#L12)
|
11
|
+
|
12
|
+
> def tag_exists tag_name
|
13
|
+
|
14
|
+
Returns true if the tag exists on the master branch.
|
15
|
+
|
16
|
+
--
|
17
|
+
|
18
|
+
##### [sh](https://github.com/appium/appium_thor/blob/b6659a4ea55c99cf68707f75d02ef29062760a00/lib/appium_thor/helpers.rb#L18)
|
19
|
+
|
20
|
+
> def sh command
|
21
|
+
|
22
|
+
Runs command. Raises an exception if the command doesn't execute successfully.
|
23
|
+
|
24
|
+
--
|
25
|
+
|
26
|
+
##### [version_rgx](https://github.com/appium/appium_thor/blob/b6659a4ea55c99cf68707f75d02ef29062760a00/lib/appium_thor/helpers.rb#L30)
|
27
|
+
|
28
|
+
> def version_rgx
|
29
|
+
|
30
|
+
Used to parse the version number from version_file
|
31
|
+
|
32
|
+
--
|
33
|
+
|
34
|
+
##### [version](https://github.com/appium/appium_thor/blob/b6659a4ea55c99cf68707f75d02ef29062760a00/lib/appium_thor/helpers.rb#L35)
|
35
|
+
|
36
|
+
> def version
|
37
|
+
|
38
|
+
Returns the version number from version_file as a string
|
39
|
+
|
40
|
+
--
|
41
|
+
|
42
|
+
##### [_bump](https://github.com/appium/appium_thor/blob/b6659a4ea55c99cf68707f75d02ef29062760a00/lib/appium_thor/helpers.rb#L46)
|
43
|
+
|
44
|
+
> def _bump value
|
45
|
+
|
46
|
+
Updates the date and version in version_file.
|
47
|
+
Prints the new version and date to the console.
|
48
|
+
The date is not printed if it hasn't changed.
|
49
|
+
|
50
|
+
x.y.z
|
51
|
+
|
52
|
+
__Parameters:__
|
53
|
+
|
54
|
+
[symbol] value - value is either :x, :y, or :z. Default is z.
|
55
|
+
|
56
|
+
--
|
57
|
+
|
58
|
+
##### [update_release_notes](https://github.com/appium/appium_thor/blob/b6659a4ea55c99cf68707f75d02ef29062760a00/lib/appium_thor/helpers.rb#L86)
|
59
|
+
|
60
|
+
> def update_release_notes
|
61
|
+
|
62
|
+
Creates release_notes.md based on changes between tags.
|
63
|
+
Note that the first tag won't contain notes.
|
64
|
+
|
65
|
+
--
|
66
|
+
|
67
|
+
##### [_install](https://github.com/appium/appium_thor/blob/b6659a4ea55c99cf68707f75d02ef29062760a00/lib/appium_thor/helpers.rb#L141)
|
68
|
+
|
69
|
+
> def _install
|
70
|
+
|
71
|
+
Installs the local gem. It's fast due to the flags
|
72
|
+
|
73
|
+
--no-rdoc = skip rdoc
|
74
|
+
--no-ri = skip ri
|
75
|
+
--local = only install from the local disk
|
76
|
+
|
77
|
+
--
|
78
|
+
|
79
|
+
##### [_uninstall](https://github.com/appium/appium_thor/blob/b6659a4ea55c99cf68707f75d02ef29062760a00/lib/appium_thor/helpers.rb#L148)
|
80
|
+
|
81
|
+
> def _uninstall
|
82
|
+
|
83
|
+
Uninstalls all versions of the gem
|
84
|
+
|
85
|
+
--
|
86
|
+
|
87
|
+
##### [_publish](https://github.com/appium/appium_thor/blob/b6659a4ea55c99cf68707f75d02ef29062760a00/lib/appium_thor/helpers.rb#L159)
|
88
|
+
|
89
|
+
> def _publish
|
90
|
+
|
91
|
+
Publishes the master branch to github
|
92
|
+
Creates a version tag
|
93
|
+
Updates release notes and documentation
|
94
|
+
Builds the gem
|
95
|
+
Publishes the gem to rubygems
|
96
|
+
|
97
|
+
--
|
98
|
+
|
99
|
+
##### [remove_non_ascii_from_cwd](https://github.com/appium/appium_thor/blob/b6659a4ea55c99cf68707f75d02ef29062760a00/lib/appium_thor/helpers.rb#L188)
|
100
|
+
|
101
|
+
> def remove_non_ascii_from_cwd
|
102
|
+
|
103
|
+
Remove non-ascii bytes from all rb files in the current working directory.
|
104
|
+
Used to purge byte order marks that mess up YARD
|
105
|
+
|
106
|
+
--
|
107
|
+
|
data/lib/appium_thor.rb
CHANGED
@@ -51,9 +51,9 @@ class Default < Thor
|
|
51
51
|
_install
|
52
52
|
end
|
53
53
|
|
54
|
-
desc 'docs', 'Update
|
54
|
+
desc 'docs', 'Update docs'
|
55
55
|
def docs
|
56
|
-
|
56
|
+
instance_eval &docs_block if docs_block
|
57
57
|
end
|
58
58
|
|
59
59
|
desc 'notes', 'Update release notes'
|
data/lib/appium_thor/docs.rb
CHANGED
@@ -26,7 +26,7 @@ module Appium
|
|
26
26
|
|
27
27
|
method_path = obj.file.split('/lib/').last
|
28
28
|
os = method_path.downcase.match /ios|android/
|
29
|
-
out += "##### [#{obj.name.to_s}](https://github.com/appium/
|
29
|
+
out += "##### [#{obj.name.to_s}](https://github.com/appium/#{github_name}/blob/#{last_sha}/lib/#{method_path}#L#{obj.line}) #{os}\n\n"
|
30
30
|
out += "> #{obj.signature}\n\n"
|
31
31
|
out += "#{obj.docstring}\n\n"
|
32
32
|
|
@@ -55,6 +55,7 @@ module Appium
|
|
55
55
|
YARD::Registry.clear
|
56
56
|
puts "Globbing: #{globs}"
|
57
57
|
puts "Writing: #{out_file}"
|
58
|
+
FileUtils.mkdir_p File.dirname out_file
|
58
59
|
YARD::Parser::SourceParser.parse globs
|
59
60
|
File.open(out_file, 'w') do |file|
|
60
61
|
entries = YARD::Registry.entries
|
data/lib/appium_thor/version.rb
CHANGED
data/release_notes.md
CHANGED
@@ -1,3 +1,11 @@
|
|
1
|
+
#### v0.0.6 2014-07-31
|
2
|
+
|
3
|
+
- [b6659a4](https://github.com/appium/appium_thor/commit/b6659a4ea55c99cf68707f75d02ef29062760a00) Release 0.0.6
|
4
|
+
- [4650a68](https://github.com/appium/appium_thor/commit/4650a68713b0f7937cf3be6f96e06916c0f78bb4) Fix docs link
|
5
|
+
- [1586f47](https://github.com/appium/appium_thor/commit/1586f4789aa8db3284f8f274eaf57b50f94f6d0e) Fix thor docs
|
6
|
+
- [938f87e](https://github.com/appium/appium_thor/commit/938f87ea1bd081297af0b1e94e427409f0e3c9d0) Update README.md
|
7
|
+
|
8
|
+
|
1
9
|
#### v0.0.5 2014-07-31
|
2
10
|
|
3
11
|
- [1934e8f](https://github.com/appium/appium_thor/commit/1934e8f05cf7eb9b2c8e0da76eb1ebb895511f2f) Release 0.0.5
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: appium_thor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- code@bootstraponline.com
|
@@ -83,6 +83,7 @@ files:
|
|
83
83
|
- README.md
|
84
84
|
- Thorfile
|
85
85
|
- appium_thor.gemspec
|
86
|
+
- docs/helpers_docs.md
|
86
87
|
- lib/appium_thor.rb
|
87
88
|
- lib/appium_thor/commands/commands.rb
|
88
89
|
- lib/appium_thor/commands/init.rb
|