win32-taskscheduler 0.3.1 → 0.3.2

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: 73d17d442fa2fa10b337a907dd0c2831b722cf56
4
- data.tar.gz: 60051a6eb63417dce9a9dd9e2428b32e6afc21c1
3
+ metadata.gz: b74ccd6aa98c21f9e0a7bdd20c24e09f7e461450
4
+ data.tar.gz: a0742bc2c56d80f282a1e5cd37fb1b809e0c3e70
5
5
  SHA512:
6
- metadata.gz: 0b84db2f85f3703e0f60f435d77736100169b20bbc5dd43dcd3ee3a43c6869aa7f8db0bc8fcfc9fd934040e716fbad262e62b1c00b78290df512289a33459e18
7
- data.tar.gz: 9dcbf5dfd9bca8b15f52741c913d602dacf31ae706c89dda1cb6e25362ca65d98434a8f0e172c33edfe1d8cc9bcce2a087ef5183bb7cf00b3edad1f36374df86
6
+ metadata.gz: eaa9bc605ad45fd60797cf46fb9d4083054ead60552c92e10546e4f2e83247cbf0b6c063c9716e7f729271b4b0f7410fc52cdb349e72b281efea287d5252d8fb
7
+ data.tar.gz: f338910febc7774ce538465684f39e4b6480eb5f5b78d769b56a2c89eb9a02e41d31ead7bba871c1138b09e138c929416dff779d29a2a005b9e3c3f7d589596e
Binary file
Binary file
data/CHANGES CHANGED
@@ -1,93 +1,108 @@
1
- == 0.3.1 - 6-Jul-2014
2
- * Added FFI as a dependency. Thanks go to Maxime Lapointe for the spot.
3
- * Some updates to the win_error helper method. Thanks go to Ethan J. Brown
4
- for the suggestions.
5
-
6
- == 0.3.0 - 15-Jan-2014
7
- * Rewritten to use Win32OLE instead of using wrapping the C API. Benefits
8
- include working on Windows Vista or later, and working with JRuby.
9
- * Modified the constructor to accept 3rd and 4th arguments. These indicate
10
- which folder to use, and whether or not to create it if it doesn't exist.
11
- * The TaskScheduler#save method is now no longer necessary. It is retained
12
- for backwards compatibility, but will raise a deprecation warning. In this
13
- version simply calling TaskScheduler#activate will implement the task.
14
- * Added support for the AT_SYSTEMSTART, AT_LOGON and ON_IDLE trigger types.
15
- * Now requires the structured_warnings gem.
16
- * Removed the doc directory and separate documentation file. Everything is
17
- inlined now. There's still an example under the "examples" directory, too.
18
- * Added test-unit, rake, and win32-security as development dependencies.
19
- These are needed for testing only.
20
-
21
- == 0.2.2 - 29-Feb-2012
22
- * Moved some include statements inside the TaskScheduler class to avoid
23
- polluting Object. Thanks go to Josh Cooper for the spot and patch.
24
- * Minor formatting tweaks to silence 1.9 warnings.
25
-
26
- == 0.2.1 - 8-Oct-2011
27
- * Fixed a bug that would not allow task to run as SYSTEM. Thanks go to
28
- Josh cooper for the spot and patch.
29
- * Fixed a bug in new_work_item that would cause it to crash if you tried
30
- to create a work item that already existed. An error is now raised instead.
31
- Thanks go to Pete Higgins for the spot.
32
- * The set_trigger and trigger= methods now internally transform and validate
33
- the trigger hash in the same manner as new_work_item. Thanks again go to
34
- Pete Higgins.
35
- * Cleaned up the repo. The C source files have been removed from the main
36
- repository (and this gem). They are in a separate branch on github for
37
- anyone who misses them.
38
- * Refactored the Rakefile, removing tasks related to the old C source files,
39
- and added tasks for cleaning, building and installing a gem.
40
- * Updated the README file, eliminating references to anything that was only
41
- related to the older C version.
42
-
43
- == 0.2.0 - 19-Jun-2009
44
- * Rewritten in pure Ruby!
45
- * The TaskScheduler::ONCE constant is now a valid trigger type. Thanks go to
46
- Uri Iurgel for the spot and patch.
47
- * Added the TaskScheduler#exists? method.
48
- * Added the TaskScheduler#tasks alias for the TaskScheduler#enum method.
49
- * The TaskScheduler#new_work_item method now accepts symbols as well as
50
- strings for hash keys, and ignores case. Also, the keys are now validated.
51
- * Renamed the example file and test file.
52
- * Added the 'example' Rake task.
53
- * Fixed some code in the README synopsis that was incorrect.
54
-
55
- == 0.1.0 - 11-May-2008
56
- * The TaskScheduler#save instance method now accepts an optional file name.
57
- * Most of the TaskScheduler setter methods now return the value specified
58
- instead of true.
59
- * Removed the RUN_ONLY_IF_DOCKED and RUN_IF_CONNECTED_TO_INTERNET constants.
60
- The MSDN docs say that they are unused.
61
- * Added more documentation. Much more rdoc friendly now.
62
- * Added many more tests.
63
- * Better type handling for bad arguments.
64
- * Added a Rakefile with tasks for building, installation and testing.
65
- * Added a gemspec.
66
- * Inlined the rdoc documentation.
67
- * Internal project reorganization and code cleanup.
68
-
69
- == 0.0.3 - 1-Mar-2005
70
- * Bug fix for the bitFieldToHumanDays() internal function.
71
- * Moved the 'examples' directory to the toplevel directory.
72
- * Made the CHANGES and README files rdoc friendly.
73
- * Minor updates to taskscheduler.h.
74
-
75
- == 0.0.2 - 04-Aug-2004
76
- * Now uses the newer allocation framework and replaced all instances of the
77
- deprecated STR2CSTR() function with StringValuePtr(). This means that, as
78
- of this release, Ruby 1.8.0 or later is required.
79
- * Modified the constructor to accept arguments. This is just some sugar for
80
- creating a new task item in one call instead of two.
81
- * The argument to trigger= now must be a hash. The same goes for the 'type'
82
- sub-hash.
83
- * Added the add_trigger() method. Actually, the C code for this method was
84
- already in place, I simply forgot to create a corresponding Ruby method
85
- for it.
86
- * Removed the create_trigger() method. This was really nothing more than an
87
- alias for trigger=(). I got confused somehow.
88
- * Test suite modified and many more tests added.
89
- * Documentation updates, including docs for a couple of methods that I had
90
- accidentally omitted previously.
91
-
92
- == 0.0.1 - 24-Apr-2004
93
- * Initial release
1
+ == 0.3.2 - 18-Mar-2018
2
+ * Use the block form for FFI::MemoryPointer in the error message helper
3
+ function. Thanks go to Ethan Brown for the suggestion.
4
+ * Fixed a potential bug in the helper module, which was also renamed to
5
+ help prevent any name collisions.
6
+ * Added the win32-taskscheduler.rb file for convenience.
7
+ * Added the configure_settings method.
8
+ * Added the configure_registration_info method.
9
+ * Added the description and description= aliases for comments.
10
+ * Added the author and author= aliases for creator.
11
+ * Some internal cleanup, moving common code to private methods.
12
+ * Rakefile now assumes Rubygems 2.0 or later for tasks.
13
+ * Gemspec cleanup, updated home page, removed old rubyforge_project reference.
14
+ * This gem is now signed.
15
+
16
+ == 0.3.1 - 6-Jul-2014
17
+ * Added FFI as a dependency. Thanks go to Maxime Lapointe for the spot.
18
+ * Some updates to the win_error helper method. Thanks go to Ethan J. Brown
19
+ for the suggestions.
20
+
21
+ == 0.3.0 - 15-Jan-2014
22
+ * Rewritten to use Win32OLE instead of using wrapping the C API. Benefits
23
+ include working on Windows Vista or later, and working with JRuby.
24
+ * Modified the constructor to accept 3rd and 4th arguments. These indicate
25
+ which folder to use, and whether or not to create it if it doesn't exist.
26
+ * The TaskScheduler#save method is now no longer necessary. It is retained
27
+ for backwards compatibility, but will raise a deprecation warning. In this
28
+ version simply calling TaskScheduler#activate will implement the task.
29
+ * Added support for the AT_SYSTEMSTART, AT_LOGON and ON_IDLE trigger types.
30
+ * Now requires the structured_warnings gem.
31
+ * Removed the doc directory and separate documentation file. Everything is
32
+ inlined now. There's still an example under the "examples" directory, too.
33
+ * Added test-unit, rake, and win32-security as development dependencies.
34
+ These are needed for testing only.
35
+
36
+ == 0.2.2 - 29-Feb-2012
37
+ * Moved some include statements inside the TaskScheduler class to avoid
38
+ polluting Object. Thanks go to Josh Cooper for the spot and patch.
39
+ * Minor formatting tweaks to silence 1.9 warnings.
40
+
41
+ == 0.2.1 - 8-Oct-2011
42
+ * Fixed a bug that would not allow task to run as SYSTEM. Thanks go to
43
+ Josh cooper for the spot and patch.
44
+ * Fixed a bug in new_work_item that would cause it to crash if you tried
45
+ to create a work item that already existed. An error is now raised instead.
46
+ Thanks go to Pete Higgins for the spot.
47
+ * The set_trigger and trigger= methods now internally transform and validate
48
+ the trigger hash in the same manner as new_work_item. Thanks again go to
49
+ Pete Higgins.
50
+ * Cleaned up the repo. The C source files have been removed from the main
51
+ repository (and this gem). They are in a separate branch on github for
52
+ anyone who misses them.
53
+ * Refactored the Rakefile, removing tasks related to the old C source files,
54
+ and added tasks for cleaning, building and installing a gem.
55
+ * Updated the README file, eliminating references to anything that was only
56
+ related to the older C version.
57
+
58
+ == 0.2.0 - 19-Jun-2009
59
+ * Rewritten in pure Ruby!
60
+ * The TaskScheduler::ONCE constant is now a valid trigger type. Thanks go to
61
+ Uri Iurgel for the spot and patch.
62
+ * Added the TaskScheduler#exists? method.
63
+ * Added the TaskScheduler#tasks alias for the TaskScheduler#enum method.
64
+ * The TaskScheduler#new_work_item method now accepts symbols as well as
65
+ strings for hash keys, and ignores case. Also, the keys are now validated.
66
+ * Renamed the example file and test file.
67
+ * Added the 'example' Rake task.
68
+ * Fixed some code in the README synopsis that was incorrect.
69
+
70
+ == 0.1.0 - 11-May-2008
71
+ * The TaskScheduler#save instance method now accepts an optional file name.
72
+ * Most of the TaskScheduler setter methods now return the value specified
73
+ instead of true.
74
+ * Removed the RUN_ONLY_IF_DOCKED and RUN_IF_CONNECTED_TO_INTERNET constants.
75
+ The MSDN docs say that they are unused.
76
+ * Added more documentation. Much more rdoc friendly now.
77
+ * Added many more tests.
78
+ * Better type handling for bad arguments.
79
+ * Added a Rakefile with tasks for building, installation and testing.
80
+ * Added a gemspec.
81
+ * Inlined the rdoc documentation.
82
+ * Internal project reorganization and code cleanup.
83
+
84
+ == 0.0.3 - 1-Mar-2005
85
+ * Bug fix for the bitFieldToHumanDays() internal function.
86
+ * Moved the 'examples' directory to the toplevel directory.
87
+ * Made the CHANGES and README files rdoc friendly.
88
+ * Minor updates to taskscheduler.h.
89
+
90
+ == 0.0.2 - 04-Aug-2004
91
+ * Now uses the newer allocation framework and replaced all instances of the
92
+ deprecated STR2CSTR() function with StringValuePtr(). This means that, as
93
+ of this release, Ruby 1.8.0 or later is required.
94
+ * Modified the constructor to accept arguments. This is just some sugar for
95
+ creating a new task item in one call instead of two.
96
+ * The argument to trigger= now must be a hash. The same goes for the 'type'
97
+ sub-hash.
98
+ * Added the add_trigger() method. Actually, the C code for this method was
99
+ already in place, I simply forgot to create a corresponding Ruby method
100
+ for it.
101
+ * Removed the create_trigger() method. This was really nothing more than an
102
+ alias for trigger=(). I got confused somehow.
103
+ * Test suite modified and many more tests added.
104
+ * Documentation updates, including docs for a couple of methods that I had
105
+ accidentally omitted previously.
106
+
107
+ == 0.0.1 - 24-Apr-2004
108
+ * Initial release
data/MANIFEST CHANGED
@@ -1,9 +1,10 @@
1
- * CHANGES
2
- * MANIFEST
3
- * README
4
- * Rakefile
5
- * win32-taskscheduler.gemspec
6
- * lib/win32/taskscheduler.rb
7
- * lib/win32/windows/helper.rb
8
- * examples/taskscheduler_test.rb
9
- * test/test_taskscheduler.rb
1
+ * CHANGES
2
+ * MANIFEST
3
+ * README
4
+ * Rakefile
5
+ * win32-taskscheduler.gemspec
6
+ * lib/win32-taskscheduler.rb
7
+ * lib/win32/taskscheduler.rb
8
+ * lib/win32/windows/helper.rb
9
+ * examples/taskscheduler_test.rb
10
+ * test/test_taskscheduler.rb
data/README CHANGED
@@ -1,68 +1,72 @@
1
- = Description
2
- The win32-taskscheduler library is a Ruby interface to the MS Windows Task
3
- Scheduler. It is analogous to the Unix cron daemon.
4
-
5
- = Installation
6
- gem install win32-taskscheduler
7
-
8
- = Synopsis
9
- require 'win32/taskscheduler'
10
- include Win32
11
-
12
- ts = TaskScheduler.new
13
-
14
- # Create a trigger that starts on April 25, 2014 at 11:05 pm. The trigger
15
- # will run on the first and last week of the month, on Monday and Friday,
16
- # in the months of April and May.
17
- #
18
- trigger = {
19
- :start_year => 2014,
20
- :start_month => 4,
21
- :start_day => 25,
22
- :start_hour => 23,
23
- :start_minute => 5,
24
- :trigger_type => TaskScheduler::MONTHLYDOW,
25
- :type => {
26
- :weeks => TaskScheduler::FIRST_WEEK | TaskScheduler::LAST_WEEK,
27
- :days_of_week => TaskScheduler::MONDAY | TaskScheduler::FRIDAY,
28
- :months => TaskScheduler::APRIL | TaskScheduler::MAY
29
- }
30
- }
31
-
32
- ts.new_work_item('my_notepad', trigger)
33
- ts.application_name = 'notepad.exe'
34
- ts.activate('my_notepad')
35
-
36
- = Documentation
37
- If you installed this library as a gem then the documentation was built for
38
- you and can be viewed if your gem server is running. There is also some
39
- documentation on the github wiki page.
40
-
41
- = Acknowledgements
42
- This library was modeled to some degree on the Win32::TaskScheduler Perl
43
- module by Umberto Nicoletti. However, there are some differences. Please see
44
- the documentation for details.
45
-
46
- = Warranty
47
- This package is provided "as is" and without any express or
48
- implied warranties, including, without limitation, the implied
49
- warranties of merchantability and fitness for a particular purpose.
50
-
51
- = Known Issues
52
- In some cases JRuby appears to raise a native exception rather than a
53
- Ruby exception on failure. This should be mostly harmless.
54
-
55
- Please submit any bug reports to the project page at
56
- http://github.com/djberg96/win32-taskscheduler or
57
- http://www.rubyforge.org/projects/win32utils.
58
-
59
- = Copyright
60
- (C) 2003-2014 Daniel J. Berger
61
- All Rights Reserved
62
-
63
- = License
64
- Artistic 2.0
65
-
66
- = Authors
67
- Park Heesob
68
- Daniel Berger
1
+ = Description
2
+ The win32-taskscheduler library is a Ruby interface to the MS Windows Task
3
+ Scheduler. It is analogous to the Unix cron daemon.
4
+
5
+ = Installation
6
+ gem install win32-taskscheduler
7
+
8
+ = Synopsis
9
+ require 'win32/taskscheduler'
10
+ include Win32
11
+
12
+ ts = TaskScheduler.new
13
+
14
+ # Create a trigger that starts on April 25, 2014 at 11:05 pm. The trigger
15
+ # will run on the first and last week of the month, on Monday and Friday,
16
+ # in the months of April and May.
17
+ #
18
+ trigger = {
19
+ :start_year => 2014,
20
+ :start_month => 4,
21
+ :start_day => 25,
22
+ :start_hour => 23,
23
+ :start_minute => 5,
24
+ :trigger_type => TaskScheduler::MONTHLYDOW,
25
+ :type => {
26
+ :weeks => TaskScheduler::FIRST_WEEK | TaskScheduler::LAST_WEEK,
27
+ :days_of_week => TaskScheduler::MONDAY | TaskScheduler::FRIDAY,
28
+ :months => TaskScheduler::APRIL | TaskScheduler::MAY
29
+ }
30
+ }
31
+
32
+ ts.new_work_item('my_notepad', trigger)
33
+ ts.application_name = 'notepad.exe'
34
+ ts.activate('my_notepad')
35
+
36
+ = Documentation
37
+ If you installed this library as a gem then the documentation was built for
38
+ you and can be viewed if your gem server is running. There is also some
39
+ documentation on the github wiki page.
40
+
41
+ = Acknowledgements
42
+ This library was modeled to some degree on the Win32::TaskScheduler Perl
43
+ module by Umberto Nicoletti. However, there are some differences. Please see
44
+ the documentation for details.
45
+
46
+ = Warranty
47
+ This package is provided "as is" and without any express or
48
+ implied warranties, including, without limitation, the implied
49
+ warranties of merchantability and fitness for a particular purpose.
50
+
51
+ = Known Issues
52
+ Some versions of Ruby have been known to segfault when attempting to create
53
+ a task. If this happens you will need to upgrade your version of Ruby. Or,
54
+ at least, your version of win32ole.
55
+
56
+ In some cases JRuby appears to raise a native exception rather than a
57
+ Ruby exception on failure. This should be mostly harmless.
58
+
59
+ Please submit any bug reports to the project page at:
60
+
61
+ http://github.com/djberg96/win32-taskscheduler
62
+
63
+ = Copyright
64
+ (C) 2003-2017 Daniel J. Berger
65
+ All Rights Reserved
66
+
67
+ = License
68
+ Artistic 2.0
69
+
70
+ = Authors
71
+ Park Heesob
72
+ Daniel Berger
data/Rakefile CHANGED
@@ -1,37 +1,34 @@
1
- require 'rake'
2
- require 'rake/clean'
3
- require 'rake/testtask'
4
-
5
- CLEAN.include("**/*.gem", "**/*.rbc")
6
-
7
- namespace 'gem' do
8
- desc 'Build the win32-taskscheduler gem'
9
- task :create => [:clean] do
10
- spec = eval(IO.read('win32-taskscheduler.gemspec'))
11
- if Gem::VERSION < "2.0"
12
- Gem::Builder.new(spec).build
13
- else
14
- require 'rubygems/package'
15
- Gem::Package.build(spec)
16
- end
17
- end
18
-
19
- desc 'Install the win32-taskscheduler library as a gem'
20
- task :install => [:create] do
21
- file = Dir['win32-taskscheduler*.gem'].first
22
- sh "gem install -l #{file}"
23
- end
24
- end
25
-
26
- desc 'Run the example code'
27
- task :example do
28
- ruby '-Iib examples/taskscheduler_example.rb'
29
- end
30
-
31
- desc 'Run the test suite for the win32-taskscheduler library'
32
- Rake::TestTask.new do |t|
33
- t.verbose = true
34
- t.warning = true
35
- end
36
-
37
- task :default => :test
1
+ require 'rake'
2
+ require 'rake/clean'
3
+ require 'rake/testtask'
4
+
5
+ CLEAN.include("**/*.gem", "**/*.rbc")
6
+
7
+ namespace 'gem' do
8
+ desc 'Build the win32-taskscheduler gem'
9
+ task :create => [:clean] do
10
+ require 'rubygems/package'
11
+ spec = eval(IO.read('win32-taskscheduler.gemspec'))
12
+ spec.signing_key = File.join(Dir.home, '.ssh', 'gem-private_key.pem')
13
+ Gem::Package.build(spec, true)
14
+ end
15
+
16
+ desc 'Install the win32-taskscheduler library as a gem'
17
+ task :install => [:create] do
18
+ file = Dir['win32-taskscheduler*.gem'].first
19
+ sh "gem install -l #{file}"
20
+ end
21
+ end
22
+
23
+ desc 'Run the example code'
24
+ task :example do
25
+ ruby '-Iib examples/taskscheduler_example.rb'
26
+ end
27
+
28
+ desc 'Run the test suite for the win32-taskscheduler library'
29
+ Rake::TestTask.new do |t|
30
+ t.verbose = true
31
+ t.warning = true
32
+ end
33
+
34
+ task :default => :test