andhapp-decoct 1.9.5 → 1.9.6
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/README.markdown +3 -17
- data/VERSION.yml +1 -1
- data/decoct.gemspec +2 -2
- data/lib/dmeta.rb +4 -3
- data/lib/dscript.rb +6 -1
- data/test/ts_script.rb +2 -2
- metadata +4 -3
data/README.markdown
CHANGED
@@ -6,7 +6,7 @@ Decoct is a simple gem that creates a sinatra app directory structure and hooks
|
|
6
6
|
Installing
|
7
7
|
---------
|
8
8
|
|
9
|
-
Install the gem: gem install andhapp-decoct -s http://gems.github.com (on
|
9
|
+
Install the gem: sudo gem install andhapp-decoct -s http://gems.github.com (on Mac)
|
10
10
|
|
11
11
|
Dependencies
|
12
12
|
-----------
|
@@ -15,12 +15,10 @@ The gem depends on the following libraries:
|
|
15
15
|
|
16
16
|
* rspec
|
17
17
|
* ZenTest
|
18
|
-
* growl
|
19
18
|
* redgreen
|
20
19
|
* rcov
|
21
20
|
|
22
|
-
growl is the Mac OS X messaging system and there are a plethora of articles detailing its installation. Google 'growl Mac OS X' and you would
|
23
|
-
|
21
|
+
growl is the Mac OS X messaging system and there are a plethora of articles detailing its installation. Google 'growl Mac OS X' and you would definitely encounter some useful results.
|
24
22
|
|
25
23
|
Usage
|
26
24
|
----
|
@@ -33,16 +31,4 @@ decoct {project-name}
|
|
33
31
|
This would create a sinatra project with all the rspec dependencies. If a directory with the same name exists it will
|
34
32
|
overwrite it. Just go into the directory on your command line and run the following command:
|
35
33
|
|
36
|
-
RSPEC=true autotest
|
37
|
-
|
38
|
-
and finally run the following command:
|
39
|
-
|
40
|
-
autotest
|
41
|
-
|
42
|
-
Issues
|
43
|
-
-----
|
44
|
-
|
45
|
-
I have spotted one existing issue with it and it is documented here:
|
46
|
-
[Decoct - Issue1][issue].
|
47
|
-
|
48
|
-
[issue]: http://github.com/andhapp/decoct/issues
|
34
|
+
RSPEC=true autotest
|
data/VERSION.yml
CHANGED
data/decoct.gemspec
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{decoct}
|
5
|
-
s.version = "1.9.
|
5
|
+
s.version = "1.9.6"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = ["Anuj Dutta"]
|
9
|
-
s.date = %q{2009-07-
|
9
|
+
s.date = %q{2009-07-29}
|
10
10
|
s.default_executable = %q{decoct}
|
11
11
|
s.description = %q{Sinatra Rspec project generator}
|
12
12
|
s.email = %q{anuj@andhapp.com}
|
data/lib/dmeta.rb
CHANGED
@@ -19,10 +19,11 @@ module Decoct
|
|
19
19
|
if name.is_a?(Array)
|
20
20
|
name.map {|x| create_dir(x)}
|
21
21
|
else
|
22
|
-
attr_reader name
|
22
|
+
#attr_reader name - tests do not break on commenting this out
|
23
23
|
define_method("create_#{name}") do
|
24
|
-
path = "#{app_name}#{File::SEPARATOR}#{name}"
|
25
|
-
Dir.mkdir(path) if !test(?d, path)
|
24
|
+
path = "#{@app_name}#{File::SEPARATOR}#{name}"
|
25
|
+
Dir.mkdir(path) if !test(?d, path)
|
26
|
+
puts "Created #{path}"
|
26
27
|
end
|
27
28
|
end
|
28
29
|
end
|
data/lib/dscript.rb
CHANGED
@@ -30,26 +30,31 @@ module Decoct
|
|
30
30
|
|
31
31
|
def create_app_dir
|
32
32
|
Dir.mkdir("#{app_name}") if !test(?d, "#{app_name}")
|
33
|
+
puts "Created application directory - #{app_name}"
|
33
34
|
end
|
34
35
|
|
35
36
|
def copy_autotest_file
|
36
|
-
copy_file(".autotest", "#{app_name}#{File::SEPARATOR}.autotest")
|
37
|
+
copy_file(".autotest", "#{app_name}#{File::SEPARATOR}.autotest")
|
38
|
+
puts "Copied autotest files"
|
37
39
|
end
|
38
40
|
|
39
41
|
def copy_rspec_files
|
40
42
|
from = ["spec#{File::SEPARATOR}spec.opts", "spec#{File::SEPARATOR}rcov.opts", "spec#{File::SEPARATOR}spec_helper.rb", "spec#{File::SEPARATOR}app_spec.rb"]
|
41
43
|
to = ["#{app_name}#{File::SEPARATOR}spec#{File::SEPARATOR}spec.opts", "#{app_name}#{File::SEPARATOR}spec#{File::SEPARATOR}rcov.opts", "#{app_name}#{File::SEPARATOR}spec#{File::SEPARATOR}spec_helper.rb", "#{app_name}#{File::SEPARATOR}spec#{File::SEPARATOR}#{app_name}_spec.rb"]
|
42
44
|
copy_file(from, to)
|
45
|
+
puts "Copied rspec files"
|
43
46
|
end
|
44
47
|
|
45
48
|
def copy_app_file
|
46
49
|
copy_file("generic_app.rb", "#{app_name}#{File::SEPARATOR}#{app_name}.rb")
|
50
|
+
puts "Copied application file"
|
47
51
|
end
|
48
52
|
|
49
53
|
def copy_icons
|
50
54
|
from = ["icons#{File::SEPARATOR}fail.png", "icons#{File::SEPARATOR}ok.png"]
|
51
55
|
to = [ "#{app_name}#{File::SEPARATOR}icons#{File::SEPARATOR}fail.png", "#{app_name}#{File::SEPARATOR}icons#{File::SEPARATOR}ok.png"]
|
52
56
|
copy_file(from, to)
|
57
|
+
puts "Copied icons"
|
53
58
|
end
|
54
59
|
|
55
60
|
end
|
data/test/ts_script.rb
CHANGED
@@ -6,7 +6,7 @@ class TestScript < Test::Unit::TestCase
|
|
6
6
|
def dir_in_app_folder
|
7
7
|
Dir.entries("epoxys").each {|x| [] << x if !File.directory?(x)}
|
8
8
|
end
|
9
|
-
|
9
|
+
|
10
10
|
context "creating a brand new sinatra-rspec app" do
|
11
11
|
setup do
|
12
12
|
@script = Decoct::Dscript.new('epoxys')
|
@@ -79,5 +79,5 @@ class TestScript < Test::Unit::TestCase
|
|
79
79
|
end
|
80
80
|
|
81
81
|
end
|
82
|
-
|
82
|
+
|
83
83
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: andhapp-decoct
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.9.
|
4
|
+
version: 1.9.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Anuj Dutta
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-07-
|
12
|
+
date: 2009-07-29 00:00:00 -07:00
|
13
13
|
default_executable: decoct
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -80,6 +80,7 @@ files:
|
|
80
80
|
- test/ts_script.rb
|
81
81
|
has_rdoc: false
|
82
82
|
homepage: http://github.com/andhapp/decoct
|
83
|
+
licenses:
|
83
84
|
post_install_message:
|
84
85
|
rdoc_options:
|
85
86
|
- --charset=UTF-8
|
@@ -100,7 +101,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
100
101
|
requirements: []
|
101
102
|
|
102
103
|
rubyforge_project:
|
103
|
-
rubygems_version: 1.
|
104
|
+
rubygems_version: 1.3.5
|
104
105
|
signing_key:
|
105
106
|
specification_version: 3
|
106
107
|
summary: Its a simple gem which creates a project structure for sinatra to work with rspec, ZenTest, Growl, RedGreen, Rcov
|