cukemin 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +3 -0
- data/README.md +13 -0
- data/Rakefile +42 -0
- data/cukemin.gemspec +61 -0
- data/generators/cukemin/USAGE +1 -0
- data/generators/cukemin/cukemin_generator.rb +73 -0
- data/generators/cukemin/templates/controller.rb +37 -0
- data/generators/cukemin/templates/feature.feature +33 -0
- data/generators/cukemin/templates/views/_form.html.erb +8 -0
- data/generators/cukemin/templates/views/edit.html.erb +3 -0
- data/generators/cukemin/templates/views/index.html.erb +33 -0
- data/generators/cukemin/templates/views/new.html.erb +3 -0
- data/rails/init.rb +0 -0
- data/spec/blueprints.rb +6 -0
- data/spec/cukemin_generator_spec.rb +104 -0
- data/spec/database.yml +21 -0
- data/spec/debug.log +5627 -0
- data/spec/schema.rb +7 -0
- data/spec/spec_helper.rb +42 -0
- metadata +88 -0
data/spec/schema.rb
ADDED
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,42 @@
|
|
1
|
+
begin
|
2
|
+
require File.dirname(__FILE__) + '/../../../../spec/spec_helper'
|
3
|
+
rescue LoadError
|
4
|
+
puts "You need to install rspec in your base app"
|
5
|
+
exit
|
6
|
+
end
|
7
|
+
|
8
|
+
require File.dirname(__FILE__) + '/blueprints'
|
9
|
+
|
10
|
+
plugin_spec_dir = File.dirname(__FILE__)
|
11
|
+
ActiveRecord::Base.logger = Logger.new(plugin_spec_dir + "/debug.log")
|
12
|
+
|
13
|
+
def load_schema
|
14
|
+
config = YAML::load(IO.read(File.dirname(__FILE__) + '/database.yml'))
|
15
|
+
ActiveRecord::Base.logger = Logger.new(File.dirname(__FILE__) + "/debug.log")
|
16
|
+
|
17
|
+
db_adapter = ENV['DB']
|
18
|
+
|
19
|
+
# no db passed, try one of these fine config-free DBs before bombing.
|
20
|
+
db_adapter ||=
|
21
|
+
begin
|
22
|
+
require 'rubygems'
|
23
|
+
require 'sqlite'
|
24
|
+
'sqlite'
|
25
|
+
rescue MissingSourceFile
|
26
|
+
begin
|
27
|
+
require 'sqlite3'
|
28
|
+
'sqlite3'
|
29
|
+
rescue MissingSourceFile
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
if db_adapter.nil?
|
34
|
+
raise "No DB Adapter selected. Pass the DB= option to pick one, or install Sqlite or Sqlite3."
|
35
|
+
end
|
36
|
+
|
37
|
+
ActiveRecord::Base.establish_connection(config[db_adapter])
|
38
|
+
load(File.dirname(__FILE__) + "/schema.rb")
|
39
|
+
require File.dirname(__FILE__) + '/../rails/init.rb'
|
40
|
+
end
|
41
|
+
|
42
|
+
load_schema
|
metadata
ADDED
@@ -0,0 +1,88 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: cukemin
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 27
|
5
|
+
prerelease: false
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 1
|
9
|
+
- 0
|
10
|
+
version: 0.1.0
|
11
|
+
platform: ruby
|
12
|
+
authors:
|
13
|
+
- Paul Campbell
|
14
|
+
autorequire:
|
15
|
+
bindir: bin
|
16
|
+
cert_chain: []
|
17
|
+
|
18
|
+
date: 2010-05-24 00:00:00 +01:00
|
19
|
+
default_executable:
|
20
|
+
dependencies: []
|
21
|
+
|
22
|
+
description:
|
23
|
+
email: paul@rslw.com
|
24
|
+
executables: []
|
25
|
+
|
26
|
+
extensions: []
|
27
|
+
|
28
|
+
extra_rdoc_files:
|
29
|
+
- README.md
|
30
|
+
files:
|
31
|
+
- CHANGELOG
|
32
|
+
- README.md
|
33
|
+
- Rakefile
|
34
|
+
- cukemin.gemspec
|
35
|
+
- generators/cukemin/USAGE
|
36
|
+
- generators/cukemin/cukemin_generator.rb
|
37
|
+
- generators/cukemin/templates/controller.rb
|
38
|
+
- generators/cukemin/templates/feature.feature
|
39
|
+
- generators/cukemin/templates/views/_form.html.erb
|
40
|
+
- generators/cukemin/templates/views/edit.html.erb
|
41
|
+
- generators/cukemin/templates/views/index.html.erb
|
42
|
+
- generators/cukemin/templates/views/new.html.erb
|
43
|
+
- rails/init.rb
|
44
|
+
- spec/blueprints.rb
|
45
|
+
- spec/cukemin_generator_spec.rb
|
46
|
+
- spec/database.yml
|
47
|
+
- spec/debug.log
|
48
|
+
- spec/schema.rb
|
49
|
+
- spec/spec_helper.rb
|
50
|
+
has_rdoc: false
|
51
|
+
homepage: http://www.github.com/paulca/cukemin
|
52
|
+
licenses: []
|
53
|
+
|
54
|
+
post_install_message:
|
55
|
+
rdoc_options:
|
56
|
+
- --charset=UTF-8
|
57
|
+
require_paths:
|
58
|
+
- lib
|
59
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
60
|
+
none: false
|
61
|
+
requirements:
|
62
|
+
- - ">="
|
63
|
+
- !ruby/object:Gem::Version
|
64
|
+
hash: 3
|
65
|
+
segments:
|
66
|
+
- 0
|
67
|
+
version: "0"
|
68
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
69
|
+
none: false
|
70
|
+
requirements:
|
71
|
+
- - ">="
|
72
|
+
- !ruby/object:Gem::Version
|
73
|
+
hash: 3
|
74
|
+
segments:
|
75
|
+
- 0
|
76
|
+
version: "0"
|
77
|
+
requirements: []
|
78
|
+
|
79
|
+
rubyforge_project:
|
80
|
+
rubygems_version: 1.3.7
|
81
|
+
signing_key:
|
82
|
+
specification_version: 3
|
83
|
+
summary: Simple admin controllers and views, with cucumber features
|
84
|
+
test_files:
|
85
|
+
- spec/blueprints.rb
|
86
|
+
- spec/cukemin_generator_spec.rb
|
87
|
+
- spec/schema.rb
|
88
|
+
- spec/spec_helper.rb
|