runfile-tasks 0.4.0 → 0.4.1

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
  SHA1:
3
- metadata.gz: 5dd4e3a43cf9f25dff922b382652fd3ee38a8623
4
- data.tar.gz: f0f6d668c56f41a1175170a6d33c7e7e1ddc1073
3
+ metadata.gz: abebf00a93220e0bf6605b917c844daf8a5ef3ef
4
+ data.tar.gz: 523f6137b921d7903e4604e8d83114feb5faf553
5
5
  SHA512:
6
- metadata.gz: a0fc8373f66062b000aae5faa41caf41c41c89335ecfd5ab632821e72130e40e70d71ac212eb86b61939811dce63d3879d6a54c06d5f66d6e4849cf1da4cb17b
7
- data.tar.gz: 174ef213dc3d9b13e4e960d7558cf24bb55c7c175336c23c17bf2ae1f7bcf70c75b909f73c8778c52ec7edcf8ff00e50cb6c1774d638a8de68006f053c43309d
6
+ metadata.gz: 821b70deec211fafda1ef03e5e0a0eaaf170f0bdb5279ff4c05b3920db1be8e918dc5efe2f58534061928e89fa8c6255e44027c28d6075aa5d163616a500e6d0
7
+ data.tar.gz: a4de31834c7950a555c0cfad8e1d333bafca32a0edecaa4f00699fbc3ab2727161e0d4624228d08995d7cba45ab7dd17331c33e21f0f1e15aa0316711f420461
data/README.md CHANGED
@@ -1,3 +1,171 @@
1
1
  Runfile Tasks
2
2
  =============
3
3
 
4
+ A library of tasks ready to be included in your [Runfile]
5
+
6
+ ## Install
7
+
8
+ Install the gem or require it in your Gemfile:
9
+
10
+ gem 'runfile-tasks'
11
+
12
+ In your Runfile, you can include either all tasks:
13
+
14
+ require 'runfile-tasks'
15
+
16
+ Or pick and choose from the various task categories:
17
+
18
+ require 'runfile-tasks/testing'
19
+
20
+
21
+ Requiring the task packs does not make the available in your Runfile
22
+ immediately. You need to activate any of the tasks you want as described
23
+ below.
24
+
25
+
26
+ ## Usage
27
+
28
+ Include any of the tasks you need in your Runfile like this:
29
+
30
+ ```ruby
31
+ require 'runfile-tasks'
32
+
33
+ name "Greeter"
34
+ summary "A sample Runfile"
35
+ version "0.1.0"
36
+
37
+ # Include rdoc tasks and rspec tasks
38
+ RunfileTasks::Docs.rdoc
39
+ RunfileTasks::Testing.rspec
40
+
41
+ # The rest of your Runfile goes here
42
+ action :hello do
43
+ puts "world"
44
+ end
45
+
46
+ ```
47
+
48
+
49
+ ## Task Index
50
+
51
+ ### Testing Tasks
52
+
53
+ Including all testing tasks:
54
+
55
+ ```ruby
56
+ require 'runfile-tasks/testing'
57
+ ```
58
+
59
+ #### Testing with RSpec
60
+
61
+ Commands Added:
62
+
63
+ - `run spec [NAME]` - Run all specs or a single spec file matching a regex.
64
+
65
+ ```ruby
66
+ # Runfile
67
+
68
+ # Only include the rspec tasks
69
+ require 'runfile-tasks/testing/rspec'
70
+
71
+ # Include the rspec tasks with default configuration
72
+ RunfileTasks::Testing.rspec
73
+
74
+ # Set the Runfile action to 'test' instead of the default 'spec'
75
+ RunfileTasks::Testing.rspec 'test'
76
+
77
+ # Change the default options with a hash (these are the defaults)
78
+ RunfileTasks::rspec action: 'spec',
79
+ pattern: './spec/**/*_spec.rb', command: 'rspec'
80
+
81
+ ```
82
+
83
+
84
+ #### Testing with Minitest
85
+
86
+ Commands Added:
87
+
88
+ - `test [NAME]` - Run all tests or a single test file.
89
+
90
+ ```ruby
91
+ # Runfile
92
+
93
+ # Only include the minitest tasks
94
+ require 'runfile-tasks/testing/minitest'
95
+
96
+ # Include the minitest tasks with default configuration
97
+ RunfileTasks::Testing.minitest
98
+
99
+ # Set the file pattern to look for (this is the default)
100
+ RunfileTasks::Testing.rspec './test/*_test.rb'
101
+
102
+ ```
103
+
104
+ #### Testing with Cucumber
105
+
106
+ Commands Added:
107
+
108
+ - `(feature|features) [current]` - Run cucumber feature tests
109
+
110
+ ```ruby
111
+ # Runfile
112
+
113
+ # Only include the minitest tasks
114
+ require 'runfile-tasks/testing/cucumber'
115
+
116
+ # Include the cucumber tasks with default configuration
117
+ RunfileTasks::Testing.cucumber
118
+ ```
119
+
120
+
121
+ ### Gem Authoring Tasks
122
+
123
+ Commands Added:
124
+
125
+ - `build [--install]` - Build gem from gemspec and move it to 'gems' folder.
126
+ Use --install to also install it.
127
+ - `install [--remote]` - Install gem from local gem file or from rubygems
128
+ (--remote).
129
+ - `publish` - Publish gem to rubygems. Make sure to 'run gem build' before
130
+ you publish.
131
+ - `yank [VERSION]` - Yank gem from rubygems.
132
+
133
+
134
+ ```ruby
135
+ # Runfile
136
+ require 'runfile-tasks/rubygems'
137
+
138
+ # Include the tasks with default configuration. Pass in your gem name.
139
+ RunfileTasks::RubyGems.all 'my-gem'
140
+
141
+ # Set the folder where gems are copied after they are built (default)
142
+ RunfileTasks::RubyGems.all 'my-gem', 'gems'
143
+ ```
144
+
145
+
146
+ ### Documentation Tasks
147
+
148
+ Commands Added:
149
+
150
+ - `rdoc [-- OPTIONS...]` - Generate documentation using the rdoc command
151
+ line tool. To pass arguments to rdoc, place them after '--'.
152
+
153
+
154
+ ```ruby
155
+ # Runfile
156
+ require 'runfile-tasks/docs'
157
+
158
+ # Include the tasks with default configuration.
159
+ RunfileTasks::Docs.rdoc
160
+
161
+ # Set the files to be considered (default below)
162
+ RunfileTasks::Docs.rdoc '**/*.{rb,md}'
163
+
164
+ # Pass any additional option directly to rdoc (defaults below)
165
+ RunfileTasks::Docs.rdoc '**/*.{rb,md}', ["--main README.md", "--all",]
166
+ ```
167
+
168
+
169
+ ---
170
+ [Runfile]: https://github.com/DannyBen/runfile
171
+ [random cat]: http://thecatapi.com/api/images/get
@@ -1,25 +1,25 @@
1
1
  module RunfileTasks
2
- module Docs
3
- extend self
2
+ module Docs
3
+ extend self
4
4
 
5
- @@default_rdoc_options = [
6
- "--main README.md",
7
- "--all",
8
- ]
5
+ @@default_rdoc_options = [
6
+ "--main README.md",
7
+ "--all",
8
+ ]
9
9
 
10
- def rdoc(files=nil, options=@@default_rdoc_options)
11
- files or files = Dir['**/*.{rb,md}']
12
- files = "'" + files.join("' '") + "'"
13
- usage "rdoc [-- <options>...]"
14
- help "Generate documentation using the rdoc command line tool. To pass arguments to rdoc, place them after '--'."
15
- action :rdoc do |args|
16
- inopts = args['<options>']
17
- options = inopts unless inopts.empty?
18
- options = options.join(' ')
19
- cmd = "rdoc #{options} #{files}"
20
- say "!txtgrn!Running: !txtpur!#{cmd}"
21
- system cmd
22
- end
23
- end
24
- end
10
+ def rdoc(files=nil, options=@@default_rdoc_options)
11
+ files or files = Dir['**/*.{rb,md}']
12
+ files = "'" + files.join("' '") + "'"
13
+ usage "rdoc [-- <options>...]"
14
+ help "Generate documentation using the rdoc command line tool. To pass arguments to rdoc, place them after '--'."
15
+ action :rdoc do |args|
16
+ inopts = args['<options>']
17
+ options = inopts unless inopts.empty?
18
+ options = options.join(' ')
19
+ cmd = "rdoc #{options} #{files}"
20
+ say "!txtgrn!Running: !txtpur!#{cmd}"
21
+ system cmd
22
+ end
23
+ end
24
+ end
25
25
  end
@@ -22,7 +22,7 @@ module RunfileTasks
22
22
  files = Dir["*.gem"]
23
23
  Dir.exist? gemdir or FileUtils.mkdir gemdir
24
24
  files.each {|f| FileUtils.mv f, gemdir }
25
- args['--install'] and call "gem install"
25
+ args['--install'] and execute "gem install"
26
26
  end
27
27
 
28
28
  usage "install [--remote]"
@@ -1,23 +1,23 @@
1
1
  module RunfileTasks
2
- module Testing
3
- extend self
2
+ module Testing
3
+ extend self
4
4
 
5
- def minitest(pattern="./test/*_test.rb")
6
- usage "test [<name>]"
7
- help "Run all tests or a single test file."
8
- action :test do |args|
9
- if args['<name>']
10
- file = pattern.sub "*", args['<name>']
11
- say "!txtgrn!Using: !txtpur!#{file}"
12
- require file
13
- else
14
- Dir[pattern].each do |file|
15
- say "!txtgrn!Using: !txtpur!#{file}"
16
- require file
17
- end
18
- end
19
- end
20
- end
5
+ def minitest(pattern="./test/*_test.rb")
6
+ usage "test [<name>]"
7
+ help "Run all tests or a single test file."
8
+ action :test do |args|
9
+ if args['<name>']
10
+ file = pattern.sub "*", args['<name>']
11
+ say "!txtgrn!Using: !txtpur!#{file}"
12
+ require file
13
+ else
14
+ Dir[pattern].each do |file|
15
+ say "!txtgrn!Using: !txtpur!#{file}"
16
+ require file
17
+ end
18
+ end
19
+ end
20
+ end
21
21
 
22
- end
22
+ end
23
23
  end
@@ -1,3 +1,3 @@
1
1
  module RunfileTasks
2
- VERSION = "0.4.0"
2
+ VERSION = "0.4.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: runfile-tasks
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Danny Ben Shitrit
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-02-12 00:00:00.000000000 Z
11
+ date: 2016-06-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: runfile
@@ -65,7 +65,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
65
65
  version: '0'
66
66
  requirements: []
67
67
  rubyforge_project:
68
- rubygems_version: 2.4.6
68
+ rubygems_version: 2.5.1
69
69
  signing_key:
70
70
  specification_version: 4
71
71
  summary: Runfile tasks collection