decko 0.9.3 → 0.11.0
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.
- checksums.yaml +4 -4
- data/lib/decko.rb +0 -15
- data/lib/decko/application.rb +1 -6
- data/lib/decko/commands/application.rb +2 -2
- data/lib/decko/commands/cucumber_command.rb +4 -7
- data/lib/decko/commands/rspec_command.rb +4 -6
- data/lib/decko/commands/rspec_command/parser.rb +48 -36
- data/lib/decko/config/environments/cypress.rb +0 -2
- data/lib/decko/config/environments/development.rb +9 -20
- data/lib/decko/config/environments/production.rb +3 -0
- data/lib/decko/config/environments/test.rb +1 -8
- data/lib/decko/engine.rb +0 -1
- data/lib/decko/generators/{decko → deck}/USAGE +0 -0
- data/lib/decko/generators/deck/deck_generator.rb +132 -0
- data/lib/decko/generators/deck/deck_generator/deck_helper.rb +110 -0
- data/lib/decko/generators/deck/deck_generator/interactive.rb +120 -0
- data/lib/decko/generators/deck/deck_generator/rails_overrides.rb +54 -0
- data/lib/decko/generators/deck/templates/Gemfile.erb +56 -0
- data/lib/decko/generators/{decko/templates/Rakefile → deck/templates/Rakefile.erb} +0 -0
- data/lib/decko/generators/{decko/templates/bin/spring → deck/templates/bin/spring.erb} +3 -1
- data/lib/decko/generators/{decko/templates/config.ru → deck/templates/config.ru.erb} +0 -0
- data/lib/decko/generators/{decko/templates/config/application.rb → deck/templates/config/application.rb.erb} +38 -17
- data/lib/decko/generators/{decko/templates/config/boot.rb → deck/templates/config/boot.rb.erb} +1 -5
- data/lib/decko/generators/deck/templates/config/cucumber.yml +1 -0
- data/lib/decko/generators/{decko → deck}/templates/config/databases/frontbase.yml +0 -0
- data/lib/decko/generators/{decko → deck}/templates/config/databases/ibm_db.yml +0 -0
- data/lib/decko/generators/{decko → deck}/templates/config/databases/jdbc.yml +0 -0
- data/lib/decko/generators/{decko → deck}/templates/config/databases/jdbcmysql.yml +0 -0
- data/lib/decko/generators/{decko → deck}/templates/config/databases/jdbcpostgresql.yml +0 -0
- data/lib/decko/generators/{decko → deck}/templates/config/databases/jdbcsqlite3.yml +0 -0
- data/lib/decko/generators/{decko → deck}/templates/config/databases/mysql.yml +0 -0
- data/lib/decko/generators/{decko → deck}/templates/config/databases/oracle.yml +0 -0
- data/lib/decko/generators/{decko → deck}/templates/config/databases/postgresql.yml +0 -0
- data/lib/decko/generators/{decko → deck}/templates/config/databases/sqlite3.yml +0 -0
- data/lib/decko/generators/{decko → deck}/templates/config/deck.yml +0 -0
- data/lib/decko/generators/{decko/templates/config/environment.rb → deck/templates/config/environment.rb.erb} +2 -2
- data/lib/decko/generators/{decko/templates/config/initializers/cypress_on_rails.rb → deck/templates/config/initializers/cypress.rb} +2 -0
- data/lib/decko/generators/{decko → deck}/templates/config/puma.rb +5 -5
- data/lib/decko/generators/{decko/templates/config/routes.erb → deck/templates/config/routes.rb.erb} +1 -1
- data/lib/decko/generators/{decko → deck}/templates/gitignore +0 -0
- data/lib/decko/generators/deck/templates/pryrc +6 -0
- data/lib/decko/generators/{decko → deck}/templates/public/files/htaccess +0 -0
- data/lib/decko/generators/{decko → deck}/templates/public/robots.txt +2 -1
- data/lib/decko/generators/deck/templates/rspec.erb +6 -0
- data/lib/decko/generators/{decko → deck}/templates/script/decko +2 -1
- data/lib/decko/generators/deck/templates/script/decko_cucumber +8 -0
- data/lib/decko/generators/deck/templates/script/decko_rspec +8 -0
- data/lib/decko/generators/{decko/templates/bin → deck/templates/script}/delayed_job +1 -1
- data/lib/decko/generators/deck/templates/simplecov.rb.erb +34 -0
- data/lib/decko/generators/{decko/templates/spec/javascripts/support/deck_jasmine.yml → deck/templates/spec/javascripts/support/deck_jasmine.yml.erb} +1 -1
- data/lib/decko/generators/{decko/templates/spec/javascripts/support/decko_jasmine.yml → deck/templates/spec/javascripts/support/decko_jasmine.yml.erb} +3 -3
- data/lib/decko/generators/{decko → deck}/templates/spec/spec_helper.rb +0 -0
- data/lib/decko/mods_spec_helper.rb +5 -4
- data/lib/decko/response.rb +7 -2
- data/lib/decko/tasks/decko.rake +1 -30
- data/lib/decko/tasks/decko/docs.rake +26 -0
- data/lib/decko/tasks/decko/tmpsets.rake +25 -0
- metadata +65 -80
- data/GPL +0 -331
- data/LICENSE +0 -16
- data/README.rdoc +0 -151
- data/app/assets/images/body-bg.bmp +0 -0
- data/app/assets/images/body-bg.png +0 -0
- data/app/assets/images/external_link.png +0 -0
- data/app/assets/images/smoothness/animated-overlay.gif +0 -0
- data/app/assets/images/smoothness/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/app/assets/images/smoothness/ui-bg_flat_75_ffffff_40x100.png +0 -0
- data/app/assets/images/smoothness/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
- data/app/assets/images/smoothness/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/app/assets/images/smoothness/ui-bg_glass_75_dadada_1x400.png +0 -0
- data/app/assets/images/smoothness/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
- data/app/assets/images/smoothness/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- data/app/assets/images/smoothness/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- data/app/assets/images/smoothness/ui-icons_222222_256x240.png +0 -0
- data/app/assets/images/smoothness/ui-icons_2e83ff_256x240.png +0 -0
- data/app/assets/images/smoothness/ui-icons_454545_256x240.png +0 -0
- data/app/assets/images/smoothness/ui-icons_888888_256x240.png +0 -0
- data/app/assets/images/smoothness/ui-icons_cd0a0a_256x240.png +0 -0
- data/lib/decko/generators/decko/decko_generator.rb +0 -263
- data/lib/decko/generators/decko/decko_generator/interactive.rb +0 -114
- data/lib/decko/generators/decko/templates/Gemfile +0 -126
- data/lib/decko/generators/decko/templates/config/cucumber.yml +0 -1
- data/lib/decko/generators/decko/templates/config/initializers/cypress_dev.rb +0 -10
- data/lib/decko/generators/decko/templates/rspec +0 -5
- data/lib/decko/generators/decko/templates/simplecov +0 -5
- data/rails/application-routes.rb +0 -3
- data/rails/assets/external_link.png +0 -0
- data/rails/assets/jasmine/404.html +0 -27
- data/rails/assets/jasmine/500.html +0 -28
- data/rails/assets/jasmine/card_form.html +0 -13
- data/rails/assets/jquery.min.map +0 -1
- data/rails/controllers/application_controller.rb +0 -2
- data/rails/controllers/card_controller.rb +0 -152
- data/rails/engine-routes.rb +0 -53
- data/script/autospec +0 -4
- data/script/decko +0 -6
- data/script/rails +0 -6
- data/script/test_filter +0 -25
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,263 +0,0 @@
|
|
|
1
|
-
require "rails/generators/app_base"
|
|
2
|
-
|
|
3
|
-
class DeckoGenerator < Rails::Generators::AppBase
|
|
4
|
-
# class DeckoGenerator < Rails::Generators::AppGenerator
|
|
5
|
-
|
|
6
|
-
source_root File.expand_path("../templates", __FILE__)
|
|
7
|
-
|
|
8
|
-
class_option "mod-dev",
|
|
9
|
-
type: :boolean, aliases: "-m", default: false, group: :runtime,
|
|
10
|
-
desc: "Prepare deck for mod development"
|
|
11
|
-
|
|
12
|
-
class_option "core-dev",
|
|
13
|
-
type: :boolean, aliases: "-c", default: false, group: :runtime,
|
|
14
|
-
desc: "Prepare deck for core development"
|
|
15
|
-
|
|
16
|
-
class_option "gem-path",
|
|
17
|
-
type: :string, aliases: "-g", default: "", group: :runtime,
|
|
18
|
-
desc: "Path to local decko repository " \
|
|
19
|
-
"(Default, use env DECKO_GEM_PATH)"
|
|
20
|
-
|
|
21
|
-
class_option :database,
|
|
22
|
-
type: :string, aliases: "-d", default: "mysql",
|
|
23
|
-
desc: "Preconfigure for selected database " \
|
|
24
|
-
"(options: #{DATABASES.join('/')})"
|
|
25
|
-
|
|
26
|
-
class_option "interactive",
|
|
27
|
-
type: :boolean, aliases: "-i", default: false, group: :runtime,
|
|
28
|
-
desc: "Prompt with dynamic installation options"
|
|
29
|
-
|
|
30
|
-
public_task :set_default_accessors!
|
|
31
|
-
public_task :create_root
|
|
32
|
-
|
|
33
|
-
## should probably eventually use rails-like AppBuilder approach,
|
|
34
|
-
# but this is a first step.
|
|
35
|
-
def dev_setup
|
|
36
|
-
determine_gemfile_gem_path
|
|
37
|
-
@include_jasmine_engine = false
|
|
38
|
-
if options["core-dev"]
|
|
39
|
-
core_dev_setup
|
|
40
|
-
elsif options["mod-dev"]
|
|
41
|
-
mod_dev_setup
|
|
42
|
-
end
|
|
43
|
-
end
|
|
44
|
-
|
|
45
|
-
def rakefile
|
|
46
|
-
template "Rakefile"
|
|
47
|
-
end
|
|
48
|
-
|
|
49
|
-
# def readme
|
|
50
|
-
# copy_file "README", "README.rdoc"
|
|
51
|
-
# end
|
|
52
|
-
|
|
53
|
-
def mod
|
|
54
|
-
empty_directory_with_keep_file "mod"
|
|
55
|
-
end
|
|
56
|
-
|
|
57
|
-
def log
|
|
58
|
-
empty_directory_with_keep_file "log"
|
|
59
|
-
end
|
|
60
|
-
|
|
61
|
-
def files
|
|
62
|
-
empty_directory_with_keep_file "files"
|
|
63
|
-
end
|
|
64
|
-
|
|
65
|
-
def tmp
|
|
66
|
-
empty_directory "tmp"
|
|
67
|
-
end
|
|
68
|
-
|
|
69
|
-
def gemfile
|
|
70
|
-
template "Gemfile"
|
|
71
|
-
end
|
|
72
|
-
|
|
73
|
-
def configru
|
|
74
|
-
template "config.ru"
|
|
75
|
-
end
|
|
76
|
-
|
|
77
|
-
def gitignore
|
|
78
|
-
copy_file "gitignore", ".gitignore"
|
|
79
|
-
end
|
|
80
|
-
|
|
81
|
-
def config
|
|
82
|
-
empty_directory "config"
|
|
83
|
-
|
|
84
|
-
inside "config" do
|
|
85
|
-
template "application.rb"
|
|
86
|
-
template "routes.erb", "routes.rb"
|
|
87
|
-
template "environment.rb"
|
|
88
|
-
template "boot.rb"
|
|
89
|
-
template "databases/#{options[:database]}.yml", "database.yml"
|
|
90
|
-
template "cucumber.yml" if options["core-dev"]
|
|
91
|
-
template "initializers/cypress_on_rails.rb" if options["core-dev"]
|
|
92
|
-
end
|
|
93
|
-
end
|
|
94
|
-
|
|
95
|
-
def public
|
|
96
|
-
empty_directory "public"
|
|
97
|
-
|
|
98
|
-
inside "public" do
|
|
99
|
-
template "robots.txt"
|
|
100
|
-
empty_directory "files"
|
|
101
|
-
|
|
102
|
-
inside "files" do
|
|
103
|
-
template "htaccess", ".htaccess"
|
|
104
|
-
end
|
|
105
|
-
end
|
|
106
|
-
end
|
|
107
|
-
|
|
108
|
-
def script
|
|
109
|
-
directory "script" do |content|
|
|
110
|
-
"#{shebang}\n" + content
|
|
111
|
-
end
|
|
112
|
-
chmod "script", 0755 & ~File.umask, verbose: false
|
|
113
|
-
end
|
|
114
|
-
|
|
115
|
-
public_task :run_bundle
|
|
116
|
-
|
|
117
|
-
def seed_data
|
|
118
|
-
if options["interactive"]
|
|
119
|
-
Interactive.new(options, destination_root).run
|
|
120
|
-
else
|
|
121
|
-
puts "Now:
|
|
122
|
-
1. Run `cd #{File.basename(destination_root)}` to move your new deck directory
|
|
123
|
-
2. Run `decko seed` to seed your database (see db configuration in config/database.yml).
|
|
124
|
-
3. Run `decko server` to start your server"
|
|
125
|
-
end
|
|
126
|
-
end
|
|
127
|
-
|
|
128
|
-
def database_gemfile_entry
|
|
129
|
-
return [] if options[:skip_active_record]
|
|
130
|
-
gem_name, gem_version = gem_for_database
|
|
131
|
-
msg = "Use #{options[:database]} as the database for Active Record"
|
|
132
|
-
GemfileEntry.version gem_name, gem_version, msg
|
|
133
|
-
end
|
|
134
|
-
|
|
135
|
-
def self.banner
|
|
136
|
-
"decko new #{arguments.map(&:usage).join(' ')} [options]"
|
|
137
|
-
end
|
|
138
|
-
|
|
139
|
-
protected
|
|
140
|
-
|
|
141
|
-
def determine_gemfile_gem_path
|
|
142
|
-
# TODO: rename or split, gem_path points to the source repo,
|
|
143
|
-
# card and decko gems are subdirs
|
|
144
|
-
if (env_gem_path = ENV["DECKO_GEM_PATH"]).present?
|
|
145
|
-
@gemfile_gem_path = %q(#{ENV['DECKO_GEM_PATH']})
|
|
146
|
-
@gem_path = env_gem_path
|
|
147
|
-
else
|
|
148
|
-
@gemfile_gem_path = @gem_path = options["gem-path"]
|
|
149
|
-
end
|
|
150
|
-
end
|
|
151
|
-
|
|
152
|
-
def core_dev_setup
|
|
153
|
-
prompt_for_gem_path
|
|
154
|
-
@include_jasmine_engine = true
|
|
155
|
-
@spec_path = @gem_path
|
|
156
|
-
@spec_helper_path = File.join @spec_path, "card", "spec", "spec_helper"
|
|
157
|
-
|
|
158
|
-
# ending slash is important in order to load support and step folders
|
|
159
|
-
@features_path = File.join @gem_path, "decko/features/"
|
|
160
|
-
@simplecov_config = "card_core_dev_simplecov_filters"
|
|
161
|
-
shared_dev_setup
|
|
162
|
-
javascript_spec_setup "decko_jasmine"
|
|
163
|
-
end
|
|
164
|
-
|
|
165
|
-
def prompt_for_gem_path
|
|
166
|
-
return if @gem_path.present?
|
|
167
|
-
@gemfile_gem_path =
|
|
168
|
-
@gem_path = ask("Enter the path to your local decko gem installation: ")
|
|
169
|
-
end
|
|
170
|
-
|
|
171
|
-
def mod_dev_setup
|
|
172
|
-
@spec_path = "mod/"
|
|
173
|
-
@spec_helper_path = "./spec/spec_helper"
|
|
174
|
-
@simplecov_config = "card_simplecov_filters"
|
|
175
|
-
shared_dev_setup
|
|
176
|
-
inside("spec") { template "spec_helper.rb" }
|
|
177
|
-
javascript_spec_setup "deck_jasmine"
|
|
178
|
-
end
|
|
179
|
-
|
|
180
|
-
def javascript_spec_setup jasmine_prefix
|
|
181
|
-
inside "spec" do
|
|
182
|
-
template File.join("javascripts", "support", "#{jasmine_prefix}.yml"),
|
|
183
|
-
File.join("javascripts", "support", "jasmine.yml")
|
|
184
|
-
end
|
|
185
|
-
end
|
|
186
|
-
|
|
187
|
-
def shared_dev_setup
|
|
188
|
-
@cardio_gem_root = File.join @gem_path, "card"
|
|
189
|
-
@decko_gem_root = File.join @gem_path, "decko"
|
|
190
|
-
empty_directory "spec"
|
|
191
|
-
inside "config" do
|
|
192
|
-
template "puma.rb"
|
|
193
|
-
end
|
|
194
|
-
template "rspec", ".rspec"
|
|
195
|
-
template "simplecov", ".simplecov"
|
|
196
|
-
empty_directory "bin"
|
|
197
|
-
inside "bin" do
|
|
198
|
-
template "spring"
|
|
199
|
-
end
|
|
200
|
-
end
|
|
201
|
-
|
|
202
|
-
def mysql_socket
|
|
203
|
-
@mysql_socket ||= [
|
|
204
|
-
"/tmp/mysql.sock", # default
|
|
205
|
-
"/var/run/mysqld/mysqld.sock", # debian/gentoo
|
|
206
|
-
"/var/tmp/mysql.sock", # freebsd
|
|
207
|
-
"/var/lib/mysql/mysql.sock", # fedora
|
|
208
|
-
"/opt/local/lib/mysql/mysql.sock", # fedora
|
|
209
|
-
"/opt/local/var/run/mysqld/mysqld.sock", # mac + darwinports + mysql
|
|
210
|
-
"/opt/local/var/run/mysql4/mysqld.sock", # mac + darwinports + mysql4
|
|
211
|
-
"/opt/local/var/run/mysql5/mysqld.sock", # mac + darwinports + mysql5
|
|
212
|
-
"/opt/lampp/var/mysql/mysql.sock" # xampp for linux
|
|
213
|
-
].find { |f| File.exist?(f) } unless RbConfig::CONFIG["host_os"] =~ /mswin|mingw/
|
|
214
|
-
end
|
|
215
|
-
|
|
216
|
-
### the following is straight from rails and is focused on checking
|
|
217
|
-
# the validity of the app name.needs decko-specific tuning
|
|
218
|
-
|
|
219
|
-
def app_name
|
|
220
|
-
@app_name ||= if defined_app_const_base?
|
|
221
|
-
defined_app_name
|
|
222
|
-
else
|
|
223
|
-
File.basename(destination_root)
|
|
224
|
-
end
|
|
225
|
-
end
|
|
226
|
-
|
|
227
|
-
def defined_app_name
|
|
228
|
-
defined_app_const_base.underscore
|
|
229
|
-
end
|
|
230
|
-
|
|
231
|
-
def defined_app_const_base
|
|
232
|
-
Rails.respond_to?(:application) && defined?(Rails::Application) &&
|
|
233
|
-
Decko.application.is_a?(Rails::Application) &&
|
|
234
|
-
Decko.application.class.name.sub(/::Application$/, "")
|
|
235
|
-
end
|
|
236
|
-
|
|
237
|
-
alias defined_app_const_base? defined_app_const_base
|
|
238
|
-
|
|
239
|
-
def app_const_base
|
|
240
|
-
@app_const_base ||= defined_app_const_base ||
|
|
241
|
-
app_name.gsub(/\W/, "_").squeeze("_").camelize
|
|
242
|
-
end
|
|
243
|
-
|
|
244
|
-
alias camelized app_const_base
|
|
245
|
-
|
|
246
|
-
def app_const
|
|
247
|
-
@app_const ||= "#{app_const_base}::Application"
|
|
248
|
-
end
|
|
249
|
-
|
|
250
|
-
def valid_const?
|
|
251
|
-
if app_const =~ /^\d/
|
|
252
|
-
raise Thor::Error, "Invalid application name #{app_name}. " \
|
|
253
|
-
"Please give a name which does not start with numbers."
|
|
254
|
-
# elsif RESERVED_NAMES.include?(app_name)
|
|
255
|
-
# raise Error, "Invalid application name #{app_name}." \
|
|
256
|
-
# "Please give a name which does not match one of the reserved rails words."
|
|
257
|
-
elsif Object.const_defined?(app_const_base)
|
|
258
|
-
raise Thor::Error, "Invalid application name #{app_name}, " \
|
|
259
|
-
"constant #{app_const_base} is already in use. " \
|
|
260
|
-
"Please choose another application name."
|
|
261
|
-
end
|
|
262
|
-
end
|
|
263
|
-
end
|
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
class DeckoGenerator
|
|
2
|
-
# Guides through the decko deck installation with an interactive menu
|
|
3
|
-
# Offers the possibilitiy to
|
|
4
|
-
# - edit database config
|
|
5
|
-
# - edit application.rb
|
|
6
|
-
# - seed database
|
|
7
|
-
# - run server
|
|
8
|
-
class Interactive
|
|
9
|
-
def initialize options, destination_root
|
|
10
|
-
@dev = options["core-dev"] || options["mod-dev"]
|
|
11
|
-
@destination_root = destination_root
|
|
12
|
-
end
|
|
13
|
-
|
|
14
|
-
def run
|
|
15
|
-
require config_path("application") # need this for Rails.env
|
|
16
|
-
@menu = ActiveSupport::OrderedHash.new
|
|
17
|
-
add_config_options
|
|
18
|
-
add_seed_options
|
|
19
|
-
add_exit_option
|
|
20
|
-
while (answer = ask(build_menu)) != "x"
|
|
21
|
-
if @menu.key? answer
|
|
22
|
-
@menu[answer][:code].call
|
|
23
|
-
else
|
|
24
|
-
puts "invalid choice"
|
|
25
|
-
end
|
|
26
|
-
end
|
|
27
|
-
end
|
|
28
|
-
|
|
29
|
-
private
|
|
30
|
-
|
|
31
|
-
def dev_options?
|
|
32
|
-
@dev
|
|
33
|
-
end
|
|
34
|
-
|
|
35
|
-
def config_path file
|
|
36
|
-
File.join destination_root, "config", file
|
|
37
|
-
end
|
|
38
|
-
|
|
39
|
-
def bundle_exec command, opts={}
|
|
40
|
-
rails_env = "RAILS_ENV=#{opts[:rails_env]}" if opts[:rails_env]
|
|
41
|
-
system "cd #{destination_root} && #{rails_env} bundle exec #{command}"
|
|
42
|
-
end
|
|
43
|
-
|
|
44
|
-
def build_menu
|
|
45
|
-
lines = ["What would you like to do next?"]
|
|
46
|
-
lines += @menu.map { |key, v| build_option key, v[:desc], v[:command] }
|
|
47
|
-
lines << "[#{@menu.keys.join}]"
|
|
48
|
-
"\n#{lines.join("\n")}\n"
|
|
49
|
-
end
|
|
50
|
-
|
|
51
|
-
def build_option key, desc, command
|
|
52
|
-
command &&= " " * (65 - desc.size) + "[" + command + "]"
|
|
53
|
-
" #{key} - #{desc}#{command if command}"
|
|
54
|
-
end
|
|
55
|
-
|
|
56
|
-
def add_config_options
|
|
57
|
-
@menu["d"] = {
|
|
58
|
-
desc: "edit database configuration file",
|
|
59
|
-
command: "nano config/database.yml",
|
|
60
|
-
code: proc { system "nano #{config_path 'database.yml'}" }
|
|
61
|
-
}
|
|
62
|
-
@menu["c"] = {
|
|
63
|
-
desc: "configure Decko (e.g. email settings)",
|
|
64
|
-
command: "nano config/application.rb",
|
|
65
|
-
code: proc { system "nano #{config_path 'application.rb'}" }
|
|
66
|
-
}
|
|
67
|
-
end
|
|
68
|
-
|
|
69
|
-
def add_seed_options
|
|
70
|
-
add_common_seed_option
|
|
71
|
-
add_seed_all_option
|
|
72
|
-
end
|
|
73
|
-
|
|
74
|
-
def add_common_seed_option
|
|
75
|
-
@menu["s"] = {
|
|
76
|
-
desc: "seed #{Rails.env}#{' and test' if dev_options?} database",
|
|
77
|
-
command: "decko seed",
|
|
78
|
-
code: proc do
|
|
79
|
-
bundle_exec "rake decko:seed"
|
|
80
|
-
bundle_exec "rake decko:seed", rails_env: "test" if dev_options?
|
|
81
|
-
add_after_seed_options
|
|
82
|
-
end
|
|
83
|
-
}
|
|
84
|
-
end
|
|
85
|
-
|
|
86
|
-
def add_seed_all_option
|
|
87
|
-
@menu["a"] = {
|
|
88
|
-
desc: "seed all databases (production, development, and test)",
|
|
89
|
-
command: "decko seed --all",
|
|
90
|
-
code: proc do
|
|
91
|
-
%w(production development test).each do |env|
|
|
92
|
-
bundle_exec "rake decko:seed", rails_env: env
|
|
93
|
-
end
|
|
94
|
-
add_after_seed_options
|
|
95
|
-
end
|
|
96
|
-
}
|
|
97
|
-
end
|
|
98
|
-
|
|
99
|
-
def add_exit_option
|
|
100
|
-
@menu["x"] = {
|
|
101
|
-
desc: "exit (run 'decko seed' to complete the installation later)"
|
|
102
|
-
}
|
|
103
|
-
end
|
|
104
|
-
|
|
105
|
-
def add_after_seed_options
|
|
106
|
-
@menu["x"][:desc] = "exit"
|
|
107
|
-
@menu["r"] = {
|
|
108
|
-
desc: "run decko server",
|
|
109
|
-
command: "decko server",
|
|
110
|
-
code: proc { bundle_exec "decko server" }
|
|
111
|
-
}
|
|
112
|
-
end
|
|
113
|
-
end
|
|
114
|
-
end
|
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
source 'http://rubygems.org'
|
|
2
|
-
|
|
3
|
-
<% if @gem_path.present? %>
|
|
4
|
-
path "<%= @gemfile_gem_path %>" do
|
|
5
|
-
gem 'decko'
|
|
6
|
-
gem 'card', :require => false
|
|
7
|
-
gem 'cardname', :require => false
|
|
8
|
-
end
|
|
9
|
-
<% else %>
|
|
10
|
-
gem 'decko'
|
|
11
|
-
<% end %>
|
|
12
|
-
|
|
13
|
-
gem '<%= database_gemfile_entry.name %>'<%= %(, '#{database_gemfile_entry.version}') if database_gemfile_entry.version %>
|
|
14
|
-
|
|
15
|
-
# WEBSERVER
|
|
16
|
-
# To run a simple deck at localhost:3000, you can use thin (recommended), unicorn, or (Rails' default) Webrick
|
|
17
|
-
gem 'thin'
|
|
18
|
-
# gem 'unicorn'
|
|
19
|
-
|
|
20
|
-
# To set up a production webserver, see https://decko.org/wagn_in_production
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
# BACKGROUNDING
|
|
24
|
-
# The daemons gem is needed to run tasks like sending notifications in a background process.
|
|
25
|
-
# See config/application.rb for configuration details.
|
|
26
|
-
# gem 'daemons'
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
<% if options['mod-dev'] || options['core-dev'] -%>
|
|
30
|
-
group :test do
|
|
31
|
-
gem 'capybara-puma'
|
|
32
|
-
gem 'rspec'
|
|
33
|
-
gem 'rspec-rails', '~>4.0.0.beta2' # behavior-driven-development suite
|
|
34
|
-
gem 'spork', '>=0.9'
|
|
35
|
-
gem 'rubocop'
|
|
36
|
-
gem 'rubocop-decko'
|
|
37
|
-
gem 'nokogumbo'
|
|
38
|
-
end
|
|
39
|
-
|
|
40
|
-
group :test, :cypress do
|
|
41
|
-
gem 'cypress-on-rails', '~> 1.4'
|
|
42
|
-
end
|
|
43
|
-
|
|
44
|
-
group :test, :development do
|
|
45
|
-
gem 'colorize'
|
|
46
|
-
gem 'delayed_job_active_record', '~> 4.1'
|
|
47
|
-
gem 'html2haml'
|
|
48
|
-
# gem 'jasmine'
|
|
49
|
-
# gem 'jasmine-rails'
|
|
50
|
-
# gem 'jasmine-jquery-rails'
|
|
51
|
-
gem 'sprockets' # just so above works
|
|
52
|
-
gem 'phantomjs', '1.9.7.1' #locked because 1.9.8.0 is breaking
|
|
53
|
-
|
|
54
|
-
gem 'better_errors'
|
|
55
|
-
gem 'binding_of_caller'
|
|
56
|
-
|
|
57
|
-
<%- if spring_install? %>
|
|
58
|
-
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
|
|
59
|
-
gem 'listen', '3.0.6'
|
|
60
|
-
gem 'spring'
|
|
61
|
-
gem 'spring-commands-rspec'
|
|
62
|
-
gem 'spring-commands-cucumber'
|
|
63
|
-
<% end -%>
|
|
64
|
-
end
|
|
65
|
-
|
|
66
|
-
group :debug do
|
|
67
|
-
gem 'pry-rails'
|
|
68
|
-
gem 'pry-rescue'
|
|
69
|
-
gem 'pry-stack_explorer'
|
|
70
|
-
gem 'pry-byebug'
|
|
71
|
-
end
|
|
72
|
-
<% end -%>
|
|
73
|
-
|
|
74
|
-
<% if options['core-dev'] -%>
|
|
75
|
-
group :assets do
|
|
76
|
-
gem 'jquery-rails', '~> 4.3' # main js framework, along with rails-specific unobtrusive lib
|
|
77
|
-
gem 'jquery-ui-rails', '~> 6.0' # main js framework, along with rails-specific unobtrusive lib
|
|
78
|
-
gem "jquery_mobile_rails", "~> 1.4.5"
|
|
79
|
-
|
|
80
|
-
gem 'tinymce-rails', '~> 3.4' # wysiwyg editor
|
|
81
|
-
end
|
|
82
|
-
|
|
83
|
-
group :test do
|
|
84
|
-
gem 'capybara-select2', :git=>'https://github.com/brunocavalcante/capybara-select2'
|
|
85
|
-
gem 'fog-aws'
|
|
86
|
-
gem 'rails-controller-testing'
|
|
87
|
-
gem 'rspec-html-matchers', '0.9.1'
|
|
88
|
-
gem 'rr' #, '=1.0.0'
|
|
89
|
-
gem 'simplecov', '~> 0.7.1', :require => false #test coverage
|
|
90
|
-
gem 'codeclimate-test-reporter', require: nil
|
|
91
|
-
# gem 'guard-rspec', '~> 4.2' # trigger test runs based on file edits,
|
|
92
|
-
# currently not compatible with spring-watcher-listen
|
|
93
|
-
if RUBY_PLATFORM =~ /darwin/
|
|
94
|
-
# gem 'terminal-notifier-guard', '~> 1.5' # use growler notifications on macs
|
|
95
|
-
# gem 'rspec-legacy_formatters'
|
|
96
|
-
# gem 'wagn-rspec-formatter', :git=>'https://github.com/xithan/wagn-rspec-formatter.git'
|
|
97
|
-
end
|
|
98
|
-
|
|
99
|
-
# CUKES see features dir
|
|
100
|
-
gem 'cucumber-rails', '~> 1.8.0', :require=>false # feature-driven-development suite
|
|
101
|
-
gem 'capybara', '~> 3.12'
|
|
102
|
-
gem 'selenium-webdriver', '3.141.0'
|
|
103
|
-
gem 'chromedriver-helper', '~> 2.1.0'
|
|
104
|
-
# gem 'capybara-webkit'
|
|
105
|
-
gem 'launchy' # lets cucumber launch browser windows
|
|
106
|
-
|
|
107
|
-
gem 'timecop', '=0.3.5' # not clear on use/need. referred to in shared_data.rb
|
|
108
|
-
# NOTE: had weird errors with timecop 0.4.4. would like to update when possible
|
|
109
|
-
|
|
110
|
-
gem 'email_spec' #
|
|
111
|
-
gem 'database_cleaner', '~> 1.5 ' # used by cucumber for db transactions
|
|
112
|
-
|
|
113
|
-
# gem 'turn', :require => false # Pretty printed test output. (version constraint is to avoid minitest requirement)
|
|
114
|
-
gem 'minitest'
|
|
115
|
-
|
|
116
|
-
gem 'i18n-tasks', '~> 0.9.5' # See if I18n keys are missing or unused
|
|
117
|
-
end
|
|
118
|
-
|
|
119
|
-
gem 'ruby-prof', :group=>:profile # profiling
|
|
120
|
-
<% end %>
|
|
121
|
-
|
|
122
|
-
# load gems needed in Gemfiles
|
|
123
|
-
# You may need to alter this code if you move your mod(s) to an unconventional location.
|
|
124
|
-
Dir.glob( 'mod/**{,/*/**}/Gemfile' ).each do |gemfile|
|
|
125
|
-
instance_eval File.read(gemfile)
|
|
126
|
-
end
|