winever 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -61,7 +61,34 @@ Pull requests welcomed to add more, cron_time.rb and test_cron_time.rb should be
61
61
 
62
62
  * As mentioned previously, only once-per-day-everyday tasks are supported.
63
63
  * Since RVM doesn't support windows, the tasks will call the global executables. Meaning if you have multiple Ruby installed, the first executable found on the PATH will be used.
64
- * Windows may not deal with single and double quotes in the same way as Linux. This is especially apparent when using `bundle exec` before the actual command, which happens automatically for rake and script tasks. Whenever possible, use the single quote. If you don't, make sure to test on both environment that the behavior is as expected.
64
+ * Windows may not deal with single and double quotes in the same way as Linux. This is especially apparent when using `bundle exec` before the actual command, which happens automatically for rake and script job_types. Make sure to test on both environment that the behavior is as expected. Also, see the section Ruby-Windows bug.
65
+ * See the section Ruby-Windows bug.
66
+
67
+ ## Ruby-Windows bug
68
+ There is currently a bug in Ruby ([#10128](https://bugs.ruby-lang.org/issues/10128)) related to argument passing through functions such as Kernel.exec, Kernel.system, which makes arguments be split around metacharacters by Windows when they shouldn't. This can be a problem when using bundle exec, which happens for the `rake` and `script` job_types.
69
+
70
+ As an example, in your console on Windows, the following will all fail because `bundle exec` relies on Kernel.exec. It will try to call the command world]:
71
+ ```
72
+ bundle exec rake my_task[hello&world]
73
+ bundle exec rake my_task["hello&world"]
74
+ bundle exec rake "my_task[hello&world]"
75
+ ```
76
+
77
+ The problematic metacharacters are the following:
78
+
79
+ * <>&|;
80
+ * the ^ gets removed
81
+ * the " is not escaped correctly, most likely breaking things. (no workaround)
82
+
83
+ The workaround is to have a space somewhere in the argument that contains those characters, Ruby will then wrap those parameters in quote and things will got correctly. For rake tasks, this can usually be handled easily by adding an empty parameter, which won't even be considered by rake. (no need to change your task). The above would work as `bundle exec rake "my_task[hello&world, ]"`.
84
+
85
+ In your schedule, your line for the rake task should therefore include the double quotes:
86
+
87
+ ```
88
+ rake '"my_task[hello&world, ]"'
89
+ ```
90
+
91
+
65
92
 
66
93
 
67
94
  ## Contributing
@@ -1,3 +1,3 @@
1
1
  module Winever
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
@@ -20,6 +20,7 @@ Gem::Specification.new do |spec|
20
20
 
21
21
  spec.add_dependency "whenever", ">= 0.9.1"
22
22
  spec.add_dependency "highline", ">= 0.5.0"
23
+ spec.add_dependency "win32-taskscheduler", ">= 0.3.1"
23
24
 
24
25
  spec.add_development_dependency "bundler", "~> 1.3"
25
26
  spec.add_development_dependency "rake"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: winever
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-08-11 00:00:00.000000000 Z
12
+ date: 2015-07-03 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: whenever
@@ -43,6 +43,22 @@ dependencies:
43
43
  - - ! '>='
44
44
  - !ruby/object:Gem::Version
45
45
  version: 0.5.0
46
+ - !ruby/object:Gem::Dependency
47
+ name: win32-taskscheduler
48
+ requirement: !ruby/object:Gem::Requirement
49
+ none: false
50
+ requirements:
51
+ - - ! '>='
52
+ - !ruby/object:Gem::Version
53
+ version: 0.3.1
54
+ type: :runtime
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: 0.3.1
46
62
  - !ruby/object:Gem::Dependency
47
63
  name: bundler
48
64
  requirement: !ruby/object:Gem::Requirement
@@ -132,7 +148,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
132
148
  version: '0'
133
149
  segments:
134
150
  - 0
135
- hash: -2498711773757809459
151
+ hash: 3415054426775792393
136
152
  required_rubygems_version: !ruby/object:Gem::Requirement
137
153
  none: false
138
154
  requirements:
@@ -141,7 +157,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
141
157
  version: '0'
142
158
  segments:
143
159
  - 0
144
- hash: -2498711773757809459
160
+ hash: 3415054426775792393
145
161
  requirements: []
146
162
  rubyforge_project:
147
163
  rubygems_version: 1.8.25