wijet-thor 0.14.9 → 0.14.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +15 -0
- data/lib/thor/version.rb +1 -1
- metadata +6 -24
- data/bin/rake2thor +0 -86
- data/bin/thor +0 -6
checksums.yaml
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
---
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
Yzk0MjA0NGVhMTBiYmYzNTg0YjYxYTVmY2QyNzM0YzJmNGJhM2VhNA==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
NjBhNzdkOTRmYTU3MTdiNjFlNTJlNGJkYWFkYWI1M2FjYjUzNjQzNQ==
|
7
|
+
!binary "U0hBNTEy":
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
MTg0NjkwMTNhM2EyZDQ0YWQ0OWNlNjk1MWNmODczYzBmNmIwNjI4YWM4MTM2
|
10
|
+
NmJjOWE3NjcxZGJmYzY0NzFkNjI0ZjhmZTgwNzIwNGZhNzE4OTlkYzEyMGEw
|
11
|
+
NmM5MGU0MTQwMTc1NGM0ZTdjNjY1OTE5NGIxZjg3MDcyMTYwNWQ=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
Y2ZjNzgzNTM4MjA0OWRjYzBlNTNhNTg2YzdiODgzMTM2OWNjMjI3MTRjOGQx
|
14
|
+
MWU0MWVlODg3YWJkMGJmOWI4Y2RkOGIyNWFlZWVkOGVjMGE3NjdjNjRjYzFi
|
15
|
+
M2U3YWMzZDk5ZGE5Mjg2ZWRlZTk1MGQxNGY4NDU4M2U4YWRiMTM=
|
data/lib/thor/version.rb
CHANGED
metadata
CHANGED
@@ -1,8 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wijet-thor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.14.
|
5
|
-
prerelease:
|
4
|
+
version: 0.14.10
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Yehuda Katz
|
@@ -10,12 +9,11 @@ authors:
|
|
10
9
|
autorequire:
|
11
10
|
bindir: bin
|
12
11
|
cert_chain: []
|
13
|
-
date: 2013-
|
12
|
+
date: 2013-08-29 00:00:00.000000000 Z
|
14
13
|
dependencies:
|
15
14
|
- !ruby/object:Gem::Dependency
|
16
15
|
name: bundler
|
17
16
|
requirement: !ruby/object:Gem::Requirement
|
18
|
-
none: false
|
19
17
|
requirements:
|
20
18
|
- - ~>
|
21
19
|
- !ruby/object:Gem::Version
|
@@ -23,7 +21,6 @@ dependencies:
|
|
23
21
|
type: :development
|
24
22
|
prerelease: false
|
25
23
|
version_requirements: !ruby/object:Gem::Requirement
|
26
|
-
none: false
|
27
24
|
requirements:
|
28
25
|
- - ~>
|
29
26
|
- !ruby/object:Gem::Version
|
@@ -31,7 +28,6 @@ dependencies:
|
|
31
28
|
- !ruby/object:Gem::Dependency
|
32
29
|
name: fakeweb
|
33
30
|
requirement: !ruby/object:Gem::Requirement
|
34
|
-
none: false
|
35
31
|
requirements:
|
36
32
|
- - ~>
|
37
33
|
- !ruby/object:Gem::Version
|
@@ -39,7 +35,6 @@ dependencies:
|
|
39
35
|
type: :development
|
40
36
|
prerelease: false
|
41
37
|
version_requirements: !ruby/object:Gem::Requirement
|
42
|
-
none: false
|
43
38
|
requirements:
|
44
39
|
- - ~>
|
45
40
|
- !ruby/object:Gem::Version
|
@@ -47,7 +42,6 @@ dependencies:
|
|
47
42
|
- !ruby/object:Gem::Dependency
|
48
43
|
name: rdoc
|
49
44
|
requirement: !ruby/object:Gem::Requirement
|
50
|
-
none: false
|
51
45
|
requirements:
|
52
46
|
- - ~>
|
53
47
|
- !ruby/object:Gem::Version
|
@@ -55,7 +49,6 @@ dependencies:
|
|
55
49
|
type: :development
|
56
50
|
prerelease: false
|
57
51
|
version_requirements: !ruby/object:Gem::Requirement
|
58
|
-
none: false
|
59
52
|
requirements:
|
60
53
|
- - ~>
|
61
54
|
- !ruby/object:Gem::Version
|
@@ -63,7 +56,6 @@ dependencies:
|
|
63
56
|
- !ruby/object:Gem::Dependency
|
64
57
|
name: rake
|
65
58
|
requirement: !ruby/object:Gem::Requirement
|
66
|
-
none: false
|
67
59
|
requirements:
|
68
60
|
- - ! '>='
|
69
61
|
- !ruby/object:Gem::Version
|
@@ -71,7 +63,6 @@ dependencies:
|
|
71
63
|
type: :development
|
72
64
|
prerelease: false
|
73
65
|
version_requirements: !ruby/object:Gem::Requirement
|
74
|
-
none: false
|
75
66
|
requirements:
|
76
67
|
- - ! '>='
|
77
68
|
- !ruby/object:Gem::Version
|
@@ -79,7 +70,6 @@ dependencies:
|
|
79
70
|
- !ruby/object:Gem::Dependency
|
80
71
|
name: rspec
|
81
72
|
requirement: !ruby/object:Gem::Requirement
|
82
|
-
none: false
|
83
73
|
requirements:
|
84
74
|
- - ~>
|
85
75
|
- !ruby/object:Gem::Version
|
@@ -87,7 +77,6 @@ dependencies:
|
|
87
77
|
type: :development
|
88
78
|
prerelease: false
|
89
79
|
version_requirements: !ruby/object:Gem::Requirement
|
90
|
-
none: false
|
91
80
|
requirements:
|
92
81
|
- - ~>
|
93
82
|
- !ruby/object:Gem::Version
|
@@ -95,7 +84,6 @@ dependencies:
|
|
95
84
|
- !ruby/object:Gem::Dependency
|
96
85
|
name: simplecov
|
97
86
|
requirement: !ruby/object:Gem::Requirement
|
98
|
-
none: false
|
99
87
|
requirements:
|
100
88
|
- - ~>
|
101
89
|
- !ruby/object:Gem::Version
|
@@ -103,7 +91,6 @@ dependencies:
|
|
103
91
|
type: :development
|
104
92
|
prerelease: false
|
105
93
|
version_requirements: !ruby/object:Gem::Requirement
|
106
|
-
none: false
|
107
94
|
requirements:
|
108
95
|
- - ~>
|
109
96
|
- !ruby/object:Gem::Version
|
@@ -111,9 +98,7 @@ dependencies:
|
|
111
98
|
description: A scripting framework that replaces rake, sake and rubigen
|
112
99
|
email:
|
113
100
|
- ruby-thor@googlegroups.com
|
114
|
-
executables:
|
115
|
-
- rake2thor
|
116
|
-
- thor
|
101
|
+
executables: []
|
117
102
|
extensions: []
|
118
103
|
extra_rdoc_files:
|
119
104
|
- CHANGELOG.rdoc
|
@@ -121,8 +106,6 @@ extra_rdoc_files:
|
|
121
106
|
- README.md
|
122
107
|
- Thorfile
|
123
108
|
files:
|
124
|
-
- bin/rake2thor
|
125
|
-
- bin/thor
|
126
109
|
- lib/thor.rb
|
127
110
|
- lib/thor/actions.rb
|
128
111
|
- lib/thor/actions/create_file.rb
|
@@ -197,27 +180,26 @@ files:
|
|
197
180
|
- Thorfile
|
198
181
|
homepage: http://github.com/wycats/thor
|
199
182
|
licenses: []
|
183
|
+
metadata: {}
|
200
184
|
post_install_message:
|
201
185
|
rdoc_options:
|
202
186
|
- --charset=UTF-8
|
203
187
|
require_paths:
|
204
188
|
- lib
|
205
189
|
required_ruby_version: !ruby/object:Gem::Requirement
|
206
|
-
none: false
|
207
190
|
requirements:
|
208
191
|
- - ! '>='
|
209
192
|
- !ruby/object:Gem::Version
|
210
193
|
version: '0'
|
211
194
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
212
|
-
none: false
|
213
195
|
requirements:
|
214
196
|
- - ! '>='
|
215
197
|
- !ruby/object:Gem::Version
|
216
198
|
version: 1.3.6
|
217
199
|
requirements: []
|
218
200
|
rubyforge_project:
|
219
|
-
rubygems_version:
|
201
|
+
rubygems_version: 2.0.3
|
220
202
|
signing_key:
|
221
|
-
specification_version:
|
203
|
+
specification_version: 4
|
222
204
|
summary: A scripting framework that replaces rake, sake and rubigen
|
223
205
|
test_files: []
|
data/bin/rake2thor
DELETED
@@ -1,86 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
require 'ruby2ruby'
|
4
|
-
require 'parse_tree'
|
5
|
-
if Ruby2Ruby::VERSION >= "1.2.0"
|
6
|
-
require 'parse_tree_extensions'
|
7
|
-
end
|
8
|
-
require 'rake'
|
9
|
-
|
10
|
-
input = ARGV[0] || 'Rakefile'
|
11
|
-
output = ARGV[1] || 'Thorfile'
|
12
|
-
|
13
|
-
$requires = []
|
14
|
-
|
15
|
-
module Kernel
|
16
|
-
def require_with_record(file)
|
17
|
-
$requires << file if caller[1] =~ /rake2thor:/
|
18
|
-
require_without_record file
|
19
|
-
end
|
20
|
-
alias_method :require_without_record, :require
|
21
|
-
alias_method :require, :require_with_record
|
22
|
-
end
|
23
|
-
|
24
|
-
load input
|
25
|
-
|
26
|
-
@private_methods = []
|
27
|
-
|
28
|
-
def file_task_name(name)
|
29
|
-
"compile_" + name.gsub('/', '_slash_').gsub('.', '_dot_').gsub(/\W/, '_')
|
30
|
-
end
|
31
|
-
|
32
|
-
def method_for_task(task)
|
33
|
-
file_task = task.is_a?(Rake::FileTask)
|
34
|
-
comment = task.instance_variable_get('@comment')
|
35
|
-
prereqs = task.instance_variable_get('@prerequisites').select(&Rake::Task.method(:task_defined?))
|
36
|
-
actions = task.instance_variable_get('@actions')
|
37
|
-
name = task.name.gsub(/^([^:]+:)+/, '')
|
38
|
-
name = file_task_name(name) if file_task
|
39
|
-
meth = ''
|
40
|
-
|
41
|
-
meth << "desc #{name.inspect}, #{comment.inspect}\n" if comment
|
42
|
-
meth << "def #{name}\n"
|
43
|
-
|
44
|
-
meth << prereqs.map do |pre|
|
45
|
-
pre = pre.to_s
|
46
|
-
pre = file_task_name(pre) if Rake::Task[pre].is_a?(Rake::FileTask)
|
47
|
-
' ' + pre
|
48
|
-
end.join("\n")
|
49
|
-
|
50
|
-
meth << "\n\n" unless prereqs.empty? || actions.empty?
|
51
|
-
|
52
|
-
meth << actions.map do |act|
|
53
|
-
act = act.to_ruby
|
54
|
-
unless act.gsub!(/^proc \{ \|(\w+)\|\n/,
|
55
|
-
" \\1 = Struct.new(:name).new(#{name.inspect}) # A crude mock Rake::Task object\n")
|
56
|
-
act.gsub!(/^proc \{\n/, '')
|
57
|
-
end
|
58
|
-
act.gsub(/\n\}$/, '')
|
59
|
-
end.join("\n")
|
60
|
-
|
61
|
-
meth << "\nend"
|
62
|
-
|
63
|
-
if file_task
|
64
|
-
@private_methods << meth
|
65
|
-
return
|
66
|
-
end
|
67
|
-
|
68
|
-
meth
|
69
|
-
end
|
70
|
-
|
71
|
-
body = Rake::Task.tasks.map(&method(:method_for_task)).compact.map { |meth| meth.gsub(/^/, ' ') }.join("\n\n")
|
72
|
-
|
73
|
-
unless @private_methods.empty?
|
74
|
-
body << "\n\n private\n\n"
|
75
|
-
body << @private_methods.map { |meth| meth.gsub(/^/, ' ') }.join("\n\n")
|
76
|
-
end
|
77
|
-
|
78
|
-
requires = $requires.map { |r| "require #{r.inspect}" }.join("\n")
|
79
|
-
|
80
|
-
File.open(output, 'w') { |f| f.write(<<END.lstrip) }
|
81
|
-
#{requires}
|
82
|
-
|
83
|
-
class Default < Thor
|
84
|
-
#{body}
|
85
|
-
end
|
86
|
-
END
|