enginex 0.7.2 → 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +8 -0
- data/Gemfile.lock +126 -0
- data/README.rdoc +3 -1
- data/Rakefile +2 -2
- data/lib/enginex.rb +2 -2
- data/lib/templates/gitignore +3 -3
- data/lib/templates/root/Gemfile.tt +6 -7
- data/lib/templates/root/Rakefile.tt +2 -2
- data/lib/templates/spec/spec_helper.rb +3 -3
- data/test/enginex_test.rb +6 -2
- metadata +9 -8
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,126 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
enginex (0.8.0)
|
5
|
+
rails (~> 3.0.3)
|
6
|
+
rake (~> 0.8)
|
7
|
+
thor (~> 0.14)
|
8
|
+
|
9
|
+
GEM
|
10
|
+
remote: http://rubygems.org/
|
11
|
+
specs:
|
12
|
+
abstract (1.0.0)
|
13
|
+
actionmailer (3.0.3)
|
14
|
+
actionpack (= 3.0.3)
|
15
|
+
mail (~> 2.2.9)
|
16
|
+
actionpack (3.0.3)
|
17
|
+
activemodel (= 3.0.3)
|
18
|
+
activesupport (= 3.0.3)
|
19
|
+
builder (~> 2.1.2)
|
20
|
+
erubis (~> 2.6.6)
|
21
|
+
i18n (~> 0.4)
|
22
|
+
rack (~> 1.2.1)
|
23
|
+
rack-mount (~> 0.6.13)
|
24
|
+
rack-test (~> 0.5.6)
|
25
|
+
tzinfo (~> 0.3.23)
|
26
|
+
activemodel (3.0.3)
|
27
|
+
activesupport (= 3.0.3)
|
28
|
+
builder (~> 2.1.2)
|
29
|
+
i18n (~> 0.4)
|
30
|
+
activerecord (3.0.3)
|
31
|
+
activemodel (= 3.0.3)
|
32
|
+
activesupport (= 3.0.3)
|
33
|
+
arel (~> 2.0.2)
|
34
|
+
tzinfo (~> 0.3.23)
|
35
|
+
activeresource (3.0.3)
|
36
|
+
activemodel (= 3.0.3)
|
37
|
+
activesupport (= 3.0.3)
|
38
|
+
activesupport (3.0.3)
|
39
|
+
arel (2.0.6)
|
40
|
+
builder (2.1.2)
|
41
|
+
capybara (0.4.0)
|
42
|
+
celerity (>= 0.7.9)
|
43
|
+
culerity (>= 0.2.4)
|
44
|
+
mime-types (>= 1.16)
|
45
|
+
nokogiri (>= 1.3.3)
|
46
|
+
rack (>= 1.0.0)
|
47
|
+
rack-test (>= 0.5.4)
|
48
|
+
selenium-webdriver (>= 0.0.27)
|
49
|
+
xpath (~> 0.1.2)
|
50
|
+
celerity (0.8.5)
|
51
|
+
childprocess (0.1.4)
|
52
|
+
ffi (~> 0.6.3)
|
53
|
+
culerity (0.2.12)
|
54
|
+
diff-lcs (1.1.2)
|
55
|
+
erubis (2.6.6)
|
56
|
+
abstract (>= 1.0.0)
|
57
|
+
ffi (0.6.3)
|
58
|
+
rake (>= 0.8.7)
|
59
|
+
i18n (0.5.0)
|
60
|
+
json_pure (1.4.6)
|
61
|
+
mail (2.2.12)
|
62
|
+
activesupport (>= 2.3.6)
|
63
|
+
i18n (>= 0.4.0)
|
64
|
+
mime-types (~> 1.16)
|
65
|
+
treetop (~> 1.4.8)
|
66
|
+
mime-types (1.16)
|
67
|
+
nokogiri (1.4.4)
|
68
|
+
polyglot (0.3.1)
|
69
|
+
rack (1.2.1)
|
70
|
+
rack-mount (0.6.13)
|
71
|
+
rack (>= 1.0.0)
|
72
|
+
rack-test (0.5.6)
|
73
|
+
rack (>= 1.0)
|
74
|
+
rails (3.0.3)
|
75
|
+
actionmailer (= 3.0.3)
|
76
|
+
actionpack (= 3.0.3)
|
77
|
+
activerecord (= 3.0.3)
|
78
|
+
activeresource (= 3.0.3)
|
79
|
+
activesupport (= 3.0.3)
|
80
|
+
bundler (~> 1.0)
|
81
|
+
railties (= 3.0.3)
|
82
|
+
railties (3.0.3)
|
83
|
+
actionpack (= 3.0.3)
|
84
|
+
activesupport (= 3.0.3)
|
85
|
+
rake (>= 0.8.7)
|
86
|
+
thor (~> 0.14.4)
|
87
|
+
rake (0.8.7)
|
88
|
+
rspec (2.2.0)
|
89
|
+
rspec-core (~> 2.2)
|
90
|
+
rspec-expectations (~> 2.2)
|
91
|
+
rspec-mocks (~> 2.2)
|
92
|
+
rspec-core (2.2.1)
|
93
|
+
rspec-expectations (2.2.0)
|
94
|
+
diff-lcs (~> 1.1.2)
|
95
|
+
rspec-mocks (2.2.0)
|
96
|
+
rspec-rails (2.2.1)
|
97
|
+
actionpack (~> 3.0)
|
98
|
+
activesupport (~> 3.0)
|
99
|
+
railties (~> 3.0)
|
100
|
+
rspec (~> 2.2.0)
|
101
|
+
rubyzip (0.9.4)
|
102
|
+
selenium-webdriver (0.1.1)
|
103
|
+
childprocess (= 0.1.4)
|
104
|
+
ffi (~> 0.6.3)
|
105
|
+
json_pure
|
106
|
+
rubyzip
|
107
|
+
sqlite3-ruby (1.3.2)
|
108
|
+
thor (0.14.6)
|
109
|
+
treetop (1.4.9)
|
110
|
+
polyglot (>= 0.3.1)
|
111
|
+
tzinfo (0.3.23)
|
112
|
+
xpath (0.1.2)
|
113
|
+
nokogiri (~> 1.3)
|
114
|
+
|
115
|
+
PLATFORMS
|
116
|
+
ruby
|
117
|
+
|
118
|
+
DEPENDENCIES
|
119
|
+
capybara (~> 0.4)
|
120
|
+
enginex!
|
121
|
+
rails (~> 3.0.3)
|
122
|
+
rake (~> 0.8)
|
123
|
+
rspec (~> 2.0)
|
124
|
+
rspec-rails (~> 2.0)
|
125
|
+
sqlite3-ruby
|
126
|
+
thor (~> 0.14)
|
data/README.rdoc
CHANGED
@@ -2,7 +2,9 @@
|
|
2
2
|
|
3
3
|
Enginex is a command line tool which creates a Rails 3 Engine with Rakefile, Gemfile and a ready to run test suite on top of a vendored Rails application.
|
4
4
|
|
5
|
-
Enginex
|
5
|
+
Enginex was created for the purpose of and used in José Valim's book: Crafting Rails Applications available at http://www.pragprog.com/titles/jvrails/crafting-rails-applications .
|
6
|
+
|
7
|
+
Engines will be available on Rails 3.1 as the new plugin generator and invoked as: "rails plugin new". The port to Rails was made by Piotr Sarnacki.
|
6
8
|
|
7
9
|
== Usage
|
8
10
|
|
data/Rakefile
CHANGED
@@ -22,7 +22,7 @@ begin
|
|
22
22
|
require 'jeweler'
|
23
23
|
Jeweler::Tasks.new do |s|
|
24
24
|
s.name = "enginex"
|
25
|
-
s.version = "0.
|
25
|
+
s.version = "0.8.0"
|
26
26
|
s.summary = "Creates a Rails 3 engine with Rakefile, Gemfile and running tests"
|
27
27
|
s.email = "jose.valim@plataformatec.com.br"
|
28
28
|
s.homepage = "http://github.com/josevalim/enginex"
|
@@ -31,7 +31,7 @@ begin
|
|
31
31
|
s.files = FileList["[A-Z]*", "lib/**/*"]
|
32
32
|
s.bindir = "bin"
|
33
33
|
s.executables = %w(enginex)
|
34
|
-
s.add_dependency("thor", "~> 0.14
|
34
|
+
s.add_dependency("thor", "~> 0.14")
|
35
35
|
s.add_dependency("rails", "~> 3.0.3")
|
36
36
|
s.add_dependency("rake", "~> 0.8")
|
37
37
|
end
|
data/lib/enginex.rb
CHANGED
data/lib/templates/gitignore
CHANGED
@@ -3,11 +3,10 @@ source "http://rubygems.org"
|
|
3
3
|
gem "rails", "<%= ActiveSupport::VERSION::STRING %>"
|
4
4
|
gem "capybara", ">= 0.4.0"
|
5
5
|
gem "sqlite3-ruby", :require => "sqlite3"
|
6
|
-
|
7
|
-
platforms :mri_18 do
|
8
|
-
gem "ruby-debug", ">= 0.10.3"
|
9
|
-
end
|
10
|
-
|
11
|
-
<% if rspec? %>
|
6
|
+
<%- if rspec? %>
|
12
7
|
gem "rspec-rails", ">= 2.0.0.beta"
|
13
|
-
<% end
|
8
|
+
<% end -%>
|
9
|
+
|
10
|
+
# To use debugger (ruby-debug for Ruby 1.8.7+, ruby-debug19 for Ruby 1.9.2+)
|
11
|
+
# gem 'ruby-debug'
|
12
|
+
# gem 'ruby-debug19'
|
@@ -13,7 +13,7 @@ require 'rake/rdoctask'
|
|
13
13
|
require 'rspec/core'
|
14
14
|
require 'rspec/core/rake_task'
|
15
15
|
|
16
|
-
|
16
|
+
RSpec::Core::RakeTask.new(:spec)
|
17
17
|
<% else -%>
|
18
18
|
require 'rake/testtask'
|
19
19
|
|
@@ -33,4 +33,4 @@ Rake::RDocTask.new(:rdoc) do |rdoc|
|
|
33
33
|
rdoc.options << '--line-numbers' << '--inline-source'
|
34
34
|
rdoc.rdoc_files.include('README.rdoc')
|
35
35
|
rdoc.rdoc_files.include('lib/**/*.rb')
|
36
|
-
end
|
36
|
+
end
|
@@ -22,11 +22,11 @@ ActiveRecord::Migrator.migrate File.expand_path("../dummy/db/migrate/", __FILE__
|
|
22
22
|
# Load support files
|
23
23
|
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
|
24
24
|
|
25
|
-
|
26
|
-
# Remove this line if you don't want
|
25
|
+
RSpec.configure do |config|
|
26
|
+
# Remove this line if you don't want RSpec's should and should_not
|
27
27
|
# methods or matchers
|
28
28
|
require 'rspec/expectations'
|
29
|
-
config.include
|
29
|
+
config.include RSpec::Matchers
|
30
30
|
|
31
31
|
# == Mock Framework
|
32
32
|
config.mock_with :rspec
|
data/test/enginex_test.rb
CHANGED
@@ -6,7 +6,7 @@ class EnginexTest < ActiveSupport::TestCase
|
|
6
6
|
# Root
|
7
7
|
assert_file "Rakefile"
|
8
8
|
assert_file "Gemfile", /gem "rails"/, /gem "capybara"/
|
9
|
-
assert_file ".gitignore", /\.bundle
|
9
|
+
assert_file ".gitignore", /\.bundle/
|
10
10
|
|
11
11
|
# Lib
|
12
12
|
assert_file "lib/demo_engine.rb", /module DemoEngine\nend/
|
@@ -26,6 +26,8 @@ class EnginexTest < ActiveSupport::TestCase
|
|
26
26
|
assert_file "test/demo_engine_test.rb", /assert_kind_of Module, DemoEngine/
|
27
27
|
assert_file "test/integration/navigation_test.rb", /assert_kind_of Dummy::Application, Rails.application/
|
28
28
|
assert_file "test/support/integration_case.rb", /class ActiveSupport::IntegrationCase/
|
29
|
+
|
30
|
+
assert_file ".gitignore", /test\/dummy\/db\/\*\.sqlite3/
|
29
31
|
end
|
30
32
|
end
|
31
33
|
|
@@ -37,6 +39,8 @@ class EnginexTest < ActiveSupport::TestCase
|
|
37
39
|
|
38
40
|
assert_file "spec/demo_engine_spec.rb", /DemoEngine.should be_a\(Module\)/
|
39
41
|
assert_file "spec/integration/navigation_spec.rb", /Rails.application.should be_a\(Dummy::Application\)/
|
42
|
+
|
43
|
+
assert_file ".gitignore", /spec\/dummy\/db\/\*\.sqlite3/
|
40
44
|
end
|
41
45
|
end
|
42
46
|
|
@@ -58,4 +62,4 @@ class EnginexTest < ActiveSupport::TestCase
|
|
58
62
|
assert_match /2 examples, 0 failures/, execute("rake spec")
|
59
63
|
end
|
60
64
|
end
|
61
|
-
end
|
65
|
+
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: enginex
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 63
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
-
|
10
|
-
version: 0.
|
8
|
+
- 8
|
9
|
+
- 0
|
10
|
+
version: 0.8.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- "Jos\xC3\xA9 Valim"
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-11
|
18
|
+
date: 2010-12-11 00:00:00 +01:00
|
19
19
|
default_executable: enginex
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -26,12 +26,11 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - ~>
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
hash:
|
29
|
+
hash: 23
|
30
30
|
segments:
|
31
31
|
- 0
|
32
32
|
- 14
|
33
|
-
|
34
|
-
version: 0.14.0
|
33
|
+
version: "0.14"
|
35
34
|
type: :runtime
|
36
35
|
version_requirements: *id001
|
37
36
|
- !ruby/object:Gem::Dependency
|
@@ -74,6 +73,8 @@ extensions: []
|
|
74
73
|
extra_rdoc_files:
|
75
74
|
- README.rdoc
|
76
75
|
files:
|
76
|
+
- Gemfile
|
77
|
+
- Gemfile.lock
|
77
78
|
- MIT-LICENSE
|
78
79
|
- README.rdoc
|
79
80
|
- Rakefile
|