calendar_nike 0.0.1 → 0.0.2

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/MIT-LICENSE +1 -1
  3. data/Rakefile +0 -13
  4. data/lib/calendar_nike.rb +0 -2
  5. data/lib/calendar_nike/version.rb +1 -1
  6. data/lib/generators/calendar/USAGE +8 -0
  7. data/lib/generators/calendar/install_generator.rb +17 -0
  8. data/{app/assets/stylesheets/calendar_nike → lib/generators/calendar/templates}/calendar.css +15 -6
  9. data/lib/generators/calendar/templates/calendar.rb +33 -0
  10. data/lib/generators/calendar/templates/calendar_helper.rb +82 -0
  11. metadata +12 -141
  12. data/README.rdoc +0 -3
  13. data/app/assets/javascripts/calendar_nike/application.js +0 -13
  14. data/app/assets/javascripts/calendar_nike/calendar.js +0 -2
  15. data/app/assets/stylesheets/calendar_nike/application.css +0 -29
  16. data/app/controllers/calendar_nike/application_controller.rb +0 -4
  17. data/app/controllers/calendar_nike/calendar_controller.rb +0 -31
  18. data/app/helpers/calendar_nike/application_helper.rb +0 -4
  19. data/app/helpers/calendar_nike/calendar_helper.rb +0 -4
  20. data/app/views/calendar_nike/calendar/_month.html.erb +0 -13
  21. data/app/views/calendar_nike/calendar/_weeks.html.erb +0 -13
  22. data/app/views/calendar_nike/calendar/_year.html.erb +0 -13
  23. data/app/views/calendar_nike/calendar/index.html.erb +0 -51
  24. data/app/views/layouts/calendar_nike/application.html.erb +0 -14
  25. data/config/routes.rb +0 -7
  26. data/lib/calendar_nike/engine.rb +0 -5
  27. data/test/calendar_nike_test.rb +0 -7
  28. data/test/controllers/calendar_nike/calendar_controller_test.rb +0 -9
  29. data/test/dummy/README.rdoc +0 -28
  30. data/test/dummy/Rakefile +0 -6
  31. data/test/dummy/app/assets/javascripts/application.js +0 -13
  32. data/test/dummy/app/assets/stylesheets/application.css +0 -15
  33. data/test/dummy/app/controllers/application_controller.rb +0 -5
  34. data/test/dummy/app/helpers/application_helper.rb +0 -2
  35. data/test/dummy/app/views/layouts/application.html.erb +0 -14
  36. data/test/dummy/bin/bundle +0 -3
  37. data/test/dummy/bin/rails +0 -4
  38. data/test/dummy/bin/rake +0 -4
  39. data/test/dummy/config.ru +0 -4
  40. data/test/dummy/config/application.rb +0 -23
  41. data/test/dummy/config/boot.rb +0 -5
  42. data/test/dummy/config/database.yml +0 -25
  43. data/test/dummy/config/environment.rb +0 -5
  44. data/test/dummy/config/environments/development.rb +0 -37
  45. data/test/dummy/config/environments/production.rb +0 -82
  46. data/test/dummy/config/environments/test.rb +0 -39
  47. data/test/dummy/config/initializers/assets.rb +0 -8
  48. data/test/dummy/config/initializers/backtrace_silencers.rb +0 -7
  49. data/test/dummy/config/initializers/cookies_serializer.rb +0 -3
  50. data/test/dummy/config/initializers/filter_parameter_logging.rb +0 -4
  51. data/test/dummy/config/initializers/inflections.rb +0 -16
  52. data/test/dummy/config/initializers/mime_types.rb +0 -4
  53. data/test/dummy/config/initializers/session_store.rb +0 -3
  54. data/test/dummy/config/initializers/wrap_parameters.rb +0 -14
  55. data/test/dummy/config/locales/en.yml +0 -23
  56. data/test/dummy/config/routes.rb +0 -4
  57. data/test/dummy/config/secrets.yml +0 -22
  58. data/test/dummy/db/development.sqlite3 +0 -0
  59. data/test/dummy/log/development.log +0 -237
  60. data/test/dummy/public/404.html +0 -67
  61. data/test/dummy/public/422.html +0 -67
  62. data/test/dummy/public/500.html +0 -66
  63. data/test/dummy/public/favicon.ico +0 -0
  64. data/test/dummy/tmp/cache/assets/development/sprockets/0019c0827263ad81b43f760637a8961f +0 -0
  65. data/test/dummy/tmp/cache/assets/development/sprockets/05c6b5493b23cd3e60c5eafade9c6f07 +0 -0
  66. data/test/dummy/tmp/cache/assets/development/sprockets/06958d6c49ac131139b8ec8cebd747f5 +0 -0
  67. data/test/dummy/tmp/cache/assets/development/sprockets/06e9966ebb030547fb0782657ae454cb +0 -0
  68. data/test/dummy/tmp/cache/assets/development/sprockets/0799b62749835bafbf6234137532f058 +0 -0
  69. data/test/dummy/tmp/cache/assets/development/sprockets/3dca9bad775eb97606214f7ddcf6e5cd +0 -0
  70. data/test/dummy/tmp/cache/assets/development/sprockets/43941a94299df73424353d1f25c4ab2e +0 -0
  71. data/test/dummy/tmp/cache/assets/development/sprockets/7e75a730c57018ade57b6872c4dd1cd7 +0 -0
  72. data/test/dummy/tmp/cache/assets/development/sprockets/828e2f99f560a5df601692ced6ac88d5 +0 -0
  73. data/test/dummy/tmp/cache/assets/development/sprockets/9bc658079d5bb5b10c1fbabdb691cc54 +0 -0
  74. data/test/dummy/tmp/cache/assets/development/sprockets/ca3a1c57400802905035ab3c144edbb3 +0 -0
  75. data/test/dummy/tmp/cache/assets/development/sprockets/de3d9de2c571faaed43d508f683cca61 +0 -0
  76. data/test/helpers/calendar_nike/calendar_helper_test.rb +0 -6
  77. data/test/integration/navigation_test.rb +0 -10
  78. data/test/test_helper.rb +0 -15
@@ -1,4 +0,0 @@
1
- module CalendarNike
2
- class ApplicationController < ActionController::Base
3
- end
4
- end
@@ -1,31 +0,0 @@
1
- require_dependency "calendar_nike/application_controller"
2
-
3
- module CalendarNike
4
- class CalendarController < ApplicationController
5
-
6
- def index
7
-
8
- if params[:date]
9
- @date = params[:date].to_date
10
- else
11
- @date = DateTime.now
12
- end
13
-
14
- @today = DateTime.now.strftime("%Y-%m-%d")
15
-
16
- @day = 1
17
-
18
- @days_in_month = [nil, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]
19
-
20
- @nil_days = 0
21
-
22
- @nil_days_in_month = @date.beginning_of_month.wday
23
-
24
- @weeks = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]
25
-
26
- @months = [nil, "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]
27
-
28
- end
29
-
30
- end
31
- end
@@ -1,4 +0,0 @@
1
- module CalendarNike
2
- module ApplicationHelper
3
- end
4
- end
@@ -1,4 +0,0 @@
1
- module CalendarNike
2
- module CalendarHelper
3
- end
4
- end
@@ -1,13 +0,0 @@
1
- <div class="calendar-month">
2
-
3
- <div class="last">
4
- <%= link_to "<", calendar_path(@date.last_month.strftime("%Y-%m-%d")) %>
5
- </div>
6
-
7
- <%= @months[@date.month] %>
8
-
9
- <div class="next">
10
- <%= link_to ">", calendar_path(@date.next_month.strftime("%Y-%m-%d")) %>
11
- </div>
12
-
13
- </div>
@@ -1,13 +0,0 @@
1
- <div class="calendar-weeks">
2
-
3
- <% @weeks.each do |week| %>
4
-
5
- <div class="calendar-week">
6
-
7
- <%= week %>
8
-
9
- </div>
10
-
11
- <% end %>
12
-
13
- </div>
@@ -1,13 +0,0 @@
1
- <div class="calendar-year">
2
-
3
- <div class="last">
4
- <%= link_to "<", calendar_path(@date.last_year.strftime("%Y-%m-%d")) %>
5
- </div>
6
-
7
- <%= @date.year %>
8
-
9
- <div class="next">
10
- <%= link_to ">", calendar_path(@date.next_year.strftime("%Y-%m-%d")) %>
11
- </div>
12
-
13
- </div>
@@ -1,51 +0,0 @@
1
- <div class="calendar-container">
2
-
3
- <div class="calendar-header">
4
-
5
- <%= render "year" %>
6
-
7
- <%= render "month" %>
8
-
9
- </div>
10
-
11
- <%= render "weeks" %>
12
-
13
- <div class="calendar-days">
14
-
15
- <% while @nil_days < @nil_days_in_month %>
16
-
17
- <div class="calendar-nil-days"> &nbsp; </div>
18
-
19
- <% @nil_days += 1 %>
20
-
21
- <% end %>
22
-
23
- <% while @day < @days_in_month[@date.month] %>
24
-
25
- <% if DateTime.new(@date.year, @date.month, @day).strftime("%Y-%m-%d") == @today %>
26
-
27
- <div class="calendar-today">
28
-
29
- <%= @day %>
30
-
31
- </div>
32
-
33
- <% else %>
34
-
35
- <div class="calendar-day">
36
-
37
- <%= @day %>
38
-
39
- </div>
40
-
41
- <% end %>
42
-
43
- <% @day += 1 %>
44
-
45
- <% end %>
46
-
47
- </div>
48
-
49
- <div class="clear"></div>
50
-
51
- </div>
@@ -1,14 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <title>CalendarNike</title>
5
- <%= stylesheet_link_tag "calendar_nike/application", media: "all" %>
6
- <%= javascript_include_tag "calendar_nike/application" %>
7
- <%= csrf_meta_tags %>
8
- </head>
9
- <body>
10
-
11
- <%= yield %>
12
-
13
- </body>
14
- </html>
@@ -1,7 +0,0 @@
1
- CalendarNike::Engine.routes.draw do
2
-
3
- root "calendar#index"
4
-
5
- get "/:date", to: "calendar#index", as: :calendar
6
-
7
- end
@@ -1,5 +0,0 @@
1
- module CalendarNike
2
- class Engine < ::Rails::Engine
3
- isolate_namespace CalendarNike
4
- end
5
- end
@@ -1,7 +0,0 @@
1
- require 'test_helper'
2
-
3
- class CalendarNikeTest < ActiveSupport::TestCase
4
- test "truth" do
5
- assert_kind_of Module, CalendarNike
6
- end
7
- end
@@ -1,9 +0,0 @@
1
- require 'test_helper'
2
-
3
- module CalendarNike
4
- class CalendarControllerTest < ActionController::TestCase
5
- # test "the truth" do
6
- # assert true
7
- # end
8
- end
9
- end
@@ -1,28 +0,0 @@
1
- == README
2
-
3
- This README would normally document whatever steps are necessary to get the
4
- application up and running.
5
-
6
- Things you may want to cover:
7
-
8
- * Ruby version
9
-
10
- * System dependencies
11
-
12
- * Configuration
13
-
14
- * Database creation
15
-
16
- * Database initialization
17
-
18
- * How to run the test suite
19
-
20
- * Services (job queues, cache servers, search engines, etc.)
21
-
22
- * Deployment instructions
23
-
24
- * ...
25
-
26
-
27
- Please feel free to use a different markup language if you do not plan to run
28
- <tt>rake doc:app</tt>.
@@ -1,6 +0,0 @@
1
- # Add your own tasks in files placed in lib/tasks ending in .rake,
2
- # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
3
-
4
- require File.expand_path('../config/application', __FILE__)
5
-
6
- Rails.application.load_tasks
@@ -1,13 +0,0 @@
1
- // This is a manifest file that'll be compiled into application.js, which will include all the files
2
- // listed below.
3
- //
4
- // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
5
- // or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
6
- //
7
- // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
8
- // compiled file.
9
- //
10
- // Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details
11
- // about supported directives.
12
- //
13
- //= require_tree .
@@ -1,15 +0,0 @@
1
- /*
2
- * This is a manifest file that'll be compiled into application.css, which will include all the files
3
- * listed below.
4
- *
5
- * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
6
- * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
7
- *
8
- * You're free to add application-wide styles to this file and they'll appear at the bottom of the
9
- * compiled file so the styles you add here take precedence over styles defined in any styles
10
- * defined in the other CSS/SCSS files in this directory. It is generally better to create a new
11
- * file per style scope.
12
- *
13
- *= require_tree .
14
- *= require_self
15
- */
@@ -1,5 +0,0 @@
1
- class ApplicationController < ActionController::Base
2
- # Prevent CSRF attacks by raising an exception.
3
- # For APIs, you may want to use :null_session instead.
4
- protect_from_forgery with: :exception
5
- end
@@ -1,2 +0,0 @@
1
- module ApplicationHelper
2
- end
@@ -1,14 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <title>Dummy</title>
5
- <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %>
6
- <%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
7
- <%= csrf_meta_tags %>
8
- </head>
9
- <body>
10
-
11
- <%= yield %>
12
-
13
- </body>
14
- </html>
@@ -1,3 +0,0 @@
1
- #!/usr/bin/env ruby
2
- ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
3
- load Gem.bin_path('bundler', 'bundle')
@@ -1,4 +0,0 @@
1
- #!/usr/bin/env ruby
2
- APP_PATH = File.expand_path('../../config/application', __FILE__)
3
- require_relative '../config/boot'
4
- require 'rails/commands'
@@ -1,4 +0,0 @@
1
- #!/usr/bin/env ruby
2
- require_relative '../config/boot'
3
- require 'rake'
4
- Rake.application.run
@@ -1,4 +0,0 @@
1
- # This file is used by Rack-based servers to start the application.
2
-
3
- require ::File.expand_path('../config/environment', __FILE__)
4
- run Rails.application
@@ -1,23 +0,0 @@
1
- require File.expand_path('../boot', __FILE__)
2
-
3
- require 'rails/all'
4
-
5
- Bundler.require(*Rails.groups)
6
- require "calendar_nike"
7
-
8
- module Dummy
9
- class Application < Rails::Application
10
- # Settings in config/environments/* take precedence over those specified here.
11
- # Application configuration should go into files in config/initializers
12
- # -- all .rb files in that directory are automatically loaded.
13
-
14
- # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
15
- # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
16
- # config.time_zone = 'Central Time (US & Canada)'
17
-
18
- # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
19
- # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
20
- # config.i18n.default_locale = :de
21
- end
22
- end
23
-
@@ -1,5 +0,0 @@
1
- # Set up gems listed in the Gemfile.
2
- ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../../../Gemfile', __FILE__)
3
-
4
- require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE'])
5
- $LOAD_PATH.unshift File.expand_path('../../../../lib', __FILE__)
@@ -1,25 +0,0 @@
1
- # SQLite version 3.x
2
- # gem install sqlite3
3
- #
4
- # Ensure the SQLite 3 gem is defined in your Gemfile
5
- # gem 'sqlite3'
6
- #
7
- default: &default
8
- adapter: sqlite3
9
- pool: 5
10
- timeout: 5000
11
-
12
- development:
13
- <<: *default
14
- database: db/development.sqlite3
15
-
16
- # Warning: The database defined as "test" will be erased and
17
- # re-generated from your development database when you run "rake".
18
- # Do not set this db to the same as development or production.
19
- test:
20
- <<: *default
21
- database: db/test.sqlite3
22
-
23
- production:
24
- <<: *default
25
- database: db/production.sqlite3
@@ -1,5 +0,0 @@
1
- # Load the Rails application.
2
- require File.expand_path('../application', __FILE__)
3
-
4
- # Initialize the Rails application.
5
- Rails.application.initialize!
@@ -1,37 +0,0 @@
1
- Rails.application.configure do
2
- # Settings specified here will take precedence over those in config/application.rb.
3
-
4
- # In the development environment your application's code is reloaded on
5
- # every request. This slows down response time but is perfect for development
6
- # since you don't have to restart the web server when you make code changes.
7
- config.cache_classes = false
8
-
9
- # Do not eager load code on boot.
10
- config.eager_load = false
11
-
12
- # Show full error reports and disable caching.
13
- config.consider_all_requests_local = true
14
- config.action_controller.perform_caching = false
15
-
16
- # Don't care if the mailer can't send.
17
- config.action_mailer.raise_delivery_errors = false
18
-
19
- # Print deprecation notices to the Rails logger.
20
- config.active_support.deprecation = :log
21
-
22
- # Raise an error on page load if there are pending migrations.
23
- config.active_record.migration_error = :page_load
24
-
25
- # Debug mode disables concatenation and preprocessing of assets.
26
- # This option may cause significant delays in view rendering with a large
27
- # number of complex assets.
28
- config.assets.debug = true
29
-
30
- # Adds additional error checking when serving assets at runtime.
31
- # Checks for improperly declared sprockets dependencies.
32
- # Raises helpful error messages.
33
- config.assets.raise_runtime_errors = true
34
-
35
- # Raises error for missing translations
36
- # config.action_view.raise_on_missing_translations = true
37
- end
@@ -1,82 +0,0 @@
1
- Rails.application.configure do
2
- # Settings specified here will take precedence over those in config/application.rb.
3
-
4
- # Code is not reloaded between requests.
5
- config.cache_classes = true
6
-
7
- # Eager load code on boot. This eager loads most of Rails and
8
- # your application in memory, allowing both threaded web servers
9
- # and those relying on copy on write to perform better.
10
- # Rake tasks automatically ignore this option for performance.
11
- config.eager_load = true
12
-
13
- # Full error reports are disabled and caching is turned on.
14
- config.consider_all_requests_local = false
15
- config.action_controller.perform_caching = true
16
-
17
- # Enable Rack::Cache to put a simple HTTP cache in front of your application
18
- # Add `rack-cache` to your Gemfile before enabling this.
19
- # For large-scale production use, consider using a caching reverse proxy like nginx, varnish or squid.
20
- # config.action_dispatch.rack_cache = true
21
-
22
- # Disable Rails's static asset server (Apache or nginx will already do this).
23
- config.serve_static_assets = false
24
-
25
- # Compress JavaScripts and CSS.
26
- config.assets.js_compressor = :uglifier
27
- # config.assets.css_compressor = :sass
28
-
29
- # Do not fallback to assets pipeline if a precompiled asset is missed.
30
- config.assets.compile = false
31
-
32
- # Generate digests for assets URLs.
33
- config.assets.digest = true
34
-
35
- # `config.assets.precompile` has moved to config/initializers/assets.rb
36
-
37
- # Specifies the header that your server uses for sending files.
38
- # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
39
- # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
40
-
41
- # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
42
- # config.force_ssl = true
43
-
44
- # Set to :debug to see everything in the log.
45
- config.log_level = :info
46
-
47
- # Prepend all log lines with the following tags.
48
- # config.log_tags = [ :subdomain, :uuid ]
49
-
50
- # Use a different logger for distributed setups.
51
- # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
52
-
53
- # Use a different cache store in production.
54
- # config.cache_store = :mem_cache_store
55
-
56
- # Enable serving of images, stylesheets, and JavaScripts from an asset server.
57
- # config.action_controller.asset_host = "http://assets.example.com"
58
-
59
- # Precompile additional assets.
60
- # application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
61
- # config.assets.precompile += %w( search.js )
62
-
63
- # Ignore bad email addresses and do not raise email delivery errors.
64
- # Set this to true and configure the email server for immediate delivery to raise delivery errors.
65
- # config.action_mailer.raise_delivery_errors = false
66
-
67
- # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
68
- # the I18n.default_locale when a translation cannot be found).
69
- config.i18n.fallbacks = true
70
-
71
- # Send deprecation notices to registered listeners.
72
- config.active_support.deprecation = :notify
73
-
74
- # Disable automatic flushing of the log to improve performance.
75
- # config.autoflush_log = false
76
-
77
- # Use default logging formatter so that PID and timestamp are not suppressed.
78
- config.log_formatter = ::Logger::Formatter.new
79
-
80
- # Do not dump schema after migrations.
81
- config.active_record.dump_schema_after_migration = false
82
- end