decko 0.11.7 → 0.12.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (78) hide show
  1. checksums.yaml +4 -4
  2. data/lib/card_controller.rb +4 -0
  3. data/lib/card_controller/errors.rb +11 -13
  4. data/lib/decko.rb +2 -15
  5. data/lib/decko/all.rb +2 -0
  6. data/lib/decko/application.rb +22 -56
  7. data/lib/decko/cli.rb +1 -7
  8. data/lib/decko/commands.rb +17 -110
  9. data/lib/decko/commands/application.rb +2 -2
  10. data/lib/decko/commands/cucumber_command.rb +8 -7
  11. data/lib/decko/commands/cucumber_command/parser.rb +2 -2
  12. data/lib/decko/engine.rb +3 -14
  13. data/lib/decko/generators.rb +17 -0
  14. data/lib/decko/mods_spec_helper.rb +1 -1
  15. data/lib/decko/script_decko_loader.rb +5 -38
  16. data/lib/decko/tasks/cucumber.rake +25 -16
  17. data/lib/decko/tasks/decko.rake +1 -2
  18. data/lib/decko/tasks/decko/seed.rake +5 -3
  19. data/lib/generators/deck/deck_generator.rb +12 -0
  20. metadata +23 -65
  21. data/lib/decko/commands/command.rb +0 -28
  22. data/lib/decko/commands/rake_command.rb +0 -42
  23. data/lib/decko/commands/rake_command/parser.rb +0 -35
  24. data/lib/decko/commands/rspec_command.rb +0 -36
  25. data/lib/decko/commands/rspec_command/parser.rb +0 -97
  26. data/lib/decko/config/environments/cucumber.rb +0 -41
  27. data/lib/decko/config/environments/cypress.rb +0 -100
  28. data/lib/decko/config/environments/development.rb +0 -95
  29. data/lib/decko/config/environments/production.rb +0 -75
  30. data/lib/decko/config/environments/profile.rb +0 -33
  31. data/lib/decko/config/environments/test.rb +0 -69
  32. data/lib/decko/config/initializers/secret_token.rb +0 -15
  33. data/lib/decko/config/initializers/sedate_parser.rb +0 -8
  34. data/lib/decko/config/initializers/session_store.rb +0 -2
  35. data/lib/decko/generators/deck/USAGE +0 -9
  36. data/lib/decko/generators/deck/deck_generator.rb +0 -134
  37. data/lib/decko/generators/deck/deck_generator/deck_helper.rb +0 -110
  38. data/lib/decko/generators/deck/deck_generator/interactive.rb +0 -120
  39. data/lib/decko/generators/deck/deck_generator/rails_overrides.rb +0 -54
  40. data/lib/decko/generators/deck/templates/Gemfile.erb +0 -56
  41. data/lib/decko/generators/deck/templates/Rakefile.erb +0 -6
  42. data/lib/decko/generators/deck/templates/bin/spring.erb +0 -20
  43. data/lib/decko/generators/deck/templates/config.ru.erb +0 -11
  44. data/lib/decko/generators/deck/templates/config/application.rb.erb +0 -107
  45. data/lib/decko/generators/deck/templates/config/boot.rb.erb +0 -11
  46. data/lib/decko/generators/deck/templates/config/cucumber.yml +0 -1
  47. data/lib/decko/generators/deck/templates/config/databases/frontbase.yml +0 -34
  48. data/lib/decko/generators/deck/templates/config/databases/ibm_db.yml +0 -89
  49. data/lib/decko/generators/deck/templates/config/databases/jdbc.yml +0 -65
  50. data/lib/decko/generators/deck/templates/config/databases/jdbcmysql.yml +0 -36
  51. data/lib/decko/generators/deck/templates/config/databases/jdbcpostgresql.yml +0 -46
  52. data/lib/decko/generators/deck/templates/config/databases/jdbcsqlite3.yml +0 -23
  53. data/lib/decko/generators/deck/templates/config/databases/mysql.yml +0 -37
  54. data/lib/decko/generators/deck/templates/config/databases/oracle.yml +0 -42
  55. data/lib/decko/generators/deck/templates/config/databases/postgresql.yml +0 -39
  56. data/lib/decko/generators/deck/templates/config/databases/sqlite3.yml +0 -21
  57. data/lib/decko/generators/deck/templates/config/deck.yml +0 -10
  58. data/lib/decko/generators/deck/templates/config/environment.rb.erb +0 -5
  59. data/lib/decko/generators/deck/templates/config/initializers/cypress.rb +0 -12
  60. data/lib/decko/generators/deck/templates/config/puma.rb +0 -16
  61. data/lib/decko/generators/deck/templates/config/routes.rb.erb +0 -11
  62. data/lib/decko/generators/deck/templates/config/storage.yml +0 -0
  63. data/lib/decko/generators/deck/templates/gitignore +0 -18
  64. data/lib/decko/generators/deck/templates/pryrc +0 -6
  65. data/lib/decko/generators/deck/templates/public/files/htaccess +0 -9
  66. data/lib/decko/generators/deck/templates/public/robots.txt +0 -13
  67. data/lib/decko/generators/deck/templates/rspec.erb +0 -6
  68. data/lib/decko/generators/deck/templates/script/decko +0 -6
  69. data/lib/decko/generators/deck/templates/script/decko_cucumber +0 -8
  70. data/lib/decko/generators/deck/templates/script/decko_rspec +0 -8
  71. data/lib/decko/generators/deck/templates/script/delayed_job +0 -5
  72. data/lib/decko/generators/deck/templates/simplecov.rb.erb +0 -34
  73. data/lib/decko/generators/deck/templates/spec/javascripts/support/deck_jasmine.yml.erb +0 -56
  74. data/lib/decko/generators/deck/templates/spec/javascripts/support/decko_jasmine.yml.erb +0 -74
  75. data/lib/decko/generators/deck/templates/spec/spec_helper.rb +0 -1
  76. data/script/autospec +0 -4
  77. data/script/decko +0 -6
  78. data/script/rails +0 -6
@@ -1,36 +0,0 @@
1
- # MySQL. Versions 4.1 and 5.0 are recommended.
2
- #
3
- # Install the MySQL driver:
4
- # gem install activerecord-jdbcmysql-adapter
5
- #
6
- # Configure Using Gemfile
7
- # gem 'activerecord-jdbcmysql-adapter'
8
- #
9
- # And be sure to use new-style password hashing:
10
- # http://dev.mysql.com/doc/refman/5.0/en/old-client.html
11
- development:
12
- adapter: mysql
13
- database: <%= app_name %>_development
14
- username: root
15
- password:
16
- host: localhost
17
-
18
- # Warning: The database defined as "test" will be erased and
19
- # re-generated from your development database when you run "rake".
20
- # Do not set this db to the same as development or production.
21
- test: &test
22
- adapter: mysql
23
- database: <%= app_name %>_test
24
- username: root
25
- password:
26
- host: localhost
27
-
28
- cucumber: *test
29
- cypress: *test
30
-
31
- production:
32
- adapter: mysql
33
- database: <%= app_name %>_production
34
- username: root
35
- password:
36
- host: localhost
@@ -1,46 +0,0 @@
1
- # PostgreSQL. Versions 8.2 and up are supported.
2
- #
3
- # Configure Using Gemfile
4
- # gem 'activerecord-jdbcpostgresql-adapter'
5
-
6
- development:
7
- adapter: postgresql
8
- encoding: unicode
9
- database: <%= app_name %>_development
10
- username: <%= app_name %>
11
- password:
12
-
13
- # Connect on a TCP socket. Omitted by default since the client uses a
14
- # domain socket that doesn't need configuration. Windows does not have
15
- # domain sockets, so uncomment these lines.
16
- #host: localhost
17
- #port: 5432
18
-
19
- # Schema search path. The server defaults to $user,public
20
- #schema_search_path: myapp,sharedapp,public
21
-
22
- # Minimum log levels, in increasing order:
23
- # debug5, debug4, debug3, debug2, debug1,
24
- # log, notice, warning, error, fatal, and panic
25
- # The server defaults to notice.
26
- #min_messages: warning
27
-
28
- # Warning: The database defined as "test" will be erased and
29
- # re-generated from your development database when you run "rake".
30
- # Do not set this db to the same as development or production.
31
- test: &test
32
- adapter: postgresql
33
- encoding: unicode
34
- database: <%= app_name %>_test
35
- username: <%= app_name %>
36
- password:
37
-
38
- cucumber: *test
39
- cypress: *test
40
-
41
- production:
42
- adapter: postgresql
43
- encoding: unicode
44
- database: <%= app_name %>_production
45
- username: <%= app_name %>
46
- password:
@@ -1,23 +0,0 @@
1
- # SQLite version 3.x
2
- # gem 'activerecord-jdbcsqlite3-adapter'
3
- #
4
- # Configure Using Gemfile
5
- # gem 'activerecord-jdbcsqlite3-adapter'
6
- #
7
- development:
8
- adapter: sqlite3
9
- database: db/development.sqlite3
10
-
11
- # Warning: The database defined as "test" will be erased and
12
- # re-generated from your development database when you run "rake".
13
- # Do not set this db to the same as development or production.
14
- test: &test
15
- adapter: sqlite3
16
- database: db/test.sqlite3
17
-
18
- cucumber: *test
19
- cypress: *test
20
-
21
- production:
22
- adapter: sqlite3
23
- database: db/production.sqlite3
@@ -1,37 +0,0 @@
1
- # MySQL. Versions 4.1 and 5.0 are recommended.
2
- # Be sure to use new-style password hashing:
3
- # http://dev.mysql.com/doc/refman/5.0/en/old-client.html
4
-
5
- shared:
6
- adapter: mysql2
7
- encoding: utf8
8
- reconnect: false
9
- pool: 5
10
- username: root
11
- password:
12
- <% if mysql_socket -%>
13
- socket: <%= mysql_socket %>
14
- <% else -%>
15
- host: localhost
16
- <% end -%>
17
-
18
- production:
19
- database: <%= app_name %>_production
20
-
21
- development: &development
22
- database: <%= app_name %>_development
23
-
24
- # Warning: The database defined as "test" will be erased and
25
- # re-generated from your development database when you run "rake".
26
- # Do not set this db to the same as development or production.
27
- test: &test
28
- database: <%= app_name %>_test
29
-
30
- cucumber: *test
31
- cypress: *test
32
-
33
- profile: *development
34
-
35
-
36
-
37
-
@@ -1,42 +0,0 @@
1
- # Oracle/OCI 8i, 9, 10g
2
- #
3
- # Requires Ruby/OCI8:
4
- # http://rubyforge.org/projects/ruby-oci8/
5
- #
6
- # Specify your database using any valid connection syntax, such as a
7
- # tnsnames.ora service name, or an SQL connect string of the form:
8
- #
9
- # //host:[port][/service name]
10
- #
11
- # By default prefetch_rows (OCI_ATTR_PREFETCH_ROWS) is set to 100. And
12
- # until true bind variables are supported, cursor_sharing is set by default
13
- # to 'similar'. Both can be changed in the configuration below; the defaults
14
- # are equivalent to specifying:
15
- #
16
- # prefetch_rows: 100
17
- # cursor_sharing: similar
18
- #
19
-
20
- development:
21
- adapter: oracle
22
- database: <%= app_name %>_development
23
- username: <%= app_name %>
24
- password:
25
-
26
- # Warning: The database defined as "test" will be erased and
27
- # re-generated from your development database when you run "rake".
28
- # Do not set this db to the same as development or production.
29
- test: &test
30
- adapter: oracle
31
- database: <%= app_name %>_test
32
- username: <%= app_name %>
33
- password:
34
-
35
- cucumber: *test
36
- cypress: *test
37
-
38
- production:
39
- adapter: oracle
40
- database: <%= app_name %>_production
41
- username: <%= app_name %>
42
- password:
@@ -1,39 +0,0 @@
1
- # PostgreSQL. Versions 8.2 and up are supported.
2
-
3
- shared:
4
- adapter: postgresql
5
- encoding: unicode
6
- pool: 5
7
- username: <%= app_name %>
8
- password:
9
-
10
- development:
11
- database: <%= app_name %>_development
12
-
13
- # Connect on a TCP socket. Omitted by default since the client uses a
14
- # domain socket that doesn't need configuration. Windows does not have
15
- # domain sockets, so uncomment these lines.
16
- #host: localhost
17
- #port: 5432
18
-
19
- # Schema search path. The server defaults to $user,public
20
- #schema_search_path: myapp,sharedapp,public
21
-
22
- # Minimum log levels, in increasing order:
23
- # debug5, debug4, debug3, debug2, debug1,
24
- # log, notice, warning, error, fatal, and panic
25
- # The server defaults to notice.
26
- #min_messages: warning
27
-
28
- # Warning: The database defined as "test" will be erased and
29
- # re-generated from your development database when you run "rake".
30
- # Do not set this db to the same as development or production.
31
- test: &test
32
- database: <%= app_name %>_test
33
-
34
- cucumber: *test
35
- cypress: *test
36
-
37
- production:
38
- database: <%= app_name %>_production
39
-
@@ -1,21 +0,0 @@
1
- # SQLite version 3.x
2
- shared:
3
- adapter: sqlite3
4
- pool: 5
5
- timeout: 5000
6
-
7
-
8
- development:
9
- database: db/development.sqlite3
10
-
11
- # Warning: The database defined as "test" will be erased and
12
- # re-generated from your development database when you run "rake".
13
- # Do not set this db to the same as development or production.
14
- test: &test
15
- database: db/test.sqlite3
16
-
17
- cucumber: *test
18
- cypress: *test
19
-
20
- production:
21
- database: db/production.sqlite3
@@ -1,10 +0,0 @@
1
- defaults: &defaults
2
-
3
- development:
4
- <<: *defaults
5
-
6
- test:
7
- <<: *defaults
8
-
9
- production:
10
- <<: *defaults
@@ -1,5 +0,0 @@
1
- # Load the decko application
2
- require File.expand_path("../application", __FILE__)
3
-
4
- # Initialize the decko application
5
- <%= app_const %>.initialize!
@@ -1,12 +0,0 @@
1
- if defined?(CypressOnRails)
2
- require "simplecov"
3
-
4
- CypressOnRails.configure do |c|
5
- c.cypress_folder = File.join Decko.gem_root, "spec", "cypress"
6
- # WARNING!! CypressOnRails can execute arbitrary ruby code
7
- # please use with extra caution if enabling on hosted servers or starting your
8
- # local server on 0.0.0.0
9
- c.use_middleware = Rails.env.cypress? || ENV["CYPRESS_DEV"]
10
- c.logger = Rails.logger
11
- end
12
- end
@@ -1,16 +0,0 @@
1
- workers Integer(ENV["WEB_CONCURRENCY"] || 1)
2
- min_threads_count = Integer(ENV["RAILS_MIN_THREADS"] || 1)
3
- max_threads_count = Integer(ENV["RAILS_MAX_THREADS"] || 1)
4
- threads min_threads_count, max_threads_count
5
-
6
- preload_app!
7
-
8
- rackup DefaultRackup
9
- port ENV["PORT"] || 3000
10
- environment ENV["RACK_ENV"] || "development"
11
-
12
- on_worker_boot do
13
- # Worker specific setup for Rails 4.1+
14
- # See: https://devcenter.heroku.com/articles/deploying-rails-applications-with-the-puma-web-server#on-worker-boot
15
- ActiveRecord::Base.establish_connection
16
- end
@@ -1,11 +0,0 @@
1
- # -*- encoding : utf-8 -*-
2
-
3
- Decko.application.routes.draw do
4
- <% if !shark? %>
5
- if !Rails.env.production? && Object.const_defined?( :JasmineRails )
6
- engine = Object.const_get(:JasmineRails).const_get :Engine
7
- mount engine => "#{rel_root}/specs"
8
- end
9
- <% end %>
10
- mount Decko::Engine => "/"
11
- end
@@ -1,18 +0,0 @@
1
- # See http://help.github.com/ignore-files/ for more about ignoring files.
2
- #
3
- # If you find yourself ignoring temporary files generated by your text editor
4
- # or operating system, you probably want to add a global ignore instead:
5
- # git config --global core.excludesfile ~/.gitignore_global
6
-
7
- # Ignore bundler config
8
- /.bundler
9
-
10
- # Ignore data files
11
- /files/*
12
-
13
- # Ignore log files
14
- /log/*
15
-
16
- # Ignore tmp directory
17
- /tmp
18
-
@@ -1,6 +0,0 @@
1
- begin
2
- puts "Loading pry configuration: (#{File.expand_path __FILE__})"
3
- include Cardio::Pry
4
- rescue NameError
5
- puts 'Card config unavailable. Add `gem "card-mod-monkey" to Gemfile to enable.'
6
- end
@@ -1,9 +0,0 @@
1
- # Some browsers still send conditional-GET requests if there's a
2
- # Last-Modified header or an ETag header even if they haven't
3
- # reached the expiry date sent in the Expires header.
4
- Header unset Last-Modified
5
- Header unset ETag
6
- FileETag None
7
- # RFC says only cache for 1 year
8
- ExpiresActive On
9
- ExpiresDefault "access plus 1 year"
@@ -1,13 +0,0 @@
1
- # See http://www.robotstxt.org/wc/norobots.html
2
- # for documentation on how to use the robots.txt file
3
- #
4
- # To ban all spiders from the entire site uncomment the next two lines:
5
- # User-Agent: *
6
- # Disallow: /
7
-
8
- User-agent: *
9
- Crawl-delay: 3
10
- Disallow: /card/*
11
- Disallow: /admin/*
12
- Disallow: /account/*
13
- Allow: /
@@ -1,6 +0,0 @@
1
- --color
2
- --profile
3
- --backtrace
4
- --format documentation
5
- --default-path '<%= File.expand_path spec_path %>'
6
- --require '<%= File.expand_path spec_helper_path %>'
@@ -1,6 +0,0 @@
1
-
2
- # This command will be run when you use `decko` from within your deck.
3
-
4
- APP_PATH = File.expand_path("../../config/application", __FILE__)
5
- require File.expand_path("../../config/boot", __FILE__)
6
- require "decko/commands"
@@ -1,8 +0,0 @@
1
-
2
- # used to run cucumber in RubyMine
3
-
4
- ENV["RAILS_ENV"] = "cucumber"
5
- ENV["RAILS_ROOT"] = "."
6
- BUNDLE_GEMFILE = File.expand_path "../../Gemfile", __FILE__
7
- ARGV.insert 0, "cucumber", "--"
8
- load File.expand_path("../decko", __FILE__)
@@ -1,8 +0,0 @@
1
-
2
- # used to run rspec in RubyMine
3
-
4
- ENV["RAILS_ENV"] = "test"
5
- ENV["RAILS_ROOT"] = "."
6
- BUNDLE_GEMFILE = File.expand_path "../../Gemfile", __FILE__
7
- ARGV.insert 0, "rspec", "--no-simplecov", "--"
8
- load File.expand_path("../decko", __FILE__)
@@ -1,5 +0,0 @@
1
-
2
- ENV["RAILS_ENV"] ||= "production"
3
- require File.expand_path(File.join(File.dirname(__FILE__), "..", "config", "environment"))
4
- require "delayed/command"
5
- Delayed::Command.new(ARGV).daemonize
@@ -1,34 +0,0 @@
1
-
2
- if ENV["<%= 'REPO_' if platypus? %>TMPSETS"] && ENV["COVERAGE"] != "false"
3
- SimpleCov.start do
4
- def add_mod_group modname
5
- mod_dir = /(card-mod-)?#{Regexp.escape modname}/
6
- add_group "Mod: #{modname}", %r{(^|card-mod-|mod/|/tmp.*/.*/mod\d{3}-)#{mod_dir}}
7
- end
8
- <% if platypus? %>
9
- root "<%= expanded_repo_path %>"
10
-
11
- add_filter "/generators/"
12
- add_filter "_spec_helper"
13
- add_filter "test_seed"
14
-
15
- add_group "Card", "card/"
16
- add_group "Cardname", "cardname"
17
- add_group "Decko", "decko"
18
-
19
- Dir["#{root}/{card/mod/*,card-mod-*}"].each do |path|
20
- match = path.match %r{/card[-/]mod[-/](?<modname>.*)$}
21
- add_mod_group match[:modname]
22
- end
23
- <% else %>
24
- Dir["mod/*"].each do |path|
25
- modname = path.gsub "mod/", ""
26
- add_mod_group modname
27
- end
28
- <% end %>
29
- add_filter "/spec/"
30
- add_filter "/features/"
31
- add_filter "/config/"
32
- add_filter "/tasks/"
33
- end
34
- end