frank4712 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.gitignore +6 -0
- data/Gemfile +4 -0
- data/Rakefile +2 -0
- data/bin/f +3 -0
- data/frank.gemspec +21 -0
- data/lib/frank.rb +3 -0
- data/lib/frank/cli.rb +33 -0
- data/lib/frank/version.rb +3 -0
- metadata +56 -0
data/.gitignore
ADDED
data/Gemfile
ADDED
data/Rakefile
ADDED
data/bin/f
ADDED
data/frank.gemspec
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
$:.push File.expand_path("../lib", __FILE__)
|
3
|
+
require "frank/version"
|
4
|
+
|
5
|
+
Gem::Specification.new do |s|
|
6
|
+
s.name = "frank4712"
|
7
|
+
s.version = Frank::VERSION
|
8
|
+
s.platform = Gem::Platform::RUBY
|
9
|
+
s.authors = [" Write your name"]
|
10
|
+
s.email = ["Write your email address"]
|
11
|
+
s.homepage = ""
|
12
|
+
s.summary = %q{Write a gem summary}
|
13
|
+
s.description = %q{Write a gem description}
|
14
|
+
|
15
|
+
s.rubyforge_project = "frank"
|
16
|
+
|
17
|
+
s.files = `git ls-files`.split("\n")
|
18
|
+
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
19
|
+
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
20
|
+
s.require_paths = ["lib"]
|
21
|
+
end
|
data/lib/frank.rb
ADDED
data/lib/frank/cli.rb
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
require 'Win32API'
|
2
|
+
require 'thor'
|
3
|
+
|
4
|
+
module Frank
|
5
|
+
class CLI < Thor
|
6
|
+
|
7
|
+
no_tasks{
|
8
|
+
def user32(name, param_types, return_value)
|
9
|
+
Win32API.new 'user32', name, param_types, return_value
|
10
|
+
end
|
11
|
+
}
|
12
|
+
|
13
|
+
desc "which NAME", "finds name.* in %PATH%"
|
14
|
+
def which name
|
15
|
+
ENV['path'].split(";").map{|f| f.gsub(/\\/,"/")}.each do |path|
|
16
|
+
Dir.glob("#{path}/#{name}.*").each { |file| puts file }
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
desc "redis", "starts"
|
21
|
+
def redis
|
22
|
+
`start c:\\prog\\redis\\redis-server.exe c:\\prog\\redis\\redis.conf`
|
23
|
+
end
|
24
|
+
|
25
|
+
desc "handle TITLE", 'finds windows'
|
26
|
+
def handle title
|
27
|
+
# find_window = user32 'FindWindow', ['P', 'P'], 'L'
|
28
|
+
find_window_like = user32 'FindWindowLike', ['P', 'P', 'P', 'P'], 'L'
|
29
|
+
sleep 0.2 while (main_window = find_window_like.call nil, title) <= 0
|
30
|
+
puts "The main window's handle is #{main_window}."
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
metadata
ADDED
@@ -0,0 +1,56 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: frank4712
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- ! ' Write your name'
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2011-03-14 00:00:00.000000000 +01:00
|
13
|
+
default_executable:
|
14
|
+
dependencies: []
|
15
|
+
description: Write a gem description
|
16
|
+
email:
|
17
|
+
- Write your email address
|
18
|
+
executables:
|
19
|
+
- f
|
20
|
+
extensions: []
|
21
|
+
extra_rdoc_files: []
|
22
|
+
files:
|
23
|
+
- .gitignore
|
24
|
+
- Gemfile
|
25
|
+
- Rakefile
|
26
|
+
- bin/f
|
27
|
+
- frank.gemspec
|
28
|
+
- lib/frank.rb
|
29
|
+
- lib/frank/cli.rb
|
30
|
+
- lib/frank/version.rb
|
31
|
+
has_rdoc: true
|
32
|
+
homepage: ''
|
33
|
+
licenses: []
|
34
|
+
post_install_message:
|
35
|
+
rdoc_options: []
|
36
|
+
require_paths:
|
37
|
+
- lib
|
38
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
39
|
+
none: false
|
40
|
+
requirements:
|
41
|
+
- - ! '>='
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: '0'
|
44
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
45
|
+
none: false
|
46
|
+
requirements:
|
47
|
+
- - ! '>='
|
48
|
+
- !ruby/object:Gem::Version
|
49
|
+
version: '0'
|
50
|
+
requirements: []
|
51
|
+
rubyforge_project: frank
|
52
|
+
rubygems_version: 1.6.2
|
53
|
+
signing_key:
|
54
|
+
specification_version: 3
|
55
|
+
summary: Write a gem summary
|
56
|
+
test_files: []
|