rag 1.2.1 → 1.3.0

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
@@ -4,3 +4,4 @@
4
4
  /tmp
5
5
  /rfrom
6
6
  *.gem
7
+ /test
@@ -0,0 +1,4 @@
1
+ language: ruby
2
+ rvm:
3
+ - 1.9.3
4
+ script: bundle exec rspec spec
data/Gemfile CHANGED
@@ -1,9 +1,12 @@
1
1
  source :rubygems
2
+ #source "http://ruby.taobao.org"
2
3
 
3
- gem "tagen", "~>1.1.0", :require => "tagen/core"
4
- gem "pa", "~>1.2.0"
5
- gem "optimism", "~>3.1.0"
4
+ gem "tagen", "~>1.1.0"
5
+ gem "pd"
6
+ gem "pa", "~>1.3.0"
7
+ gem "optimism", "~>3.2.0"
6
8
  gem "thor"
9
+ gem "tilt"
7
10
 
8
11
  group :development do
9
12
  gem "rspec"
@@ -1,25 +1,33 @@
1
1
  GEM
2
2
  remote: http://rubygems.org/
3
3
  specs:
4
- activesupport (3.1.3)
4
+ activesupport (3.1.4)
5
5
  multi_json (~> 1.0)
6
+ awesome_print (1.0.2)
6
7
  diff-lcs (1.1.3)
7
8
  hike (1.2.1)
8
- multi_json (1.0.4)
9
- optimism (3.1.0)
9
+ i18n (0.6.0)
10
+ multi_json (1.3.5)
11
+ optimism (3.2.0)
10
12
  hike (~> 1.2.0)
11
- pa (1.2.1)
12
- rspec (2.8.0)
13
- rspec-core (~> 2.8.0)
14
- rspec-expectations (~> 2.8.0)
15
- rspec-mocks (~> 2.8.0)
16
- rspec-core (2.8.0)
17
- rspec-expectations (2.8.0)
18
- diff-lcs (~> 1.1.2)
19
- rspec-mocks (2.8.0)
20
- tagen (1.1.4)
13
+ pa (1.3.0)
14
+ pd
15
+ pd (1.0.5)
16
+ awesome_print
17
+ rspec (2.10.0)
18
+ rspec-core (~> 2.10.0)
19
+ rspec-expectations (~> 2.10.0)
20
+ rspec-mocks (~> 2.10.0)
21
+ rspec-core (2.10.0)
22
+ rspec-expectations (2.10.0)
23
+ diff-lcs (~> 1.1.3)
24
+ rspec-mocks (2.10.1)
25
+ tagen (1.1.7)
21
26
  activesupport (~> 3.1.0)
22
- thor (0.14.6)
27
+ i18n
28
+ pd
29
+ thor (0.15.4)
30
+ tilt (1.3.3)
23
31
  watchr (0.7)
24
32
  yard (0.7.5)
25
33
 
@@ -27,10 +35,12 @@ PLATFORMS
27
35
  ruby
28
36
 
29
37
  DEPENDENCIES
30
- optimism (~> 3.1.0)
31
- pa (~> 1.2.0)
38
+ optimism (~> 3.2.0)
39
+ pa (~> 1.3.0)
40
+ pd
32
41
  rspec
33
42
  tagen (~> 1.1.0)
34
43
  thor
44
+ tilt
35
45
  watchr
36
46
  yard
data/README.md CHANGED
@@ -1,5 +1,4 @@
1
- Rag, a project helper
2
- =====================
1
+ # Rag, a project helper [![Build Status](https://secure.travis-ci.org/GutenYe/rag.png)](http://travis-ci.org/GutenYe/rag)
3
2
 
4
3
  | Homepage: | https://github.com/GutenYe/rag |
5
4
  |----------------|---------------------------------------|
@@ -106,6 +105,10 @@ Resources
106
105
  * [gem.vim](https://github.com/GutenYe/gem.vim): a project helper for ruby gem/library development
107
106
  * [Hoe](https://github.com/seattlerb/hoe): a rake/rubygems helper for project
108
107
 
108
+ Requirements
109
+ ------------
110
+
111
+ * ruby 1.9.3
109
112
 
110
113
  Copyright
111
114
  ---------
data/Rakefile CHANGED
@@ -1,40 +1,43 @@
1
+ sudo = Process.pid==0 ? "" : "sudo"
2
+
1
3
  desc "build a gem file"
2
4
  task :release do
3
- sh "gem build rag.gemspec"
4
- sh "gem push *.gem"
5
- sh "rm *.gem"
5
+ run "gem build rag.gemspec"
6
+ run "gem push *.gem"
7
+ run "#{sudo} gem install *.gem"
8
+ run "rm *.gem"
6
9
  end
7
10
 
8
11
  desc "install a gem file"
9
12
  task :install do
10
- sh "gem build rag.gemspec"
11
- sh "gem install *.gem"
12
- sh "rm *.gem"
13
+ run "gem build rag.gemspec"
14
+ run "#{sudo} gem install *.gem"
15
+ run "rm *.gem"
13
16
  end
14
17
 
15
18
  desc "autotest with watchr"
16
19
  task :test do
17
- sh "watchr rag.watchr"
20
+ run "watchr rag.watchr"
18
21
  end
19
22
 
20
23
  desc "testing the libraray"
21
24
  namespace :test do
22
25
  task :all do
23
- sh "rspec spec"
26
+ run "rspec spec"
24
27
  end
25
28
  end
26
29
 
27
30
  desc "run yard server --reload"
28
31
  task :doc do
29
- sh "yard server --reload"
32
+ run "yard server --reload"
30
33
  end
31
34
 
32
35
  desc "clean up"
33
36
  task :clean do
34
- `rm *.gem`
37
+ run "rm *.gem"
35
38
  end
36
39
 
37
- def sh cmd
40
+ def run cmd
38
41
  puts cmd
39
42
  system cmd
40
43
  end
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ ENV["BUNDLE_GEMFILE"] = File.expand_path("../../Gemfile", __FILE__)
4
+ require "bundler/setup"
5
+
6
+ load File.expand_path("../rag", __FILE__)
@@ -0,0 +1 @@
1
+ hello
data/lib/rag.rb CHANGED
@@ -1,18 +1,21 @@
1
- ENV["BUNDLE_GEMFILE"] = File.expand_path("../../Gemfile", __FILE__)
2
- require "bundler/setup"
3
- Bundler.require
1
+ libdir = File.dirname(__FILE__); $LOAD_PATH.unshift(libdir) unless $LOAD_PATH.include?(libdir)
4
2
 
5
- libdir = File.dirname(__FILE__)
6
- $LOAD_PATH.unshift(libdir) unless $LOAD_PATH.include?(libdir)
3
+ #require "tagen/core"
4
+ require "tagen/core/array/extract_options"
5
+ require "active_support/core_ext/string/inflections"
6
+ require "pd"
7
+ require "pa"
8
+ require "optimism"
9
+ require "thor"
7
10
 
8
11
  class Rag < Thor
9
- Error = Class.new Exception
10
- RagError = Class.new Exception
11
-
12
12
  autoload :VERSION, "rag/version"
13
13
  autoload :UI, "rag/ui"
14
14
  autoload :Util, "rag/util"
15
15
 
16
+ Error = Class.new Exception
17
+ ENoTemplate = Class.new Error
18
+ RagError = Class.new Exception
16
19
  Rc = Optimism.require "rag/rc", "~/.ragrc"
17
20
 
18
21
  include Thor::Actions
@@ -28,23 +31,54 @@ class Rag < Thor
28
31
  end
29
32
  end
30
33
 
31
- def initialize(*)
32
- super
33
- the_shell = (options["no-color"] ? Thor::Shell::Basic.new : shell)
34
- Rag.ui = UI::Shell.new(the_shell)
35
- Rag.ui.debug! if options["verbose"]
36
-
37
- # generate Rc.o
38
- o = Rc.o = OpenOption.new
39
- if gemspec_file=Dir["*.gemspec"][0]
40
- gemspec = Gem::Specification.load(gemspec_file)
41
- o.project = gemspec.name
42
- o.version = gemspec.version
34
+ chainable = Module.new do
35
+ def initialize(*)
36
+ super
37
+ the_shell = (options["no-color"] ? Thor::Shell::Basic.new : shell)
38
+ Rag.ui = UI::Shell.new(the_shell)
39
+ Rag.ui.debug! if options["verbose"]
43
40
  end
44
41
  end
42
+ include chainable
45
43
  end
46
44
 
47
- require "rag/new"
48
- require "rag/gem"
49
- require "rag/test"
50
- require "rag/doc"
45
+ # new
46
+ class Rag
47
+ desc "new <template_name> <app_path>", "create a new project"
48
+ method_option "name", :aliases => "-n", :type => :string, :banner => "NAME", :desc => "new project name"
49
+ method_option "klass", :aliases => "-k", :type => :string, :banner => "CLASS_NAME", :desc => "new class name"
50
+ method_option "dir", :aliases => "-d", :type => :string, :banner => "DIR", :desc => "template directory"
51
+ def new(template_name, app_path)
52
+ o = options.dup
53
+ template_name = template_name.dup
54
+ app_path = Pa(app_path.dup)
55
+ require "rag/new"
56
+
57
+ template_name, *exts = template_name.split(".")
58
+ template_dir = o[:dir] || Rc.p.home
59
+ exts = exts.empty? ? ["default"] : exts
60
+ root = Pa("#{template_dir}/#{template_name}").a
61
+ raise ENoTemplate, "can't find '#{template_name}' at #{template_dir}" unless root.exists?
62
+
63
+ app_path = Pa.absolute(app_path)
64
+ o["name"] ||= app_path.fname
65
+ o["klass"] ||= o["name"].classify
66
+ Rc << {
67
+ template_name: template_name,
68
+ app_path: app_path,
69
+ project: o["name"],
70
+ klass: o["klass"],
71
+ exts: exts,
72
+ ext: exts[0]
73
+ }
74
+
75
+ Pa.mkdir(app_path)
76
+ Pa.cd(app_path)
77
+
78
+ source = File.read("#{root}/Buildfile")
79
+ DSL.source_root root.p
80
+ dsl = DSL.new(template_name, app_path, o)
81
+ dsl.destination_root = ""
82
+ dsl.instance_eval source
83
+ end
84
+ end
@@ -0,0 +1,5 @@
1
+ class Rag
2
+ def release
3
+ `aurploader pkg.`
4
+ end
5
+ end
@@ -0,0 +1,50 @@
1
+ class Thor
2
+ module Actions
3
+ def directory2(source, *args, &block)
4
+ config = args.last.is_a?(Hash) ? args.pop : {}
5
+ destination = args.first || source
6
+ action Directory2.new(self, source, destination || source, config, &block)
7
+ end
8
+
9
+ # use tilt
10
+ # :scope => nil
11
+ # :locals => {}
12
+ # &block is for yield.
13
+ def template2(source, *args, &block)
14
+ config = args.last.is_a?(Hash) ? args.pop : {}
15
+ destination = args.first || source.sub(/\.tt$/, '')
16
+ template_options = {source_root: self.class.source_root}
17
+
18
+ source = File.expand_path(find_in_source_paths(source.to_s))
19
+
20
+ create_file destination, nil, config do
21
+ Rag::Template.render(source, template_options, &block)
22
+ end
23
+ end
24
+
25
+ class Directory2 < Directory #:nodoc:
26
+ protected
27
+ def execute!
28
+ lookup = config[:recursive] ? File.join(source, '**') : source
29
+ lookup = File.join(lookup, '{*,.[a-z]*}')
30
+
31
+ Dir[lookup].sort.each do |file_source|
32
+ next if File.directory?(file_source)
33
+ file_destination = File.join(given_destination, file_source.gsub(source, '.'))
34
+ file_destination.gsub!('/./', '/')
35
+
36
+ case file_source
37
+ when /\.empty_directory$/
38
+ dirname = File.dirname(file_destination).gsub(/\/\.$/, '')
39
+ next if dirname == given_destination
40
+ base.empty_directory(dirname, config)
41
+ when /\.tt$/
42
+ destination = base.template2(file_source, file_destination[0..-4], config, &@block)
43
+ else
44
+ destination = base.copy_file(file_source, file_destination, config, &@block)
45
+ end
46
+ end
47
+ end
48
+ end
49
+ end
50
+ end
@@ -1,4 +1,7 @@
1
- class Rag # ::Project
1
+ require "tilt"
2
+ require "rag/ext"
3
+
4
+ class Rag # Project Template DSL
2
5
  =begin
3
6
 
4
7
  == ERB support variables
@@ -52,20 +55,20 @@ you can use arbitrary name in .ragrc, then you can use then in template file.
52
55
  end
53
56
 
54
57
  def template_path
55
- pa1 = Pa("#{Rc.p.home}/#{template}")
56
- return pa1.p if pa1.exists?
58
+ p = Pa("#{Rc.p.home}/#{template}")
59
+ return p.p if p.exists?
57
60
 
58
61
  raise Error, "can't find template -- #{template}"
59
62
  end
60
63
 
61
64
  def copy_files(o={})
62
- Pa.each_r template_path do |pa, relative, e|
65
+ Pa.each_r template_path do |pa, abs, rel|
63
66
  # skip *~
64
67
  next if pa.fn2 =~ /~$/
65
68
 
66
69
  # convert __project__ to options["name"]
67
- dest = app_path.join(relative.gsub(/__project__/, options["name"]))
68
- path_msg = relative.gsub(/__project__/, options["name"]).gsub(/\.erb$/,"")
70
+ dest = app_path.join(rel.gsub(/__project__/, options["name"]))
71
+ path_msg = rel.gsub(/__project__/, options["name"]).gsub(/\.erb$/,"")
69
72
 
70
73
  # skip directory not file
71
74
  next if dest.exists? and dest.directory?
@@ -122,35 +125,77 @@ you can use arbitrary name in .ragrc, then you can use then in template file.
122
125
  config._data
123
126
  end
124
127
  end
125
- end
126
128
 
127
- class Rag < Thor
128
- desc "new <template> <app_path>", "create a new project"
129
- method_option "name", :aliases => "-n", :type => :string, :banner => "NAME", :desc => "another name"
130
- method_option "class_name", :aliases => "-c", :type => :string, :banner => "CLASS_NAME", :desc => "another class name"
131
- def new(template, app_path)
132
- check_first_time!
133
-
134
- Project.create template.dup, app_path.dup, options.dup
135
- end
136
-
137
- private
138
- def check_first_time!
139
- return unless first_time?
140
-
141
- puts "first time run rag"
142
- Pa.each("#{Rc.p.data}/home_config") { |src|
143
- dest = "~/" + src.b.sub(/^_/, ".")
144
- puts "[create] #{dest.short}"
145
- Pa.cp src, dest
146
- }
147
-
148
- puts "exit."
149
- puts "please edit ~/.ragrc config file, then run rag again"
150
- exit
151
- end
152
-
153
- def first_time?
154
- Rc.p.homerc.exists? ? false : true
155
- end
129
+ class Template
130
+ Rc = Rag::Rc # used in hello.tt
131
+
132
+ # @param [Hash] o options pass to initialize
133
+ def self.render(source, o={}, &blk)
134
+ scope = Template.new(o)
135
+
136
+ Tilt["erb"].new(source).render(scope, scope.locals, &blk)
137
+ end
138
+
139
+ attr_reader :source_root
140
+
141
+ # @param [Hash] o options
142
+ # @option o [String] :source_root ("")
143
+ def initialize(o={})
144
+ @source_root = o[:source_root] || ""
145
+ end
146
+
147
+ # path absolute or relative.
148
+ def render(path)
149
+ path = Pa(Pa.absolute?(path) ? path : Pa.join(source_root, path))
150
+ path = path.build(fname: (path.base[0]=="_" ? "" : "_")+path.base)
151
+
152
+ Tilt::ERBTemplate.new(path.p).render(self, locals)
153
+ end
154
+
155
+ def have_ext(ext)
156
+ Rc.exts.include? ext
157
+ end
158
+
159
+ # for tilt
160
+ def locals
161
+ Rc._to_hash
162
+ end
163
+ end
164
+
165
+ class DSL < Thor
166
+ include Thor::Actions
167
+ attr_reader :options, :template_name, :app_path
168
+
169
+ def initialize(template_name, app_path, o={})
170
+ @template_name = template_name
171
+ @app_path = app_path
172
+ @options = o
173
+ end
174
+
175
+ no_tasks do
176
+
177
+ def project
178
+ Rc.project
179
+ end
180
+
181
+ def have_ext(ext)
182
+ Rc.exts.include? ext
183
+ end
184
+
185
+ # a shortcut for
186
+ # directory2 "template", Rc.app_path
187
+ # directory2 "template.daemon", Rc.app_path if have_ext("daemon")
188
+ # ...
189
+ def copy_template(dir)
190
+ directory2 dir, Rc.app_path
191
+
192
+ Rc.exts.each {|ext|
193
+ newdir = "#{dir}.#{ext}"
194
+ if Pa.exists?(newdir)
195
+ directory2 newdir, Rc.app_path
196
+ end
197
+ }
198
+ end
199
+ end
200
+ end
156
201
  end
@@ -0,0 +1,21 @@
1
+ class Rag
2
+ chainable = Module.new do
3
+ def initialize(*)
4
+ super
5
+
6
+ # generate Rc.o
7
+ o = Rc.o = Optimism.new
8
+ if gemspec_file=Dir["*.gemspec"][0]
9
+ gemspec = Gem::Specification.load(gemspec_file)
10
+ o.project = gemspec.name
11
+ o.version = gemspec.version
12
+ end
13
+ end
14
+ end
15
+
16
+ include chainable
17
+ end
18
+
19
+ require "rag/ruby/gem"
20
+ require "rag/ruby/test"
21
+ require "rag/ruby/doc"
@@ -1,6 +1,6 @@
1
1
  class Rag < Thor
2
2
  desc "doc", "test documentation with yard server --reload"
3
3
  def doc
4
- system "yard server --reload", :verbose
4
+ system "yard server --reload", :verbose => true
5
5
  end
6
6
  end
@@ -1,8 +1,10 @@
1
- class Rag < Thor
1
+ class Rag
2
2
  desc "release", "release this gem to RubyGems.org"
3
3
  def release
4
+ sudo = Process.uid == 0 ? "" : "sudo"
4
5
  system "gem build #{Rc.o.project}.gemspec", :verbose => true
5
6
  system "gem push #{Rc.o.project}-#{Rc.o.version}.gem", :verbose => true
7
+ system "#{sudo} gem install #{Rc.o.project}-#{Rc.o.version}.gem", :verbose => true
6
8
  Pa.rm "#{Rc.o.project}-#{Rc.o.version}.gem", :verbose => true
7
9
  end
8
10
 
@@ -0,0 +1,21 @@
1
+ module Ragen
2
+ class Test < Thor
3
+ default_task :default
4
+
5
+ desc "default", "begin auto test", hide: true
6
+ def default
7
+ system "watchr #{Rag::Rc.o.project}.watchr", :verbose => true
8
+ end
9
+
10
+ desc "all", "test all"
11
+ def all
12
+ system "bundle exec rspec --color spec", :verbose => true
13
+ end
14
+
15
+ end
16
+ end
17
+
18
+ class Rag < Thor
19
+ desc "test", "run test"
20
+ subcommand "test", Ragen::Test
21
+ end
@@ -1,3 +1,3 @@
1
1
  class Rag
2
- VERSION = "1.2.1"
2
+ VERSION = "1.3.0"
3
3
  end
@@ -1,5 +1,4 @@
1
- $: << File.expand_path("../lib", __FILE__)
2
- require "rag/version"
1
+ Kernel.load File.expand_path("../lib/rag/version.rb", __FILE__)
3
2
 
4
3
  Gem::Specification.new do |s|
5
4
  s.name = "rag"
@@ -17,8 +16,10 @@ A project helper, include create, develop, test, release helper.
17
16
  s.files = `git ls-files`.split("\n")
18
17
  s.executables = %w(rag)
19
18
 
19
+ s.add_dependency "pd"
20
20
  s.add_dependency "tagen", "~>1.1.0"
21
- s.add_dependency "pa", "~>1.2.0"
22
- s.add_dependency "optimism", "~>3.1.0"
21
+ s.add_dependency "pa", "~>1.3.0"
22
+ s.add_dependency "optimism", "~>3.2.0"
23
23
  s.add_dependency "thor"
24
+ s.add_dependency "tilt"
24
25
  end
data/rag.watchr CHANGED
@@ -15,8 +15,7 @@ Signal.trap('QUIT') do
15
15
  end
16
16
 
17
17
  def test(path)
18
- cmd = "rspec #{path}"
18
+ cmd = "bundle exec rspec #{path}"
19
19
  puts cmd
20
20
  system cmd
21
21
  end
22
-
@@ -0,0 +1,3 @@
1
+ directory2 "template", "hello"
2
+
3
+ # vim: ft=ruby
@@ -0,0 +1 @@
1
+ <%=project%>
@@ -1,9 +1,12 @@
1
1
  require "spec_helper"
2
2
  require "fileutils"
3
3
  require "tmpdir"
4
+ require "rag/new"
5
+ require "rag/ext"
4
6
 
5
7
  Project = Rag::Project
6
8
 
9
+ =begin
7
10
  describe Project do
8
11
  before :all do
9
12
  @curdir = Dir.pwd
@@ -18,16 +21,8 @@ describe Project do
18
21
 
19
22
  describe ".create" do
20
23
  it "runs ok" do
21
- Project.create "default", "guten", "Guten", :author => "Guten", :email => "a@a.com"
22
- end
23
- end
24
- end
25
-
26
- describe Rag do
27
- describe ".new" do
28
- it "first time create ragrc in $HOME" do
29
- #pd Rc.pa.config
30
- #Rag::Rc.pa.config.should be_exists
24
+ Project.create "rb.app", "guten"
31
25
  end
32
26
  end
33
27
  end
28
+ =end
@@ -0,0 +1,17 @@
1
+ require "spec_helper"
2
+
3
+ describe Rag do
4
+ describe "#new" do
5
+ it "works" do
6
+ chdir $spec_tmp, :empty => true do
7
+ Rag.new.invoke(:new, ["ruby.app.bar", "myapp"])
8
+
9
+ File.read("myapp/hello").should == "hello"
10
+ Rc.template.should == "ruby"
11
+ Rc.exts.should == %w[app bar]
12
+ Rc.ext.should == "app" # main ext
13
+ end
14
+ end
15
+ end
16
+ end
17
+
@@ -1,7 +1,79 @@
1
+ require "bundler/setup"
2
+ require "stringio"
3
+ require "fileutils"
4
+ require "pd"
1
5
  require "rag"
2
6
 
3
- $spec_dir = Pa(__FILE__).dir
7
+ $spec_dir = File.expand_path("..", __FILE__)
8
+ $spec_data = File.expand_path("../data", __FILE__)
9
+ $spec_tmp = File.expand_path("../tmp", __FILE__)
4
10
 
5
- ENV["HOME"] = $spec_dir.join2("data")
11
+ Rc = Rag::Rc
12
+ Rc._merge! <<EOF
13
+ p:
14
+ root = nil
15
+ home = Pa("#{$spec_data}/home")
16
+ homerc = Pa("#{$spec_data}/ragrc")
17
+ apprc = Pa("#{$spec_data}/apprc")
18
+ data = nil
6
19
 
7
- Rag::Rc = Optimism.require "#{$spec_dir}/data/systemrc", "#{$spec_dir}/data/homerc"
20
+ author = "Test"
21
+ email = "test@test.com"
22
+ license = "TEST-LICENSE"
23
+
24
+ github:
25
+ username = "TestYe"
26
+ EOF
27
+
28
+ RSpec.configure do |config|
29
+ def capture(stream)
30
+ begin
31
+ stream = stream.to_s
32
+ eval "$#{stream} = StringIO.new"
33
+ yield
34
+ result = eval("$#{stream}").string
35
+ ensure
36
+ eval("$#{stream} = #{stream.upcase}")
37
+ end
38
+
39
+ result
40
+ end
41
+ alias :silence :capture
42
+
43
+ def chdir(dir, o={}, &blk)
44
+ begin
45
+ cwd = Dir.pwd
46
+ Dir.chdir(dir)
47
+ ensure
48
+ Dir.chdir(cwd)
49
+ if o[:empty]
50
+ FileUtils.rm_r Dir.entries(dir).tap{|v| v.delete("."); v.delete(".."); v.delete(".gitkeep")}
51
+ end
52
+ end
53
+ end
54
+
55
+ end
56
+
57
+ module Kernel
58
+ private
59
+
60
+ def xdescribe(*args, &blk)
61
+ describe *args do
62
+ pending "xxxxxxxxx"
63
+ end
64
+ end
65
+
66
+ def xcontext(*args, &blk)
67
+ context *args do
68
+ pending "xxxxxxxxx"
69
+ end
70
+ end
71
+
72
+ def xit(*args, &blk)
73
+ it *args do
74
+ pending "xxxxxxxx"
75
+ end
76
+ end
77
+ end
78
+
79
+ # vim: ft=ruby
File without changes
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rag
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.1
4
+ version: 1.3.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,27 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-02-03 00:00:00.000000000 Z
12
+ date: 2012-08-12 00:00:00.000000000 Z
13
13
  dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: pd
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: '0'
14
30
  - !ruby/object:Gem::Dependency
15
31
  name: tagen
16
- requirement: &23384860 !ruby/object:Gem::Requirement
32
+ requirement: !ruby/object:Gem::Requirement
17
33
  none: false
18
34
  requirements:
19
35
  - - ~>
@@ -21,32 +37,63 @@ dependencies:
21
37
  version: 1.1.0
22
38
  type: :runtime
23
39
  prerelease: false
24
- version_requirements: *23384860
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ~>
44
+ - !ruby/object:Gem::Version
45
+ version: 1.1.0
25
46
  - !ruby/object:Gem::Dependency
26
47
  name: pa
27
- requirement: &23383320 !ruby/object:Gem::Requirement
48
+ requirement: !ruby/object:Gem::Requirement
28
49
  none: false
29
50
  requirements:
30
51
  - - ~>
31
52
  - !ruby/object:Gem::Version
32
- version: 1.2.0
53
+ version: 1.3.0
33
54
  type: :runtime
34
55
  prerelease: false
35
- version_requirements: *23383320
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ~>
60
+ - !ruby/object:Gem::Version
61
+ version: 1.3.0
36
62
  - !ruby/object:Gem::Dependency
37
63
  name: optimism
38
- requirement: &23381740 !ruby/object:Gem::Requirement
64
+ requirement: !ruby/object:Gem::Requirement
39
65
  none: false
40
66
  requirements:
41
67
  - - ~>
42
68
  - !ruby/object:Gem::Version
43
- version: 3.1.0
69
+ version: 3.2.0
44
70
  type: :runtime
45
71
  prerelease: false
46
- version_requirements: *23381740
72
+ version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ~>
76
+ - !ruby/object:Gem::Version
77
+ version: 3.2.0
47
78
  - !ruby/object:Gem::Dependency
48
79
  name: thor
49
- requirement: &23380600 !ruby/object:Gem::Requirement
80
+ requirement: !ruby/object:Gem::Requirement
81
+ none: false
82
+ requirements:
83
+ - - ! '>='
84
+ - !ruby/object:Gem::Version
85
+ version: '0'
86
+ type: :runtime
87
+ prerelease: false
88
+ version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
90
+ requirements:
91
+ - - ! '>='
92
+ - !ruby/object:Gem::Version
93
+ version: '0'
94
+ - !ruby/object:Gem::Dependency
95
+ name: tilt
96
+ requirement: !ruby/object:Gem::Requirement
50
97
  none: false
51
98
  requirements:
52
99
  - - ! '>='
@@ -54,7 +101,12 @@ dependencies:
54
101
  version: '0'
55
102
  type: :runtime
56
103
  prerelease: false
57
- version_requirements: *23380600
104
+ version_requirements: !ruby/object:Gem::Requirement
105
+ none: false
106
+ requirements:
107
+ - - ! '>='
108
+ - !ruby/object:Gem::Version
109
+ version: '0'
58
110
  description: ! "A project helper, include create, develop, test, release helper. \n"
59
111
  email: ywzhaifei@gmail.com
60
112
  executables:
@@ -64,42 +116,46 @@ extra_rdoc_files: []
64
116
  files:
65
117
  - .gitignore
66
118
  - .rspec
119
+ - .travis.yml
67
120
  - .yardopts
68
121
  - Gemfile
69
122
  - Gemfile.lock
70
123
  - README.md
71
124
  - Rakefile
125
+ - bin/1rag
72
126
  - bin/rag
73
127
  - data/header/apache.erb
74
128
  - data/header/common.erb
75
129
  - data/header/gpl.erb
76
130
  - data/header/lgpl.erb
77
- - data/home_config/_ragrc
78
131
  - data/license/apache
79
132
  - data/license/bsd.erb
80
133
  - data/license/gpl
81
134
  - data/license/lgpl
82
135
  - data/license/mit.erb
83
- - data/template/test/file_name.erb
84
136
  - docs/OverView.md
137
+ - hello/hello
85
138
  - lib/rag.rb
86
- - lib/rag/doc.rb
87
- - lib/rag/gem.rb
139
+ - lib/rag/aur.rb
140
+ - lib/rag/ext.rb
88
141
  - lib/rag/new.rb
89
142
  - lib/rag/rc.rb
90
- - lib/rag/test.rb
143
+ - lib/rag/ruby.rb
144
+ - lib/rag/ruby/doc.rb
145
+ - lib/rag/ruby/gem.rb
146
+ - lib/rag/ruby/test.rb
91
147
  - lib/rag/ui.rb
92
148
  - lib/rag/util.rb
93
149
  - lib/rag/util/erb.rb
94
150
  - lib/rag/version.rb
95
151
  - rag.gemspec
96
152
  - rag.watchr
97
- - spec/data/_rag/default/hello.erb
98
- - spec/data/homerc
99
- - spec/data/systemrc
153
+ - spec/data/home/ruby.app/Buildfile
154
+ - spec/data/home/ruby.app/template/hello.tt
100
155
  - spec/rag/new_spec.rb
101
- - spec/rag/rag_spec.rb
156
+ - spec/rag_spec.rb
102
157
  - spec/spec_helper.rb
158
+ - spec/tmp/.gitkeep
103
159
  - tags
104
160
  homepage: http://github.com/GutenYe/rag
105
161
  licenses: []
@@ -121,7 +177,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
121
177
  version: '0'
122
178
  requirements: []
123
179
  rubyforge_project: xx
124
- rubygems_version: 1.8.11
180
+ rubygems_version: 1.8.24
125
181
  signing_key:
126
182
  specification_version: 3
127
183
  summary: A project helper, include create, developing, testing, release
@@ -1,8 +0,0 @@
1
- author = 'XX'
2
- email = 'XX'
3
- license = 'XX'
4
-
5
- github:
6
- username = 'XX'
7
-
8
- # vim: filetype=ruby
@@ -1 +0,0 @@
1
- <%=author%>
@@ -1,21 +0,0 @@
1
- module Ragen
2
- class Test < Thor
3
- default_task :default
4
-
5
- desc "default", "default", hide: true
6
- def default
7
- system "watchr #{Rag::Rc.o.project}.watchr", :verbose
8
- end
9
-
10
- desc "test [all]", "auto test with watchr"
11
- def all
12
- system "rspec --color spec", :verbose
13
- end
14
-
15
- end
16
- end
17
-
18
- class Rag < Thor
19
- desc "test", "run test"
20
- subcommand "test", Ragen::Test
21
- end
@@ -1 +0,0 @@
1
- <%=author%>
@@ -1,8 +0,0 @@
1
- author = 'Test'
2
- email = 'test@test.com'
3
- license = 'TEST-LICENSE'
4
-
5
- github:
6
- username = 'TestYe'
7
-
8
- # vim: ft=ruby
@@ -1,9 +0,0 @@
1
- p:
2
- root = nil
3
- home = Pa.join(ENV['HOME'], '_rag')
4
- homerc = Pa.join(ENV['HOME'], '_ragrc')
5
- apprc = $spec_dir.join('_apprc')
6
- data = $spec_dir.join('data')
7
-
8
-
9
- # vim: filetype=ruby
@@ -1,6 +0,0 @@
1
- require "spec_helper"
2
-
3
- describe Rag do
4
- it "works" do
5
- end
6
- end